vibedoc 1.6.1 → 1.8.0
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/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +11 -0
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +69 -13
- package/.next/routes-manifest.json +66 -0
- package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
- package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/board/page.js.nft.json +1 -1
- package/.next/server/app/(app)/board/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/chat/page/app-paths-manifest.json +3 -0
- package/.next/server/app/(app)/chat/page/build-manifest.json +20 -0
- package/.next/server/app/(app)/chat/page/next-font-manifest.json +11 -0
- package/.next/server/app/(app)/chat/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/(app)/chat/page/server-reference-manifest.json +4 -0
- package/.next/server/app/(app)/chat/page.js +15 -0
- package/.next/server/app/(app)/chat/page.js.map +5 -0
- package/.next/server/app/(app)/chat/page.js.nft.json +1 -0
- package/.next/server/app/(app)/chat/page_client-reference-manifest.js +3 -0
- package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
- package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/explorer/page.js.nft.json +1 -1
- package/.next/server/app/(app)/explorer/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/manual-tests/page/app-paths-manifest.json +3 -0
- package/.next/server/app/(app)/manual-tests/page/build-manifest.json +20 -0
- package/.next/server/app/(app)/manual-tests/page/next-font-manifest.json +11 -0
- package/.next/server/app/(app)/manual-tests/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/(app)/manual-tests/page/server-reference-manifest.json +4 -0
- package/.next/server/app/(app)/manual-tests/page.js +15 -0
- package/.next/server/app/(app)/manual-tests/page.js.map +5 -0
- package/.next/server/app/(app)/manual-tests/page.js.nft.json +1 -0
- package/.next/server/app/(app)/manual-tests/page_client-reference-manifest.js +3 -0
- package/.next/server/app/(app)/memory/page.js.nft.json +1 -1
- package/.next/server/app/(app)/memory/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/roadmap/page.js.nft.json +1 -1
- package/.next/server/app/(app)/roadmap/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/settings/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/setup/page.js.nft.json +1 -1
- package/.next/server/app/(app)/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/activity.html +1 -1
- package/.next/server/app/activity.rsc +14 -13
- package/.next/server/app/activity.segments/!KGFwcCk/activity/__PAGE__.segment.rsc +10 -10
- package/.next/server/app/activity.segments/_full.segment.rsc +14 -13
- package/.next/server/app/activity.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/api/activity/route.js +2 -2
- package/.next/server/app/api/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/backlinks/route.js +2 -2
- package/.next/server/app/api/backlinks/route.js.nft.json +1 -1
- package/.next/server/app/api/chat/route.js +1 -1
- package/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/.next/server/app/api/context/route.js +2 -2
- package/.next/server/app/api/context/route.js.nft.json +1 -1
- package/.next/server/app/api/conversations/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/conversations/route/build-manifest.json +12 -0
- package/.next/server/app/api/conversations/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/conversations/route.js +9 -0
- package/.next/server/app/api/conversations/route.js.map +5 -0
- package/.next/server/app/api/conversations/route.js.nft.json +1 -0
- package/.next/server/app/api/conversations/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/decisions/route.js +2 -2
- package/.next/server/app/api/decisions/route.js.nft.json +1 -1
- package/.next/server/app/api/docs/route.js +1 -1
- package/.next/server/app/api/docs/route.js.nft.json +1 -1
- package/.next/server/app/api/explorer/route.js +2 -2
- package/.next/server/app/api/explorer/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js +2 -2
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/apply/route.js +3 -3
- package/.next/server/app/api/plan/apply/route.js.nft.json +1 -1
- package/.next/server/app/api/projects/route.js +2 -2
- package/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/server/app/api/registry/route.js +2 -2
- package/.next/server/app/api/registry/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/create/route.js +3 -3
- package/.next/server/app/api/roadmap/create/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/delete/route.js +3 -3
- package/.next/server/app/api/roadmap/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/generate/route.js +3 -3
- package/.next/server/app/api/roadmap/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/layout/route.js +3 -3
- package/.next/server/app/api/roadmap/layout/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/restore/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/roadmap/restore/route/build-manifest.json +12 -0
- package/.next/server/app/api/roadmap/restore/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/roadmap/restore/route.js +9 -0
- package/.next/server/app/api/roadmap/restore/route.js.map +5 -0
- package/.next/server/app/api/roadmap/restore/route.js.nft.json +1 -0
- package/.next/server/app/api/roadmap/restore/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/roadmap/route.js +3 -3
- package/.next/server/app/api/roadmap/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/update/route.js +3 -3
- package/.next/server/app/api/roadmap/update/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +2 -2
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js +3 -3
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/generate/route.js +1 -1
- package/.next/server/app/api/setup/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/write/route.js +2 -2
- package/.next/server/app/api/setup/write/route.js.nft.json +1 -1
- package/.next/server/app/api/summary/route.js +2 -2
- package/.next/server/app/api/summary/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/bulk/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tasks/bulk/route/build-manifest.json +12 -0
- package/.next/server/app/api/tasks/bulk/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tasks/bulk/route.js +9 -0
- package/.next/server/app/api/tasks/bulk/route.js.map +5 -0
- package/.next/server/app/api/tasks/bulk/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/bulk/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tasks/create/route.js +2 -2
- package/.next/server/app/api/tasks/create/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/delete/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tasks/delete/route/build-manifest.json +12 -0
- package/.next/server/app/api/tasks/delete/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tasks/delete/route.js +9 -0
- package/.next/server/app/api/tasks/delete/route.js.map +5 -0
- package/.next/server/app/api/tasks/delete/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/delete/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tasks/manual-tests/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tasks/manual-tests/route/build-manifest.json +12 -0
- package/.next/server/app/api/tasks/manual-tests/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tasks/manual-tests/route.js +8 -0
- package/.next/server/app/api/tasks/manual-tests/route.js.map +5 -0
- package/.next/server/app/api/tasks/manual-tests/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/manual-tests/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tasks/restore/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tasks/restore/route/build-manifest.json +12 -0
- package/.next/server/app/api/tasks/restore/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tasks/restore/route.js +9 -0
- package/.next/server/app/api/tasks/restore/route.js.map +5 -0
- package/.next/server/app/api/tasks/restore/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/restore/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tasks/review/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tasks/review/route/build-manifest.json +12 -0
- package/.next/server/app/api/tasks/review/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tasks/review/route.js +9 -0
- package/.next/server/app/api/tasks/review/route.js.map +5 -0
- package/.next/server/app/api/tasks/review/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/review/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tasks/route.js +2 -2
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/update/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tasks/update/route/build-manifest.json +12 -0
- package/.next/server/app/api/tasks/update/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tasks/update/route.js +9 -0
- package/.next/server/app/api/tasks/update/route.js.map +5 -0
- package/.next/server/app/api/tasks/update/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/update/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/views/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/views/route/build-manifest.json +12 -0
- package/.next/server/app/api/views/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/views/route.js +9 -0
- package/.next/server/app/api/views/route.js.map +5 -0
- package/.next/server/app/api/views/route.js.nft.json +1 -0
- package/.next/server/app/api/views/route_client-reference-manifest.js +3 -0
- package/.next/server/app/board.html +1 -1
- package/.next/server/app/board.rsc +14 -13
- package/.next/server/app/board.segments/!KGFwcCk/board/__PAGE__.segment.rsc +10 -10
- package/.next/server/app/board.segments/_full.segment.rsc +14 -13
- package/.next/server/app/board.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/chat.html +1 -0
- package/.next/server/app/chat.meta +31 -0
- package/.next/server/app/chat.rsc +31 -0
- package/.next/server/app/chat.segments/!KGFwcCk/chat/__PAGE__.segment.rsc +34 -0
- package/.next/server/app/chat.segments/_full.segment.rsc +31 -0
- package/.next/server/app/chat.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/docs.html +1 -1
- package/.next/server/app/docs.rsc +24 -27
- package/.next/server/app/docs.segments/!KGFwcCk/docs/__PAGE__.segment.rsc +7 -6
- package/.next/server/app/docs.segments/_full.segment.rsc +24 -27
- package/.next/server/app/docs.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/explorer.html +1 -1
- package/.next/server/app/explorer.rsc +14 -13
- package/.next/server/app/explorer.segments/!KGFwcCk/explorer/__PAGE__.segment.rsc +6 -5
- package/.next/server/app/explorer.segments/_full.segment.rsc +14 -13
- package/.next/server/app/explorer.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/manual-tests.html +1 -0
- package/.next/server/app/manual-tests.meta +31 -0
- package/.next/server/app/manual-tests.rsc +31 -0
- package/.next/server/app/manual-tests.segments/!KGFwcCk/manual-tests/__PAGE__.segment.rsc +33 -0
- package/.next/server/app/manual-tests.segments/_full.segment.rsc +31 -0
- package/.next/server/app/manual-tests.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/memory.html +1 -1
- package/.next/server/app/memory.rsc +14 -13
- package/.next/server/app/memory.segments/!KGFwcCk/memory/__PAGE__.segment.rsc +6 -5
- package/.next/server/app/memory.segments/_full.segment.rsc +14 -13
- package/.next/server/app/memory.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roadmap.html +1 -1
- package/.next/server/app/roadmap.rsc +24 -26
- package/.next/server/app/roadmap.segments/!KGFwcCk/roadmap/__PAGE__.segment.rsc +10 -11
- package/.next/server/app/roadmap.segments/_full.segment.rsc +24 -26
- package/.next/server/app/roadmap.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +14 -13
- package/.next/server/app/settings.segments/!KGFwcCk/settings/__PAGE__.segment.rsc +10 -10
- package/.next/server/app/settings.segments/_full.segment.rsc +14 -13
- package/.next/server/app/settings.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/setup.html +1 -1
- package/.next/server/app/setup.rsc +14 -13
- package/.next/server/app/setup.segments/!KGFwcCk/setup/__PAGE__.segment.rsc +6 -5
- package/.next/server/app/setup.segments/_full.segment.rsc +14 -13
- package/.next/server/app/setup.segments/_tree.segment.rsc +3 -2
- package/.next/server/app-paths-manifest.json +11 -0
- package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0-5bkpj._.js → 11mp_@anthropic-ai_sdk_00p3fu1._.js} +1 -1
- package/.next/server/chunks/{11mp_@anthropic-ai_sdk_01l5h3i._.js → 11mp_@anthropic-ai_sdk_01amtux._.js} +1 -1
- package/.next/server/chunks/{11mp_@anthropic-ai_sdk_00psb_y._.js → 11mp_@anthropic-ai_sdk_01jjl08._.js} +1 -1
- package/.next/server/chunks/{11mp_@anthropic-ai_sdk_072r2bd._.js → 11mp_@anthropic-ai_sdk_071zfm8._.js} +1 -1
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_07v3boe._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_09iva72._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0bom1b1._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0dvji7p._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0dzo8jn._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0hvqsqq._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0i7i-jw._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0k0iop5._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0l3-6aq._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0oegm3y._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0p5cyes._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0qw8i6_._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0yk-a7v._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_11fsqvb._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_143_7ez._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_14a4-64._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_17d_oma._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_18qwuyb._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_19au8y6._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ak_hy5._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1cqa0nq._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1i-x_q0._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1i-x_q0._.js.map +1 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1jmtliz._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1jmtliz._.js.map +1 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1jouwlj._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1jouwlj._.js.map +1 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1r_q5um._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1r_q5um._.js.map +1 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1t959xd._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1t959xd._.js.map +1 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1vkprw9._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1vkprw9._.js.map +1 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1y95ax9._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1y95ax9._.js.map +1 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1y9misr._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1y9misr._.js.map +1 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_21b8wwy._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_21b8wwy._.js.map +1 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_08ecfgc._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_09--sd6._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0e3mwc6._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0go4301._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0iq9dmt._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0n9ijke._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0szcyrx._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0xy2s3x._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0yaujn7._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0z9ly74._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1hmq3al._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1tqk4bp._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1x-hr6f._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1zsdhg0._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_20t__fe._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1u_q61h._.js → [root-of-the-server]__0-pmfg2._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__02co2yq._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__02co2yq._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__1y3u5ud._.js → [root-of-the-server]__04tibmn._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__17xb02p._.js → [root-of-the-server]__05g5cgo._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0aynzrb._.js → [root-of-the-server]__0b5pwze._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__142icjb._.js → [root-of-the-server]__0druay_._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__106gpvh._.js → [root-of-the-server]__0p6ja6l._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0q3-t8a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0q3-t8a._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0vcsqzd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vcsqzd._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__0nfvvy9._.js → [root-of-the-server]__1-e3i_5._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1-ic3af._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-ic3af._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__11a4ptn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__11a4ptn._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__0e59y5j._.js → [root-of-the-server]__11c8641._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__11c8641._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__12nzy_6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12nzy_6._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__15ck1wv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__15ck1wv._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1613hjb._.js +30 -19
- package/.next/server/chunks/[root-of-the-server]__1613hjb._.js.map +1 -1
- package/.next/server/chunks/{[root-of-the-server]__06zf_sh._.js → [root-of-the-server]__197vw9g._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1j0rrps._.js → [root-of-the-server]__19k8t87._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0eqd-tw._.js → [root-of-the-server]__1ezzeji._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1jxu2x9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jxu2x9._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1mrmaf9._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__17p0rkn._.js → [root-of-the-server]__1n68akx._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1n68akx._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__11s76m8._.js → [root-of-the-server]__1npya5q._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1npya5q._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1qusy4g._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1qusy4g._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__1q4ahvz._.js → [root-of-the-server]__1umrorf._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__093hlkh._.js → [root-of-the-server]__1vh9g2o._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1y-tt29._.js → [root-of-the-server]__1vq38ov._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1xb0fmp._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1xb0fmp._.js.map +1 -1
- package/.next/server/chunks/_04byth9._.js +24 -19
- package/.next/server/chunks/_04byth9._.js.map +1 -1
- package/.next/server/chunks/_1au4syj._.js +1 -1
- package/.next/server/chunks/_1au4syj._.js.map +1 -1
- package/.next/server/chunks/_1b5fqxy._.js.map +1 -1
- package/.next/server/chunks/_1ivswa9._.js +3 -0
- package/.next/server/chunks/_1ivswa9._.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_conversations_route_actions_1-pu7gs.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_conversations_route_actions_1-pu7gs.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_roadmap_restore_route_actions_0skshp1.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_roadmap_restore_route_actions_0skshp1.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_bulk_route_actions_1k75mlb.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_bulk_route_actions_1k75mlb.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_delete_route_actions_1k1g6mw.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_delete_route_actions_1k1g6mw.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_manual-tests_route_actions_1rpog0y.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_manual-tests_route_actions_1rpog0y.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_restore_route_actions_1ecsti8.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_restore_route_actions_1ecsti8.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_review_route_actions_1dly07f.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_review_route_actions_1dly07f.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_update_route_actions_0z-ho6g.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tasks_update_route_actions_0z-ho6g.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_views_route_actions_10-2c0e.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_views_route_actions_10-2c0e.js.map +1 -0
- package/.next/server/chunks/ssr/{_0qyglif._.js → 0_g__next_dist_000c5_m._.js} +2 -4
- package/.next/server/chunks/ssr/0_g__next_dist_000c5_m._.js.map +1 -0
- package/.next/server/chunks/ssr/{0_nd_mermaid_dist_mermaid_core_mjs_1vulg1x._.js → 0_nd_mermaid_dist_mermaid_core_mjs_027n2yl._.js} +2 -2
- package/.next/server/chunks/ssr/0_nd_mermaid_dist_mermaid_core_mjs_027n2yl._.js.map +1 -0
- package/.next/server/chunks/ssr/{1u84_katex_dist_katex_mjs_0mwkb-i._.js → 1u84_katex_dist_katex_mjs_1kb5xea._.js} +1 -1
- package/.next/server/chunks/ssr/1u84_katex_dist_katex_mjs_1kb5xea._.js.map +1 -0
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_05ggp3i._.js +1 -1
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_05ggp3i._.js.map +1 -1
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0wurouw._.js +3 -0
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0wurouw._.js.map +1 -0
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_14hl50o._.js +3 -0
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_14hl50o._.js.map +1 -0
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_folder-open_mjs_117ipzw._.js +3 -0
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_folder-open_mjs_117ipzw._.js.map +1 -0
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_triangle-alert_mjs_0ei-mpz._.js +3 -0
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_triangle-alert_mjs_0ei-mpz._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0hcextx._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0hcextx._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xt_0w2._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__11lfnu0._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__11lfnu0._.js.map +1 -0
- package/.next/server/chunks/ssr/_04xff_2._.js +1 -1
- package/.next/server/chunks/ssr/_04xff_2._.js.map +1 -1
- package/.next/server/chunks/ssr/_071j6mr._.js +4 -0
- package/.next/server/chunks/ssr/_071j6mr._.js.map +1 -0
- package/.next/server/chunks/ssr/_09b02z-._.js +3 -0
- package/.next/server/chunks/ssr/_09b02z-._.js.map +1 -0
- package/.next/server/chunks/ssr/_0d0f1s1._.js +3 -0
- package/.next/server/chunks/ssr/_0d0f1s1._.js.map +1 -0
- package/.next/server/chunks/ssr/_0idb-vo._.js +151 -0
- package/.next/server/chunks/ssr/_0idb-vo._.js.map +1 -0
- package/.next/server/chunks/ssr/_0lnt_va._.js +4 -0
- package/.next/server/chunks/ssr/_0lnt_va._.js.map +1 -0
- package/.next/server/chunks/ssr/_0qlymco._.js +3 -0
- package/.next/server/chunks/ssr/_0qlymco._.js.map +1 -0
- package/.next/server/chunks/ssr/_0qp3gu7._.js +3 -0
- package/.next/server/chunks/ssr/_0qp3gu7._.js.map +1 -0
- package/.next/server/chunks/ssr/_0sg1oeq._.js +3 -0
- package/.next/server/chunks/ssr/_0sg1oeq._.js.map +1 -0
- package/.next/server/chunks/ssr/_14emfpq._.js +3 -0
- package/.next/server/chunks/ssr/_14emfpq._.js.map +1 -0
- package/.next/server/chunks/ssr/_1ftruw6._.js +4 -0
- package/.next/server/chunks/ssr/_1ftruw6._.js.map +1 -0
- package/.next/server/chunks/ssr/_1gxjjvh._.js +1 -1
- package/.next/server/chunks/ssr/_1gxjjvh._.js.map +1 -1
- package/.next/server/chunks/ssr/_1ncdakv._.js +4 -0
- package/.next/server/chunks/ssr/_1ncdakv._.js.map +1 -0
- package/.next/server/chunks/ssr/_1t76zdx._.js +3 -0
- package/.next/server/chunks/ssr/_1t76zdx._.js.map +1 -0
- package/.next/server/chunks/ssr/_1x7ggg5._.js +4 -0
- package/.next/server/chunks/ssr/_1x7ggg5._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_chat_page_actions_0g4tbzt.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_chat_page_actions_0g4tbzt.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_manual-tests_page_actions_1g5zjb7.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_manual-tests_page_actions_1g5zjb7.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_0w9uewb._.js → node_modules__pnpm_01bjcv9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0p10j87._.js → node_modules__pnpm_03qrzdb._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1a3fo7j._.js → node_modules__pnpm_06d-fdo._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_1o30a9w._.js → node_modules__pnpm_0ctisl0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_17o8zbz._.js → node_modules__pnpm_0fwp8jm._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_19ys1iv._.js → node_modules__pnpm_0kpu0-2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1r4w_7k._.js → node_modules__pnpm_0vry74x._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_11lluiq._.js → node_modules__pnpm_0ycbjbd._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_1_34wt2._.js → node_modules__pnpm_1-76qxg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0ma8hho._.js → node_modules__pnpm_1-r94f7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0--x5-5._.js → node_modules__pnpm_14piqi4._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_14piqi4._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_04xoqd9._.js → node_modules__pnpm_16u1vfb._.js} +2 -2
- package/.next/server/chunks/ssr/node_modules__pnpm_16u1vfb._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_19ejwjv._.js → node_modules__pnpm_17i6z2d._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0cj37c-._.js → node_modules__pnpm_189m48n._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_189m48n._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_18pu1wl._.js → node_modules__pnpm_192f222._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1zsbfem._.js → node_modules__pnpm_1a48_nl._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_00i3mh2._.js → node_modules__pnpm_1aa37e1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0kna82c._.js → node_modules__pnpm_1f440kx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1-poetj._.js → node_modules__pnpm_1fn3ejy._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0yixxj2._.js → node_modules__pnpm_1min2jl._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_1q89l7p._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_1q89l7p._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_1l-posw._.js → node_modules__pnpm_1q_hhr3._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_0fk-8nl._.js → node_modules__pnpm_1qmkxyo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1xolwvc._.js → node_modules__pnpm_1qp_jvj._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_07j8gcu._.js → node_modules__pnpm_1ssjj4u._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_042y3e-._.js → node_modules__pnpm_1txccoj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0nbxdp_._.js → node_modules__pnpm_1uwkcin._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_1xeothw._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_1xeothw._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_00wjhj4._.js → node_modules__pnpm_1ygal0c._.js} +1 -1
- package/.next/server/chunks/ssr/src_app_(app)_activity_page_tsx_13jd6bn._.js +1 -1
- package/.next/server/chunks/ssr/src_app_(app)_activity_page_tsx_13jd6bn._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_(app)_board_page_tsx_0gpfc77._.js +3 -0
- package/.next/server/chunks/ssr/src_app_(app)_board_page_tsx_0gpfc77._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_(app)_chat_page_tsx_0c3e4l4._.js +3 -0
- package/.next/server/chunks/ssr/src_app_(app)_chat_page_tsx_0c3e4l4._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_(app)_layout_tsx_1yu5hom._.js +3 -0
- package/.next/server/chunks/ssr/src_app_(app)_layout_tsx_1yu5hom._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_(app)_manual-tests_page_tsx_01tnunf._.js +3 -0
- package/.next/server/chunks/ssr/src_app_(app)_manual-tests_page_tsx_01tnunf._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_(app)_roadmap_page_tsx_0vcq3jr._.js +5 -0
- package/.next/server/chunks/ssr/src_app_(app)_roadmap_page_tsx_0vcq3jr._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_(app)_settings_page_tsx_0zevtee._.js +2 -2
- package/.next/server/chunks/ssr/src_app_(app)_settings_page_tsx_0zevtee._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_(app)_setup_page_tsx_1yids_n._.js +1 -1
- package/.next/server/chunks/ssr/src_app_(app)_setup_page_tsx_1yids_n._.js.map +1 -1
- package/.next/server/chunks/ssr/src_components_chat_ChatView_tsx_0h5j-e2._.js +3 -0
- package/.next/server/chunks/ssr/src_components_chat_ChatView_tsx_0h5j-e2._.js.map +1 -0
- package/.next/server/chunks/ssr/src_context_ChatContext_tsx_0lowp8p._.js +5 -0
- package/.next/server/chunks/ssr/src_context_ChatContext_tsx_0lowp8p._.js.map +1 -0
- package/.next/server/chunks/ssr/{_1wf14_u._.js → src_lib_templates_index_ts_1s61uk7._.js} +2 -2
- package/.next/server/chunks/ssr/{_1wf14_u._.js.map → src_lib_templates_index_ts_1s61uk7._.js.map} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +8 -0
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/prefetch-hints.json +38 -0
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/02cj5_i9np4sg.js +3 -0
- package/.next/static/chunks/02i5hsdat1nuq.css +9 -0
- package/.next/static/chunks/0mgifb98wbesa.js +1 -0
- package/.next/static/chunks/0p1-hkgnm2ll2.js +1 -0
- package/.next/static/chunks/0pgu5q5vodev6.js +1 -0
- package/.next/static/chunks/0rqzvayflendx.js +2 -0
- package/.next/static/chunks/0vcfs7dii85tw.js +21 -0
- package/.next/static/chunks/13l4l-boqg8fx.js +1 -0
- package/.next/static/chunks/14hxe1qiaram9.js +1 -0
- package/.next/static/chunks/150y5rwg6gwvx.css +1 -0
- package/.next/static/chunks/16k196zyl-n9q.js +1 -0
- package/.next/static/chunks/18b5l8p0vd9f8.js +1 -0
- package/.next/static/chunks/1c_8t2kecjnua.js +1 -0
- package/.next/static/chunks/1fd43t9y42wd3.js +1 -0
- package/.next/static/chunks/1q50zh5z-fq2k.js +2 -0
- package/.next/static/chunks/1tu8lforstp1o.js +1 -0
- package/.next/static/chunks/23-xknrz6o748.js +1 -0
- package/.next/static/chunks/2_xpm7qhr69n8.js +2 -0
- package/.next/static/chunks/2ls_yp4-qgb42.js +1 -0
- package/.next/static/chunks/2zz0ip2l_29c3.js +3 -0
- package/.next/static/chunks/3ly7b47esdb7j.js +1 -0
- package/.next/static/chunks/3ruw8lu2_re-h.js +1 -0
- package/.next/static/chunks/3vf5nnd4xjo5_.js +1 -0
- package/.next/static/chunks/{0eggcu0ovk8sd.js → 40jaenrnspnlh.js} +26 -26
- package/.next/static/chunks/41oxcdcw-pcwt.js +1 -0
- package/README.md +3 -2
- package/package.json +1 -1
- package/skills/work-epic/SKILL.md +22 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0am8bw2._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0enefn6._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0k3n_5f._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0lcfjm4._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0lfx9av._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0qau3qw._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0r1pmvm._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_11t-z2t._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_15hyn79._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1_qk07x._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1b2929e._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1e72c89._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1eq7asn._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1fhdojs._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1lh_vwq._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ludf-o._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1m3luz3._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1x1iz3d._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1xsmwlh._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_202spah._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_215hw9u._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0n-i0pd._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_13pos4j._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_17b4pqr._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1bkcmom._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1hlj_3l._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1ip-sor._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1pex5o1._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1s8lc8_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1o4a-4j._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1o4a-4j._.js.map +0 -1
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js +0 -3
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js.map +0 -1
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0c1k9is._.js +0 -3
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0c1k9is._.js.map +0 -1
- package/.next/server/chunks/ssr/_0qyglif._.js.map +0 -1
- package/.next/server/chunks/ssr/_0skuoxv._.js +0 -6
- package/.next/server/chunks/ssr/_0skuoxv._.js.map +0 -1
- package/.next/server/chunks/ssr/_14i_6yb._.js +0 -3
- package/.next/server/chunks/ssr/_14i_6yb._.js.map +0 -1
- package/.next/server/chunks/ssr/_1c95ems._.js +0 -151
- package/.next/server/chunks/ssr/_1c95ems._.js.map +0 -1
- package/.next/server/chunks/ssr/_1cbhuz4._.js +0 -3
- package/.next/server/chunks/ssr/_1cbhuz4._.js.map +0 -1
- package/.next/server/chunks/ssr/_1ewk_mn._.js +0 -3
- package/.next/server/chunks/ssr/_1ewk_mn._.js.map +0 -1
- package/.next/server/chunks/ssr/_1y-ofyw._.js +0 -3
- package/.next/server/chunks/ssr/_1y-ofyw._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_0bmkw6o._.js +0 -3
- package/.next/server/chunks/ssr/node_modules__pnpm_0bmkw6o._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_1imm4ut._.js +0 -3
- package/.next/server/chunks/ssr/node_modules__pnpm_1imm4ut._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_008q3v8._.js +0 -3
- package/.next/server/chunks/ssr/src_components_008q3v8._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_14pwej-._.js +0 -3
- package/.next/server/chunks/ssr/src_components_14pwej-._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_ui_scroll-area_tsx_0i-n_27._.js +0 -3
- package/.next/server/chunks/ssr/src_components_ui_scroll-area_tsx_0i-n_27._.js.map +0 -1
- package/.next/static/chunks/0-vk2d2nnzav2.js +0 -3
- package/.next/static/chunks/0-z7kyblalrea.js +0 -1
- package/.next/static/chunks/02sab26ica2x3.js +0 -1
- package/.next/static/chunks/0iva6rdtfqpbz.js +0 -1
- package/.next/static/chunks/0k2qhx29amdgs.js +0 -1
- package/.next/static/chunks/0qm101bdsxdyh.css +0 -10
- package/.next/static/chunks/0wg9n5zb8mo2p.js +0 -1
- package/.next/static/chunks/0z_y7el6m76yk.js +0 -1
- package/.next/static/chunks/1-ekntoveuxzd.js +0 -4
- package/.next/static/chunks/10neasnz6hhq1.js +0 -1
- package/.next/static/chunks/1r7z33e9jk3vp.js +0 -1
- package/.next/static/chunks/22dw7r8x0h2sx.js +0 -1
- package/.next/static/chunks/26ee8jsbellqk.js +0 -21
- package/.next/static/chunks/3kkg030rcpz7l.js +0 -1
- package/.next/static/chunks/3pf_4ye6ju8gt.js +0 -1
- package/.next/static/chunks/3smp1lj103j-l.js +0 -1
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0-5bkpj._.js.map → 11mp_@anthropic-ai_sdk_00p3fu1._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_00psb_y._.js.map → 11mp_@anthropic-ai_sdk_01amtux._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_01l5h3i._.js.map → 11mp_@anthropic-ai_sdk_01jjl08._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_072r2bd._.js.map → 11mp_@anthropic-ai_sdk_071zfm8._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0am8bw2._.js.map → 11mp_@anthropic-ai_sdk_07v3boe._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0enefn6._.js.map → 11mp_@anthropic-ai_sdk_09iva72._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0k3n_5f._.js.map → 11mp_@anthropic-ai_sdk_0bom1b1._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0lcfjm4._.js.map → 11mp_@anthropic-ai_sdk_0dvji7p._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0lfx9av._.js.map → 11mp_@anthropic-ai_sdk_0dzo8jn._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0qau3qw._.js.map → 11mp_@anthropic-ai_sdk_0hvqsqq._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0r1pmvm._.js.map → 11mp_@anthropic-ai_sdk_0i7i-jw._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_11t-z2t._.js.map → 11mp_@anthropic-ai_sdk_0k0iop5._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_15hyn79._.js.map → 11mp_@anthropic-ai_sdk_0l3-6aq._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1_qk07x._.js.map → 11mp_@anthropic-ai_sdk_0oegm3y._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1b2929e._.js.map → 11mp_@anthropic-ai_sdk_0p5cyes._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1e72c89._.js.map → 11mp_@anthropic-ai_sdk_0qw8i6_._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1eq7asn._.js.map → 11mp_@anthropic-ai_sdk_0yk-a7v._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1fhdojs._.js.map → 11mp_@anthropic-ai_sdk_11fsqvb._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1lh_vwq._.js.map → 11mp_@anthropic-ai_sdk_143_7ez._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1ludf-o._.js.map → 11mp_@anthropic-ai_sdk_14a4-64._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1m3luz3._.js.map → 11mp_@anthropic-ai_sdk_17d_oma._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1x1iz3d._.js.map → 11mp_@anthropic-ai_sdk_18qwuyb._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1xsmwlh._.js.map → 11mp_@anthropic-ai_sdk_19au8y6._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_202spah._.js.map → 11mp_@anthropic-ai_sdk_1ak_hy5._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_215hw9u._.js.map → 11mp_@anthropic-ai_sdk_1cqa0nq._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_0n-i0pd._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_08ecfgc._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_13pos4j._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_09--sd6._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_17b4pqr._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0e3mwc6._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1bkcmom._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0go4301._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1hlj_3l._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0iq9dmt._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1ip-sor._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0n9ijke._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1pex5o1._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0szcyrx._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1s8lc8_._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0xy2s3x._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__0e59y5j._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0yaujn7._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__11s76m8._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0z9ly74._.js.map} +0 -0
- /package/.next/server/chunks/{ssr/0_nd_mermaid_dist_mermaid_core_mjs_1vulg1x._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1hmq3al._.js.map} +0 -0
- /package/.next/server/chunks/{ssr/1u84_katex_dist_katex_mjs_0mwkb-i._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1tqk4bp._.js.map} +0 -0
- /package/.next/server/chunks/{ssr/node_modules__pnpm_0--x5-5._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1x-hr6f._.js.map} +0 -0
- /package/.next/server/chunks/{ssr/node_modules__pnpm_04xoqd9._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1zsdhg0._.js.map} +0 -0
- /package/.next/server/chunks/{ssr/node_modules__pnpm_0cj37c-._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_20t__fe._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1u_q61h._.js.map → [root-of-the-server]__0-pmfg2._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1y3u5ud._.js.map → [root-of-the-server]__04tibmn._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__17xb02p._.js.map → [root-of-the-server]__05g5cgo._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__0aynzrb._.js.map → [root-of-the-server]__0b5pwze._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__142icjb._.js.map → [root-of-the-server]__0druay_._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__106gpvh._.js.map → [root-of-the-server]__0p6ja6l._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__0nfvvy9._.js.map → [root-of-the-server]__1-e3i_5._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__06zf_sh._.js.map → [root-of-the-server]__197vw9g._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1j0rrps._.js.map → [root-of-the-server]__19k8t87._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__0eqd-tw._.js.map → [root-of-the-server]__1ezzeji._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__17p0rkn._.js.map → [root-of-the-server]__1mrmaf9._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1q4ahvz._.js.map → [root-of-the-server]__1umrorf._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__093hlkh._.js.map → [root-of-the-server]__1vh9g2o._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1y-tt29._.js.map → [root-of-the-server]__1vq38ov._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0w9uewb._.js.map → node_modules__pnpm_01bjcv9._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0p10j87._.js.map → node_modules__pnpm_03qrzdb._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1a3fo7j._.js.map → node_modules__pnpm_06d-fdo._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1o30a9w._.js.map → node_modules__pnpm_0ctisl0._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_17o8zbz._.js.map → node_modules__pnpm_0fwp8jm._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_19ys1iv._.js.map → node_modules__pnpm_0kpu0-2._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1r4w_7k._.js.map → node_modules__pnpm_0vry74x._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_11lluiq._.js.map → node_modules__pnpm_0ycbjbd._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1_34wt2._.js.map → node_modules__pnpm_1-76qxg._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0ma8hho._.js.map → node_modules__pnpm_1-r94f7._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_19ejwjv._.js.map → node_modules__pnpm_17i6z2d._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_18pu1wl._.js.map → node_modules__pnpm_192f222._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1zsbfem._.js.map → node_modules__pnpm_1a48_nl._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_00i3mh2._.js.map → node_modules__pnpm_1aa37e1._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0kna82c._.js.map → node_modules__pnpm_1f440kx._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1-poetj._.js.map → node_modules__pnpm_1fn3ejy._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0yixxj2._.js.map → node_modules__pnpm_1min2jl._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1l-posw._.js.map → node_modules__pnpm_1q_hhr3._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0fk-8nl._.js.map → node_modules__pnpm_1qmkxyo._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1xolwvc._.js.map → node_modules__pnpm_1qp_jvj._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_07j8gcu._.js.map → node_modules__pnpm_1ssjj4u._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_042y3e-._.js.map → node_modules__pnpm_1txccoj._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0nbxdp_._.js.map → node_modules__pnpm_1uwkcin._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_00wjhj4._.js.map → node_modules__pnpm_1ygal0c._.js.map} +0 -0
- /package/.next/static/{gJtrYenzL6_deB-6pdvIL → fGPda81_8-K4GmaNUE6KA}/_buildManifest.js +0 -0
- /package/.next/static/{gJtrYenzL6_deB-6pdvIL → fGPda81_8-K4GmaNUE6KA}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{gJtrYenzL6_deB-6pdvIL → fGPda81_8-K4GmaNUE6KA}/_ssgManifest.js +0 -0
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
module.exports=[522734,(t,e,i)=>{e.exports=t.x("fs",()=>require("fs"))},924868,(t,e,i)=>{e.exports=t.x("fs/promises",()=>require("fs/promises"))},687769,(t,e,i)=>{e.exports=t.x("node:events",()=>require("node:events"))},899871,(t,e,i)=>{e.exports=t.x("node:string_decoder",()=>require("node:string_decoder"))},857764,(t,e,i)=>{e.exports=t.x("node:url",()=>require("node:url"))},799501,975283,31451,t=>{"use strict";var e=t.i(924868),i=t.i(814747),s=t.i(857764),r=t.i(750227),n=t.i(522734),a=t.i(902157),o=t.i(912714),h=t.i(687769),l=t.i(81111),d=t.i(899871),u=(t,e,i)=>{let s=t instanceof RegExp?c(t,i):t,r=e instanceof RegExp?c(e,i):e,n=null!==s&&null!=r&&p(s,r,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+s.length,n[1]),post:i.slice(n[1]+r.length)}},c=(t,e)=>{let i=e.match(t);return i?i[0]:null},p=(t,e,i)=>{let s,r,n,a,o,h=i.indexOf(t),l=i.indexOf(e,h+1),d=h;if(h>=0&&l>0){if(t===e)return[h,l];for(s=[],n=i.length;d>=0&&!o;){if(d===h)s.push(d),h=i.indexOf(t,d+1);else if(1===s.length){let t=s.pop();void 0!==t&&(o=[t,l])}else void 0!==(r=s.pop())&&r<n&&(n=r,a=l),l=i.indexOf(e,d+1);d=h<l&&h>=0?h:l}s.length&&void 0!==a&&(o=[n,a])}return o},f="\0SLASH"+Math.random()+"\0",m="\0OPEN"+Math.random()+"\0",g="\0CLOSE"+Math.random()+"\0",w="\0COMMA"+Math.random()+"\0",y="\0PERIOD"+Math.random()+"\0",b=RegExp(f,"g"),v=RegExp(m,"g"),S=RegExp(g,"g"),k=RegExp(w,"g"),$=RegExp(y,"g"),E=/\\\\/g,x=/\\{/g,C=/\\}/g,O=/\\,/g,A=/\\./g;function R(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function T(t){return t.replace(b,"\\").replace(v,"{").replace(S,"}").replace(k,",").replace($,".")}function F(t){return"{"+t+"}"}function j(t){return/^-?0\d/.test(t)}function _(t,e){return t<=e}function D(t,e){return t>=e}var M=t=>{if("string"!=typeof t)throw TypeError("invalid pattern");if(t.length>65536)throw TypeError("pattern is too long")},P={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},N=t=>t.replace(/[[\]\\-]/g,"\\$&"),W=(t,e)=>{if("["!==t.charAt(e))throw Error("not in a brace expression");let i=[],s=[],r=e+1,n=!1,a=!1,o=!1,h=!1,l=e,d="";t:for(;r<t.length;){let u=t.charAt(r);if(("!"===u||"^"===u)&&r===e+1){h=!0,r++;continue}if("]"===u&&n&&!o){l=r+1;break}if(n=!0,"\\"===u&&!o){o=!0,r++;continue}if("["===u&&!o){for(let[n,[o,h,l]]of Object.entries(P))if(t.startsWith(n,r)){if(d)return["$.",!1,t.length-e,!0];r+=n.length,l?s.push(o):i.push(o),a=a||h;continue t}}if(o=!1,d){u>d?i.push(N(d)+"-"+N(u)):u===d&&i.push(N(u)),d="",r++;continue}if(t.startsWith("-]",r+1)){i.push(N(u+"-")),r+=2;continue}if(t.startsWith("-",r+1)){d=u,r+=2;continue}i.push(N(u)),r++}if(l<r)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,t.length-e,!0];if(0===s.length&&1===i.length&&/^\\?.$/.test(i[0])&&!h)return[(2===i[0].length?i[0].slice(-1):i[0]).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),!1,l-e,!1];let u="["+(h?"^":"")+i.join("")+"]",c="["+(h?"":"^")+s.join("")+"]";return[i.length&&s.length?"("+u+"|"+c+")":i.length?u:c,a,l-e,!0]},L=(t,{windowsPathsNoEscape:e=!1,magicalBraces:i=!0}={})=>i?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),z=new Set(["!","?","+","*","@"]),I=t=>z.has(t),U="(?!\\.)",B=new Set(["[","."]),G=new Set(["..","."]),q=new Set("().*{}+?[]^$\\!"),Y=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),H="[^/]",J=H+"*?",K=H+"+?",V=class t{type;#t;#e;#i=!1;#s=[];#r;#n;#a;#o=!1;#h;#l;#d=!1;constructor(t,e,i={}){this.type=t,t&&(this.#e=!0),this.#r=e,this.#t=this.#r?this.#r.#t:this,this.#h=this.#t===this?i:this.#t.#h,this.#a=this.#t===this?[]:this.#t.#a,"!"!==t||this.#t.#o||this.#a.push(this),this.#n=this.#r?this.#r.#s.length:0}get hasMagic(){if(void 0!==this.#e)return this.#e;for(let t of this.#s)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return void 0!==this.#l?this.#l:this.type?this.#l=this.type+"("+this.#s.map(t=>String(t)).join("|")+")":this.#l=this.#s.map(t=>String(t)).join("")}#u(){let t;if(this!==this.#t)throw Error("should only call on root");if(this.#o)return this;for(this.toString(),this.#o=!0;t=this.#a.pop();){if("!"!==t.type)continue;let e=t,i=e.#r;for(;i;){for(let s=e.#n+1;!i.type&&s<i.#s.length;s++)for(let e of t.#s){if("string"==typeof e)throw Error("string part in extglob AST??");e.copyIn(i.#s[s])}i=(e=i).#r}}return this}push(...e){for(let i of e)if(""!==i){if("string"!=typeof i&&!(i instanceof t&&i.#r===this))throw Error("invalid part: "+i);this.#s.push(i)}}toJSON(){let t=null===this.type?this.#s.slice().map(t=>"string"==typeof t?t:t.toJSON()):[this.type,...this.#s.map(t=>t.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#o&&this.#r?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#r?.isStart())return!1;if(0===this.#n)return!0;let e=this.#r;for(let i=0;i<this.#n;i++){let s=e.#s[i];if(!(s instanceof t&&"!"===s.type))return!1}return!0}isEnd(){if(this.#t===this||this.#r?.type==="!")return!0;if(!this.#r?.isEnd())return!1;if(!this.type)return this.#r?.isEnd();let t=this.#r?this.#r.#s.length:0;return this.#n===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(e){let i=new t(this.type,e);for(let t of this.#s)i.copyIn(t);return i}static #c(e,i,s,r){let n=!1,a=!1,o=-1,h=!1;if(null===i.type){let l=s,d="";for(;l<e.length;){let s=e.charAt(l++);if(n||"\\"===s){n=!n,d+=s;continue}if(a){l===o+1?("^"===s||"!"===s)&&(h=!0):"]"!==s||l===o+2&&h||(a=!1),d+=s;continue}if("["===s){a=!0,o=l,h=!1,d+=s;continue}if(!r.noext&&I(s)&&"("===e.charAt(l)){i.push(d),d="";let n=new t(s,i);l=t.#c(e,n,l,r),i.push(n);continue}d+=s}return i.push(d),l}let l=s+1,d=new t(null,i),u=[],c="";for(;l<e.length;){let s=e.charAt(l++);if(n||"\\"===s){n=!n,c+=s;continue}if(a){l===o+1?("^"===s||"!"===s)&&(h=!0):"]"!==s||l===o+2&&h||(a=!1),c+=s;continue}if("["===s){a=!0,o=l,h=!1,c+=s;continue}if(I(s)&&"("===e.charAt(l)){d.push(c),c="";let i=new t(s,d);d.push(i),l=t.#c(e,i,l,r);continue}if("|"===s){d.push(c),c="",u.push(d),d=new t(null,i);continue}if(")"===s)return""===c&&0===i.#s.length&&(i.#d=!0),d.push(c),c="",i.push(...u,d),l;c+=s}return i.type=null,i.#e=void 0,i.#s=[e.substring(s-1)],l}static fromGlob(e,i={}){let s=new t(null,void 0,i);return t.#c(e,s,0,i),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[e,i,s,r]=this.toRegExpSource();return s||this.#e||this.#h.nocase&&!this.#h.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()?Object.assign(RegExp(`^${e}$`,(this.#h.nocase?"i":"")+(r?"u":"")),{_src:e,_glob:t}):i}get options(){return this.#h}toRegExpSource(e){let i=e??!!this.#h.dot;if(this.#t===this&&this.#u(),!this.type){let s=this.isStart()&&this.isEnd()&&!this.#s.some(t=>"string"!=typeof t),r=this.#s.map(i=>{let[r,n,a,o]="string"==typeof i?t.#p(i,this.#e,s):i.toRegExpSource(e);return this.#e=this.#e||a,this.#i=this.#i||o,r}).join(""),n="";if(this.isStart()&&"string"==typeof this.#s[0]&&!(1===this.#s.length&&G.has(this.#s[0]))){let t=i&&B.has(r.charAt(0))||r.startsWith("\\.")&&B.has(r.charAt(2))||r.startsWith("\\.\\.")&&B.has(r.charAt(4)),s=!i&&!e&&B.has(r.charAt(0));n=t?"(?!(?:^|/)\\.\\.?(?:$|/))":s?U:""}let a="";return this.isEnd()&&this.#t.#o&&this.#r?.type==="!"&&(a="(?:$|\\/)"),[n+r+a,L(r),this.#e=!!this.#e,this.#i]}let s="*"===this.type||"+"===this.type,r="!"===this.type?"(?:(?!(?:":"(?:",n=this.#f(i);if(this.isStart()&&this.isEnd()&&!n&&"!"!==this.type){let t=this.toString();return this.#s=[t],this.type=null,this.#e=void 0,[t,L(this.toString()),!1,!1]}let a=!s||e||i||!U?"":this.#f(!0);a===n&&(a=""),a&&(n=`(?:${n})(?:${a})*?`);return["!"===this.type&&this.#d?(this.isStart()&&!i?U:"")+K:r+n+("!"===this.type?"))"+(!this.isStart()||i||e?"":U)+J+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&a?")":"*"===this.type&&a?")?":`)${this.type}`),L(n),this.#e=!!this.#e,this.#i]}#f(t){return this.#s.map(e=>{if("string"==typeof e)throw Error("string type in extglob ast??");let[i,s,r,n]=e.toRegExpSource(t);return this.#i=this.#i||n,i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static #p(t,e,i=!1){let s=!1,r="",n=!1,a=!1;for(let o=0;o<t.length;o++){let h=t.charAt(o);if(s){s=!1,r+=(q.has(h)?"\\":"")+h;continue}if("*"===h){if(a)continue;a=!0,r+=i&&/^[*]+$/.test(t)?K:J,e=!0;continue}if(a=!1,"\\"===h){o===t.length-1?r+="\\\\":s=!0;continue}if("["===h){let[i,s,a,h]=W(t,o);if(a){r+=i,n=n||s,o+=a-1,e=e||h;continue}}if("?"===h){r+=H,e=!0;continue}r+=Y(h)}return[r,L(t),!!e,n]}},X=(t,{windowsPathsNoEscape:e=!1,magicalBraces:i=!1}={})=>i?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),Z=(t,e,i={})=>(M(e),(!!i.nocomment||"#"!==e.charAt(0))&&new tg(e,i).match(t)),Q=/^\*+([^+@!?\*\[\(]*)$/,tt=/^\*+\.\*+$/,te=t=>!t.startsWith(".")&&t.includes("."),ti=t=>"."!==t&&".."!==t&&t.includes("."),ts=/^\.\*+$/,tr=t=>"."!==t&&".."!==t&&t.startsWith("."),tn=/^\*+$/,ta=t=>0!==t.length&&!t.startsWith("."),to=t=>0!==t.length&&"."!==t&&".."!==t,th=/^\?+([^+@!?\*\[\(]*)?$/,tl=([t])=>{let e=t.length;return t=>t.length===e&&!t.startsWith(".")},td=([t])=>{let e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},tu="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Z.sep="win32"===tu?"\\":"/";var tc=Symbol("globstar **");Z.GLOBSTAR=tc;Z.filter=(t,e={})=>i=>Z(i,t,e);var tp=(t,e={})=>Object.assign({},t,e);Z.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Z;let e=Z;return Object.assign((i,s,r={})=>e(i,s,tp(t,r)),{Minimatch:class extends e.Minimatch{constructor(e,i={}){super(e,tp(t,i))}static defaults(i){return e.defaults(tp(t,i)).Minimatch}},AST:class extends e.AST{constructor(e,i,s={}){super(e,i,tp(t,s))}static fromGlob(i,s={}){return e.AST.fromGlob(i,tp(t,s))}},unescape:(i,s={})=>e.unescape(i,tp(t,s)),escape:(i,s={})=>e.escape(i,tp(t,s)),filter:(i,s={})=>e.filter(i,tp(t,s)),defaults:i=>e.defaults(tp(t,i)),makeRe:(i,s={})=>e.makeRe(i,tp(t,s)),braceExpand:(i,s={})=>e.braceExpand(i,tp(t,s)),match:(i,s,r={})=>e.match(i,s,tp(t,r)),sep:e.sep,GLOBSTAR:tc})};var tf=(t,e={})=>(M(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:function(t,e={}){if(!t)return[];let{max:i=1e5}=e;return"{}"===t.slice(0,2)&&(t="\\{\\}"+t.slice(2)),(function t(e,i,s){let r=[],n=u("{","}",e);if(!n)return[e];let a=n.pre,o=n.post.length?t(n.post,i,!1):[""];if(/\$$/.test(n.pre))for(let t=0;t<o.length&&t<i;t++){let e=a+"{"+n.body+"}"+o[t];r.push(e)}else{let h,l,d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),p=d||c,f=n.body.indexOf(",")>=0;if(!p&&!f)return n.post.match(/,(?!,).*\}/)?t(e=n.pre+"{"+n.body+g+n.post,i,!0):[e];if(p)h=n.body.split(/\.\./);else if(1===(h=function t(e){if(!e)return[""];let i=[],s=u("{","}",e);if(!s)return e.split(",");let{pre:r,body:n,post:a}=s,o=r.split(",");o[o.length-1]+="{"+n+"}";let h=t(a);return a.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),i.push.apply(i,o),i}(n.body)).length&&void 0!==h[0]&&1===(h=t(h[0],i,!1).map(F)).length)return o.map(t=>n.pre+h[0]+t);if(p&&void 0!==h[0]&&void 0!==h[1]){let t=R(h[0]),e=R(h[1]),i=Math.max(h[0].length,h[1].length),s=3===h.length&&void 0!==h[2]?Math.abs(R(h[2])):1,r=_;e<t&&(s*=-1,r=D);let n=h.some(j);l=[];for(let a=t;r(a,e);a+=s){let t;if(c)"\\"===(t=String.fromCharCode(a))&&(t="");else if(t=String(a),n){let e=i-t.length;if(e>0){let i=Array(e+1).join("0");t=a<0?"-"+i+t.slice(1):i+t}}l.push(t)}}else{l=[];for(let e=0;e<h.length;e++)l.push.apply(l,t(h[e],i,!1))}for(let t=0;t<l.length;t++)for(let e=0;e<o.length&&r.length<i;e++){let i=a+l[t]+o[e];(!s||p||i)&&r.push(i)}}return r})(t.replace(E,f).replace(x,m).replace(C,g).replace(O,w).replace(A,y),i,!0).map(T)}(t,{max:e.braceExpandMax}));Z.braceExpand=tf,Z.makeRe=(t,e={})=>new tg(t,e).makeRe(),Z.match=(t,e,i={})=>{let s=new tg(e,i);return t=t.filter(t=>s.match(t)),s.options.nonull&&!t.length&&t.push(e),t};var tm=/[?*]|[+@!]\(.*?\)|\[|\]/,tg=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){M(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||tu,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if("string"!=typeof e)return!0;return!1}debug(){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0)){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(t=>this.slashSplit(t));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t,e,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){let e=""===t[0]&&""===t[1]&&("?"===t[2]||!tm.test(t[2]))&&!tm.test(t[3]),i=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map(t=>this.parse(t))];if(i)return[t[0],...t.slice(1).map(t=>this.parse(t))]}return t.map(t=>this.parse(t))});if(this.debug(this.pattern,s),this.set=s.filter(t=>-1===t.indexOf(!1)),this.isWindows)for(let t=0;t<this.set.length;t++){let e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let i=0;i<t[e].length;i++)"**"===t[e][i]&&(t[e][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let i=e;for(;"**"===t[i+1];)i++;i!==e&&t.splice(e,i-e)}return t})}levelOneOptimize(t){return t.map(t=>0===(t=t.reduce((t,e)=>{let i=t[t.length-1];return"**"===e&&"**"===i||(".."===e&&i&&".."!==i&&"."!==i&&"**"!==i?t.pop():t.push(e)),t},[])).length?[""]:t)}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];1===i&&""===s&&""===t[0]||("."===s||""===s)&&(e=!0,t.splice(i,1),i--)}"."===t[0]&&2===t.length&&("."===t[1]||""===t[1])&&(e=!0,t.pop())}let i=0;for(;-1!==(i=t.indexOf("..",i+1));){let s=t[i-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(i-1,2),i-=2)}}while(e)return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do for(let i of(e=!1,t)){let s=-1;for(;-1!==(s=i.indexOf("**",s+1));){let r=s;for(;"**"===i[r+1];)r++;r>s&&i.splice(s+1,r-s);let n=i[s+1],a=i[s+2],o=i[s+3];if(".."!==n||!a||"."===a||".."===a||!o||"."===o||".."===o)continue;e=!0,i.splice(s,1);let h=i.slice(0);h[s]="**",t.push(h),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<i.length-1;t++){let s=i[t];1===t&&""===s&&""===i[0]||("."===s||""===s)&&(e=!0,i.splice(t,1),t--)}"."===i[0]&&2===i.length&&("."===i[1]||""===i[1])&&(e=!0,i.pop())}let r=0;for(;-1!==(r=i.indexOf("..",r+1));){let t=i[r-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;let t=1===r&&"**"===i[r+1]?["."]:[];i.splice(r-1,2,...t),0===i.length&&i.push(""),r-=2}}}while(e)return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let i=e+1;i<t.length;i++){let s=this.partsMatch(t[e],t[i],!this.preserveMultipleSlashes);if(s){t[e]=[],t[i]=s;break}}return t.filter(t=>t.length)}partsMatch(t,e,i=!1){let s=0,r=0,n=[],a="";for(;s<t.length&&r<e.length;)if(t[s]===e[r])n.push("b"===a?e[r]:t[s]),s++,r++;else if(i&&"**"===t[s]&&e[r]===t[s+1])n.push(t[s]),s++;else if(i&&"**"===e[r]&&t[s]===e[r+1])n.push(e[r]),r++;else if("*"===t[s]&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&"**"!==e[r]){if("b"===a)return!1;a="a",n.push(t[s]),s++,r++}else{if("*"!==e[r]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s]||"a"===a)return!1;a="b",n.push(e[r]),s++,r++}return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,i=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,i++;i&&(this.pattern=t.slice(i)),this.negate=e}matchOne(t,e,i=!1){let s=this.options;if(this.isWindows){let i="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!i&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),r="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),n=!r&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3]),a=s?3:i?0:void 0,o=n?3:r?0:void 0;if("number"==typeof a&&"number"==typeof o){let[i,s]=[t[a],e[o]];i.toLowerCase()===s.toLowerCase()&&(e[o]=i,o>a?e=e.slice(o):a>o&&(t=t.slice(a)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,a=0,o=t.length,h=e.length;n<o&&a<h;n++,a++){let r;this.debug("matchOne loop");var l=e[a],d=t[n];if(this.debug(e,l,d),!1===l)return!1;if(l===tc){this.debug("GLOBSTAR",[e,l,d]);var u=n,c=a+1;if(c===h){for(this.debug("** at the end");n<o;n++)if("."===t[n]||".."===t[n]||!s.dot&&"."===t[n].charAt(0))return!1;return!0}for(;u<o;){var p=t[u];if(this.debug(`
|
|
2
|
-
globstar while`,t,u,e,c,
|
|
3
|
-
>>> no match, partial?`,t,u,e,c),u===o))}if("string"==typeof l?(r=d===l,this.debug("string match",l,d,r)):(r=l.test(d),this.debug("pattern match",l,d,r)),!r)return!1}if(n===o&&a===h)return!0;if(n===o)return i;if(a===h)return n===o-1&&""===t[n];throw Error("wtf?")}braceExpand(){return tf(this.pattern,this.options)}parse(t){M(t);let e=this.options;if("**"===t)return tc;if(""===t)return"";let i,s=null;(i=t.match(tn))?s=e.dot?to:ta:(i=t.match(Q))?s=(e.nocase?e.dot?t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)):t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)):e.dot?t=>e=>e.endsWith(t):t=>e=>!e.startsWith(".")&&e.endsWith(t))(i[1]):(i=t.match(th))?s=(e.nocase?e.dot?([t,e=""])=>{let i=td([t]);return e?(e=e.toLowerCase(),t=>i(t)&&t.toLowerCase().endsWith(e)):i}:([t,e=""])=>{let i=tl([t]);return e?(e=e.toLowerCase(),t=>i(t)&&t.toLowerCase().endsWith(e)):i}:e.dot?([t,e=""])=>{let i=td([t]);return e?t=>i(t)&&t.endsWith(e):i}:([t,e=""])=>{let i=tl([t]);return e?t=>i(t)&&t.endsWith(e):i})(i):(i=t.match(tt))?s=e.dot?ti:te:(i=t.match(ts))&&(s=tr);let r=V.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof r&&Reflect.defineProperty(r,"test",{value:s}),r}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,i=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]),r=t.map(t=>{let e=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(""))s.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===tc?tc:t._src});e.forEach((t,s)=>{let r=e[s+1],n=e[s-1];t!==tc||n===tc||(void 0===n?void 0!==r&&r!==tc?e[s+1]="(?:\\/|"+i+"\\/)?"+r:e[s]=i:void 0===r?e[s-1]=n+"(?:\\/|\\/"+i+")?":r!==tc&&(e[s-1]=n+"(?:\\/|\\/"+i+"\\/)"+r,e[s+1]=tc))});let r=e.filter(t=>t!==tc);if(this.partial&&r.length>=1){let t=[];for(let e=1;e<=r.length;e++)t.push(r.slice(0,e).join("/"));return"(?:"+t.join("|")+")"}return r.join("/")}).join("|"),[n,a]=t.length>1?["(?:",")"]:["",""];r="^"+n+r+a+"$",this.partial&&(r="^(?:\\/|"+n+r.slice(1,-1)+a+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let s=this.slashSplit(t);this.debug(this.pattern,"split",s);let r=this.set;this.debug(this.pattern,"set",r);let n=s[s.length-1];if(!n)for(let t=s.length-2;!n&&t>=0;t--)n=s[t];for(let t=0;t<r.length;t++){let a=r[t],o=s;if(i.matchBase&&1===a.length&&(o=[n]),this.matchOne(o,a,e))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(t){return Z.defaults(t).Minimatch}};Z.AST=V,Z.Minimatch=tg,Z.escape=X,Z.unescape=L;var tw="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,ty=new Set,tb="object"==typeof process&&process?process:{},tv=(t,e,i,s)=>{"function"==typeof tb.emitWarning?tb.emitWarning(t,e,i,s):console.error(`[${i}] ${e}: ${t}`)},tS=globalThis.AbortController,tk=globalThis.AbortSignal;if(typeof tS>"u"){tk=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},tS=class{constructor(){e()}signal=new tk;abort(t){if(!this.signal.aborted){for(let e of(this.signal.reason=t,this.signal.aborted=!0,this.signal._onabort))e(t);this.signal.onabort?.(t)}}};let t=tb.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,tv("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var t$=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),tE=t=>t$(t)?t<=256?Uint8Array:t<=65536?Uint16Array:t<=0x100000000?Uint32Array:t<=Number.MAX_SAFE_INTEGER?tx:null:null,tx=class extends Array{constructor(t){super(t),this.fill(0)}},tC=class t{heap;length;static #t=!1;static create(e){let i=tE(e);if(!i)return[];t.#t=!0;let s=new t(e,i);return t.#t=!1,s}constructor(e,i){if(!t.#t)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},tO=class t{#t;#e;#i;#s;#r;#n;#a;#o;get perf(){return this.#o}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#l;#d;#u;#c;#f;#p;#m;#g;#w;#y;#b;#v;#S;#k;#$;#E;#x;#C;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#S,autopurgeTimers:t.#k,sizes:t.#b,keyMap:t.#d,keyList:t.#u,valList:t.#c,next:t.#f,prev:t.#p,get head(){return t.#m},get tail(){return t.#g},free:t.#w,isBackgroundFetch:e=>t.#O(e),backgroundFetch:(e,i,s,r)=>t.#A(e,i,s,r),moveToTail:e=>t.#R(e),indexes:e=>t.#T(e),rindexes:e=>t.#F(e),isStale:e=>t.#j(e)}}get max(){return this.#t}get maxSize(){return this.#e}get calculatedSize(){return this.#l}get size(){return this.#h}get fetchMethod(){return this.#n}get memoMethod(){return this.#a}get dispose(){return this.#i}get onInsert(){return this.#s}get disposeAfter(){return this.#r}constructor(e){let{max:i=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:h,dispose:l,onInsert:d,disposeAfter:u,noDisposeOnSet:c,noUpdateTTL:p,maxSize:f=0,maxEntrySize:m=0,sizeCalculation:g,fetchMethod:w,memoMethod:y,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:k,ignoreFetchAbort:$,perf:E}=e;if(void 0!==E&&"function"!=typeof E?.now)throw TypeError("perf option must have a now() method if specified");if(this.#o=E??tw,0!==i&&!t$(i))throw TypeError("max option must be a nonnegative integer");let x=i?tE(i):Array;if(!x)throw Error("invalid max value: "+i);if(this.#t=i,this.#e=f,this.maxEntrySize=m||this.#e,this.sizeCalculation=g,this.sizeCalculation){if(!this.#e&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw TypeError("sizeCalculation set to non-function")}if(void 0!==y&&"function"!=typeof y)throw TypeError("memoMethod must be a function if defined");if(this.#a=y,void 0!==w&&"function"!=typeof w)throw TypeError("fetchMethod must be a function if specified");if(this.#n=w,this.#E=!!w,this.#d=new Map,this.#u=Array(i).fill(void 0),this.#c=Array(i).fill(void 0),this.#f=new x(i),this.#p=new x(i),this.#m=0,this.#g=0,this.#w=tC.create(i),this.#h=0,this.#l=0,"function"==typeof l&&(this.#i=l),"function"==typeof d&&(this.#s=d),"function"==typeof u?(this.#r=u,this.#y=[]):(this.#r=void 0,this.#y=void 0),this.#$=!!this.#i,this.#C=!!this.#s,this.#x=!!this.#r,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!$,0!==this.maxEntrySize){if(0!==this.#e&&!t$(this.#e))throw TypeError("maxSize must be a positive integer if specified");if(!t$(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#_()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=t$(r)||0===r?r:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!t$(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#D()}if(0===this.#t&&0===this.ttl&&0===this.#e)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#e){let e="LRU_CACHE_UNBOUNDED";(t=>!ty.has(t))(e)&&(ty.add(e),tv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,t))}}getRemainingTTL(t){return this.#d.has(t)?1/0:0}#D(){let t=new tx(this.#t),e=new tx(this.#t);this.#S=t,this.#v=e;let i=this.ttlAutopurge?Array(this.#t):void 0;this.#k=i,this.#M=(s,r,n=this.#o.now())=>{if(e[s]=0!==r?n:0,t[s]=r,i?.[s]&&(clearTimeout(i[s]),i[s]=void 0),0!==r&&i){let t=setTimeout(()=>{this.#j(s)&&this.#P(this.#u[s],"expire")},r+1);t.unref&&t.unref(),i[s]=t}},this.#N=i=>{e[i]=0!==t[i]?this.#o.now():0},this.#W=(i,n)=>{if(t[n]){let a=t[n],o=e[n];if(!a||!o)return;i.ttl=a,i.start=o,i.now=s||r();let h=i.now-o;i.remainingTTL=a-h}};let s=0,r=()=>{let t=this.#o.now();if(this.ttlResolution>0){s=t;let e=setTimeout(()=>s=0,this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=i=>{let n=this.#d.get(i);if(void 0===n)return 0;let a=t[n],o=e[n];return a&&o?a-((s||r())-o):1/0},this.#j=i=>{let n=e[i],a=t[i];return!!a&&!!n&&(s||r())-n>a}}#N=()=>{};#W=()=>{};#M=()=>{};#j=()=>!1;#_(){let t=new tx(this.#t);this.#l=0,this.#b=t,this.#L=e=>{this.#l-=t[e],t[e]=0},this.#z=(t,e,i,s)=>{if(this.#O(e))return 0;if(!t$(i))if(s){if("function"!=typeof s)throw TypeError("sizeCalculation must be a function");if(!t$(i=s(e,t)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#I=(e,i,s)=>{if(t[e]=i,this.#e){let i=this.#e-t[e];for(;this.#l>i;)this.#U(!0)}this.#l+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#l)}}#L=t=>{};#I=(t,e,i)=>{};#z=(t,e,i,s)=>{if(i||s)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#T({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#g;!(!this.#B(e)||((t||!this.#j(e))&&(yield e),e===this.#m));)e=this.#p[e]}*#F({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#m;!(!this.#B(e)||((t||!this.#j(e))&&(yield e),e===this.#g));)e=this.#f[e]}#B(t){return void 0!==t&&this.#d.get(this.#u[t])===t}*entries(){for(let t of this.#T())void 0===this.#c[t]||void 0===this.#u[t]||this.#O(this.#c[t])||(yield[this.#u[t],this.#c[t]])}*rentries(){for(let t of this.#F())void 0===this.#c[t]||void 0===this.#u[t]||this.#O(this.#c[t])||(yield[this.#u[t],this.#c[t]])}*keys(){for(let t of this.#T()){let e=this.#u[t];void 0===e||this.#O(this.#c[t])||(yield e)}}*rkeys(){for(let t of this.#F()){let e=this.#u[t];void 0===e||this.#O(this.#c[t])||(yield e)}}*values(){for(let t of this.#T())void 0===this.#c[t]||this.#O(this.#c[t])||(yield this.#c[t])}*rvalues(){for(let t of this.#F())void 0===this.#c[t]||this.#O(this.#c[t])||(yield this.#c[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#T()){let s=this.#c[i],r=this.#O(s)?s.__staleWhileFetching:s;if(void 0!==r&&t(r,this.#u[i],this))return this.get(this.#u[i],e)}}forEach(t,e=this){for(let i of this.#T()){let s=this.#c[i],r=this.#O(s)?s.__staleWhileFetching:s;void 0!==r&&t.call(e,r,this.#u[i],this)}}rforEach(t,e=this){for(let i of this.#F()){let s=this.#c[i],r=this.#O(s)?s.__staleWhileFetching:s;void 0!==r&&t.call(e,r,this.#u[i],this)}}purgeStale(){let t=!1;for(let e of this.#F({allowStale:!0}))this.#j(e)&&(this.#P(this.#u[e],"expire"),t=!0);return t}info(t){let e=this.#d.get(t);if(void 0===e)return;let i=this.#c[e],s=this.#O(i)?i.__staleWhileFetching:i;if(void 0===s)return;let r={value:s};if(this.#S&&this.#v){let t=this.#S[e],i=this.#v[e];t&&i&&(r.ttl=t-(this.#o.now()-i),r.start=Date.now())}return this.#b&&(r.size=this.#b[e]),r}dump(){let t=[];for(let e of this.#T({allowStale:!0})){let i=this.#u[e],s=this.#c[e],r=this.#O(s)?s.__staleWhileFetching:s;if(void 0===r||void 0===i)continue;let n={value:r};if(this.#S&&this.#v){n.ttl=this.#S[e];let t=this.#o.now()-this.#v[e];n.start=Math.floor(Date.now()-t)}this.#b&&(n.size=this.#b[e]),t.unshift([i,n])}return t}load(t){for(let[e,i]of(this.clear(),t)){if(i.start){let t=Date.now()-i.start;i.start=this.#o.now()-t}this.set(e,i.value,i)}}set(t,e,i={}){if(void 0===e)return this.delete(t),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:o}=i,{noUpdateTTL:h=this.noUpdateTTL}=i,l=this.#z(t,e,i.size||0,a);if(this.maxEntrySize&&l>this.maxEntrySize)return o&&(o.set="miss",o.maxEntrySizeExceeded=!0),this.#P(t,"set"),this;let d=0===this.#h?void 0:this.#d.get(t);if(void 0===d)d=0===this.#h?this.#g:0!==this.#w.length?this.#w.pop():this.#h===this.#t?this.#U(!1):this.#h,this.#u[d]=t,this.#c[d]=e,this.#d.set(t,d),this.#f[this.#g]=d,this.#p[d]=this.#g,this.#g=d,this.#h++,this.#I(d,l,o),o&&(o.set="add"),h=!1,this.#C&&this.#s?.(e,t,"add");else{this.#R(d);let i=this.#c[d];if(e!==i){if(this.#E&&this.#O(i)){i.__abortController.abort(Error("replaced"));let{__staleWhileFetching:e}=i;void 0!==e&&!n&&(this.#$&&this.#i?.(e,t,"set"),this.#x&&this.#y?.push([e,t,"set"]))}else n||(this.#$&&this.#i?.(i,t,"set"),this.#x&&this.#y?.push([i,t,"set"]));if(this.#L(d),this.#I(d,l,o),this.#c[d]=e,o){o.set="replace";let t=i&&this.#O(i)?i.__staleWhileFetching:i;void 0!==t&&(o.oldValue=t)}}else o&&(o.set="update");this.#C&&this.onInsert?.(e,t,e===i?"update":"replace")}if(0===s||this.#S||this.#D(),this.#S&&(h||this.#M(d,s,r),o&&this.#W(o,d)),!n&&this.#x&&this.#y){let t=this.#y,e;for(;e=t?.shift();)this.#r?.(...e)}return this}pop(){try{for(;this.#h;){let t=this.#c[this.#m];if(this.#U(!0),this.#O(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#x&&this.#y){let t=this.#y,e;for(;e=t?.shift();)this.#r?.(...e)}}}#U(t){let e=this.#m,i=this.#u[e],s=this.#c[e];return this.#E&&this.#O(s)?s.__abortController.abort(Error("evicted")):(this.#$||this.#x)&&(this.#$&&this.#i?.(s,i,"evict"),this.#x&&this.#y?.push([s,i,"evict"])),this.#L(e),this.#k?.[e]&&(clearTimeout(this.#k[e]),this.#k[e]=void 0),t&&(this.#u[e]=void 0,this.#c[e]=void 0,this.#w.push(e)),1===this.#h?(this.#m=this.#g=0,this.#w.length=0):this.#m=this.#f[e],this.#d.delete(i),this.#h--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#d.get(t);if(void 0!==r){let t=this.#c[r];if(this.#O(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#j(r))return i&&this.#N(r),s&&(s.has="hit",this.#W(s,r)),!0;s&&(s.has="stale",this.#W(s,r))}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#d.get(t);if(void 0===s||!i&&this.#j(s))return;let r=this.#c[s];return this.#O(r)?r.__staleWhileFetching:r}#A(t,e,i,s){let r=void 0===e?void 0:this.#c[e];if(this.#O(r))return r;let n=new tS,{signal:a}=i;a?.addEventListener("abort",()=>n.abort(a.reason),{signal:n.signal});let o={signal:n.signal,options:i,context:s},h=(s,r=!1)=>{let{aborted:a}=n.signal,h=i.ignoreFetchAbort&&void 0!==s,d=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&void 0!==s);if(i.status&&(a&&!r?(i.status.fetchAborted=!0,i.status.fetchError=n.signal.reason,h&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),a&&!h&&!r)return l(n.signal.reason,d);let c=this.#c[e];return(c===u||h&&r&&void 0===c)&&(void 0===s?void 0!==u.__staleWhileFetching?this.#c[e]=u.__staleWhileFetching:this.#P(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,s,o.options))),s},l=(s,r)=>{let{aborted:a}=n.signal,o=a&&i.allowStaleOnFetchAbort,h=o||i.allowStaleOnFetchRejection,l=h||i.noDeleteOnFetchRejection;if(this.#c[e]===u&&(l&&(r||void 0!==u.__staleWhileFetching)?o||(this.#c[e]=u.__staleWhileFetching):this.#P(t,"fetch")),h)return i.status&&void 0!==u.__staleWhileFetching&&(i.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw s},d=(e,s)=>{let a=this.#n?.(t,r,o);a&&a instanceof Promise&&a.then(t=>e(void 0===t?void 0:t),s),n.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(e(void 0),i.allowStaleOnFetchAbort&&(e=t=>h(t,!0)))})};i.status&&(i.status.fetchDispatched=!0);let u=new Promise(d).then(h,t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),l(t,!1))),c=Object.assign(u,{__abortController:n,__staleWhileFetching:r,__returned:void 0});return void 0===e?(this.set(t,c,{...o.options,status:void 0}),e=this.#d.get(t)):this.#c[e]=c,c}#O(t){return!!this.#E&&!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof tS}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:o=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:m=!1,status:g,signal:w}=e;if(!this.#E)return g&&(g.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:g});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:a,size:o,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:p,ignoreFetchAbort:c,status:g,signal:w},b=this.#d.get(t);if(void 0===b){g&&(g.fetch="miss");let e=this.#A(t,b,y,f);return e.__returned=e}{let e=this.#c[b];if(this.#O(e)){let t=i&&void 0!==e.__staleWhileFetching;return g&&(g.fetch="inflight",t&&(g.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}let r=this.#j(b);if(!m&&!r)return g&&(g.fetch="hit"),this.#R(b),s&&this.#N(b),g&&this.#W(g,b),e;let n=this.#A(t,b,y,f),a=void 0!==n.__staleWhileFetching&&i;return g&&(g.fetch=r?"stale":"refresh",a&&r&&(g.returnedStale=!0)),a?n.__staleWhileFetching:n.__returned=n}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(void 0===i)throw Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#a;if(!i)throw Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...n}=e,a=this.get(t,n);if(!r&&void 0!==a)return a;let o=i(t,a,{options:n,context:s});return this.set(t,o,n),o}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e,a=this.#d.get(t);if(void 0!==a){let e=this.#c[a],o=this.#O(e);return n&&this.#W(n,a),this.#j(a)?(n&&(n.get="stale"),o?(n&&i&&void 0!==e.__staleWhileFetching&&(n.returnedStale=!0),i?e.__staleWhileFetching:void 0):(r||this.#P(t,"expire"),n&&i&&(n.returnedStale=!0),i?e:void 0)):(n&&(n.get="hit"),o?e.__staleWhileFetching:(this.#R(a),s&&this.#N(a),e))}n&&(n.get="miss")}#G(t,e){this.#p[e]=t,this.#f[t]=e}#R(t){t!==this.#g&&(t===this.#m?this.#m=this.#f[t]:this.#G(this.#p[t],this.#f[t]),this.#G(this.#g,t),this.#g=t)}delete(t){return this.#P(t,"delete")}#P(t,e){let i=!1;if(0!==this.#h){let s=this.#d.get(t);if(void 0!==s)if(this.#k?.[s]&&(clearTimeout(this.#k?.[s]),this.#k[s]=void 0),i=!0,1===this.#h)this.#q(e);else{this.#L(s);let i=this.#c[s];if(this.#O(i)?i.__abortController.abort(Error("deleted")):(this.#$||this.#x)&&(this.#$&&this.#i?.(i,t,e),this.#x&&this.#y?.push([i,t,e])),this.#d.delete(t),this.#u[s]=void 0,this.#c[s]=void 0,s===this.#g)this.#g=this.#p[s];else if(s===this.#m)this.#m=this.#f[s];else{let t=this.#p[s];this.#f[t]=this.#f[s];let e=this.#f[s];this.#p[e]=this.#p[s]}this.#h--,this.#w.push(s)}}if(this.#x&&this.#y?.length){let t=this.#y,e;for(;e=t?.shift();)this.#r?.(...e)}return i}clear(){return this.#q("delete")}#q(t){for(let e of this.#F({allowStale:!0})){let i=this.#c[e];if(this.#O(i))i.__abortController.abort(Error("deleted"));else{let s=this.#u[e];this.#$&&this.#i?.(i,s,t),this.#x&&this.#y?.push([i,s,t])}}if(this.#d.clear(),this.#c.fill(void 0),this.#u.fill(void 0),this.#S&&this.#v){for(let t of(this.#S.fill(0),this.#v.fill(0),this.#k??[]))void 0!==t&&clearTimeout(t);this.#k?.fill(void 0)}if(this.#b&&this.#b.fill(0),this.#m=0,this.#g=0,this.#w.length=0,this.#l=0,this.#h=0,this.#x&&this.#y){let t=this.#y,e;for(;e=t?.shift();)this.#r?.(...e)}}},tA="object"==typeof process&&process?process:{stdout:null,stderr:null},tR=t=>!!t&&"object"==typeof t&&(t instanceof es||t instanceof l.default||tT(t)||tF(t)),tT=t=>!!t&&"object"==typeof t&&t instanceof h.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==l.default.Writable.prototype.pipe,tF=t=>!!t&&"object"==typeof t&&t instanceof h.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end,tj=Symbol("EOF"),t_=Symbol("maybeEmitEnd"),tD=Symbol("emittedEnd"),tM=Symbol("emittingEnd"),tP=Symbol("emittedError"),tN=Symbol("closed"),tW=Symbol("read"),tL=Symbol("flush"),tz=Symbol("flushChunk"),tI=Symbol("encoding"),tU=Symbol("decoder"),tB=Symbol("flowing"),tG=Symbol("paused"),tq=Symbol("resume"),tY=Symbol("buffer"),tH=Symbol("pipes"),tJ=Symbol("bufferLength"),tK=Symbol("bufferPush"),tV=Symbol("bufferShift"),tX=Symbol("objectMode"),tZ=Symbol("destroyed"),tQ=Symbol("error"),t0=Symbol("emitData"),t1=Symbol("emitEnd"),t2=Symbol("emitEnd2"),t8=Symbol("async"),t3=Symbol("abort"),t4=Symbol("aborted"),t6=Symbol("signal"),t5=Symbol("dataListeners"),t7=Symbol("discarded"),t9=t=>Promise.resolve().then(t),et=t=>t(),ee=class{src;dest;opts;ondrain;constructor(t,e,i){this.src=t,this.dest=e,this.opts=i,this.ondrain=()=>t[tq](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ei=class extends ee{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,i){super(t,e,i),this.proxyErrors=t=>this.dest.emit("error",t),t.on("error",this.proxyErrors)}},es=class extends h.EventEmitter{[tB]=!1;[tG]=!1;[tH]=[];[tY]=[];[tX];[tI];[t8];[tU];[tj]=!1;[tD]=!1;[tM]=!1;[tN]=!1;[tP]=null;[tJ]=0;[tZ]=!1;[t6];[t4]=!1;[t5]=0;[t7]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw TypeError("Encoding and objectMode may not be used together");(t=>!!t.objectMode)(e)?(this[tX]=!0,this[tI]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[tI]=e.encoding,this[tX]=!1):(this[tX]=!1,this[tI]=null),this[t8]=!!e.async,this[tU]=this[tI]?new d.StringDecoder(this[tI]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[tY]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[tH]});let{signal:i}=e;i&&(this[t6]=i,i.aborted?this[t3]():i.addEventListener("abort",()=>this[t3]()))}get bufferLength(){return this[tJ]}get encoding(){return this[tI]}set encoding(t){throw Error("Encoding must be set at instantiation time")}setEncoding(t){throw Error("Encoding must be set at instantiation time")}get objectMode(){return this[tX]}set objectMode(t){throw Error("objectMode must be set at instantiation time")}get async(){return this[t8]}set async(t){this[t8]=this[t8]||!!t}[t3](){this[t4]=!0,this.emit("abort",this[t6]?.reason),this.destroy(this[t6]?.reason)}get aborted(){return this[t4]}set aborted(t){}write(t,e,i){if(this[t4])return!1;if(this[tj])throw Error("write after end");if(this[tZ])return this.emit("error",Object.assign(Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(i=e,e="utf8"),e||(e="utf8");let s=this[t8]?t9:et;if(!this[tX]&&!Buffer.isBuffer(t)){let e;if(e=t,!Buffer.isBuffer(e)&&ArrayBuffer.isView(e))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else{let e;if((e=t)instanceof ArrayBuffer||e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)t=Buffer.from(t);else if("string"!=typeof t)throw Error("Non-contiguous data written to non-objectMode stream")}}return this[tX]?(this[tB]&&0!==this[tJ]&&this[tL](!0),this[tB]?this.emit("data",t):this[tK](t)):t.length&&("string"==typeof t&&(e!==this[tI]||this[tU]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[tI]&&(t=this[tU].write(t)),this[tB]&&0!==this[tJ]&&this[tL](!0),this[tB]?this.emit("data",t):this[tK](t)),0!==this[tJ]&&this.emit("readable"),i&&s(i),this[tB]}read(t){if(this[tZ])return null;if(this[t7]=!1,0===this[tJ]||0===t||t&&t>this[tJ])return this[t_](),null;this[tX]&&(t=null),this[tY].length>1&&!this[tX]&&(this[tY]=[this[tI]?this[tY].join(""):Buffer.concat(this[tY],this[tJ])]);let e=this[tW](t||null,this[tY][0]);return this[t_](),e}[tW](t,e){if(this[tX])this[tV]();else{let i=e;t===i.length||null===t?this[tV]():("string"==typeof i?(this[tY][0]=i.slice(t),e=i.slice(0,t)):(this[tY][0]=i.subarray(t),e=i.subarray(0,t)),this[tJ]-=t)}return this.emit("data",e),this[tY].length||this[tj]||this.emit("drain"),e}end(t,e,i){return"function"==typeof t&&(i=t,t=void 0),"function"==typeof e&&(i=e,e="utf8"),void 0!==t&&this.write(t,e),i&&this.once("end",i),this[tj]=!0,this.writable=!1,(this[tB]||!this[tG])&&this[t_](),this}[tq](){this[tZ]||(this[t5]||this[tH].length||(this[t7]=!0),this[tG]=!1,this[tB]=!0,this.emit("resume"),this[tY].length?this[tL]():this[tj]?this[t_]():this.emit("drain"))}resume(){return this[tq]()}pause(){this[tB]=!1,this[tG]=!0,this[t7]=!1}get destroyed(){return this[tZ]}get flowing(){return this[tB]}get paused(){return this[tG]}[tK](t){this[tX]?this[tJ]+=1:this[tJ]+=t.length,this[tY].push(t)}[tV](){return this[tX]?this[tJ]-=1:this[tJ]-=this[tY][0].length,this[tY].shift()}[tL](t=!1){do;while(this[tz](this[tV]())&&this[tY].length)t||this[tY].length||this[tj]||this.emit("drain")}[tz](t){return this.emit("data",t),this[tB]}pipe(t,e){if(this[tZ])return t;this[t7]=!1;let i=this[tD];return e=e||{},t===tA.stdout||t===tA.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,i?e.end&&t.end():(this[tH].push(e.proxyErrors?new ei(this,t,e):new ee(this,t,e)),this[t8]?t9(()=>this[tq]()):this[tq]()),t}unpipe(t){let e=this[tH].find(e=>e.dest===t);e&&(1===this[tH].length?(this[tB]&&0===this[t5]&&(this[tB]=!1),this[tH]=[]):this[tH].splice(this[tH].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let i=super.on(t,e);if("data"===t)this[t7]=!1,this[t5]++,this[tH].length||this[tB]||this[tq]();else if("readable"===t&&0!==this[tJ])super.emit("readable");else("end"===t||"finish"===t||"prefinish"===t)&&this[tD]?(super.emit(t),this.removeAllListeners(t)):"error"===t&&this[tP]&&(this[t8]?t9(()=>e.call(this,this[tP])):e.call(this,this[tP]));return i}removeListener(t,e){return this.off(t,e)}off(t,e){let i=super.off(t,e);return"data"===t&&(this[t5]=this.listeners("data").length,0!==this[t5]||this[t7]||this[tH].length||(this[tB]=!1)),i}removeAllListeners(t){let e=super.removeAllListeners(t);return("data"===t||void 0===t)&&(this[t5]=0,this[t7]||this[tH].length||(this[tB]=!1)),e}get emittedEnd(){return this[tD]}[t_](){this[tM]||this[tD]||this[tZ]||0!==this[tY].length||!this[tj]||(this[tM]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[tN]&&this.emit("close"),this[tM]=!1)}emit(t,...e){let i=e[0];if("error"!==t&&"close"!==t&&t!==tZ&&this[tZ])return!1;if("data"===t)return(!!this[tX]||!!i)&&(this[t8]?(t9(()=>this[t0](i)),!0):this[t0](i));if("end"===t)return this[t1]();if("close"===t){if(this[tN]=!0,!this[tD]&&!this[tZ])return!1;let t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[tP]=i,super.emit(tQ,i);let t=(!this[t6]||!!this.listeners("error").length)&&super.emit("error",i);return this[t_](),t}if("resume"===t){let t=super.emit("resume");return this[t_](),t}if("finish"===t||"prefinish"===t){let e=super.emit(t);return this.removeAllListeners(t),e}let s=super.emit(t,...e);return this[t_](),s}[t0](t){for(let e of this[tH])!1===e.dest.write(t)&&this.pause();let e=!this[t7]&&super.emit("data",t);return this[t_](),e}[t1](){return!this[tD]&&(this[tD]=!0,this.readable=!1,this[t8]?(t9(()=>this[t2]()),!0):this[t2]())}[t2](){if(this[tU]){let t=this[tU].end();if(t){for(let e of this[tH])e.dest.write(t);this[t7]||super.emit("data",t)}}for(let t of this[tH])t.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[tX]||(t.dataLength=0);let e=this.promise();return this.on("data",e=>{t.push(e),this[tX]||(t.dataLength+=e.length)}),await e,t}async concat(){if(this[tX])throw Error("cannot concat in objectMode");let t=await this.collect();return this[tI]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(tZ,()=>e(Error("stream destroyed"))),this.on("error",t=>e(t)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[t7]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(null!==i)return Promise.resolve({done:!1,value:i});if(this[tj])return e();let s,r,n=t=>{this.off("data",a),this.off("end",o),this.off(tZ,h),e(),r(t)},a=t=>{this.off("error",n),this.off("end",o),this.off(tZ,h),this.pause(),s({value:t,done:!!this[tj]})},o=()=>{this.off("error",n),this.off("data",a),this.off(tZ,h),e(),s({done:!0,value:void 0})},h=()=>n(Error("stream destroyed"));return new Promise((t,e)=>{r=e,s=t,this.once(tZ,h),this.once("error",n),this.once("end",o),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[t7]=!1;let t=!1,e=()=>(this.pause(),this.off(tQ,e),this.off(tZ,e),this.off("end",e),t=!0,{done:!0,value:void 0}),i=()=>{if(t)return e();let i=this.read();return null===i?e():{done:!1,value:i}};return this.once("end",e),this.once(tQ,e),this.once(tZ,e),{next:i,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){return this[tZ]||(this[tZ]=!0,this[t7]=!0,this[tY].length=0,this[tJ]=0,"function"!=typeof this.close||this[tN]||this.close()),t?this.emit("error",t):this.emit(tZ),this}static get isStream(){return tR}},er=n.realpathSync.native,en={lstatSync:n.lstatSync,readdir:n.readdir,readdirSync:n.readdirSync,readlinkSync:n.readlinkSync,realpathSync:er,promises:{lstat:o.lstat,readdir:o.readdir,readlink:o.readlink,realpath:o.realpath}},ea=t=>t&&t!==en&&t!==a?{...en,...t,promises:{...en.promises,...t.promises||{}}}:en,eo=/^\\\\\?\\([a-z]:)\\?$/i,eh=/[\\\/]/,el=t=>t.isFile()?8:t.isDirectory()?4:t.isSymbolicLink()?10:t.isCharacterDevice()?2:t.isBlockDevice()?6:t.isSocket()?12:+!!t.isFIFO(),ed=new tO({max:4096}),eu=t=>{let e=ed.get(t);if(e)return e;let i=t.normalize("NFKD");return ed.set(t,i),i},ec=new tO({max:4096}),ep=t=>{let e=ec.get(t);if(e)return e;let i=eu(t.toLowerCase());return ec.set(t,i),i},ef=class extends tO{constructor(){super({max:256})}},em=class extends tO{constructor(t=16384){super({maxSize:t,sizeCalculation:t=>t.length+1})}},eg=Symbol("PathScurry setAsCwd"),ew=class{name;root;roots;parent;nocase;isCWD=!1;#t;#e;get dev(){return this.#e}#i;get mode(){return this.#i}#s;get nlink(){return this.#s}#r;get uid(){return this.#r}#n;get gid(){return this.#n}#a;get rdev(){return this.#a}#o;get blksize(){return this.#o}#h;get ino(){return this.#h}#l;get size(){return this.#l}#d;get blocks(){return this.#d}#u;get atimeMs(){return this.#u}#c;get mtimeMs(){return this.#c}#f;get ctimeMs(){return this.#f}#p;get birthtimeMs(){return this.#p}#m;get atime(){return this.#m}#g;get mtime(){return this.#g}#w;get ctime(){return this.#w}#y;get birthtime(){return this.#y}#b;#v;#S;#k;#$;#E;#x;#C;#D;#N;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=0,i,s,r,n,a){this.name=t,this.#b=r?ep(t):eu(t),this.#x=1023&e,this.nocase=r,this.roots=s,this.root=i||this,this.#C=n,this.#S=a.fullpath,this.#$=a.relative,this.#E=a.relativePosix,this.parent=a.parent,this.parent?this.#t=this.parent.#t:this.#t=ea(a.fs)}depth(){return void 0!==this.#v?this.#v:this.parent?this.#v=this.parent.depth()+1:this.#v=0}childrenCache(){return this.#C}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#W(i):this.#W(i)}#W(t){let e=this;for(let i of t)e=e.child(i);return e}children(){let t=this.#C.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#C.set(this,e),this.#x&=-17,e}child(t,e){if(""===t||"."===t)return this;if(".."===t)return this.parent||this;let i=this.children(),s=this.nocase?ep(t):eu(t);for(let t of i)if(t.#b===s)return t;let r=this.parent?this.sep:"",n=this.#S?this.#S+r+t:void 0,a=this.newChild(t,0,{...e,parent:this,fullpath:n});return this.canReaddir()||(a.#x|=128),i.push(a),a}relative(){if(this.isCWD)return"";if(void 0!==this.#$)return this.#$;let t=this.name,e=this.parent;if(!e)return this.#$=this.name;let i=e.relative();return i+(i&&e.parent?this.sep:"")+t}relativePosix(){if("/"===this.sep)return this.relative();if(this.isCWD)return"";if(void 0!==this.#E)return this.#E;let t=this.name,e=this.parent;if(!e)return this.#E=this.fullpathPosix();let i=e.relativePosix();return i+(i&&e.parent?"/":"")+t}fullpath(){if(void 0!==this.#S)return this.#S;let t=this.name,e=this.parent;if(!e)return this.#S=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#S=i}fullpathPosix(){if(void 0!==this.#k)return this.#k;if("/"===this.sep)return this.#k=this.fullpath();if(!this.parent){let t=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(t)?this.#k=`//?/${t}`:this.#k=t}let t=this.parent,e=t.fullpathPosix(),i=e+(e&&t.parent?"/":"")+this.name;return this.#k=i}isUnknown(){return(15&this.#x)==0}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(15&this.#x)==8}isDirectory(){return(15&this.#x)==4}isCharacterDevice(){return(15&this.#x)==2}isBlockDevice(){return(15&this.#x)==6}isFIFO(){return(15&this.#x)==1}isSocket(){return(15&this.#x)==12}isSymbolicLink(){return(10&this.#x)==10}lstatCached(){return 32&this.#x?this:void 0}readlinkCached(){return this.#D}realpathCached(){return this.#N}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#D)return!0;if(!this.parent)return!1;let t=15&this.#x;return!(0!==t&&10!==t||256&this.#x||128&this.#x)}calledReaddir(){return!!(16&this.#x)}isENOENT(){return!!(128&this.#x)}isNamed(t){return this.nocase?this.#b===ep(t):this.#b===eu(t)}async readlink(){let t=this.#D;if(t)return t;if(this.canReadlink()&&this.parent)try{let t=await this.#t.promises.readlink(this.fullpath()),e=(await this.parent.realpath())?.resolve(t);if(e)return this.#D=e}catch(t){this.#F(t.code);return}}readlinkSync(){let t=this.#D;if(t)return t;if(this.canReadlink()&&this.parent)try{let t=this.#t.readlinkSync(this.fullpath()),e=this.parent.realpathSync()?.resolve(t);if(e)return this.#D=e}catch(t){this.#F(t.code);return}}#M(t){this.#x|=16;for(let e=t.provisional;e<t.length;e++){let i=t[e];i&&i.#j()}}#j(){128&this.#x||(this.#x=(128|this.#x)&-16,this.#_())}#_(){let t=this.children();for(let e of(t.provisional=0,t))e.#j()}#L(){this.#x|=512,this.#I()}#I(){if(64&this.#x)return;let t=this.#x;(15&t)==4&&(t&=-16),this.#x=64|t,this.#_()}#z(t=""){"ENOTDIR"===t||"EPERM"===t?this.#I():"ENOENT"===t?this.#j():this.children().provisional=0}#T(t=""){"ENOTDIR"===t?this.parent.#I():"ENOENT"===t&&this.#j()}#F(t=""){let e=this.#x;e|=256,"ENOENT"===t&&(e|=128),("EINVAL"===t||"UNKNOWN"===t)&&(e&=-16),this.#x=e,"ENOTDIR"===t&&this.parent&&this.parent.#I()}#B(t,e){return this.#A(t,e)||this.#U(t,e)}#U(t,e){let i=el(t),s=this.newChild(t.name,i,{parent:this}),r=15&s.#x;return 4!==r&&10!==r&&0!==r&&(s.#x|=64),e.unshift(s),e.provisional++,s}#A(t,e){for(let i=e.provisional;i<e.length;i++){let s=e[i];if((this.nocase?ep(t.name):eu(t.name))===s.#b)return this.#O(t,s,i,e)}}#O(t,e,i,s){let r=e.name;return e.#x=-16&e.#x|el(t),r!==t.name&&(e.name=t.name),i!==s.provisional&&(i===s.length-1?s.pop():s.splice(i,1),s.unshift(e)),s.provisional++,e}async lstat(){if((128&this.#x)==0)try{return this.#G(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#T(t.code)}}lstatSync(){if((128&this.#x)==0)try{return this.#G(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#T(t.code)}}#G(t){let{atime:e,atimeMs:i,birthtime:s,birthtimeMs:r,blksize:n,blocks:a,ctime:o,ctimeMs:h,dev:l,gid:d,ino:u,mode:c,mtime:p,mtimeMs:f,nlink:m,rdev:g,size:w,uid:y}=t;this.#m=e,this.#u=i,this.#y=s,this.#p=r,this.#o=n,this.#d=a,this.#w=o,this.#f=h,this.#e=l,this.#n=d,this.#h=u,this.#i=c,this.#g=p,this.#c=f,this.#s=m,this.#a=g,this.#l=w,this.#r=y;let b=el(t);this.#x=-16&this.#x|b|32,0!==b&&4!==b&&10!==b&&(this.#x|=64)}#R=[];#P=!1;#q(t){this.#P=!1;let e=this.#R.slice();this.#R.length=0,e.forEach(e=>e(null,t))}readdirCB(t,e=!1){if(!this.canReaddir())return void(e?t(null,[]):queueMicrotask(()=>t(null,[])));let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);e?t(null,s):queueMicrotask(()=>t(null,s));return}if(this.#R.push(t),this.#P)return;this.#P=!0;let s=this.fullpath();this.#t.readdir(s,{withFileTypes:!0},(t,e)=>{if(t)this.#z(t.code),i.provisional=0;else{for(let t of e)this.#B(t,i);this.#M(i)}this.#q(i.slice(0,i.provisional))})}#Y;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#Y)await this.#Y;else{let i=()=>{};this.#Y=new Promise(t=>i=t);try{for(let i of(await this.#t.promises.readdir(e,{withFileTypes:!0})))this.#B(i,t);this.#M(t)}catch(e){this.#z(e.code),t.provisional=0}this.#Y=void 0,i()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let i of this.#t.readdirSync(e,{withFileTypes:!0}))this.#B(i,t);this.#M(t)}catch(e){this.#z(e.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(704&this.#x)return!1;let t=15&this.#x;return 0===t||4===t||10===t}shouldWalk(t,e){return(4&this.#x)==4&&!(704&this.#x)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#N)return this.#N;if(!(896&this.#x))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#N=this.resolve(t)}catch{this.#L()}}realpathSync(){if(this.#N)return this.#N;if(!(896&this.#x))try{let t=this.#t.realpathSync(this.fullpath());return this.#N=this.resolve(t)}catch{this.#L()}}[eg](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),i=[],s=this;for(;s&&s.parent;)e.add(s),s.#$=i.join(this.sep),s.#E=i.join("/"),s=s.parent,i.push("..");for(s=t;s&&s.parent&&!e.has(s);)s.#$=void 0,s.#E=void 0,s=s.parent}},ey=class t extends ew{sep="\\";splitSep=eh;constructor(t,e=0,i,s,r,n,a){super(t,e,i,s,r,n,a)}newChild(e,i=0,s={}){return new t(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return r.win32.parse(t).root}getRoot(t){if((t=t.toUpperCase().replace(/\//g,"\\").replace(eo,"$1\\"))===this.root.name)return this.root;for(let[e,i]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=i;return this.roots[t]=new eS(t,this).root}sameRoot(t,e=this.root.name){return(t=t.toUpperCase().replace(/\//g,"\\").replace(eo,"$1\\"))===e}},eb=class t extends ew{splitSep="/";sep="/";constructor(t,e=0,i,s,r,n,a){super(t,e,i,s,r,n,a)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(e,i=0,s={}){return new t(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}},ev=class{root;rootPath;roots;cwd;#t;#e;#i;nocase;#s;constructor(t=process.cwd(),e,i,{nocase:r,childrenCacheSize:n=16384,fs:a=en}={}){this.#s=ea(a),(t instanceof URL||t.startsWith("file://"))&&(t=(0,s.fileURLToPath)(t));let o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#t=new ef,this.#e=new ef,this.#i=new em(n);let h=o.substring(this.rootPath.length).split(i);if(1!==h.length||h[0]||h.pop(),void 0===r)throw TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=r,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let l=this.root,d=h.length-1,u=e.sep,c=this.rootPath,p=!1;for(let t of h){let e=d--;l=l.child(t,{relative:Array(e).fill("..").join(u),relativePosix:Array(e).fill("..").join("/"),fullpath:c+=(p?"":u)+t}),p=!0}this.cwd=l}depth(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#i}resolve(...t){let e="";for(let i=t.length-1;i>=0;i--){let s=t[i];if(!(!s||"."===s)&&(e=e?`${s}/${e}`:s,this.isAbsolute(s)))break}let i=this.#t.get(e);if(void 0!==i)return i;let s=this.cwd.resolve(e).fullpath();return this.#t.set(e,s),s}resolvePosix(...t){let e="";for(let i=t.length-1;i>=0;i--){let s=t[i];if(!(!s||"."===s)&&(e=e?`${s}/${e}`:s,this.isAbsolute(s)))break}let i=this.#e.get(e);if(void 0!==i)return i;let s=this.cwd.resolve(e).fullpathPosix();return this.#e.set(e,s),s}relative(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i}=e;if(!t.canReaddir())return[];{let e=await t.readdir();return i?e:e.map(t=>t.name)}}readdirSync(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0}=e;return t.canReaddir()?i?t.readdirSync():t.readdirSync().map(t=>t.name):[]}async lstat(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t.withFileTypes,t=this.cwd);let i=await t.readlink();return e?i:i?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t.withFileTypes,t=this.cwd);let i=t.readlinkSync();return e?i:i?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t.withFileTypes,t=this.cwd);let i=await t.realpath();return e?i:i?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t.withFileTypes,t=this.cwd);let i=t.realpathSync();return e?i:i?.fullpath()}async walk(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,a=[];(!r||r(t))&&a.push(i?t:t.fullpath());let o=new Set,h=(t,e)=>{o.add(t),t.readdirCB((t,l)=>{if(t)return e(t);let d=l.length;if(!d)return e();let u=()=>{0==--d&&e()};for(let t of l)(!r||r(t))&&a.push(i?t:t.fullpath()),s&&t.isSymbolicLink()?t.realpath().then(t=>t?.isUnknown()?t.lstat():t).then(t=>t?.shouldWalk(o,n)?h(t,u):u()):t.shouldWalk(o,n)?h(t,u):u()},!0)},l=t;return new Promise((t,e)=>{h(l,i=>{if(i)return e(i);t(a)})})}walkSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,a=[];(!r||r(t))&&a.push(i?t:t.fullpath());let o=new Set([t]);for(let t of o)for(let e of t.readdirSync()){(!r||r(e))&&a.push(i?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(s&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,n)&&o.add(t)}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e;(!r||r(t))&&(yield i?t:t.fullpath());let a=new Set([t]);for(let t of a)for(let e of t.readdirSync()){(!r||r(e))&&(yield i?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(s&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(a,n)&&a.add(t)}}stream(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,a=new es({objectMode:!0});(!r||r(t))&&a.write(i?t:t.fullpath());let o=new Set,h=[t],l=0,d=()=>{let t=!1;for(;!t;){let e=h.shift();if(!e){0===l&&a.end();return}l++,o.add(e);let u=(e,p,f=!1)=>{if(e)return a.emit("error",e);if(s&&!f){let t=[];for(let e of p)e.isSymbolicLink()&&t.push(e.realpath().then(t=>t?.isUnknown()?t.lstat():t));if(t.length)return void Promise.all(t).then(()=>u(null,p,!0))}for(let e of p)e&&(!r||r(e))&&(a.write(i?e:e.fullpath())||(t=!0));for(let t of(l--,p)){let e=t.realpathCached()||t;e.shouldWalk(o,n)&&h.push(e)}t&&!a.flowing?a.once("drain",d):c||d()},c=!0;e.readdirCB(u,!0),c=!1}};return d(),a}streamSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,a=new es({objectMode:!0}),o=new Set;(!r||r(t))&&a.write(i?t:t.fullpath());let h=[t],l=0,d=()=>{let t=!1;for(;!t;){let e=h.shift();if(!e){0===l&&a.end();return}l++,o.add(e);let d=e.readdirSync();for(let e of d)(!r||r(e))&&(a.write(i?e:e.fullpath())||(t=!0));for(let t of(l--,d)){let e=t;if(t.isSymbolicLink()){if(!(s&&(e=t.realpathSync())))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(o,n)&&h.push(e)}}t&&!a.flowing&&a.once("drain",d)};return d(),a}chdir(t=this.cwd){let e=this.cwd;this.cwd="string"==typeof t?this.cwd.resolve(t):t,this.cwd[eg](e)}},eS=class extends ev{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:i=!0}=e;super(t,r.win32,"\\",{...e,nocase:i}),this.nocase=i;for(let t=this.cwd;t;t=t.parent)t.nocase=this.nocase}parseRootPath(t){return r.win32.parse(t).root.toUpperCase()}newRoot(t){return new ey(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},ek=class extends ev{sep="/";constructor(t=process.cwd(),e={}){let{nocase:i=!1}=e;super(t,r.posix,"/",{...e,nocase:i}),this.nocase=i}parseRootPath(t){return"/"}newRoot(t){return new eb(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},e$=class extends ek{constructor(t=process.cwd(),e={}){let{nocase:i=!0}=e;super(t,{...e,nocase:i})}},eE=Symbol.for("nodejs.util.inspect.custom"),ex=class t{#t;#e;#i;length;#s;#r;#n;#a;#o;#h;#l=!0;constructor(t,e,i,s){if(!(t=>t.length>=1)(t))throw TypeError("empty pattern list");if(!(t=>t.length>=1)(e))throw TypeError("empty glob list");if(e.length!==t.length)throw TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,i<0||i>=this.length)throw TypeError("index out of range");if(this.#t=t,this.#e=e,this.#i=i,this.#s=s,0===this.#i){if(this.isUNC()){let[t,e,i,s,...r]=this.#t,[n,a,o,h,...l]=this.#e;""===r[0]&&(r.shift(),l.shift());let d=[t,e,i,s,""].join("/"),u=[n,a,o,h,""].join("/");this.#t=[d,...r],this.#e=[u,...l],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[t,...e]=this.#t,[i,...s]=this.#e;""===e[0]&&(e.shift(),s.shift()),this.#t=[t+"/",...e],this.#e=[i+"/",...s],this.length=this.#t.length}}}[eE](){return"Pattern <"+this.#e.slice(this.#i).join("/")+">"}pattern(){return this.#t[this.#i]}isString(){return"string"==typeof this.#t[this.#i]}isGlobstar(){return this.#t[this.#i]===tc}isRegExp(){return this.#t[this.#i]instanceof RegExp}globString(){return this.#n=this.#n||(0===this.#i?this.isAbsolute()?this.#e[0]+this.#e.slice(1).join("/"):this.#e.join("/"):this.#e.slice(this.#i).join("/"))}hasMore(){return this.length>this.#i+1}rest(){return void 0!==this.#r?this.#r:this.hasMore()?(this.#r=new t(this.#t,this.#e,this.#i+1,this.#s),this.#r.#h=this.#h,this.#r.#o=this.#o,this.#r.#a=this.#a,this.#r):this.#r=null}isUNC(){let t=this.#t;return void 0!==this.#o?this.#o:this.#o="win32"===this.#s&&0===this.#i&&""===t[0]&&""===t[1]&&"string"==typeof t[2]&&!!t[2]&&"string"==typeof t[3]&&!!t[3]}isDrive(){let t=this.#t;return void 0!==this.#a?this.#a:this.#a="win32"===this.#s&&0===this.#i&&this.length>1&&"string"==typeof t[0]&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return void 0!==this.#h?this.#h:this.#h=""===t[0]&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return"string"==typeof t&&this.isAbsolute()&&0===this.#i?t:""}checkFollowGlobstar(){return!(0===this.#i||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return 0!==this.#i&&!!this.isGlobstar()&&!!this.#l&&(this.#l=!1,!0)}},eC="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux",eO=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:i,noext:s,noglobstar:r,platform:n=eC}){for(let a of(this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=n,this.mmopts={dot:!0,nobrace:e,nocase:i,noext:s,noglobstar:r,optimizationLevel:2,platform:n,nocomment:!0,nonegate:!0},t))this.add(a)}add(t){let e=new tg(t,this.mmopts);for(let t=0;t<e.set.length;t++){let i=e.set[t],s=e.globParts[t];if(!i||!s)throw Error("invalid pattern object");for(;"."===i[0]&&"."===s[0];)i.shift(),s.shift();let r=new ex(i,s,0,this.platform),n=new tg(r.globString(),this.mmopts),a="**"===s[s.length-1],o=r.isAbsolute();o?this.absolute.push(n):this.relative.push(n),a&&(o?this.absoluteChildren.push(n):this.relativeChildren.push(n))}}ignored(t){let e=t.fullpath(),i=`${e}/`,s=t.relative()||".",r=`${s}/`;for(let t of this.relative)if(t.match(s)||t.match(r))return!0;for(let t of this.absolute)if(t.match(e)||t.match(i))return!0;return!1}childrenIgnored(t){let e=t.fullpath()+"/",i=(t.relative()||".")+"/";for(let t of this.relativeChildren)if(t.match(i))return!0;for(let t of this.absoluteChildren)if(t.match(e))return!0;return!1}},eA=class t{store;constructor(t=new Map){this.store=t}copy(){return new t(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){let i=t.fullpath(),s=this.store.get(i);s?s.add(e.globString()):this.store.set(i,new Set([e.globString()]))}},eR=class{store=new Map;add(t,e,i){let s=2*!!e|!!i,r=this.store.get(t);this.store.set(t,void 0===r?s:s&r)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(2&e),!!(1&e)])}},eT=class{store=new Map;add(t,e){if(!t.canReaddir())return;let i=this.store.get(t);i?i.find(t=>t.globString()===e.globString())||i.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},eF=class t{hasWalkedCache;matches=new eR;subwalks=new eT;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new eA}processPatterns(t,e){for(let[i,s]of(this.patterns=e,e.map(e=>[t,e]))){this.hasWalkedCache.storeWalked(i,s);let t=s.root(),e=s.isAbsolute()&&!1!==this.opts.absolute;if(t){i=i.resolve("/"===t&&void 0!==this.opts.root?this.opts.root:t);let e=s.rest();if(e)s=e;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let r,n,a=!1;for(;"string"==typeof(r=s.pattern())&&(n=s.rest());)i=i.resolve(r),s=n,a=!0;if(r=s.pattern(),n=s.rest(),a){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if("string"==typeof r){let t=".."===r||""===r||"."===r;this.matches.add(i.resolve(r),e,t);continue}if(r===tc){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let t=n?.pattern(),r=n?.rest();if(n&&(""!==t&&"."!==t||r)){if(".."===t){let t=i.parent||i;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,e,!0)}}else this.matches.add(i,e,""===t||"."===t)}else r instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(t,e){let i=this.subwalks.get(t),s=this.child();for(let t of e)for(let e of i){let i=e.isAbsolute(),r=e.pattern(),n=e.rest();r===tc?s.testGlobstar(t,e,n,i):r instanceof RegExp?s.testRegExp(t,r,n,i):s.testString(t,r,n,i)}return s}testGlobstar(t,e,i,s){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,s,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(i&&e.checkFollowGlobstar()?this.subwalks.add(t,i):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),i){let e=i.pattern();if("string"==typeof e&&".."!==e&&""!==e&&"."!==e)this.testString(t,e,i.rest(),s);else if(".."===e){let e=t.parent||t;this.subwalks.add(e,i)}else e instanceof RegExp&&this.testRegExp(t,e,i.rest(),s)}}testRegExp(t,e,i,s){e.test(t.name)&&(i?this.subwalks.add(t,i):this.matches.add(t,s,!1))}testString(t,e,i,s){t.isNamed(e)&&(i?this.subwalks.add(t,i):this.matches.add(t,s,!1))}},ej=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#e;#i;signal;maxDepth;includeChildMatches;constructor(t,e,i){if(this.patterns=t,this.path=e,this.opts=i,this.#i=i.posix||"win32"!==i.platform?"/":"\\",this.includeChildMatches=!1!==i.includeChildMatches,(i.ignore||!this.includeChildMatches)&&(this.#e=((t,e)=>"string"==typeof t?new eO([t],e):Array.isArray(t)?new eO(t,e):t)(i.ignore??[],i),!this.includeChildMatches&&"function"!=typeof this.#e.add))throw Error("cannot ignore child matches, ignore lacks add() method.");this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#s(t){return this.seen.has(t)||!!this.#e?.ignored?.(t)}#r(t){return!!this.#e?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){let t;if(!this.signal?.aborted)for(this.paused=!1;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){let i;if(e&&this.opts.nodir)return;if(this.opts.realpath){if(!(i=t.realpathCached()||await t.realpath()))return;t=i}let s=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let t=await s.realpath();t&&(t.isUnknown()||this.opts.stat)&&await t.lstat()}return this.matchCheckTest(s,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#s(t)?t:void 0}matchCheckSync(t,e){let i;if(e&&this.opts.nodir)return;if(this.opts.realpath){if(!(i=t.realpathCached()||t.realpathSync()))return;t=i}let s=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let t=s.realpathSync();t&&(t?.isUnknown()||this.opts.stat)&&t.lstatSync()}return this.matchCheckTest(s,e)}matchFinish(t,e){if(this.#s(t))return;if(!this.includeChildMatches&&this.#e?.add){let e=`${t.relativePosix()}/**`;this.#e.add(e)}let i=void 0===this.opts.absolute?e:this.opts.absolute;this.seen.add(t);let s=this.opts.mark&&t.isDirectory()?this.#i:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(i){let e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+s)}else{let e=this.opts.posix?t.relativePosix():t.relative(),i=this.opts.dotRelative&&!e.startsWith(".."+this.#i)?"."+this.#i:"";this.matchEmit(e?i+e+s:"."+s)}}async match(t,e,i){let s=await this.matchCheck(t,i);s&&this.matchFinish(s,e)}matchSync(t,e,i){let s=this.matchCheckSync(t,i);s&&this.matchFinish(s,e)}walkCB(t,e,i){this.signal?.aborted&&i(),this.walkCB2(t,e,new eF(this.opts),i)}walkCB2(t,e,i,s){if(this.#r(t))return s();if(this.signal?.aborted&&s(),this.paused)return void this.onResume(()=>this.walkCB2(t,e,i,s));i.processPatterns(t,e);let r=1,n=()=>{0==--r&&s()};for(let[t,e,s]of i.matches.entries())this.#s(t)||(r++,this.match(t,e,s).then(()=>n()));for(let t of i.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;r++;let e=t.readdirCached();t.calledReaddir()?this.walkCB3(t,e,i,n):t.readdirCB((e,s)=>this.walkCB3(t,s,i,n),!0)}n()}walkCB3(t,e,i,s){i=i.filterEntries(t,e);let r=1,n=()=>{0==--r&&s()};for(let[t,e,s]of i.matches.entries())this.#s(t)||(r++,this.match(t,e,s).then(()=>n()));for(let[t,e]of i.subwalks.entries())r++,this.walkCB2(t,e,i.child(),n);n()}walkCBSync(t,e,i){this.signal?.aborted&&i(),this.walkCB2Sync(t,e,new eF(this.opts),i)}walkCB2Sync(t,e,i,s){if(this.#r(t))return s();if(this.signal?.aborted&&s(),this.paused)return void this.onResume(()=>this.walkCB2Sync(t,e,i,s));i.processPatterns(t,e);let r=1,n=()=>{0==--r&&s()};for(let[t,e,s]of i.matches.entries())this.#s(t)||this.matchSync(t,e,s);for(let t of i.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;r++;let e=t.readdirSync();this.walkCB3Sync(t,e,i,n)}n()}walkCB3Sync(t,e,i,s){i=i.filterEntries(t,e);let r=1,n=()=>{0==--r&&s()};for(let[t,e,s]of i.matches.entries())this.#s(t)||this.matchSync(t,e,s);for(let[t,e]of i.subwalks.entries())r++,this.walkCB2Sync(t,e,i.child(),n);n()}},e_=class extends ej{matches=new Set;constructor(t,e,i){super(t,e,i)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},eD=class extends ej{results;constructor(t,e,i){super(t,e,i),this.results=new es({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},eM="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux",eP=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,s.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=!1!==e.includeChildMatches,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&void 0!==this.absolute)throw Error("cannot set absolute and withFileTypes:true");if("string"==typeof t&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(t=t.map(t=>t.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw TypeError("base matching requires globstar");t=t.map(t=>t.includes("/")?t:`./**/${t}`)}if(this.pattern=t,this.platform=e.platform||eM,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,void 0!==e.nocase&&e.nocase!==e.scurry.nocase)throw Error("nocase option contradicts provided scurry option")}else{let t="win32"===e.platform?eS:"darwin"===e.platform?e$:(e.platform,ek);this.scurry=new t(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let i="darwin"===this.platform||"win32"===this.platform,r={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[n,a]=this.pattern.map(t=>new tg(t,r)).reduce((t,e)=>(t[0].push(...e.set),t[1].push(...e.globParts),t),[[],[]]);this.patterns=n.map((t,e)=>{let i=a[e];if(!i)throw Error("invalid pattern object");return new ex(t,i,0,this.platform)})}async walk(){return[...await new e_(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new e_(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new eD(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new eD(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};function eN(t,e={}){return new eP(t,e).streamSync()}function eW(t,e={}){return new eP(t,e).stream()}function eL(t,e={}){return new eP(t,e).walkSync()}async function ez(t,e={}){return new eP(t,e).walk()}function eI(t,e={}){return new eP(t,e).iterateSync()}function eU(t,e={}){return new eP(t,e).iterate()}var eB=Object.assign(eW,{sync:eN}),eG=Object.assign(eU,{sync:eI}),eq=Object.assign(eL,{stream:eN,iterate:eI}),eY=Object.assign(ez,{glob:ez,globSync:eL,sync:eq,globStream:eW,stream:eB,globStreamSync:eN,streamSync:eN,globIterate:eU,iterate:eG,globIterateSync:eI,iterateSync:eI,Glob:eP,hasMagic:(t,e={})=>{for(let i of(Array.isArray(t)||(t=[t]),t))if(new tg(i,e).hasMagic())return!0;return!1},escape:X,unescape:L});eY.glob=eY;let eH=/\b(shipped|done|released|complete[d]?)\b/i;function eJ(t){return t.replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[*_`]/g,"").replace(/\s+/g," ").trim()}function eK(t){return t.length>80?`${t.slice(0,79).trimEnd()}…`:t}function eV(t){return t.length&&t.every(t=>"done"===t)?"done":t.some(t=>"planned"!==t)?"in-progress":"planned"}let eX=t=>{let e=parseFloat(t);return Number.isFinite(e)?e:1/0},eZ=t=>"done"===t||"cancelled"===t,eQ=t=>!!t&&"object"==typeof t&&!Array.isArray(t),e0=t=>"string"==typeof t?t.trim():"";function e1(t,e,i="is not an existing roadmap item"){let s=e.find(e=>e.id===t.toUpperCase());return s?null!==s.parent?{error:`parent ${s.id} is an epic, not a horizon (max depth is 2)`}:{id:s.id}:{error:`parent "${t}" ${i}`}}let e2=(t,e,i)=>t.find(t=>(t.parent??"")===e&&t.title.trim().toLowerCase()===i.toLowerCase())?.id;function e8(t,e){if(!eQ(t))return["plan must be an object"];if("roadmap"===t.kind)return function(t,e){let i=[],s=t.horizons??[],r=t.epics??[];if(Array.isArray(s)||i.push("horizons must be an array"),Array.isArray(r)||i.push("epics must be an array"),i.length>0)return i;if(s.length+r.length===0)return["a roadmap plan needs at least one horizon or epic"];let n=new Set,a=new Set,o=(t,e,s)=>{let r=eQ(t)?e0(t.key):"";r?n.has(r)?i.push(`duplicate key "${r}"`):(n.add(r),s&&a.add(r)):i.push(`${e}: key is required`)};s.forEach((t,e)=>o(t,`horizon #${e+1}`,!0)),r.forEach((t,e)=>o(t,`epic #${e+1}`,!1));let h=new Map,l=(t,s,r)=>{let n=`${t}\0${s.toLowerCase()}`,a=e2(e.roadmap,t,s)??h.get(n);a?i.push(`${r}: "${s}" already exists ${t?`under ${t}`:"as a horizon"} (${a})`):h.set(n,r)};return s.forEach((t,e)=>{if(!eQ(t))return void i.push(`horizon #${e+1} must be an object`);let s=e0(t.key)||`horizon #${e+1}`,r=e0(t.title);r?l("",r,s):i.push(`${s}: title is required`),void 0!==t.body&&"string"!=typeof t.body&&i.push(`${s}: body must be a markdown string`)}),r.forEach((t,s)=>{if(!eQ(t))return void i.push(`epic #${s+1} must be an object`);let r=e0(t.key)||`epic #${s+1}`,o=e0(t.title);o||i.push(`${r}: title is required`),"string"!=typeof t.body&&i.push(`${r}: body must be a markdown string`),void 0===t.status||e3.includes(t.status)||i.push(`${r}: status must be one of ${e3.join(", ")} (got ${JSON.stringify(t.status)})`);let h=e0(t.parent),d="";if(h)if(a.has(h))d=h;else if(n.has(h))i.push(`${r}: parent "${h}" is an epic in this plan; an epic's parent must be a horizon`);else{let t=e1(h,e.roadmap,"is neither a horizon key in this plan nor an existing roadmap item");"id"in t?d=t.id:i.push(`${r}: ${t.error}`)}else i.push(`${r}: parent is required (an existing horizon id or a horizon key in this plan)`);o&&d&&l(d,o,r)}),i}(t,e);if("breakdown"!==t.kind)return[`plan.kind must be "breakdown" or "roadmap" (got ${JSON.stringify(t.kind)})`];let i=[],s=e0(t.epic).toUpperCase();if(void 0!==t.epic&&"string"!=typeof t.epic)i.push("epic must be a string (an epic id)");else if(s&&void 0!==t.newEpic)i.push("pass either epic (an existing epic) or newEpic, not both");else if(s){let r=e.roadmap.find(t=>t.id===s);r?r.parent||i.push(`${r.id} is a horizon, not an epic; pass an epic id`):i.push(`Epic ${JSON.stringify(t.epic)} not found`)}else if(void 0!==t.newEpic){let s=t.newEpic;if(eQ(s)){let t=e0(s.title),r=e0(s.parent);if(t||i.push("newEpic: title is required"),"string"!=typeof s.body&&i.push("newEpic: body must be a markdown string"),r){let s=e1(r,e.roadmap);if("error"in s)i.push(`newEpic: ${s.error}`);else if(t){let r=e2(e.roadmap,s.id,t);r&&i.push(`newEpic: "${t}" already exists under ${s.id} (${r})`)}}else i.push("newEpic: parent is required (an existing horizon id)")}else i.push("newEpic must be an object { title, parent, body }")}if(!Array.isArray(t.tasks)||0===t.tasks.length)return i.push("tasks must be a non-empty array"),i;let r=t.tasks,n=new Set(e.taskIds.map(t=>t.toUpperCase())),a=new Map;r.forEach((t,e)=>{let s=eQ(t)?e0(t.key):"";s?a.has(s)?i.push(`duplicate key "${s}"`):a.set(s,e):i.push(`task #${e+1}: key is required`)});let o=new Map;r.forEach((t,e)=>{var s;let r;if(!eQ(t))return void i.push(`task #${e+1} must be an object`);let h=e0(t.key)||`task #${e+1}`;if(e0(t.title)||i.push(`${h}: title is required`),"string"!=typeof t.body&&i.push(`${h}: body must be a markdown string`),void 0!==t.size&&"string"!=typeof t.size&&i.push(`${h}: size must be a string`),void 0===t.due||"string"==typeof t.due&&(r=(s=t.due).match(/^(\d{4})-(\d{2})-(\d{2})$/))&&new Date(Date.UTC(+r[1],r[2]-1,+r[3])).toISOString().slice(0,10)===s||i.push(`${h}: due must be a date YYYY-MM-DD (got ${JSON.stringify(t.due)})`),void 0===t.dependsOn)return;if(!Array.isArray(t.dependsOn))return void i.push(`${h}: dependsOn must be an array`);let l=[];for(let e of t.dependsOn){let t=e0(e);a.has(t)?l.push(t):n.has(t.toUpperCase())||i.push(`${h}: dependsOn "${String(e)}" is neither a key in this plan nor an existing task`)}e0(t.key)&&o.set(e0(t.key),l)});let h=new Map,l=new Set,d=(t,e)=>{if("done"!==h.get(t)){if("open"===h.get(t)){let s=[...e.slice(e.indexOf(t)),t];s.some(t=>l.has(t))||i.push(`dependency cycle: ${s.join(" → ")}`),s.forEach(t=>l.add(t));return}for(let i of(h.set(t,"open"),o.get(t)??[]))d(i,[...e,t]);h.set(t,"done")}};for(let t of o.keys())d(t,[]);for(let[t,e]of o)if(!l.has(t))for(let s of e)(a.get(s)??0)>(a.get(t)??0)&&i.push(`${t} depends on ${s}, which comes later; list ${s} first`);return i}let e3=["planned","in-progress","done"];function e4(t,e){if("roadmap"===t.kind)return function(t,e){let i=[],s=t.horizons??[],r=t.epics??[],n=new Set(s.map(t=>t.key)),a=new Set([...n,...r.map(t=>t.key)]),o=new Set(e);for(let t of o)a.has(t)||i.push(`unknown key "${t}"`);let h=s.filter(t=>o.has(t.key)),l=r.filter(t=>o.has(t.key));for(let t of(h.length+l.length===0&&i.push("nothing selected"),l)){let e=t.parent.trim();n.has(e)&&!o.has(e)&&i.push(`${t.key} is under ${e}, which you unchecked; check ${e} or uncheck ${t.key}`)}return{plan:{...t,horizons:h,epics:l},errors:i}}(t,e);let i=[],s=new Set(t.tasks.map(t=>t.key.trim())),r=new Set(e.map(t=>t.trim()));for(let t of r)s.has(t)||i.push(`unknown key "${t}"`);let n=t.tasks.filter(t=>r.has(t.key.trim()));for(let t of(0===n.length&&i.push("nothing selected"),n))for(let e of(t.dependsOn??[]).map(t=>t.trim()))s.has(e)&&!r.has(e)&&i.push(`${t.key.trim()} depends on ${e}, which you unchecked`);return{plan:{...t,tasks:n},errors:i}}t.s(["planTarget",0,function(t){return e0(t.epic)?e0(t.epic).toUpperCase():t.newEpic?`new epic "${e0(t.newEpic.title)}"`:"no epic"},"selectPlan",0,e4,"validatePlan",0,e8],975283);let e6=(t,e)=>`${t} ${e}${1===t?"":"s"}`;t.s(["SESSION_GAP_MS",0,18e5,"groupSessions",0,function(t,e={}){let i=e.gapMs??18e5,s=[...t].sort((t,e)=>t.timestamp.localeCompare(e.timestamp)),r=new Map,n=new Map;for(let t of s){let e=t.sessionId;if(!e){let s=Date.parse(t.timestamp),r=n.get(t.actor);(!r||"session_start"===t.type||s-r.lastAt>i)&&(r={id:`legacy_${t.id}`,lastAt:s},n.set(t.actor,r)),r.lastAt=s,e=r.id}let s=r.get(e);s?s.push(t):r.set(e,[t])}return[...r].map(([t,e])=>(function(t,e){let i=new Map,s=new Set,r=[],n=!1,a=0;for(let t of e){"task_updated"===t.type&&t.taskId&&t.taskStatus&&i.set(t.taskId,t.taskStatus);let e=function(t){switch(t.type){case"doc_created":return t.detail??t.title.replace(/^Created: /,"");case"doc_deleted":return t.title.replace(/^Deleted /,"");case"doc_renamed":return t.title.split(" → ")[1]??null;default:return null}}(t);e&&s.add(e),"decision_logged"===t.type&&r.push(t.title),"memory_updated"===t.type&&(n=!0),"roadmap_updated"===t.type&&a++}let o=[...i].map(([t,e])=>({id:t,lastStatus:e})),h=o.filter(t=>"done"===t.lastStatus).length,l=[o.length?`${e6(o.length,"task")} moved${h?` (${h} done)`:""}`:"",s.size?`${e6(s.size,"doc")} changed`:"",r.length?e6(r.length,"ADR"):"",a?e6(a,"roadmap edit"):"",n?"memory updated":""].filter(Boolean);return{id:t,actor:e[0].actor,start:e[0].timestamp,end:e[e.length-1].timestamp,eventCount:e.length,eventIds:e.map(t=>t.id),tasks:o,docs:[...s],decisions:r,memoryUpdated:n,headline:l.join(" · ")||e6(e.length,"event")}})(t,e)).sort((t,e)=>e.start.localeCompare(t.start))},"sessionDuration",0,function(t){let e=Math.round((Date.parse(t.end)-Date.parse(t.start))/6e4);return e<1?"<1m":e<60?`${e}m`:`${Math.floor(e/60)}h ${e%60}m`},"sessionsForTask",0,function(t,e){return t.filter(t=>t.tasks.some(t=>t.id===e))}],31451);let e5={todo:"📋","in-progress":"🔨",blocked:"🚫",done:"✅",cancelled:"❌"},e7={ready:"todo",planned:"todo","not started":"todo",wip:"in-progress",doing:"in-progress",active:"in-progress",start:"in-progress",started:"in-progress",complete:"done",completed:"done",finished:"done",finish:"done",block:"blocked",cancel:"cancelled",skip:"cancelled"};function e9(){return process.env.VIBEDOC_ROOT||process.cwd()}async function it(t){let s=t||i.default.dirname(e9()),r=[];try{for(let t of(await e.default.readdir(s,{withFileTypes:!0}))){if(!t.isDirectory())continue;let n=i.default.join(s,t.name),a=!1;for(let t of["CLAUDE.md","AGENTS.md","docs/architecture",".vibedoc"])try{await e.default.access(i.default.join(n,t)),a=!0;break}catch{}a&&r.push({id:t.name,name:t.name,root:n,hasVibedoc:!0})}}catch{}let n=e9(),a=i.default.basename(n),o=r.findIndex(t=>t.root===n);if(o>0){let[t]=r.splice(o,1);r.unshift(t)}else -1===o&&r.unshift({id:a,name:a,root:n,hasVibedoc:!0});return r}async function ie(t){return(await eY("**/*.md",{cwd:t,ignore:["node_modules/**",".git/**",".next/**"],nodir:!0})).sort().map(t=>{var e;return{path:t,section:(e=t).includes("/")?e.startsWith("memory/")?"memory":e.startsWith("plans/")?"plans":e.includes("01-overview")?"overview":e.includes("02-high-level")||e.includes("high-level-design")?"high-level-design":e.includes("03-services")||e.includes("/services/")?"services":e.includes("04-data")||e.includes("/data/")?"data":e.includes("05-infra")||e.includes("/infrastructure/")?"infrastructure":e.includes("06-security")||e.includes("/security/")?"security":e.includes("07-observ")||e.includes("/observability/")?"observability":e.includes("08-resil")||e.includes("/resilience/")?"resilience":e.includes("decisions/")||e.includes("ADR")?"decisions":"other":"root",name:i.default.basename(t,".md")}})}async function ii(t,s){for(let r of[i.default.join(s,t),i.default.join(s,`${t}.md`),i.default.join(s,"docs",t),i.default.join(s,"docs",`${t}.md`),i.default.join(s,"docs","architecture",t),i.default.join(s,"docs","architecture",`${t}.md`),i.default.join(s,"memory",t),i.default.join(s,"memory",`${t}.md`),i.default.join(s,"plans",t),i.default.join(s,"plans",`${t}.md`)])try{let t=await e.default.readFile(r,"utf8");return{path:i.default.relative(s,r),content:t}}catch{}for(let r of[`**/${t}.md`,`**/${t}*.md`,`**/*${t}*.md`]){let t=await eY(r,{cwd:s,ignore:["node_modules/**",".git/**",".next/**"],nodir:!0,nocase:!0});if(t.length>0){let r=await e.default.readFile(i.default.join(s,t[0]),"utf8");return{path:t[0],content:r}}}throw Error(`Doc not found: "${t}"`)}async function is(t,s,r){let n=i.default.resolve(r),a=i.default.resolve(r,t);if(!a.startsWith(n+i.default.sep)&&a!==n)throw Error("Path outside root");await e.default.mkdir(i.default.dirname(a),{recursive:!0}),await e.default.writeFile(a,s,"utf8")}async function ir(t,s,r,n=!1){let a=i.default.resolve(r),o=i.default.resolve(r,t);if(!o.startsWith(a+i.default.sep))throw Error("Path outside root");let h=await e.default.readFile(o,"utf8").catch(t=>{if("ENOENT"===t.code)return"";throw t}),l=function(t,e){let i=t;for(let[t,s]of e.entries()){if("string"!=typeof s?.old_string||"string"!=typeof s?.new_string)return{error:`Edit ${t+1}: old_string and new_string must be strings`};if(""===s.old_string){if(""!==i)return{error:`Edit ${t+1}: empty old_string is only allowed for a new, empty doc`};i=s.new_string;continue}let e=i.indexOf(s.old_string);if(-1===e)return{error:`Edit ${t+1}: old_string not found in the doc`};if(-1!==i.indexOf(s.old_string,e+1))return{error:`Edit ${t+1}: old_string matches more than once; include more surrounding text`};i=i.slice(0,e)+s.new_string+i.slice(e+s.old_string.length)}return{content:i}}(h,s);if("error"in l)throw Error(l.error);return n||(await e.default.mkdir(i.default.dirname(o),{recursive:!0}),await e.default.writeFile(o,l.content,"utf8")),{before:h,content:l.content}}async function ia(t,e){let i=[];for(let s of t)try{let{content:t}=await ii(s,e);i.push(`--- FILE: ${s} ---
|
|
4
|
-
|
|
5
|
-
${
|
|
6
|
-
|
|
1
|
+
module.exports=[522734,(t,e,i)=>{e.exports=t.x("fs",()=>require("fs"))},924868,(t,e,i)=>{e.exports=t.x("fs/promises",()=>require("fs/promises"))},687769,(t,e,i)=>{e.exports=t.x("node:events",()=>require("node:events"))},899871,(t,e,i)=>{e.exports=t.x("node:string_decoder",()=>require("node:string_decoder"))},857764,(t,e,i)=>{e.exports=t.x("node:url",()=>require("node:url"))},799501,975283,31451,531208,840980,404466,t=>{"use strict";var e=t.i(924868),i=t.i(814747),s=t.i(857764),r=t.i(750227),n=t.i(522734),a=t.i(902157),o=t.i(912714),l=t.i(687769),h=t.i(81111),d=t.i(899871),u=(t,e,i)=>{let s=t instanceof RegExp?c(t,i):t,r=e instanceof RegExp?c(e,i):e,n=null!==s&&null!=r&&f(s,r,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+s.length,n[1]),post:i.slice(n[1]+r.length)}},c=(t,e)=>{let i=e.match(t);return i?i[0]:null},f=(t,e,i)=>{let s,r,n,a,o,l=i.indexOf(t),h=i.indexOf(e,l+1),d=l;if(l>=0&&h>0){if(t===e)return[l,h];for(s=[],n=i.length;d>=0&&!o;){if(d===l)s.push(d),l=i.indexOf(t,d+1);else if(1===s.length){let t=s.pop();void 0!==t&&(o=[t,h])}else void 0!==(r=s.pop())&&r<n&&(n=r,a=h),h=i.indexOf(e,d+1);d=l<h&&l>=0?l:h}s.length&&void 0!==a&&(o=[n,a])}return o},p="\0SLASH"+Math.random()+"\0",m="\0OPEN"+Math.random()+"\0",g="\0CLOSE"+Math.random()+"\0",w="\0COMMA"+Math.random()+"\0",y="\0PERIOD"+Math.random()+"\0",b=RegExp(p,"g"),v=RegExp(m,"g"),S=RegExp(g,"g"),k=RegExp(w,"g"),$=RegExp(y,"g"),x=/\\\\/g,E=/\\{/g,C=/\\}/g,O=/\\,/g,j=/\\./g;function A(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function T(t){return t.replace(b,"\\").replace(v,"{").replace(S,"}").replace(k,",").replace($,".")}function R(t){return"{"+t+"}"}function F(t){return/^-?0\d/.test(t)}function D(t,e){return t<=e}function _(t,e){return t>=e}var M=t=>{if("string"!=typeof t)throw TypeError("invalid pattern");if(t.length>65536)throw TypeError("pattern is too long")},N={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},P=t=>t.replace(/[[\]\\-]/g,"\\$&"),W=(t,e)=>{if("["!==t.charAt(e))throw Error("not in a brace expression");let i=[],s=[],r=e+1,n=!1,a=!1,o=!1,l=!1,h=e,d="";t:for(;r<t.length;){let u=t.charAt(r);if(("!"===u||"^"===u)&&r===e+1){l=!0,r++;continue}if("]"===u&&n&&!o){h=r+1;break}if(n=!0,"\\"===u&&!o){o=!0,r++;continue}if("["===u&&!o){for(let[n,[o,l,h]]of Object.entries(N))if(t.startsWith(n,r)){if(d)return["$.",!1,t.length-e,!0];r+=n.length,h?s.push(o):i.push(o),a=a||l;continue t}}if(o=!1,d){u>d?i.push(P(d)+"-"+P(u)):u===d&&i.push(P(u)),d="",r++;continue}if(t.startsWith("-]",r+1)){i.push(P(u+"-")),r+=2;continue}if(t.startsWith("-",r+1)){d=u,r+=2;continue}i.push(P(u)),r++}if(h<r)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,t.length-e,!0];if(0===s.length&&1===i.length&&/^\\?.$/.test(i[0])&&!l)return[(2===i[0].length?i[0].slice(-1):i[0]).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),!1,h-e,!1];let u="["+(l?"^":"")+i.join("")+"]",c="["+(l?"":"^")+s.join("")+"]";return[i.length&&s.length?"("+u+"|"+c+")":i.length?u:c,a,h-e,!0]},L=(t,{windowsPathsNoEscape:e=!1,magicalBraces:i=!0}={})=>i?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),z=new Set(["!","?","+","*","@"]),I=t=>z.has(t),U="(?!\\.)",B=new Set(["[","."]),G=new Set(["..","."]),q=new Set("().*{}+?[]^$\\!"),Y=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),J="[^/]",H=J+"*?",X=J+"+?",V=class t{type;#t;#e;#i=!1;#s=[];#r;#n;#a;#o=!1;#l;#h;#d=!1;constructor(t,e,i={}){this.type=t,t&&(this.#e=!0),this.#r=e,this.#t=this.#r?this.#r.#t:this,this.#l=this.#t===this?i:this.#t.#l,this.#a=this.#t===this?[]:this.#t.#a,"!"!==t||this.#t.#o||this.#a.push(this),this.#n=this.#r?this.#r.#s.length:0}get hasMagic(){if(void 0!==this.#e)return this.#e;for(let t of this.#s)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return void 0!==this.#h?this.#h:this.type?this.#h=this.type+"("+this.#s.map(t=>String(t)).join("|")+")":this.#h=this.#s.map(t=>String(t)).join("")}#u(){let t;if(this!==this.#t)throw Error("should only call on root");if(this.#o)return this;for(this.toString(),this.#o=!0;t=this.#a.pop();){if("!"!==t.type)continue;let e=t,i=e.#r;for(;i;){for(let s=e.#n+1;!i.type&&s<i.#s.length;s++)for(let e of t.#s){if("string"==typeof e)throw Error("string part in extglob AST??");e.copyIn(i.#s[s])}i=(e=i).#r}}return this}push(...e){for(let i of e)if(""!==i){if("string"!=typeof i&&!(i instanceof t&&i.#r===this))throw Error("invalid part: "+i);this.#s.push(i)}}toJSON(){let t=null===this.type?this.#s.slice().map(t=>"string"==typeof t?t:t.toJSON()):[this.type,...this.#s.map(t=>t.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#o&&this.#r?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#r?.isStart())return!1;if(0===this.#n)return!0;let e=this.#r;for(let i=0;i<this.#n;i++){let s=e.#s[i];if(!(s instanceof t&&"!"===s.type))return!1}return!0}isEnd(){if(this.#t===this||this.#r?.type==="!")return!0;if(!this.#r?.isEnd())return!1;if(!this.type)return this.#r?.isEnd();let t=this.#r?this.#r.#s.length:0;return this.#n===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(e){let i=new t(this.type,e);for(let t of this.#s)i.copyIn(t);return i}static #c(e,i,s,r){let n=!1,a=!1,o=-1,l=!1;if(null===i.type){let h=s,d="";for(;h<e.length;){let s=e.charAt(h++);if(n||"\\"===s){n=!n,d+=s;continue}if(a){h===o+1?("^"===s||"!"===s)&&(l=!0):"]"!==s||h===o+2&&l||(a=!1),d+=s;continue}if("["===s){a=!0,o=h,l=!1,d+=s;continue}if(!r.noext&&I(s)&&"("===e.charAt(h)){i.push(d),d="";let n=new t(s,i);h=t.#c(e,n,h,r),i.push(n);continue}d+=s}return i.push(d),h}let h=s+1,d=new t(null,i),u=[],c="";for(;h<e.length;){let s=e.charAt(h++);if(n||"\\"===s){n=!n,c+=s;continue}if(a){h===o+1?("^"===s||"!"===s)&&(l=!0):"]"!==s||h===o+2&&l||(a=!1),c+=s;continue}if("["===s){a=!0,o=h,l=!1,c+=s;continue}if(I(s)&&"("===e.charAt(h)){d.push(c),c="";let i=new t(s,d);d.push(i),h=t.#c(e,i,h,r);continue}if("|"===s){d.push(c),c="",u.push(d),d=new t(null,i);continue}if(")"===s)return""===c&&0===i.#s.length&&(i.#d=!0),d.push(c),c="",i.push(...u,d),h;c+=s}return i.type=null,i.#e=void 0,i.#s=[e.substring(s-1)],h}static fromGlob(e,i={}){let s=new t(null,void 0,i);return t.#c(e,s,0,i),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[e,i,s,r]=this.toRegExpSource();return s||this.#e||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()?Object.assign(RegExp(`^${e}$`,(this.#l.nocase?"i":"")+(r?"u":"")),{_src:e,_glob:t}):i}get options(){return this.#l}toRegExpSource(e){let i=e??!!this.#l.dot;if(this.#t===this&&this.#u(),!this.type){let s=this.isStart()&&this.isEnd()&&!this.#s.some(t=>"string"!=typeof t),r=this.#s.map(i=>{let[r,n,a,o]="string"==typeof i?t.#f(i,this.#e,s):i.toRegExpSource(e);return this.#e=this.#e||a,this.#i=this.#i||o,r}).join(""),n="";if(this.isStart()&&"string"==typeof this.#s[0]&&!(1===this.#s.length&&G.has(this.#s[0]))){let t=i&&B.has(r.charAt(0))||r.startsWith("\\.")&&B.has(r.charAt(2))||r.startsWith("\\.\\.")&&B.has(r.charAt(4)),s=!i&&!e&&B.has(r.charAt(0));n=t?"(?!(?:^|/)\\.\\.?(?:$|/))":s?U:""}let a="";return this.isEnd()&&this.#t.#o&&this.#r?.type==="!"&&(a="(?:$|\\/)"),[n+r+a,L(r),this.#e=!!this.#e,this.#i]}let s="*"===this.type||"+"===this.type,r="!"===this.type?"(?:(?!(?:":"(?:",n=this.#p(i);if(this.isStart()&&this.isEnd()&&!n&&"!"!==this.type){let t=this.toString();return this.#s=[t],this.type=null,this.#e=void 0,[t,L(this.toString()),!1,!1]}let a=!s||e||i||!U?"":this.#p(!0);a===n&&(a=""),a&&(n=`(?:${n})(?:${a})*?`);return["!"===this.type&&this.#d?(this.isStart()&&!i?U:"")+X:r+n+("!"===this.type?"))"+(!this.isStart()||i||e?"":U)+H+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&a?")":"*"===this.type&&a?")?":`)${this.type}`),L(n),this.#e=!!this.#e,this.#i]}#p(t){return this.#s.map(e=>{if("string"==typeof e)throw Error("string type in extglob ast??");let[i,s,r,n]=e.toRegExpSource(t);return this.#i=this.#i||n,i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static #f(t,e,i=!1){let s=!1,r="",n=!1,a=!1;for(let o=0;o<t.length;o++){let l=t.charAt(o);if(s){s=!1,r+=(q.has(l)?"\\":"")+l;continue}if("*"===l){if(a)continue;a=!0,r+=i&&/^[*]+$/.test(t)?X:H,e=!0;continue}if(a=!1,"\\"===l){o===t.length-1?r+="\\\\":s=!0;continue}if("["===l){let[i,s,a,l]=W(t,o);if(a){r+=i,n=n||s,o+=a-1,e=e||l;continue}}if("?"===l){r+=J,e=!0;continue}r+=Y(l)}return[r,L(t),!!e,n]}},K=(t,{windowsPathsNoEscape:e=!1,magicalBraces:i=!1}={})=>i?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),Z=(t,e,i={})=>(M(e),(!!i.nocomment||"#"!==e.charAt(0))&&new tg(e,i).match(t)),Q=/^\*+([^+@!?\*\[\(]*)$/,tt=/^\*+\.\*+$/,te=t=>!t.startsWith(".")&&t.includes("."),ti=t=>"."!==t&&".."!==t&&t.includes("."),ts=/^\.\*+$/,tr=t=>"."!==t&&".."!==t&&t.startsWith("."),tn=/^\*+$/,ta=t=>0!==t.length&&!t.startsWith("."),to=t=>0!==t.length&&"."!==t&&".."!==t,tl=/^\?+([^+@!?\*\[\(]*)?$/,th=([t])=>{let e=t.length;return t=>t.length===e&&!t.startsWith(".")},td=([t])=>{let e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},tu="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Z.sep="win32"===tu?"\\":"/";var tc=Symbol("globstar **");Z.GLOBSTAR=tc;Z.filter=(t,e={})=>i=>Z(i,t,e);var tf=(t,e={})=>Object.assign({},t,e);Z.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Z;let e=Z;return Object.assign((i,s,r={})=>e(i,s,tf(t,r)),{Minimatch:class extends e.Minimatch{constructor(e,i={}){super(e,tf(t,i))}static defaults(i){return e.defaults(tf(t,i)).Minimatch}},AST:class extends e.AST{constructor(e,i,s={}){super(e,i,tf(t,s))}static fromGlob(i,s={}){return e.AST.fromGlob(i,tf(t,s))}},unescape:(i,s={})=>e.unescape(i,tf(t,s)),escape:(i,s={})=>e.escape(i,tf(t,s)),filter:(i,s={})=>e.filter(i,tf(t,s)),defaults:i=>e.defaults(tf(t,i)),makeRe:(i,s={})=>e.makeRe(i,tf(t,s)),braceExpand:(i,s={})=>e.braceExpand(i,tf(t,s)),match:(i,s,r={})=>e.match(i,s,tf(t,r)),sep:e.sep,GLOBSTAR:tc})};var tp=(t,e={})=>(M(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:function(t,e={}){if(!t)return[];let{max:i=1e5}=e;return"{}"===t.slice(0,2)&&(t="\\{\\}"+t.slice(2)),(function t(e,i,s){let r=[],n=u("{","}",e);if(!n)return[e];let a=n.pre,o=n.post.length?t(n.post,i,!1):[""];if(/\$$/.test(n.pre))for(let t=0;t<o.length&&t<i;t++){let e=a+"{"+n.body+"}"+o[t];r.push(e)}else{let l,h,d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),f=d||c,p=n.body.indexOf(",")>=0;if(!f&&!p)return n.post.match(/,(?!,).*\}/)?t(e=n.pre+"{"+n.body+g+n.post,i,!0):[e];if(f)l=n.body.split(/\.\./);else if(1===(l=function t(e){if(!e)return[""];let i=[],s=u("{","}",e);if(!s)return e.split(",");let{pre:r,body:n,post:a}=s,o=r.split(",");o[o.length-1]+="{"+n+"}";let l=t(a);return a.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),i.push.apply(i,o),i}(n.body)).length&&void 0!==l[0]&&1===(l=t(l[0],i,!1).map(R)).length)return o.map(t=>n.pre+l[0]+t);if(f&&void 0!==l[0]&&void 0!==l[1]){let t=A(l[0]),e=A(l[1]),i=Math.max(l[0].length,l[1].length),s=3===l.length&&void 0!==l[2]?Math.abs(A(l[2])):1,r=D;e<t&&(s*=-1,r=_);let n=l.some(F);h=[];for(let a=t;r(a,e);a+=s){let t;if(c)"\\"===(t=String.fromCharCode(a))&&(t="");else if(t=String(a),n){let e=i-t.length;if(e>0){let i=Array(e+1).join("0");t=a<0?"-"+i+t.slice(1):i+t}}h.push(t)}}else{h=[];for(let e=0;e<l.length;e++)h.push.apply(h,t(l[e],i,!1))}for(let t=0;t<h.length;t++)for(let e=0;e<o.length&&r.length<i;e++){let i=a+h[t]+o[e];(!s||f||i)&&r.push(i)}}return r})(t.replace(x,p).replace(E,m).replace(C,g).replace(O,w).replace(j,y),i,!0).map(T)}(t,{max:e.braceExpandMax}));Z.braceExpand=tp,Z.makeRe=(t,e={})=>new tg(t,e).makeRe(),Z.match=(t,e,i={})=>{let s=new tg(e,i);return t=t.filter(t=>s.match(t)),s.options.nonull&&!t.length&&t.push(e),t};var tm=/[?*]|[+@!]\(.*?\)|\[|\]/,tg=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){M(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||tu,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if("string"!=typeof e)return!0;return!1}debug(){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0)){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(t=>this.slashSplit(t));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t,e,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){let e=""===t[0]&&""===t[1]&&("?"===t[2]||!tm.test(t[2]))&&!tm.test(t[3]),i=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map(t=>this.parse(t))];if(i)return[t[0],...t.slice(1).map(t=>this.parse(t))]}return t.map(t=>this.parse(t))});if(this.debug(this.pattern,s),this.set=s.filter(t=>-1===t.indexOf(!1)),this.isWindows)for(let t=0;t<this.set.length;t++){let e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let i=0;i<t[e].length;i++)"**"===t[e][i]&&(t[e][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let i=e;for(;"**"===t[i+1];)i++;i!==e&&t.splice(e,i-e)}return t})}levelOneOptimize(t){return t.map(t=>0===(t=t.reduce((t,e)=>{let i=t[t.length-1];return"**"===e&&"**"===i||(".."===e&&i&&".."!==i&&"."!==i&&"**"!==i?t.pop():t.push(e)),t},[])).length?[""]:t)}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];1===i&&""===s&&""===t[0]||("."===s||""===s)&&(e=!0,t.splice(i,1),i--)}"."===t[0]&&2===t.length&&("."===t[1]||""===t[1])&&(e=!0,t.pop())}let i=0;for(;-1!==(i=t.indexOf("..",i+1));){let s=t[i-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(i-1,2),i-=2)}}while(e)return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do for(let i of(e=!1,t)){let s=-1;for(;-1!==(s=i.indexOf("**",s+1));){let r=s;for(;"**"===i[r+1];)r++;r>s&&i.splice(s+1,r-s);let n=i[s+1],a=i[s+2],o=i[s+3];if(".."!==n||!a||"."===a||".."===a||!o||"."===o||".."===o)continue;e=!0,i.splice(s,1);let l=i.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<i.length-1;t++){let s=i[t];1===t&&""===s&&""===i[0]||("."===s||""===s)&&(e=!0,i.splice(t,1),t--)}"."===i[0]&&2===i.length&&("."===i[1]||""===i[1])&&(e=!0,i.pop())}let r=0;for(;-1!==(r=i.indexOf("..",r+1));){let t=i[r-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;let t=1===r&&"**"===i[r+1]?["."]:[];i.splice(r-1,2,...t),0===i.length&&i.push(""),r-=2}}}while(e)return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let i=e+1;i<t.length;i++){let s=this.partsMatch(t[e],t[i],!this.preserveMultipleSlashes);if(s){t[e]=[],t[i]=s;break}}return t.filter(t=>t.length)}partsMatch(t,e,i=!1){let s=0,r=0,n=[],a="";for(;s<t.length&&r<e.length;)if(t[s]===e[r])n.push("b"===a?e[r]:t[s]),s++,r++;else if(i&&"**"===t[s]&&e[r]===t[s+1])n.push(t[s]),s++;else if(i&&"**"===e[r]&&t[s]===e[r+1])n.push(e[r]),r++;else if("*"===t[s]&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&"**"!==e[r]){if("b"===a)return!1;a="a",n.push(t[s]),s++,r++}else{if("*"!==e[r]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s]||"a"===a)return!1;a="b",n.push(e[r]),s++,r++}return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,i=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,i++;i&&(this.pattern=t.slice(i)),this.negate=e}matchOne(t,e,i=!1){let s=this.options;if(this.isWindows){let i="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!i&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),r="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),n=!r&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3]),a=s?3:i?0:void 0,o=n?3:r?0:void 0;if("number"==typeof a&&"number"==typeof o){let[i,s]=[t[a],e[o]];i.toLowerCase()===s.toLowerCase()&&(e[o]=i,o>a?e=e.slice(o):a>o&&(t=t.slice(a)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,a=0,o=t.length,l=e.length;n<o&&a<l;n++,a++){let r;this.debug("matchOne loop");var h=e[a],d=t[n];if(this.debug(e,h,d),!1===h)return!1;if(h===tc){this.debug("GLOBSTAR",[e,h,d]);var u=n,c=a+1;if(c===l){for(this.debug("** at the end");n<o;n++)if("."===t[n]||".."===t[n]||!s.dot&&"."===t[n].charAt(0))return!1;return!0}for(;u<o;){var f=t[u];if(this.debug(`
|
|
2
|
+
globstar while`,t,u,e,c,f),this.matchOne(t.slice(u),e.slice(c),i))return this.debug("globstar found match!",u,o,f),!0;if("."===f||".."===f||!s.dot&&"."===f.charAt(0)){this.debug("dot detected!",t,u,e,c);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(i&&(this.debug(`
|
|
3
|
+
>>> no match, partial?`,t,u,e,c),u===o))}if("string"==typeof h?(r=d===h,this.debug("string match",h,d,r)):(r=h.test(d),this.debug("pattern match",h,d,r)),!r)return!1}if(n===o&&a===l)return!0;if(n===o)return i;if(a===l)return n===o-1&&""===t[n];throw Error("wtf?")}braceExpand(){return tp(this.pattern,this.options)}parse(t){M(t);let e=this.options;if("**"===t)return tc;if(""===t)return"";let i,s=null;(i=t.match(tn))?s=e.dot?to:ta:(i=t.match(Q))?s=(e.nocase?e.dot?t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)):t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)):e.dot?t=>e=>e.endsWith(t):t=>e=>!e.startsWith(".")&&e.endsWith(t))(i[1]):(i=t.match(tl))?s=(e.nocase?e.dot?([t,e=""])=>{let i=td([t]);return e?(e=e.toLowerCase(),t=>i(t)&&t.toLowerCase().endsWith(e)):i}:([t,e=""])=>{let i=th([t]);return e?(e=e.toLowerCase(),t=>i(t)&&t.toLowerCase().endsWith(e)):i}:e.dot?([t,e=""])=>{let i=td([t]);return e?t=>i(t)&&t.endsWith(e):i}:([t,e=""])=>{let i=th([t]);return e?t=>i(t)&&t.endsWith(e):i})(i):(i=t.match(tt))?s=e.dot?ti:te:(i=t.match(ts))&&(s=tr);let r=V.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof r&&Reflect.defineProperty(r,"test",{value:s}),r}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,i=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]),r=t.map(t=>{let e=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(""))s.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===tc?tc:t._src});e.forEach((t,s)=>{let r=e[s+1],n=e[s-1];t!==tc||n===tc||(void 0===n?void 0!==r&&r!==tc?e[s+1]="(?:\\/|"+i+"\\/)?"+r:e[s]=i:void 0===r?e[s-1]=n+"(?:\\/|\\/"+i+")?":r!==tc&&(e[s-1]=n+"(?:\\/|\\/"+i+"\\/)"+r,e[s+1]=tc))});let r=e.filter(t=>t!==tc);if(this.partial&&r.length>=1){let t=[];for(let e=1;e<=r.length;e++)t.push(r.slice(0,e).join("/"));return"(?:"+t.join("|")+")"}return r.join("/")}).join("|"),[n,a]=t.length>1?["(?:",")"]:["",""];r="^"+n+r+a+"$",this.partial&&(r="^(?:\\/|"+n+r.slice(1,-1)+a+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let s=this.slashSplit(t);this.debug(this.pattern,"split",s);let r=this.set;this.debug(this.pattern,"set",r);let n=s[s.length-1];if(!n)for(let t=s.length-2;!n&&t>=0;t--)n=s[t];for(let t=0;t<r.length;t++){let a=r[t],o=s;if(i.matchBase&&1===a.length&&(o=[n]),this.matchOne(o,a,e))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(t){return Z.defaults(t).Minimatch}};Z.AST=V,Z.Minimatch=tg,Z.escape=K,Z.unescape=L;var tw="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,ty=new Set,tb="object"==typeof process&&process?process:{},tv=(t,e,i,s)=>{"function"==typeof tb.emitWarning?tb.emitWarning(t,e,i,s):console.error(`[${i}] ${e}: ${t}`)},tS=globalThis.AbortController,tk=globalThis.AbortSignal;if(typeof tS>"u"){tk=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},tS=class{constructor(){e()}signal=new tk;abort(t){if(!this.signal.aborted){for(let e of(this.signal.reason=t,this.signal.aborted=!0,this.signal._onabort))e(t);this.signal.onabort?.(t)}}};let t=tb.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,tv("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var t$=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),tx=t=>t$(t)?t<=256?Uint8Array:t<=65536?Uint16Array:t<=0x100000000?Uint32Array:t<=Number.MAX_SAFE_INTEGER?tE:null:null,tE=class extends Array{constructor(t){super(t),this.fill(0)}},tC=class t{heap;length;static #t=!1;static create(e){let i=tx(e);if(!i)return[];t.#t=!0;let s=new t(e,i);return t.#t=!1,s}constructor(e,i){if(!t.#t)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},tO=class t{#t;#e;#i;#s;#r;#n;#a;#o;get perf(){return this.#o}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#l;#h;#d;#u;#c;#p;#f;#m;#g;#w;#y;#b;#v;#S;#k;#$;#x;#E;#C;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#S,autopurgeTimers:t.#k,sizes:t.#b,keyMap:t.#d,keyList:t.#u,valList:t.#c,next:t.#p,prev:t.#f,get head(){return t.#m},get tail(){return t.#g},free:t.#w,isBackgroundFetch:e=>t.#O(e),backgroundFetch:(e,i,s,r)=>t.#j(e,i,s,r),moveToTail:e=>t.#A(e),indexes:e=>t.#T(e),rindexes:e=>t.#R(e),isStale:e=>t.#F(e)}}get max(){return this.#t}get maxSize(){return this.#e}get calculatedSize(){return this.#h}get size(){return this.#l}get fetchMethod(){return this.#n}get memoMethod(){return this.#a}get dispose(){return this.#i}get onInsert(){return this.#s}get disposeAfter(){return this.#r}constructor(e){let{max:i=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:h,onInsert:d,disposeAfter:u,noDisposeOnSet:c,noUpdateTTL:f,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:g,fetchMethod:w,memoMethod:y,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:k,ignoreFetchAbort:$,perf:x}=e;if(void 0!==x&&"function"!=typeof x?.now)throw TypeError("perf option must have a now() method if specified");if(this.#o=x??tw,0!==i&&!t$(i))throw TypeError("max option must be a nonnegative integer");let E=i?tx(i):Array;if(!E)throw Error("invalid max value: "+i);if(this.#t=i,this.#e=p,this.maxEntrySize=m||this.#e,this.sizeCalculation=g,this.sizeCalculation){if(!this.#e&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw TypeError("sizeCalculation set to non-function")}if(void 0!==y&&"function"!=typeof y)throw TypeError("memoMethod must be a function if defined");if(this.#a=y,void 0!==w&&"function"!=typeof w)throw TypeError("fetchMethod must be a function if specified");if(this.#n=w,this.#x=!!w,this.#d=new Map,this.#u=Array(i).fill(void 0),this.#c=Array(i).fill(void 0),this.#p=new E(i),this.#f=new E(i),this.#m=0,this.#g=0,this.#w=tC.create(i),this.#l=0,this.#h=0,"function"==typeof h&&(this.#i=h),"function"==typeof d&&(this.#s=d),"function"==typeof u?(this.#r=u,this.#y=[]):(this.#r=void 0,this.#y=void 0),this.#$=!!this.#i,this.#C=!!this.#s,this.#E=!!this.#r,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!$,0!==this.maxEntrySize){if(0!==this.#e&&!t$(this.#e))throw TypeError("maxSize must be a positive integer if specified");if(!t$(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#D()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=t$(r)||0===r?r:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!t$(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#_()}if(0===this.#t&&0===this.ttl&&0===this.#e)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#e){let e="LRU_CACHE_UNBOUNDED";(t=>!ty.has(t))(e)&&(ty.add(e),tv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,t))}}getRemainingTTL(t){return this.#d.has(t)?1/0:0}#_(){let t=new tE(this.#t),e=new tE(this.#t);this.#S=t,this.#v=e;let i=this.ttlAutopurge?Array(this.#t):void 0;this.#k=i,this.#M=(s,r,n=this.#o.now())=>{if(e[s]=0!==r?n:0,t[s]=r,i?.[s]&&(clearTimeout(i[s]),i[s]=void 0),0!==r&&i){let t=setTimeout(()=>{this.#F(s)&&this.#N(this.#u[s],"expire")},r+1);t.unref&&t.unref(),i[s]=t}},this.#P=i=>{e[i]=0!==t[i]?this.#o.now():0},this.#W=(i,n)=>{if(t[n]){let a=t[n],o=e[n];if(!a||!o)return;i.ttl=a,i.start=o,i.now=s||r();let l=i.now-o;i.remainingTTL=a-l}};let s=0,r=()=>{let t=this.#o.now();if(this.ttlResolution>0){s=t;let e=setTimeout(()=>s=0,this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=i=>{let n=this.#d.get(i);if(void 0===n)return 0;let a=t[n],o=e[n];return a&&o?a-((s||r())-o):1/0},this.#F=i=>{let n=e[i],a=t[i];return!!a&&!!n&&(s||r())-n>a}}#P=()=>{};#W=()=>{};#M=()=>{};#F=()=>!1;#D(){let t=new tE(this.#t);this.#h=0,this.#b=t,this.#L=e=>{this.#h-=t[e],t[e]=0},this.#z=(t,e,i,s)=>{if(this.#O(e))return 0;if(!t$(i))if(s){if("function"!=typeof s)throw TypeError("sizeCalculation must be a function");if(!t$(i=s(e,t)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#I=(e,i,s)=>{if(t[e]=i,this.#e){let i=this.#e-t[e];for(;this.#h>i;)this.#U(!0)}this.#h+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#h)}}#L=t=>{};#I=(t,e,i)=>{};#z=(t,e,i,s)=>{if(i||s)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#T({allowStale:t=this.allowStale}={}){if(this.#l)for(let e=this.#g;!(!this.#B(e)||((t||!this.#F(e))&&(yield e),e===this.#m));)e=this.#f[e]}*#R({allowStale:t=this.allowStale}={}){if(this.#l)for(let e=this.#m;!(!this.#B(e)||((t||!this.#F(e))&&(yield e),e===this.#g));)e=this.#p[e]}#B(t){return void 0!==t&&this.#d.get(this.#u[t])===t}*entries(){for(let t of this.#T())void 0===this.#c[t]||void 0===this.#u[t]||this.#O(this.#c[t])||(yield[this.#u[t],this.#c[t]])}*rentries(){for(let t of this.#R())void 0===this.#c[t]||void 0===this.#u[t]||this.#O(this.#c[t])||(yield[this.#u[t],this.#c[t]])}*keys(){for(let t of this.#T()){let e=this.#u[t];void 0===e||this.#O(this.#c[t])||(yield e)}}*rkeys(){for(let t of this.#R()){let e=this.#u[t];void 0===e||this.#O(this.#c[t])||(yield e)}}*values(){for(let t of this.#T())void 0===this.#c[t]||this.#O(this.#c[t])||(yield this.#c[t])}*rvalues(){for(let t of this.#R())void 0===this.#c[t]||this.#O(this.#c[t])||(yield this.#c[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#T()){let s=this.#c[i],r=this.#O(s)?s.__staleWhileFetching:s;if(void 0!==r&&t(r,this.#u[i],this))return this.get(this.#u[i],e)}}forEach(t,e=this){for(let i of this.#T()){let s=this.#c[i],r=this.#O(s)?s.__staleWhileFetching:s;void 0!==r&&t.call(e,r,this.#u[i],this)}}rforEach(t,e=this){for(let i of this.#R()){let s=this.#c[i],r=this.#O(s)?s.__staleWhileFetching:s;void 0!==r&&t.call(e,r,this.#u[i],this)}}purgeStale(){let t=!1;for(let e of this.#R({allowStale:!0}))this.#F(e)&&(this.#N(this.#u[e],"expire"),t=!0);return t}info(t){let e=this.#d.get(t);if(void 0===e)return;let i=this.#c[e],s=this.#O(i)?i.__staleWhileFetching:i;if(void 0===s)return;let r={value:s};if(this.#S&&this.#v){let t=this.#S[e],i=this.#v[e];t&&i&&(r.ttl=t-(this.#o.now()-i),r.start=Date.now())}return this.#b&&(r.size=this.#b[e]),r}dump(){let t=[];for(let e of this.#T({allowStale:!0})){let i=this.#u[e],s=this.#c[e],r=this.#O(s)?s.__staleWhileFetching:s;if(void 0===r||void 0===i)continue;let n={value:r};if(this.#S&&this.#v){n.ttl=this.#S[e];let t=this.#o.now()-this.#v[e];n.start=Math.floor(Date.now()-t)}this.#b&&(n.size=this.#b[e]),t.unshift([i,n])}return t}load(t){for(let[e,i]of(this.clear(),t)){if(i.start){let t=Date.now()-i.start;i.start=this.#o.now()-t}this.set(e,i.value,i)}}set(t,e,i={}){if(void 0===e)return this.delete(t),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:o}=i,{noUpdateTTL:l=this.noUpdateTTL}=i,h=this.#z(t,e,i.size||0,a);if(this.maxEntrySize&&h>this.maxEntrySize)return o&&(o.set="miss",o.maxEntrySizeExceeded=!0),this.#N(t,"set"),this;let d=0===this.#l?void 0:this.#d.get(t);if(void 0===d)d=0===this.#l?this.#g:0!==this.#w.length?this.#w.pop():this.#l===this.#t?this.#U(!1):this.#l,this.#u[d]=t,this.#c[d]=e,this.#d.set(t,d),this.#p[this.#g]=d,this.#f[d]=this.#g,this.#g=d,this.#l++,this.#I(d,h,o),o&&(o.set="add"),l=!1,this.#C&&this.#s?.(e,t,"add");else{this.#A(d);let i=this.#c[d];if(e!==i){if(this.#x&&this.#O(i)){i.__abortController.abort(Error("replaced"));let{__staleWhileFetching:e}=i;void 0!==e&&!n&&(this.#$&&this.#i?.(e,t,"set"),this.#E&&this.#y?.push([e,t,"set"]))}else n||(this.#$&&this.#i?.(i,t,"set"),this.#E&&this.#y?.push([i,t,"set"]));if(this.#L(d),this.#I(d,h,o),this.#c[d]=e,o){o.set="replace";let t=i&&this.#O(i)?i.__staleWhileFetching:i;void 0!==t&&(o.oldValue=t)}}else o&&(o.set="update");this.#C&&this.onInsert?.(e,t,e===i?"update":"replace")}if(0===s||this.#S||this.#_(),this.#S&&(l||this.#M(d,s,r),o&&this.#W(o,d)),!n&&this.#E&&this.#y){let t=this.#y,e;for(;e=t?.shift();)this.#r?.(...e)}return this}pop(){try{for(;this.#l;){let t=this.#c[this.#m];if(this.#U(!0),this.#O(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#E&&this.#y){let t=this.#y,e;for(;e=t?.shift();)this.#r?.(...e)}}}#U(t){let e=this.#m,i=this.#u[e],s=this.#c[e];return this.#x&&this.#O(s)?s.__abortController.abort(Error("evicted")):(this.#$||this.#E)&&(this.#$&&this.#i?.(s,i,"evict"),this.#E&&this.#y?.push([s,i,"evict"])),this.#L(e),this.#k?.[e]&&(clearTimeout(this.#k[e]),this.#k[e]=void 0),t&&(this.#u[e]=void 0,this.#c[e]=void 0,this.#w.push(e)),1===this.#l?(this.#m=this.#g=0,this.#w.length=0):this.#m=this.#p[e],this.#d.delete(i),this.#l--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#d.get(t);if(void 0!==r){let t=this.#c[r];if(this.#O(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#F(r))return i&&this.#P(r),s&&(s.has="hit",this.#W(s,r)),!0;s&&(s.has="stale",this.#W(s,r))}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#d.get(t);if(void 0===s||!i&&this.#F(s))return;let r=this.#c[s];return this.#O(r)?r.__staleWhileFetching:r}#j(t,e,i,s){let r=void 0===e?void 0:this.#c[e];if(this.#O(r))return r;let n=new tS,{signal:a}=i;a?.addEventListener("abort",()=>n.abort(a.reason),{signal:n.signal});let o={signal:n.signal,options:i,context:s},l=(s,r=!1)=>{let{aborted:a}=n.signal,l=i.ignoreFetchAbort&&void 0!==s,d=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&void 0!==s);if(i.status&&(a&&!r?(i.status.fetchAborted=!0,i.status.fetchError=n.signal.reason,l&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),a&&!l&&!r)return h(n.signal.reason,d);let c=this.#c[e];return(c===u||l&&r&&void 0===c)&&(void 0===s?void 0!==u.__staleWhileFetching?this.#c[e]=u.__staleWhileFetching:this.#N(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,s,o.options))),s},h=(s,r)=>{let{aborted:a}=n.signal,o=a&&i.allowStaleOnFetchAbort,l=o||i.allowStaleOnFetchRejection,h=l||i.noDeleteOnFetchRejection;if(this.#c[e]===u&&(h&&(r||void 0!==u.__staleWhileFetching)?o||(this.#c[e]=u.__staleWhileFetching):this.#N(t,"fetch")),l)return i.status&&void 0!==u.__staleWhileFetching&&(i.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw s},d=(e,s)=>{let a=this.#n?.(t,r,o);a&&a instanceof Promise&&a.then(t=>e(void 0===t?void 0:t),s),n.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(e(void 0),i.allowStaleOnFetchAbort&&(e=t=>l(t,!0)))})};i.status&&(i.status.fetchDispatched=!0);let u=new Promise(d).then(l,t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),h(t,!1))),c=Object.assign(u,{__abortController:n,__staleWhileFetching:r,__returned:void 0});return void 0===e?(this.set(t,c,{...o.options,status:void 0}),e=this.#d.get(t)):this.#c[e]=c,c}#O(t){return!!this.#x&&!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof tS}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:o=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,context:p,forceRefresh:m=!1,status:g,signal:w}=e;if(!this.#x)return g&&(g.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:g});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:a,size:o,sizeCalculation:l,noUpdateTTL:h,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:f,ignoreFetchAbort:c,status:g,signal:w},b=this.#d.get(t);if(void 0===b){g&&(g.fetch="miss");let e=this.#j(t,b,y,p);return e.__returned=e}{let e=this.#c[b];if(this.#O(e)){let t=i&&void 0!==e.__staleWhileFetching;return g&&(g.fetch="inflight",t&&(g.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}let r=this.#F(b);if(!m&&!r)return g&&(g.fetch="hit"),this.#A(b),s&&this.#P(b),g&&this.#W(g,b),e;let n=this.#j(t,b,y,p),a=void 0!==n.__staleWhileFetching&&i;return g&&(g.fetch=r?"stale":"refresh",a&&r&&(g.returnedStale=!0)),a?n.__staleWhileFetching:n.__returned=n}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(void 0===i)throw Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#a;if(!i)throw Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...n}=e,a=this.get(t,n);if(!r&&void 0!==a)return a;let o=i(t,a,{options:n,context:s});return this.set(t,o,n),o}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e,a=this.#d.get(t);if(void 0!==a){let e=this.#c[a],o=this.#O(e);return n&&this.#W(n,a),this.#F(a)?(n&&(n.get="stale"),o?(n&&i&&void 0!==e.__staleWhileFetching&&(n.returnedStale=!0),i?e.__staleWhileFetching:void 0):(r||this.#N(t,"expire"),n&&i&&(n.returnedStale=!0),i?e:void 0)):(n&&(n.get="hit"),o?e.__staleWhileFetching:(this.#A(a),s&&this.#P(a),e))}n&&(n.get="miss")}#G(t,e){this.#f[e]=t,this.#p[t]=e}#A(t){t!==this.#g&&(t===this.#m?this.#m=this.#p[t]:this.#G(this.#f[t],this.#p[t]),this.#G(this.#g,t),this.#g=t)}delete(t){return this.#N(t,"delete")}#N(t,e){let i=!1;if(0!==this.#l){let s=this.#d.get(t);if(void 0!==s)if(this.#k?.[s]&&(clearTimeout(this.#k?.[s]),this.#k[s]=void 0),i=!0,1===this.#l)this.#q(e);else{this.#L(s);let i=this.#c[s];if(this.#O(i)?i.__abortController.abort(Error("deleted")):(this.#$||this.#E)&&(this.#$&&this.#i?.(i,t,e),this.#E&&this.#y?.push([i,t,e])),this.#d.delete(t),this.#u[s]=void 0,this.#c[s]=void 0,s===this.#g)this.#g=this.#f[s];else if(s===this.#m)this.#m=this.#p[s];else{let t=this.#f[s];this.#p[t]=this.#p[s];let e=this.#p[s];this.#f[e]=this.#f[s]}this.#l--,this.#w.push(s)}}if(this.#E&&this.#y?.length){let t=this.#y,e;for(;e=t?.shift();)this.#r?.(...e)}return i}clear(){return this.#q("delete")}#q(t){for(let e of this.#R({allowStale:!0})){let i=this.#c[e];if(this.#O(i))i.__abortController.abort(Error("deleted"));else{let s=this.#u[e];this.#$&&this.#i?.(i,s,t),this.#E&&this.#y?.push([i,s,t])}}if(this.#d.clear(),this.#c.fill(void 0),this.#u.fill(void 0),this.#S&&this.#v){for(let t of(this.#S.fill(0),this.#v.fill(0),this.#k??[]))void 0!==t&&clearTimeout(t);this.#k?.fill(void 0)}if(this.#b&&this.#b.fill(0),this.#m=0,this.#g=0,this.#w.length=0,this.#h=0,this.#l=0,this.#E&&this.#y){let t=this.#y,e;for(;e=t?.shift();)this.#r?.(...e)}}},tj="object"==typeof process&&process?process:{stdout:null,stderr:null},tA=t=>!!t&&"object"==typeof t&&(t instanceof es||t instanceof h.default||tT(t)||tR(t)),tT=t=>!!t&&"object"==typeof t&&t instanceof l.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==h.default.Writable.prototype.pipe,tR=t=>!!t&&"object"==typeof t&&t instanceof l.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end,tF=Symbol("EOF"),tD=Symbol("maybeEmitEnd"),t_=Symbol("emittedEnd"),tM=Symbol("emittingEnd"),tN=Symbol("emittedError"),tP=Symbol("closed"),tW=Symbol("read"),tL=Symbol("flush"),tz=Symbol("flushChunk"),tI=Symbol("encoding"),tU=Symbol("decoder"),tB=Symbol("flowing"),tG=Symbol("paused"),tq=Symbol("resume"),tY=Symbol("buffer"),tJ=Symbol("pipes"),tH=Symbol("bufferLength"),tX=Symbol("bufferPush"),tV=Symbol("bufferShift"),tK=Symbol("objectMode"),tZ=Symbol("destroyed"),tQ=Symbol("error"),t0=Symbol("emitData"),t1=Symbol("emitEnd"),t2=Symbol("emitEnd2"),t8=Symbol("async"),t3=Symbol("abort"),t4=Symbol("aborted"),t6=Symbol("signal"),t5=Symbol("dataListeners"),t7=Symbol("discarded"),t9=t=>Promise.resolve().then(t),et=t=>t(),ee=class{src;dest;opts;ondrain;constructor(t,e,i){this.src=t,this.dest=e,this.opts=i,this.ondrain=()=>t[tq](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ei=class extends ee{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,i){super(t,e,i),this.proxyErrors=t=>this.dest.emit("error",t),t.on("error",this.proxyErrors)}},es=class extends l.EventEmitter{[tB]=!1;[tG]=!1;[tJ]=[];[tY]=[];[tK];[tI];[t8];[tU];[tF]=!1;[t_]=!1;[tM]=!1;[tP]=!1;[tN]=null;[tH]=0;[tZ]=!1;[t6];[t4]=!1;[t5]=0;[t7]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw TypeError("Encoding and objectMode may not be used together");(t=>!!t.objectMode)(e)?(this[tK]=!0,this[tI]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[tI]=e.encoding,this[tK]=!1):(this[tK]=!1,this[tI]=null),this[t8]=!!e.async,this[tU]=this[tI]?new d.StringDecoder(this[tI]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[tY]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[tJ]});let{signal:i}=e;i&&(this[t6]=i,i.aborted?this[t3]():i.addEventListener("abort",()=>this[t3]()))}get bufferLength(){return this[tH]}get encoding(){return this[tI]}set encoding(t){throw Error("Encoding must be set at instantiation time")}setEncoding(t){throw Error("Encoding must be set at instantiation time")}get objectMode(){return this[tK]}set objectMode(t){throw Error("objectMode must be set at instantiation time")}get async(){return this[t8]}set async(t){this[t8]=this[t8]||!!t}[t3](){this[t4]=!0,this.emit("abort",this[t6]?.reason),this.destroy(this[t6]?.reason)}get aborted(){return this[t4]}set aborted(t){}write(t,e,i){if(this[t4])return!1;if(this[tF])throw Error("write after end");if(this[tZ])return this.emit("error",Object.assign(Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(i=e,e="utf8"),e||(e="utf8");let s=this[t8]?t9:et;if(!this[tK]&&!Buffer.isBuffer(t)){let e;if(e=t,!Buffer.isBuffer(e)&&ArrayBuffer.isView(e))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else{let e;if((e=t)instanceof ArrayBuffer||e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)t=Buffer.from(t);else if("string"!=typeof t)throw Error("Non-contiguous data written to non-objectMode stream")}}return this[tK]?(this[tB]&&0!==this[tH]&&this[tL](!0),this[tB]?this.emit("data",t):this[tX](t)):t.length&&("string"==typeof t&&(e!==this[tI]||this[tU]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[tI]&&(t=this[tU].write(t)),this[tB]&&0!==this[tH]&&this[tL](!0),this[tB]?this.emit("data",t):this[tX](t)),0!==this[tH]&&this.emit("readable"),i&&s(i),this[tB]}read(t){if(this[tZ])return null;if(this[t7]=!1,0===this[tH]||0===t||t&&t>this[tH])return this[tD](),null;this[tK]&&(t=null),this[tY].length>1&&!this[tK]&&(this[tY]=[this[tI]?this[tY].join(""):Buffer.concat(this[tY],this[tH])]);let e=this[tW](t||null,this[tY][0]);return this[tD](),e}[tW](t,e){if(this[tK])this[tV]();else{let i=e;t===i.length||null===t?this[tV]():("string"==typeof i?(this[tY][0]=i.slice(t),e=i.slice(0,t)):(this[tY][0]=i.subarray(t),e=i.subarray(0,t)),this[tH]-=t)}return this.emit("data",e),this[tY].length||this[tF]||this.emit("drain"),e}end(t,e,i){return"function"==typeof t&&(i=t,t=void 0),"function"==typeof e&&(i=e,e="utf8"),void 0!==t&&this.write(t,e),i&&this.once("end",i),this[tF]=!0,this.writable=!1,(this[tB]||!this[tG])&&this[tD](),this}[tq](){this[tZ]||(this[t5]||this[tJ].length||(this[t7]=!0),this[tG]=!1,this[tB]=!0,this.emit("resume"),this[tY].length?this[tL]():this[tF]?this[tD]():this.emit("drain"))}resume(){return this[tq]()}pause(){this[tB]=!1,this[tG]=!0,this[t7]=!1}get destroyed(){return this[tZ]}get flowing(){return this[tB]}get paused(){return this[tG]}[tX](t){this[tK]?this[tH]+=1:this[tH]+=t.length,this[tY].push(t)}[tV](){return this[tK]?this[tH]-=1:this[tH]-=this[tY][0].length,this[tY].shift()}[tL](t=!1){do;while(this[tz](this[tV]())&&this[tY].length)t||this[tY].length||this[tF]||this.emit("drain")}[tz](t){return this.emit("data",t),this[tB]}pipe(t,e){if(this[tZ])return t;this[t7]=!1;let i=this[t_];return e=e||{},t===tj.stdout||t===tj.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,i?e.end&&t.end():(this[tJ].push(e.proxyErrors?new ei(this,t,e):new ee(this,t,e)),this[t8]?t9(()=>this[tq]()):this[tq]()),t}unpipe(t){let e=this[tJ].find(e=>e.dest===t);e&&(1===this[tJ].length?(this[tB]&&0===this[t5]&&(this[tB]=!1),this[tJ]=[]):this[tJ].splice(this[tJ].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let i=super.on(t,e);if("data"===t)this[t7]=!1,this[t5]++,this[tJ].length||this[tB]||this[tq]();else if("readable"===t&&0!==this[tH])super.emit("readable");else("end"===t||"finish"===t||"prefinish"===t)&&this[t_]?(super.emit(t),this.removeAllListeners(t)):"error"===t&&this[tN]&&(this[t8]?t9(()=>e.call(this,this[tN])):e.call(this,this[tN]));return i}removeListener(t,e){return this.off(t,e)}off(t,e){let i=super.off(t,e);return"data"===t&&(this[t5]=this.listeners("data").length,0!==this[t5]||this[t7]||this[tJ].length||(this[tB]=!1)),i}removeAllListeners(t){let e=super.removeAllListeners(t);return("data"===t||void 0===t)&&(this[t5]=0,this[t7]||this[tJ].length||(this[tB]=!1)),e}get emittedEnd(){return this[t_]}[tD](){this[tM]||this[t_]||this[tZ]||0!==this[tY].length||!this[tF]||(this[tM]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[tP]&&this.emit("close"),this[tM]=!1)}emit(t,...e){let i=e[0];if("error"!==t&&"close"!==t&&t!==tZ&&this[tZ])return!1;if("data"===t)return(!!this[tK]||!!i)&&(this[t8]?(t9(()=>this[t0](i)),!0):this[t0](i));if("end"===t)return this[t1]();if("close"===t){if(this[tP]=!0,!this[t_]&&!this[tZ])return!1;let t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[tN]=i,super.emit(tQ,i);let t=(!this[t6]||!!this.listeners("error").length)&&super.emit("error",i);return this[tD](),t}if("resume"===t){let t=super.emit("resume");return this[tD](),t}if("finish"===t||"prefinish"===t){let e=super.emit(t);return this.removeAllListeners(t),e}let s=super.emit(t,...e);return this[tD](),s}[t0](t){for(let e of this[tJ])!1===e.dest.write(t)&&this.pause();let e=!this[t7]&&super.emit("data",t);return this[tD](),e}[t1](){return!this[t_]&&(this[t_]=!0,this.readable=!1,this[t8]?(t9(()=>this[t2]()),!0):this[t2]())}[t2](){if(this[tU]){let t=this[tU].end();if(t){for(let e of this[tJ])e.dest.write(t);this[t7]||super.emit("data",t)}}for(let t of this[tJ])t.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[tK]||(t.dataLength=0);let e=this.promise();return this.on("data",e=>{t.push(e),this[tK]||(t.dataLength+=e.length)}),await e,t}async concat(){if(this[tK])throw Error("cannot concat in objectMode");let t=await this.collect();return this[tI]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(tZ,()=>e(Error("stream destroyed"))),this.on("error",t=>e(t)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[t7]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(null!==i)return Promise.resolve({done:!1,value:i});if(this[tF])return e();let s,r,n=t=>{this.off("data",a),this.off("end",o),this.off(tZ,l),e(),r(t)},a=t=>{this.off("error",n),this.off("end",o),this.off(tZ,l),this.pause(),s({value:t,done:!!this[tF]})},o=()=>{this.off("error",n),this.off("data",a),this.off(tZ,l),e(),s({done:!0,value:void 0})},l=()=>n(Error("stream destroyed"));return new Promise((t,e)=>{r=e,s=t,this.once(tZ,l),this.once("error",n),this.once("end",o),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[t7]=!1;let t=!1,e=()=>(this.pause(),this.off(tQ,e),this.off(tZ,e),this.off("end",e),t=!0,{done:!0,value:void 0}),i=()=>{if(t)return e();let i=this.read();return null===i?e():{done:!1,value:i}};return this.once("end",e),this.once(tQ,e),this.once(tZ,e),{next:i,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){return this[tZ]||(this[tZ]=!0,this[t7]=!0,this[tY].length=0,this[tH]=0,"function"!=typeof this.close||this[tP]||this.close()),t?this.emit("error",t):this.emit(tZ),this}static get isStream(){return tA}},er=n.realpathSync.native,en={lstatSync:n.lstatSync,readdir:n.readdir,readdirSync:n.readdirSync,readlinkSync:n.readlinkSync,realpathSync:er,promises:{lstat:o.lstat,readdir:o.readdir,readlink:o.readlink,realpath:o.realpath}},ea=t=>t&&t!==en&&t!==a?{...en,...t,promises:{...en.promises,...t.promises||{}}}:en,eo=/^\\\\\?\\([a-z]:)\\?$/i,el=/[\\\/]/,eh=t=>t.isFile()?8:t.isDirectory()?4:t.isSymbolicLink()?10:t.isCharacterDevice()?2:t.isBlockDevice()?6:t.isSocket()?12:+!!t.isFIFO(),ed=new tO({max:4096}),eu=t=>{let e=ed.get(t);if(e)return e;let i=t.normalize("NFKD");return ed.set(t,i),i},ec=new tO({max:4096}),ef=t=>{let e=ec.get(t);if(e)return e;let i=eu(t.toLowerCase());return ec.set(t,i),i},ep=class extends tO{constructor(){super({max:256})}},em=class extends tO{constructor(t=16384){super({maxSize:t,sizeCalculation:t=>t.length+1})}},eg=Symbol("PathScurry setAsCwd"),ew=class{name;root;roots;parent;nocase;isCWD=!1;#t;#e;get dev(){return this.#e}#i;get mode(){return this.#i}#s;get nlink(){return this.#s}#r;get uid(){return this.#r}#n;get gid(){return this.#n}#a;get rdev(){return this.#a}#o;get blksize(){return this.#o}#l;get ino(){return this.#l}#h;get size(){return this.#h}#d;get blocks(){return this.#d}#u;get atimeMs(){return this.#u}#c;get mtimeMs(){return this.#c}#p;get ctimeMs(){return this.#p}#f;get birthtimeMs(){return this.#f}#m;get atime(){return this.#m}#g;get mtime(){return this.#g}#w;get ctime(){return this.#w}#y;get birthtime(){return this.#y}#b;#v;#S;#k;#$;#x;#E;#C;#_;#P;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=0,i,s,r,n,a){this.name=t,this.#b=r?ef(t):eu(t),this.#E=1023&e,this.nocase=r,this.roots=s,this.root=i||this,this.#C=n,this.#S=a.fullpath,this.#$=a.relative,this.#x=a.relativePosix,this.parent=a.parent,this.parent?this.#t=this.parent.#t:this.#t=ea(a.fs)}depth(){return void 0!==this.#v?this.#v:this.parent?this.#v=this.parent.depth()+1:this.#v=0}childrenCache(){return this.#C}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#W(i):this.#W(i)}#W(t){let e=this;for(let i of t)e=e.child(i);return e}children(){let t=this.#C.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#C.set(this,e),this.#E&=-17,e}child(t,e){if(""===t||"."===t)return this;if(".."===t)return this.parent||this;let i=this.children(),s=this.nocase?ef(t):eu(t);for(let t of i)if(t.#b===s)return t;let r=this.parent?this.sep:"",n=this.#S?this.#S+r+t:void 0,a=this.newChild(t,0,{...e,parent:this,fullpath:n});return this.canReaddir()||(a.#E|=128),i.push(a),a}relative(){if(this.isCWD)return"";if(void 0!==this.#$)return this.#$;let t=this.name,e=this.parent;if(!e)return this.#$=this.name;let i=e.relative();return i+(i&&e.parent?this.sep:"")+t}relativePosix(){if("/"===this.sep)return this.relative();if(this.isCWD)return"";if(void 0!==this.#x)return this.#x;let t=this.name,e=this.parent;if(!e)return this.#x=this.fullpathPosix();let i=e.relativePosix();return i+(i&&e.parent?"/":"")+t}fullpath(){if(void 0!==this.#S)return this.#S;let t=this.name,e=this.parent;if(!e)return this.#S=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#S=i}fullpathPosix(){if(void 0!==this.#k)return this.#k;if("/"===this.sep)return this.#k=this.fullpath();if(!this.parent){let t=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(t)?this.#k=`//?/${t}`:this.#k=t}let t=this.parent,e=t.fullpathPosix(),i=e+(e&&t.parent?"/":"")+this.name;return this.#k=i}isUnknown(){return(15&this.#E)==0}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(15&this.#E)==8}isDirectory(){return(15&this.#E)==4}isCharacterDevice(){return(15&this.#E)==2}isBlockDevice(){return(15&this.#E)==6}isFIFO(){return(15&this.#E)==1}isSocket(){return(15&this.#E)==12}isSymbolicLink(){return(10&this.#E)==10}lstatCached(){return 32&this.#E?this:void 0}readlinkCached(){return this.#_}realpathCached(){return this.#P}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#_)return!0;if(!this.parent)return!1;let t=15&this.#E;return!(0!==t&&10!==t||256&this.#E||128&this.#E)}calledReaddir(){return!!(16&this.#E)}isENOENT(){return!!(128&this.#E)}isNamed(t){return this.nocase?this.#b===ef(t):this.#b===eu(t)}async readlink(){let t=this.#_;if(t)return t;if(this.canReadlink()&&this.parent)try{let t=await this.#t.promises.readlink(this.fullpath()),e=(await this.parent.realpath())?.resolve(t);if(e)return this.#_=e}catch(t){this.#R(t.code);return}}readlinkSync(){let t=this.#_;if(t)return t;if(this.canReadlink()&&this.parent)try{let t=this.#t.readlinkSync(this.fullpath()),e=this.parent.realpathSync()?.resolve(t);if(e)return this.#_=e}catch(t){this.#R(t.code);return}}#M(t){this.#E|=16;for(let e=t.provisional;e<t.length;e++){let i=t[e];i&&i.#F()}}#F(){128&this.#E||(this.#E=(128|this.#E)&-16,this.#D())}#D(){let t=this.children();for(let e of(t.provisional=0,t))e.#F()}#L(){this.#E|=512,this.#I()}#I(){if(64&this.#E)return;let t=this.#E;(15&t)==4&&(t&=-16),this.#E=64|t,this.#D()}#z(t=""){"ENOTDIR"===t||"EPERM"===t?this.#I():"ENOENT"===t?this.#F():this.children().provisional=0}#T(t=""){"ENOTDIR"===t?this.parent.#I():"ENOENT"===t&&this.#F()}#R(t=""){let e=this.#E;e|=256,"ENOENT"===t&&(e|=128),("EINVAL"===t||"UNKNOWN"===t)&&(e&=-16),this.#E=e,"ENOTDIR"===t&&this.parent&&this.parent.#I()}#B(t,e){return this.#j(t,e)||this.#U(t,e)}#U(t,e){let i=eh(t),s=this.newChild(t.name,i,{parent:this}),r=15&s.#E;return 4!==r&&10!==r&&0!==r&&(s.#E|=64),e.unshift(s),e.provisional++,s}#j(t,e){for(let i=e.provisional;i<e.length;i++){let s=e[i];if((this.nocase?ef(t.name):eu(t.name))===s.#b)return this.#O(t,s,i,e)}}#O(t,e,i,s){let r=e.name;return e.#E=-16&e.#E|eh(t),r!==t.name&&(e.name=t.name),i!==s.provisional&&(i===s.length-1?s.pop():s.splice(i,1),s.unshift(e)),s.provisional++,e}async lstat(){if((128&this.#E)==0)try{return this.#G(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#T(t.code)}}lstatSync(){if((128&this.#E)==0)try{return this.#G(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#T(t.code)}}#G(t){let{atime:e,atimeMs:i,birthtime:s,birthtimeMs:r,blksize:n,blocks:a,ctime:o,ctimeMs:l,dev:h,gid:d,ino:u,mode:c,mtime:f,mtimeMs:p,nlink:m,rdev:g,size:w,uid:y}=t;this.#m=e,this.#u=i,this.#y=s,this.#f=r,this.#o=n,this.#d=a,this.#w=o,this.#p=l,this.#e=h,this.#n=d,this.#l=u,this.#i=c,this.#g=f,this.#c=p,this.#s=m,this.#a=g,this.#h=w,this.#r=y;let b=eh(t);this.#E=-16&this.#E|b|32,0!==b&&4!==b&&10!==b&&(this.#E|=64)}#A=[];#N=!1;#q(t){this.#N=!1;let e=this.#A.slice();this.#A.length=0,e.forEach(e=>e(null,t))}readdirCB(t,e=!1){if(!this.canReaddir())return void(e?t(null,[]):queueMicrotask(()=>t(null,[])));let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);e?t(null,s):queueMicrotask(()=>t(null,s));return}if(this.#A.push(t),this.#N)return;this.#N=!0;let s=this.fullpath();this.#t.readdir(s,{withFileTypes:!0},(t,e)=>{if(t)this.#z(t.code),i.provisional=0;else{for(let t of e)this.#B(t,i);this.#M(i)}this.#q(i.slice(0,i.provisional))})}#Y;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#Y)await this.#Y;else{let i=()=>{};this.#Y=new Promise(t=>i=t);try{for(let i of(await this.#t.promises.readdir(e,{withFileTypes:!0})))this.#B(i,t);this.#M(t)}catch(e){this.#z(e.code),t.provisional=0}this.#Y=void 0,i()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let i of this.#t.readdirSync(e,{withFileTypes:!0}))this.#B(i,t);this.#M(t)}catch(e){this.#z(e.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(704&this.#E)return!1;let t=15&this.#E;return 0===t||4===t||10===t}shouldWalk(t,e){return(4&this.#E)==4&&!(704&this.#E)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#P)return this.#P;if(!(896&this.#E))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#P=this.resolve(t)}catch{this.#L()}}realpathSync(){if(this.#P)return this.#P;if(!(896&this.#E))try{let t=this.#t.realpathSync(this.fullpath());return this.#P=this.resolve(t)}catch{this.#L()}}[eg](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),i=[],s=this;for(;s&&s.parent;)e.add(s),s.#$=i.join(this.sep),s.#x=i.join("/"),s=s.parent,i.push("..");for(s=t;s&&s.parent&&!e.has(s);)s.#$=void 0,s.#x=void 0,s=s.parent}},ey=class t extends ew{sep="\\";splitSep=el;constructor(t,e=0,i,s,r,n,a){super(t,e,i,s,r,n,a)}newChild(e,i=0,s={}){return new t(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return r.win32.parse(t).root}getRoot(t){if((t=t.toUpperCase().replace(/\//g,"\\").replace(eo,"$1\\"))===this.root.name)return this.root;for(let[e,i]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=i;return this.roots[t]=new eS(t,this).root}sameRoot(t,e=this.root.name){return(t=t.toUpperCase().replace(/\//g,"\\").replace(eo,"$1\\"))===e}},eb=class t extends ew{splitSep="/";sep="/";constructor(t,e=0,i,s,r,n,a){super(t,e,i,s,r,n,a)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(e,i=0,s={}){return new t(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}},ev=class{root;rootPath;roots;cwd;#t;#e;#i;nocase;#s;constructor(t=process.cwd(),e,i,{nocase:r,childrenCacheSize:n=16384,fs:a=en}={}){this.#s=ea(a),(t instanceof URL||t.startsWith("file://"))&&(t=(0,s.fileURLToPath)(t));let o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#t=new ep,this.#e=new ep,this.#i=new em(n);let l=o.substring(this.rootPath.length).split(i);if(1!==l.length||l[0]||l.pop(),void 0===r)throw TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=r,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let h=this.root,d=l.length-1,u=e.sep,c=this.rootPath,f=!1;for(let t of l){let e=d--;h=h.child(t,{relative:Array(e).fill("..").join(u),relativePosix:Array(e).fill("..").join("/"),fullpath:c+=(f?"":u)+t}),f=!0}this.cwd=h}depth(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#i}resolve(...t){let e="";for(let i=t.length-1;i>=0;i--){let s=t[i];if(!(!s||"."===s)&&(e=e?`${s}/${e}`:s,this.isAbsolute(s)))break}let i=this.#t.get(e);if(void 0!==i)return i;let s=this.cwd.resolve(e).fullpath();return this.#t.set(e,s),s}resolvePosix(...t){let e="";for(let i=t.length-1;i>=0;i--){let s=t[i];if(!(!s||"."===s)&&(e=e?`${s}/${e}`:s,this.isAbsolute(s)))break}let i=this.#e.get(e);if(void 0!==i)return i;let s=this.cwd.resolve(e).fullpathPosix();return this.#e.set(e,s),s}relative(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i}=e;if(!t.canReaddir())return[];{let e=await t.readdir();return i?e:e.map(t=>t.name)}}readdirSync(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0}=e;return t.canReaddir()?i?t.readdirSync():t.readdirSync().map(t=>t.name):[]}async lstat(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t.withFileTypes,t=this.cwd);let i=await t.readlink();return e?i:i?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t.withFileTypes,t=this.cwd);let i=t.readlinkSync();return e?i:i?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t.withFileTypes,t=this.cwd);let i=await t.realpath();return e?i:i?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t.withFileTypes,t=this.cwd);let i=t.realpathSync();return e?i:i?.fullpath()}async walk(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,a=[];(!r||r(t))&&a.push(i?t:t.fullpath());let o=new Set,l=(t,e)=>{o.add(t),t.readdirCB((t,h)=>{if(t)return e(t);let d=h.length;if(!d)return e();let u=()=>{0==--d&&e()};for(let t of h)(!r||r(t))&&a.push(i?t:t.fullpath()),s&&t.isSymbolicLink()?t.realpath().then(t=>t?.isUnknown()?t.lstat():t).then(t=>t?.shouldWalk(o,n)?l(t,u):u()):t.shouldWalk(o,n)?l(t,u):u()},!0)},h=t;return new Promise((t,e)=>{l(h,i=>{if(i)return e(i);t(a)})})}walkSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,a=[];(!r||r(t))&&a.push(i?t:t.fullpath());let o=new Set([t]);for(let t of o)for(let e of t.readdirSync()){(!r||r(e))&&a.push(i?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(s&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,n)&&o.add(t)}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e;(!r||r(t))&&(yield i?t:t.fullpath());let a=new Set([t]);for(let t of a)for(let e of t.readdirSync()){(!r||r(e))&&(yield i?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(s&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(a,n)&&a.add(t)}}stream(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,a=new es({objectMode:!0});(!r||r(t))&&a.write(i?t:t.fullpath());let o=new Set,l=[t],h=0,d=()=>{let t=!1;for(;!t;){let e=l.shift();if(!e){0===h&&a.end();return}h++,o.add(e);let u=(e,f,p=!1)=>{if(e)return a.emit("error",e);if(s&&!p){let t=[];for(let e of f)e.isSymbolicLink()&&t.push(e.realpath().then(t=>t?.isUnknown()?t.lstat():t));if(t.length)return void Promise.all(t).then(()=>u(null,f,!0))}for(let e of f)e&&(!r||r(e))&&(a.write(i?e:e.fullpath())||(t=!0));for(let t of(h--,f)){let e=t.realpathCached()||t;e.shouldWalk(o,n)&&l.push(e)}t&&!a.flowing?a.once("drain",d):c||d()},c=!0;e.readdirCB(u,!0),c=!1}};return d(),a}streamSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof ew||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:r,walkFilter:n}=e,a=new es({objectMode:!0}),o=new Set;(!r||r(t))&&a.write(i?t:t.fullpath());let l=[t],h=0,d=()=>{let t=!1;for(;!t;){let e=l.shift();if(!e){0===h&&a.end();return}h++,o.add(e);let d=e.readdirSync();for(let e of d)(!r||r(e))&&(a.write(i?e:e.fullpath())||(t=!0));for(let t of(h--,d)){let e=t;if(t.isSymbolicLink()){if(!(s&&(e=t.realpathSync())))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(o,n)&&l.push(e)}}t&&!a.flowing&&a.once("drain",d)};return d(),a}chdir(t=this.cwd){let e=this.cwd;this.cwd="string"==typeof t?this.cwd.resolve(t):t,this.cwd[eg](e)}},eS=class extends ev{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:i=!0}=e;super(t,r.win32,"\\",{...e,nocase:i}),this.nocase=i;for(let t=this.cwd;t;t=t.parent)t.nocase=this.nocase}parseRootPath(t){return r.win32.parse(t).root.toUpperCase()}newRoot(t){return new ey(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},ek=class extends ev{sep="/";constructor(t=process.cwd(),e={}){let{nocase:i=!1}=e;super(t,r.posix,"/",{...e,nocase:i}),this.nocase=i}parseRootPath(t){return"/"}newRoot(t){return new eb(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},e$=class extends ek{constructor(t=process.cwd(),e={}){let{nocase:i=!0}=e;super(t,{...e,nocase:i})}},ex=Symbol.for("nodejs.util.inspect.custom"),eE=class t{#t;#e;#i;length;#s;#r;#n;#a;#o;#l;#h=!0;constructor(t,e,i,s){if(!(t=>t.length>=1)(t))throw TypeError("empty pattern list");if(!(t=>t.length>=1)(e))throw TypeError("empty glob list");if(e.length!==t.length)throw TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,i<0||i>=this.length)throw TypeError("index out of range");if(this.#t=t,this.#e=e,this.#i=i,this.#s=s,0===this.#i){if(this.isUNC()){let[t,e,i,s,...r]=this.#t,[n,a,o,l,...h]=this.#e;""===r[0]&&(r.shift(),h.shift());let d=[t,e,i,s,""].join("/"),u=[n,a,o,l,""].join("/");this.#t=[d,...r],this.#e=[u,...h],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[t,...e]=this.#t,[i,...s]=this.#e;""===e[0]&&(e.shift(),s.shift()),this.#t=[t+"/",...e],this.#e=[i+"/",...s],this.length=this.#t.length}}}[ex](){return"Pattern <"+this.#e.slice(this.#i).join("/")+">"}pattern(){return this.#t[this.#i]}isString(){return"string"==typeof this.#t[this.#i]}isGlobstar(){return this.#t[this.#i]===tc}isRegExp(){return this.#t[this.#i]instanceof RegExp}globString(){return this.#n=this.#n||(0===this.#i?this.isAbsolute()?this.#e[0]+this.#e.slice(1).join("/"):this.#e.join("/"):this.#e.slice(this.#i).join("/"))}hasMore(){return this.length>this.#i+1}rest(){return void 0!==this.#r?this.#r:this.hasMore()?(this.#r=new t(this.#t,this.#e,this.#i+1,this.#s),this.#r.#l=this.#l,this.#r.#o=this.#o,this.#r.#a=this.#a,this.#r):this.#r=null}isUNC(){let t=this.#t;return void 0!==this.#o?this.#o:this.#o="win32"===this.#s&&0===this.#i&&""===t[0]&&""===t[1]&&"string"==typeof t[2]&&!!t[2]&&"string"==typeof t[3]&&!!t[3]}isDrive(){let t=this.#t;return void 0!==this.#a?this.#a:this.#a="win32"===this.#s&&0===this.#i&&this.length>1&&"string"==typeof t[0]&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return void 0!==this.#l?this.#l:this.#l=""===t[0]&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return"string"==typeof t&&this.isAbsolute()&&0===this.#i?t:""}checkFollowGlobstar(){return!(0===this.#i||!this.isGlobstar()||!this.#h)}markFollowGlobstar(){return 0!==this.#i&&!!this.isGlobstar()&&!!this.#h&&(this.#h=!1,!0)}},eC="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux",eO=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:i,noext:s,noglobstar:r,platform:n=eC}){for(let a of(this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=n,this.mmopts={dot:!0,nobrace:e,nocase:i,noext:s,noglobstar:r,optimizationLevel:2,platform:n,nocomment:!0,nonegate:!0},t))this.add(a)}add(t){let e=new tg(t,this.mmopts);for(let t=0;t<e.set.length;t++){let i=e.set[t],s=e.globParts[t];if(!i||!s)throw Error("invalid pattern object");for(;"."===i[0]&&"."===s[0];)i.shift(),s.shift();let r=new eE(i,s,0,this.platform),n=new tg(r.globString(),this.mmopts),a="**"===s[s.length-1],o=r.isAbsolute();o?this.absolute.push(n):this.relative.push(n),a&&(o?this.absoluteChildren.push(n):this.relativeChildren.push(n))}}ignored(t){let e=t.fullpath(),i=`${e}/`,s=t.relative()||".",r=`${s}/`;for(let t of this.relative)if(t.match(s)||t.match(r))return!0;for(let t of this.absolute)if(t.match(e)||t.match(i))return!0;return!1}childrenIgnored(t){let e=t.fullpath()+"/",i=(t.relative()||".")+"/";for(let t of this.relativeChildren)if(t.match(i))return!0;for(let t of this.absoluteChildren)if(t.match(e))return!0;return!1}},ej=class t{store;constructor(t=new Map){this.store=t}copy(){return new t(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){let i=t.fullpath(),s=this.store.get(i);s?s.add(e.globString()):this.store.set(i,new Set([e.globString()]))}},eA=class{store=new Map;add(t,e,i){let s=2*!!e|!!i,r=this.store.get(t);this.store.set(t,void 0===r?s:s&r)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(2&e),!!(1&e)])}},eT=class{store=new Map;add(t,e){if(!t.canReaddir())return;let i=this.store.get(t);i?i.find(t=>t.globString()===e.globString())||i.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},eR=class t{hasWalkedCache;matches=new eA;subwalks=new eT;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new ej}processPatterns(t,e){for(let[i,s]of(this.patterns=e,e.map(e=>[t,e]))){this.hasWalkedCache.storeWalked(i,s);let t=s.root(),e=s.isAbsolute()&&!1!==this.opts.absolute;if(t){i=i.resolve("/"===t&&void 0!==this.opts.root?this.opts.root:t);let e=s.rest();if(e)s=e;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let r,n,a=!1;for(;"string"==typeof(r=s.pattern())&&(n=s.rest());)i=i.resolve(r),s=n,a=!0;if(r=s.pattern(),n=s.rest(),a){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if("string"==typeof r){let t=".."===r||""===r||"."===r;this.matches.add(i.resolve(r),e,t);continue}if(r===tc){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let t=n?.pattern(),r=n?.rest();if(n&&(""!==t&&"."!==t||r)){if(".."===t){let t=i.parent||i;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,e,!0)}}else this.matches.add(i,e,""===t||"."===t)}else r instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(t,e){let i=this.subwalks.get(t),s=this.child();for(let t of e)for(let e of i){let i=e.isAbsolute(),r=e.pattern(),n=e.rest();r===tc?s.testGlobstar(t,e,n,i):r instanceof RegExp?s.testRegExp(t,r,n,i):s.testString(t,r,n,i)}return s}testGlobstar(t,e,i,s){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,s,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(i&&e.checkFollowGlobstar()?this.subwalks.add(t,i):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),i){let e=i.pattern();if("string"==typeof e&&".."!==e&&""!==e&&"."!==e)this.testString(t,e,i.rest(),s);else if(".."===e){let e=t.parent||t;this.subwalks.add(e,i)}else e instanceof RegExp&&this.testRegExp(t,e,i.rest(),s)}}testRegExp(t,e,i,s){e.test(t.name)&&(i?this.subwalks.add(t,i):this.matches.add(t,s,!1))}testString(t,e,i,s){t.isNamed(e)&&(i?this.subwalks.add(t,i):this.matches.add(t,s,!1))}},eF=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#e;#i;signal;maxDepth;includeChildMatches;constructor(t,e,i){if(this.patterns=t,this.path=e,this.opts=i,this.#i=i.posix||"win32"!==i.platform?"/":"\\",this.includeChildMatches=!1!==i.includeChildMatches,(i.ignore||!this.includeChildMatches)&&(this.#e=((t,e)=>"string"==typeof t?new eO([t],e):Array.isArray(t)?new eO(t,e):t)(i.ignore??[],i),!this.includeChildMatches&&"function"!=typeof this.#e.add))throw Error("cannot ignore child matches, ignore lacks add() method.");this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#s(t){return this.seen.has(t)||!!this.#e?.ignored?.(t)}#r(t){return!!this.#e?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){let t;if(!this.signal?.aborted)for(this.paused=!1;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){let i;if(e&&this.opts.nodir)return;if(this.opts.realpath){if(!(i=t.realpathCached()||await t.realpath()))return;t=i}let s=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let t=await s.realpath();t&&(t.isUnknown()||this.opts.stat)&&await t.lstat()}return this.matchCheckTest(s,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#s(t)?t:void 0}matchCheckSync(t,e){let i;if(e&&this.opts.nodir)return;if(this.opts.realpath){if(!(i=t.realpathCached()||t.realpathSync()))return;t=i}let s=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let t=s.realpathSync();t&&(t?.isUnknown()||this.opts.stat)&&t.lstatSync()}return this.matchCheckTest(s,e)}matchFinish(t,e){if(this.#s(t))return;if(!this.includeChildMatches&&this.#e?.add){let e=`${t.relativePosix()}/**`;this.#e.add(e)}let i=void 0===this.opts.absolute?e:this.opts.absolute;this.seen.add(t);let s=this.opts.mark&&t.isDirectory()?this.#i:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(i){let e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+s)}else{let e=this.opts.posix?t.relativePosix():t.relative(),i=this.opts.dotRelative&&!e.startsWith(".."+this.#i)?"."+this.#i:"";this.matchEmit(e?i+e+s:"."+s)}}async match(t,e,i){let s=await this.matchCheck(t,i);s&&this.matchFinish(s,e)}matchSync(t,e,i){let s=this.matchCheckSync(t,i);s&&this.matchFinish(s,e)}walkCB(t,e,i){this.signal?.aborted&&i(),this.walkCB2(t,e,new eR(this.opts),i)}walkCB2(t,e,i,s){if(this.#r(t))return s();if(this.signal?.aborted&&s(),this.paused)return void this.onResume(()=>this.walkCB2(t,e,i,s));i.processPatterns(t,e);let r=1,n=()=>{0==--r&&s()};for(let[t,e,s]of i.matches.entries())this.#s(t)||(r++,this.match(t,e,s).then(()=>n()));for(let t of i.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;r++;let e=t.readdirCached();t.calledReaddir()?this.walkCB3(t,e,i,n):t.readdirCB((e,s)=>this.walkCB3(t,s,i,n),!0)}n()}walkCB3(t,e,i,s){i=i.filterEntries(t,e);let r=1,n=()=>{0==--r&&s()};for(let[t,e,s]of i.matches.entries())this.#s(t)||(r++,this.match(t,e,s).then(()=>n()));for(let[t,e]of i.subwalks.entries())r++,this.walkCB2(t,e,i.child(),n);n()}walkCBSync(t,e,i){this.signal?.aborted&&i(),this.walkCB2Sync(t,e,new eR(this.opts),i)}walkCB2Sync(t,e,i,s){if(this.#r(t))return s();if(this.signal?.aborted&&s(),this.paused)return void this.onResume(()=>this.walkCB2Sync(t,e,i,s));i.processPatterns(t,e);let r=1,n=()=>{0==--r&&s()};for(let[t,e,s]of i.matches.entries())this.#s(t)||this.matchSync(t,e,s);for(let t of i.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;r++;let e=t.readdirSync();this.walkCB3Sync(t,e,i,n)}n()}walkCB3Sync(t,e,i,s){i=i.filterEntries(t,e);let r=1,n=()=>{0==--r&&s()};for(let[t,e,s]of i.matches.entries())this.#s(t)||this.matchSync(t,e,s);for(let[t,e]of i.subwalks.entries())r++,this.walkCB2Sync(t,e,i.child(),n);n()}},eD=class extends eF{matches=new Set;constructor(t,e,i){super(t,e,i)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e_=class extends eF{results;constructor(t,e,i){super(t,e,i),this.results=new es({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},eM="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux",eN=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,s.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=!1!==e.includeChildMatches,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&void 0!==this.absolute)throw Error("cannot set absolute and withFileTypes:true");if("string"==typeof t&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(t=t.map(t=>t.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw TypeError("base matching requires globstar");t=t.map(t=>t.includes("/")?t:`./**/${t}`)}if(this.pattern=t,this.platform=e.platform||eM,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,void 0!==e.nocase&&e.nocase!==e.scurry.nocase)throw Error("nocase option contradicts provided scurry option")}else{let t="win32"===e.platform?eS:"darwin"===e.platform?e$:(e.platform,ek);this.scurry=new t(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let i="darwin"===this.platform||"win32"===this.platform,r={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[n,a]=this.pattern.map(t=>new tg(t,r)).reduce((t,e)=>(t[0].push(...e.set),t[1].push(...e.globParts),t),[[],[]]);this.patterns=n.map((t,e)=>{let i=a[e];if(!i)throw Error("invalid pattern object");return new eE(t,i,0,this.platform)})}async walk(){return[...await new eD(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new eD(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new e_(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new e_(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};function eP(t,e={}){return new eN(t,e).streamSync()}function eW(t,e={}){return new eN(t,e).stream()}function eL(t,e={}){return new eN(t,e).walkSync()}async function ez(t,e={}){return new eN(t,e).walk()}function eI(t,e={}){return new eN(t,e).iterateSync()}function eU(t,e={}){return new eN(t,e).iterate()}var eB=Object.assign(eW,{sync:eP}),eG=Object.assign(eU,{sync:eI}),eq=Object.assign(eL,{stream:eP,iterate:eI}),eY=Object.assign(ez,{glob:ez,globSync:eL,sync:eq,globStream:eW,stream:eB,globStreamSync:eP,streamSync:eP,globIterate:eU,iterate:eG,globIterateSync:eI,iterateSync:eI,Glob:eN,hasMagic:(t,e={})=>{for(let i of(Array.isArray(t)||(t=[t]),t))if(new tg(i,e).hasMagic())return!0;return!1},escape:K,unescape:L});eY.glob=eY;let eJ=/\b(shipped|done|released|complete[d]?)\b/i;function eH(t){return t.replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[*_`]/g,"").replace(/\s+/g," ").trim()}function eX(t){return t.length>80?`${t.slice(0,79).trimEnd()}…`:t}function eV(t){return t.length&&t.every(t=>"done"===t)?"done":t.some(t=>"planned"!==t)?"in-progress":"planned"}let eK=t=>{let e=parseFloat(t);return Number.isFinite(e)?e:1/0},eZ=t=>"done"===t||"cancelled"===t,eQ=t=>!!t&&"object"==typeof t&&!Array.isArray(t),e0=t=>"string"==typeof t?t.trim():"";function e1(t,e,i="is not an existing roadmap item"){let s=e.find(e=>e.id===t.toUpperCase());return s?null!==s.parent?{error:`parent ${s.id} is an epic, not a horizon (max depth is 2)`}:{id:s.id}:{error:`parent "${t}" ${i}`}}let e2=(t,e,i)=>t.find(t=>(t.parent??"")===e&&t.title.trim().toLowerCase()===i.toLowerCase())?.id;function e8(t,e){if(!eQ(t))return["plan must be an object"];if("roadmap"===t.kind)return function(t,e){let i=[],s=t.horizons??[],r=t.epics??[];if(Array.isArray(s)||i.push("horizons must be an array"),Array.isArray(r)||i.push("epics must be an array"),i.length>0)return i;if(s.length+r.length===0)return["a roadmap plan needs at least one horizon or epic"];let n=new Set,a=new Set,o=(t,e,s)=>{let r=eQ(t)?e0(t.key):"";r?n.has(r)?i.push(`duplicate key "${r}"`):(n.add(r),s&&a.add(r)):i.push(`${e}: key is required`)};s.forEach((t,e)=>o(t,`horizon #${e+1}`,!0)),r.forEach((t,e)=>o(t,`epic #${e+1}`,!1));let l=new Map,h=(t,s,r)=>{let n=`${t}\0${s.toLowerCase()}`,a=e2(e.roadmap,t,s)??l.get(n);a?i.push(`${r}: "${s}" already exists ${t?`under ${t}`:"as a horizon"} (${a})`):l.set(n,r)};return s.forEach((t,e)=>{if(!eQ(t))return void i.push(`horizon #${e+1} must be an object`);let s=e0(t.key)||`horizon #${e+1}`,r=e0(t.title);r?h("",r,s):i.push(`${s}: title is required`),void 0!==t.body&&"string"!=typeof t.body&&i.push(`${s}: body must be a markdown string`)}),r.forEach((t,s)=>{if(!eQ(t))return void i.push(`epic #${s+1} must be an object`);let r=e0(t.key)||`epic #${s+1}`,o=e0(t.title);o||i.push(`${r}: title is required`),"string"!=typeof t.body&&i.push(`${r}: body must be a markdown string`),void 0===t.status||e3.includes(t.status)||i.push(`${r}: status must be one of ${e3.join(", ")} (got ${JSON.stringify(t.status)})`);let l=e0(t.parent),d="";if(l)if(a.has(l))d=l;else if(n.has(l))i.push(`${r}: parent "${l}" is an epic in this plan; an epic's parent must be a horizon`);else{let t=e1(l,e.roadmap,"is neither a horizon key in this plan nor an existing roadmap item");"id"in t?d=t.id:i.push(`${r}: ${t.error}`)}else i.push(`${r}: parent is required (an existing horizon id or a horizon key in this plan)`);o&&d&&h(d,o,r)}),i}(t,e);if("breakdown"!==t.kind)return[`plan.kind must be "breakdown" or "roadmap" (got ${JSON.stringify(t.kind)})`];let i=[],s=e0(t.epic).toUpperCase();if(void 0!==t.epic&&"string"!=typeof t.epic)i.push("epic must be a string (an epic id)");else if(s&&void 0!==t.newEpic)i.push("pass either epic (an existing epic) or newEpic, not both");else if(s){let r=e.roadmap.find(t=>t.id===s);r?r.parent||i.push(`${r.id} is a horizon, not an epic; pass an epic id`):i.push(`Epic ${JSON.stringify(t.epic)} not found`)}else if(void 0!==t.newEpic){let s=t.newEpic;if(eQ(s)){let t=e0(s.title),r=e0(s.parent);if(t||i.push("newEpic: title is required"),"string"!=typeof s.body&&i.push("newEpic: body must be a markdown string"),r){let s=e1(r,e.roadmap);if("error"in s)i.push(`newEpic: ${s.error}`);else if(t){let r=e2(e.roadmap,s.id,t);r&&i.push(`newEpic: "${t}" already exists under ${s.id} (${r})`)}}else i.push("newEpic: parent is required (an existing horizon id)")}else i.push("newEpic must be an object { title, parent, body }")}if(!Array.isArray(t.tasks)||0===t.tasks.length)return i.push("tasks must be a non-empty array"),i;let r=t.tasks,n=new Set(e.taskIds.map(t=>t.toUpperCase())),a=new Map;r.forEach((t,e)=>{let s=eQ(t)?e0(t.key):"";s?a.has(s)?i.push(`duplicate key "${s}"`):a.set(s,e):i.push(`task #${e+1}: key is required`)});let o=new Map;r.forEach((t,e)=>{var s;let r;if(!eQ(t))return void i.push(`task #${e+1} must be an object`);let l=e0(t.key)||`task #${e+1}`;if(e0(t.title)||i.push(`${l}: title is required`),"string"!=typeof t.body&&i.push(`${l}: body must be a markdown string`),void 0!==t.size&&"string"!=typeof t.size&&i.push(`${l}: size must be a string`),void 0===t.due||"string"==typeof t.due&&(r=(s=t.due).match(/^(\d{4})-(\d{2})-(\d{2})$/))&&new Date(Date.UTC(+r[1],r[2]-1,+r[3])).toISOString().slice(0,10)===s||i.push(`${l}: due must be a date YYYY-MM-DD (got ${JSON.stringify(t.due)})`),void 0===t.dependsOn)return;if(!Array.isArray(t.dependsOn))return void i.push(`${l}: dependsOn must be an array`);let h=[];for(let e of t.dependsOn){let t=e0(e);a.has(t)?h.push(t):n.has(t.toUpperCase())||i.push(`${l}: dependsOn "${String(e)}" is neither a key in this plan nor an existing task`)}e0(t.key)&&o.set(e0(t.key),h)});let l=new Map,h=new Set,d=(t,e)=>{if("done"!==l.get(t)){if("open"===l.get(t)){let s=[...e.slice(e.indexOf(t)),t];s.some(t=>h.has(t))||i.push(`dependency cycle: ${s.join(" → ")}`),s.forEach(t=>h.add(t));return}for(let i of(l.set(t,"open"),o.get(t)??[]))d(i,[...e,t]);l.set(t,"done")}};for(let t of o.keys())d(t,[]);for(let[t,e]of o)if(!h.has(t))for(let s of e)(a.get(s)??0)>(a.get(t)??0)&&i.push(`${t} depends on ${s}, which comes later; list ${s} first`);return i}let e3=["planned","in-progress","done"];function e4(t,e){if("roadmap"===t.kind)return function(t,e){let i=[],s=t.horizons??[],r=t.epics??[],n=new Set(s.map(t=>t.key)),a=new Set([...n,...r.map(t=>t.key)]),o=new Set(e);for(let t of o)a.has(t)||i.push(`unknown key "${t}"`);let l=s.filter(t=>o.has(t.key)),h=r.filter(t=>o.has(t.key));for(let t of(l.length+h.length===0&&i.push("nothing selected"),h)){let e=t.parent.trim();n.has(e)&&!o.has(e)&&i.push(`${t.key} is under ${e}, which you unchecked; check ${e} or uncheck ${t.key}`)}return{plan:{...t,horizons:l,epics:h},errors:i}}(t,e);let i=[],s=new Set(t.tasks.map(t=>t.key.trim())),r=new Set(e.map(t=>t.trim()));for(let t of r)s.has(t)||i.push(`unknown key "${t}"`);let n=t.tasks.filter(t=>r.has(t.key.trim()));for(let t of(0===n.length&&i.push("nothing selected"),n))for(let e of(t.dependsOn??[]).map(t=>t.trim()))s.has(e)&&!r.has(e)&&i.push(`${t.key.trim()} depends on ${e}, which you unchecked`);return{plan:{...t,tasks:n},errors:i}}t.s(["planTarget",0,function(t){return e0(t.epic)?e0(t.epic).toUpperCase():t.newEpic?`new epic "${e0(t.newEpic.title)}"`:"no epic"},"selectPlan",0,e4,"validatePlan",0,e8],975283);let e6=(t,e)=>`${t} ${e}${1===t?"":"s"}`;t.s(["SESSION_GAP_MS",0,18e5,"groupSessions",0,function(t,e={}){let i=e.gapMs??18e5,s=[...t].sort((t,e)=>t.timestamp.localeCompare(e.timestamp)),r=new Map,n=new Map;for(let t of s){let e=t.sessionId;if(!e){let s=Date.parse(t.timestamp),r=n.get(t.actor);(!r||"session_start"===t.type||s-r.lastAt>i)&&(r={id:`legacy_${t.id}`,lastAt:s},n.set(t.actor,r)),r.lastAt=s,e=r.id}let s=r.get(e);s?s.push(t):r.set(e,[t])}return[...r].map(([t,e])=>(function(t,e){let i=new Map,s=new Set,r=[],n=!1,a=0;for(let t of e){"task_updated"===t.type&&t.taskId&&t.taskStatus&&i.set(t.taskId,t.taskStatus);let e=function(t){switch(t.type){case"doc_created":return t.detail??t.title.replace(/^Created: /,"");case"doc_deleted":return t.title.replace(/^Deleted /,"");case"doc_renamed":return t.title.split(" → ")[1]??null;default:return null}}(t);e&&s.add(e),"decision_logged"===t.type&&r.push(t.title),"memory_updated"===t.type&&(n=!0),"roadmap_updated"===t.type&&a++}let o=[...i].map(([t,e])=>({id:t,lastStatus:e})),l=o.filter(t=>"done"===t.lastStatus).length,h=[o.length?`${e6(o.length,"task")} moved${l?` (${l} done)`:""}`:"",s.size?`${e6(s.size,"doc")} changed`:"",r.length?e6(r.length,"ADR"):"",a?e6(a,"roadmap edit"):"",n?"memory updated":""].filter(Boolean);return{id:t,actor:e[0].actor,start:e[0].timestamp,end:e[e.length-1].timestamp,eventCount:e.length,eventIds:e.map(t=>t.id),tasks:o,docs:[...s],decisions:r,memoryUpdated:n,headline:h.join(" · ")||e6(e.length,"event")}})(t,e)).sort((t,e)=>e.start.localeCompare(t.start))},"sessionDuration",0,function(t){let e=Math.round((Date.parse(t.end)-Date.parse(t.start))/6e4);return e<1?"<1m":e<60?`${e}m`:`${Math.floor(e/60)}h ${e%60}m`},"sessionsForTask",0,function(t,e){return t.filter(t=>t.tasks.some(t=>t.id===e))}],31451);let e5="## Manual tests",e7=/^\s*[-*]\s+\[( |x|X)\]\s+(.*)$/,e9=/^\s*[-*]\s+(.*)$/;function it(t){let e,i=(e=!1,t.map(t=>/^\s*```/.test(t)?(e=!e,!0):e)),s=t.findIndex((t,e)=>!i[e]&&t.trim()===e5);if(s<0)return null;let r=t.findIndex((t,e)=>e>s&&!i[e]&&/^##\s/.test(t));return[s,r<0?t.length:r]}let ie="## Review",ii=/^###\s+(\S+)\s+—\s+(approved|changes requested)\s*$/;function is(t){let e,i=(e=!1,t.map(t=>/^\s*```/.test(t)?(e=!e,!0):e)),s=t.findIndex((t,e)=>!i[e]&&t.trim()===ie);if(s<0)return null;let r=t.findIndex((t,e)=>e>s&&!i[e]&&/^##\s/.test(t));return[s,r<0?t.length:r]}function ir(t,e,i,s){let r=i.trim();if("changes requested"===e&&!r)throw Error("A note is required to send a task back");let n=r.split("\n").map(t=>/^#{1,3}\s/.test(t)?`\\${t}`:t).join("\n"),a=[`### ${s} — ${e}`,...n?[n]:[]],o=t.split("\n"),l=is(o);if(!l)return`${t.replace(/\s+$/,"")}
|
|
4
|
+
|
|
5
|
+
${ie}
|
|
6
|
+
${a.join("\n")}
|
|
7
|
+
`;let h=l[1];for(;h>l[0]+1&&!o[h-1].trim();)h--;let d=[...o.slice(0,h),...a,...o.slice(h)].join("\n");return l[1]===o.length?`${d.replace(/\s+$/,"")}
|
|
8
|
+
`:d}t.s(["appendReviewEntry",0,ir,"latestReview",0,function(t){let e=function(t){let e=t.split("\n"),i=is(e);if(!i)return[];let s=[];for(let t of e.slice(i[0]+1,i[1])){let e=t.match(ii);if(e)s.push({at:e[1],outcome:e[2],note:""});else if(s.length){let e=s[s.length-1];e.note=e.note?`${e.note}
|
|
9
|
+
${t}`:t}}return s.map(t=>({...t,note:t.note.trim()}))}(t);return e[e.length-1]??null}],531208);let ia=["claude","cursor","codex","copilot","gemini","windsurf","cline","opencode"];function io(t){let e=(t??"").trim().toLowerCase();if("human"===e)return"human";let i=e.match(/^ai(?::\s*([a-z0-9._-]+))?$/);return i?`ai:${i[1]??"agent"}`:null}t.s(["agentFromUserAgent",0,function(t){let e=(t??"").toLowerCase();return ia.find(t=>e.includes(t))??"agent"},"parseOwner",0,io],840980);let il={XS:1,S:1,M:3,L:7,XL:14},ih=["todo","in-progress","review","blocked","paused","done","cancelled"],id={todo:"📋","in-progress":"🔨",review:"👀",blocked:"🚫",paused:"⏸️",done:"✅",cancelled:"❌"},iu={ready:"todo",planned:"todo","not started":"todo",wip:"in-progress",doing:"in-progress",active:"in-progress",start:"in-progress",started:"in-progress",complete:"done",completed:"done",finished:"done",finish:"done",block:"blocked","on hold":"paused","on-hold":"paused",pause:"paused",hold:"paused","in review":"review",reviewing:"review","needs review":"review",cancel:"cancelled",skip:"cancelled"},ic=["gray","amber","accent","red","slate","teal","blue","pink","green","orange"],ip=[{id:"todo",label:"Todo",color:"gray",category:"todo"},{id:"in-progress",label:"In progress",color:"amber",category:"in-progress"},{id:"review",label:"Review",color:"accent",category:"review"},{id:"blocked",label:"Blocked",color:"red",category:"blocked"},{id:"paused",label:"Paused",color:"slate",category:"paused"},{id:"done",label:"Done",color:"teal",category:"done"},{id:"cancelled",label:"Cancelled",color:"gray",category:"cancelled"}],im=t=>ih.includes(t);function ig(t,e=ip){let i=t.toLowerCase().replace(/[📋🔨👀✅🚫❌⏸️]/g,"").trim(),s=iu[i]??i;if(im(s))return{status:s};let r=e.find(t=>t.id===s||t.id===s.replace(/\s+/g,"-"));return r&&!im(r.id)?{status:r.category,customStatus:r.id}:{status:"todo",unknown:!0}}function iw(t=new Date){let e=t=>String(t).padStart(2,"0");return`${t.getFullYear()}-${e(t.getMonth()+1)}-${e(t.getDate())}`}function iy(t,e,i){let s;return t?"done"===e?"done":t<i?"overdue":7>=Math.round(((s=t=>Date.UTC(+t.slice(0,4),t.slice(5,7)-1,+t.slice(8,10)))(t)-s(i))/864e5)?"soon":"ok":null}function ib(t){return t.every(t=>"done"===t)?"done":t.some(t=>"other"!==t)?"in-progress":"planned"}function iv(){return process.env.VIBEDOC_ROOT||process.cwd()}async function iS(t){let s=t||i.default.dirname(iv()),r=[];try{for(let t of(await e.default.readdir(s,{withFileTypes:!0}))){if(!t.isDirectory())continue;let n=i.default.join(s,t.name),a=!1;for(let t of["CLAUDE.md","AGENTS.md","docs/architecture",".vibedoc"])try{await e.default.access(i.default.join(n,t)),a=!0;break}catch{}a&&r.push({id:t.name,name:t.name,root:n,hasVibedoc:!0})}}catch{}let n=iv(),a=i.default.basename(n),o=r.findIndex(t=>t.root===n);if(o>0){let[t]=r.splice(o,1);r.unshift(t)}else -1===o&&r.unshift({id:a,name:a,root:n,hasVibedoc:!0});return r}async function ik(t){return(await eY("**/*.md",{cwd:t,ignore:["node_modules/**",".git/**",".next/**"],nodir:!0})).sort().map(t=>{var e;return{path:t,section:(e=t).includes("/")?e.startsWith("memory/")?"memory":e.startsWith("plans/")?"plans":e.includes("01-overview")?"overview":e.includes("02-high-level")||e.includes("high-level-design")?"high-level-design":e.includes("03-services")||e.includes("/services/")?"services":e.includes("04-data")||e.includes("/data/")?"data":e.includes("05-infra")||e.includes("/infrastructure/")?"infrastructure":e.includes("06-security")||e.includes("/security/")?"security":e.includes("07-observ")||e.includes("/observability/")?"observability":e.includes("08-resil")||e.includes("/resilience/")?"resilience":e.includes("decisions/")||e.includes("ADR")?"decisions":"other":"root",name:i.default.basename(t,".md")}})}async function i$(t,s){for(let r of[i.default.join(s,t),i.default.join(s,`${t}.md`),i.default.join(s,"docs",t),i.default.join(s,"docs",`${t}.md`),i.default.join(s,"docs","architecture",t),i.default.join(s,"docs","architecture",`${t}.md`),i.default.join(s,"memory",t),i.default.join(s,"memory",`${t}.md`),i.default.join(s,"plans",t),i.default.join(s,"plans",`${t}.md`)])try{let t=await e.default.readFile(r,"utf8");return{path:i.default.relative(s,r),content:t}}catch{}for(let r of[`**/${t}.md`,`**/${t}*.md`,`**/*${t}*.md`]){let t=await eY(r,{cwd:s,ignore:["node_modules/**",".git/**",".next/**"],nodir:!0,nocase:!0});if(t.length>0){let r=await e.default.readFile(i.default.join(s,t[0]),"utf8");return{path:t[0],content:r}}}throw Error(`Doc not found: "${t}"`)}async function ix(t,s,r){let n=i.default.resolve(r),a=i.default.resolve(r,t);if(!a.startsWith(n+i.default.sep)&&a!==n)throw Error("Path outside root");await e.default.mkdir(i.default.dirname(a),{recursive:!0}),await e.default.writeFile(a,s,"utf8")}async function iE(t,s,r,n=!1){let a=i.default.resolve(r),o=i.default.resolve(r,t);if(!o.startsWith(a+i.default.sep))throw Error("Path outside root");let l=await e.default.readFile(o,"utf8").catch(t=>{if("ENOENT"===t.code)return"";throw t}),h=function(t,e){let i=t;for(let[t,s]of e.entries()){if("string"!=typeof s?.old_string||"string"!=typeof s?.new_string)return{error:`Edit ${t+1}: old_string and new_string must be strings`};if(""===s.old_string){if(""!==i)return{error:`Edit ${t+1}: empty old_string is only allowed for a new, empty doc`};i=s.new_string;continue}let e=i.indexOf(s.old_string);if(-1===e)return{error:`Edit ${t+1}: old_string not found in the doc`};if(-1!==i.indexOf(s.old_string,e+1))return{error:`Edit ${t+1}: old_string matches more than once; include more surrounding text`};i=i.slice(0,e)+s.new_string+i.slice(e+s.old_string.length)}return{content:i}}(l,s);if("error"in h)throw Error(h.error);return n||(await e.default.mkdir(i.default.dirname(o),{recursive:!0}),await e.default.writeFile(o,h.content,"utf8")),{before:l,content:h.content}}async function iC(t,e){let i=[];for(let s of t)try{let{content:t}=await i$(s,e);i.push(`--- FILE: ${s} ---
|
|
10
|
+
|
|
11
|
+
${t.trim()}`)}catch{}return i.join("\n\n---\n\n")}async function iO(t,s,r){let n=i.default.resolve(r),a=i.default.resolve(r,t);if(!a.startsWith(n+i.default.sep)&&a!==n)throw Error("Path outside root");try{await e.default.access(a);let i=Error(`File already exists: ${t}`);throw i.code="EEXIST",i}catch(t){if("ENOENT"!==t.code)throw t}await e.default.mkdir(i.default.dirname(a),{recursive:!0}),await e.default.writeFile(a,s,"utf8"),await st(r,{type:"doc_created",actor:"human",title:`Created: ${t}`,detail:t});try{let{exists:t}=await sc(r);t&&await sf(r)}catch{}}async function ij(t,s){let r=await eY("**/*.md",{cwd:s,ignore:["node_modules/**",".git/**",".next/**"],nodir:!0}),n=t.toLowerCase(),a=[];for(let t of r)try{let r=(await e.default.readFile(i.default.join(s,t),"utf8")).split("\n").map((t,e)=>({line:e+1,text:t.trim().slice(0,120)})).filter(t=>t.text.toLowerCase().includes(n));r.length>0&&a.push({file:t,hits:r.slice(0,4),totalHits:r.length})}catch{}return a.sort((t,e)=>e.totalHits-t.totalHits).slice(0,20)}t.s(["dueState",0,iy,"localToday",0,iw,"roadmapHealth",0,function(t,e,i){let s={},r=[];for(let e of t)e.due&&"overdue"===iy(e.due,e.status,i)&&r.push({id:e.id,kind:"overdue",message:`${e.id} "${e.title}" is overdue since ${e.due}`});let n=new Set(t.filter(t=>null===t.parent).map(t=>t.id));for(let n of t){if(null===n.parent)continue;let t=n.tasks.filter(t=>!(t in e));t.length&&r.push({id:n.id,kind:"missing-task",message:`${n.id} links unknown task ${t.join(", ")}`});let a=n.tasks.filter(t=>t in e&&"cancelled"!==e[t].status),o="done"===n.status||"paused"===n.status?[]:function(t,e,i,s){let r=[];for(let t of e){let e=i[t];"done"!==e.status&&e.due&&e.due<s&&r.push(`${t} overdue since ${e.due}`),"blocked"===e.status&&r.push(`${t} blocked`)}let n=e.some(t=>["done","in-progress","review"].includes(i[t].status));return t.due&&"soon"===iy(t.due,t.status,s)&&!n&&r.push(`due ${t.due}, nothing started`),r}(n,a,e,i);if(o.length&&r.push({id:n.id,kind:"at-risk",message:`${n.id} "${n.title}" at risk: ${o.join("; ")}`}),!a.length)continue;let l=a.map(t=>"done"===e[t].status?"done":"in-progress"===e[t].status||"review"===e[t].status?"in-progress":"other");s[n.id]={done:l.filter(t=>"done"===t).length,total:a.length};let h=ib(l);if(h!==n.status&&("paused"!==n.status||"done"===h)){let t=a.filter(t=>"done"!==e[t].status);r.push({id:n.id,kind:"status-mismatch",message:"done"===h?`${n.id} "${n.title}": all tasks done but status is ${n.status}`:`${n.id} "${n.title}" is ${n.status} but tasks ${t.join(", ")} are not done`,suggestedStatus:h})}}for(let e of t){if(!n.has(e.id))continue;let i=t.filter(t=>t.parent===e.id);if(!i.length)continue;let a=i.map(t=>"done"===t.status?"done":"in-progress"===t.status?"in-progress":"other");s[e.id]=i.reduce((t,e)=>{let i=s[e.id]??{done:+("done"===e.status),total:1};return{done:t.done+i.done,total:t.total+i.total}},{done:0,total:0});let o=ib(a);o!==e.status&&("paused"!==e.status||"done"===o)&&r.push({id:e.id,kind:"status-mismatch",message:`${e.id} "${e.title}" is ${e.status} but its features say ${o}`,suggestedStatus:o})}return{progress:s,drift:r}}],404466);let iA=new Set;function iT(t,e,s){let r=e.split("\n"),n=i.default.basename(t,".md"),a=(r.find(t=>t.startsWith("# "))||"").replace(/^#+\s*/,"").replace(/^T\d+\s*[:—–-]\s*/i,"").trim()||n,o={};for(let t of r.slice(0,sT(r))){let e=t.match(/\*\*([^*]+):\*\*\s*(.+)/);e&&(o[e[1].toLowerCase().trim()]=e[2].trim())}let l=ig(o.status||"todo",s),h=`${t}\0${o.status}`;l.unknown&&!iA.has(h)&&(iA.add(h),console.warn(`[vibedoc] ${t}: unknown status "${o.status}", shown as todo`));let{status:d,customStatus:u}=l,c=n.match(/^(T\d+)/i),f=c?c[1].toUpperCase():n.toUpperCase(),p=function(t){let e=t.split("\n"),i=it(e);if(!i)return null;let s=[],r="steps",n=null;for(let t of e.slice(i[0]+1,i[1])){let e=t.match(/^_(\d{4}-\d{2}-\d{2})\b/);if(e&&!n&&!s.length){n=e[1];continue}if(/^\s*###\s/.test(t)){r=/^\s*###\s+regression/i.test(t)?"regression":"steps";continue}let i=t.match(e7);i&&s.push({text:i[2].trim(),checked:" "!==i[1],group:r,index:s.length})}return s.length?{items:s,total:s.length,done:s.filter(t=>t.checked).length,date:n}:null}(e),m=p&&{total:p.total,done:p.done};return{id:f,title:a,status:d,...u&&{customStatus:u},size:o.size||"",phase:o.phase||"",dependsOn:o["depends on"]||"",owner:io(o.owner),due:sO(o.due||""),started:sO(o.started||""),finished:sO(o.done||""),manualTests:m,file:t,raw:e}}async function iR(t){let{statuses:s}=await iD(t),r=await eY("plans/tasks/T*.md",{cwd:t,nodir:!0});0===r.length&&(r=await eY("plans/T*.md",{cwd:t,nodir:!0}));let n=[];for(let a of r.sort())try{let r=await e.default.readFile(i.default.join(t,a),"utf8");n.push(iT(a,r,s))}catch{}let a={todo:[],"in-progress":[],review:[],blocked:[],paused:[],done:[],cancelled:[]};for(let t of n){let e=a[t.status]?t.status:"todo";a[e].push(t)}return{tasks:n,board:a}}async function iF(t,s){let{statuses:r}=await iD(s),n=t.toUpperCase().startsWith("T")?t.toUpperCase():`T${t}`;for(let t of[`plans/tasks/${n}*.md`,`plans/${n}*.md`]){let n=await eY(t,{cwd:s,nodir:!0});if(n.length>0){let t=await e.default.readFile(i.default.join(s,n[0]),"utf8");return iT(n[0],t,r)}}throw Error(`Task not found: ${t}`)}async function iD(t){let s=null;try{s=JSON.parse(await e.default.readFile(i.default.join(t,".vibedoc","settings.json"),"utf8"))}catch{}return{sizeDays:{...il,...s?.tasks?.sizeDays??{}},statuses:function(t){if(!Array.isArray(t))return ip;let e=[];for(let i of t){let t="string"==typeof i?.id?i.id.trim().toLowerCase():"";if(!t||e.some(e=>e.id===t))continue;let s=im(t),r=s?t:i?.category;if(!r||!im(r)||!s&&(/^[a-z0-9][a-z0-9-]{0,39}$/.test(t)?im(t)||t in iu||t.replace(/-/g," ")in iu?`"${t}" already means a built-in status`:null:"use lowercase letters, digits and dashes"))continue;let n=ip.find(e=>e.id===(s?t:r));e.push({id:t,label:"string"==typeof i?.label&&i.label.trim()?i.label.trim():n?.label??t,color:ic.includes(i?.color)?i?.color:n?.color??"gray",category:r})}for(let t of ip)e.some(e=>e.id===t.id)||e.push(t);return e}(s?.statuses)}}function i_(t,e,i){let s=t.split("\n"),r=sT(s),n=s.slice(0,r).findIndex(t=>t.toLowerCase().startsWith(`**${e.toLowerCase()}:**`));return i?n>=0?s[n]=`**${e}:** ${i}`:s.splice(r,0,`**${e}:** ${i}`):n>=0&&s.splice(n,1),s.join("\n")}async function iM(t,s,r,n="human",a){var o;let l=await iF(t,r),h=l.status,{statuses:d,sizeDays:u}=await iD(r),c=ig(s,d);if(c.unknown)throw new sw(`Unknown status "${s}" (expected ${d.map(t=>t.id).join(" | ")})`);let f=c.status,p=function(t,e=ip){let{status:i,customStatus:s}=ig(t,e),r=s??i;return`${id[i]} ${r.charAt(0).toUpperCase()}${r.slice(1)}`}(s,d),m=l.raw,g=/(\*\*Status:\*\*\s*).+/;m=g.test(m)?m.replace(g,`$1${p}`):m.replace(/^(#[^\n]+\n)/,`$1**Status:** ${p}
|
|
12
|
+
`);let w=(o=l.owner,a?"ai"===a.actor?"in-progress"===f?io(`ai:${a.agent||"agent"}`)??"ai:agent":o:o??"human":o);w!==l.owner&&(m=i_(m,"Owner",w));let y=function(t,e,i,s,r=il){let n={...e};if("in-progress"===t){n.started??=s;let t=r[i.trim().match(/^(XS|XL|S|M|L)\b/i)?.[1].toUpperCase()??null??""];!n.due&&"number"==typeof t&&t>=0&&(n.due=function(t,e){let[i,s,r]=t.split("-").map(Number);return new Date(Date.UTC(i,s-1,r+e)).toISOString().slice(0,10)}(n.started,t))}return"done"===t?n.done=s:n.done&&(n.done=null),n}(f,{due:l.due,started:l.started,done:l.finished},l.size,iw(),u);y.due!==l.due&&(m=i_(m,"Due",y.due)),y.started!==l.started&&(m=i_(m,"Started",y.started)),y.done!==l.finished&&(m=i_(m,"Done",y.done)),await e.default.writeFile(i.default.join(r,l.file),m,"utf8"),await st(r,{type:"task_updated",actor:n,title:`${l.id} moved to ${f}`,detail:l.title,taskId:l.id,taskStatus:f});let{customStatus:b,...v}=l;return{task:{...v,status:f,...c.customStatus&&{customStatus:c.customStatus},owner:w,due:y.due,started:y.started,finished:y.done,raw:m},previousStatus:h}}let iN=[["phase","Phase"],["size","Size"],["dependsOn","Depends on"],["due","Due"],["owner","Owner"]];async function iP(t,s,r,n="human"){let a=await iF(t,r),o=t=>t.replace(/\s+/g," ").trim(),l=a.raw.split("\n"),h=sT(l);if(void 0!==s.title){let t=o(s.title);if(!t)throw new sw("title must not be empty");let e=l.findIndex(t=>t.startsWith("# "));e>=0?l[e]=`# ${a.id}: ${t}`:(l.unshift(`# ${a.id}: ${t}`),h++)}for(let[t,e]of iN){let i=s[t];if(void 0===i)continue;let r=null===i?"":o(i);if("due"===t&&r){let t=sO(r);if(!t)throw new sw(`due must be a date YYYY-MM-DD (got ${JSON.stringify(i)})`);r=t}if("owner"===t&&r){let t=io(r);if(!t)throw new sw(`owner must be "human" or "ai:<agent>" (got ${JSON.stringify(i)})`);r=t}let n=l.slice(0,h).findIndex(t=>t.toLowerCase().startsWith(`**${e.toLowerCase()}:**`));if(!r&&("due"===t||"owner"===t)){n>=0&&(l.splice(n,1),h--);continue}let a=`**${e}:** ${r||"—"}`;n>=0?l[n]=a:(l.splice(h,0,a),h++)}let d=l.join("\n");return d===a.raw?a:(await e.default.writeFile(i.default.join(r,a.file),d,"utf8"),await st(r,{type:"task_updated",actor:n,title:`${a.id} edited`,detail:a.title,taskId:a.id}),iF(a.id,r))}function iW(t,s,r="human"){return iJ(async()=>{let n=await iF(t,s);await e.default.unlink(i.default.join(s,n.file));let{items:a}=await sL(s),o=[];for(let t of a.filter(t=>t.tasks.includes(n.id)))o.push({epic:t.id,index:t.tasks.indexOf(n.id)}),await sJ(t.id,{tasks:t.tasks.filter(t=>t!==n.id)},s,r);return await st(s,{type:"task_updated",actor:r,title:`${n.id} deleted`,detail:n.title,taskId:n.id}),{task:n,links:o}})}async function iL(t,e,i,s="human"){let r=await iF(t,i),{items:n}=await sL(i),a=e?n.find(t=>t.id===e.trim().toUpperCase()&&null!==t.parent):void 0;if(e&&!a)throw new sw(`Epic not found: ${e}`);for(let t of n.filter(t=>t.tasks.includes(r.id)&&t.id!==a?.id))await sJ(t.id,{tasks:t.tasks.filter(t=>t!==r.id)},i,s);return a&&!a.tasks.includes(r.id)&&await sJ(a.id,{tasks:[...a.tasks,r.id]},i,s),iP(r.id,{phase:a?`${a.id} — ${a.title}`:""},i,s)}async function iz(t,e,i,s="human"){let r=[];for(let n of t)"status"in e?await iM(n,e.status,i,s,{actor:s}):"epic"in e?await iL(n,e.epic,i,s):"delete"in e&&r.push(await iW(n,i,s));return{deleted:r}}function iI(t,e,s){if("string"!=typeof t)return!1;let r=i.default.posix.normalize(t);return r===t&&i.default.posix.dirname(r)===e&&s.test(i.default.posix.basename(r))}async function iU(t,s,r,n="ai"){let a=await iF(t,r),o=function(t,e,i,s){let r=function(t){let e=[];for(let i of t.replace(/\r\n/g,"\n").split("\n")){let t=i.trimEnd();if(!t.trim())continue;if(/^\s*###\s/.test(t)){e.push(t.trim());continue}if(/^\s*##?\s/.test(t))continue;let s=t.match(e7),r=s?s[2]:t.match(e9)?.[1]??t.trim();e.some(t=>t.startsWith("### "))||e.push("### Steps"),e.push(`- [${s&&" "!==s[1]?"x":" "}] ${r.trim()}`)}return e.join("\n")}(e);if(!r)throw Error("manualTests is empty: give at least one checklist item");let n=t.split("\n"),a=it(n),o=(a?[...n.slice(0,a[0]),...n.slice(a[1])]:n).join("\n").replace(/\s+$/,"");return`${o}
|
|
13
|
+
|
|
14
|
+
${e5}
|
|
15
|
+
_${s} — ${i}_
|
|
16
|
+
${r}
|
|
17
|
+
`}(a.raw??"",s,n,new Date().toISOString().slice(0,10));return await e.default.writeFile(i.default.join(r,a.file),o,"utf8"),iF(a.id,r)}class iB extends Error{}async function iG(t,s,r,n,a){let o=await iF(t,a);if("review"!==o.status)throw new iB(`${o.id} is ${o.status}, not in review`);let l=new Date().toISOString().replace(/\.\d{3}Z$/,"Z"),h=ir(o.raw??"",s,r,l);return await e.default.writeFile(i.default.join(a,o.file),h,"utf8"),iM(o.id,n,a,"human")}async function iq(t,s,r,n){let a=await iF(t,n),o=function(t,e,i){let s=t.split("\n"),r=it(s);if(!r)throw RangeError("This task has no manual tests");let n=0;for(let t=r[0]+1;t<r[1];t++)if(e7.test(s[t])&&n++===e)return s[t]=s[t].replace(/\[( |x|X)\]/,i?"[x]":"[ ]"),s.join("\n");throw RangeError(`No manual test item ${e} (the task has ${n})`)}(a.raw??"",s,r);return o!==a.raw&&await e.default.writeFile(i.default.join(n,a.file),o,"utf8"),iF(a.id,n)}let iY=Promise.resolve();function iJ(t){let e=iY.then(t,t);return iY=e.catch(()=>{}),e}async function iH(t,s){let{tasks:r}=await iR(s),n=t.title.replace(/\s+/g," ").trim(),a=r.map(t=>parseInt(t.id.replace(/^T/i,""),10)).filter(t=>!isNaN(t)),o=a.length>0?Math.max(...a)+1:1,l=`T${String(o).padStart(3,"0")}`,h=n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,40)||"task",d=`${l}-${h}.md`,u=i.default.join(s,"plans","tasks");await e.default.mkdir(u,{recursive:!0});let c=i.default.join(u,d),f=t.due?sO(t.due):null;if(t.due&&!f)throw new sw(`due must be a date YYYY-MM-DD (got ${JSON.stringify(t.due)})`);let p=t.phase?.trim().match(/^(R\d+)\b/i)?.[1];!f&&p&&(f=(await sz(p,s).catch(()=>null))?.due??null);let m=`# ${l}: ${n}
|
|
7
18
|
**Status:** 📋 Ready
|
|
8
19
|
**Phase:** ${t.phase||"—"}
|
|
9
20
|
**Size:** ${t.size||"—"}
|
|
10
21
|
**Depends on:** ${t.dependsOn||"—"}
|
|
11
|
-
${
|
|
12
|
-
`:""}`,
|
|
22
|
+
${f?`**Due:** ${f}
|
|
23
|
+
`:""}`,g=void 0!==t.body?`${m}
|
|
13
24
|
${t.body.trim()}
|
|
14
|
-
`:`${
|
|
25
|
+
`:`${m}
|
|
15
26
|
## What to build
|
|
16
27
|
${t.description||"—"}
|
|
17
28
|
|
|
@@ -23,7 +34,7 @@ ${t.description||"—"}
|
|
|
23
34
|
|
|
24
35
|
## Definition of done
|
|
25
36
|
—
|
|
26
|
-
`;return await e.default.writeFile(c,
|
|
37
|
+
`;return await e.default.writeFile(c,g,{flag:"wx",encoding:"utf8"}),iF(l,s)}function iX(t,e,i,s){let r=e8(t,{roadmap:i,taskIds:s});if(r.length>0)throw new sw(r.join("\n"));if(!Array.isArray(e))throw new sw("selected must be an array of plan keys");let{plan:n,errors:a}=e4(t,e.map(String));if(a.length>0)throw new sw(a.join("\n"));return n}async function iV(t,s,r="human"){let{title:n,context:a,decision:o,rationale:l,alternatives:h=[],consequences:d}=t,u=(await eY("docs/architecture/decisions/ADR-*.md",{cwd:s,nodir:!0})).map(t=>parseInt(i.default.basename(t).match(/ADR-(\d+)/)?.[1]||"0")).filter(t=>!isNaN(t)),c=String(u.length>0?Math.max(...u)+1:1).padStart(3,"0"),f=n.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,50),p=`ADR-${c}-${f}.md`,m=new Date().toISOString().split("T")[0],g=h.length>0?h.map(t=>`| ${t.option} | ${t.reason} |`).join("\n"):"| (none) | — |",w=`# ADR-${c}: ${n}
|
|
27
38
|
|
|
28
39
|
**Status:** ✅ Accepted
|
|
29
40
|
**Date:** ${m}
|
|
@@ -35,7 +46,7 @@ ${a}
|
|
|
35
46
|
${o}
|
|
36
47
|
|
|
37
48
|
## Rationale
|
|
38
|
-
${
|
|
49
|
+
${l||""}
|
|
39
50
|
|
|
40
51
|
## Alternatives considered
|
|
41
52
|
| Option | Why rejected |
|
|
@@ -44,15 +55,15 @@ ${g}
|
|
|
44
55
|
|
|
45
56
|
## Consequences
|
|
46
57
|
${d||""}
|
|
47
|
-
`,y=i.default.join(s,"docs/architecture/decisions",
|
|
58
|
+
`,y=i.default.join(s,"docs/architecture/decisions",p);await e.default.mkdir(i.default.dirname(y),{recursive:!0}),await e.default.writeFile(y,w,"utf8");let b=i.default.join(s,"docs/architecture/decisions/_INDEX.md");try{let t=await e.default.readFile(b,"utf8");t=t.trimEnd()+`
|
|
48
59
|
| ADR-${c} | ${n} | ✅ Accepted | ${m} |
|
|
49
60
|
`,await e.default.writeFile(b,t,"utf8")}catch{await e.default.writeFile(b,`# ADR Index
|
|
50
61
|
|
|
51
62
|
| ADR | Title | Status | Date |
|
|
52
63
|
|-----|-------|--------|------|
|
|
53
64
|
| ADR-${c} | ${n} | ✅ Accepted | ${m} |
|
|
54
|
-
`,"utf8")}return await
|
|
55
|
-
**Last updated:** ${
|
|
65
|
+
`,"utf8")}return await st(s,{type:"decision_logged",actor:r,title:`ADR-${c}: ${n}`,detail:o.slice(0,100)}),{adrNumber:`ADR-${c}`,path:`docs/architecture/decisions/${p}`}}async function iK(t){try{return{content:await e.default.readFile(i.default.join(t,"memory","MEMORY.md"),"utf8"),exists:!0}}catch{return{content:"*(No MEMORY.md found — AI will create one at end of session)*",exists:!1}}}async function iZ(t,s,r="human"){let{currentState:n,justCompleted:a=[],workingOn:o="",upNext:l=[],issues:h=[],decisions:d=[],techDebt:u=[],handoff:c}=t,f=new Date,p=f.toISOString().split("T")[0],m=f.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),g=`# Project Memory
|
|
66
|
+
**Last updated:** ${p} at ${m}
|
|
56
67
|
|
|
57
68
|
## Current state
|
|
58
69
|
${n}
|
|
@@ -64,12 +75,12 @@ ${a.map(t=>`- ${t}`).join("\n")||"- (nothing this session)"}
|
|
|
64
75
|
${o||"(nothing active)"}
|
|
65
76
|
|
|
66
77
|
## Up next
|
|
67
|
-
${
|
|
78
|
+
${l.map((t,e)=>`${e+1}. ${t}`).join("\n")||"1. (define next steps)"}
|
|
68
79
|
|
|
69
80
|
## Active issues
|
|
70
81
|
| Issue | Severity | Status |
|
|
71
82
|
|-------|----------|--------|
|
|
72
|
-
${
|
|
83
|
+
${h.map(t=>"string"==typeof t?`| ${t} | medium | open |`:`| ${t.issue} | ${t.severity||"medium"} | ${t.status||"open"} |`).join("\n")||"| None | — | — |"}
|
|
73
84
|
|
|
74
85
|
## Recent decisions
|
|
75
86
|
${d.map(t=>`- ${t}`).join("\n")||"- (none this session)"}
|
|
@@ -79,10 +90,10 @@ ${u.map(t=>`- ${t}`).join("\n")||"- (none noted)"}
|
|
|
79
90
|
|
|
80
91
|
## Handoff for next session
|
|
81
92
|
${c}
|
|
82
|
-
`;await e.default.mkdir(i.default.join(s,"memory"),{recursive:!0}),await e.default.writeFile(i.default.join(s,"memory","MEMORY.md"),g,"utf8"),await
|
|
93
|
+
`;await e.default.mkdir(i.default.join(s,"memory"),{recursive:!0}),await e.default.writeFile(i.default.join(s,"memory","MEMORY.md"),g,"utf8"),await st(s,{type:"memory_updated",actor:r,title:"Session memory updated",detail:c.slice(0,120)})}let iQ=".vibedoc-activity.json",i0=".vibedoc-descriptions.json";async function i1(t){try{let s=await e.default.readFile(i.default.join(t,i0),"utf8");return JSON.parse(s)}catch{return{}}}async function i2(t,s){let r=i.default.join(t,i0);await e.default.mkdir(i.default.dirname(r),{recursive:!0}),await e.default.writeFile(r,JSON.stringify(s,null,2),"utf8")}async function i8(t,e,s){let r=i.default.normalize(e).replace(/\\/g,"/"),n=await i1(t);n[r]=s,await i2(t,n)}let i3=null;async function i4(){if(!i3){let{default:e}=await t.A(400829);i3=new e({apiKey:process.env.ANTHROPIC_API_KEY})}return i3}async function i6(t,s){let r=i.default.resolve(s),n=i.default.resolve(s,t);if(!n.startsWith(r+i.default.sep)&&n!==r)throw Error("Path outside root");let a=await i4(),o=await e.default.readFile(n,"utf8"),l=(await a.messages.create({model:"claude-haiku-4-5-20251001",max_tokens:100,messages:[{role:"user",content:`Write a single sentence (max 120 characters) describing what this file is about. Output ONLY the sentence, nothing else.
|
|
83
94
|
|
|
84
|
-
${o.slice(0,2e3)}`}]})).content.find(t=>"text"===t.type);if(!h)throw Error("No text block in Anthropic response");let l=h.text.trim().slice(0,120);return await iC(s,t,{description:l,source:"ai",updatedAt:new Date().toISOString()}),l}async function iT(t){let s=await ie(t),r=await iE(t);return Promise.all(s.map(async s=>{let n=r[s.path],a=n?.description??"",o=n?.source??"extracted",h=new Date().toISOString();try{h=(await e.default.stat(i.default.join(t,s.path))).mtime.toISOString()}catch{}let l=n?.updatedAt??h;if(!n)try{let r=await e.default.readFile(i.default.join(t,s.path),"utf8");a=function(t){let e=t.split("\n"),i="";for(let t of e){let e=t.match(/^#{1,3}\s+(.+)/);if(e&&!i){i=e[1].trim().slice(0,120);continue}let s=t.trim();if(s&&!s.startsWith("#")&&!s.startsWith("```")&&!s.startsWith("|")&&!s.startsWith("-")&&!s.startsWith("*")&&s.length>20)return s.slice(0,120)}return i}(r)}catch{}return{path:s.path,name:s.name,section:s.section,description:a,source:o,updatedAt:l,mtime:h}}))}let iF=globalThis,ij=iF.vibedocSessions??(iF.vibedocSessions=new Map);async function i_(t,s){let r,n,a=Date.now(),o={id:`evt_${a}_${Math.random().toString(36).slice(2,7)}`,timestamp:new Date(a).toISOString(),...s,sessionId:(r=`${t}\0${s.actor}`,(n=ij.get(r))&&"session_start"!==s.type&&!(a-n.lastAt>18e5)||(n={id:`ses_${a}_${Math.random().toString(36).slice(2,7)}`,lastAt:a},ij.set(r,n)),n.lastAt=a,n.id)},h=i.default.join(t,ik),l=[];try{let t=await e.default.readFile(h,"utf8");l=JSON.parse(t)}catch{}l.unshift(o),l.length>2e3&&(l=l.slice(0,2e3)),await e.default.writeFile(h,JSON.stringify(l,null,2),"utf8")}async function iD(t,s=50){try{let r=await e.default.readFile(i.default.join(t,ik),"utf8");return JSON.parse(r).slice(0,s)}catch{return[]}}async function iM(t,e="ai"){await i_(t,{type:"session_start",actor:e,title:"Session started",detail:"Agent connected"})}async function iP(t,s,r){let n,a=i.default.resolve(r),o=i.default.resolve(r,t);if(!o.startsWith(a+i.default.sep)&&o!==a)throw Error("Path outside root");try{n=await e.default.readFile(o,"utf8")}catch{throw Error(`Doc not found: ${t}`)}await e.default.writeFile(o,n.trimEnd()+"\n\n"+s,"utf8")}async function iN(t,s,r){let n=i.default.resolve(r),a=i.default.resolve(r,t),o=i.default.resolve(r,s);if(!a.startsWith(n+i.default.sep)&&a!==n||!o.startsWith(n+i.default.sep)&&o!==n)throw Error("Path outside root");await e.default.mkdir(i.default.dirname(o),{recursive:!0});try{await e.default.rename(a,o)}catch(t){if("EXDEV"===t.code)await e.default.copyFile(a,o),await e.default.unlink(a);else throw t}await i_(r,{type:"doc_renamed",actor:"human",title:`Renamed ${t} → ${s}`});try{let{exists:t}=await iB(r);t&&await iG(r)}catch{}}async function iW(t,s){let r=i.default.resolve(s),n=i.default.resolve(s,t);if(!n.startsWith(r+i.default.sep)&&n!==r)throw Error("Path outside root");await e.default.unlink(n),await i_(s,{type:"doc_deleted",actor:"human",title:`Deleted ${t}`});try{let{exists:t}=await iB(s);t&&await iG(s)}catch{}}let iL="docs/REGISTRY.md",iz="<!-- REGISTRY_ANNOTATIONS_START -->",iI="<!-- REGISTRY_ANNOTATIONS_END -->";function iU(t){let e=new Map,i=t.indexOf(iz),s=t.indexOf(iI);if(-1===i||-1===s)return e;for(let r of t.slice(i+iz.length,s).split("\n").filter(t=>t.startsWith("|")&&!t.includes("---")&&!t.includes("Path"))){let t=r.split("|").map(t=>t.trim()).filter(Boolean);t.length>=3&&e.set(t[0],{description:t[1],keywords:t[2]})}return e}async function iB(t){try{return{content:await e.default.readFile(i.default.join(t,iL),"utf8"),exists:!0}}catch{return{content:"*(No REGISTRY.md found — call vibedoc_rebuild_registry to generate it)*",exists:!1}}}async function iG(t,s="human"){let r=(await ie(t)).map(t=>t.path),n="";try{n=await e.default.readFile(i.default.join(t,iL),"utf8")}catch{}let a=iU(n),o=function(t){let e=new Map;for(let s of t){let t=i.default.dirname(s);e.has(t)||e.set(t,[]),e.get(t).push(i.default.basename(s))}let s=[],r=Array.from(e.keys()).sort(),n=new Set;return!function t(a,o){if(n.has(a))return;n.add(a);let h=" ".repeat(o);if("."!==a){let t=a.split("/");s.push(`${h}${t[t.length-1]}/`)}let l="."===a?0:o+1,d=" ".repeat(l);for(let t of(e.get(a)||[]).sort())s.push(`${d}${t}`);for(let e of r)e!==a&&i.default.dirname(e)===a&&t(e,l)}(".",0),s.join("\n")}(r),h=[];for(let t of r){let e=a.get(t);h.push(`| ${t} | ${e?.description??""} | ${e?.keywords??""} |`)}let l=new Date().toISOString(),d=["# Document Registry",`**Generated:** ${l} **Total:** ${r.length} files`,"","> Edit the Annotations table — it survives rebuilds.","> Run `vibedoc_rebuild_registry` after adding/removing docs.","","## File Tree","```",o,"```","","## Annotations","",iz,"| Path | Description | Keywords |","|------|-------------|----------|",...h,iI,""].join("\n");return await is(iL,d,t),await i_(t,{type:"registry_rebuilt",actor:s,title:"Document registry rebuilt",detail:`${r.length} files indexed`}),{path:iL,totalFiles:r.length}}async function iq(t,e,i,s){let{content:r,exists:n}=await iB(s);if(!n)throw Error("Registry not found — call vibedoc_rebuild_registry first");let a=iU(r);a.set(t,{description:e,keywords:i});let o=r.indexOf(iz),h=r.indexOf(iI);if(-1===o||-1===h)throw Error("Registry format invalid — rebuild first");let l=[iz,"| Path | Description | Keywords |","|------|-------------|----------|",...Array.from(a.entries()).map(([t,e])=>`| ${t} | ${e.description} | ${e.keywords} |`),iI].join("\n"),d=r.slice(0,o)+l+r.slice(h+iI.length);await is(iL,d,s)}async function iY(t,s){let r=await eY("**/*.md",{cwd:s,ignore:["node_modules/**",".git/**",".next/**"],nodir:!0}),n=t.replace(/\\/g,"/"),a=i.default.basename(n),o=[];for(let t of r)if(t.replace(/\\/g,"/")!==n)try{(await e.default.readFile(i.default.join(s,t),"utf8")).split("\n").forEach((e,i)=>{/\[.*\]\(.*\)/.test(e)&&(e.includes(a)||e.includes(n))&&o.push({file:t,line:i+1,text:e.trim().slice(0,120)})})}catch{}return o}async function iH(t){let[{tasks:e,board:s},r,n,a]=await Promise.all([id(t),ie(t),iv(t),iD(t,10)]);return{root:t,name:i.default.basename(t),tasks:{total:e.length,board:{todo:s.todo.length,"in-progress":s["in-progress"].length,blocked:s.blocked.length,done:s.done.length,cancelled:s.cancelled.length},active:s["in-progress"],blocked:s.blocked},docs:{total:r.length},memory:n,activity:a}}class iJ extends Error{status;constructor(t,e=400){super(t),this.status=e,this.name="RoadmapError"}}let iK=i.default.join("plans","roadmap"),iV=i.default.join(iK,"layout.json"),iX=["planned","in-progress","done"],iZ=/^\*\*([^*]+):\*\*/;function iQ(t){let e=String(t??"").trim().toUpperCase();if(!/^R\d+$/.test(e))throw new iJ(`Invalid roadmap id: ${String(t)}`);return e}function i0(t){let e=i.default.basename(t).match(/^(R\d+)(?:-|\.md$)/i);return e?e[1].toUpperCase():null}function i1(t){let e=String(t??"").toLowerCase().trim().replace(/\s+/g,"-");if(!iX.includes(e))throw new iJ(`Invalid status "${String(t)}" (expected ${iX.join(" | ")})`);return e}function i2(t){if(!Array.isArray(t))throw new iJ("tasks must be an array of task ids");return t.map(t=>{let e=String(t).trim().toUpperCase();if(!/^T\d+$/.test(e))throw new iJ(`Invalid task id: ${String(t)}`);return e})}function i8(t){let e=String(t??"").replace(/\s+/g," ").trim();if(!e)throw new iJ("Title is required");return e}function i3(t){let e=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);return e&&new Date(Date.UTC(+e[1],e[2]-1,+e[3])).toISOString().slice(0,10)===t?t:null}function i4(t){if(null===t||""===t)return null;let e="string"==typeof t?i3(t.trim()):null;if(!e)throw new iJ(`due must be a date YYYY-MM-DD (got ${JSON.stringify(t)})`);return e}function i6(t){let e=Number(t);if("number"!=typeof t||!Number.isFinite(e))throw new iJ("order must be a finite number");return e}function i5(t){let e=t.findIndex(t=>t.startsWith("# ")),i=e=e<0?0:e+1;for(;i<t.length&&""===t[i].trim();)i++;for(i<t.length&&iZ.test(t[i])&&(e=i);e<t.length&&iZ.test(t[e]);)e++;return e}function i7(t,e){let s=e.split("\n"),r=s.find(t=>t.startsWith("# ")),n=i0(t)??i.default.basename(t,".md").toUpperCase(),a=(r||"").replace(/^#+\s*/,"").replace(/^R\d+:\s*/i,"").trim()||n,o=i5(s),h={};for(let t of s.slice(0,Math.min(o,30))){let e=t.match(/\*\*([^*]+):\*\*\s*(.+)/);e&&(h[e[1].toLowerCase().trim()]=e[2].trim())}let l=(h.parent||"").toUpperCase(),d="planned";try{d=i1((h.status||"").replace(/[^a-z\s-]/gi,""))}catch{}let u=parseFloat(h.order||"");return{id:n,title:a,parent:/^R\d+$/.test(l)?l:null,status:d,order:Number.isFinite(u)?u:0,tasks:(h.tasks||"").split(/[,\s]+/).map(t=>t.toUpperCase()).filter(t=>/^T\d+$/.test(t)),due:i3(h.due||""),body:s.slice(o).join("\n").trim(),file:t}}async function i9(t){let s=await eY("plans/roadmap/R*.md",{cwd:t,nodir:!0}),r=[];for(let n of s)if(i0(n))try{let s=await e.default.readFile(i.default.join(t,n),"utf8");r.push({item:i7(n,s),raw:s})}catch{}return r}async function st(t,s){let r=iQ(t),n=(await eY(`plans/roadmap/${r}*.md`,{cwd:s,nodir:!0})).filter(t=>i0(t)===r).sort();if(0===n.length)throw new iJ(`Roadmap item not found: ${r}`,404);let a=await e.default.readFile(i.default.join(s,n[0]),"utf8");return{item:i7(n[0],a),raw:a}}function se(t,e,i){if(t===e)throw new iJ("An item cannot be its own parent");let s=i.find(e=>e.id===t);if(!s)throw new iJ(`Parent not found: ${t}`);if(null!==s.parent)throw new iJ(`Parent ${t} is not a horizon (max depth is 2)`)}function si(t){if("string"!=typeof t)throw new iJ("body must be a string");return t.trim()}let ss=Promise.resolve();function sr(t){let e=ss.then(t,t);return ss=e.catch(()=>{}),e}function sn(t){return t.length>0?t.join(", "):"—"}async function sa(t){var e;let i,[s,r]=await Promise.all([i9(t),sw(t)]);return{items:(e=s.map(t=>t.item),i=t=>parseInt(t.slice(1),10),e.sort((t,e)=>t.order-e.order||i(t.id)-i(e.id))),layout:r}}async function so(t,e){return(await st(t,e)).item}function sh(t,e,i="human"){return sr(()=>sp(t??{},e,i))}let sl=t=>`R${String(t).padStart(3,"0")}`;async function sd(t,s){let r=s.title.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,40),n=r?`${s.id}-${r}.md`:`${s.id}.md`,a=[`# ${s.id}: ${s.title}`,...s.parent?[`**Parent:** ${s.parent}`]:[],`**Status:** ${s.status}`,`**Order:** ${s.order}`,`**Tasks:** ${sn(s.tasks)}`,...s.due?[`**Due:** ${s.due}`]:[],""].join("\n")+(s.body?`
|
|
95
|
+
${o.slice(0,2e3)}`}]})).content.find(t=>"text"===t.type);if(!l)throw Error("No text block in Anthropic response");let h=l.text.trim().slice(0,120);return await i8(s,t,{description:h,source:"ai",updatedAt:new Date().toISOString()}),h}async function i5(t){let s=await ik(t),r=await i1(t);return Promise.all(s.map(async s=>{let n=r[s.path],a=n?.description??"",o=n?.source??"extracted",l=new Date().toISOString();try{l=(await e.default.stat(i.default.join(t,s.path))).mtime.toISOString()}catch{}let h=n?.updatedAt??l;if(!n)try{let r=await e.default.readFile(i.default.join(t,s.path),"utf8");a=function(t){let e=t.split("\n"),i="";for(let t of e){let e=t.match(/^#{1,3}\s+(.+)/);if(e&&!i){i=e[1].trim().slice(0,120);continue}let s=t.trim();if(s&&!s.startsWith("#")&&!s.startsWith("```")&&!s.startsWith("|")&&!s.startsWith("-")&&!s.startsWith("*")&&s.length>20)return s.slice(0,120)}return i}(r)}catch{}return{path:s.path,name:s.name,section:s.section,description:a,source:o,updatedAt:h,mtime:l}}))}let i7=globalThis,i9=i7.vibedocSessions??(i7.vibedocSessions=new Map);async function st(t,s){let r,n,a=Date.now(),o={id:`evt_${a}_${Math.random().toString(36).slice(2,7)}`,timestamp:new Date(a).toISOString(),...s,sessionId:(r=`${t}\0${s.actor}`,(n=i9.get(r))&&"session_start"!==s.type&&!(a-n.lastAt>18e5)||(n={id:`ses_${a}_${Math.random().toString(36).slice(2,7)}`,lastAt:a},i9.set(r,n)),n.lastAt=a,n.id)},l=i.default.join(t,iQ),h=[];try{let t=await e.default.readFile(l,"utf8");h=JSON.parse(t)}catch{}h.unshift(o),h.length>2e3&&(h=h.slice(0,2e3)),await e.default.writeFile(l,JSON.stringify(h,null,2),"utf8")}async function se(t,s,r){let n=i.default.join(t,iQ),a=[];try{a=JSON.parse(await e.default.readFile(n,"utf8"))}catch{}let o=a.slice(0,50).findIndex(t=>"doc_updated"===t.type&&t.detail===s),l=o>=0?a[o]:void 0;if(l&&l.actor===r&&Date.now()-Date.parse(l.timestamp)<6e5){a.splice(o,1),a.unshift({...l,timestamp:new Date().toISOString()}),await e.default.writeFile(n,JSON.stringify(a,null,2),"utf8");return}await st(t,{type:"doc_updated",actor:r,title:`Edited ${s}`,detail:s})}async function si(t,e){let i=(await ss(t,2e3)).find(t=>("doc_updated"===t.type||"doc_created"===t.type)&&t.detail===e);return i?{actor:i.actor,at:i.timestamp}:null}async function ss(t,s=50){try{let r=await e.default.readFile(i.default.join(t,iQ),"utf8");return JSON.parse(r).slice(0,s)}catch{return[]}}async function sr(t,e="ai"){await st(t,{type:"session_start",actor:e,title:"Session started",detail:"Agent connected"})}async function sn(t,s,r){let n,a=i.default.resolve(r),o=i.default.resolve(r,t);if(!o.startsWith(a+i.default.sep)&&o!==a)throw Error("Path outside root");try{n=await e.default.readFile(o,"utf8")}catch{throw Error(`Doc not found: ${t}`)}await e.default.writeFile(o,n.trimEnd()+"\n\n"+s,"utf8")}async function sa(t,s,r){let n=i.default.resolve(r),a=i.default.resolve(r,t),o=i.default.resolve(r,s);if(!a.startsWith(n+i.default.sep)&&a!==n||!o.startsWith(n+i.default.sep)&&o!==n)throw Error("Path outside root");if(o!==a&&await e.default.access(o).then(()=>!0,()=>!1))throw Error(`A file already exists at ${s}`);await e.default.mkdir(i.default.dirname(o),{recursive:!0});try{await e.default.rename(a,o)}catch(t){if("EXDEV"===t.code)await e.default.copyFile(a,o),await e.default.unlink(a);else throw t}await st(r,{type:"doc_renamed",actor:"human",title:`Renamed ${t} → ${s}`});try{let{exists:t}=await sc(r);t&&await sf(r)}catch{}}async function so(t,s){let r=i.default.resolve(s),n=i.default.resolve(s,t);if(!n.startsWith(r+i.default.sep)&&n!==r)throw Error("Path outside root");let a=await e.default.readFile(n,"utf8");await e.default.unlink(n),await st(s,{type:"doc_deleted",actor:"human",title:`Deleted ${t}`});try{let{exists:t}=await sc(s);t&&await sf(s)}catch{}return a}let sl="docs/REGISTRY.md",sh="<!-- REGISTRY_ANNOTATIONS_START -->",sd="<!-- REGISTRY_ANNOTATIONS_END -->";function su(t){let e=new Map,i=t.indexOf(sh),s=t.indexOf(sd);if(-1===i||-1===s)return e;for(let r of t.slice(i+sh.length,s).split("\n").filter(t=>t.startsWith("|")&&!t.includes("---")&&!t.includes("Path"))){let t=r.split("|").map(t=>t.trim()).filter(Boolean);t.length>=3&&e.set(t[0],{description:t[1],keywords:t[2]})}return e}async function sc(t){try{return{content:await e.default.readFile(i.default.join(t,sl),"utf8"),exists:!0}}catch{return{content:"*(No REGISTRY.md found — call vibedoc_rebuild_registry to generate it)*",exists:!1}}}async function sf(t,s="human"){let r=(await ik(t)).map(t=>t.path),n="";try{n=await e.default.readFile(i.default.join(t,sl),"utf8")}catch{}let a=su(n),o=function(t){let e=new Map;for(let s of t){let t=i.default.dirname(s);e.has(t)||e.set(t,[]),e.get(t).push(i.default.basename(s))}let s=[],r=Array.from(e.keys()).sort(),n=new Set;return!function t(a,o){if(n.has(a))return;n.add(a);let l=" ".repeat(o);if("."!==a){let t=a.split("/");s.push(`${l}${t[t.length-1]}/`)}let h="."===a?0:o+1,d=" ".repeat(h);for(let t of(e.get(a)||[]).sort())s.push(`${d}${t}`);for(let e of r)e!==a&&i.default.dirname(e)===a&&t(e,h)}(".",0),s.join("\n")}(r),l=[];for(let t of r){let e=a.get(t);l.push(`| ${t} | ${e?.description??""} | ${e?.keywords??""} |`)}let h=new Date().toISOString(),d=["# Document Registry",`**Generated:** ${h} **Total:** ${r.length} files`,"","> Edit the Annotations table — it survives rebuilds.","> Run `vibedoc_rebuild_registry` after adding/removing docs.","","## File Tree","```",o,"```","","## Annotations","",sh,"| Path | Description | Keywords |","|------|-------------|----------|",...l,sd,""].join("\n");return await ix(sl,d,t),await st(t,{type:"registry_rebuilt",actor:s,title:"Document registry rebuilt",detail:`${r.length} files indexed`}),{path:sl,totalFiles:r.length}}async function sp(t,e,i,s){let{content:r,exists:n}=await sc(s);if(!n)throw Error("Registry not found — call vibedoc_rebuild_registry first");let a=su(r);a.set(t,{description:e,keywords:i});let o=r.indexOf(sh),l=r.indexOf(sd);if(-1===o||-1===l)throw Error("Registry format invalid — rebuild first");let h=[sh,"| Path | Description | Keywords |","|------|-------------|----------|",...Array.from(a.entries()).map(([t,e])=>`| ${t} | ${e.description} | ${e.keywords} |`),sd].join("\n"),d=r.slice(0,o)+h+r.slice(l+sd.length);await ix(sl,d,s)}async function sm(t,s){let r=await eY("**/*.md",{cwd:s,ignore:["node_modules/**",".git/**",".next/**"],nodir:!0}),n=t.replace(/\\/g,"/"),a=i.default.basename(n),o=[];for(let t of r)if(t.replace(/\\/g,"/")!==n)try{(await e.default.readFile(i.default.join(s,t),"utf8")).split("\n").forEach((e,i)=>{/\[.*\]\(.*\)/.test(e)&&(e.includes(a)||e.includes(n))&&o.push({file:t,line:i+1,text:e.trim().slice(0,120)})})}catch{}return o}async function sg(t){let[{tasks:e,board:s},r,n,a]=await Promise.all([iR(t),ik(t),iK(t),ss(t,10)]);return{root:t,name:i.default.basename(t),tasks:{total:e.length,board:{todo:s.todo.length,"in-progress":s["in-progress"].length,review:s.review.length,blocked:s.blocked.length,done:s.done.length,cancelled:s.cancelled.length},active:s["in-progress"],blocked:s.blocked},docs:{total:r.length},memory:n,activity:a}}class sw extends Error{status;constructor(t,e=400){super(t),this.status=e,this.name="RoadmapError"}}let sy=i.default.join("plans","roadmap"),sb=i.default.join(sy,"layout.json"),sv=["planned","in-progress","paused","done"],sS=/^\*\*([^*]+):\*\*/;function sk(t){let e=String(t??"").trim().toUpperCase();if(!/^R\d+$/.test(e))throw new sw(`Invalid roadmap id: ${String(t)}`);return e}function s$(t){let e=i.default.basename(t).match(/^(R\d+)(?:-|\.md$)/i);return e?e[1].toUpperCase():null}function sx(t){let e=String(t??"").toLowerCase().trim().replace(/\s+/g,"-"),i="on-hold"===e?"paused":e;if(!sv.includes(i))throw new sw(`Invalid status "${String(t)}" (expected ${sv.join(" | ")})`);return i}function sE(t){if(!Array.isArray(t))throw new sw("tasks must be an array of task ids");return t.map(t=>{let e=String(t).trim().toUpperCase();if(!/^T\d+$/.test(e))throw new sw(`Invalid task id: ${String(t)}`);return e})}function sC(t){let e=String(t??"").replace(/\s+/g," ").trim();if(!e)throw new sw("Title is required");return e}function sO(t){let e=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);return e&&new Date(Date.UTC(+e[1],e[2]-1,+e[3])).toISOString().slice(0,10)===t?t:null}function sj(t){if(null===t||""===t)return null;let e="string"==typeof t?sO(t.trim()):null;if(!e)throw new sw(`due must be a date YYYY-MM-DD (got ${JSON.stringify(t)})`);return e}function sA(t){let e=Number(t);if("number"!=typeof t||!Number.isFinite(e))throw new sw("order must be a finite number");return e}function sT(t){let e=t.findIndex(t=>t.startsWith("# ")),i=e=e<0?0:e+1;for(;i<t.length&&""===t[i].trim();)i++;for(i<t.length&&sS.test(t[i])&&(e=i);e<t.length&&sS.test(t[e]);)e++;return e}function sR(t,e){let s=e.split("\n"),r=s.find(t=>t.startsWith("# ")),n=s$(t)??i.default.basename(t,".md").toUpperCase(),a=(r||"").replace(/^#+\s*/,"").replace(/^R\d+:\s*/i,"").trim()||n,o=sT(s),l={};for(let t of s.slice(0,Math.min(o,30))){let e=t.match(/\*\*([^*]+):\*\*\s*(.+)/);e&&(l[e[1].toLowerCase().trim()]=e[2].trim())}let h=(l.parent||"").toUpperCase(),d="planned";try{d=sx((l.status||"").replace(/[^a-z\s-]/gi,""))}catch{}let u=parseFloat(l.order||"");return{id:n,title:a,parent:/^R\d+$/.test(h)?h:null,status:d,order:Number.isFinite(u)?u:0,tasks:(l.tasks||"").split(/[,\s]+/).map(t=>t.toUpperCase()).filter(t=>/^T\d+$/.test(t)),due:sO(l.due||""),owner:io(l.owner),body:s.slice(o).join("\n").trim(),file:t}}async function sF(t){let s=await eY("plans/roadmap/R*.md",{cwd:t,nodir:!0}),r=[];for(let n of s)if(s$(n))try{let s=await e.default.readFile(i.default.join(t,n),"utf8");r.push({item:sR(n,s),raw:s})}catch{}return r}async function sD(t,s){let r=sk(t),n=(await eY(`plans/roadmap/${r}*.md`,{cwd:s,nodir:!0})).filter(t=>s$(t)===r).sort();if(0===n.length)throw new sw(`Roadmap item not found: ${r}`,404);let a=await e.default.readFile(i.default.join(s,n[0]),"utf8");return{item:sR(n[0],a),raw:a}}function s_(t,e,i){if(t===e)throw new sw("An item cannot be its own parent");let s=i.find(e=>e.id===t);if(!s)throw new sw(`Parent not found: ${t}`);if(null!==s.parent)throw new sw(`Parent ${t} is not a horizon (max depth is 2)`)}function sM(t){if("string"!=typeof t)throw new sw("body must be a string");return t.trim()}let sN=Promise.resolve();function sP(t){let e=sN.then(t,t);return sN=e.catch(()=>{}),e}function sW(t){return t.length>0?t.join(", "):"—"}async function sL(t){var e;let i,[s,r]=await Promise.all([sF(t),sV(t)]);return{items:(e=s.map(t=>t.item),i=t=>parseInt(t.slice(1),10),e.sort((t,e)=>t.order-e.order||i(t.id)-i(e.id))),layout:r}}async function sz(t,e){return(await sD(t,e)).item}function sI(t,e,i="human"){return sP(()=>sY(t??{},e,i))}let sU=t=>`R${String(t).padStart(3,"0")}`;async function sB(t,s){let r=s.title.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,40),n=r?`${s.id}-${r}.md`:`${s.id}.md`,a=[`# ${s.id}: ${s.title}`,...s.parent?[`**Parent:** ${s.parent}`]:[],`**Status:** ${s.status}`,`**Order:** ${s.order}`,`**Tasks:** ${sW(s.tasks)}`,...s.due?[`**Due:** ${s.due}`]:[],""].join("\n")+(s.body?`
|
|
85
96
|
${s.body}
|
|
86
|
-
`:"");await e.default.writeFile(i.default.join(t,iK,n),a,{flag:"wx",encoding:"utf8"})}async function su(t){return(await sc(t)).source}async function sc(t){let s;try{let s=function(t){let e=[],i=null,s=[],r=null,n=0,a=()=>{if(i&&n>0){i.body=s.join(" ").trim();let t=e.filter(t=>t.parent===i?.key).map(t=>t.status);"done"!==i.status&&(i.status=eV(t))}else i&&e.splice(e.indexOf(i),1);i=null,r=null,s=[],n=0};for(let o of t.split("\n")){let t=o.match(/^##\s+(.+?)\s*#*\s*$/);if(t){a();let s=eK(eJ(t[1]));i={key:`h${e.length}`,title:s,parent:null,status:eH.test(s)?"done":"planned",tasks:[],body:""},e.push(i);continue}if(!i)continue;if(/^#/.test(o)){a();continue}let h=o.match(/^[-*]\s+(?:\[([ xX])\]\s+)?(.*)$/);if(h){let t=h[2],s=t.match(/^\*\*(.+?)\*\*\s*(?:[—–:-]\s*)?(.*)$/),a=eK(eJ(s?s[1]:t));if(!a)continue;let o=h[1]?"x"===h[1].toLowerCase()?"done":"planned":"done"===i.status?"done":"planned";r={key:`f${e.length}`,title:a,parent:i.key,status:o,tasks:[],body:s?s[2].trim():""},e.push(r),n++;continue}let l=o.match(/^\s+(\S.*)$/);r&&l?r.body=[r.body,l[1].replace(/^[-*]\s+/,"- ")].filter(Boolean).join("\n"):!r&&o.trim()&&!/^-{3,}$/.test(o.trim())&&s.push(o.trim())}return a(),e}(await e.default.readFile(i.default.join(t,"ROADMAP.md"),"utf8"));if(s.length>0)return{source:"roadmap-md",drafts:s}}catch{}let{tasks:r}=await id(t),n=function(t){let e=new Map;for(let i of t){if("cancelled"===i.status)continue;let t=eJ(i.phase||"").replace(/^—$/,"")||"Unphased";e.set(t,[...e.get(t)??[],i])}let i=[...e.keys()].sort((t,e)=>eX(t)-eX(e)||t.localeCompare(e)),s=[];for(let t of i){let i=`h${s.length}`,r=(e.get(t)??[]).map(t=>({key:`f${t.id}`,title:eK(t.title),parent:i,status:"done"===t.status?"done":"in-progress"===t.status?"in-progress":"planned",tasks:[t.id],body:""}));s.push({key:i,title:eK(t),parent:null,status:eV(r.map(t=>t.status)),tasks:[],body:""},...r)}return s}(r);return n.length>0?{source:"tasks",drafts:n}:{source:"starter",drafts:[(s=(t,e,i,s)=>({key:t,title:e,parent:null,status:i,tasks:[],body:s}))("shipped","Shipped","done","What is already live."),s("now","Now","planned","What we are building right now."),s("next","Next","planned","Planned once the current work ships."),s("later","Later","planned","Ideas — not committed.")]}}async function sp(t,s,r){let n=i8(t.title),a=void 0===t.status?"planned":i1(t.status),o=void 0===t.tasks?[]:i2(t.tasks),h=void 0===t.body?"":si(t.body),l=void 0===t.due?null:i4(t.due),d=(await i9(s)).map(t=>t.item),u=null==t.parent||""===t.parent?null:iQ(t.parent);u&&se(u,null,d);let c=d.filter(t=>t.parent===u).map(t=>t.order),p=void 0===t.order?(c.length>0?Math.max(...c):0)+10:i6(t.order),f=d.map(t=>parseInt(t.id.slice(1),10)).filter(t=>!isNaN(t)),m=sl(f.length>0?Math.max(...f)+1:1);return await e.default.mkdir(i.default.join(s,iK),{recursive:!0}),await sd(s,{id:m,title:n,parent:u,status:a,order:p,tasks:o,due:l,body:h}),await i_(s,{type:"roadmap_updated",actor:r,title:`${m} created`,detail:n}),so(m,s)}function sf(t,e,i,s="human"){return sr(()=>sm(t,e,i,s))}async function sm(t,s,r,n){let a,{item:o,raw:h}=await st(t,r),l=s??{},d=void 0===l.title?void 0:i8(l.title),u=void 0===l.status?void 0:i1(l.status),c=void 0===l.order?void 0:i6(l.order),p=void 0===l.tasks?void 0:i2(l.tasks),f=void 0===l.body?void 0:si(l.body),m=void 0===l.due?void 0:i4(l.due);if(void 0!==l.parent&&null!==(a=null===l.parent||""===l.parent?null:iQ(l.parent))){let t=(await i9(r)).map(t=>t.item);if(se(a,o.id,t),t.some(t=>t.parent===o.id))throw new iJ(`${o.id} has children and cannot be given a parent`)}let g=h.split("\n");if(void 0!==d){let t=g.findIndex(t=>t.startsWith("# "));t>=0?g[t]=`# ${o.id}: ${d}`:g.unshift(`# ${o.id}: ${d}`)}let w=i5(g),y=g.slice(0,w),b=g.slice(w),v=(t,e)=>{let i=y.findIndex(e=>e.match(iZ)?.[1].trim().toLowerCase()===t.toLowerCase());if(null===e){i>=0&&y.splice(i,1);return}let s=`**${t}:** ${e}`;i>=0?y[i]=s:y.push(s)};void 0!==a&&v("Parent",a),void 0!==u&&v("Status",u),void 0!==c&&v("Order",String(c)),void 0!==p&&v("Tasks",sn(p)),void 0!==m&&v("Due",m),void 0!==f&&(b=f?["",f,""]:[""]),await e.default.writeFile(i.default.join(r,o.file),[...y,...b].join("\n"),"utf8");let S=await so(o.id,r);return await i_(r,{type:"roadmap_updated",actor:n,title:`${o.id} updated`,detail:S.title}),S}async function sg(t,s,r){let{item:n}=await st(t,s),a=(await i9(s)).map(t=>t.item).filter(t=>t.parent===n.id).map(t=>t.id);if(a.length>0)throw new iJ(`${n.id} still has children (${a.join(", ")}); move or delete them first`);await e.default.unlink(i.default.join(s,n.file)),await sy({},s),await i_(s,{type:"roadmap_updated",actor:r,title:`${n.id} deleted`,detail:n.title})}async function sw(t){try{let s=JSON.parse(await e.default.readFile(i.default.join(t,iV),"utf8"));if(!s||"object"!=typeof s||Array.isArray(s))return{};let r={};for(let[t,e]of Object.entries(s))e&&Number.isFinite(e.x)&&Number.isFinite(e.y)&&(r[t]={x:e.x,y:e.y});return r}catch{return{}}}async function sy(t,s){let r={};for(let[e,i]of Object.entries(t??{})){let t=e.trim().toUpperCase();if(!(/^R\d+$/.test(t)&&i&&"object"==typeof i&&"number"==typeof i.x&&"number"==typeof i.y&&Number.isFinite(i.x)&&Number.isFinite(i.y)))throw new iJ(`Invalid position for ${e}`);r[t]={x:i.x,y:i.y}}let n={...await sw(s),...r},a=new Set((await i9(s)).map(t=>t.item.id)),o={};for(let t of Object.keys(n).sort())a.has(t)&&(o[t]=n[t]);return await e.default.mkdir(i.default.join(s,iK),{recursive:!0}),await e.default.writeFile(i.default.join(s,iV),JSON.stringify(o,null,2)+"\n","utf8"),o}let sb={roadmap:"roadmap-planner",breakdown:"epic-breakdown"};async function sv(t){if(!Object.hasOwn(sb,t))throw Error(`Unknown planning kind "${t}" (expected: ${Object.keys(sb).join(", ")})`);return(await e.default.readFile(i.default.join(process.cwd(),"skills",sb[t],"SKILL.md"),"utf-8")).replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n/,"").trimStart()}t.s(["RoadmapError",0,iJ,"appendDoc",0,iP,"applyPlan",0,function(t,e,i,s="human"){return t?.kind==="roadmap"?sr(async()=>{let[r,{tasks:n}]=await Promise.all([i9(i),id(i)]),a=iw(t,e,r.map(t=>t.item),n.map(t=>t.id));if("roadmap"!==a.kind)throw new iJ("expected a roadmap plan");let o=new Map,h=[];for(let t of a.horizons){let e=await sp({title:t.title.trim(),body:t.body},i,s);o.set(t.key.trim(),e.id),h.push({key:t.key,id:e.id,file:e.file})}for(let t of a.epics){let e=o.get(t.parent.trim())??t.parent.trim().toUpperCase(),r=await sp({title:t.title.trim(),parent:e,status:t.status,body:t.body},i,s);h.push({key:t.key,id:r.id,file:r.file})}return{created:h,epic:null}}):im(async()=>{let[{items:r},{tasks:n}]=await Promise.all([sa(i),id(i)]),a=iw(t,e,r,n.map(t=>t.id));if("breakdown"!==a.kind)throw new iJ("expected a breakdown plan");let o=a.epic?.trim()?await so(a.epic,i):a.newEpic?await sh({title:a.newEpic.title.trim(),parent:a.newEpic.parent.trim().toUpperCase(),body:a.newEpic.body},i,s):null,h=new Map,l=[];for(let t of a.tasks){let e=(t.dependsOn??[]).map(t=>h.get(t.trim())??t.trim().toUpperCase()),s=await ig({title:t.title.trim(),phase:o?`${o.id} — ${o.title}`:void 0,size:t.size,dependsOn:e.join(", ")||void 0,due:t.due,body:t.body},i);h.set(t.key.trim(),s.id),l.push({key:t.key,id:s.id,file:s.file})}if(!o)return{created:l,epic:null};let d=await so(o.id,i),u=await sf(o.id,{tasks:[...d.tasks,...l.map(t=>t.id)]},i,s);return{created:l,epic:u}})},"claimNextTask",0,function(t,e){return im(async()=>{let i=await so(t,e);if(!i.parent)throw Error(`${i.id} is a horizon; pass an epic id`);let{tasks:s}=await id(e),r=function(t,e){let i=new Map(e.map(t=>[t.id,t])),s=t.tasks.map(t=>i.get(t)).filter(t=>!!t),r=t=>[...new Set((t.dependsOn.match(/\bT\d+\b/gi)??[]).map(t=>t.toUpperCase()))].filter(t=>{let e=i.get(t);return!e||!eZ(e.status)});for(let t of s)if("todo"===t.status&&!r(t).length)return{kind:"ready",taskId:t.id};if(s.every(t=>eZ(t.status)))return{kind:"finished"};let n=new Set(t.tasks),a=new Map,o=t=>{if(a.has(t))return a.get(t)??!1;a.set(t,!1);let e=i.get(t),s=!!e&&"blocked"!==e.status&&("todo"!==e.status||n.has(t)&&r(e).every(o));return a.set(t,s),s},h=[];for(let e of t.tasks){let t=i.get(e);if(t){if("in-progress"===t.status)h.push({taskId:e,reason:`${e} is in progress (claimed)`});else if("blocked"===t.status)h.push({taskId:e,reason:`${e} is blocked`});else if("todo"===t.status){let s=r(t).map(t=>`${t} (${i.get(t)?.status??"missing"})`);h.push({taskId:e,reason:`${e} waits on ${s.join(", ")}`})}}else h.push({taskId:e,reason:`${e} has no task file`})}return{kind:"waiting",waiting:h,needsHuman:h.every(t=>!o(t.taskId))}}(i,s);if("ready"!==r.kind)return{result:r};let{task:n,previousStatus:a}=await ic(r.taskId,"in-progress",e,"ai");return{result:r,task:n,previousStatus:a}})},"createDoc",0,io,"createRoadmapItem",0,sh,"createTask",0,function(t,e){return im(()=>ig(t,e))},"deleteDoc",0,iW,"deleteRoadmapItem",0,function(t,e,i="human"){return sr(()=>sg(t,e,i))},"detectRoadmapSource",0,su,"discoverProjects",0,it,"editDoc",0,ir,"enrichDescription",0,iR,"findBacklinks",0,iY,"generateRoadmap",0,function(t,s="human"){return sr(async()=>{if((await i9(t)).length>0)throw new iJ("Roadmap already exists");let{source:r,drafts:n}=await sc(t),a=new Map(n.map((t,e)=>[t.key,sl(e+1)])),o=new Map;for(let s of(await e.default.mkdir(i.default.join(t,iK),{recursive:!0}),n)){let e=(o.get(s.parent)??0)+1;o.set(s.parent,e),await sd(t,{id:a.get(s.key),title:s.title,parent:null===s.parent?null:a.get(s.parent)??null,status:s.status,order:10*e,tasks:s.tasks,due:null,body:s.body})}await i_(t,{type:"roadmap_updated",actor:s,title:`Roadmap generated (${n.length} items)`,detail:`from ${r}`});let{items:h}=await sa(t);return{items:h,source:r}})},"getConfiguredRoot",0,e9,"getContext",0,ia,"getProjectSummary",0,iH,"getTask",0,iu,"listDocs",0,ie,"listExplorerFiles",0,iT,"listRoadmap",0,sa,"listTasks",0,id,"logDecision",0,ib,"logSessionStart",0,iM,"readActivity",0,iD,"readDoc",0,ii,"readMemory",0,iv,"readPlanningSkill",0,sv,"readRegistry",0,iB,"rebuildRegistry",0,iG,"renameDoc",0,iN,"searchDocs",0,ih,"updateMemory",0,iS,"updateRegistryAnnotation",0,iq,"updateRoadmapItem",0,sf,"updateTaskStatus",0,ic,"writeDoc",0,is,"writeRoadmapLayout",0,function(t,e){return sr(()=>sy(t,e))}],799501)}];
|
|
97
|
+
`:"");await e.default.writeFile(i.default.join(t,sy,n),a,{flag:"wx",encoding:"utf8"})}async function sG(t){return(await sq(t)).source}async function sq(t){let s;try{let s=function(t){let e=[],i=null,s=[],r=null,n=0,a=()=>{if(i&&n>0){i.body=s.join(" ").trim();let t=e.filter(t=>t.parent===i?.key).map(t=>t.status);"done"!==i.status&&(i.status=eV(t))}else i&&e.splice(e.indexOf(i),1);i=null,r=null,s=[],n=0};for(let o of t.split("\n")){let t=o.match(/^##\s+(.+?)\s*#*\s*$/);if(t){a();let s=eX(eH(t[1]));i={key:`h${e.length}`,title:s,parent:null,status:eJ.test(s)?"done":"planned",tasks:[],body:""},e.push(i);continue}if(!i)continue;if(/^#/.test(o)){a();continue}let l=o.match(/^[-*]\s+(?:\[([ xX])\]\s+)?(.*)$/);if(l){let t=l[2],s=t.match(/^\*\*(.+?)\*\*\s*(?:[—–:-]\s*)?(.*)$/),a=eX(eH(s?s[1]:t));if(!a)continue;let o=l[1]?"x"===l[1].toLowerCase()?"done":"planned":"done"===i.status?"done":"planned";r={key:`f${e.length}`,title:a,parent:i.key,status:o,tasks:[],body:s?s[2].trim():""},e.push(r),n++;continue}let h=o.match(/^\s+(\S.*)$/);r&&h?r.body=[r.body,h[1].replace(/^[-*]\s+/,"- ")].filter(Boolean).join("\n"):!r&&o.trim()&&!/^-{3,}$/.test(o.trim())&&s.push(o.trim())}return a(),e}(await e.default.readFile(i.default.join(t,"ROADMAP.md"),"utf8"));if(s.length>0)return{source:"roadmap-md",drafts:s}}catch{}let{tasks:r}=await iR(t),n=function(t){let e=new Map;for(let i of t){if("cancelled"===i.status)continue;let t=eH(i.phase||"").replace(/^—$/,"")||"Unphased";e.set(t,[...e.get(t)??[],i])}let i=[...e.keys()].sort((t,e)=>eK(t)-eK(e)||t.localeCompare(e)),s=[];for(let t of i){let i=`h${s.length}`,r=(e.get(t)??[]).map(t=>({key:`f${t.id}`,title:eX(t.title),parent:i,status:"done"===t.status?"done":"in-progress"===t.status?"in-progress":"planned",tasks:[t.id],body:""}));s.push({key:i,title:eX(t),parent:null,status:eV(r.map(t=>t.status)),tasks:[],body:""},...r)}return s}(r);return n.length>0?{source:"tasks",drafts:n}:{source:"starter",drafts:[(s=(t,e,i,s)=>({key:t,title:e,parent:null,status:i,tasks:[],body:s}))("shipped","Shipped","done","What is already live."),s("now","Now","planned","What we are building right now."),s("next","Next","planned","Planned once the current work ships."),s("later","Later","planned","Ideas — not committed.")]}}async function sY(t,s,r){let n=sC(t.title),a=void 0===t.status?"planned":sx(t.status),o=void 0===t.tasks?[]:sE(t.tasks),l=void 0===t.body?"":sM(t.body),h=void 0===t.due?null:sj(t.due),d=(await sF(s)).map(t=>t.item),u=null==t.parent||""===t.parent?null:sk(t.parent);u&&s_(u,null,d);let c=d.filter(t=>t.parent===u).map(t=>t.order),f=void 0===t.order?(c.length>0?Math.max(...c):0)+10:sA(t.order),p=d.map(t=>parseInt(t.id.slice(1),10)).filter(t=>!isNaN(t)),m=sU(p.length>0?Math.max(...p)+1:1);return await e.default.mkdir(i.default.join(s,sy),{recursive:!0}),await sB(s,{id:m,title:n,parent:u,status:a,order:f,tasks:o,due:h,body:l}),await st(s,{type:"roadmap_updated",actor:r,title:`${m} created`,detail:n}),sz(m,s)}function sJ(t,e,i,s="human"){return sP(()=>sH(t,e,i,s))}async function sH(t,s,r,n){let a,o,{item:l,raw:h}=await sD(t,r),d=s??{},u=void 0===d.title?void 0:sC(d.title),c=void 0===d.status?void 0:sx(d.status),f=void 0===d.order?void 0:sA(d.order),p=void 0===d.tasks?void 0:sE(d.tasks),m=void 0===d.body?void 0:sM(d.body),g=void 0===d.due?void 0:sj(d.due);if(void 0!==d.owner&&(a=null===d.owner||""===d.owner?null:io(d.owner),d.owner&&!a))throw new sw(`owner must be "human" or "ai:<agent>" (got ${JSON.stringify(d.owner)})`);if(void 0!==d.parent&&null!==(o=null===d.parent||""===d.parent?null:sk(d.parent))){let t=(await sF(r)).map(t=>t.item);if(s_(o,l.id,t),t.some(t=>t.parent===l.id))throw new sw(`${l.id} has children and cannot be given a parent`)}let w=h.split("\n");if(void 0!==u){let t=w.findIndex(t=>t.startsWith("# "));t>=0?w[t]=`# ${l.id}: ${u}`:w.unshift(`# ${l.id}: ${u}`)}let y=sT(w),b=w.slice(0,y),v=w.slice(y),S=(t,e)=>{let i=b.findIndex(e=>e.match(sS)?.[1].trim().toLowerCase()===t.toLowerCase());if(null===e){i>=0&&b.splice(i,1);return}let s=`**${t}:** ${e}`;i>=0?b[i]=s:b.push(s)};void 0!==o&&S("Parent",o),void 0!==c&&S("Status",c),void 0!==f&&S("Order",String(f)),void 0!==p&&S("Tasks",sW(p)),void 0!==g&&S("Due",g),void 0!==a&&S("Owner",a),void 0!==m&&(v=m?["",m,""]:[""]),await e.default.writeFile(i.default.join(r,l.file),[...b,...v].join("\n"),"utf8");let k=await sz(l.id,r);return await st(r,{type:"roadmap_updated",actor:n,title:`${l.id} updated`,detail:k.title}),k}async function sX(t,s,r){let{item:n,raw:a}=await sD(t,s),o=(await sV(s))[n.id]??null,l=(await sF(s)).map(t=>t.item).filter(t=>t.parent===n.id).map(t=>t.id);if(l.length>0)throw new sw(`${n.id} still has children (${l.join(", ")}); move or delete them first`);return await e.default.unlink(i.default.join(s,n.file)),await sK({},s),await st(s,{type:"roadmap_updated",actor:r,title:`${n.id} deleted`,detail:n.title}),{item:n,raw:a,position:o}}async function sV(t){try{let s=JSON.parse(await e.default.readFile(i.default.join(t,sb),"utf8"));if(!s||"object"!=typeof s||Array.isArray(s))return{};let r={};for(let[t,e]of Object.entries(s))e&&Number.isFinite(e.x)&&Number.isFinite(e.y)&&(r[t]={x:e.x,y:e.y});return r}catch{return{}}}async function sK(t,s){let r={};for(let[e,i]of Object.entries(t??{})){let t=e.trim().toUpperCase();if(!(/^R\d+$/.test(t)&&i&&"object"==typeof i&&"number"==typeof i.x&&"number"==typeof i.y&&Number.isFinite(i.x)&&Number.isFinite(i.y)))throw new sw(`Invalid position for ${e}`);r[t]={x:i.x,y:i.y}}let n={...await sV(s),...r},a=new Set((await sF(s)).map(t=>t.item.id)),o={};for(let t of Object.keys(n).sort())a.has(t)&&(o[t]=n[t]);return await e.default.mkdir(i.default.join(s,sy),{recursive:!0}),await e.default.writeFile(i.default.join(s,sb),JSON.stringify(o,null,2)+"\n","utf8"),o}let sZ={roadmap:"roadmap-planner",breakdown:"epic-breakdown"};async function sQ(t){if(!Object.hasOwn(sZ,t))throw Error(`Unknown planning kind "${t}" (expected: ${Object.keys(sZ).join(", ")})`);return(await e.default.readFile(i.default.join(process.cwd(),"skills",sZ[t],"SKILL.md"),"utf-8")).replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n/,"").trimStart()}let s0=i.default.join(".vibedoc","chats"),s1=/^[a-z0-9-]{1,64}$/;function s2(t,e){if(!s1.test(t))throw Error(`Invalid chat id "${t}"`);return i.default.join(e,s0,`${t}.json`)}async function s8(t){let s=i.default.join(t,s0),r=await e.default.readdir(s).catch(()=>[]);return(await Promise.all(r.filter(t=>t.endsWith(".json")).map(async t=>{try{return JSON.parse(await e.default.readFile(i.default.join(s,t),"utf-8"))}catch(e){return console.warn(`[vibedoc] skipping unreadable chat ${t}: ${e.message}`),null}}))).filter(t=>null!==t)}async function s3(t,s){let r=t?.id;if("string"!=typeof r)throw Error("chat.id is required");let n=s2(r,s);await e.default.mkdir(i.default.dirname(n),{recursive:!0});let a=`${n}.tmp`;await e.default.writeFile(a,JSON.stringify(t),"utf-8"),await e.default.rename(a,n)}async function s4(t,i){await e.default.rm(s2(t,i),{force:!0})}let s6=i.default.join(".vibedoc","views.json");async function s5(t){let s;try{s=await e.default.readFile(i.default.join(t,s6),"utf-8")}catch{return null}try{let t=JSON.parse(s)?.views;if(!Array.isArray(t))throw Error('"views" is not an array');return t}catch(t){return console.warn(`[vibedoc] ignoring unreadable ${s6}: ${t.message}`),null}}async function s7(t,s){let r=i.default.join(s,s6);await e.default.mkdir(i.default.dirname(r),{recursive:!0});let n=`${r}.tmp`;await e.default.writeFile(n,JSON.stringify({views:t},null,2)+"\n","utf-8"),await e.default.rename(n,r)}t.s(["RoadmapError",0,sw,"TaskStateError",0,iB,"appendDoc",0,sn,"applyPlan",0,function(t,e,i,s="human"){return t?.kind==="roadmap"?sP(async()=>{let[r,{tasks:n}]=await Promise.all([sF(i),iR(i)]),a=iX(t,e,r.map(t=>t.item),n.map(t=>t.id));if("roadmap"!==a.kind)throw new sw("expected a roadmap plan");let o=new Map,l=[];for(let t of a.horizons){let e=await sY({title:t.title.trim(),body:t.body},i,s);o.set(t.key.trim(),e.id),l.push({key:t.key,id:e.id,file:e.file})}for(let t of a.epics){let e=o.get(t.parent.trim())??t.parent.trim().toUpperCase(),r=await sY({title:t.title.trim(),parent:e,status:t.status,body:t.body},i,s);l.push({key:t.key,id:r.id,file:r.file})}return{created:l,epic:null}}):iJ(async()=>{let[{items:r},{tasks:n}]=await Promise.all([sL(i),iR(i)]),a=iX(t,e,r,n.map(t=>t.id));if("breakdown"!==a.kind)throw new sw("expected a breakdown plan");let o=a.epic?.trim()?await sz(a.epic,i):a.newEpic?await sI({title:a.newEpic.title.trim(),parent:a.newEpic.parent.trim().toUpperCase(),body:a.newEpic.body},i,s):null,l=new Map,h=[];for(let t of a.tasks){let e=(t.dependsOn??[]).map(t=>l.get(t.trim())??t.trim().toUpperCase()),s=await iH({title:t.title.trim(),phase:o?`${o.id} — ${o.title}`:void 0,size:t.size,dependsOn:e.join(", ")||void 0,due:t.due,body:t.body},i);l.set(t.key.trim(),s.id),h.push({key:t.key,id:s.id,file:s.file})}if(!o)return{created:h,epic:null};let d=await sz(o.id,i),u=await sJ(o.id,{tasks:[...d.tasks,...h.map(t=>t.id)]},i,s);return{created:h,epic:u}})},"approveTask",0,function(t,e,i=""){return iG(t,"approved",i,"done",e)},"bulkTasks",0,iz,"claimNextTask",0,function(t,e,i){return iJ(async()=>{let s=await sz(t,e);if(!s.parent)throw Error(`${s.id} is a horizon; pass an epic id`);let{tasks:r}=await iR(e),n=function(t,e){let i=new Map(e.map(t=>[t.id,t])),s=t.tasks.map(t=>i.get(t)).filter(t=>!!t),r=t=>[...new Set((t.dependsOn.match(/\bT\d+\b/gi)??[]).map(t=>t.toUpperCase()))].filter(t=>{let e=i.get(t);return!e||!eZ(e.status)});for(let t of s)if("todo"===t.status&&!r(t).length)return{kind:"ready",taskId:t.id};if(s.every(t=>eZ(t.status)))return{kind:"finished"};let n=new Set(t.tasks),a=new Map,o=t=>{if(a.has(t))return a.get(t)??!1;a.set(t,!1);let e=i.get(t),s=!!e&&"blocked"!==e.status&&"paused"!==e.status&&"review"!==e.status&&("todo"!==e.status||n.has(t)&&r(e).every(o));return a.set(t,s),s},l=[];for(let e of t.tasks){let t=i.get(e);if(t){if("in-progress"===t.status)l.push({taskId:e,reason:`${e} is in progress (claimed)`});else if("blocked"===t.status)l.push({taskId:e,reason:`${e} is blocked`});else if("paused"===t.status)l.push({taskId:e,reason:`${e} is paused — needs a human to resume it`});else if("review"===t.status)l.push({taskId:e,reason:`${e} in review — needs a human`});else if("todo"===t.status){let s=r(t).map(t=>`${t} (${i.get(t)?.status??"missing"})`);l.push({taskId:e,reason:`${e} waits on ${s.join(", ")}`})}}else l.push({taskId:e,reason:`${e} has no task file`})}return{kind:"waiting",waiting:l,needsHuman:l.every(t=>!o(t.taskId))}}(s,r);if("ready"!==n.kind)return{result:n};let{task:a,previousStatus:o}=await iM(n.taskId,"in-progress",e,"ai",{actor:"ai",agent:i});return{result:n,task:a,previousStatus:o}})},"createDoc",0,iO,"createRoadmapItem",0,sI,"createTask",0,function(t,e){return iJ(()=>iH(t,e))},"deleteChat",0,s4,"deleteDoc",0,so,"deleteRoadmapItem",0,function(t,e,i="human"){return sP(()=>sX(t,e,i))},"deleteTask",0,iW,"detectRoadmapSource",0,sG,"discoverProjects",0,iS,"docLastEdit",0,si,"editDoc",0,iE,"enrichDescription",0,i6,"findBacklinks",0,sm,"generateRoadmap",0,function(t,s="human"){return sP(async()=>{if((await sF(t)).length>0)throw new sw("Roadmap already exists");let{source:r,drafts:n}=await sq(t),a=new Map(n.map((t,e)=>[t.key,sU(e+1)])),o=new Map;for(let s of(await e.default.mkdir(i.default.join(t,sy),{recursive:!0}),n)){let e=(o.get(s.parent)??0)+1;o.set(s.parent,e),await sB(t,{id:a.get(s.key),title:s.title,parent:null===s.parent?null:a.get(s.parent)??null,status:s.status,order:10*e,tasks:s.tasks,due:null,body:s.body})}await st(t,{type:"roadmap_updated",actor:s,title:`Roadmap generated (${n.length} items)`,detail:`from ${r}`});let{items:l}=await sL(t);return{items:l,source:r}})},"getConfiguredRoot",0,iv,"getContext",0,iC,"getProjectSummary",0,sg,"getTask",0,iF,"listChats",0,s8,"listDocs",0,ik,"listExplorerFiles",0,i5,"listRoadmap",0,sL,"listTasks",0,iR,"logDecision",0,iV,"logSessionStart",0,sr,"noteDocEdit",0,se,"readActivity",0,ss,"readDoc",0,i$,"readMemory",0,iK,"readPlanningSkill",0,sQ,"readProjectSettings",0,iD,"readRegistry",0,sc,"readViews",0,s5,"rebuildRegistry",0,sf,"renameDoc",0,sa,"restoreRoadmapItem",0,function(t,s,r,n,a="human"){return sP(async()=>{if(!iI(t,sy,/^R\d+[^/]*\.md$/)||"string"!=typeof s)throw new sw("Invalid roadmap item to restore");let o=s$(t);if(!o)throw new sw("Invalid roadmap item to restore");if(await sD(o,n).then(()=>!0,()=>!1))throw new sw(`${o} already exists`);return await e.default.mkdir(i.default.join(n,sy),{recursive:!0}),await e.default.writeFile(i.default.join(n,t),s,{flag:"wx",encoding:"utf8"}),r&&await sK({[o]:r},n),await st(n,{type:"roadmap_updated",actor:a,title:`${o} restored`}),(await sD(o,n)).item})},"restoreTask",0,function(t,s,r,n,a="human"){return iJ(async()=>{if(!iI(t,"plans/tasks",/^T\d+[^/]*\.md$/)||"string"!=typeof s)throw new sw("Invalid task to restore");let o=i.default.basename(t).match(/^(T\d+)/i)[1].toUpperCase();if(await iF(o,n).then(()=>!0,()=>!1))throw new sw(`${o} already exists`);await e.default.mkdir(i.default.join(n,"plans/tasks"),{recursive:!0}),await e.default.writeFile(i.default.join(n,t),s,{flag:"wx",encoding:"utf8"});let{items:l}=await sL(n);for(let t of Array.isArray(r)?r:[]){let e=l.find(e=>e.id===t?.epic);if(!e||e.tasks.includes(o))continue;let i=[...e.tasks];i.splice(Math.max(0,Math.min(Number(t.index)||0,i.length)),0,o),await sJ(e.id,{tasks:i},n,a)}return await st(n,{type:"task_updated",actor:a,title:`${o} restored`,taskId:o}),iF(o,n)})},"saveChat",0,s3,"saveManualTests",0,iU,"saveViews",0,s7,"searchDocs",0,ij,"sendBackTask",0,function(t,e,i){return iG(t,"changes requested",e,"todo",i)},"setManualTestChecked",0,iq,"updateMemory",0,iZ,"updateRegistryAnnotation",0,sp,"updateRoadmapItem",0,sJ,"updateTaskMeta",0,iP,"updateTaskStatus",0,iM,"writeDoc",0,ix,"writeRoadmapLayout",0,function(t,e){return sP(()=>sK(t,e))}],799501)}];
|
|
87
98
|
|
|
88
99
|
//# sourceMappingURL=%5Broot-of-the-server%5D__1613hjb._.js.map
|