tower-studio 0.2.15 → 0.2.16
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/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +56 -140
- package/.next/standalone/.next/server/app/_not-found/page.js +8 -10
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +118 -190
- package/.next/standalone/.next/server/app/missions/page.js +9 -10
- package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +56 -140
- package/.next/standalone/.next/server/app/onboarding/page.js +8 -10
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding.html +1 -1
- package/.next/standalone/.next/server/app/onboarding.rsc +17 -17
- package/.next/standalone/.next/server/app/onboarding.segments/_full.segment.rsc +17 -17
- package/.next/standalone/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/onboarding.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +56 -140
- package/.next/standalone/.next/server/app/page.js +8 -10
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +88 -148
- package/.next/standalone/.next/server/app/settings/page.js +9 -11
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +17 -17
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +17 -17
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +146 -218
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +9 -11
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +148 -184
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +9 -11
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +102 -186
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +8 -10
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +126 -198
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +9 -11
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +56 -140
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +9 -11
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +120 -192
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +9 -11
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +154 -226
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +10 -11
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +82 -166
- package/.next/standalone/.next/server/app/workspaces/page.js +8 -10
- package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
- package/.next/standalone/.next/server/chunks/[externals]__0m6hc.0._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03j20vp._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05se6yk._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05~g1fm._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0pg9aea._.js → [root-of-the-server]__0_6swdz._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0sfk~2k._.js → [root-of-the-server]__0hc9vir._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ge1~qa._.js → [root-of-the-server]__0hclpb.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ag-i9m._.js → [root-of-the-server]__0j8xb6s._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0mizcpa._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0jf72nm._.js → [root-of-the-server]__0o3ggen._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__124i0i-._.js → [root-of-the-server]__0qdvear._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0g2lv9x._.js → [root-of-the-server]__0r9mscb._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wuzc5o._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~rm9q.._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{0se9_next_0agnfwf._.js → 0se9_next_11h0sx_._.js} +4 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b7rna9._.js → [root-of-the-server]__0-pzjth._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00l2th1._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0x81w9c._.js → [root-of-the-server]__057bwkf._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-pcbjc._.js → [root-of-the-server]__063j5j2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07l.j.t._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__04nht4_._.js → [root-of-the-server]__08g-39i._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__06ci01x._.js → [root-of-the-server]__09n4g~p._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e215_h._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hc2ab0._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0iaw1ms._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__098yytg._.js → [root-of-the-server]__0lhroxu._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n9e~0j._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0o4yodb._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p_09im._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__08icsmr._.js → [root-of-the-server]__0qy_98o._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qyxluw._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0r54_2f._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s9retv._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vicp7s._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b8cn~b._.js → [root-of-the-server]__0vx7inx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vyqspt._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ss.-i7._.js → [root-of-the-server]__0wabw~r._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y.2qv_._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pj4ghy._.js → [root-of-the-server]__0zgzcl5._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__10xwsl4._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12c826b._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0clm.cb._.js → [root-of-the-server]__13i_x1.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0-sia69._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{_05_bfrg._.js → _00_enfv._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0v53yq7._.js → _02yhivm._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_06d.l~y._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_102gd3m._.js → _08j7--7._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0_g2k44._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0q6ax60._.js → _0_in9ut._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0rk3o8h._.js → _0b9lr.2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{src_0j_1~da._.js → _0bijc0.._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0of7fy7._.js → _0ds16oj._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0qxei2o._.js → _0gk9bhq._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0yp1dzk._.js → _0hj6ykf._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0i2m-0~._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_00-v8~4._.js → _0jis7fv._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0kdx-ix._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0l0n0gc._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/{0t0b_zod_v4_classic_external_129tmhb.js → _0ng0eku._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0-anjz4._.js → _0ny8sre._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_06gydyh._.js → _0p~.jo1._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0st9b1_._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/_0tj4yhj._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0u6n.gw._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/_0ueyys5._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0unw1fq._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/_0wxgq36._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0ze9ezr._.js → _0x_nujv._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0xlxdv6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0~fk6kp._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_09gfkbi._.js → _0~~v0og._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0l-ci5f._.js → _10.d8~a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_11ixey~._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0r5zto-._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0d6br1r._.js → src_lib_05wgz5w._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0d7-dyi._.js → src_lib_078780e._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_02~8o7n._.js → src_lib_09ajdu_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_05._ry~._.js → src_lib_0f4q-6w._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ffqwve._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0i-k~x7._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0jzfhds._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0kjj12q._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0lve.hi._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0pywvqu._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0tp-g~8._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0vnqpwi._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0w9nhfj._.js +3 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +859 -1351
- package/.next/standalone/.next/static/chunks/0.oy-y0w05vbq.js +1 -0
- package/.next/standalone/.next/static/chunks/04a2asn0hyy9c.js +1 -0
- package/.next/standalone/.next/static/chunks/06uk3fb5mkz5c.js +1 -0
- package/.next/standalone/.next/static/chunks/{0j94ru7oloqhp.js → 07idrdtj1o8zu.js} +1 -1
- package/.next/standalone/.next/static/chunks/{078tkiwi_e..w.js → 0_t7890~b8s.q.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0m7mzooex9.cp.js → 0c5ct~fi6oo0x.js} +1 -1
- package/.next/standalone/.next/static/chunks/{040v3khsfu0lz.js → 0d.9mkqrf._kj.js} +2 -2
- package/.next/standalone/.next/static/chunks/0e8wfpfgivr6t.js +1 -0
- package/.next/standalone/.next/static/chunks/0eup3utxhd.9w.js +2 -0
- package/.next/standalone/.next/static/chunks/0fysbcldn.s~5.js +1 -0
- package/.next/standalone/.next/static/chunks/0husw1q436czh.js +1 -0
- package/.next/standalone/.next/static/chunks/0ibjmvk~1lgfl.js +2 -0
- package/.next/standalone/.next/static/chunks/{0_8g669_.94gk.js → 0m_mrbcxwb.xb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0caf_e5zdgl2s.js → 0mzr~d4ax.~nx.js} +2 -2
- package/.next/standalone/.next/static/chunks/0q4_3y9etuu46.js +1 -0
- package/.next/standalone/.next/static/chunks/0qxmfi3_hxoj8.js +1 -0
- package/.next/standalone/.next/static/chunks/{0dbel03y5wo85.js → 0vyurjgr0u8aw.js} +1 -1
- package/.next/standalone/.next/static/chunks/0xbblu1dqxput.js +1 -0
- package/.next/standalone/.next/static/chunks/0xu8d3uoqrmjl.js +1 -0
- package/.next/standalone/.next/static/chunks/0xx_wtcnk0sf7.js +1 -0
- package/.next/standalone/.next/static/chunks/0yrq3rjju-3um.js +1 -0
- package/.next/standalone/.next/static/chunks/0~8mebeyo5uub.css +1 -0
- package/.next/standalone/.next/static/chunks/{0nsoo.df~w7ez.js → 10~egz2-vj..3.js} +2 -2
- package/.next/standalone/package.json +1 -3
- package/package.json +1 -3
- package/.next/standalone/.next/server/chunks/[externals]__12any6r._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d1dj18._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0s__pv8._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[externals]__0u-vzb1._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.bvw5b._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06zyaub._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0f6jg2_._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gaiasa._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gzi6v8._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n-4zp8._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oht3x8._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ps55l6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0snkwkk._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vk3eou._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vqar.7._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xg37gu._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0yr--da._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z1phoe._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~8i4lj._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__10yxmur._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11einlk._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13wezd4._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/_05h.8a~._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_065qc4e._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_06sgp6h._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0_l8.dg._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_0h~yckx._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0i4__mf._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0kkxrcc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0ov6bwe._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0tb98gb._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0wvv86n._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0xrgx~o._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0~80adm._.js +0 -8
- package/.next/standalone/.next/server/chunks/ssr/_10dvolb._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_12o7r.n._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_13jha60._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_actions_search-code-actions_ts_0k9u5d~._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0iq4x_.._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0me8mly._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ngr9__._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0qu3epc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0r2kk28._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0v-t4im._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0v244ym._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0y0c60a._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_13f4e5p._.js +0 -3
- package/.next/standalone/.next/static/chunks/05mx9brj-f8gw.js +0 -1
- package/.next/standalone/.next/static/chunks/0600r~b6rdg~2.js +0 -1
- package/.next/standalone/.next/static/chunks/0666bg18.a5h8.js +0 -1
- package/.next/standalone/.next/static/chunks/09nbrak~rje1..js +0 -2
- package/.next/standalone/.next/static/chunks/0c.9g9ugtt_fi.js +0 -2
- package/.next/standalone/.next/static/chunks/0g62a2i4hk0pj.js +0 -1
- package/.next/standalone/.next/static/chunks/0i84hdhbjwxv3.js +0 -1
- package/.next/standalone/.next/static/chunks/0k02g-ep3ca11.js +0 -1
- package/.next/standalone/.next/static/chunks/0kqksl8_mibg1.js +0 -1
- package/.next/standalone/.next/static/chunks/0lve_d~~~n7y4.js +0 -1
- package/.next/standalone/.next/static/chunks/0my~5x9vknsv2.js +0 -1
- package/.next/standalone/.next/static/chunks/0o~~t9_9pm-0e.css +0 -1
- package/.next/standalone/.next/static/chunks/0r6_if_1hvz-u.js +0 -1
- package/.next/standalone/.next/static/chunks/0unk0vfgdc4b1.js +0 -1
- package/.next/standalone/.next/static/chunks/0xfk375kd_~b3.js +0 -1
- /package/.next/standalone/.next/static/{9NXMylL5Ks4ehg3RIDVt3 → Kff31mi-mF0Jr_em-2NTJ}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{9NXMylL5Ks4ehg3RIDVt3 → Kff31mi-mF0Jr_em-2NTJ}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{9NXMylL5Ks4ehg3RIDVt3 → Kff31mi-mF0Jr_em-2NTJ}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module.exports=[52350,562278,a=>{"use strict";var b=a.i(902157),c=a.i(660526),d=a.i(750227),e=a.i(163812);function f(){return process.env.TOWER_PACKAGE_ROOT||process.cwd()}a.s(["getPackageRoot",0,f],562278);let g=["sonnet","opus","haiku","claude-sonnet-4-6","claude-opus-4-6","claude-haiku-4-5-20251001"];a.s(["ClaudeCliAdapter",0,class{buildSpawnArgs(a){let b=["--dangerously-skip-permissions"];a.extraArgs?.length&&b.push(...a.extraArgs),a.resumeSessionId?b.push("--resume",a.resumeSessionId):a.continueLatest?b.push("--continue"):a.prompt&&b.push(a.prompt);let c={...a.envOverrides??{}};return{command:this.resolveCommand(),args:b,env:c}}buildEnvOverrides(a){let b={TOWER_TASK_ID:a.taskId,TOWER_TASK_TITLE:a.taskTitle,TOWER_STARTED_AT:new Date().toISOString(),TOWER_API_URL:a.apiUrl};return a.callbackUrl&&(b.CALLBACK_URL=a.callbackUrl),b}async installHooks(a){try{let a=this.readSettings(),b=a.hooks??{},c=f().replace(/\\/g,"/"),e=d.join(c,"scripts","session-start-hook.js").replace(/\\/g,"/"),g=d.join(c,"scripts","post-tool-hook.js").replace(/\\/g,"/"),h=d.join(c,"scripts","stop-hook.js").replace(/\\/g,"/"),i=!1;return i=this.upsertHook(b,"SessionStart","session-start-hook.js",{hooks:[{command:`node "${e}"`,timeout:5,type:"command"}]})||i,i=this.upsertHook(b,"PostToolUse","post-tool-hook.js",{hooks:[{command:`node "${g}"`,timeout:10,type:"command"}],matcher:"Write|Edit|MultiEdit"})||i,(i=this.upsertHook(b,"Stop","stop-hook.js",{hooks:[{command:`node "${h}"`,timeout:5,type:"command"}]})||i)&&(a.hooks=b,this.writeSettings(a)),{ok:!0,method:"file",detail:this.getSettingsPath()}}catch(a){return{ok:!1,method:"file",detail:this.getSettingsPath(),error:a instanceof Error?a.message:String(a)}}}async repairHookPaths(){try{let a=this.readSettings(),b=a.hooks??{},c=f().replace(/\\/g,"/"),e=!1;for(let[a,f]of[["SessionStart","session-start-hook.js"],["PostToolUse","post-tool-hook.js"],["Stop","stop-hook.js"]]){let g=this.getHookArray(b,a),h=g.findIndex(a=>a?.hooks?.some?.(a=>a.command?.includes(f)));if(h<0)continue;let i=d.join(c,"scripts",f).replace(/\\/g,"/"),j=`node "${i}"`,k=g[h]?.hooks?.[0];k&&k.command!==j&&(k.command=j,b[a]=g,e=!0)}e&&(a.hooks=b,this.writeSettings(a))}catch{}}upsertHook(a,b,c,d){let e=this.getHookArray(a,b),f=d?.hooks?.[0]?.command,g=e.findIndex(a=>a?.hooks?.some?.(a=>a.command?.includes(c)));if(g>=0){if(e[g]?.hooks?.[0]?.command===f)return!1;e.splice(g,1)}return e.push(d),a[b]=e,!0}async uninstallHooks(){try{let a=this.readSettings(),b=a.hooks??{},c=["session-start-hook.js","post-tool-hook.js","stop-hook.js"];for(let a of["SessionStart","PostToolUse","Stop"]){let d=this.getHookArray(b,a);b[a]=d.filter(a=>!a.hooks?.some(a=>c.some(b=>a.command?.includes(b))))}return a.hooks=b,this.writeSettings(a),{ok:!0,method:"file",detail:this.getSettingsPath()}}catch(a){return{ok:!1,method:"file",detail:this.getSettingsPath(),error:a instanceof Error?a.message:String(a)}}}async isHooksInstalled(){let a=this.readSettings().hooks??{},b=this.getHookArray(a,"PostToolUse");return this.hasHook(b,"post-tool-hook.js")}async installMcp(a,b={}){let c=b.scope??"user",d={command:a.command,args:a.args};a.env&&Object.keys(a.env).length>0&&(d.env=a.env);let e=this.resolveCommand(),f=["mcp","add-json","-s",c,a.name,JSON.stringify(d)];try{return await this.runCli(e,["mcp","remove","-s",c,a.name],b.cwd).catch(()=>{}),await this.runCli(e,f,b.cwd),{ok:!0,method:"cli",detail:`${e} ${f.join(" ")}`}}catch(a){return{ok:!1,method:"cli",detail:`${e} ${f.join(" ")}`,error:a instanceof Error?a.message:String(a)}}}async uninstallMcp(a,b={}){let c=b.scope??"user",d=this.resolveCommand(),e=["mcp","remove","-s",c,a];try{return await this.runCli(d,e,b.cwd),{ok:!0,method:"cli",detail:`${d} ${e.join(" ")}`}}catch(a){return{ok:!1,method:"cli",detail:`${d} ${e.join(" ")}`,error:a instanceof Error?a.message:String(a)}}}async isMcpInstalled(a,b={}){let c=this.resolveCommand();try{return await this.runCli(c,["mcp","get",a],b.cwd,5e3),!0}catch{return!1}}async installSkill(a,c){let e=d.join(this.getConfigDir(),"skills",a);try{if(!b.existsSync(c))return{ok:!1,method:"symlink",detail:e,error:`Source skill dir does not exist: ${c}`};b.mkdirSync(d.dirname(e),{recursive:!0});let a=await b.promises.lstat(e).catch(()=>null);if(a)if(!(a.isSymbolicLink()||"win32"===process.platform&&a.isDirectory()))return{ok:!1,method:"symlink",detail:e,error:`Refusing to overwrite non-symlink at ${e}`};else try{let a=await b.promises.readlink(e);if(d.resolve(a)===d.resolve(c))return{ok:!0,method:"symlink",detail:`${e} → ${c} (already)`};await b.promises.unlink(e)}catch{if(!a.isSymbolicLink())return{ok:!1,method:"symlink",detail:e,error:`Refusing to overwrite non-symlink at ${e}`}}return await b.promises.symlink(c,e,"dir"),{ok:!0,method:"symlink",detail:`${e} → ${c}`}}catch(a){return{ok:!1,method:"symlink",detail:e,error:a instanceof Error?a.message:String(a)}}}async uninstallSkill(a){let c=d.join(this.getConfigDir(),"skills",a);try{let a=await b.promises.lstat(c).catch(()=>null);if(!a)return{ok:!0,method:"symlink",detail:`${c} (already absent)`};if(!a.isSymbolicLink())return{ok:!1,method:"symlink",detail:c,error:`Refusing to remove non-symlink at ${c}`};return await b.promises.unlink(c),{ok:!0,method:"symlink",detail:c}}catch(a){return{ok:!1,method:"symlink",detail:c,error:a instanceof Error?a.message:String(a)}}}async isSkillInstalled(a,c){let e=d.join(this.getConfigDir(),"skills",a);try{if(!(await b.promises.lstat(e)).isSymbolicLink())return!1;if(!c)return!0;let a=await b.promises.readlink(e),f=d.isAbsolute(a)?a:d.resolve(d.dirname(e),a);return d.resolve(f)===d.resolve(c)}catch{return!1}}async runCli(b,c,d,e=1e4){let{execFile:f}=await a.A(482848),{promisify:g}=await a.A(268548),h=g(f),{stdout:i}=await h(b,c,{cwd:d,timeout:e});return i}async isAvailable(){return null!==await this.getVersion()}async getVersion(){try{let{execFile:b}=await a.A(144264),{promisify:c}=await a.A(534777),{resolveSpawnTarget:d}=await a.A(889618),e=c(b),f=await d(this.resolveCommand(),["--version"]),{stdout:g}=await e(f.command,f.args,{timeout:5e3});return g.trim()||null}catch{return null}}async getModels(){return g}getConfigDir(){return d.join(c.homedir(),".claude")}getSettingsPath(){return d.join(this.getConfigDir(),"settings.json")}getSessionsDir(){return d.join(this.getConfigDir(),"projects")}getApiKeyInfo(){return{envVar:"ANTHROPIC_API_KEY",required:!1}}buildHelloProbeArgs(a){return{command:this.resolveCommand(),args:["--print",a,"--output-format","stream-json","--verbose"]}}resolveCommand(){return process.env.CLAUDE_CODE_PATH?process.env.CLAUDE_CODE_PATH:(0,e.resolveCommandPathSync)("claude")}readSettings(){try{return JSON.parse(b.readFileSync(this.getSettingsPath(),"utf-8"))}catch{return{}}}writeSettings(a){let c=this.getConfigDir();b.existsSync(c)||b.mkdirSync(c,{recursive:!0}),b.writeFileSync(this.getSettingsPath(),JSON.stringify(a,null,2),"utf-8")}getHookArray(a,b){let c=a[b];return Array.isArray(c)?c:[]}hasHook(a,b){return a.some(a=>a.hooks?.some(a=>a.command?.includes(b)))}}],52350)},897667,a=>{"use strict";let b=new(a.i(52350)).ClaudeCliAdapter;async function c(d,e,f={}){let g="";try{let{query:c}=await a.A(719041),h=b.resolveCommand();for await(let a of c({prompt:d,options:{tools:f.tools??[],allowedTools:f.allowedTools??[],maxTurns:f.maxTurns??1,cwd:e,pathToClaudeCodeExecutable:h,sessionPersistence:!1}}))if("assistant"===a.type){let b=a.message.content.filter(a=>"text"===a.type);g+=b.map(a=>a.text??"").join("")}else if("result"===a.type){let b="string"==typeof a.result?a.result:"";b&&!g&&(g=b)}return g.trim()||null}catch(a){if(a.message?.includes("maximum number of turns")&&g.trim())return g.trim();return console.error("[aiQuery] Failed:",a.message,a.stack?.slice(0,300)),null}}async function d(a,b){let d=`以下是一次AI编程助手的终端会话记录。请用一句简短的中文总结这次会话做了什么(不超过50字,只回答总结内容,不要加引号或前缀):
|
|
2
|
+
|
|
3
|
+
\`\`\`
|
|
4
|
+
${a.slice(-5e3)}
|
|
5
|
+
\`\`\``,e=await c(d,b);return e&&e.replace(/^[#*\->"'\s]+/,"").trim()||null}async function e(a,b,d){let e=a.slice(-8e3),f=d?`
|
|
6
|
+
Session summary: ${d}`:"",g=`You are analyzing a completed AI coding session. Extract reusable insights.
|
|
7
|
+
${f}
|
|
8
|
+
|
|
9
|
+
Terminal log (last 8000 chars):
|
|
10
|
+
\`\`\`
|
|
11
|
+
${e}
|
|
12
|
+
\`\`\`
|
|
13
|
+
|
|
14
|
+
Respond ONLY with valid JSON matching this schema (no markdown, no explanation):
|
|
15
|
+
{
|
|
16
|
+
"summary": "one-sentence summary of what was accomplished",
|
|
17
|
+
"insights": [
|
|
18
|
+
{ "type": "pattern|pitfall|decision|tool|reference", "content": "description" }
|
|
19
|
+
],
|
|
20
|
+
"shouldCreateNote": true/false,
|
|
21
|
+
"noteTitle": "short title for the note (only if shouldCreateNote is true)"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Rules:
|
|
25
|
+
- Set shouldCreateNote=true ONLY if there are genuinely reusable insights (architectural decisions, non-obvious pitfalls, useful patterns, important tool discoveries)
|
|
26
|
+
- Trivial sessions (simple formatting, single-line edits, routine commits) should have shouldCreateNote=false
|
|
27
|
+
- insights array can be empty if nothing notable
|
|
28
|
+
- Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},482848,a=>{a.v(a=>Promise.resolve().then(()=>a(874533)))},268548,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_node_util_0xr.y7p._.js"].map(b=>a.l(b))).then(()=>b(812057)))},144264,a=>{a.v(a=>Promise.resolve().then(()=>a(233405)))},534777,a=>{a.v(a=>Promise.resolve().then(()=>a(224361)))},889618,a=>{a.v(a=>Promise.resolve().then(()=>a(163812)))},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0ti8vng._.js","server/chunks/ssr/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0myippv._.js"].map(b=>a.l(b))).then(()=>b(845454)))}];
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0vyqspt._.js.map
|
|
@@ -25,6 +25,6 @@ Rules:
|
|
|
25
25
|
- Set shouldCreateNote=true ONLY if there are genuinely reusable insights (architectural decisions, non-obvious pitfalls, useful patterns, important tool discoveries)
|
|
26
26
|
- Trivial sessions (simple formatting, single-line edits, routine commits) should have shouldCreateNote=false
|
|
27
27
|
- insights array can be empty if nothing notable
|
|
28
|
-
- Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},818992,a=>{"use strict";var b=a.i(233405),c=a.i(522734),d=a.i(761469),e=a.i(897667);function f(a,c){return(0,b.execFileSync)("git",a,{cwd:c,timeout:1e4,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim()}function g(a){for(let b of["main","master","develop"])try{return f(["merge-base","HEAD",b],a)}catch{}return null}function h(a){if(!a)return null;let b=a.split("\n").filter(Boolean);if(0===b.length)return null;let c=b[0].replace(/^[a-f0-9]+\s+/,"");return 1===b.length?c:`${b.length} commits: ${c}`}async function i(a,b,i,j,k){try{let b;console.error(`[captureExecutionSummary] Starting: exec=${a.slice(0,8)} exit=${i} buffer=${j.length}chars worktree=${k}`);let l=null,m=null,n=null;if(k&&(0,c.existsSync)(k))try{if(f(["rev-parse","--git-dir"],k),l=function(a){try{let b=g(a);if(b){let c=f(["log","--oneline",`${b}..HEAD`],a);if(c)return c}return f(["log","--oneline","-3"],a)||null}catch{return null}}(k),(m=function(a){try{let b,c=g(a);if(!(b=c?f(["diff","--stat",`${c}..HEAD`],a):f(["diff","--stat","HEAD~20","HEAD"],a)))return null;return function(a){let b=a.split("\n"),c=b[b.length-1];if(!c)return null;let d=c.match(/(\d+)\s+files?\s+changed/),e=c.match(/(\d+)\s+insertions?\(\+\)/),f=c.match(/(\d+)\s+deletions?\(-\)/);return d||e||f?{commits:0,filesChanged:d?parseInt(d[1],10):0,insertions:e?parseInt(e[1],10):0,deletions:f?parseInt(f[1],10):0}:null}(b)}catch{return null}}(k))&&l){let a=l.split("\n").filter(Boolean).length;m={...m,commits:a}}n=h(l)}catch{}let o=(b=j.replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g,"").replace(/\x1b\[[0-9;?]*[A-Za-z]/g,"").replace(/\x1b[^[\]()][^\x1b]*/g,"").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"").replace(/\n{3,}/g,"\n\n").trim()).length<=10240?b:b.slice(b.length-10240);await d.db.taskExecution.update({where:{id:a},data:{summary:n??(l?h(l):null),gitLog:l??null,gitStats:m?JSON.stringify(m):null,exitCode:i,terminalLog:o||null}}),o&&k&&(console.error("[captureExecutionSummary] Starting background AI summary..."),(0,e.generateSummaryFromLog)(o,k).then(async b=>{b&&(console.error(`[captureExecutionSummary] AI summary ready: ${b.slice(0,80)}`),await d.db.taskExecution.update({where:{id:a},data:{summary:b}}))}).catch(a=>{console.error("[captureExecutionSummary] Background AI summary failed:",a)}))}catch(a){console.error("[captureExecutionSummary] Failed to capture summary:",a)}}async function j(a){try{let b=await d.db.task.findUnique({where:{id:a},select:{projectId:!0,executions:{orderBy:{createdAt:"desc"},select:{id:!0,terminalLog:!0,worktreePath:!0,summary:!0}}}});if(!b||0===b.executions.length)return;let c="",f=null,g=[];for(let a of b.executions)a.terminalLog&&(c+=a.terminalLog+"\n---\n"),a.summary&&g.push(a.summary),!f&&a.worktreePath&&(f=a.worktreePath);if(!(c=c.slice(-8e3)).trim())return;let h=g.join("\n"),i=f||process.cwd();console.error(`[captureTaskDreaming] Starting for task=${a.slice(0,8)}, ${b.executions.length} executions`);let j=await (0,e.generateDreamingInsight)(c,i,h);if(!j||!j.shouldCreateNote)return void console.error("[captureTaskDreaming] No note needed");let k=await d.db.projectNote.create({data:{title:j.noteTitle||j.summary.slice(0,50),content:function(a){let b=[];if(b.push("## Summary"),b.push(a.summary),b.push(""),a.insights.length>0)for(let c of(b.push("## Insights"),a.insights))b.push(`- **[${c.type}]**: ${c.content}`);return b.join("\n")}(j),category:"session-insight",projectId:b.projectId,taskId:a}}),l=b.executions[0].id;await d.db.taskExecution.update({where:{id:l},data:{insightNoteId:k.id}}),console.error(`[captureTaskDreaming] Note created: ${k.id}`)}catch(a){console.error("[captureTaskDreaming] Failed:",a)}}a.s(["captureExecutionSummary",0,i,"captureTaskDreaming",0,j])},482848,a=>{a.v(a=>Promise.resolve().then(()=>a(874533)))},268548,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_node_util_0xr.y7p._.js"].map(b=>a.l(b))).then(()=>b(812057)))},534777,a=>{a.v(a=>Promise.resolve().then(()=>a(224361)))},889618,a=>{a.v(a=>Promise.resolve().then(()=>a(163812)))},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]
|
|
28
|
+
- Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},818992,a=>{"use strict";var b=a.i(233405),c=a.i(522734),d=a.i(761469),e=a.i(897667);function f(a,c){return(0,b.execFileSync)("git",a,{cwd:c,timeout:1e4,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim()}function g(a){for(let b of["main","master","develop"])try{return f(["merge-base","HEAD",b],a)}catch{}return null}function h(a){if(!a)return null;let b=a.split("\n").filter(Boolean);if(0===b.length)return null;let c=b[0].replace(/^[a-f0-9]+\s+/,"");return 1===b.length?c:`${b.length} commits: ${c}`}async function i(a,b,i,j,k){try{let b;console.error(`[captureExecutionSummary] Starting: exec=${a.slice(0,8)} exit=${i} buffer=${j.length}chars worktree=${k}`);let l=null,m=null,n=null;if(k&&(0,c.existsSync)(k))try{if(f(["rev-parse","--git-dir"],k),l=function(a){try{let b=g(a);if(b){let c=f(["log","--oneline",`${b}..HEAD`],a);if(c)return c}return f(["log","--oneline","-3"],a)||null}catch{return null}}(k),(m=function(a){try{let b,c=g(a);if(!(b=c?f(["diff","--stat",`${c}..HEAD`],a):f(["diff","--stat","HEAD~20","HEAD"],a)))return null;return function(a){let b=a.split("\n"),c=b[b.length-1];if(!c)return null;let d=c.match(/(\d+)\s+files?\s+changed/),e=c.match(/(\d+)\s+insertions?\(\+\)/),f=c.match(/(\d+)\s+deletions?\(-\)/);return d||e||f?{commits:0,filesChanged:d?parseInt(d[1],10):0,insertions:e?parseInt(e[1],10):0,deletions:f?parseInt(f[1],10):0}:null}(b)}catch{return null}}(k))&&l){let a=l.split("\n").filter(Boolean).length;m={...m,commits:a}}n=h(l)}catch{}let o=(b=j.replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g,"").replace(/\x1b\[[0-9;?]*[A-Za-z]/g,"").replace(/\x1b[^[\]()][^\x1b]*/g,"").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"").replace(/\n{3,}/g,"\n\n").trim()).length<=10240?b:b.slice(b.length-10240);await d.db.taskExecution.update({where:{id:a},data:{summary:n??(l?h(l):null),gitLog:l??null,gitStats:m?JSON.stringify(m):null,exitCode:i,terminalLog:o||null}}),o&&k&&(console.error("[captureExecutionSummary] Starting background AI summary..."),(0,e.generateSummaryFromLog)(o,k).then(async b=>{b&&(console.error(`[captureExecutionSummary] AI summary ready: ${b.slice(0,80)}`),await d.db.taskExecution.update({where:{id:a},data:{summary:b}}))}).catch(a=>{console.error("[captureExecutionSummary] Background AI summary failed:",a)}))}catch(a){console.error("[captureExecutionSummary] Failed to capture summary:",a)}}async function j(a){try{let b=await d.db.task.findUnique({where:{id:a},select:{projectId:!0,executions:{orderBy:{createdAt:"desc"},select:{id:!0,terminalLog:!0,worktreePath:!0,summary:!0}}}});if(!b||0===b.executions.length)return;let c="",f=null,g=[];for(let a of b.executions)a.terminalLog&&(c+=a.terminalLog+"\n---\n"),a.summary&&g.push(a.summary),!f&&a.worktreePath&&(f=a.worktreePath);if(!(c=c.slice(-8e3)).trim())return;let h=g.join("\n"),i=f||process.cwd();console.error(`[captureTaskDreaming] Starting for task=${a.slice(0,8)}, ${b.executions.length} executions`);let j=await (0,e.generateDreamingInsight)(c,i,h);if(!j||!j.shouldCreateNote)return void console.error("[captureTaskDreaming] No note needed");let k=await d.db.projectNote.create({data:{title:j.noteTitle||j.summary.slice(0,50),content:function(a){let b=[];if(b.push("## Summary"),b.push(a.summary),b.push(""),a.insights.length>0)for(let c of(b.push("## Insights"),a.insights))b.push(`- **[${c.type}]**: ${c.content}`);return b.join("\n")}(j),category:"session-insight",projectId:b.projectId,taskId:a}}),l=b.executions[0].id;await d.db.taskExecution.update({where:{id:l},data:{insightNoteId:k.id}}),console.error(`[captureTaskDreaming] Note created: ${k.id}`)}catch(a){console.error("[captureTaskDreaming] Failed:",a)}}a.s(["captureExecutionSummary",0,i,"captureTaskDreaming",0,j])},482848,a=>{a.v(a=>Promise.resolve().then(()=>a(874533)))},268548,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_node_util_0xr.y7p._.js"].map(b=>a.l(b))).then(()=>b(812057)))},534777,a=>{a.v(a=>Promise.resolve().then(()=>a(224361)))},889618,a=>{a.v(a=>Promise.resolve().then(()=>a(163812)))},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0ti8vng._.js","server/chunks/ssr/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0myippv._.js"].map(b=>a.l(b))).then(()=>b(845454)))}];
|
|
29
29
|
|
|
30
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
30
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0wabw~r._.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
module.exports=[510095,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(797225).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.6.0_react@19.2.4/node_modules/lucide-react/dist/esm/Icon.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.6.0_react@19.2.4/node_modules/lucide-react/dist/esm/Icon.js <module evaluation>","default")},857188,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(797225).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.6.0_react@19.2.4/node_modules/lucide-react/dist/esm/Icon.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.6.0_react@19.2.4/node_modules/lucide-react/dist/esm/Icon.js","default")},400413,a=>{"use strict";a.i(510095);var b=a.i(857188);a.n(b)},743698,(a,b,c)=>{b.exports=a.x("node:https",()=>require("node:https"))},188646,(a,b,c)=>{b.exports=a.x("node:stream/promises",()=>require("node:stream/promises"))},744992,a=>{"use strict";var b=a.i(427699),c=a.i(522734),d=a.i(687769),e=a.i(81111),f=a.i(899871),g=a.i(750227),h=a.i(902157),i=a.i(814747),j=a.i(449719),k=a.i(500874),l=a.i(406461),m=a.i(57328),n=a.i(666680),o=a.i(912714),p=Object.defineProperty,q="object"==typeof process&&process?process:{stdout:null,stderr:null},r=a=>!!a&&"object"==typeof a&&(a instanceof ab||a instanceof e.default||s(a)||t(a)),s=a=>!!a&&"object"==typeof a&&a instanceof d.EventEmitter&&"function"==typeof a.pipe&&a.pipe!==e.default.Writable.prototype.pipe,t=a=>!!a&&"object"==typeof a&&a instanceof d.EventEmitter&&"function"==typeof a.write&&"function"==typeof a.end,u=Symbol("EOF"),v=Symbol("maybeEmitEnd"),w=Symbol("emittedEnd"),x=Symbol("emittingEnd"),y=Symbol("emittedError"),z=Symbol("closed"),A=Symbol("read"),B=Symbol("flush"),C=Symbol("flushChunk"),D=Symbol("encoding"),E=Symbol("decoder"),F=Symbol("flowing"),G=Symbol("paused"),H=Symbol("resume"),I=Symbol("buffer"),J=Symbol("pipes"),K=Symbol("bufferLength"),L=Symbol("bufferPush"),M=Symbol("bufferShift"),N=Symbol("objectMode"),O=Symbol("destroyed"),P=Symbol("error"),Q=Symbol("emitData"),R=Symbol("emitEnd"),S=Symbol("emitEnd2"),T=Symbol("async"),U=Symbol("abort"),V=Symbol("aborted"),W=Symbol("signal"),X=Symbol("dataListeners"),Y=Symbol("discarded"),Z=a=>Promise.resolve().then(a),$=a=>a(),_=class{src;dest;opts;ondrain;constructor(a,b,c){this.src=a,this.dest=b,this.opts=c,this.ondrain=()=>a[H](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(a){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},aa=class extends _{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(a,b,c){super(a,b,c),this.proxyErrors=a=>this.dest.emit("error",a),a.on("error",this.proxyErrors)}},ab=class extends d.EventEmitter{[F]=!1;[G]=!1;[J]=[];[I]=[];[N];[D];[T];[E];[u]=!1;[w]=!1;[x]=!1;[z]=!1;[y]=null;[K]=0;[O]=!1;[W];[V]=!1;[X]=0;[Y]=!1;writable=!0;readable=!0;constructor(...a){let b=a[0]||{};if(super(),b.objectMode&&"string"==typeof b.encoding)throw TypeError("Encoding and objectMode may not be used together");(a=>!!a.objectMode)(b)?(this[N]=!0,this[D]=null):(a=>!a.objectMode&&!!a.encoding&&"buffer"!==a.encoding)(b)?(this[D]=b.encoding,this[N]=!1):(this[N]=!1,this[D]=null),this[T]=!!b.async,this[E]=this[D]?new f.StringDecoder(this[D]):null,b&&!0===b.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[I]}),b&&!0===b.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[J]});let{signal:c}=b;c&&(this[W]=c,c.aborted?this[U]():c.addEventListener("abort",()=>this[U]()))}get bufferLength(){return this[K]}get encoding(){return this[D]}set encoding(a){throw Error("Encoding must be set at instantiation time")}setEncoding(a){throw Error("Encoding must be set at instantiation time")}get objectMode(){return this[N]}set objectMode(a){throw Error("objectMode must be set at instantiation time")}get async(){return this[T]}set async(a){this[T]=this[T]||!!a}[U](){this[V]=!0,this.emit("abort",this[W]?.reason),this.destroy(this[W]?.reason)}get aborted(){return this[V]}set aborted(a){}write(a,b,c){if(this[V])return!1;if(this[u])throw Error("write after end");if(this[O])return this.emit("error",Object.assign(Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof b&&(c=b,b="utf8"),b||(b="utf8");let d=this[T]?Z:$;if(!this[N]&&!Buffer.isBuffer(a)){let b;if(b=a,!Buffer.isBuffer(b)&&ArrayBuffer.isView(b))a=Buffer.from(a.buffer,a.byteOffset,a.byteLength);else{let b;if((b=a)instanceof ArrayBuffer||b&&"object"==typeof b&&b.constructor&&"ArrayBuffer"===b.constructor.name&&b.byteLength>=0)a=Buffer.from(a);else if("string"!=typeof a)throw Error("Non-contiguous data written to non-objectMode stream")}}return this[N]?(this[F]&&0!==this[K]&&this[B](!0),this[F]?this.emit("data",a):this[L](a)):a.length&&("string"==typeof a&&(b!==this[D]||this[E]?.lastNeed)&&(a=Buffer.from(a,b)),Buffer.isBuffer(a)&&this[D]&&(a=this[E].write(a)),this[F]&&0!==this[K]&&this[B](!0),this[F]?this.emit("data",a):this[L](a)),0!==this[K]&&this.emit("readable"),c&&d(c),this[F]}read(a){if(this[O])return null;if(this[Y]=!1,0===this[K]||0===a||a&&a>this[K])return this[v](),null;this[N]&&(a=null),this[I].length>1&&!this[N]&&(this[I]=[this[D]?this[I].join(""):Buffer.concat(this[I],this[K])]);let b=this[A](a||null,this[I][0]);return this[v](),b}[A](a,b){if(this[N])this[M]();else{let c=b;a===c.length||null===a?this[M]():("string"==typeof c?(this[I][0]=c.slice(a),b=c.slice(0,a)):(this[I][0]=c.subarray(a),b=c.subarray(0,a)),this[K]-=a)}return this.emit("data",b),this[I].length||this[u]||this.emit("drain"),b}end(a,b,c){return"function"==typeof a&&(c=a,a=void 0),"function"==typeof b&&(c=b,b="utf8"),void 0!==a&&this.write(a,b),c&&this.once("end",c),this[u]=!0,this.writable=!1,(this[F]||!this[G])&&this[v](),this}[H](){this[O]||(this[X]||this[J].length||(this[Y]=!0),this[G]=!1,this[F]=!0,this.emit("resume"),this[I].length?this[B]():this[u]?this[v]():this.emit("drain"))}resume(){return this[H]()}pause(){this[F]=!1,this[G]=!0,this[Y]=!1}get destroyed(){return this[O]}get flowing(){return this[F]}get paused(){return this[G]}[L](a){this[N]?this[K]+=1:this[K]+=a.length,this[I].push(a)}[M](){return this[N]?this[K]-=1:this[K]-=this[I][0].length,this[I].shift()}[B](a=!1){do;while(this[C](this[M]())&&this[I].length)a||this[I].length||this[u]||this.emit("drain")}[C](a){return this.emit("data",a),this[F]}pipe(a,b){if(this[O])return a;this[Y]=!1;let c=this[w];return b=b||{},a===q.stdout||a===q.stderr?b.end=!1:b.end=!1!==b.end,b.proxyErrors=!!b.proxyErrors,c?b.end&&a.end():(this[J].push(b.proxyErrors?new aa(this,a,b):new _(this,a,b)),this[T]?Z(()=>this[H]()):this[H]()),a}unpipe(a){let b=this[J].find(b=>b.dest===a);b&&(1===this[J].length?(this[F]&&0===this[X]&&(this[F]=!1),this[J]=[]):this[J].splice(this[J].indexOf(b),1),b.unpipe())}addListener(a,b){return this.on(a,b)}on(a,b){let c=super.on(a,b);if("data"===a)this[Y]=!1,this[X]++,this[J].length||this[F]||this[H]();else if("readable"===a&&0!==this[K])super.emit("readable");else("end"===a||"finish"===a||"prefinish"===a)&&this[w]?(super.emit(a),this.removeAllListeners(a)):"error"===a&&this[y]&&(this[T]?Z(()=>b.call(this,this[y])):b.call(this,this[y]));return c}removeListener(a,b){return this.off(a,b)}off(a,b){let c=super.off(a,b);return"data"===a&&(this[X]=this.listeners("data").length,0!==this[X]||this[Y]||this[J].length||(this[F]=!1)),c}removeAllListeners(a){let b=super.removeAllListeners(a);return("data"===a||void 0===a)&&(this[X]=0,this[Y]||this[J].length||(this[F]=!1)),b}get emittedEnd(){return this[w]}[v](){this[x]||this[w]||this[O]||0!==this[I].length||!this[u]||(this[x]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[z]&&this.emit("close"),this[x]=!1)}emit(a,...b){let c=b[0];if("error"!==a&&"close"!==a&&a!==O&&this[O])return!1;if("data"===a)return(!!this[N]||!!c)&&(this[T]?(Z(()=>this[Q](c)),!0):this[Q](c));if("end"===a)return this[R]();if("close"===a){if(this[z]=!0,!this[w]&&!this[O])return!1;let a=super.emit("close");return this.removeAllListeners("close"),a}if("error"===a){this[y]=c,super.emit(P,c);let a=(!this[W]||!!this.listeners("error").length)&&super.emit("error",c);return this[v](),a}if("resume"===a){let a=super.emit("resume");return this[v](),a}if("finish"===a||"prefinish"===a){let b=super.emit(a);return this.removeAllListeners(a),b}let d=super.emit(a,...b);return this[v](),d}[Q](a){for(let b of this[J])!1===b.dest.write(a)&&this.pause();let b=!this[Y]&&super.emit("data",a);return this[v](),b}[R](){return!this[w]&&(this[w]=!0,this.readable=!1,this[T]?(Z(()=>this[S]()),!0):this[S]())}[S](){if(this[E]){let a=this[E].end();if(a){for(let b of this[J])b.dest.write(a);this[Y]||super.emit("data",a)}}for(let a of this[J])a.end();let a=super.emit("end");return this.removeAllListeners("end"),a}async collect(){let a=Object.assign([],{dataLength:0});this[N]||(a.dataLength=0);let b=this.promise();return this.on("data",b=>{a.push(b),this[N]||(a.dataLength+=b.length)}),await b,a}async concat(){if(this[N])throw Error("cannot concat in objectMode");let a=await this.collect();return this[D]?a.join(""):Buffer.concat(a,a.dataLength)}async promise(){return new Promise((a,b)=>{this.on(O,()=>b(Error("stream destroyed"))),this.on("error",a=>b(a)),this.on("end",()=>a())})}[Symbol.asyncIterator](){this[Y]=!1;let a=!1,b=async()=>(this.pause(),a=!0,{value:void 0,done:!0});return{next:()=>{if(a)return b();let c=this.read();if(null!==c)return Promise.resolve({done:!1,value:c});if(this[u])return b();let d,e,f=a=>{this.off("data",g),this.off("end",h),this.off(O,i),b(),e(a)},g=a=>{this.off("error",f),this.off("end",h),this.off(O,i),this.pause(),d({value:a,done:!!this[u]})},h=()=>{this.off("error",f),this.off("data",g),this.off(O,i),b(),d({done:!0,value:void 0})},i=()=>f(Error("stream destroyed"));return new Promise((a,b)=>{e=b,d=a,this.once(O,i),this.once("error",f),this.once("end",h),this.once("data",g)})},throw:b,return:b,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[Y]=!1;let a=!1,b=()=>(this.pause(),this.off(P,b),this.off(O,b),this.off("end",b),a=!0,{done:!0,value:void 0}),c=()=>{if(a)return b();let c=this.read();return null===c?b():{done:!1,value:c}};return this.once("end",b),this.once(P,b),this.once(O,b),{next:c,throw:b,return:b,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(a){return this[O]||(this[O]=!0,this[Y]=!0,this[I].length=0,this[K]=0,"function"!=typeof this.close||this[z]||this.close()),a?this.emit("error",a):this.emit(O),this}static get isStream(){return r}},ac=c.default.writev,ad=Symbol("_autoClose"),ae=Symbol("_close"),af=Symbol("_ended"),ag=Symbol("_fd"),ah=Symbol("_finished"),ai=Symbol("_flags"),aj=Symbol("_flush"),ak=Symbol("_handleChunk"),al=Symbol("_makeBuf"),am=Symbol("_mode"),an=Symbol("_needDrain"),ao=Symbol("_onerror"),ap=Symbol("_onopen"),aq=Symbol("_onread"),ar=Symbol("_onwrite"),as=Symbol("_open"),at=Symbol("_path"),au=Symbol("_pos"),av=Symbol("_queue"),aw=Symbol("_read"),ax=Symbol("_readSize"),ay=Symbol("_reading"),az=Symbol("_remain"),aA=Symbol("_size"),aB=Symbol("_write"),aC=Symbol("_writing"),aD=Symbol("_defaultFlag"),aE=Symbol("_errored"),aF=class extends ab{[aE]=!1;[ag];[at];[ax];[ay]=!1;[aA];[az];[ad];constructor(a,b){if(super(b=b||{}),this.readable=!0,this.writable=!1,"string"!=typeof a)throw TypeError("path must be a string");this[aE]=!1,this[ag]="number"==typeof b.fd?b.fd:void 0,this[at]=a,this[ax]=b.readSize||0x1000000,this[ay]=!1,this[aA]="number"==typeof b.size?b.size:1/0,this[az]=this[aA],this[ad]="boolean"!=typeof b.autoClose||b.autoClose,"number"==typeof this[ag]?this[aw]():this[as]()}get fd(){return this[ag]}get path(){return this[at]}write(){throw TypeError("this is a readable stream")}end(){throw TypeError("this is a readable stream")}[as](){c.default.open(this[at],"r",(a,b)=>this[ap](a,b))}[ap](a,b){a?this[ao](a):(this[ag]=b,this.emit("open",b),this[aw]())}[al](){return Buffer.allocUnsafe(Math.min(this[ax],this[az]))}[aw](){if(!this[ay]){this[ay]=!0;let a=this[al]();if(0===a.length)return process.nextTick(()=>this[aq](null,0,a));c.default.read(this[ag],a,0,a.length,null,(a,b,c)=>this[aq](a,b,c))}}[aq](a,b,c){this[ay]=!1,a?this[ao](a):this[ak](b,c)&&this[aw]()}[ae](){if(this[ad]&&"number"==typeof this[ag]){let a=this[ag];this[ag]=void 0,c.default.close(a,a=>a?this.emit("error",a):this.emit("close"))}}[ao](a){this[ay]=!0,this[ae](),this.emit("error",a)}[ak](a,b){let c=!1;return this[az]-=a,a>0&&(c=super.write(a<b.length?b.subarray(0,a):b)),(0===a||this[az]<=0)&&(c=!1,this[ae](),super.end()),c}emit(a,...b){switch(a){case"prefinish":case"finish":return!1;case"drain":return"number"==typeof this[ag]&&this[aw](),!1;case"error":return!this[aE]&&(this[aE]=!0,super.emit(a,...b));default:return super.emit(a,...b)}}},aG=class extends aF{[as](){let a=!0;try{this[ap](null,c.default.openSync(this[at],"r")),a=!1}finally{a&&this[ae]()}}[aw](){let a=!0;try{if(!this[ay]){for(this[ay]=!0;;){let a=this[al](),b=0===a.length?0:c.default.readSync(this[ag],a,0,a.length,null);if(!this[ak](b,a))break}this[ay]=!1}a=!1}finally{a&&this[ae]()}}[ae](){if(this[ad]&&"number"==typeof this[ag]){let a=this[ag];this[ag]=void 0,c.default.closeSync(a),this.emit("close")}}},aH=class extends b.default{readable=!1;writable=!0;[aE]=!1;[aC]=!1;[af]=!1;[av]=[];[an]=!1;[at];[am];[ad];[ag];[aD];[ai];[ah]=!1;[au];constructor(a,b){super(b=b||{}),this[at]=a,this[ag]="number"==typeof b.fd?b.fd:void 0,this[am]=void 0===b.mode?438:b.mode,this[au]="number"==typeof b.start?b.start:void 0,this[ad]="boolean"!=typeof b.autoClose||b.autoClose;let c=void 0!==this[au]?"r+":"w";this[aD]=void 0===b.flags,this[ai]=void 0===b.flags?c:b.flags,void 0===this[ag]&&this[as]()}emit(a,...b){if("error"===a){if(this[aE])return!1;this[aE]=!0}return super.emit(a,...b)}get fd(){return this[ag]}get path(){return this[at]}[ao](a){this[ae](),this[aC]=!0,this.emit("error",a)}[as](){c.default.open(this[at],this[ai],this[am],(a,b)=>this[ap](a,b))}[ap](a,b){this[aD]&&"r+"===this[ai]&&a&&"ENOENT"===a.code?(this[ai]="w",this[as]()):a?this[ao](a):(this[ag]=b,this.emit("open",b),this[aC]||this[aj]())}end(a,b){return a&&this.write(a,b),this[af]=!0,this[aC]||this[av].length||"number"!=typeof this[ag]||this[ar](null,0),this}write(a,b){return"string"==typeof a&&(a=Buffer.from(a,b)),this[af]?(this.emit("error",Error("write() after end()")),!1):void 0===this[ag]||this[aC]||this[av].length?(this[av].push(a),this[an]=!0,!1):(this[aC]=!0,this[aB](a),!0)}[aB](a){c.default.write(this[ag],a,0,a.length,this[au],(a,b)=>this[ar](a,b))}[ar](a,b){a?this[ao](a):(void 0!==this[au]&&"number"==typeof b&&(this[au]+=b),this[av].length?this[aj]():(this[aC]=!1,this[af]&&!this[ah]?(this[ah]=!0,this[ae](),this.emit("finish")):this[an]&&(this[an]=!1,this.emit("drain"))))}[aj](){if(0===this[av].length)this[af]&&this[ar](null,0);else if(1===this[av].length)this[aB](this[av].pop());else{let a=this[av];this[av]=[],ac(this[ag],a,this[au],(a,b)=>this[ar](a,b))}}[ae](){if(this[ad]&&"number"==typeof this[ag]){let a=this[ag];this[ag]=void 0,c.default.close(a,a=>a?this.emit("error",a):this.emit("close"))}}},aI=class extends aH{[as](){let a;if(this[aD]&&"r+"===this[ai])try{a=c.default.openSync(this[at],this[ai],this[am])}catch(a){if(a?.code==="ENOENT")return this[ai]="w",this[as]();throw a}else a=c.default.openSync(this[at],this[ai],this[am]);this[ap](null,a)}[ae](){if(this[ad]&&"number"==typeof this[ag]){let a=this[ag];this[ag]=void 0,c.default.closeSync(a),this.emit("close")}}[aB](a){let b=!0;try{this[ar](null,c.default.writeSync(this[ag],a,0,a.length,this[au])),b=!1}finally{if(b)try{this[ae]()}catch{}}}},aJ=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),aK=a=>aJ.get(a)||a,aL=(a={})=>{if(!a)return{};let b={};for(let[c,d]of Object.entries(a))b[aK(c)]=d;return void 0===b.chmod&&!1===b.noChmod&&(b.chmod=!0),delete b.noChmod,b},aM=(a,b,c,d,e)=>Object.assign((f=[],g,h)=>{Array.isArray(f)&&(g=f,f={}),"function"==typeof g&&(h=g,g=void 0),g=g?Array.from(g):[];let i=aL(f);if(e?.(i,g),i.sync&&i.file){if("function"==typeof h)throw TypeError("callback not supported for sync tar functions");return a(i,g)}if(i.sync||!i.file)if(!i.sync||i.file){if(!i.sync&&!i.file){if("function"==typeof h)throw TypeError("callback only supported with file option");return d(i,g)}}else{if("function"==typeof h)throw TypeError("callback not supported for sync tar functions");return c(i,g)}else{let a=b(i,g);return h?a.then(()=>h(),h):a}throw Error("impossible options??")},{syncFile:a,asyncFile:b,syncNoFile:c,asyncNoFile:d,validate:e}),aN=l.default.constants||{ZLIB_VERNUM:4736},aO=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},aN)),aP=k.Buffer.concat,aQ=Object.getOwnPropertyDescriptor(k.Buffer,"concat"),aR=a=>a,aS=aQ?.writable===!0||aQ?.set!==void 0?a=>{k.Buffer.concat=a?aR:aP}:a=>{},aT=Symbol("_superWrite"),aU=class extends Error{code;errno;constructor(a,b){super("zlib: "+a.message,{cause:a}),this.code=a.code,this.errno=a.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+a.message,Error.captureStackTrace(this,b??this.constructor)}get name(){return"ZlibError"}},aV=Symbol("flushFlag"),aW=class extends ab{#a=!1;#b=!1;#c;#d;#e;#f;#g;get sawError(){return this.#a}get handle(){return this.#f}get flushFlag(){return this.#c}constructor(a,b){if(!a||"object"!=typeof a)throw TypeError("invalid options for ZlibBase constructor");if(super(a),this.#c=a.flush??0,this.#d=a.finishFlush??0,this.#e=a.fullFlushFlag??0,"function"!=typeof l[b])throw TypeError("Compression method not supported: "+b);try{this.#f=new l[b](a)}catch(a){throw new aU(a,this.constructor)}this.#g=a=>{this.#a||(this.#a=!0,this.close(),this.emit("error",a))},this.#f?.on("error",a=>this.#g(new aU(a))),this.once("end",()=>this.close)}close(){this.#f&&(this.#f.close(),this.#f=void 0,this.emit("close"))}reset(){if(!this.#a)return(0,j.default)(this.#f,"zlib binding closed"),this.#f.reset?.()}flush(a){this.ended||("number"!=typeof a&&(a=this.#e),this.write(Object.assign(k.Buffer.alloc(0),{[aV]:a})))}end(a,b,c){return"function"==typeof a&&(c=a,b=void 0,a=void 0),"function"==typeof b&&(c=b,b=void 0),a&&(b?this.write(a,b):this.write(a)),this.flush(this.#d),this.#b=!0,super.end(c)}get ended(){return this.#b}[aT](a){return super.write(a)}write(a,b,c){let d,e;if("function"==typeof b&&(c=b,b="utf8"),"string"==typeof a&&(a=k.Buffer.from(a,b)),this.#a)return;(0,j.default)(this.#f,"zlib binding closed");let f=this.#f._handle,g=f.close;f.close=()=>{};let h=this.#f.close;this.#f.close=()=>{},aS(!0);try{let b="number"==typeof a[aV]?a[aV]:this.#c;d=this.#f._processChunk(a,b),aS(!1)}catch(a){aS(!1),this.#g(new aU(a,this.write))}finally{this.#f&&(this.#f._handle=f,f.close=g,this.#f.close=h,this.#f.removeAllListeners("error"))}if(this.#f&&this.#f.on("error",a=>this.#g(new aU(a,this.write))),d)if(Array.isArray(d)&&d.length>0){let a=d[0];e=this[aT](k.Buffer.from(a));for(let a=1;a<d.length;a++)e=this[aT](d[a])}else e=this[aT](k.Buffer.from(d));return c&&c(),e}},aX=class extends aW{#a;#b;constructor(a,b){(a=a||{}).flush=a.flush||aO.Z_NO_FLUSH,a.finishFlush=a.finishFlush||aO.Z_FINISH,a.fullFlushFlag=aO.Z_FULL_FLUSH,super(a,b),this.#a=a.level,this.#b=a.strategy}params(a,b){if(!this.sawError){if(!this.handle)throw Error("cannot switch params when binding is closed");if(!this.handle.params)throw Error("not supported in this implementation");if(this.#a!==a||this.#b!==b){this.flush(aO.Z_SYNC_FLUSH),(0,j.default)(this.handle,"zlib binding closed");let c=this.handle.flush;this.handle.flush=(a,b)=>{"function"==typeof a&&(b=a,a=this.flushFlag),this.flush(a),b?.()};try{this.handle.params(a,b)}finally{this.handle.flush=c}this.handle&&(this.#a=a,this.#b=b)}}}},aY=class extends aX{#a;constructor(a){super(a,"Gzip"),this.#a=a&&!!a.portable}[aT](a){return this.#a&&(this.#a=!1,a[9]=255),super[aT](a)}},aZ=class extends aX{constructor(a){super(a,"Unzip")}},a$=class extends aW{constructor(a,b){(a=a||{}).flush=a.flush||aO.BROTLI_OPERATION_PROCESS,a.finishFlush=a.finishFlush||aO.BROTLI_OPERATION_FINISH,a.fullFlushFlag=aO.BROTLI_OPERATION_FLUSH,super(a,b)}},a_=class extends a${constructor(a){super(a,"BrotliCompress")}},a0=class extends a${constructor(a){super(a,"BrotliDecompress")}},a1=class extends aW{constructor(a,b){(a=a||{}).flush=a.flush||aO.ZSTD_e_continue,a.finishFlush=a.finishFlush||aO.ZSTD_e_end,a.fullFlushFlag=aO.ZSTD_e_flush,super(a,b)}},a2=class extends a1{constructor(a){super(a,"ZstdCompress")}},a3=class extends a1{constructor(a){super(a,"ZstdDecompress")}},a4=a=>(255^a)&255,a5=a=>(255^a)+1&255,a6={},a7={code:()=>bc,isCode:()=>a9,isName:()=>ba,name:()=>bb};for(var a8 in a7)p(a6,a8,{get:a7[a8],enumerable:!0});var a9=a=>bb.has(a),ba=a=>bc.has(a),bb=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),bc=new Map(Array.from(bb).map(a=>[a[1],a[0]])),bd=class{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#a="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(a,b=0,c,d){Buffer.isBuffer(a)?this.decode(a,b||0,c,d):a&&this.#b(a)}decode(a,b,c,d){if(b||(b=0),!a||!(a.length>=b+512))throw Error("need 512 bytes for header");this.path=c?.path??bf(a,b,100),this.mode=c?.mode??d?.mode??bi(a,b+100,8),this.uid=c?.uid??d?.uid??bi(a,b+108,8),this.gid=c?.gid??d?.gid??bi(a,b+116,8),this.size=c?.size??d?.size??bi(a,b+124,12),this.mtime=c?.mtime??d?.mtime??bg(a,b+136,12),this.cksum=bi(a,b+148,12),d&&this.#b(d,!0),c&&this.#b(c);let e=bf(a,b+156,1);if(a9(e)&&(this.#a=e||"0"),"0"===this.#a&&"/"===this.path.slice(-1)&&(this.#a="5"),"5"===this.#a&&(this.size=0),this.linkpath=bf(a,b+157,100),"ustar\x0000"===a.subarray(b+257,b+265).toString())if(this.uname=c?.uname??d?.uname??bf(a,b+265,32),this.gname=c?.gname??d?.gname??bf(a,b+297,32),this.devmaj=c?.devmaj??d?.devmaj??bi(a,b+329,8)??0,this.devmin=c?.devmin??d?.devmin??bi(a,b+337,8)??0,0!==a[b+475]){let c=bf(a,b+345,155);this.path=c+"/"+this.path}else{let e=bf(a,b+345,130);e&&(this.path=e+"/"+this.path),this.atime=c?.atime??d?.atime??bg(a,b+476,12),this.ctime=c?.ctime??d?.ctime??bg(a,b+488,12)}let f=256;for(let c=b;c<b+148;c++)f+=a[c];for(let c=b+156;c<b+512;c++)f+=a[c];this.cksumValid=f===this.cksum,void 0===this.cksum&&256===f&&(this.nullBlock=!0)}#b(a,b=!1){Object.assign(this,Object.fromEntries(Object.entries(a).filter(([a,c])=>!(null==c||"path"===a&&b||"linkpath"===a&&b||"global"===a))))}encode(a,b=0){if(a||(a=this.block=Buffer.alloc(512)),"Unsupported"===this.#a&&(this.#a="0"),!(a.length>=b+512))throw Error("need 512 bytes for header");let c=this.ctime||this.atime?130:155,d=be(this.path||"",c),e=d[0],f=d[1];this.needPax=!!d[2],this.needPax=br(a,b,100,e)||this.needPax,this.needPax=bl(a,b+100,8,this.mode)||this.needPax,this.needPax=bl(a,b+108,8,this.uid)||this.needPax,this.needPax=bl(a,b+116,8,this.gid)||this.needPax,this.needPax=bl(a,b+124,12,this.size)||this.needPax,this.needPax=bp(a,b+136,12,this.mtime)||this.needPax,a[b+156]=Number(this.#a.codePointAt(0)),this.needPax=br(a,b+157,100,this.linkpath)||this.needPax,a.write("ustar\x0000",b+257,8),this.needPax=br(a,b+265,32,this.uname)||this.needPax,this.needPax=br(a,b+297,32,this.gname)||this.needPax,this.needPax=bl(a,b+329,8,this.devmaj)||this.needPax,this.needPax=bl(a,b+337,8,this.devmin)||this.needPax,this.needPax=br(a,b+345,c,f)||this.needPax,0!==a[b+475]?this.needPax=br(a,b+345,155,f)||this.needPax:(this.needPax=br(a,b+345,130,f)||this.needPax,this.needPax=bp(a,b+476,12,this.atime)||this.needPax,this.needPax=bp(a,b+488,12,this.ctime)||this.needPax);let g=256;for(let c=b;c<b+148;c++)g+=a[c];for(let c=b+156;c<b+512;c++)g+=a[c];return this.cksum=g,bl(a,b+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return"Unsupported"===this.#a?this.#a:bb.get(this.#a)}get typeKey(){return this.#a}set type(a){let b=String(bc.get(a));if(a9(b)||"Unsupported"===b)this.#a=b;else if(a9(a))this.#a=a;else throw TypeError("invalid entry type: "+a)}},be=(a,b)=>{let c=a,d="",e,f=g.posix.parse(a).root||".";if(100>Buffer.byteLength(c))e=[c,d,!1];else{d=g.posix.dirname(c),c=g.posix.basename(c);do 100>=Buffer.byteLength(c)&&Buffer.byteLength(d)<=b?e=[c,d,!1]:Buffer.byteLength(c)>100&&Buffer.byteLength(d)<=b?e=[c.slice(0,99),d,!0]:(c=g.posix.join(g.posix.basename(d),c),d=g.posix.dirname(d));while(d!==f&&void 0===e)e||(e=[a.slice(0,99),"",!0])}return e},bf=(a,b,c)=>a.subarray(b,b+c).toString("utf8").replace(/\0.*/,""),bg=(a,b,c)=>bh(bi(a,b,c)),bh=a=>void 0===a?void 0:new Date(1e3*a),bi=(a,b,c)=>128&Number(a[b])?(a=>{let b=a[0],c=128===b?(a=>{for(var b=a.length,c=0,d=b-1;d>-1;d--){var e=Number(a[d]);0!==e&&(c+=e*Math.pow(256,b-d-1))}return c})(a.subarray(1,a.length)):255===b?(a=>{for(var b=a.length,c=0,d=!1,e=b-1;e>-1;e--){var f,g=Number(a[e]);d?f=a4(g):0===g?f=g:(d=!0,f=a5(g)),0!==f&&(c-=f*Math.pow(256,b-e-1))}return c})(a):null;if(null===c)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(c))throw Error("parsed number outside of javascript safe integer range");return c})(a.subarray(b,b+c)):bj(a,b,c),bj=(a,b,c)=>{let d;return isNaN(d=parseInt(a.subarray(b,b+c).toString("utf8").replace(/\0.*$/,"").trim(),8))?void 0:d},bk={12:0x1ffffffff,8:2097151},bl=(a,b,c,d)=>void 0!==d&&(d>bk[c]||d<0?(((a,b)=>{if(Number.isSafeInteger(a))a<0?((a,b)=>{b[0]=255;var c=!1;a*=-1;for(var d=b.length;d>1;d--){var e=255&a;a=Math.floor(a/256),c?b[d-1]=a4(e):0===e?b[d-1]=0:(c=!0,b[d-1]=a5(e))}})(a,b):((a,b)=>{b[0]=128;for(var c=b.length;c>1;c--)b[c-1]=255&a,a=Math.floor(a/256)})(a,b);else throw Error("cannot encode number outside of javascript safe integer range")})(d,a.subarray(b,b+c)),!0):(bm(a,b,c,d),!1)),bm=(a,b,c,d)=>a.write(bn(d,c),b,c,"ascii"),bn=(a,b)=>bo(Math.floor(a).toString(8),b),bo=(a,b)=>(a.length===b-1?a:Array(b-a.length-1).join("0")+a+" ")+"\0",bp=(a,b,c,d)=>void 0!==d&&bl(a,b,c,d.getTime()/1e3),bq=Array(156).join("\0"),br=(a,b,c,d)=>void 0!==d&&(a.write(d+bq,b,c,"utf8"),d.length!==Buffer.byteLength(d)||d.length>c),bs=class a{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(a,b=!1){this.atime=a.atime,this.charset=a.charset,this.comment=a.comment,this.ctime=a.ctime,this.dev=a.dev,this.gid=a.gid,this.global=b,this.gname=a.gname,this.ino=a.ino,this.linkpath=a.linkpath,this.mtime=a.mtime,this.nlink=a.nlink,this.path=a.path,this.size=a.size,this.uid=a.uid,this.uname=a.uname}encode(){let a=this.encodeBody();if(""===a)return Buffer.allocUnsafe(0);let b=Buffer.byteLength(a),c=512*Math.ceil(1+b/512),d=Buffer.allocUnsafe(c);for(let a=0;a<512;a++)d[a]=0;new bd({path:("PaxHeader/"+(0,g.basename)(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:b,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(d),d.write(a,512,b,"utf8");for(let a=b+512;a<d.length;a++)d[a]=0;return d}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(a){if(void 0===this[a])return"";let b=this[a],c=" "+("dev"===a||"ino"===a||"nlink"===a?"SCHILY.":"")+a+"="+(b instanceof Date?b.getTime()/1e3:b)+`
|
|
2
|
+
`,d=Buffer.byteLength(c),e=Math.floor(Math.log(d)/Math.log(10))+1;return d+e>=Math.pow(10,e)&&(e+=1),e+d+c}static parse(b,c,d=!1){return new a(bt(bu(b),c),d)}},bt=(a,b)=>b?Object.assign({},b,a):a,bu=a=>a.replace(/\n$/,"").split(`
|
|
3
|
+
`).reduce(bv,Object.create(null)),bv=(a,b)=>{let c=parseInt(b,10);if(c!==Buffer.byteLength(b)+1)return a;let d=(b=b.slice((c+" ").length)).split("="),e=d.shift();if(!e)return a;let f=e.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),g=d.join("=");return a[f]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(f)?new Date(1e3*Number(g)):/^[0-9]+$/.test(g)?+g:g,a},bw="win32"!==(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform)?a=>a:a=>a&&a.replaceAll(/\\/g,"/"),bx=class extends ab{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(a,b,c){switch(super({}),this.pause(),this.extended=b,this.globalExtended=c,this.header=a,this.remain=a.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=a.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!a.path)throw Error("no path provided for tar.ReadEntry");this.path=bw(a.path),this.mode=a.mode,this.mode&&(this.mode=4095&this.mode),this.uid=a.uid,this.gid=a.gid,this.uname=a.uname,this.gname=a.gname,this.size=this.remain,this.mtime=a.mtime,this.atime=a.atime,this.ctime=a.ctime,this.linkpath=a.linkpath?bw(a.linkpath):void 0,this.uname=a.uname,this.gname=a.gname,b&&this.#a(b),c&&this.#a(c,!0)}write(a){let b=a.length;if(b>this.blockRemain)throw Error("writing more to entry than is appropriate");let c=this.remain,d=this.blockRemain;return this.remain=Math.max(0,c-b),this.blockRemain=Math.max(0,d-b),!!this.ignore||(c>=b?super.write(a):super.write(a.subarray(0,c)))}#a(a,b=!1){a.path&&(a.path=bw(a.path)),a.linkpath&&(a.linkpath=bw(a.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(a).filter(([a,c])=>!(null==c||"path"===a&&b))))}},by=(a,b,c,d={})=>{a.file&&(d.file=a.file),a.cwd&&(d.cwd=a.cwd),d.code=c instanceof Error&&c.code||b,d.tarCode=b,a.strict||!1===d.recoverable?c instanceof Error?a.emit("error",Object.assign(c,d)):a.emit("error",Object.assign(Error(`${b}: ${c}`),d)):(c instanceof Error&&(d=Object.assign(c,d),c=c.message),a.emit("warn",b,c,d))},bz=Buffer.from([31,139]),bA=Buffer.from([40,181,47,253]),bB=Math.max(bz.length,bA.length),bC=Symbol("state"),bD=Symbol("writeEntry"),bE=Symbol("readEntry"),bF=Symbol("nextEntry"),bG=Symbol("processEntry"),bH=Symbol("extendedHeader"),bI=Symbol("globalExtendedHeader"),bJ=Symbol("meta"),bK=Symbol("emitMeta"),bL=Symbol("buffer"),bM=Symbol("queue"),bN=Symbol("ended"),bO=Symbol("emittedEnd"),bP=Symbol("emit"),bQ=Symbol("unzip"),bR=Symbol("consumeChunk"),bS=Symbol("consumeChunkSub"),bT=Symbol("consumeBody"),bU=Symbol("consumeMeta"),bV=Symbol("consumeHeader"),bW=Symbol("consuming"),bX=Symbol("bufferConcat"),bY=Symbol("maybeEnd"),bZ=Symbol("writing"),b$=Symbol("aborted"),b_=Symbol("onDone"),b0=Symbol("sawValidEntry"),b1=Symbol("sawNullBlock"),b2=Symbol("sawEOF"),b3=Symbol("closeStream"),b4=()=>!0,b5=class extends b.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[bM]=[];[bL];[bE];[bD];[bC]="begin";[bJ]="";[bH];[bI];[bN]=!1;[bQ];[b$]=!1;[b0];[b1]=!1;[b2]=!1;[bZ]=!1;[bW]=!1;[bO]=!1;constructor(a={}){super(),this.file=a.file||"",this.on(b_,()=>{("begin"===this[bC]||!1===this[b0])&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),a.ondone?this.on(b_,a.ondone):this.on(b_,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!a.strict,this.maxMetaEntrySize=a.maxMetaEntrySize||1048576,this.filter="function"==typeof a.filter?a.filter:b4;let b=a.file&&(a.file.endsWith(".tar.br")||a.file.endsWith(".tbr"));this.brotli=a.gzip||a.zstd||void 0===a.brotli?!!b&&void 0:a.brotli;let c=a.file&&(a.file.endsWith(".tar.zst")||a.file.endsWith(".tzst"));this.zstd=a.gzip||a.brotli||void 0===a.zstd?!!c||void 0:a.zstd,this.on("end",()=>this[b3]()),"function"==typeof a.onwarn&&this.on("warn",a.onwarn),"function"==typeof a.onReadEntry&&this.on("entry",a.onReadEntry)}warn(a,b,c={}){by(this,a,b,c)}[bV](a,b){let c;void 0===this[b0]&&(this[b0]=!1);try{c=new bd(a,b,this[bH],this[bI])}catch(a){return this.warn("TAR_ENTRY_INVALID",a)}if(c.nullBlock)this[b1]?(this[b2]=!0,"begin"===this[bC]&&(this[bC]="header"),this[bP]("eof")):(this[b1]=!0,this[bP]("nullBlock"));else if(this[b1]=!1,c.cksumValid)if(c.path){let a=c.type;if(/^(Symbolic)?Link$/.test(a)&&!c.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:c});else if(/^(Symbolic)?Link$/.test(a)||/^(Global)?ExtendedHeader$/.test(a)||!c.linkpath){let a=this[bD]=new bx(c,this[bH],this[bI]);if(!this[b0])if(a.remain){let b=()=>{a.invalid||(this[b0]=!0)};a.on("end",b)}else this[b0]=!0;a.meta?a.size>this.maxMetaEntrySize?(a.ignore=!0,this[bP]("ignoredEntry",a),this[bC]="ignore",a.resume()):a.size>0&&(this[bJ]="",a.on("data",a=>this[bJ]+=a),this[bC]="meta"):(this[bH]=void 0,a.ignore=a.ignore||!this.filter(a.path,a),a.ignore?(this[bP]("ignoredEntry",a),this[bC]=a.remain?"ignore":"header",a.resume()):(a.remain?this[bC]="body":(this[bC]="header",a.end()),this[bE]?this[bM].push(a):(this[bM].push(a),this[bF]())))}else this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:c})}else this.warn("TAR_ENTRY_INVALID","path is required",{header:c});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:c})}[b3](){queueMicrotask(()=>this.emit("close"))}[bG](a){let b=!0;if(a)if(Array.isArray(a)){let[b,...c]=a;this.emit(b,...c)}else this[bE]=a,this.emit("entry",a),a.emittedEnd||(a.on("end",()=>this[bF]()),b=!1);else this[bE]=void 0,b=!1;return b}[bF](){do;while(this[bG](this[bM].shift()))if(0===this[bM].length){let a=this[bE];!a||a.flowing||a.size===a.remain?this[bZ]||this.emit("drain"):a.once("drain",()=>this.emit("drain"))}}[bT](a,b){let c=this[bD];if(!c)throw Error("attempt to consume body without entry??");let d=c.blockRemain??0,e=d>=a.length&&0===b?a:a.subarray(b,b+d);return c.write(e),c.blockRemain||(this[bC]="header",this[bD]=void 0,c.end()),e.length}[bU](a,b){let c=this[bD],d=this[bT](a,b);return!this[bD]&&c&&this[bK](c),d}[bP](a,b,c){0!==this[bM].length||this[bE]?this[bM].push([a,b,c]):this.emit(a,b,c)}[bK](a){switch(this[bP]("meta",this[bJ]),a.type){case"ExtendedHeader":case"OldExtendedHeader":this[bH]=bs.parse(this[bJ],this[bH],!1);break;case"GlobalExtendedHeader":this[bI]=bs.parse(this[bJ],this[bI],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let a=this[bH]??Object.create(null);this[bH]=a,a.path=this[bJ].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let a=this[bH]||Object.create(null);this[bH]=a,a.linkpath=this[bJ].replace(/\0.*/,"");break}default:throw Error("unknown meta: "+a.type)}}abort(a){this[b$]=!0,this.emit("abort",a),this.warn("TAR_ABORT",a,{recoverable:!1})}write(a,b,c){if("function"==typeof b&&(c=b,b=void 0),"string"==typeof a&&(a=Buffer.from(a,"string"==typeof b?b:"utf8")),this[b$])return c?.(),!1;if((void 0===this[bQ]||void 0===this.brotli&&!1===this[bQ])&&a){if(this[bL]&&(a=Buffer.concat([this[bL],a]),this[bL]=void 0),a.length<bB)return this[bL]=a,c?.(),!0;for(let b=0;void 0===this[bQ]&&b<bz.length;b++)a[b]!==bz[b]&&(this[bQ]=!1);let b=!1;if(!1===this[bQ]&&!1!==this.zstd){b=!0;for(let c=0;c<bA.length;c++)if(a[c]!==bA[c]){b=!1;break}}let d=void 0===this.brotli&&!b;if(!1===this[bQ]&&d)if(a.length<512)if(!this[bN])return this[bL]=a,c?.(),!0;else this.brotli=!0;else try{new bd(a.subarray(0,512)),this.brotli=!1}catch{this.brotli=!0}if(void 0===this[bQ]||!1===this[bQ]&&(this.brotli||b)){let d=this[bN];this[bN]=!1,this[bQ]=void 0===this[bQ]?new aZ({}):b?new a3({}):new a0({}),this[bQ].on("data",a=>this[bR](a)),this[bQ].on("error",a=>this.abort(a)),this[bQ].on("end",()=>{this[bN]=!0,this[bR]()}),this[bZ]=!0;let e=!!this[bQ][d?"end":"write"](a);return this[bZ]=!1,c?.(),e}}this[bZ]=!0,this[bQ]?this[bQ].write(a):this[bR](a),this[bZ]=!1;let d=!(this[bM].length>0)&&(!this[bE]||this[bE].flowing);return d||0!==this[bM].length||this[bE]?.once("drain",()=>this.emit("drain")),c?.(),d}[bX](a){a&&!this[b$]&&(this[bL]=this[bL]?Buffer.concat([this[bL],a]):a)}[bY](){if(this[bN]&&!this[bO]&&!this[b$]&&!this[bW]){this[bO]=!0;let a=this[bD];if(a&&a.blockRemain){let b=this[bL]?this[bL].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${a.blockRemain} more bytes, only ${b} available)`,{entry:a}),this[bL]&&a.write(this[bL]),a.end()}this[bP](b_)}}[bR](a){if(this[bW]&&a)this[bX](a);else if(a||this[bL]){if(a){if(this[bW]=!0,this[bL]){this[bX](a);let b=this[bL];this[bL]=void 0,this[bS](b)}else this[bS](a);for(;this[bL]&&this[bL]?.length>=512&&!this[b$]&&!this[b2];){let a=this[bL];this[bL]=void 0,this[bS](a)}this[bW]=!1}}else this[bY]();(!this[bL]||this[bN])&&this[bY]()}[bS](a){let b=0,c=a.length;for(;b+512<=c&&!this[b$]&&!this[b2];)switch(this[bC]){case"begin":case"header":this[bV](a,b),b+=512;break;case"ignore":case"body":b+=this[bT](a,b);break;case"meta":b+=this[bU](a,b);break;default:throw Error("invalid state: "+this[bC])}b<c&&(this[bL]=this[bL]?Buffer.concat([a.subarray(b),this[bL]]):a.subarray(b))}end(a,b,c){return"function"==typeof a&&(c=a,b=void 0,a=void 0),"function"==typeof b&&(c=b,b=void 0),"string"==typeof a&&(a=Buffer.from(a,b)),c&&this.once("finish",c),this[b$]||(this[bQ]?(a&&this[bQ].write(a),this[bQ].end()):(this[bN]=!0,(void 0===this.brotli||void 0===this.zstd)&&(a=a||Buffer.alloc(0)),a&&this.write(a),this[bY]())),this}},b6=a=>{let b=a.length-1,c=-1;for(;b>-1&&"/"===a.charAt(b);)c=b,b--;return -1===c?a:a.slice(0,c)},b7=(a,b)=>{let c=new Map(b.map(a=>[b6(a),!0])),d=a.filter,e=(a,b="")=>{let d=b||(0,i.parse)(a).root||".",f;if(a===d)f=!1;else{let b=c.get(a);f=void 0!==b?b:e((0,i.dirname)(a),d)}return c.set(a,f),f};a.filter=d?(a,b)=>d(a,b)&&e(b6(a)):a=>e(b6(a))},b8=aM(a=>{let b=new b5(a),c=a.file,d;try{d=h.default.openSync(c,"r");let e=h.default.fstatSync(d),f=a.maxReadSize||0x1000000;if(e.size<f){let a=Buffer.allocUnsafe(e.size),c=h.default.readSync(d,a,0,e.size,0);b.end(c===a.byteLength?a:a.subarray(0,c))}else{let a=0,c=Buffer.allocUnsafe(f);for(;a<e.size;){let e=h.default.readSync(d,c,0,f,a);if(0===e)break;a+=e,b.write(c.subarray(0,e))}b.end()}}finally{if("number"==typeof d)try{h.default.closeSync(d)}catch{}}},(a,b)=>{let c=new b5(a),d=a.maxReadSize||0x1000000,e=a.file;return new Promise((a,b)=>{c.on("error",b),c.on("end",a),h.default.stat(e,(a,f)=>{if(a)b(a);else{let a=new aF(e,{readSize:d,size:f.size});a.on("error",b),a.pipe(c)}})})},a=>new b5(a),a=>new b5(a),(a,b)=>{let c;b?.length&&b7(a,b),a.noResume||(c=a.onReadEntry,a.onReadEntry=c?a=>{c(a),a.resume()}:a=>a.resume())}),b9=(a,b,c)=>(a&=4095,c&&(a=(384|a)&-19),b&&(256&a&&(a|=64),32&a&&(a|=8),4&a&&(a|=1)),a),{isAbsolute:ca,parse:cb}=g.win32,cc=a=>{let b="",c=cb(a);for(;ca(a)||c.root;){let d="/"===a.charAt(0)&&"//?/"!==a.slice(0,4)?"/":c.root;a=a.slice(d.length),b+=d,c=cb(a)}return[b,a]},cd=["|","<",">","?",":"],ce=cd.map(a=>String.fromCodePoint(61440+Number(a.codePointAt(0)))),cf=new Map(cd.map((a,b)=>[a,ce[b]])),cg=new Map(ce.map((a,b)=>[a,cd[b]])),ch=a=>cd.reduce((a,b)=>a.split(b).join(cf.get(b)),a),ci=(a,b)=>b?(a=bw(a).replace(/^\.(\/|$)/,""),b6(b)+"/"+a):bw(a),cj=Symbol("process"),ck=Symbol("file"),cl=Symbol("directory"),cm=Symbol("symlink"),cn=Symbol("hardlink"),co=Symbol("header"),cp=Symbol("read"),cq=Symbol("lstat"),cr=Symbol("onlstat"),cs=Symbol("onread"),ct=Symbol("onreadlink"),cu=Symbol("openfile"),cv=Symbol("onopenfile"),cw=Symbol("close"),cx=Symbol("mode"),cy=Symbol("awaitDrain"),cz=Symbol("ondrain"),cA=Symbol("prefix"),cB=class extends ab{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#a=!1;constructor(a,b={}){let c=aL(b);super(),this.path=bw(a),this.portable=!!c.portable,this.maxReadSize=c.maxReadSize||0x1000000,this.linkCache=c.linkCache||new Map,this.statCache=c.statCache||new Map,this.preservePaths=!!c.preservePaths,this.cwd=bw(c.cwd||process.cwd()),this.strict=!!c.strict,this.noPax=!!c.noPax,this.noMtime=!!c.noMtime,this.mtime=c.mtime,this.prefix=c.prefix?bw(c.prefix):void 0,this.onWriteEntry=c.onWriteEntry,"function"==typeof c.onwarn&&this.on("warn",c.onwarn);let d=!1;if(!this.preservePaths){let[a,b]=cc(this.path);a&&"string"==typeof b&&(this.path=b,d=a)}this.win32=!!c.win32||"win32"===process.platform,this.win32&&(this.path=(a=>ce.reduce((a,b)=>a.split(b).join(cg.get(b)),a))(this.path.replaceAll(/\\/g,"/")),a=a.replaceAll(/\\/g,"/")),this.absolute=bw(c.absolute||i.default.resolve(this.cwd,a)),""===this.path&&(this.path="./"),d&&this.warn("TAR_ENTRY_INFO",`stripping ${d} from absolute path`,{entry:this,path:d+this.path});let e=this.statCache.get(this.absolute);e?this[cr](e):this[cq]()}warn(a,b,c={}){return by(this,a,b,c)}emit(a,...b){return"error"===a&&(this.#a=!0),super.emit(a,...b)}[cq](){c.default.lstat(this.absolute,(a,b)=>{if(a)return this.emit("error",a);this[cr](b)})}[cr](a){this.statCache.set(this.absolute,a),this.stat=a,a.isFile()||(a.size=0),this.type=cE(a),this.emit("stat",a),this[cj]()}[cj](){switch(this.type){case"File":return this[ck]();case"Directory":return this[cl]();case"SymbolicLink":return this[cm]();default:return this.end()}}[cx](a){return b9(a,"Directory"===this.type,this.portable)}[cA](a){return ci(a,this.prefix)}[co](){if(!this.stat)throw Error("cannot write header before stat");"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new bd({path:this[cA](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[cA](this.linkpath):this.linkpath,mode:this[cx](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:"Unsupported"===this.type?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new bs({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[cA](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[cA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let a=this.header?.block;if(!a)throw Error("failed to encode header");super.write(a)}[cl](){if(!this.stat)throw Error("cannot create directory entry without stat");"/"!==this.path.slice(-1)&&(this.path+="/"),this.stat.size=0,this[co](),this.end()}[cm](){c.default.readlink(this.absolute,(a,b)=>{if(a)return this.emit("error",a);this[ct](b)})}[ct](a){this.linkpath=bw(a),this[co](),this.end()}[cn](a){if(!this.stat)throw Error("cannot create link entry without stat");this.type="Link",this.linkpath=bw(i.default.relative(this.cwd,a)),this.stat.size=0,this[co](),this.end()}[ck](){if(!this.stat)throw Error("cannot create file entry without stat");if(this.stat.nlink>1){let a=`${this.stat.dev}:${this.stat.ino}`,b=this.linkCache.get(a);if(b?.indexOf(this.cwd)===0)return this[cn](b);this.linkCache.set(a,this.absolute)}if(this[co](),0===this.stat.size)return this.end();this[cu]()}[cu](){c.default.open(this.absolute,"r",(a,b)=>{if(a)return this.emit("error",a);this[cv](b)})}[cv](a){if(this.fd=a,this.#a)return this[cw]();if(!this.stat)throw Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let b=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(b),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[cp]()}[cp](){let{fd:a,buf:b,offset:d,length:e,pos:f}=this;if(void 0===a||void 0===b)throw Error("cannot read file without first opening");c.default.read(a,b,d,e,f,(a,b)=>{if(a)return this[cw](()=>this.emit("error",a));this[cs](b)})}[cw](a=()=>{}){void 0!==this.fd&&c.default.close(this.fd,a)}[cs](a){if(a<=0&&this.remain>0){let a=Object.assign(Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[cw](()=>this.emit("error",a))}if(a>this.remain){let a=Object.assign(Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[cw](()=>this.emit("error",a))}if(!this.buf)throw Error("should have created buffer prior to reading");if(a===this.remain)for(let b=a;b<this.length&&a<this.blockRemain;b++)this.buf[b+this.offset]=0,a++,this.remain++;let b=0===this.offset&&a===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+a);this.write(b)?this[cz]():this[cy](()=>this[cz]())}[cy](a){this.once("drain",a)}write(a,b,c){if("function"==typeof b&&(c=b,b=void 0),"string"==typeof a&&(a=Buffer.from(a,"string"==typeof b?b:"utf8")),this.blockRemain<a.length){let a=Object.assign(Error("writing more data than expected"),{path:this.absolute});return this.emit("error",a)}return this.remain-=a.length,this.blockRemain-=a.length,this.pos+=a.length,this.offset+=a.length,super.write(a,null,c)}[cz](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[cw](a=>a?this.emit("error",a):this.end());if(!this.buf)throw Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[cp]()}},cC=class extends cB{sync=!0;[cq](){this[cr](c.default.lstatSync(this.absolute))}[cm](){this[ct](c.default.readlinkSync(this.absolute))}[cu](){this[cv](c.default.openSync(this.absolute,"r"))}[cp](){let a=!0;try{let{fd:b,buf:d,offset:e,length:f,pos:g}=this;if(void 0===b||void 0===d)throw Error("fd and buf must be set in READ method");let h=c.default.readSync(b,d,e,f,g);this[cs](h),a=!1}finally{if(a)try{this[cw](()=>{})}catch{}}}[cy](a){a()}[cw](a=()=>{}){void 0!==this.fd&&c.default.closeSync(this.fd),a()}},cD=class extends ab{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(a,b,c={}){return by(this,a,b,c)}constructor(a,b={}){let c=aL(b);super(),this.preservePaths=!!c.preservePaths,this.portable=!!c.portable,this.strict=!!c.strict,this.noPax=!!c.noPax,this.noMtime=!!c.noMtime,this.onWriteEntry=c.onWriteEntry,this.readEntry=a;let{type:d}=a;if("Unsupported"===d)throw Error("writing entry that should be ignored");this.type=d,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=c.prefix,this.path=bw(a.path),this.mode=void 0!==a.mode?this[cx](a.mode):void 0,this.uid=this.portable?void 0:a.uid,this.gid=this.portable?void 0:a.gid,this.uname=this.portable?void 0:a.uname,this.gname=this.portable?void 0:a.gname,this.size=a.size,this.mtime=this.noMtime?void 0:c.mtime||a.mtime,this.atime=this.portable?void 0:a.atime,this.ctime=this.portable?void 0:a.ctime,this.linkpath=void 0!==a.linkpath?bw(a.linkpath):void 0,"function"==typeof c.onwarn&&this.on("warn",c.onwarn);let e=!1;if(!this.preservePaths){let[a,b]=cc(this.path);a&&"string"==typeof b&&(this.path=b,e=a)}this.remain=a.size,this.blockRemain=a.startBlockSize,this.onWriteEntry?.(this),this.header=new bd({path:this[cA](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[cA](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),e&&this.warn("TAR_ENTRY_INFO",`stripping ${e} from absolute path`,{entry:this,path:e+this.path}),this.header.encode()&&!this.noPax&&super.write(new bs({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[cA](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[cA](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let f=this.header?.block;if(!f)throw Error("failed to encode header");super.write(f),a.pipe(this)}[cA](a){return ci(a,this.prefix)}[cx](a){return b9(a,"Directory"===this.type,this.portable)}write(a,b,c){"function"==typeof b&&(c=b,b=void 0),"string"==typeof a&&(a=Buffer.from(a,"string"==typeof b?b:"utf8"));let d=a.length;if(d>this.blockRemain)throw Error("writing more to entry than is appropriate");return this.blockRemain-=d,super.write(a,c)}end(a,b,c){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),"function"==typeof a&&(c=a,b=void 0,a=void 0),"function"==typeof b&&(c=b,b=void 0),"string"==typeof a&&(a=Buffer.from(a,b??"utf8")),c&&this.once("finish",c),a?super.end(a,c):super.end(c),this}},cE=a=>a.isFile()?"File":a.isDirectory()?"Directory":a.isSymbolicLink()?"SymbolicLink":"Unsupported",cF=class a{tail;head;length=0;static create(b=[]){return new a(b)}constructor(a=[]){for(let b of a)this.push(b)}*[Symbol.iterator](){for(let a=this.head;a;a=a.next)yield a.value}removeNode(a){if(a.list!==this)throw Error("removing node which does not belong to this list");let b=a.next,c=a.prev;return b&&(b.prev=c),c&&(c.next=b),a===this.head&&(this.head=b),a===this.tail&&(this.tail=c),this.length--,a.next=void 0,a.prev=void 0,a.list=void 0,b}unshiftNode(a){if(a===this.head)return;a.list&&a.list.removeNode(a);let b=this.head;a.list=this,a.next=b,b&&(b.prev=a),this.head=a,this.tail||(this.tail=a),this.length++}pushNode(a){if(a===this.tail)return;a.list&&a.list.removeNode(a);let b=this.tail;a.list=this,a.prev=b,b&&(b.next=a),this.tail=a,this.head||(this.head=a),this.length++}push(...a){for(let c=0,d=a.length;c<d;c++){var b;b=this,b.tail=new cG(a[c],b.tail,void 0,b),b.head||(b.head=b.tail),b.length++}return this.length}unshift(...a){for(var b,c=0,d=a.length;c<d;c++){b=this,b.head=new cG(a[c],void 0,b.head,b),b.tail||(b.tail=b.head),b.length++}return this.length}pop(){if(!this.tail)return;let a=this.tail.value,b=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,b.list=void 0,this.length--,a}shift(){if(!this.head)return;let a=this.head.value,b=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,b.list=void 0,this.length--,a}forEach(a,b){b=b||this;for(let c=this.head,d=0;c;d++)a.call(b,c.value,d,this),c=c.next}forEachReverse(a,b){b=b||this;for(let c=this.tail,d=this.length-1;c;d--)a.call(b,c.value,d,this),c=c.prev}get(a){let b=0,c=this.head;for(;c&&b<a;b++)c=c.next;if(b===a&&c)return c.value}getReverse(a){let b=0,c=this.tail;for(;c&&b<a;b++)c=c.prev;if(b===a&&c)return c.value}map(b,c){c=c||this;let d=new a;for(let a=this.head;a;)d.push(b.call(c,a.value,this)),a=a.next;return d}mapReverse(b,c){c=c||this;var d=new a;for(let a=this.tail;a;)d.push(b.call(c,a.value,this)),a=a.prev;return d}reduce(a,b){let c,d=this.head;if(arguments.length>1)c=b;else if(this.head)d=this.head.next,c=this.head.value;else throw TypeError("Reduce of empty list with no initial value");for(var e=0;d;e++)c=a(c,d.value,e),d=d.next;return c}reduceReverse(a,b){let c,d=this.tail;if(arguments.length>1)c=b;else if(this.tail)d=this.tail.prev,c=this.tail.value;else throw TypeError("Reduce of empty list with no initial value");for(let b=this.length-1;d;b--)c=a(c,d.value,b),d=d.prev;return c}toArray(){let a=Array(this.length);for(let b=0,c=this.head;c;b++)a[b]=c.value,c=c.next;return a}toArrayReverse(){let a=Array(this.length);for(let b=0,c=this.tail;c;b++)a[b]=c.value,c=c.prev;return a}slice(b=0,c=this.length){c<0&&(c+=this.length),b<0&&(b+=this.length);let d=new a;if(c<b||c<0)return d;b<0&&(b=0),c>this.length&&(c=this.length);let e=this.head,f=0;for(f=0;e&&f<b;f++)e=e.next;for(;e&&f<c;f++,e=e.next)d.push(e.value);return d}sliceReverse(b=0,c=this.length){c<0&&(c+=this.length),b<0&&(b+=this.length);let d=new a;if(c<b||c<0)return d;b<0&&(b=0),c>this.length&&(c=this.length);let e=this.length,f=this.tail;for(;f&&e>c;e--)f=f.prev;for(;f&&e>b;e--,f=f.prev)d.push(f.value);return d}splice(a,b=0,...c){a>this.length&&(a=this.length-1),a<0&&(a=this.length+a);let d=this.head;for(let b=0;d&&b<a;b++)d=d.next;let e=[];for(let a=0;d&&a<b;a++)e.push(d.value),d=this.removeNode(d);for(let a of(d?d!==this.tail&&(d=d.prev):d=this.tail,c))d=function(a,b,c){let d=b?b.next:a.head,e=new cG(c,b,d,a);return void 0===e.next&&(a.tail=e),void 0===e.prev&&(a.head=e),a.length++,e}(this,d,a);return e}reverse(){let a=this.head,b=this.tail;for(let b=a;b;b=b.prev){let a=b.prev;b.prev=b.next,b.next=a}return this.head=b,this.tail=a,this}},cG=class{list;next;prev;value;constructor(a,b,c,d){this.list=d,this.value=a,b?(b.next=this,this.prev=b):this.prev=void 0,c?(c.prev=this,this.next=c):this.next=void 0}},cH=class{path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(a,b){this.path=a||"./",this.absolute=b}},cI=Buffer.alloc(1024),cJ=Symbol("onStat"),cK=Symbol("ended"),cL=Symbol("queue"),cM=Symbol("current"),cN=Symbol("process"),cO=Symbol("processing"),cP=Symbol("processJob"),cQ=Symbol("jobs"),cR=Symbol("jobDone"),cS=Symbol("addFSEntry"),cT=Symbol("addTarEntry"),cU=Symbol("stat"),cV=Symbol("readdir"),cW=Symbol("onreaddir"),cX=Symbol("pipe"),cY=Symbol("entry"),cZ=Symbol("entryOpt"),c$=Symbol("writeEntryClass"),c_=Symbol("write"),c0=Symbol("ondrain"),c1=class extends ab{sync=!1;opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[c$];onWriteEntry;[cL];[cQ]=0;[cO]=!1;[cK]=!1;constructor(a={}){if(super(),this.opt=a,this.file=a.file||"",this.cwd=a.cwd||process.cwd(),this.maxReadSize=a.maxReadSize,this.preservePaths=!!a.preservePaths,this.strict=!!a.strict,this.noPax=!!a.noPax,this.prefix=bw(a.prefix||""),this.linkCache=a.linkCache||new Map,this.statCache=a.statCache||new Map,this.readdirCache=a.readdirCache||new Map,this.onWriteEntry=a.onWriteEntry,this[c$]=cB,"function"==typeof a.onwarn&&this.on("warn",a.onwarn),this.portable=!!a.portable,a.gzip||a.brotli||a.zstd){if(+!!a.gzip+ +!!a.brotli+ +!!a.zstd>1)throw TypeError("gzip, brotli, zstd are mutually exclusive");if(a.gzip&&("object"!=typeof a.gzip&&(a.gzip={}),this.portable&&(a.gzip.portable=!0),this.zip=new aY(a.gzip)),a.brotli&&("object"!=typeof a.brotli&&(a.brotli={}),this.zip=new a_(a.brotli)),a.zstd&&("object"!=typeof a.zstd&&(a.zstd={}),this.zip=new a2(a.zstd)),!this.zip)throw Error("impossible");let b=this.zip;b.on("data",a=>super.write(a)),b.on("end",()=>super.end()),b.on("drain",()=>this[c0]()),this.on("resume",()=>b.resume())}else this.on("drain",this[c0]);this.noDirRecurse=!!a.noDirRecurse,this.follow=!!a.follow,this.noMtime=!!a.noMtime,a.mtime&&(this.mtime=a.mtime),this.filter="function"==typeof a.filter?a.filter:()=>!0,this[cL]=new cF,this[cQ]=0,this.jobs=Number(a.jobs)||4,this[cO]=!1,this[cK]=!1}[c_](a){return super.write(a)}add(a){return this.write(a),this}end(a,b,c){return"function"==typeof a&&(c=a,a=void 0),"function"==typeof b&&(c=b,b=void 0),a&&this.add(a),this[cK]=!0,this[cN](),c&&c(),this}write(a){if(this[cK])throw Error("write after end");return a instanceof bx?this[cT](a):this[cS](a),this.flowing}[cT](a){let b=bw(i.default.resolve(this.cwd,a.path));if(this.filter(a.path,a)){let c=new cH(a.path,b);c.entry=new cD(a,this[cZ](c)),c.entry.on("end",()=>this[cR](c)),this[cQ]+=1,this[cL].push(c)}else a.resume();this[cN]()}[cS](a){let b=bw(i.default.resolve(this.cwd,a));this[cL].push(new cH(a,b)),this[cN]()}[cU](a){a.pending=!0,this[cQ]+=1;let b=this.follow?"stat":"lstat";c.default[b](a.absolute,(b,c)=>{a.pending=!1,this[cQ]-=1,b?this.emit("error",b):this[cJ](a,c)})}[cJ](a,b){this.statCache.set(a.absolute,b),a.stat=b,this.filter(a.path,b)?b.isFile()&&b.nlink>1&&a===this[cM]&&!this.linkCache.get(`${b.dev}:${b.ino}`)&&!this.sync&&this[cP](a):a.ignore=!0,this[cN]()}[cV](a){a.pending=!0,this[cQ]+=1,c.default.readdir(a.absolute,(b,c)=>{if(a.pending=!1,this[cQ]-=1,b)return this.emit("error",b);this[cW](a,c)})}[cW](a,b){this.readdirCache.set(a.absolute,b),a.readdir=b,this[cN]()}[cN](){if(!this[cO]){this[cO]=!0;for(let a=this[cL].head;a&&this[cQ]<this.jobs;a=a.next)if(this[cP](a.value),a.value.ignore){let b=a.next;this[cL].removeNode(a),a.next=b}this[cO]=!1,this[cK]&&0===this[cL].length&&0===this[cQ]&&(this.zip?this.zip.end(cI):(super.write(cI),super.end()))}}get[cM](){return this[cL]&&this[cL].head&&this[cL].head.value}[cR](a){this[cL].shift(),this[cQ]-=1,this[cN]()}[cP](a){if(!a.pending){if(a.entry){a!==this[cM]||a.piped||this[cX](a);return}if(!a.stat){let b=this.statCache.get(a.absolute);b?this[cJ](a,b):this[cU](a)}if(a.stat&&!a.ignore){if(!this.noDirRecurse&&a.stat.isDirectory()&&!a.readdir){let b=this.readdirCache.get(a.absolute);if(b?this[cW](a,b):this[cV](a),!a.readdir)return}if(a.entry=this[cY](a),!a.entry){a.ignore=!0;return}a!==this[cM]||a.piped||this[cX](a)}}}[cZ](a){return{onwarn:(a,b,c)=>this.warn(a,b,c),noPax:this.noPax,cwd:this.cwd,absolute:a.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[cY](a){this[cQ]+=1;try{return new this[c$](a.path,this[cZ](a)).on("end",()=>this[cR](a)).on("error",a=>this.emit("error",a))}catch(a){this.emit("error",a)}}[c0](){this[cM]&&this[cM].entry&&this[cM].entry.resume()}[cX](a){a.piped=!0,a.readdir&&a.readdir.forEach(b=>{let c=a.path,d="./"===c?"":c.replace(/\/*$/,"/");this[cS](d+b)});let b=a.entry,c=this.zip;if(!b)throw Error("cannot pipe without source");c?b.on("data",a=>{c.write(a)||b.pause()}):b.on("data",a=>{super.write(a)||b.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(a,b,c={}){by(this,a,b,c)}},c2=class extends c1{sync=!0;constructor(a){super(a),this[c$]=cC}pause(){}resume(){}[cU](a){let b=this.follow?"statSync":"lstatSync";this[cJ](a,c.default[b](a.absolute))}[cV](a){this[cW](a,c.default.readdirSync(a.absolute))}[cX](a){let b=a.entry,c=this.zip;if(a.readdir&&a.readdir.forEach(b=>{let c=a.path,d="./"===c?"":c.replace(/\/*$/,"/");this[cS](d+b)}),!b)throw Error("Cannot pipe without source");c?b.on("data",a=>{c.write(a)}):b.on("data",a=>{super[c_](a)})}},c3=(a,b)=>{b.forEach(b=>{"@"===b.charAt(0)?b8({file:g.default.resolve(a.cwd,b.slice(1)),sync:!0,noResume:!0,onReadEntry:b=>a.add(b)}):a.add(b)}),a.end()},c4=async(a,b)=>{for(let c of b)"@"===c.charAt(0)?await b8({file:g.default.resolve(String(a.cwd),c.slice(1)),noResume:!0,onReadEntry:b=>{a.add(b)}}):a.add(c);a.end()},c5=aM((a,b)=>{let c=new c2(a),d=new aI(a.file,{mode:a.mode||438});c.pipe(d),c3(c,b)},(a,b)=>{let c=new c1(a),d=new aH(a.file,{mode:a.mode||438});c.pipe(d);let e=new Promise((a,b)=>{d.on("error",b),d.on("close",a),c.on("error",b)});return c4(c,b).catch(a=>c.emit("error",a)),e},(a,b)=>{let c=new c2(a);return c3(c,b),c},(a,b)=>{let c=new c1(a);return c4(c,b).catch(a=>c.emit("error",a)),c},(a,b)=>{if(!b?.length)throw TypeError("no paths specified to add to archive")}),c6="win32"===(process.env.__FAKE_PLATFORM__||process.platform),{O_CREAT:c7,O_NOFOLLOW:c8,O_TRUNC:c9,O_WRONLY:da}=c.default.constants,db=Number(process.env.__FAKE_FS_O_FILENAME__)||c.default.constants.UV_FS_O_FILEMAP||0,dc=db|c9|c7|da,dd=c6||"number"!=typeof c8?null:c8|c9|c7|da,de=null!==dd?()=>dd:c6&&db?a=>a<524288?dc:"w":()=>"w",df=(a,b,c)=>{try{return h.default.lchownSync(a,b,c)}catch(a){if(a?.code!=="ENOENT")throw a}},dg=(a,b,c,d)=>{h.default.lchown(a,b,c,a=>{d(a&&a?.code!=="ENOENT"?a:null)})},dh=(a,b,c,d,e)=>{b.isDirectory()?di(g.default.resolve(a,b.name),c,d,f=>{if(f)return e(f);dg(g.default.resolve(a,b.name),c,d,e)}):dg(g.default.resolve(a,b.name),c,d,e)},di=(a,b,c,d)=>{h.default.readdir(a,{withFileTypes:!0},(e,f)=>{if(e){if("ENOENT"===e.code)return d();if("ENOTDIR"!==e.code&&"ENOTSUP"!==e.code)return d(e)}if(e||!f.length)return dg(a,b,c,d);let g=f.length,h=null,i=e=>{if(!h){if(e)return d(h=e);if(0==--g)return dg(a,b,c,d)}};for(let d of f)dh(a,d,b,c,i)})},dj=(a,b,c,d)=>{b.isDirectory()&&dk(g.default.resolve(a,b.name),c,d),df(g.default.resolve(a,b.name),c,d)},dk=(a,b,c)=>{let d;try{d=h.default.readdirSync(a,{withFileTypes:!0})}catch(d){if(d?.code==="ENOENT")return;if(d?.code==="ENOTDIR"||d?.code==="ENOTSUP")return df(a,b,c);throw d}for(let e of d)dj(a,e,b,c);return df(a,b,c)},dl=class extends Error{path;code;syscall="chdir";constructor(a,b){super(`${b}: Cannot cd into '${a}'`),this.path=a,this.code=b}get name(){return"CwdError"}},dm=class extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(a,b){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=a,this.path=b}get name(){return"SymlinkError"}},dn=(a,b,c,d,e,f,i)=>{if(0===b.length)return i(null,f);let j=b.shift(),k=bw(g.default.resolve(a+"/"+j));h.default.mkdir(k,c,dp(k,b,c,d,e,f,i))},dp=(a,b,c,d,e,f,g)=>i=>{i?h.default.lstat(a,(j,k)=>{if(j)j.path=j.path&&bw(j.path),g(j);else if(k.isDirectory())dn(a,b,c,d,e,f,g);else if(d)h.default.unlink(a,i=>{if(i)return g(i);h.default.mkdir(a,c,dp(a,b,c,d,e,f,g))});else{if(k.isSymbolicLink())return g(new dm(a,a+"/"+b.join("/")));g(i)}}):(f=f||a,dn(a,b,c,d,e,f,g))},dq=Object.create(null),dr=new Set,ds="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),dt=class{#a=new Map;#b=new Map;#c=new Set;reserve(a,b){let c=new Set((a=ds?["win32 parallelization disabled"]:a.map(a=>b6((0,g.join)((a=>{dr.has(a)?dr.delete(a):dq[a]=a.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"),dr.add(a);let b=dq[a],c=dr.size-1e4;if(c>1e3){for(let a of dr)if(dr.delete(a),delete dq[a],--c<=0)break}return b})(a))))).map(a=>a.split("/").slice(0,-1).reduce((a,b)=>{let c=a.at(-1);return void 0!==c&&(b=(0,g.join)(c,b)),a.push(b||"/"),a},[])).reduce((a,b)=>a.concat(b)));for(let d of(this.#b.set(b,{dirs:c,paths:a}),a)){let a=this.#a.get(d);a?a.push(b):this.#a.set(d,[b])}for(let a of c){let c=this.#a.get(a);if(c){let a=c.at(-1);a instanceof Set?a.add(b):c.push(new Set([b]))}else this.#a.set(a,[new Set([b])])}return this.#e(b)}#d(a){let b=this.#b.get(a);if(!b)throw Error("function does not have any path reservations");return{paths:b.paths.map(a=>this.#a.get(a)),dirs:[...b.dirs].map(a=>this.#a.get(a))}}check(a){let{paths:b,dirs:c}=this.#d(a);return b.every(b=>b&&b[0]===a)&&c.every(b=>b&&b[0]instanceof Set&&b[0].has(a))}#e(a){return!this.#c.has(a)&&!!this.check(a)&&(this.#c.add(a),a(()=>this.#f(a)),!0)}#f(a){if(!this.#c.has(a))return!1;let b=this.#b.get(a);if(!b)throw Error("invalid reservation");let{paths:c,dirs:d}=b,e=new Set;for(let b of c){let c=this.#a.get(b);if(!c||c?.[0]!==a)continue;let d=c[1];if(!d){this.#a.delete(b);continue}if(c.shift(),"function"==typeof d)e.add(d);else for(let a of d)e.add(a)}for(let b of d){let c=this.#a.get(b),d=c?.[0];if(!(!c||!(d instanceof Set)))if(1===d.size&&1===c.length){this.#a.delete(b);continue}else if(1===d.size){c.shift();let a=c[0];"function"==typeof a&&e.add(a)}else d.delete(a)}return this.#c.delete(a),e.forEach(a=>this.#e(a)),!0}},du=Symbol("onEntry"),dv=Symbol("checkFs"),dw=Symbol("checkFs2"),dx=Symbol("isReusable"),dy=Symbol("makeFs"),dz=Symbol("file"),dA=Symbol("directory"),dB=Symbol("link"),dC=Symbol("symlink"),dD=Symbol("hardlink"),dE=Symbol("ensureNoSymlink"),dF=Symbol("unsupported"),dG=Symbol("checkPath"),dH=Symbol("stripAbsolutePath"),dI=Symbol("mkdir"),dJ=Symbol("onError"),dK=Symbol("pending"),dL=Symbol("pend"),dM=Symbol("unpend"),dN=Symbol("ended"),dO=Symbol("maybeClose"),dP=Symbol("skip"),dQ=Symbol("doChown"),dR=Symbol("uid"),dS=Symbol("gid"),dT=Symbol("checkedCwd"),dU="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),dV=(a,b,c)=>void 0!==a&&a===a>>>0?a:void 0!==b&&b===b>>>0?b:c,dW=class extends b5{[dN]=!1;[dT]=!1;[dK]=0;reservations=new dt;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(a={}){if(a.ondone=()=>{this[dN]=!0,this[dO]()},super(a),this.transform=a.transform,this.chmod=!!a.chmod,"number"==typeof a.uid||"number"==typeof a.gid){if("number"!=typeof a.uid||"number"!=typeof a.gid)throw TypeError("cannot set owner without number uid and gid");if(a.preserveOwner)throw TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=a.uid,this.gid=a.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;this.preserveOwner=void 0===a.preserveOwner&&"number"!=typeof a.uid?!!(process.getuid&&0===process.getuid()):!!a.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth="number"==typeof a.maxDepth?a.maxDepth:1024,this.forceChown=!0===a.forceChown,this.win32=!!a.win32||dU,this.newer=!!a.newer,this.keep=!!a.keep,this.noMtime=!!a.noMtime,this.preservePaths=!!a.preservePaths,this.unlink=!!a.unlink,this.cwd=bw(g.default.resolve(a.cwd||process.cwd())),this.strip=Number(a.strip)||0,this.processUmask=this.chmod?"number"==typeof a.processUmask?a.processUmask:process.umask():0,this.umask="number"==typeof a.umask?a.umask:this.processUmask,this.dmode=a.dmode||511&~this.umask,this.fmode=a.fmode||438&~this.umask,this.on("entry",a=>this[du](a))}warn(a,b,c={}){return("TAR_BAD_ARCHIVE"===a||"TAR_ABORT"===a)&&(c.recoverable=!1),super.warn(a,b,c)}[dO](){this[dN]&&0===this[dK]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[dH](a,b){let c=a[b],{type:d}=a;if(!c||this.preservePaths)return!0;let[e,f]=cc(c),h=f.replaceAll(/\\/g,"/").split("/");if(h.includes("..")||dU&&/^[a-z]:\.\.$/i.test(h[0]??"")){if("path"===b||"Link"===d)return this.warn("TAR_ENTRY_ERROR",`${b} contains '..'`,{entry:a,[b]:c}),!1;let e=g.default.posix.dirname(a.path),f=g.default.posix.normalize(g.default.posix.join(e,h.join("/")));if(f.startsWith("../")||".."===f)return this.warn("TAR_ENTRY_ERROR",`${b} escapes extraction directory`,{entry:a,[b]:c}),!1}return e&&(a[b]=String(f),this.warn("TAR_ENTRY_INFO",`stripping ${e} from absolute ${b}`,{entry:a,[b]:c})),!0}[dG](a){let b=bw(a.path),c=b.split("/");if(this.strip){if(c.length<this.strip)return!1;if("Link"===a.type){let b=bw(String(a.linkpath)).split("/");if(!(b.length>=this.strip))return!1;a.linkpath=b.slice(this.strip).join("/")}c.splice(0,this.strip),a.path=c.join("/")}if(isFinite(this.maxDepth)&&c.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:a,path:b,depth:c.length,maxDepth:this.maxDepth}),!1;if(!this[dH](a,"path")||!this[dH](a,"linkpath"))return!1;if(a.absolute=g.default.isAbsolute(a.path)?bw(g.default.resolve(a.path)):bw(g.default.resolve(this.cwd,a.path)),!this.preservePaths&&"string"==typeof a.absolute&&0!==a.absolute.indexOf(this.cwd+"/")&&a.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:a,path:bw(a.path),resolvedPath:a.absolute,cwd:this.cwd}),!1;if(a.absolute===this.cwd&&"Directory"!==a.type&&"GNUDumpDir"!==a.type)return!1;if(this.win32){let{root:b}=g.default.win32.parse(String(a.absolute));a.absolute=b+ch(String(a.absolute).slice(b.length));let{root:c}=g.default.win32.parse(a.path);a.path=c+ch(a.path.slice(c.length))}return!0}[du](a){if(!this[dG](a))return a.resume();switch(m.default.equal(typeof a.absolute,"string"),a.type){case"Directory":case"GNUDumpDir":a.mode&&(a.mode=448|a.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[dv](a);default:return this[dF](a)}}[dJ](a,b){"CwdError"===a.name?this.emit("error",a):(this.warn("TAR_ENTRY_ERROR",a,{entry:b}),this[dM](),b.resume())}[dI](a,b,c){((a,b,c)=>{a=bw(a);let d=b.umask??18,e=448|b.mode,f=(e&d)!=0,i=b.uid,j=b.gid,k="number"==typeof i&&"number"==typeof j&&(i!==b.processUid||j!==b.processGid),l=b.preserve,m=b.unlink,n=bw(b.cwd),p=(b,d)=>{b?c(b):d&&k?di(d,i,j,a=>p(a)):f?h.default.chmod(a,e,c):c()};if(a===n){var q;return q=a,h.default.stat(q,(a,b)=>{(a||!b.isDirectory())&&(a=new dl(q,a?.code||"ENOTDIR")),p(a)})}if(l)return o.default.mkdir(a,{mode:e,recursive:!0}).then(a=>p(null,a??void 0),p);let r=bw(g.default.relative(n,a)).split("/");dn(n,r,e,m,n,void 0,p)})(bw(a),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:b},c)}[dQ](a){return this.forceChown||this.preserveOwner&&("number"==typeof a.uid&&a.uid!==this.processUid||"number"==typeof a.gid&&a.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[dR](a){return dV(this.uid,a.uid,this.processUid)}[dS](a){return dV(this.gid,a.gid,this.processGid)}[dz](a,b){let c="number"==typeof a.mode?4095&a.mode:this.fmode,d=new aH(String(a.absolute),{flags:de(a.size),mode:c,autoClose:!1});d.on("error",c=>{d.fd&&h.default.close(d.fd,()=>{}),d.write=()=>!0,this[dJ](c,a),b()});let e=1,f=c=>{if(c){d.fd&&h.default.close(d.fd,()=>{}),this[dJ](c,a),b();return}0==--e&&void 0!==d.fd&&h.default.close(d.fd,c=>{c?this[dJ](c,a):this[dM](),b()})};d.on("finish",()=>{let b=String(a.absolute),c=d.fd;if("number"==typeof c&&a.mtime&&!this.noMtime){e++;let d=a.atime||new Date,g=a.mtime;h.default.futimes(c,d,g,a=>a?h.default.utimes(b,d,g,b=>f(b&&a)):f())}if("number"==typeof c&&this[dQ](a)){e++;let d=this[dR](a),g=this[dS](a);"number"==typeof d&&"number"==typeof g&&h.default.fchown(c,d,g,a=>a?h.default.chown(b,d,g,b=>f(b&&a)):f())}f()});let g=this.transform&&this.transform(a)||a;g!==a&&(g.on("error",c=>{this[dJ](c,a),b()}),a.pipe(g)),g.pipe(d)}[dA](a,b){let c="number"==typeof a.mode?4095&a.mode:this.dmode;this[dI](String(a.absolute),c,c=>{if(c){this[dJ](c,a),b();return}let d=1,e=()=>{0==--d&&(b(),this[dM](),a.resume())};a.mtime&&!this.noMtime&&(d++,h.default.utimes(String(a.absolute),a.atime||new Date,a.mtime,e)),this[dQ](a)&&(d++,h.default.chown(String(a.absolute),Number(this[dR](a)),Number(this[dS](a)),e)),e()})}[dF](a){a.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${a.type}`,{entry:a}),a.resume()}[dC](a,b){let c=bw(g.default.relative(this.cwd,g.default.resolve(g.default.dirname(String(a.absolute)),String(a.linkpath)))).split("/");this[dE](a,this.cwd,c,()=>this[dB](a,String(a.linkpath),"symlink",b),c=>{this[dJ](c,a),b()})}[dD](a,b){let c=bw(g.default.resolve(this.cwd,String(a.linkpath))),d=bw(String(a.linkpath)).split("/");this[dE](a,this.cwd,d,()=>this[dB](a,c,"link",b),c=>{this[dJ](c,a),b()})}[dE](a,b,c,d,e){let f=c.shift();if(this.preservePaths||void 0===f)return d();let i=g.default.resolve(b,f);h.default.lstat(i,(b,f)=>b?d():f?.isSymbolicLink()?e(new dm(i,g.default.resolve(i,c.join("/")))):void this[dE](a,i,c,d,e))}[dL](){this[dK]++}[dM](){this[dK]--,this[dO]()}[dP](a){this[dM](),a.resume()}[dx](a,b){return"File"===a.type&&!this.unlink&&b.isFile()&&b.nlink<=1&&!dU}[dv](a){this[dL]();let b=[a.path];a.linkpath&&b.push(a.linkpath),this.reservations.reserve(b,b=>this[dw](a,b))}[dw](a,b){let c=a=>{b(a)},d=()=>{this[dI](this.cwd,this.dmode,b=>{if(b){this[dJ](b,a),c();return}this[dT]=!0,e()})},e=()=>{if(a.absolute!==this.cwd){let b=bw(g.default.dirname(String(a.absolute)));if(b!==this.cwd)return this[dI](b,this.dmode,b=>{if(b){this[dJ](b,a),c();return}f()})}f()},f=()=>{h.default.lstat(String(a.absolute),(b,d)=>{if(d&&(this.keep||this.newer&&d.mtime>(a.mtime??d.mtime))){this[dP](a),c();return}if(b||this[dx](a,d))return this[dy](null,a,c);if(d.isDirectory()){if("Directory"===a.type){let b=this.chmod&&a.mode&&(4095&d.mode)!==a.mode,e=b=>this[dy](b??null,a,c);return b?h.default.chmod(String(a.absolute),Number(a.mode),e):e()}if(a.absolute!==this.cwd)return h.default.rmdir(String(a.absolute),b=>this[dy](b??null,a,c))}if(a.absolute===this.cwd)return this[dy](null,a,c);((a,b)=>{if(!dU)return h.default.unlink(a,b);let c=a+".DELETE."+(0,n.randomBytes)(16).toString("hex");h.default.rename(a,c,a=>{if(a)return b(a);h.default.unlink(c,b)})})(String(a.absolute),b=>this[dy](b??null,a,c))})};this[dT]?e():d()}[dy](a,b,c){if(a){this[dJ](a,b),c();return}switch(b.type){case"File":case"OldFile":case"ContiguousFile":return this[dz](b,c);case"Link":return this[dD](b,c);case"SymbolicLink":return this[dC](b,c);case"Directory":case"GNUDumpDir":return this[dA](b,c)}}[dB](a,b,c,d){h.default[c](b,String(a.absolute),b=>{b?this[dJ](b,a):(this[dM](),a.resume()),d()})}},dX=a=>{try{return[null,a()]}catch(a){return[a,null]}},dY=class extends dW{sync=!0;[dy](a,b){return super[dy](a,b,()=>{})}[dv](a){if(!this[dT]){let b=this[dI](this.cwd,this.dmode);if(b)return this[dJ](b,a);this[dT]=!0}if(a.absolute!==this.cwd){let b=bw(g.default.dirname(String(a.absolute)));if(b!==this.cwd){let c=this[dI](b,this.dmode);if(c)return this[dJ](c,a)}}let[b,c]=dX(()=>h.default.lstatSync(String(a.absolute)));if(c&&(this.keep||this.newer&&c.mtime>(a.mtime??c.mtime)))return this[dP](a);if(b||this[dx](a,c))return this[dy](null,a);if(c.isDirectory()){if("Directory"===a.type){let[b]=this.chmod&&a.mode&&(4095&c.mode)!==a.mode?dX(()=>{h.default.chmodSync(String(a.absolute),Number(a.mode))}):[];return this[dy](b,a)}let[b]=dX(()=>h.default.rmdirSync(String(a.absolute)));this[dy](b,a)}let[d]=a.absolute===this.cwd?[]:dX(()=>(a=>{if(!dU)return h.default.unlinkSync(a);let b=a+".DELETE."+(0,n.randomBytes)(16).toString("hex");h.default.renameSync(a,b),h.default.unlinkSync(b)})(String(a.absolute)));this[dy](d,a)}[dz](a,b){let c="number"==typeof a.mode?4095&a.mode:this.fmode,d=c=>{let d;try{h.default.closeSync(e)}catch(a){d=a}(c||d)&&this[dJ](c||d,a),b()},e;try{e=h.default.openSync(String(a.absolute),de(a.size),c)}catch(a){return d(a)}let f=this.transform&&this.transform(a)||a;f!==a&&(f.on("error",b=>this[dJ](b,a)),a.pipe(f)),f.on("data",a=>{try{h.default.writeSync(e,a,0,a.length)}catch(a){d(a)}}),f.on("end",()=>{let b=null;if(a.mtime&&!this.noMtime){let c=a.atime||new Date,d=a.mtime;try{h.default.futimesSync(e,c,d)}catch(e){try{h.default.utimesSync(String(a.absolute),c,d)}catch{b=e}}}if(this[dQ](a)){let c=this[dR](a),d=this[dS](a);try{h.default.fchownSync(e,Number(c),Number(d))}catch(e){try{h.default.chownSync(String(a.absolute),Number(c),Number(d))}catch{b=b||e}}}d(b)})}[dA](a,b){let c="number"==typeof a.mode?4095&a.mode:this.dmode,d=this[dI](String(a.absolute),c);if(d){this[dJ](d,a),b();return}if(a.mtime&&!this.noMtime)try{h.default.utimesSync(String(a.absolute),a.atime||new Date,a.mtime)}catch{}if(this[dQ](a))try{h.default.chownSync(String(a.absolute),Number(this[dR](a)),Number(this[dS](a)))}catch{}b(),a.resume()}[dI](a,b){try{return((a,b)=>{a=bw(a);let c=b.umask??18,d=448|b.mode,e=(d&c)!=0,f=b.uid,i=b.gid,j="number"==typeof f&&"number"==typeof i&&(f!==b.processUid||i!==b.processGid),k=b.preserve,l=b.unlink,m=bw(b.cwd),n=b=>{b&&j&&dk(b,f,i),e&&h.default.chmodSync(a,d)};if(a===m)return(a=>{let b=!1,c;try{b=h.default.statSync(a).isDirectory()}catch(a){c=a?.code}finally{if(!b)throw new dl(a,c??"ENOTDIR")}})(m),n();if(k)return n(h.default.mkdirSync(a,{mode:d,recursive:!0})??void 0);let o=bw(g.default.relative(m,a)).split("/"),p;for(let a=o.shift(),b=m;a&&(b+="/"+a);a=o.shift()){b=bw(g.default.resolve(b));try{h.default.mkdirSync(b,d),p=p||b}catch{let a=h.default.lstatSync(b);if(a.isDirectory())continue;if(l){h.default.unlinkSync(b),h.default.mkdirSync(b,d),p=p||b;continue}if(a.isSymbolicLink())return new dm(b,b+"/"+o.join("/"))}}return n(p)})(bw(a),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:b})}catch(a){return a}}[dE](a,b,c,d,e){if(this.preservePaths||0===c.length)return d();let f=b;for(let a of c){f=g.default.resolve(f,a);let[i,j]=dX(()=>h.default.lstatSync(f));if(i)return d();if(j.isSymbolicLink())return e(new dm(f,g.default.resolve(b,c.join("/"))))}d()}[dB](a,b,c,d){let e=`${c}Sync`;try{h.default[e](b,String(a.absolute)),d(),a.resume()}catch(b){return this[dJ](b,a)}}},dZ=aM(a=>{let b=new dY(a),c=a.file,d=h.default.statSync(c);new aG(c,{readSize:a.maxReadSize||0x1000000,size:d.size}).pipe(b)},(a,b)=>{let c=new dW(a),d=a.maxReadSize||0x1000000,e=a.file;return new Promise((a,b)=>{c.on("error",b),c.on("close",a),h.default.stat(e,(a,f)=>{if(a)b(a);else{let a=new aF(e,{readSize:d,size:f.size});a.on("error",b),a.pipe(c)}})})},a=>new dY(a),a=>new dW(a),(a,b)=>{b?.length&&b7(a,b)}),d$=(a,b)=>{b.forEach(b=>{"@"===b.charAt(0)?b8({file:g.default.resolve(a.cwd,b.slice(1)),sync:!0,noResume:!0,onReadEntry:b=>a.add(b)}):a.add(b)}),a.end()},d_=async(a,b)=>{for(let c of b)"@"===c.charAt(0)?await b8({file:g.default.resolve(String(a.cwd),c.slice(1)),noResume:!0,onReadEntry:b=>a.add(b)}):a.add(c);a.end()},d0=aM((a,b)=>{let c=new c2(a),d=!0,e,f;try{var g,i,j,k,l;let m;try{e=h.default.openSync(a.file,"r+")}catch(b){if(b?.code==="ENOENT")e=h.default.openSync(a.file,"w+");else throw b}let n=h.default.fstatSync(e),o=Buffer.alloc(512);a:for(f=0;f<n.size;f+=512){for(let a=0,b=0;a<512;a+=b){if(b=h.default.readSync(e,o,a,o.length-a,f+a),0===f&&31===o[0]&&139===o[1])throw Error("cannot append to compressed archives");if(!b)break a}let b=new bd(o);if(!b.cksumValid)break;let c=512*Math.ceil((b.size||0)/512);if(f+c+512>n.size)break;f+=c,a.mtimeCache&&b.mtime&&a.mtimeCache.set(String(b.path),b.mtime)}d=!1,g=a,i=c,j=f,k=e,l=b,m=new aI(g.file,{fd:k,start:j}),i.pipe(m),d$(i,l)}finally{if(d)try{h.default.closeSync(e)}catch{}}},(a,b)=>{b=Array.from(b);let c=new c1(a);return new Promise((d,e)=>{c.on("error",e);let f="r+",g=(i,j)=>i&&"ENOENT"===i.code&&"r+"===f?(f="w+",h.default.open(a.file,f,g)):i||!j?e(i):void h.default.fstat(j,(f,g)=>{if(f)return h.default.close(j,()=>e(f));((b,c,d)=>{let e=(a,c)=>{a?h.default.close(b,b=>d(a)):d(null,c)},f=0;if(0===c)return e(null,0);let g=0,i=Buffer.alloc(512),j=(d,k)=>{if(d||void 0===k)return e(d);if((g+=k)<512&&k)return h.default.read(b,i,g,i.length-g,f+g,j);if(0===f&&31===i[0]&&139===i[1])return e(Error("cannot append to compressed archives"));if(g<512)return e(null,f);let l=new bd(i);if(!l.cksumValid)return e(null,f);let m=512*Math.ceil((l.size??0)/512);if(f+m+512>c||(f+=m+512)>=c)return e(null,f);a.mtimeCache&&l.mtime&&a.mtimeCache.set(String(l.path),l.mtime),g=0,h.default.read(b,i,0,512,f,j)};h.default.read(b,i,0,512,f,j)})(j,g.size,(f,g)=>{if(f)return e(f);let h=new aH(a.file,{fd:j,start:g});c.pipe(h),h.on("error",e),h.on("close",d),d_(c,b)})});h.default.open(a.file,f,g)})},()=>{throw TypeError("file is required")},()=>{throw TypeError("file is required")},(a,b)=>{if(!a.file)throw TypeError("file is required");if(a.gzip||a.brotli||a.zstd||a.file.endsWith(".br")||a.file.endsWith(".tbr"))throw TypeError("cannot append to compressed archives");if(!b?.length)throw TypeError("no paths specified to add/replace")});aM(d0.syncFile,d0.asyncFile,d0.syncNoFile,d0.asyncNoFile,(a,b=[])=>{d0.validate?.(a,b),d1(a)});var d1=a=>{let b=a.filter;a.mtimeCache||(a.mtimeCache=new Map),a.filter=b?(c,d)=>b(c,d)&&!((a.mtimeCache?.get(c)??d.mtime??0)>(d.mtime??0)):(b,c)=>!((a.mtimeCache?.get(b)??c.mtime??0)>(c.mtime??0))};a.s(["create",0,c5,"extract",0,dZ,"x",0,dZ])},563736,a=>{"use strict";var b=a.i(815429),c=a.i(942372);let d=a=>{let b=a.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,b,c)=>c?c.toUpperCase():b.toLowerCase());return b.charAt(0).toUpperCase()+b.slice(1)};var e=a.i(400413);let f=(a,b)=>{let f=(0,c.forwardRef)(({className:f,...g},h)=>(0,c.createElement)(e.default,{ref:h,iconNode:b,className:((...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim())(`lucide-${d(a).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${a}`,f),...g}));return f.displayName=d(a),f},g=f("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var h=a.i(233405),i=a.i(522734);async function j(a){try{var b,c;let{stdout:d}=await (b=["--version"],c={timeout:3e3},new Promise((d,e)=>{(0,h.execFile)(a,b,c,(a,b)=>{a?e(a):d({stdout:String(b??"")})})}));return d.split("\n")[0]?.replace(/^ripgrep\s+/,"").split(" ")[0]||void 0}catch{return}}async function k(){let a=function(){try{let a=(0,h.execFileSync)("which",["rg"],{encoding:"utf-8",timeout:3e3}),b=a.split(/\r?\n/)[0]?.trim();if(b&&(0,i.existsSync)(b))return b}catch{}return null}();if(a){let b=await j(a);return{installed:!0,path:a,version:b}}return{installed:!1}}async function l(){return{success:!1,error:"ripgrep is a native binary and must be installed via your OS package manager. See the install commands below or open the official site."}}let m=f("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);var n=a.i(814747),o=a.i(319997),p=a.i(902157),q=a.i(912714),r=a.i(750227),s=a.i(743698),t=a.i(188646),u=a.i(744992);async function v(a,b,c,d={}){let e=d.registry??"https://registry.npmmirror.com",f=a.startsWith("@")?a.split("/")[1]:a,g=`${e}/${a}/-/${f}-${b}.tgz`;await (0,q.mkdir)(r.default.dirname(c),{recursive:!0});let h=await (0,q.mkdtemp)(r.default.join(r.default.dirname(c),".tower-ext-")),i=r.default.join(h,"pkg.tgz");try{var j,k,l;await (j=g,k=i,l=d.timeoutMs??6e4,new Promise((a,b)=>{let c=(0,p.createWriteStream)(k),d=!1,e=e=>{d||(d=!0,c.close(),e?b(e):a())},f=0,g=a=>{let b=s.default.get(a,b=>{let d=b.statusCode??0;if(d>=300&&d<400&&b.headers.location){if(++f>5){e(Error(`Too many redirects fetching ${j}`)),b.resume();return}b.resume(),g(new URL(b.headers.location,a).toString());return}if(d<200||d>=300){e(Error(`HTTP ${d} fetching ${j}`)),b.resume();return}(0,t.pipeline)(b,c).then(()=>e()).catch(e)});b.setTimeout(l,()=>{b.destroy(Error(`Timed out after ${l}ms fetching ${j}`))}),b.on("error",e)};g(j)}));let a=r.default.join(h,"extracted");await (0,q.mkdir)(a,{recursive:!0}),await u.x({file:i,cwd:a,strip:1});let b=await (0,q.stat)(a).catch(()=>null);if(!b||!b.isDirectory())throw Error(`Tarball extracted but ${a} is not a directory`);(0,p.existsSync)(c)&&await (0,q.rm)(c,{recursive:!0,force:!0}),await (0,q.rename)(a,c)}finally{await (0,q.rm)(h,{recursive:!0,force:!0}).catch(()=>{})}}let w="0.55.1",x=n.default.join((0,o.getExtensionsDir)(),"monaco"),y=n.default.join(x,"package.json"),z=n.default.join(x,"min","vs","loader.js"),A=[{id:"rg",name:"代码搜索 (ripgrep)",description:"基于 rg 的全文代码搜索",icon:g,sizeMB:5,homepageUrl:"https://github.com/BurntSushi/ripgrep#installation",manualInstall:!0,check:k,install:l},{id:"monaco",name:"代码编辑器 (Monaco)",description:"VS Code 同款 Web 编辑器",icon:m,sizeMB:15,homepageUrl:"https://microsoft.github.io/monaco-editor/",check:async function a(){let a;if(!(0,i.existsSync)(y)||!(0,i.existsSync)(z))return{installed:!1};try{a=JSON.parse((0,i.readFileSync)(y,"utf-8")).version}catch{}return{installed:!0,path:x,version:a}},install:async function a(){try{if(await v("monaco-editor",w,x),!(0,i.existsSync)(z))return{success:!1,error:`Download succeeded but ${z} is missing — the tarball layout may have changed`};return{success:!0,message:`Installed monaco-editor@${w} to ${x}`}}catch(a){return{success:!1,error:a.message}}},uninstall:async function a(){try{return(0,i.existsSync)(x)&&(0,i.rmSync)(x,{recursive:!0,force:!0}),{success:!0,message:"Removed monaco-editor"}}catch(a){return{success:!1,error:a.message}}}}];function B(a){return A.find(b=>b.id===a)??null}async function C(a){let b=B(a);return b?b.check():{installed:!1,error:`unknown extension: ${a}`}}async function D(a){let b=B(a);return b?b.install():{success:!1,error:`unknown extension: ${a}`}}async function E(a){let b=B(a);return b?b.uninstall?b.uninstall():{success:!1,error:`extension ${a} does not support uninstall`}:{success:!1,error:`unknown extension: ${a}`}}async function F(){return Object.fromEntries(await Promise.all(A.map(async a=>[a.id,await a.check()])))}(0,a.i(630048).ensureServerEntryExports)([C,D,E,F]),(0,b.registerServerReference)(C,"4092d11cb94d2db13154b00d1eea1ab3983f617340",null),(0,b.registerServerReference)(D,"4024452111d15a2e855b738d309133da0b0571c2c3",null),(0,b.registerServerReference)(E,"406c9374f814d0ca7f2626ef9e630b8e84e532f88d",null),(0,b.registerServerReference)(F,"006c666e916f59e22a38e9528d116948fdbc8d8ca9",null),a.s(["checkExtension",0,C,"installExtension",0,D,"listAllExtensionStatus",0,F,"uninstallExtension",0,E],563736)}];
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0y.2qv_._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},123811,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReadonlyURLSearchParams",{enumerable:!0,get:function(){return e}});class d extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class e extends URLSearchParams{append(){throw new d}delete(){throw new d}set(){throw new d}sort(){throw new d}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},934670,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"RedirectStatusCode",{enumerable:!0,get:function(){return e}});var d,e=((d={})[d.SeeOther=303]="SeeOther",d[d.TemporaryRedirect=307]="TemporaryRedirect",d[d.PermanentRedirect=308]="PermanentRedirect",d);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},416997,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={REDIRECT_ERROR_CODE:function(){return g},isRedirectError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(934670),g="NEXT_REDIRECT";function h(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let b=a.digest.split(";"),[c,d]=b,e=b.slice(2,-2).join(";"),h=Number(b.at(-2));return c===g&&("replace"===d||"push"===d)&&"string"==typeof e&&!isNaN(h)&&h in f.RedirectStatusCode}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},657327,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={getRedirectError:function(){return i},getRedirectStatusCodeFromError:function(){return n},getRedirectTypeFromError:function(){return m},getURLFromRedirectError:function(){return l},permanentRedirect:function(){return k},redirect:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(934670),g=a.r(416997),h=a.r(120635).actionAsyncStorage;function i(a,b,c=f.RedirectStatusCode.TemporaryRedirect){let d=Object.defineProperty(Error(g.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return d.digest=`${g.REDIRECT_ERROR_CODE};${b};${a};${c};`,d}function j(a,b){throw i(a,b??=h?.getStore()?.isAction?"push":"replace",f.RedirectStatusCode.TemporaryRedirect)}function k(a,b="replace"){throw i(a,b,f.RedirectStatusCode.PermanentRedirect)}function l(a){return(0,g.isRedirectError)(a)?a.digest.split(";").slice(2,-2).join(";"):null}function m(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return a.digest.split(";",2)[1]}function n(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(a.digest.split(";").at(-2))}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},860207,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HTTPAccessErrorStatus:function(){return f},HTTP_ERROR_FALLBACK_ERROR_CODE:function(){return h},getAccessFallbackErrorTypeByStatus:function(){return k},getAccessFallbackHTTPStatus:function(){return j},isHTTPAccessFallbackError:function(){return i}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f={NOT_FOUND:404,FORBIDDEN:403,UNAUTHORIZED:401},g=new Set(Object.values(f)),h="NEXT_HTTP_ERROR_FALLBACK";function i(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let[b,c]=a.digest.split(";");return b===h&&g.has(Number(c))}function j(a){return Number(a.digest.split(";")[1])}function k(a){switch(a){case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not-found";default:return}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},659708,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"notFound",{enumerable:!0,get:function(){return f}});let d=a.r(860207),e=`${d.HTTP_ERROR_FALLBACK_ERROR_CODE};404`;function f(){let a=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E1041",enumerable:!1,configurable:!0});throw a.digest=e,a}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},462553,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"forbidden",{enumerable:!0,get:function(){return d}}),a.r(860207).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},378477,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unauthorized",{enumerable:!0,get:function(){return d}}),a.r(860207).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},894891,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isPostpone",{enumerable:!0,get:function(){return e}});let d=Symbol.for("react.postpone");function e(a){return"object"==typeof a&&null!==a&&a.$$typeof===d}},807003,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isNextRouterError",{enumerable:!0,get:function(){return f}});let d=a.r(860207),e=a.r(416997);function f(a){return(0,e.isRedirectError)(a)||(0,d.isHTTPAccessFallbackError)(a)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},756353,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return function a(b){if((0,g.isNextRouterError)(b)||(0,f.isBailoutToCSRError)(b)||(0,i.isDynamicServerError)(b)||(0,h.isDynamicPostpone)(b)||(0,e.isPostpone)(b)||(0,d.isHangingPromiseRejectionError)(b)||(0,h.isPrerenderInterruptedError)(b))throw b;b instanceof Error&&"cause"in b&&a(b.cause)}}});let d=a.r(54196),e=a.r(894891),f=a.r(375619),g=a.r(807003),h=a.r(856987),i=a.r(174054);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},155152,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return d}});let d=a.r(756353).unstable_rethrow;("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},82806,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return f.ReadonlyURLSearchParams},RedirectType:function(){return m},forbidden:function(){return i.forbidden},notFound:function(){return h.notFound},permanentRedirect:function(){return g.permanentRedirect},redirect:function(){return g.redirect},unauthorized:function(){return j.unauthorized},unstable_isUnrecognizedActionError:function(){return l},unstable_rethrow:function(){return k.unstable_rethrow}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(123811),g=a.r(657327),h=a.r(659708),i=a.r(462553),j=a.r(378477),k=a.r(155152);function l(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}let m={push:"push",replace:"replace"};("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},929493,a=>{"use strict";a.i(82806),a.s([])},492067,a=>{"use strict";a.i(233405);var b=a.i(761469);async function c(c,d){let{TOWER_LABEL_NAME:e}=await a.A(765789),f=await b.db.task.findFirst({where:{projectId:c,labels:{some:{label:{name:e,isBuiltin:!0}}}},select:{id:!0}});if(f)return f.id;let g=await b.db.label.findFirst({where:{name:e,isBuiltin:!0}});return(await b.db.task.create({data:{title:`${d}-Tower`,description:`Project workbench for ${d}`,projectId:c,status:"TODO",priority:"LOW",order:0,...g?{labels:{create:{labelId:g.id}}}:{}},select:{id:!0}})).id}a.i(26683).logger.create("instrumentation"),a.s(["ensureTowerTask",0,c])},110585,a=>{a.v("/_next/static/media/favicon.0y2d6j9cou~8p.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},68611,a=>{"use strict";let b={src:a.i(110585).default,width:48,height:48};a.s(["default",0,b])},234057,a=>{a.v("/_next/static/media/icon1.04ux133882seb.png"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},926452,a=>{"use strict";let b={src:a.i(234057).default,width:96,height:96};a.s(["default",0,b])},737769,a=>{a.v("/_next/static/media/apple-icon.16aocl-s-v2qz.png"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},809361,a=>{"use strict";let b={src:a.i(737769).default,width:180,height:180};a.s(["default",0,b])},582775,a=>{"use strict";var b=a.i(761469);a.i(929493);var c=a.i(82806),d=a.i(492067);async function e({params:a}){let{workspaceId:f,projectId:g}=await a,h=await b.db.project.findUnique({where:{id:g},select:{id:!0,name:!0,workspaceId:!0}});h&&h.workspaceId===f||(0,c.notFound)();let i=await (0,d.ensureTowerTask)(h.id,h.name);(0,c.redirect)(`/workspaces/${f}/tasks/${i}`)}a.s(["default",0,e,"dynamic",0,"force-dynamic","runtime",0,"nodejs"])},48211,a=>{a.n(a.i(582775))},765789,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_constants_ts_0_7xt06._.js"].map(b=>a.l(b))).then(()=>b(103071)))}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0zgzcl5._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[196195,a=>{"use strict";var b=a.i(815429),c=a.i(233405),d=a.i(814747),e=a.i(446786);function f(a){return a.startsWith("~/")||"~"===a?d.default.join(e.default.homedir(),a.slice(1)):a}async function g(a){if(!a?.trim())return null;let b=d.default.resolve(f(a));try{return(0,c.execSync)("git rev-parse --abbrev-ref HEAD",{cwd:b,encoding:"utf-8",timeout:5e3}).trim()}catch{return null}}async function h(a){if(!a?.trim())return[];let b=d.default.resolve(f(a));try{let a,d;return a=new Set((0,c.execSync)("git branch --format='%(refname:short)'",{cwd:b,encoding:"utf-8",timeout:5e3}).trim().split("\n").filter(Boolean).map(a=>a.replace(/'/g,""))),d=(0,c.execSync)("git branch -r --format='%(refname:short)'",{cwd:b,encoding:"utf-8",timeout:5e3}).trim().split("\n").filter(Boolean).map(a=>a.replace(/'/g,"").replace(/^origin\//,"")).filter(b=>"HEAD"!==b&&!a.has(b)),[...a,...d]}catch{return[]}}async function i(a){if(!a?.trim())return;let b=d.default.resolve(f(a));try{(0,c.spawn)("git",["fetch","--prune"],{cwd:b,stdio:"ignore",detached:!0}).unref()}catch{}}(0,a.i(630048).ensureServerEntryExports)([g,h,i]),(0,b.registerServerReference)(g,"40516ec209e18f0ad45d0860cdaa7fcc511267d7e4",null),(0,b.registerServerReference)(h,"405db5429d08e709cce1468828fb12111b473dbf6d",null),(0,b.registerServerReference)(i,"4056d3225705296e07b5b5c449be4c5e431a28b210",null),a.s(["fetchRemoteBranches",0,i,"getCurrentBranch",0,g,"getProjectBranches",0,h])},859071,a=>{"use strict";a.i(666680);var b=a.i(902157),c=a.i(750227);let d=(0,a.i(319997).getStorageDir)();a.s(["ensureAssetsDir",0,function(a){let e=function(a){let b=c.join(d,"assets",a);if(!b.startsWith(d+c.sep))throw Error("Path traversal detected");return b}(a);return b.mkdirSync(e,{recursive:!0}),e}])},97397,a=>a.a(async(b,c)=>{try{var d=a.i(815429),e=a.i(902157),f=a.i(750227),g=a.i(75681),h=a.i(761469),i=a.i(188139),j=a.i(859071),k=a.i(980999),l=a.i(630048),m=b([k]);[k]=m.then?(await m)():m;let t=g.z.object({filename:g.z.string().min(1).max(255),path:g.z.string().min(1),mimeType:g.z.string().max(100).optional(),size:g.z.number().int().nonnegative().optional(),projectId:g.z.string().min(1),description:g.z.string().max(500).optional(),taskId:g.z.string().optional()});async function n(a){let b=t.parse(a);(0,j.ensureAssetsDir)(b.projectId);let c=await h.db.projectAsset.create({data:{...b,taskId:b.taskId??null}});return(0,i.revalidatePath)("/workspaces"),c}async function o(a){let b=await h.db.projectAsset.findUnique({where:{id:a}});b?.path&&await e.promises.unlink(b.path).catch(()=>{}),await h.db.projectAsset.delete({where:{id:a}}),(0,i.revalidatePath)("/workspaces")}async function p(a){return h.db.projectAsset.findMany({where:{projectId:a},orderBy:{createdAt:"desc"},include:{task:{select:{id:!0,title:!0,status:!0,priority:!0,description:!0,createdAt:!0,labels:{include:{label:!0}},executions:{orderBy:{createdAt:"desc"},take:1,select:{summary:!0,status:!0,endedAt:!0}},_count:{select:{assets:!0}}}}}})}async function q(a){return h.db.projectAsset.findMany({where:{taskId:a},orderBy:{createdAt:"desc"}})}async function r(a){return h.db.projectAsset.findUnique({where:{id:a}})}async function s(a){let b=a.get("file"),c=a.get("projectId"),d=a.get("taskId")||void 0;if(!b||!c)throw Error("Missing file or projectId");let g=await (0,k.getConfigValue)("system.maxUploadBytes",0x3200000);if(b.size>g)throw Error(`File too large (max ${Math.round(g/1024/1024)} MB)`);let l=a.get("description")??"";if(!await h.db.project.findUnique({where:{id:c}}))throw Error("Invalid projectId");let m=Buffer.from(await b.arrayBuffer()),o=(0,j.ensureAssetsDir)(c),p=f.basename(b.name);p&&"."!==p&&".."!==p||(p=`upload-${Date.now()}`);let q=f.join(o,p);if(e.existsSync(q)){let a=f.extname(p),b=f.basename(p,a);p=`${b}-${Date.now()}${a}`}let r=f.join(o,p);if(!r.startsWith(o))throw Error("Invalid filename");await e.promises.writeFile(r,m);let s=await n({filename:p,path:r,mimeType:b.type||void 0,size:b.size,projectId:c,description:l||void 0,taskId:d});return(0,i.revalidatePath)("/workspaces"),s}(0,l.ensureServerEntryExports)([n,o,p,q,r,s]),(0,d.registerServerReference)(n,"4050138857092f550488f733103e1cf5b3b0eed832",null),(0,d.registerServerReference)(o,"406648ac35b025c6878aaa66221c8c9406967ff9ab",null),(0,d.registerServerReference)(p,"40da655a507f460b5420a4d16054d6e3e30ef5622f",null),(0,d.registerServerReference)(q,"4092ed1337cd78627067b9031aa4c4a530da8400b0",null),(0,d.registerServerReference)(r,"40877f16978a6049a5eb4dc6e88548bb17f93f6ab4",null),(0,d.registerServerReference)(s,"409b628dae5579615784ebfc980e018c3f37c9a692",null),a.s(["createAsset",0,n,"deleteAsset",0,o,"getAssetById",0,r,"getProjectAssets",0,p,"getTaskAssets",0,q,"uploadAsset",0,s]),c()}catch(a){c(a)}},!1),108633,a=>a.a(async(b,c)=>{try{a.i(244256),a.i(495370);var d=a.i(396904),e=a.i(980999);a.i(101844),a.i(563736),a.i(4634);var f=a.i(97397);a.i(689171),a.i(196195);var g=b([d,e,f]);[d,e,f]=g.then?(await g)():g,a.s([]),c()}catch(a){c(a)}},!1),161224,a=>a.a(async(b,c)=>{try{var d=a.i(108633),e=a.i(244256),f=a.i(495370),g=a.i(396904),h=a.i(980999),i=a.i(101844),j=a.i(563736),k=a.i(4634),l=a.i(97397),m=a.i(689171),n=a.i(196195),o=b([d,g,h,l]);[d,g,h,l]=o.then?(await o)():o,a.s(["004d43d192d0180c224c33eb5b418a5a709da7555a",()=>h.getActualWsPort,"005ed10ac802df7cdc4984ad9801c4d88032c0b5da",()=>h.getAvailableShells,"006c666e916f59e22a38e9528d116948fdbc8d8ca9",()=>j.listAllExtensionStatus,"00810cec11f289da2cf7734596cd82266c09d006f0",()=>h.getAvailableTerminalApps,"008a5d1b68f5e2b0bf09f7e9d8daa215dc16909780",()=>e.getWorkspacesWithProjects,"00d93b1a502c597586a6e0a707f87a0c42b1b7e5b4",()=>h.getPlatformInfo,"00eea69a5b22afcfbe960c70dea538935b2863f795",()=>k.getOnboardingStatus,"4017c6b5b72cb90823fefdbc993d91b78ce9e437fc",()=>e.getProjectByLocalPath,"4024452111d15a2e855b738d309133da0b0571c2c3",()=>j.installExtension,"402d3bd275eb0191875df81cd0a65a84b7f034b329",()=>f.getLabelsForWorkspace,"40317a4f62ec0768b659980df2b8cfe8f0e143d69b",()=>f.createLabel,"403a0027977cd8f70b1151c86b0b5345142f02c6a1",()=>e.deleteProject,"4050138857092f550488f733103e1cf5b3b0eed832",()=>l.createAsset,"40516ec209e18f0ad45d0860cdaa7fcc511267d7e4",()=>n.getCurrentBranch,"4056d3225705296e07b5b5c449be4c5e431a28b210",()=>n.fetchRemoteBranches,"405db5429d08e709cce1468828fb12111b473dbf6d",()=>n.getProjectBranches,"40663ecf3869e276bb6158bbf1032cb631b49f4dfa",()=>f.deleteLabel,"406648ac35b025c6878aaa66221c8c9406967ff9ab",()=>l.deleteAsset,"406c9374f814d0ca7f2626ef9e630b8e84e532f88d",()=>j.uninstallExtension,"406dc3f99498d87626a282586e9bda477cf5391981",()=>h.getConfigValues,"407af6b4a48c3827d2bdfcb795292fc17bed64cccb",()=>e.deleteWorkspace,"40877f16978a6049a5eb4dc6e88548bb17f93f6ab4",()=>l.getAssetById,"4092d11cb94d2db13154b00d1eea1ab3983f617340",()=>j.checkExtension,"4092ed1337cd78627067b9031aa4c4a530da8400b0",()=>l.getTaskAssets,"409b628dae5579615784ebfc980e018c3f37c9a692",()=>l.uploadAsset,"409c78549bf7daacd072fe9dbf13e12889c949c71e",()=>h.resolveGitLocalPath,"409ebfda562b7b663fc21cfa6b4cd03c09ba17a670",()=>e.createWorkspace,"409f5d8b89c2a6ea196db754abe35c584880c3f88a",()=>m.createTask,"40a3a1d767fac8a4ebc7b3842ff740480168ee74a4",()=>m.getTaskOverview,"40a98af4ec30b8ddfad3d718542ac69e9ac0c38679",()=>k.setOnboardingProgress,"40aa636a36ed4e998d2a68397fd2a529466fa54d75",()=>e.getOrCreateTowerTaskId,"40c1f33c1e6008fa3a0b5c45874fef76c22003fc6b",()=>k.dispatchTaskCompletionEvent,"40cdc8bd5dd8fdfeb094aba213eea161387938dcf7",()=>e.createProject,"40ce28df39bdbb649df6405ddfcae36041475b1c01",()=>e.getRecentLocalProjects,"40da655a507f460b5420a4d16054d6e3e30ef5622f",()=>l.getProjectAssets,"40e63f9344db8660ea90111a968ddb6052cb73e763",()=>e.getWorkspaceById,"40f9a77c5fb0a112e2f2e4e9b23ac59900d499aa20",()=>e.getWorkspacesWithRecentTasks,"40fd68ec39f8d8d0a38f616939b2db6d7754e60fa4",()=>i.checkMigrationSafety,"600446c2d324369afae9a761d53fd26a051a8e9a3f",()=>h.getConfigValue,"602166a0d2a6b776ba57c4e0c1d2ee7847cfe4448e",()=>g.globalSearch,"60429a4e9875cb1ba311d3fdd5520ef687af2c6923",()=>e.updateProject,"6061d496c04ac030637906ceff7691ae8c584c45b9",()=>k.completeOnboarding,"606f204ad25cb79bb19f73adf1e96d32c3cbd40ca0",()=>k.setOnboardingExtensions,"60840f265b75830fa1b1af816bc5afafc353df88f7",()=>e.updateWorkspace,"608fddbc25e815219b0fa0216ec84ab23068bd7764",()=>i.analyzeProjectDirectory,"60cfa11975b098830fba787eff048926e66b6c8bac",()=>h.setConfigValue,"60de51970574bd5be99233aa38c312507839dae1f7",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),76052,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_0jzfhds._.js"].map(b=>a.l(b))).then(()=>b(492067)))},98813,a=>{a.v(a=>Promise.resolve().then(()=>a(962620)))},507502,a=>{a.v(a=>Promise.resolve().then(()=>a(845427)))},752453,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__08g-39i._.js"].map(b=>a.l(b))).then(()=>b(897667)))},144264,a=>{a.v(a=>Promise.resolve().then(()=>a(233405)))},662330,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0qy_98o._.js"].map(b=>a.l(b))).then(()=>b(818992)))},323970,a=>{a.v(a=>Promise.resolve().then(()=>a(522734)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__10xwsl4._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[522734,(a,b,c)=>{b.exports=a.x("fs",()=>require("fs"))},233405,(a,b,c)=>{b.exports=a.x("child_process",()=>require("child_process"))},432201,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),this.name="InvariantError"}}},933919,(a,b,c)=>{b.exports=a.x("@prisma/client-9249dd53ac5b6a44",()=>require("@prisma/client-9249dd53ac5b6a44"))},761469,a=>{"use strict";var b=a.i(933919);let c=globalThis.prisma??new b.PrismaClient({log:[]}),d=!1;async function e(){return d||(await c.$connect(),await c.$queryRaw`PRAGMA journal_mode=WAL`,await c.$queryRaw`PRAGMA busy_timeout=5000`,d=!0),c}async function f(){try{await c.$disconnect()}catch{}d=!1,await e()}process.on("SIGTERM",()=>{c.$disconnect().catch(()=>{})}),process.on("SIGINT",()=>{c.$disconnect().catch(()=>{})}),a.s(["db",0,c,"resetDbConnection",0,f])},26683,a=>{"use strict";function b(a,b,c,d){let e=new Date().toISOString(),f=`[${e}] ${a.toUpperCase()} [${b}] ${c}`;return d&&Object.keys(d).length>0?`${f} ${JSON.stringify(d)}`:f}a.s(["logger",0,{create:function(a){return{info(c,d){console.log(b("info",a,c,d))},warn(c,d){console.warn(b("warn",a,c,d))},error(c,d,e){console.error(b("error",a,c,d instanceof Error?{...e,error:d.message,stack:d.stack}:{...e,error:String(d)}))}}},info(a,c){console.log(b("info","app",a,c))},warn(a,c){console.warn(b("warn","app",a,c))},error(a,c,d){console.error(b("error","app",a,c instanceof Error?{...d,error:c.message,stack:c.stack}:{...d,error:String(c)}))}}])},4634,a=>{"use strict";var b=a.i(815429),c=a.i(761469),d=a.i(188139),e=a.i(26683),f=a.i(630048);let g=["onboarding.completed","onboarding.lastStep","onboarding.username"];async function h(){let a=await c.db.systemConfig.findMany({where:{key:{in:[...g]}}}),b={};for(let c of a)try{b[c.key]=JSON.parse(c.value)}catch{b[c.key]=null}let d=!0===b["onboarding.completed"],e=b["onboarding.lastStep"],f=b["onboarding.username"];return{isFirstRun:!d,isCompleted:d,lastStep:"number"==typeof e?e:0,username:"string"==typeof f&&f.length>0?f:null}}async function i(a){await c.db.systemConfig.upsert({where:{key:"onboarding.lastStep"},create:{key:"onboarding.lastStep",value:JSON.stringify(a)},update:{value:JSON.stringify(a)}}),(0,d.revalidatePath)("/","layout")}async function j(a,b=4){if(await c.db.systemConfig.upsert({where:{key:"onboarding.completed"},create:{key:"onboarding.completed",value:"true"},update:{value:"true"}}),await c.db.systemConfig.upsert({where:{key:"onboarding.lastStep"},create:{key:"onboarding.lastStep",value:String(b)},update:{value:String(b)}}),void 0!==a){let b=a.trim().slice(0,64).replace(/[\r\n]/g," ");b.length>0&&await c.db.systemConfig.upsert({where:{key:"onboarding.username"},create:{key:"onboarding.username",value:JSON.stringify(b)},update:{value:JSON.stringify(b)}})}(0,d.revalidatePath)("/","layout")}async function k(a,b){await c.db.systemConfig.upsert({where:{key:"onboarding.extensions.requested"},create:{key:"onboarding.extensions.requested",value:JSON.stringify(a)},update:{value:JSON.stringify(a)}}),await c.db.systemConfig.upsert({where:{key:"onboarding.extensions.completed"},create:{key:"onboarding.extensions.completed",value:JSON.stringify(b)},update:{value:JSON.stringify(b)}}),(0,d.revalidatePath)("/","layout")}async function l(b){try{e.logger.create("task-completion").info("Task completion event dispatched",{taskId:b.taskId,taskTitle:b.taskTitle,status:b.status,executionId:b.executionId});let{broadcastNotification:c}=await a.A(904454);c({...b,type:"completion"})}catch{}}(0,f.ensureServerEntryExports)([h,i,j,k,l]),(0,b.registerServerReference)(h,"00eea69a5b22afcfbe960c70dea538935b2863f795",null),(0,b.registerServerReference)(i,"40a98af4ec30b8ddfad3d718542ac69e9ac0c38679",null),(0,b.registerServerReference)(j,"6061d496c04ac030637906ceff7691ae8c584c45b9",null),(0,b.registerServerReference)(k,"606f204ad25cb79bb19f73adf1e96d32c3cbd40ca0",null),(0,b.registerServerReference)(l,"40c1f33c1e6008fa3a0b5c45874fef76c22003fc6b",null),a.s(["completeOnboarding",0,j,"dispatchTaskCompletionEvent",0,l,"getOnboardingStatus",0,h,"setOnboardingExtensions",0,k,"setOnboardingProgress",0,i])},427699,(a,b,c)=>{b.exports=a.x("events",()=>require("events"))},750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},902157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},660526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},666680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},912714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},687769,(a,b,c)=>{b.exports=a.x("node:events",()=>require("node:events"))},81111,(a,b,c)=>{b.exports=a.x("node:stream",()=>require("node:stream"))},899871,(a,b,c)=>{b.exports=a.x("node:string_decoder",()=>require("node:string_decoder"))},449719,(a,b,c)=>{b.exports=a.x("assert",()=>require("assert"))},500874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},406461,(a,b,c)=>{b.exports=a.x("zlib",()=>require("zlib"))},57328,(a,b,c)=>{b.exports=a.x("node:assert",()=>require("node:assert"))},319997,a=>{"use strict";let b;var c=a.i(750227),d=a.i(660526),e=a.i(902157);function f(){return b||(b=process.env.TOWER_DATA_DIR||(0,c.join)((0,d.homedir)(),".tower"),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0})),b}a.s(["getBackupsDir",0,function(){let a=(0,c.join)(f(),"backups");return(0,e.existsSync)(a)||(0,e.mkdirSync)(a,{recursive:!0}),a},"getExtensionsDir",0,function(){let a=(0,c.join)(f(),"extensions");return(0,e.existsSync)(a)||(0,e.mkdirSync)(a,{recursive:!0}),a},"getStorageDir",0,function(){let a=(0,c.join)(f(),"storage");return(0,e.existsSync)(a)||(0,e.mkdirSync)(a,{recursive:!0}),a},"getTowerDir",0,f])},589578,a=>{a.v({className:"geist_a71539c9-module__T19VSG__className",variable:"geist_a71539c9-module__T19VSG__variable"})},435214,a=>{a.v({className:"geist_mono_8d43a2aa-module__8Li5zG__className",variable:"geist_mono_8d43a2aa-module__8Li5zG__variable"})},655209,a=>{"use strict";a.s(["Tooltip",()=>c,"TooltipContent",()=>d,"TooltipProvider",()=>e,"TooltipTrigger",()=>f]);var b=a.i(797225);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call Tooltip() from the server but Tooltip is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/tooltip.tsx <module evaluation>","Tooltip"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call TooltipContent() from the server but TooltipContent is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/tooltip.tsx <module evaluation>","TooltipContent"),e=(0,b.registerClientReference)(function(){throw Error("Attempted to call TooltipProvider() from the server but TooltipProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/tooltip.tsx <module evaluation>","TooltipProvider"),f=(0,b.registerClientReference)(function(){throw Error("Attempted to call TooltipTrigger() from the server but TooltipTrigger is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/tooltip.tsx <module evaluation>","TooltipTrigger")},480581,a=>{"use strict";a.s(["Tooltip",()=>c,"TooltipContent",()=>d,"TooltipProvider",()=>e,"TooltipTrigger",()=>f]);var b=a.i(797225);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call Tooltip() from the server but Tooltip is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/tooltip.tsx","Tooltip"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call TooltipContent() from the server but TooltipContent is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/tooltip.tsx","TooltipContent"),e=(0,b.registerClientReference)(function(){throw Error("Attempted to call TooltipProvider() from the server but TooltipProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/tooltip.tsx","TooltipProvider"),f=(0,b.registerClientReference)(function(){throw Error("Attempted to call TooltipTrigger() from the server but TooltipTrigger is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/tooltip.tsx","TooltipTrigger")},570588,a=>{"use strict";a.i(655209);var b=a.i(480581);a.n(b)},58951,a=>{"use strict";a.s(["LayoutClient",()=>b]);let b=(0,a.i(797225).registerClientReference)(function(){throw Error("Attempted to call LayoutClient() from the server but LayoutClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/layout/layout-client.tsx <module evaluation>","LayoutClient")},890170,a=>{"use strict";a.s(["LayoutClient",()=>b]);let b=(0,a.i(797225).registerClientReference)(function(){throw Error("Attempted to call LayoutClient() from the server but LayoutClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/layout/layout-client.tsx","LayoutClient")},910515,a=>{"use strict";a.i(58951);var b=a.i(890170);a.n(b)},878776,a=>{"use strict";a.s(["I18nProvider",()=>c,"useI18n",()=>d]);var b=a.i(797225);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call I18nProvider() from the server but I18nProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/lib/i18n.tsx <module evaluation>","I18nProvider"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call useI18n() from the server but useI18n is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/lib/i18n.tsx <module evaluation>","useI18n")},604483,a=>{"use strict";a.s(["I18nProvider",()=>c,"useI18n",()=>d]);var b=a.i(797225);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call I18nProvider() from the server but I18nProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/lib/i18n.tsx","I18nProvider"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call useI18n() from the server but useI18n is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/lib/i18n.tsx","useI18n")},796661,a=>{"use strict";a.i(878776);var b=a.i(604483);a.n(b)},314493,a=>{"use strict";a.s(["ThemeProvider",()=>b]);let b=(0,a.i(797225).registerClientReference)(function(){throw Error("Attempted to call ThemeProvider() from the server but ThemeProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/providers/theme-provider.tsx <module evaluation>","ThemeProvider")},718127,a=>{"use strict";a.s(["ThemeProvider",()=>b]);let b=(0,a.i(797225).registerClientReference)(function(){throw Error("Attempted to call ThemeProvider() from the server but ThemeProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/providers/theme-provider.tsx","ThemeProvider")},538939,a=>{"use strict";a.i(314493);var b=a.i(718127);a.n(b)},336511,a=>{"use strict";a.s(["ExtensionContext",()=>c,"ExtensionProvider",()=>d]);var b=a.i(797225);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call ExtensionContext() from the server but ExtensionContext is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/lib/extensions/context.tsx <module evaluation>","ExtensionContext"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call ExtensionProvider() from the server but ExtensionProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/lib/extensions/context.tsx <module evaluation>","ExtensionProvider")},948109,a=>{"use strict";a.s(["ExtensionContext",()=>c,"ExtensionProvider",()=>d]);var b=a.i(797225);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call ExtensionContext() from the server but ExtensionContext is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/lib/extensions/context.tsx","ExtensionContext"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call ExtensionProvider() from the server but ExtensionProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/lib/extensions/context.tsx","ExtensionProvider")},350569,a=>{"use strict";a.i(336511);var b=a.i(948109);a.n(b)},396988,a=>{"use strict";a.s(["Toaster",()=>b]);let b=(0,a.i(797225).registerClientReference)(function(){throw Error("Attempted to call Toaster() from the server but Toaster is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/sonner.tsx <module evaluation>","Toaster")},324257,a=>{"use strict";a.s(["Toaster",()=>b]);let b=(0,a.i(797225).registerClientReference)(function(){throw Error("Attempted to call Toaster() from the server but Toaster is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/ui/sonner.tsx","Toaster")},767807,a=>{"use strict";a.i(396988);var b=a.i(324257);a.n(b)},827572,a=>{"use strict";var b=a.i(203469),c=a.i(589578);let d={className:c.default.className,style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"}};null!=c.default.variable&&(d.variable=c.default.variable);var e=a.i(435214);let f={className:e.default.className,style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"}};null!=e.default.variable&&(f.variable=e.default.variable);var g=a.i(570588),h=a.i(910515),i=a.i(796661),j=a.i(538939),k=a.i(350569),l=a.i(767807),m=a.i(761469),n=a.i(4634),o=a.i(563736);async function p({children:a}){let[c,e,q]=await Promise.all([m.db.workspace.findMany({orderBy:{updatedAt:"desc"},select:{id:!0,name:!0,description:!0,updatedAt:!0}}),(0,n.getOnboardingStatus)(),(0,o.listAllExtensionStatus)()]);return(0,b.jsxs)("html",{lang:"zh-CN",suppressHydrationWarning:!0,children:[(0,b.jsxs)("head",{children:[(0,b.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),(0,b.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,b.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=JetBrains+Mono:wght@400;500;600&display=swap",rel:"stylesheet"})]}),(0,b.jsx)("body",{className:`${d.variable} ${f.variable} antialiased`,children:(0,b.jsx)(j.ThemeProvider,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:(0,b.jsx)(g.TooltipProvider,{children:(0,b.jsx)(i.I18nProvider,{children:(0,b.jsxs)(k.ExtensionProvider,{initialStatus:q,children:[(0,b.jsx)(h.LayoutClient,{workspaces:c,isFirstRun:e.isFirstRun,username:e.username,children:a}),(0,b.jsx)(l.Toaster,{richColors:!0,position:"top-right"})]})})})})})]})}a.s(["default",0,p,"metadata",0,{title:"AI Task Platform - Tower",description:"AI task orchestration and multi-project management platform"}],827572)},650645,a=>{a.n(a.i(827572))},904454,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__11zjs~k._.js","server/chunks/ssr/src_lib_0sms4xl._.js"].map(b=>a.l(b))).then(()=>b(640545)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__12c826b._.js.map
|
|
@@ -25,6 +25,6 @@ Rules:
|
|
|
25
25
|
- Set shouldCreateNote=true ONLY if there are genuinely reusable insights (architectural decisions, non-obvious pitfalls, useful patterns, important tool discoveries)
|
|
26
26
|
- Trivial sessions (simple formatting, single-line edits, routine commits) should have shouldCreateNote=false
|
|
27
27
|
- insights array can be empty if nothing notable
|
|
28
|
-
- Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},482848,a=>{a.v(a=>Promise.resolve().then(()=>a(874533)))},268548,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_node_util_0xr.y7p._.js"].map(b=>a.l(b))).then(()=>b(812057)))},534777,a=>{a.v(a=>Promise.resolve().then(()=>a(224361)))},889618,a=>{a.v(a=>Promise.resolve().then(()=>a(163812)))},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]
|
|
28
|
+
- Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},482848,a=>{a.v(a=>Promise.resolve().then(()=>a(874533)))},268548,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_node_util_0xr.y7p._.js"].map(b=>a.l(b))).then(()=>b(812057)))},534777,a=>{a.v(a=>Promise.resolve().then(()=>a(224361)))},889618,a=>{a.v(a=>Promise.resolve().then(()=>a(163812)))},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0ti8vng._.js","server/chunks/ssr/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0myippv._.js"].map(b=>a.l(b))).then(()=>b(845454)))}];
|
|
29
29
|
|
|
30
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
30
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__13i_x1.._.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
module.exports=[10390,a=>{"use strict";var b=a.i(421992);a.s(["ChevronRight",()=>b.default])},207339,a=>{"use strict";let b=(0,a.i(711796).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);a.s(["GitCommitHorizontal",0,b],207339)},394869,a=>{"use strict";let b=(0,a.i(711796).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);a.s(["GitCompare",0,b],394869)},945513,(a,b,c)=>{b.exports=a=>{if(!a||"string"!=typeof a||a.match(/^\s+$/))return[];let b=a.split(`
|
|
2
|
+
`);if(0===b.length)return[];let c=[],d=null,e=null,g=0,i=0,j=null,k=a=>{let[b,e]=f(a)??[];d={chunks:[],deletions:0,additions:0,from:b,to:e},c.push(d)},l=()=>{(!d||d.chunks.length)&&k()},m=a=>{if(!e)return;let[b]=e.changes.slice(-1);e.changes.push({type:b.type,[b.type]:!0,ln1:b.ln1,ln2:b.ln2,ln:b.ln,content:a})},n=[[/^diff\s/,k],[/^new file mode (\d+)$/,(a,b)=>{l(),d.new=!0,d.newMode=b[1],d.from="/dev/null"}],[/^deleted file mode (\d+)$/,(a,b)=>{l(),d.deleted=!0,d.oldMode=b[1],d.to="/dev/null"}],[/^old mode (\d+)$/,(a,b)=>{l(),d.oldMode=b[1]}],[/^new mode (\d+)$/,(a,b)=>{l(),d.newMode=b[1]}],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,(a,b)=>{l(),d.index=a.split(" ").slice(1),b[1]&&(d.oldMode=d.newMode=b[1].trim())}],[/^---\s/,a=>{l(),d.from=h(a)}],[/^\+\+\+\s/,a=>{l(),d.to=h(a)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(a,b)=>{d||k(a);let[c,f,h,l]=b.slice(1);g=+c,i=+h,e={content:a,changes:[],oldStart:+c,oldLines:+(f||1),newStart:+h,newLines:+(l||1)},j={oldLines:+(f||1),newLines:+(l||1)},d.chunks.push(e)}],[/^\$/,m]],o=[[/^\$/,m],[/^-/,a=>{e&&(e.changes.push({type:"del",del:!0,ln:g++,content:a}),d.deletions++,j.oldLines--)}],[/^\+/,a=>{e&&(e.changes.push({type:"add",add:!0,ln:i++,content:a}),d.additions++,j.newLines--)}],[/^\s*/,a=>{e?.changes.push({type:"normal",normal:!0,ln1:g++,ln2:i++,content:a}),j.oldLines--,j.newLines--}]],p=a=>{j?(a=>{for(let[b,c]of o){let d=a.match(b);if(d){c(a,d);break}}0===j.oldLines&&0===j.newLines&&(j=null)})(a):(a=>{for(let[b,c]of n){let d=a.match(b);if(d){c(a,d);break}}})(a)};for(let a of b)p(a);return c};let d=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,e=/^(a|b|i|w|c|o|1|2)\//,f=a=>a?.match(d)?.map(a=>a.replace(e,"").replace(/("|')$/,"")),g=/^\\?['"]|\\?['"]$/g,h=a=>{let b=i(a,"-+").trim();return(b=k(b)).replace(g,"").replace(e,"")},i=(a,b)=>{if(a=m(a),!b&&String.prototype.trimLeft)return a.trimLeft();let c=l(b);return a.replace(RegExp(`^${c}+`),"")},j=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,k=a=>{let b=j.exec(a);return b&&(a=a.substring(0,b.index).trim()),a},l=a=>null==a?"\\s":a instanceof RegExp?a.source:`[${m(a).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,m=a=>`${a??""}`},514872,a=>{"use strict";var b=a.i(945513);function c(a){return a.replace(/\r\n/g,"\n")}a.s(["normalizeLF",0,c,"parseUnifiedDiff",0,function(a){return(0,b.default)(c(a))}])}];
|
|
3
|
+
|
|
4
|
+
//# sourceMappingURL=_0-sia69._.js.map
|