tower-studio 0.2.25 → 0.2.26
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.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 +29 -29
- package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
- 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/api/adapters/test/route.js +1 -1
- 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 +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.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js +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 +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 +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/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/session/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +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/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/missions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +57 -57
- package/.next/standalone/.next/server/app/missions/page.js +1 -1
- 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 +29 -29
- package/.next/standalone/.next/server/app/onboarding/page.js +1 -1
- 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/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +29 -29
- package/.next/standalone/.next/server/app/page.js +1 -1
- 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 +47 -47
- package/.next/standalone/.next/server/app/settings/page.js +1 -1
- 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/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +88 -88
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +1 -1
- 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 +82 -82
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +1 -1
- 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 +61 -61
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +1 -1
- 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 +63 -63
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +1 -1
- 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 +29 -29
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +1 -1
- 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 +70 -70
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +1 -1
- 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 +76 -76
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +1 -1
- 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 +47 -47
- package/.next/standalone/.next/server/app/workspaces/page.js +1 -1
- 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 +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08xus7y._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0j-4yc7._.js → [root-of-the-server]__09sw_a5._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_3ce_3._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dy~osn._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l1-djp._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0nggjno._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oe.86i._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q8.khe._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qif839._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qn.178._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0o3iihg._.js → [root-of-the-server]__0r17py1._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__024m_g.._.js → [root-of-the-server]__0rpck4h._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0hc9vir._.js → [root-of-the-server]__0ul.hbv._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0j8xb6s._.js → [root-of-the-server]__0~au8v.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0r9mscb._.js → [root-of-the-server]__11c_is3._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11j15wy._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__12brxjg._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_0bkvm8c._.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/[root-of-the-server]__02-6df-._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__084p3.0._.js → [root-of-the-server]__03_nkjv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03e009u._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__069pl~f._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e_-mj-._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fzkdjl._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0f~m-8x._.js → [root-of-the-server]__0ihwpkg._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pu-v0l._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0um1ugs._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0i7es1w._.js → [root-of-the-server]__0z2guda._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__134_xv.._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ygiyqr._.js → [root-of-the-server]__1359.ry._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13vgkq5._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0r1pb6u._.js → _0-~u69o._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_03osyxp._.js → _0.-seei._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0vx81le._.js → _01~be~r._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0gk20rx._.js → _04~5wua._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0yvg9ie._.js → _059b1iq._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0kynu6x._.js → _07zn10z._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_08z-g~5._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_09i46mk._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0_vjay8._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0d.xo.l._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0eete9d._.js → _0lfhglc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_02acmsq._.js → _0os2jhl._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0rny90z._.js → _0qmgbyt._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0r6gweb._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rt8jf_._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0ecgaqt._.js → _0t3ckzo._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0uuzh5m._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_11cv4uu._.js → _0zlbg~.._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0~aon4t._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/src_075s.rk._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
- 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/middleware-build-manifest.js +3 -3
- 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 +263 -263
- package/.next/standalone/.next/static/chunks/{16ndme6.~2w1x.js → 0-~1tfpfi66tt.js} +2 -2
- package/.next/standalone/.next/static/chunks/0.f~eyd3jo5q9.js +1 -0
- package/.next/standalone/.next/static/chunks/{0nl7~2pju.abl.js → 0.gbujgnms18e.js} +1 -1
- package/.next/standalone/.next/static/chunks/00mhzi2ol~xk-.js +1 -0
- package/.next/standalone/.next/static/chunks/{0mi29_2~1sr...js → 010vqaoulg3ga.js} +1 -1
- package/.next/standalone/.next/static/chunks/{02.0.zsh_o-10.js → 018ze~5gezc3x.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0jmk1_g~_yd7-.js → 05wa29x.o3lj~.js} +1 -1
- package/.next/standalone/.next/static/chunks/06ei~c0zyf703.js +1 -0
- package/.next/standalone/.next/static/chunks/{13upq83z~yuys.js → 0_jfml.3h1pg0.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0iyxegei1fjbp.js → 0a9gl29cb30mk.js} +1 -1
- package/.next/standalone/.next/static/chunks/{131msw-pgcsxt.js → 0acpmdkledyrn.js} +2 -2
- package/.next/standalone/.next/static/chunks/0ar5okzickbt2.js +1 -0
- package/.next/standalone/.next/static/chunks/0d.a7uremospf.js +1 -0
- package/.next/standalone/.next/static/chunks/{0s2umk4hfyhqa.js → 0er4f-pem1v4b.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0yjkfr0qay7z6.js → 0f.bggise4mxx.js} +1 -1
- package/.next/standalone/.next/static/chunks/0fjb3q23ay68k.js +5 -0
- package/.next/standalone/.next/static/chunks/{0ur66aluu.t0b.js → 0fx7van_kt_59.js} +1 -1
- package/.next/standalone/.next/static/chunks/0gr0-sewikazc.js +1 -0
- package/.next/standalone/.next/static/chunks/{0ce8gr~q3rs9k.js → 0jdyczcgqgj0b.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0oopksfzoc0_k.js → 0pc6e~rekt1qc.js} +1 -1
- package/.next/standalone/.next/static/chunks/{157pgx~-2_qo5.js → 0slsrmal~578k.js} +2 -2
- package/.next/standalone/.next/static/chunks/0vhyuvkq8.ebz.js +1 -0
- package/.next/standalone/.next/static/chunks/0w9_.z5nzj0lm.js +1 -0
- package/.next/standalone/.next/static/chunks/0wlv48-ug75b6.js +1 -0
- package/.next/standalone/.next/static/chunks/{141wmbqfx~lo8.js → 13pdj4ms~jds_.js} +2 -2
- package/.next/standalone/package.json +1 -1
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03j20vp._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05se6yk._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06m1r8x._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g788b3._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qdvear._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0umocfj._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wuzc5o._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z-k6vg._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~rm9q.._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__12c9noi._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qkus8m._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0jeo~zr._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_0rr~oe~._.js +0 -3
- package/.next/standalone/.next/static/chunks/00fcxpwt-xz7b.js +0 -1
- package/.next/standalone/.next/static/chunks/05dryiv53wj6h.js +0 -5
- package/.next/standalone/.next/static/chunks/08ln6v6_fd4nf.js +0 -1
- package/.next/standalone/.next/static/chunks/099fxtzvpw3be.js +0 -1
- package/.next/standalone/.next/static/chunks/0izvibcnunqx4.js +0 -1
- package/.next/standalone/.next/static/chunks/0n.isvqurxe72.js +0 -1
- package/.next/standalone/.next/static/chunks/0p5wczoq4gvin.js +0 -1
- package/.next/standalone/.next/static/chunks/0pov66bj_qi58.js +0 -1
- package/.next/standalone/.next/static/chunks/0w7cz_z6p3-p_.js +0 -1
- package/.next/standalone/.next/static/chunks/0wa8r89hd0y0b.js +0 -1
- /package/.next/standalone/.next/static/{biyHBSA-7nbhZk25VrdWY → Wz6kaZQH2Kg2pF2j2ZFbe}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{biyHBSA-7nbhZk25VrdWY → Wz6kaZQH2Kg2pF2j2ZFbe}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{biyHBSA-7nbhZk25VrdWY → Wz6kaZQH2Kg2pF2j2ZFbe}/_ssgManifest.js +0 -0
|
@@ -63,4 +63,4 @@ out vec4 outColor;
|
|
|
63
63
|
|
|
64
64
|
void main() {
|
|
65
65
|
outColor = v_color;
|
|
66
|
-
}`,tu=8*Float32Array.BYTES_PER_ELEMENT,t_=class{constructor(){this.attributes=new Float32Array(160),this.count=0}},tf=0,tg=0,tv=0,tp=0,tm=0,tx=0,tw=0,tC=class extends R{constructor(e,t,i,s){super(),this._terminal=e,this._gl=t,this._dimensions=i,this._themeService=s,this._vertices=new t_,this._verticesCursor=new t_;let r=this._gl;this._program=ee(e7(r,tc,td)),this._register(S(()=>r.deleteProgram(this._program))),this._projectionLocation=ee(r.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=r.createVertexArray(),r.bindVertexArray(this._vertexArrayObject);let n=new Float32Array([0,0,1,0,0,1,1,1]),o=r.createBuffer();this._register(S(()=>r.deleteBuffer(o))),r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,n,r.STATIC_DRAW),r.enableVertexAttribArray(3),r.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let a=new Uint8Array([0,1,2,3]),h=r.createBuffer();this._register(S(()=>r.deleteBuffer(h))),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,h),r.bufferData(r.ELEMENT_ARRAY_BUFFER,a,r.STATIC_DRAW),this._attributesBuffer=ee(r.createBuffer()),this._register(S(()=>r.deleteBuffer(this._attributesBuffer))),r.bindBuffer(r.ARRAY_BUFFER,this._attributesBuffer),r.enableVertexAttribArray(0),r.vertexAttribPointer(0,2,r.FLOAT,!1,tu,0),r.vertexAttribDivisor(0,1),r.enableVertexAttribArray(1),r.vertexAttribPointer(1,2,r.FLOAT,!1,tu,2*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(1,1),r.enableVertexAttribArray(2),r.vertexAttribPointer(2,4,r.FLOAT,!1,tu,4*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(2,1),this._updateCachedColors(s.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,e6),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,i=this._vertices,s=1,r,n,o,a,h,l,c,d,u,_,f;for(r=0;r<t.rows;r++){for(o=-1,a=0,h=0,l=!1,n=0;n<t.cols;n++)c=(r*t.cols+n)*4,d=e.cells[c+1],_=!!(0x4000000&(u=e.cells[c+2])),(d!==a||u!==h&&(l||_))&&((0!==a||l&&0!==h)&&(f=8*s++,this._updateRectangle(i,f,h,a,o,n,r)),o=n,a=d,h=u,l=_);(0!==a||l&&0!==h)&&(f=8*s++,this._updateRectangle(i,f,h,a,o,t.cols,r))}i.count=s}updateCursor(e){let t=this._verticesCursor,i=e.cursor;if(!i||"block"===i.style){t.count=0;return}let s,r=0;("bar"===i.style||"outline"===i.style)&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,"bar"===i.style?i.dpr*i.cursorWidth:i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),("underline"===i.style||"outline"===i.style)&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,(i.y+1)*this._dimensions.device.cell.height-i.dpr,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat)),"outline"===i.style&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat),s=8*r++,this._addRectangleFloat(t.attributes,s,(i.x+i.width)*this._dimensions.device.cell.width-i.dpr,i.y*this._dimensions.device.cell.height,i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=r}_updateRectangle(e,t,i,s,r,n,o){if(0x4000000&i)switch(0x3000000&i){case 0x1000000:case 0x2000000:tf=this._themeService.colors.ansi[255&i].rgba;break;case 0x3000000:tf=(0xffffff&i)<<8;break;default:tf=this._themeService.colors.foreground.rgba}else switch(0x3000000&s){case 0x1000000:case 0x2000000:tf=this._themeService.colors.ansi[255&s].rgba;break;case 0x3000000:tf=(0xffffff&s)<<8;break;default:tf=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=function(e,t){let i=new Float32Array(Math.min(2*e.length,t));for(let t=0;t<e.length;t++)i[t]=e[t];return i}(e.attributes,this._terminal.rows*this._terminal.cols*8)),tg=r*this._dimensions.device.cell.width,tv=o*this._dimensions.device.cell.height,tp=(tf>>24&255)/255,tm=(tf>>16&255)/255,tx=(tf>>8&255)/255,tw=1,this._addRectangle(e.attributes,t,tg,tv,(n-r)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,tp,tm,tx,tw)}_addRectangle(e,t,i,s,r,n,o,a,h,l){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=a,e[t+6]=h,e[t+7]=l}_addRectangleFloat(e,t,i,s,r,n,o){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(255&e.rgba)/255])}},tL=class extends R{constructor(e,t,i,s,r,n,o,a){super(),this._container=t,this._alpha=r,this._coreBrowserService=n,this._optionsService=o,this._themeService=a,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${i}-layer`),this._canvas.style.zIndex=s.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(S(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=ee(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,i){}handleSelectionChanged(e,t,i,s=!1){}_setTransparency(e,t){if(t===this._alpha)return;let i=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=e1(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,i=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,i*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,i,s){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight))}_fillCharTrueColor(e,t,i,s){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=ep,this._clipCell(i,s,t.getWidth()),this._ctx.fillText(t.getChars(),i*this._deviceCellWidth+this._deviceCharLeft,s*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,i){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,i){let s=t?e.options.fontWeightBold:e.options.fontWeight;return`${i?"italic":""} ${s} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},tb=class extends tL{constructor(e,t,i,s,r,n,o){super(i,e,"link",t,!0,r,n,o),this._register(s.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(s.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){var t;if(257===e.fg?this._ctx.fillStyle=this._themeService.colors.background.css:void 0!==e.fg&&((0x3000000&(t=e.fg))==0x1000000||(0x3000000&t)==0x2000000)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},ty="object"==typeof window?window:globalThis,tM=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new eV,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new eV,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let i=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(i,e),this._onDidChangeZoomLevel.fire(i)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let i=this.getWindowId(t);this.mapWindowIdToFullScreen.set(i,e),this._onDidChangeFullscreen.fire(i)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};tM.INSTANCE=new tM,tM.INSTANCE.onDidChangeZoomLevel,tM.INSTANCE.onDidChangeFullscreen;var tS="object"==typeof navigator?navigator.userAgent:"";tS.indexOf("Firefox"),tS.indexOf("AppleWebKit"),tS.indexOf("Chrome")>=0||tS.indexOf("Safari"),tS.indexOf("Electron/"),tS.indexOf("Android");var tA=!1;if("function"==typeof ty.matchMedia){let e=ty.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=ty.matchMedia("(display-mode: fullscreen)");tA=e.matches,tR=e,"string"==typeof tR&&(tR=ty.matchMedia(tR)),tR.addEventListener("change",({matches:e})=>{tA&&t.matches||(tA=e)})}var tR,tT,tk,tE=!1,tB=!1,tP="en",t$=globalThis;"u">typeof t$.vscode&&"u">typeof t$.vscode.process?tk=t$.vscode.process:"u">typeof _.default&&"string"==typeof _.default?.versions?.node&&(tk=_.default);var tD="string"==typeof tk?.versions?.electron&&tk?.type==="renderer";if("object"==typeof tk){tk.platform,tk.platform,"linux"===tk.platform&&tk.env.SNAP&&tk.env.SNAP_REVISION,tk.env.CI||tk.env.BUILD_ARTIFACTSTAGINGDIRECTORY,tP="en";let e=tk.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,tP=t.resolvedLanguage||"en",t.languagePack?.translationsConfigFile}catch{}tE=!0}else"object"!=typeof navigator||tD?console.error("Unable to resolve platform."):((tT=navigator.userAgent).indexOf("Windows"),tT.indexOf("Macintosh"),(tT.indexOf("Macintosh")>=0||tT.indexOf("iPad")>=0||tT.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,tT.indexOf("Linux"),tT?.indexOf("Mobi"),tB=!0,tP=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());var tF=tE;tB&&"function"==typeof t$.importScripts&&t$.origin;var tW,tI=tT,tO=tP;(tY=tW||={}).value=function(){return tO},tY.isDefaultVariant=function(){return 2===tO.length?"en"===tO:tO.length>=3&&"e"===tO[0]&&"n"===tO[1]&&"-"===tO[2]},tY.isDefault=function(){return"en"===tO};var tz="function"==typeof t$.postMessage&&!t$.importScripts,tU=(()=>{if(tz){let e=[];t$.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,s=e.length;i<s;i++){let s=e[i];if(s.id===t.data.vscodeScheduleAsyncWork){e.splice(i,1),s.callback();return}}});let t=0;return i=>{let s=++t;e.push({id:s,callback:i}),t$.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})(),tN=!!(tI&&tI.indexOf("Chrome")>=0);tI&&tI.indexOf("Firefox"),!tN&&tI&&tI.indexOf("Safari"),tI&&tI.indexOf("Edg/"),tI&&tI.indexOf("Android");var tq="object"==typeof navigator?navigator:{};tF||document.queryCommandSupported&&document.queryCommandSupported("copy")||tq&&tq.clipboard&&tq.clipboard.writeText,tF||tq&&tq.clipboard&&tq.clipboard.readText,tF||tA||tq.keyboard,"ontouchstart"in ty||tq.maxTouchPoints,ty.PointerEvent&&("ontouchstart"in ty||navigator.maxTouchPoints);var tG=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},tH=new tG,tj=new tG,tV=new tG;(tX=tZ||={}).toString=function(e){return tH.keyCodeToStr(e)},tX.fromString=function(e){return tH.strToKeyCode(e)},tX.toUserSettingsUS=function(e){return tj.keyCodeToStr(e)},tX.toUserSettingsGeneral=function(e){return tV.keyCodeToStr(e)},tX.fromUserSettings=function(e){return tj.strToKeyCode(e)||tV.strToKeyCode(e)},tX.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return tH.keyCodeToStr(e)};var tY,tX,tZ,tQ,tK=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}});(o=tQ||={}).isCancellationToken=function(e){return e===o.None||e===o.Cancelled||e instanceof tJ||!!e&&"object"==typeof e&&"boolean"==typeof e.isCancellationRequested&&"function"==typeof e.onCancellationRequested},o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:eO.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:tK});var tJ=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?tK:(this._emitter||(this._emitter=new eV),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};Symbol("MicrotaskDelay"),(a=h||={}).settled=async function(e){let t,i=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if("u">typeof t)throw t;return i},a.withAsyncBody=function(e){return new Promise(async(t,i)=>{try{await e(t,i)}catch(e){i(e)}})};var t0=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let i of t)e.emitOne(i)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new eV,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};await eO.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new e(async e=>{for await(let s of t)e.emitOne(i(s))})}map(t){return e.map(this,t)}static filter(t,i){return new e(async e=>{for await(let s of t)i(s)&&e.emitOne(s)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let i of e)t.push(i);return t}toPromise(){return e.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}};t0.EMPTY=t0.fromArray([]);function t5(e,t){return(t<<5)-t+e|0}function t1(e,t){t=t5(149417,t);for(let i=0,s=e.length;i<s;i++)t=t5(e.charCodeAt(i),t);return t}new DataView(new ArrayBuffer(320));var{registerWindow:t2,getWindow:t3,getDocument:t4,getWindows:t8,getWindowsCount:t6,getWindowId:t7,getWindowById:t9,hasWindow:ie,onDidRegisterWindow:it,onWillUnregisterWindow:ii,onDidUnregisterWindow:is}=(t=new Map,i={window:ty,disposables:new A},t.set(ty.vscodeWindowId,i),s=new eV,r=new eV,n=new eV,{onDidRegisterWindow:s.event,onWillUnregisterWindow:n.event,onDidUnregisterWindow:r.event,registerWindow(e){var i,o;if(t.has(e.vscodeWindowId))return R.None;let a=new A,h={window:e,disposables:a.add(new A)};return t.set(e.vscodeWindowId,h),a.add(S(()=>{t.delete(e.vscodeWindowId),r.fire(e)})),a.add((i=e,o=ia.BEFORE_UNLOAD,new ir(i,o,()=>{n.fire(e)},void 0))),s.fire(h),a},getWindows:()=>t.values(),getWindowsCount:()=>t.size,getWindowId:e=>e.vscodeWindowId,hasWindow:e=>t.has(e),getWindowById:function(e,s){return("number"==typeof e?t.get(e):void 0)??(s?i:void 0)},getWindow:e=>e?.ownerDocument?.defaultView?e.ownerDocument.defaultView.window:e?.view?e.view.window:ty,getDocument:e=>t3(e).document}),ir=class{constructor(e,t,i,s){this._node=e,this._type=t,this._handler=i,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}},io=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,i=this.height){return t!==this.width||i!==this.height?new e(t,i):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t||!!e&&!!t&&e.width===t.width&&e.height===t.height}};io.None=new io(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let s=this.mutationObservers.get(e);s||(s=new Map,this.mutationObservers.set(e,s));let r=function e(t,i){switch(typeof t){case"object":var s,r,n,o;return null===t?t5(349,i):Array.isArray(t)?(s=t,r=t5(104579,r=i),s.reduce((t,i)=>e(i,t),r)):(n=t,o=t5(181387,o=i),Object.keys(n).sort().reduce((t,i)=>(t=t1(i,t),e(n[i],t)),o));case"string":return t1(t,i);case"boolean":return t5(t?433:863,i);case"number":return t5(t,i);case"undefined":return t5(937,i);default:return t5(617,i)}}(i,0),n=s.get(r);if(n)n.users+=1;else{let o=new eV,a=new MutationObserver(e=>o.fire(e));a.observe(e,i);let h=n={users:1,observer:a,onDidMutate:o.event};t.add(S(()=>{h.users-=1,0===h.users&&(o.dispose(),a.disconnect(),s?.delete(r),s?.size===0&&this.mutationObservers.delete(e))})),s.set(r,n)}return n.onDidMutate}};var ia={BEFORE_UNLOAD:"beforeunload"},ih=class extends R{constructor(e,t,i,s,r,n,o,a,h){if(super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._optionsService=o,this._themeService=a,this._cursorBlinkStateManager=new T,this._charAtlasDisposable=this._register(new T),this._observerDisposable=this._register(new T),this._model=new tl,this._workCell=new e8,this._workCell2=new e8,this._rectangleRenderer=this._register(new T),this._glyphRenderer=this._register(new T),this._onChangeTextureAtlas=this._register(new eV),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new eV),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new eV),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new eV),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new eV),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._gl=this._canvas.getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:h}),!this._gl)throw Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new ev(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new tb(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions={css:{canvas:es(),cell:es()},device:{canvas:es(),cell:es(),char:{width:0,height:0,left:0,top:0}}},this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(function(e,t,i){return new ir(e,t,i,void 0)}(this._canvas,"webglcontextlost",e=>{console.log("webglcontextlost event received"),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(e)},3e3)})),this._register(function(e,t,i){return new ir(e,t,i,void 0)}(this._canvas,"webglcontextrestored",e=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,e2(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=e4(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=e4(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(S(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),e2(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){for(let e of(this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows),this._renderLayers))e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,i){for(let s of this._renderLayers)s.handleSelectionChanged(this._terminal,e,t,i);this._model.selection.update(this._core,e,t,i),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new tC(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new ta(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=e1(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=M(eO.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),eO.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){for(let e of(this._clearModel(!0),this._renderLayers))e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached)if(!this._core.screenElement?.isConnected||!this._charSizeService.width||!this._charSizeService.height)return;else this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;for(let i of this._renderLayers)i.handleGridChanged(this._terminal,e,t);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new e3(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let i=this._core,s=this._workCell,r,n,o,a,h,l,c=0,d=!0,u,_,f,g,v,p,m,x,w;e=ic(e,i.rows-1,0),t=ic(t,i.rows-1,0);let C=this._coreService.decPrivateModes.cursorStyle??i.options.cursorStyle??"block",L=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,b=L-i.buffer.ydisp,y=Math.min(this._terminal.buffer.active.cursorX,i.cols-1),M=-1,S=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let A=!1;for(n=e;n<=t;n++)for(o=n+i.buffer.ydisp,a=i.buffer.lines.get(o),this._model.lineLengths[n]=0,f=L===o,c=0,h=this._characterJoinerService.getJoinedCharacters(o),x=0;x<i.cols;x++){if(r=this._cellColorResolver.result.bg,a.loadCell(x,s),0===x&&(r=this._cellColorResolver.result.bg),l=!1,d=x>=c,u=x,h.length>0&&x===h[0][0]&&d){_=h.shift();let e=this._model.selection.isCellSelected(this._terminal,_[0],o);for(m=_[0]+1;m<_[1];m++)d&&=e===this._model.selection.isCellSelected(this._terminal,m,o);(d&&=!f||y<_[0]||y>=_[1])?(l=!0,s=new il(s,a.translateToString(!0,_[0],_[1]),_[1]-_[0]),u=_[1]-1):c=_[1]}if(g=s.getChars(),v=s.getCode(),m=(n*i.cols+x)*4,this._cellColorResolver.resolve(s,x,o,this.dimensions.device.cell.width),S&&o===L&&(x===y&&(this._model.cursor={x:y,y:b,width:s.getWidth(),style:this._coreBrowserService.isFocused?C:i.options.cursorInactiveStyle,cursorWidth:i.options.cursorWidth,dpr:this._devicePixelRatio},M=y+s.getWidth()-1),x>=y&&x<=M&&(this._coreBrowserService.isFocused&&"block"===C||!1===this._coreBrowserService.isFocused&&"block"===i.options.cursorInactiveStyle)&&(this._cellColorResolver.result.fg=0x3000000|this._themeService.colors.cursorAccent.rgba>>8&0xffffff,this._cellColorResolver.result.bg=0x3000000|this._themeService.colors.cursor.rgba>>8&0xffffff)),0!==v&&(this._model.lineLengths[n]=x+1),(this._model.cells[m]!==v||this._model.cells[m+1]!==this._cellColorResolver.result.bg||this._model.cells[m+2]!==this._cellColorResolver.result.fg||this._model.cells[m+3]!==this._cellColorResolver.result.ext)&&(A=!0,g.length>1&&(v|=0x80000000),this._model.cells[m]=v,this._model.cells[m+1]=this._cellColorResolver.result.bg,this._model.cells[m+2]=this._cellColorResolver.result.fg,this._model.cells[m+3]=this._cellColorResolver.result.ext,p=s.getWidth(),this._glyphRenderer.value.updateCell(x,n,v,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,g,p,r),l)){for(s=this._workCell,x++;x<=u;x++)w=(n*i.cols+x)*4,this._glyphRenderer.value.updateCell(x,n,0,0,0,0,"",0,0),this._model.cells[w]=0,this._model.cells[w+1]=this._cellColorResolver.result.bg,this._model.cells[w+2]=this._cellColorResolver.result.fg,this._model.cells[w+3]=this._cellColorResolver.result.ext;x--}}A&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=1===this._optionsService.rawOptions.lineHeight?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},il=class extends eB{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function ic(e,t,i=0){return Math.max(Math.min(e,t),i)}var id="di$target",iu="di$dependencies",i_=new Map;function ig(e){if(i_.has(e))return i_.get(e);let t=function(e,i,s){var r,n,o;if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");r=t,n=e,o=s,n[id]===n?n[iu].push({id:r,index:o}):(n[iu]=[{id:r,index:o}],n[id]=n)};return t._id=e,i_.set(e,t),t}ig("BufferService"),ig("CoreMouseService"),ig("CoreService"),ig("CharsetService"),ig("InstantiationService"),ig("LogService");var iv=ig("OptionsService");ig("OscLinkService"),ig("UnicodeService"),ig("DecorationService");var ip={trace:0,debug:1,info:2,warn:3,error:4,off:5},im=class extends R{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=ip[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)"function"==typeof e[t]&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+t,...i)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};im=((e,t,i,s)=>{for(var r,n=s>1?void 0:s?g(t,i):t,o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s?r(t,i,n):r(n))||n);return s&&n&&f(t,i,n),n})([(e,t)=>iv(e,t,0)],im);var ix=class extends R{constructor(e){if(D&&16>function(){if(!D)return 0;let e=E.match(/Version\/(\d+)/);return null===e||e.length<2?0:parseInt(e[1])}()&&!document.createElement("canvas").getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error("Webgl2 is only supported on Safari 16 and above");super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new eV),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new eV),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new eV),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new eV),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element)return void this._register(t.onWillOpen(()=>this.activate(e)));this._terminal=e;let i=t.coreService,s=t.optionsService,r=t._renderService,n=t._characterJoinerService,o=t._charSizeService,a=t._coreBrowserService,h=t._decorationService,l=t._logService,c=t._themeService;this._renderer=this._register(new ih(e,n,o,a,i,h,s,c,this._preserveDrawingBuffer)),this._register(eO.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(eO.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(eO.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(eO.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),r.setRenderer(this._renderer),this._register(S(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},iw=e.i(821957),iC=e.i(533499),iL=e.i(683777);e.s(["TaskTerminal",0,function({taskId:e,worktreePath:t,onSessionEnd:i,useCanvasRenderer:s=!1}){let{t:r}=(0,iC.useI18n)(),{resolvedTheme:n}=(0,iw.useTheme)(),o=(0,c.useRef)(null),a=(0,c.useRef)(null),h=(0,c.useRef)(null),_=(0,c.useRef)(null),f=(0,c.useRef)(i);f.current=i;let[g,v]=(0,c.useState)("connecting"),[p,m]=(0,c.useState)(!1);if((0,c.useEffect)(()=>{if(!t||!o.current)return;let i="light"!==n,r=new d.Terminal({fontFamily:"Menlo, Monaco, 'Courier New', monospace",fontSize:13,scrollback:2e3,cursorBlink:!0,allowTransparency:!1,rescaleOverlappingGlyphs:!0,theme:i?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}}),l=new u.FitAddon;r.loadAddon(l),r.open(o.current);let c=o.current.querySelector(".xterm-helper-textarea");c&&(c.style.opacity="0");let g=null;if(!s)try{(g=new ix).onContextLoss(()=>{g?.dispose(),g=null}),r.loadAddon(g)}catch{}l.fit(),r.focus();let p=null,x=null,w=!1,C=null,L=!1;return(0,iL.getActualWsPort)().then(t=>{w||function t(i){if(w||L)return;v("connecting");let s=new WebSocket(`ws://localhost:${i}/terminal?taskId=${encodeURIComponent(e)}`);p=s,s.addEventListener("open",()=>{s.send(JSON.stringify({type:"resize",cols:r.cols,rows:r.rows})),r.focus(),v("connected"),m(!0),setTimeout(()=>m(!1),2e3)}),s.addEventListener("message",e=>{let t=e.data;"string"==typeof t?r.write(t):t instanceof Blob?t.text().then(e=>r.write(e)):t instanceof ArrayBuffer&&r.write(new Uint8Array(t))}),x?.dispose(),x=r.onData(e=>{s.readyState===WebSocket.OPEN&&s.send(e)}),s.addEventListener("close",e=>{if(e.code>=4e3){L=!0,v("disconnected"),f.current?.(e.code-4e3);return}v("disconnected"),w||L||(C=setTimeout(()=>t(i),3e3))}),s.addEventListener("error",()=>{}),h.current=s}(t)}),a.current=r,_.current=l,()=>{w=!0,C&&clearTimeout(C),x?.dispose(),g?.dispose(),l.dispose(),r.dispose(),p?.close(),a.current=null,h.current=null,_.current=null}},[e,t]),(0,c.useEffect)(()=>{if(!t||!o.current)return;let e=_.current,i=h.current,s=a.current;e&&s&&requestAnimationFrame(()=>{e.fit(),i?.readyState===WebSocket.OPEN&&i.send(JSON.stringify({type:"resize",cols:s.cols,rows:s.rows}))});let r=null,n=o.current,l=new ResizeObserver(()=>{r&&clearTimeout(r),r=setTimeout(()=>{let e=_.current,t=h.current,i=a.current;e&&i&&(e.fit(),t?.readyState===WebSocket.OPEN&&t.send(JSON.stringify({type:"resize",cols:i.cols,rows:i.rows})))},100)});return l.observe(n),()=>{r&&clearTimeout(r),l.disconnect()}},[e,t]),(0,c.useEffect)(()=>{let e=a.current;if(!e)return;let t="light"!==n;e.options.theme=t?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}},[n]),!t)return(0,l.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center bg-[#fafafa] dark:bg-[#0a0a0a] text-center",children:[(0,l.jsx)("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:r("terminal.noWorktree")}),(0,l.jsx)("p",{className:"text-xs text-neutral-400 dark:text-neutral-600 mt-1",children:r("terminal.noWorktreeDesc")})]});let x=r("connected"===g?"terminal.connected":"connecting"===g?"terminal.connecting":"terminal.disconnected");return(0,l.jsxs)("div",{className:"relative h-full w-full bg-[#fafafa] dark:bg-[#0a0a0a]",children:[(0,l.jsxs)("div",{className:["absolute right-3 top-3 z-10 flex items-center gap-1.5 rounded px-2 py-0.5 text-xs transition-opacity duration-500","connected"===g&&!p?"opacity-0 pointer-events-none":"opacity-100","bg-white/60 dark:bg-black/40 backdrop-blur-sm"].join(" "),title:x,children:[(0,l.jsx)("span",{className:`h-2 w-2 rounded-full ${"connected"===g?"bg-green-500":"connecting"===g?"bg-yellow-500":"bg-red-500"}`}),(0,l.jsx)("span",{className:"text-neutral-600 dark:text-neutral-300",children:x})]}),(0,l.jsx)("div",{ref:o,className:"h-full w-full overflow-hidden"})]})}],85890)},346069,e=>{e.n(e.i(85890))}]);
|
|
66
|
+
}`,tu=8*Float32Array.BYTES_PER_ELEMENT,t_=class{constructor(){this.attributes=new Float32Array(160),this.count=0}},tf=0,tg=0,tv=0,tp=0,tm=0,tx=0,tw=0,tC=class extends R{constructor(e,t,i,s){super(),this._terminal=e,this._gl=t,this._dimensions=i,this._themeService=s,this._vertices=new t_,this._verticesCursor=new t_;let r=this._gl;this._program=ee(e7(r,tc,td)),this._register(S(()=>r.deleteProgram(this._program))),this._projectionLocation=ee(r.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=r.createVertexArray(),r.bindVertexArray(this._vertexArrayObject);let n=new Float32Array([0,0,1,0,0,1,1,1]),o=r.createBuffer();this._register(S(()=>r.deleteBuffer(o))),r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,n,r.STATIC_DRAW),r.enableVertexAttribArray(3),r.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let a=new Uint8Array([0,1,2,3]),h=r.createBuffer();this._register(S(()=>r.deleteBuffer(h))),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,h),r.bufferData(r.ELEMENT_ARRAY_BUFFER,a,r.STATIC_DRAW),this._attributesBuffer=ee(r.createBuffer()),this._register(S(()=>r.deleteBuffer(this._attributesBuffer))),r.bindBuffer(r.ARRAY_BUFFER,this._attributesBuffer),r.enableVertexAttribArray(0),r.vertexAttribPointer(0,2,r.FLOAT,!1,tu,0),r.vertexAttribDivisor(0,1),r.enableVertexAttribArray(1),r.vertexAttribPointer(1,2,r.FLOAT,!1,tu,2*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(1,1),r.enableVertexAttribArray(2),r.vertexAttribPointer(2,4,r.FLOAT,!1,tu,4*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(2,1),this._updateCachedColors(s.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,e6),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,i=this._vertices,s=1,r,n,o,a,h,l,c,d,u,_,f;for(r=0;r<t.rows;r++){for(o=-1,a=0,h=0,l=!1,n=0;n<t.cols;n++)c=(r*t.cols+n)*4,d=e.cells[c+1],_=!!(0x4000000&(u=e.cells[c+2])),(d!==a||u!==h&&(l||_))&&((0!==a||l&&0!==h)&&(f=8*s++,this._updateRectangle(i,f,h,a,o,n,r)),o=n,a=d,h=u,l=_);(0!==a||l&&0!==h)&&(f=8*s++,this._updateRectangle(i,f,h,a,o,t.cols,r))}i.count=s}updateCursor(e){let t=this._verticesCursor,i=e.cursor;if(!i||"block"===i.style){t.count=0;return}let s,r=0;("bar"===i.style||"outline"===i.style)&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,"bar"===i.style?i.dpr*i.cursorWidth:i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),("underline"===i.style||"outline"===i.style)&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,(i.y+1)*this._dimensions.device.cell.height-i.dpr,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat)),"outline"===i.style&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat),s=8*r++,this._addRectangleFloat(t.attributes,s,(i.x+i.width)*this._dimensions.device.cell.width-i.dpr,i.y*this._dimensions.device.cell.height,i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=r}_updateRectangle(e,t,i,s,r,n,o){if(0x4000000&i)switch(0x3000000&i){case 0x1000000:case 0x2000000:tf=this._themeService.colors.ansi[255&i].rgba;break;case 0x3000000:tf=(0xffffff&i)<<8;break;default:tf=this._themeService.colors.foreground.rgba}else switch(0x3000000&s){case 0x1000000:case 0x2000000:tf=this._themeService.colors.ansi[255&s].rgba;break;case 0x3000000:tf=(0xffffff&s)<<8;break;default:tf=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=function(e,t){let i=new Float32Array(Math.min(2*e.length,t));for(let t=0;t<e.length;t++)i[t]=e[t];return i}(e.attributes,this._terminal.rows*this._terminal.cols*8)),tg=r*this._dimensions.device.cell.width,tv=o*this._dimensions.device.cell.height,tp=(tf>>24&255)/255,tm=(tf>>16&255)/255,tx=(tf>>8&255)/255,tw=1,this._addRectangle(e.attributes,t,tg,tv,(n-r)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,tp,tm,tx,tw)}_addRectangle(e,t,i,s,r,n,o,a,h,l){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=a,e[t+6]=h,e[t+7]=l}_addRectangleFloat(e,t,i,s,r,n,o){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(255&e.rgba)/255])}},tL=class extends R{constructor(e,t,i,s,r,n,o,a){super(),this._container=t,this._alpha=r,this._coreBrowserService=n,this._optionsService=o,this._themeService=a,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${i}-layer`),this._canvas.style.zIndex=s.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(S(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=ee(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,i){}handleSelectionChanged(e,t,i,s=!1){}_setTransparency(e,t){if(t===this._alpha)return;let i=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=e1(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,i=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,i*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,i,s){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight))}_fillCharTrueColor(e,t,i,s){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=ep,this._clipCell(i,s,t.getWidth()),this._ctx.fillText(t.getChars(),i*this._deviceCellWidth+this._deviceCharLeft,s*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,i){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,i){let s=t?e.options.fontWeightBold:e.options.fontWeight;return`${i?"italic":""} ${s} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},tb=class extends tL{constructor(e,t,i,s,r,n,o){super(i,e,"link",t,!0,r,n,o),this._register(s.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(s.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){var t;if(257===e.fg?this._ctx.fillStyle=this._themeService.colors.background.css:void 0!==e.fg&&((0x3000000&(t=e.fg))==0x1000000||(0x3000000&t)==0x2000000)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},ty="object"==typeof window?window:globalThis,tM=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new eV,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new eV,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let i=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(i,e),this._onDidChangeZoomLevel.fire(i)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let i=this.getWindowId(t);this.mapWindowIdToFullScreen.set(i,e),this._onDidChangeFullscreen.fire(i)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};tM.INSTANCE=new tM,tM.INSTANCE.onDidChangeZoomLevel,tM.INSTANCE.onDidChangeFullscreen;var tS="object"==typeof navigator?navigator.userAgent:"";tS.indexOf("Firefox"),tS.indexOf("AppleWebKit"),tS.indexOf("Chrome")>=0||tS.indexOf("Safari"),tS.indexOf("Electron/"),tS.indexOf("Android");var tA=!1;if("function"==typeof ty.matchMedia){let e=ty.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=ty.matchMedia("(display-mode: fullscreen)");tA=e.matches,tR=e,"string"==typeof tR&&(tR=ty.matchMedia(tR)),tR.addEventListener("change",({matches:e})=>{tA&&t.matches||(tA=e)})}var tR,tT,tk,tE=!1,tB=!1,tP="en",t$=globalThis;"u">typeof t$.vscode&&"u">typeof t$.vscode.process?tk=t$.vscode.process:"u">typeof _.default&&"string"==typeof _.default?.versions?.node&&(tk=_.default);var tD="string"==typeof tk?.versions?.electron&&tk?.type==="renderer";if("object"==typeof tk){tk.platform,tk.platform,"linux"===tk.platform&&tk.env.SNAP&&tk.env.SNAP_REVISION,tk.env.CI||tk.env.BUILD_ARTIFACTSTAGINGDIRECTORY,tP="en";let e=tk.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,tP=t.resolvedLanguage||"en",t.languagePack?.translationsConfigFile}catch{}tE=!0}else"object"!=typeof navigator||tD?console.error("Unable to resolve platform."):((tT=navigator.userAgent).indexOf("Windows"),tT.indexOf("Macintosh"),(tT.indexOf("Macintosh")>=0||tT.indexOf("iPad")>=0||tT.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,tT.indexOf("Linux"),tT?.indexOf("Mobi"),tB=!0,tP=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());var tF=tE;tB&&"function"==typeof t$.importScripts&&t$.origin;var tW,tI=tT,tO=tP;(tY=tW||={}).value=function(){return tO},tY.isDefaultVariant=function(){return 2===tO.length?"en"===tO:tO.length>=3&&"e"===tO[0]&&"n"===tO[1]&&"-"===tO[2]},tY.isDefault=function(){return"en"===tO};var tz="function"==typeof t$.postMessage&&!t$.importScripts,tU=(()=>{if(tz){let e=[];t$.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,s=e.length;i<s;i++){let s=e[i];if(s.id===t.data.vscodeScheduleAsyncWork){e.splice(i,1),s.callback();return}}});let t=0;return i=>{let s=++t;e.push({id:s,callback:i}),t$.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})(),tN=!!(tI&&tI.indexOf("Chrome")>=0);tI&&tI.indexOf("Firefox"),!tN&&tI&&tI.indexOf("Safari"),tI&&tI.indexOf("Edg/"),tI&&tI.indexOf("Android");var tq="object"==typeof navigator?navigator:{};tF||document.queryCommandSupported&&document.queryCommandSupported("copy")||tq&&tq.clipboard&&tq.clipboard.writeText,tF||tq&&tq.clipboard&&tq.clipboard.readText,tF||tA||tq.keyboard,"ontouchstart"in ty||tq.maxTouchPoints,ty.PointerEvent&&("ontouchstart"in ty||navigator.maxTouchPoints);var tG=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},tH=new tG,tj=new tG,tV=new tG;(tX=tZ||={}).toString=function(e){return tH.keyCodeToStr(e)},tX.fromString=function(e){return tH.strToKeyCode(e)},tX.toUserSettingsUS=function(e){return tj.keyCodeToStr(e)},tX.toUserSettingsGeneral=function(e){return tV.keyCodeToStr(e)},tX.fromUserSettings=function(e){return tj.strToKeyCode(e)||tV.strToKeyCode(e)},tX.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return tH.keyCodeToStr(e)};var tY,tX,tZ,tQ,tK=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}});(o=tQ||={}).isCancellationToken=function(e){return e===o.None||e===o.Cancelled||e instanceof tJ||!!e&&"object"==typeof e&&"boolean"==typeof e.isCancellationRequested&&"function"==typeof e.onCancellationRequested},o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:eO.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:tK});var tJ=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?tK:(this._emitter||(this._emitter=new eV),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};Symbol("MicrotaskDelay"),(a=h||={}).settled=async function(e){let t,i=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if("u">typeof t)throw t;return i},a.withAsyncBody=function(e){return new Promise(async(t,i)=>{try{await e(t,i)}catch(e){i(e)}})};var t0=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let i of t)e.emitOne(i)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new eV,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};await eO.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new e(async e=>{for await(let s of t)e.emitOne(i(s))})}map(t){return e.map(this,t)}static filter(t,i){return new e(async e=>{for await(let s of t)i(s)&&e.emitOne(s)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let i of e)t.push(i);return t}toPromise(){return e.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}};t0.EMPTY=t0.fromArray([]);function t5(e,t){return(t<<5)-t+e|0}function t1(e,t){t=t5(149417,t);for(let i=0,s=e.length;i<s;i++)t=t5(e.charCodeAt(i),t);return t}new DataView(new ArrayBuffer(320));var{registerWindow:t2,getWindow:t3,getDocument:t4,getWindows:t8,getWindowsCount:t6,getWindowId:t7,getWindowById:t9,hasWindow:ie,onDidRegisterWindow:it,onWillUnregisterWindow:ii,onDidUnregisterWindow:is}=(t=new Map,i={window:ty,disposables:new A},t.set(ty.vscodeWindowId,i),s=new eV,r=new eV,n=new eV,{onDidRegisterWindow:s.event,onWillUnregisterWindow:n.event,onDidUnregisterWindow:r.event,registerWindow(e){var i,o;if(t.has(e.vscodeWindowId))return R.None;let a=new A,h={window:e,disposables:a.add(new A)};return t.set(e.vscodeWindowId,h),a.add(S(()=>{t.delete(e.vscodeWindowId),r.fire(e)})),a.add((i=e,o=ia.BEFORE_UNLOAD,new ir(i,o,()=>{n.fire(e)},void 0))),s.fire(h),a},getWindows:()=>t.values(),getWindowsCount:()=>t.size,getWindowId:e=>e.vscodeWindowId,hasWindow:e=>t.has(e),getWindowById:function(e,s){return("number"==typeof e?t.get(e):void 0)??(s?i:void 0)},getWindow:e=>e?.ownerDocument?.defaultView?e.ownerDocument.defaultView.window:e?.view?e.view.window:ty,getDocument:e=>t3(e).document}),ir=class{constructor(e,t,i,s){this._node=e,this._type=t,this._handler=i,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}},io=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,i=this.height){return t!==this.width||i!==this.height?new e(t,i):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t||!!e&&!!t&&e.width===t.width&&e.height===t.height}};io.None=new io(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let s=this.mutationObservers.get(e);s||(s=new Map,this.mutationObservers.set(e,s));let r=function e(t,i){switch(typeof t){case"object":var s,r,n,o;return null===t?t5(349,i):Array.isArray(t)?(s=t,r=t5(104579,r=i),s.reduce((t,i)=>e(i,t),r)):(n=t,o=t5(181387,o=i),Object.keys(n).sort().reduce((t,i)=>(t=t1(i,t),e(n[i],t)),o));case"string":return t1(t,i);case"boolean":return t5(t?433:863,i);case"number":return t5(t,i);case"undefined":return t5(937,i);default:return t5(617,i)}}(i,0),n=s.get(r);if(n)n.users+=1;else{let o=new eV,a=new MutationObserver(e=>o.fire(e));a.observe(e,i);let h=n={users:1,observer:a,onDidMutate:o.event};t.add(S(()=>{h.users-=1,0===h.users&&(o.dispose(),a.disconnect(),s?.delete(r),s?.size===0&&this.mutationObservers.delete(e))})),s.set(r,n)}return n.onDidMutate}};var ia={BEFORE_UNLOAD:"beforeunload"},ih=class extends R{constructor(e,t,i,s,r,n,o,a,h){if(super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._optionsService=o,this._themeService=a,this._cursorBlinkStateManager=new T,this._charAtlasDisposable=this._register(new T),this._observerDisposable=this._register(new T),this._model=new tl,this._workCell=new e8,this._workCell2=new e8,this._rectangleRenderer=this._register(new T),this._glyphRenderer=this._register(new T),this._onChangeTextureAtlas=this._register(new eV),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new eV),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new eV),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new eV),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new eV),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._gl=this._canvas.getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:h}),!this._gl)throw Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new ev(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new tb(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions={css:{canvas:es(),cell:es()},device:{canvas:es(),cell:es(),char:{width:0,height:0,left:0,top:0}}},this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(function(e,t,i){return new ir(e,t,i,void 0)}(this._canvas,"webglcontextlost",e=>{console.log("webglcontextlost event received"),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(e)},3e3)})),this._register(function(e,t,i){return new ir(e,t,i,void 0)}(this._canvas,"webglcontextrestored",e=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,e2(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=e4(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=e4(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(S(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),e2(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){for(let e of(this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows),this._renderLayers))e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,i){for(let s of this._renderLayers)s.handleSelectionChanged(this._terminal,e,t,i);this._model.selection.update(this._core,e,t,i),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new tC(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new ta(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=e1(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=M(eO.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),eO.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){for(let e of(this._clearModel(!0),this._renderLayers))e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached)if(!this._core.screenElement?.isConnected||!this._charSizeService.width||!this._charSizeService.height)return;else this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;for(let i of this._renderLayers)i.handleGridChanged(this._terminal,e,t);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new e3(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let i=this._core,s=this._workCell,r,n,o,a,h,l,c=0,d=!0,u,_,f,g,v,p,m,x,w;e=ic(e,i.rows-1,0),t=ic(t,i.rows-1,0);let C=this._coreService.decPrivateModes.cursorStyle??i.options.cursorStyle??"block",L=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,b=L-i.buffer.ydisp,y=Math.min(this._terminal.buffer.active.cursorX,i.cols-1),M=-1,S=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let A=!1;for(n=e;n<=t;n++)for(o=n+i.buffer.ydisp,a=i.buffer.lines.get(o),this._model.lineLengths[n]=0,f=L===o,c=0,h=this._characterJoinerService.getJoinedCharacters(o),x=0;x<i.cols;x++){if(r=this._cellColorResolver.result.bg,a.loadCell(x,s),0===x&&(r=this._cellColorResolver.result.bg),l=!1,d=x>=c,u=x,h.length>0&&x===h[0][0]&&d){_=h.shift();let e=this._model.selection.isCellSelected(this._terminal,_[0],o);for(m=_[0]+1;m<_[1];m++)d&&=e===this._model.selection.isCellSelected(this._terminal,m,o);(d&&=!f||y<_[0]||y>=_[1])?(l=!0,s=new il(s,a.translateToString(!0,_[0],_[1]),_[1]-_[0]),u=_[1]-1):c=_[1]}if(g=s.getChars(),v=s.getCode(),m=(n*i.cols+x)*4,this._cellColorResolver.resolve(s,x,o,this.dimensions.device.cell.width),S&&o===L&&(x===y&&(this._model.cursor={x:y,y:b,width:s.getWidth(),style:this._coreBrowserService.isFocused?C:i.options.cursorInactiveStyle,cursorWidth:i.options.cursorWidth,dpr:this._devicePixelRatio},M=y+s.getWidth()-1),x>=y&&x<=M&&(this._coreBrowserService.isFocused&&"block"===C||!1===this._coreBrowserService.isFocused&&"block"===i.options.cursorInactiveStyle)&&(this._cellColorResolver.result.fg=0x3000000|this._themeService.colors.cursorAccent.rgba>>8&0xffffff,this._cellColorResolver.result.bg=0x3000000|this._themeService.colors.cursor.rgba>>8&0xffffff)),0!==v&&(this._model.lineLengths[n]=x+1),(this._model.cells[m]!==v||this._model.cells[m+1]!==this._cellColorResolver.result.bg||this._model.cells[m+2]!==this._cellColorResolver.result.fg||this._model.cells[m+3]!==this._cellColorResolver.result.ext)&&(A=!0,g.length>1&&(v|=0x80000000),this._model.cells[m]=v,this._model.cells[m+1]=this._cellColorResolver.result.bg,this._model.cells[m+2]=this._cellColorResolver.result.fg,this._model.cells[m+3]=this._cellColorResolver.result.ext,p=s.getWidth(),this._glyphRenderer.value.updateCell(x,n,v,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,g,p,r),l)){for(s=this._workCell,x++;x<=u;x++)w=(n*i.cols+x)*4,this._glyphRenderer.value.updateCell(x,n,0,0,0,0,"",0,0),this._model.cells[w]=0,this._model.cells[w+1]=this._cellColorResolver.result.bg,this._model.cells[w+2]=this._cellColorResolver.result.fg,this._model.cells[w+3]=this._cellColorResolver.result.ext;x--}}A&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=1===this._optionsService.rawOptions.lineHeight?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},il=class extends eB{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function ic(e,t,i=0){return Math.max(Math.min(e,t),i)}var id="di$target",iu="di$dependencies",i_=new Map;function ig(e){if(i_.has(e))return i_.get(e);let t=function(e,i,s){var r,n,o;if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");r=t,n=e,o=s,n[id]===n?n[iu].push({id:r,index:o}):(n[iu]=[{id:r,index:o}],n[id]=n)};return t._id=e,i_.set(e,t),t}ig("BufferService"),ig("CoreMouseService"),ig("CoreService"),ig("CharsetService"),ig("InstantiationService"),ig("LogService");var iv=ig("OptionsService");ig("OscLinkService"),ig("UnicodeService"),ig("DecorationService");var ip={trace:0,debug:1,info:2,warn:3,error:4,off:5},im=class extends R{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=ip[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)"function"==typeof e[t]&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+t,...i)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};im=((e,t,i,s)=>{for(var r,n=s>1?void 0:s?g(t,i):t,o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s?r(t,i,n):r(n))||n);return s&&n&&f(t,i,n),n})([(e,t)=>iv(e,t,0)],im);var ix=class extends R{constructor(e){if(D&&16>function(){if(!D)return 0;let e=E.match(/Version\/(\d+)/);return null===e||e.length<2?0:parseInt(e[1])}()&&!document.createElement("canvas").getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error("Webgl2 is only supported on Safari 16 and above");super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new eV),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new eV),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new eV),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new eV),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element)return void this._register(t.onWillOpen(()=>this.activate(e)));this._terminal=e;let i=t.coreService,s=t.optionsService,r=t._renderService,n=t._characterJoinerService,o=t._charSizeService,a=t._coreBrowserService,h=t._decorationService,l=t._logService,c=t._themeService;this._renderer=this._register(new ih(e,n,o,a,i,h,s,c,this._preserveDrawingBuffer)),this._register(eO.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(eO.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(eO.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(eO.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),r.setRenderer(this._renderer),this._register(S(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},iw=e.i(821957),iC=e.i(533499),iL=e.i(807265);e.s(["TaskTerminal",0,function({taskId:e,worktreePath:t,onSessionEnd:i,useCanvasRenderer:s=!1}){let{t:r}=(0,iC.useI18n)(),{resolvedTheme:n}=(0,iw.useTheme)(),o=(0,c.useRef)(null),a=(0,c.useRef)(null),h=(0,c.useRef)(null),_=(0,c.useRef)(null),f=(0,c.useRef)(i);f.current=i;let[g,v]=(0,c.useState)("connecting"),[p,m]=(0,c.useState)(!1);if((0,c.useEffect)(()=>{if(!t||!o.current)return;let i="light"!==n,r=new d.Terminal({fontFamily:"Menlo, Monaco, 'Courier New', monospace",fontSize:13,scrollback:2e3,cursorBlink:!0,allowTransparency:!1,rescaleOverlappingGlyphs:!0,theme:i?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}}),l=new u.FitAddon;r.loadAddon(l),r.open(o.current);let c=o.current.querySelector(".xterm-helper-textarea");c&&(c.style.opacity="0");let g=null;if(!s)try{(g=new ix).onContextLoss(()=>{g?.dispose(),g=null}),r.loadAddon(g)}catch{}l.fit(),r.focus();let p=null,x=null,w=!1,C=null,L=!1;return(0,iL.getActualWsPort)().then(t=>{w||function t(i){if(w||L)return;v("connecting");let s=new WebSocket(`ws://localhost:${i}/terminal?taskId=${encodeURIComponent(e)}`);p=s,s.addEventListener("open",()=>{s.send(JSON.stringify({type:"resize",cols:r.cols,rows:r.rows})),r.focus(),v("connected"),m(!0),setTimeout(()=>m(!1),2e3)}),s.addEventListener("message",e=>{let t=e.data;"string"==typeof t?r.write(t):t instanceof Blob?t.text().then(e=>r.write(e)):t instanceof ArrayBuffer&&r.write(new Uint8Array(t))}),x?.dispose(),x=r.onData(e=>{s.readyState===WebSocket.OPEN&&s.send(e)}),s.addEventListener("close",e=>{if(e.code>=4e3){L=!0,v("disconnected"),f.current?.(e.code-4e3);return}v("disconnected"),w||L||(C=setTimeout(()=>t(i),3e3))}),s.addEventListener("error",()=>{}),h.current=s}(t)}),a.current=r,_.current=l,()=>{w=!0,C&&clearTimeout(C),x?.dispose(),g?.dispose(),l.dispose(),r.dispose(),p?.close(),a.current=null,h.current=null,_.current=null}},[e,t]),(0,c.useEffect)(()=>{if(!t||!o.current)return;let e=_.current,i=h.current,s=a.current;e&&s&&requestAnimationFrame(()=>{e.fit(),i?.readyState===WebSocket.OPEN&&i.send(JSON.stringify({type:"resize",cols:s.cols,rows:s.rows}))});let r=null,n=o.current,l=new ResizeObserver(()=>{r&&clearTimeout(r),r=setTimeout(()=>{let e=_.current,t=h.current,i=a.current;e&&i&&(e.fit(),t?.readyState===WebSocket.OPEN&&t.send(JSON.stringify({type:"resize",cols:i.cols,rows:i.rows})))},100)});return l.observe(n),()=>{r&&clearTimeout(r),l.disconnect()}},[e,t]),(0,c.useEffect)(()=>{let e=a.current;if(!e)return;let t="light"!==n;e.options.theme=t?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}},[n]),!t)return(0,l.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center bg-[#fafafa] dark:bg-[#0a0a0a] text-center",children:[(0,l.jsx)("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:r("terminal.noWorktree")}),(0,l.jsx)("p",{className:"text-xs text-neutral-400 dark:text-neutral-600 mt-1",children:r("terminal.noWorktreeDesc")})]});let x=r("connected"===g?"terminal.connected":"connecting"===g?"terminal.connecting":"terminal.disconnected");return(0,l.jsxs)("div",{className:"relative h-full w-full bg-[#fafafa] dark:bg-[#0a0a0a]",children:[(0,l.jsxs)("div",{className:["absolute right-3 top-3 z-10 flex items-center gap-1.5 rounded px-2 py-0.5 text-xs transition-opacity duration-500","connected"===g&&!p?"opacity-0 pointer-events-none":"opacity-100","bg-white/60 dark:bg-black/40 backdrop-blur-sm"].join(" "),title:x,children:[(0,l.jsx)("span",{className:`h-2 w-2 rounded-full ${"connected"===g?"bg-green-500":"connecting"===g?"bg-yellow-500":"bg-red-500"}`}),(0,l.jsx)("span",{className:"text-neutral-600 dark:text-neutral-300",children:x})]}),(0,l.jsx)("div",{ref:o,className:"h-full w-full overflow-hidden"})]})}],85890)},346069,e=>{e.n(e.i(85890))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487486,e=>{"use strict";var t=e.i(565455),n=e.i(581263),o=e.i(294237),r=e.i(975157);let i=(0,o.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:o="default",render:s,...a}){var l;return l={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,r.cn)(i({variant:o}),e)},a),render:s,state:{slot:"badge",variant:o}},(0,n.useRenderElement)(l.defaultTagName??"div",l,l)}],487486)},490865,e=>{"use strict";var t=e.i(514798);let n=(0,t.createServerReference)("40237e4dbff3868f964dd9913f9a4ca85f84822c10",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,n])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},110204,337822,e=>{"use strict";var t,n=e.i(289721),o=e.i(975157);e.s(["Label",0,function({className:e,...t}){return(0,n.jsx)("label",{"data-slot":"label",className:(0,o.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}],110204),e.s([],707132),e.i(707132);var r=e.i(965652),i=e.i(620163),s=e.i(528796),a=e.i(594640),l=e.i(306296),u=e.i(344478),d=e.i(205995),p=e.i(611008);e.i(708878);var c=e.i(462902);let g=r.createContext(void 0);function f(e){let t=r.useContext(g);if(void 0===t&&!e)throw Error((0,c.default)(47));return t}var v=e.i(585012),m=e.i(370161),S=e.i(596290),h=e.i(161476),b=e.i(903224),R=e.i(774641),E=e.i(586622),x=e.i(771326),C=e.i(87396),O=e.i(693354);let y={...x.popupStoreSelectors,disabled:(0,S.createSelector)(e=>e.disabled),instantType:(0,S.createSelector)(e=>e.instantType),openMethod:(0,S.createSelector)(e=>e.openMethod),openChangeReason:(0,S.createSelector)(e=>e.openChangeReason),modal:(0,S.createSelector)(e=>e.modal),stickIfOpen:(0,S.createSelector)(e=>e.stickIfOpen),titleElementId:(0,S.createSelector)(e=>e.titleElementId),descriptionElementId:(0,S.createSelector)(e=>e.descriptionElementId),openOnHover:(0,S.createSelector)(e=>e.openOnHover),closeDelay:(0,S.createSelector)(e=>e.closeDelay),hasViewport:(0,S.createSelector)(e=>e.hasViewport)};class T extends m.ReactStore{constructor(e){const t={...(0,x.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new h.Timeout,triggerElements:new C.PopupTriggerMap},y)}setOpen=(e,t)=>{let n=t.reason===E.REASONS.triggerHover,o=t.reason===E.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===E.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},s=this.state.floatingRootContext.context.events;s?.emit("openchange",i);let a=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(O.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),v.flushSync(a)):a(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===E.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,b.useRefWithInit)(()=>new T(t)).current,o=e??n;return(0,R.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var I=e.i(67077),P=e.i(894621),k=e.i(892069);function w({props:e}){let{children:t,open:o,defaultOpen:c=!1,onOpenChange:f,onOpenChangeComplete:v,modal:m=!1,handle:S,triggerId:h,defaultTriggerId:b=null}=e,R=T.useStore(S?.store,{modal:m,open:c,openProp:o,activeTriggerId:b,triggerIdProp:h});(0,s.useOnFirstRender)(()=>{void 0===o&&!1===R.state.open&&!0===c&&R.update({open:!0,activeTriggerId:b})}),R.useControlledProp("openProp",o),R.useControlledProp("triggerIdProp",h);let x=R.useState("open"),C=R.useState("positionerElement"),O=R.useState("payload"),y=R.useState("openChangeReason");R.useContextCallback("onOpenChange",f),R.useContextCallback("onOpenChangeComplete",v);let{openMethod:A,triggerProps:M}=(0,k.useOpenInteractionType)(x);(0,P.useImplicitActiveTrigger)(R);let{forceUnmount:F}=(0,P.useOpenStateTransitions)(x,R,()=>{R.update({stickIfOpen:!0,openChangeReason:null})});(0,i.useScrollLock)(x&&!0===m&&y!==E.REASONS.triggerHover&&"touch"!==A,C),r.useEffect(()=>{x||R.context.stickIfOpenTimeout.clear()},[R,x]);let N=r.useCallback(e=>{let t=(0,I.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{R.set("preventUnmountingOnClose",!0)},t},[R]),j=r.useCallback(()=>{R.setOpen(!1,N(E.REASONS.imperativeAction))},[R,N]);r.useImperativeHandle(e.actionsRef,()=>({unmount:F,close:j}),[F,j]);let D=(0,p.useSyncedFloatingRootContext)({popupStore:R,onOpenChange:R.setOpen}),H=(0,a.useDismiss)(D,{outsidePressEvent:{mouse:"trap-focus"===m?"sloppy":"intentional",touch:"sloppy"}}),B=(0,u.useRole)(D),{getReferenceProps:V,getFloatingProps:L,getTriggerProps:U}=(0,l.useInteractions)([H,B]),G=r.useMemo(()=>V(M),[V,M]),K=r.useMemo(()=>U(M),[U,M]),_=r.useMemo(()=>L(),[L]);R.useSyncedValues({modal:m,openMethod:A,activeTriggerProps:G,inactiveTriggerProps:K,popupProps:_,floatingRootContext:D,nested:null!=(0,d.useFloatingParentNodeId)()});let z=r.useMemo(()=>({store:R}),[R]);return(0,n.jsx)(g.Provider,{value:z,children:"function"==typeof t?t({payload:O}):t})}var A=e.i(887642),M=e.i(282109),F=e.i(845756),N=e.i(581263),j=e.i(660272),D=e.i(430557),H=e.i(411657),B=e.i(207516),V=e.i(221732),L=e.i(682354),U=e.i(870541);let G=r.forwardRef(function(e,t){let{render:o,className:i,disabled:s=!1,nativeButton:a=!0,handle:u,payload:d,openOnHover:p=!1,delay:g=300,closeDelay:m=0,id:S,...h}=e,b=f(!0),R=u?.store??b?.store;if(!R)throw Error((0,c.default)(74));let x=(0,B.useBaseUiId)(S),C=R.useState("isTriggerActive",x),y=R.useState("floatingRootContext"),T=R.useState("isOpenedByTrigger",x),k=r.useRef(null),{registerTrigger:w,isMountedByThisTrigger:G}=(0,P.useTriggerDataForwarding)(x,k,R,{payload:d,disabled:s,openOnHover:p,closeDelay:m}),K=R.useState("openChangeReason"),_=R.useState("stickIfOpen"),z=R.useState("openMethod"),W=(0,H.useHoverReferenceInteraction)(y,{enabled:null!=y&&p&&("touch"!==z||K!==E.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,j.safePolygon)(),restMs:g,delay:{close:m},triggerElementRef:k,isActiveTrigger:C}),Y=(0,D.useClick)(y,{enabled:null!=y,stickIfOpen:_}),q=(0,l.useInteractions)([Y]),J=R.useState("triggerProps",G),{getButtonProps:Q,buttonRef:X}=(0,M.useButton)({disabled:s,native:a}),Z=r.useMemo(()=>({open:e=>e&&K===E.REASONS.triggerPress?F.pressableTriggerOpenStateMapping.open(e):F.triggerOpenStateMapping.open(e)}),[K]),$=(0,N.useRenderElement)("button",e,{state:{disabled:s,open:T},ref:[X,t,w,k],props:[q.getReferenceProps(),W,J,{[O.CLICK_TRIGGER_IDENTIFIER]:"",id:x},h,Q],stateAttributesMapping:Z}),ee=r.useRef(null),et=(0,A.useStableCallback)(e=>{v.flushSync(()=>{R.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,U.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,A.useStableCallback)(e=>{let t=R.select("positionerElement");if(t&&(0,U.isOutsideEvent)(e,t))R.context.beforeContentFocusGuardRef.current?.focus();else{v.flushSync(()=>{R.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,U.getTabbableAfterElement)(R.context.triggerFocusTargetRef.current||k.current);for(;null!==n&&(0,L.contains)(t,n);){let e=n;if((n=(0,U.getNextTabbable)(n))===e)break}n?.focus()}});return C?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(V.FocusGuard,{ref:ee,onFocus:et}),(0,n.jsx)(r.Fragment,{children:$},x),(0,n.jsx)(V.FocusGuard,{ref:R.context.triggerFocusTargetRef,onFocus:en})]}):(0,n.jsx)(r.Fragment,{children:$},x)});var K=e.i(888393);let _=r.createContext(void 0),z=r.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=f();return i.useState("mounted")||o?(0,n.jsx)(_.Provider,{value:o,children:(0,n.jsx)(K.FloatingPortal,{ref:t,...r})}):null});var W=e.i(831766),Y=e.i(804849);let q=r.createContext(void 0);function J(){let e=r.useContext(q);if(!e)throw Error((0,c.default)(46));return e}var Q=e.i(887943),X=e.i(72287),Z=e.i(412522),$=e.i(431362),ee=e.i(808754);let et=r.forwardRef(function(e,t){let{render:o,className:i,anchor:s,positionMethod:a="absolute",side:l="bottom",align:u="center",sideOffset:p=0,alignOffset:g=0,collisionBoundary:v="clipping-ancestors",collisionPadding:m=5,arrowPadding:S=5,sticky:h=!1,disableAnchorTracking:b=!1,collisionAvoidance:R=O.POPUP_COLLISION_AVOIDANCE,...x}=e,{store:C}=f(),y=function(){let e=r.useContext(_);if(void 0===e)throw Error((0,c.default)(45));return e}(),T=(0,d.useFloatingNodeId)(),I=C.useState("floatingRootContext"),P=C.useState("mounted"),k=C.useState("open"),w=C.useState("openChangeReason"),A=C.useState("activeTriggerElement"),M=C.useState("modal"),j=C.useState("positionerElement"),D=C.useState("instantType"),H=C.useState("transitionStatus"),B=C.useState("hasViewport"),V=r.useRef(null),L=(0,Z.useAnimationsFinished)(j,!1,!1),U=(0,Q.useAnchorPositioning)({anchor:s,floatingRootContext:I,positionMethod:a,mounted:P,side:l,sideOffset:p,align:u,alignOffset:g,arrowPadding:S,collisionBoundary:v,collisionPadding:m,sticky:h,disableAnchorTracking:b,keepMounted:y,nodeId:T,collisionAvoidance:R,adaptiveOrigin:B?$.adaptiveOrigin:void 0}),G=r.useMemo(()=>{let e={};return k||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...U.positionerStyles,...e}}},[k,P,U.positionerStyles]),K=r.useMemo(()=>({props:G,...U}),[G,U]),z=I.useState("domReferenceElement");(0,Y.useIsoLayoutEffect)(()=>{let e=V.current;if(z&&(V.current=z),e&&z&&z!==e){C.set("instantType",void 0);let e=new AbortController;return L(()=>{C.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[z,L,C]);let J={open:k,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:D},et=r.useCallback(e=>{C.set("positionerElement",e)},[C]),en=(0,N.useRenderElement)("div",e,{state:J,props:[K.props,(0,ee.getDisabledMountTransitionStyles)(H),x],ref:[t,et],stateAttributesMapping:F.popupStateMapping});return(0,n.jsxs)(q.Provider,{value:K,children:[P&&!0===M&&w!==E.REASONS.triggerHover&&(0,n.jsx)(X.InternalBackdrop,{ref:C.context.internalBackdropRef,inert:(0,W.inertValue)(!k),cutout:A}),(0,n.jsx)(d.FloatingNode,{id:T,children:en})]})});var en=e.i(92615),eo=e.i(11931),er=e.i(511980),ei=e.i(809058),es=e.i(504068),ea=e.i(197920),el=e.i(196368);let eu=r.createContext(void 0);function ed(e){let{value:t,children:o}=e;return(0,n.jsx)(eu.Provider,{value:t,children:o})}let ep={...F.popupStateMapping,...ei.transitionStatusMapping},ec=r.forwardRef(function(e,t){let{className:o,render:i,initialFocus:s,finalFocus:a,...l}=e,{store:u}=f(),d=J(),p=null!=(0,el.useToolbarRootContext)(!0),{context:c,hasClosePart:g}=function(){let[e,t]=r.useState(0),n=(0,A.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),v=u.useState("open"),m=u.useState("openMethod"),S=u.useState("instantType"),h=u.useState("transitionStatus"),b=u.useState("popupProps"),R=u.useState("titleElementId"),x=u.useState("descriptionElementId"),C=u.useState("modal"),O=u.useState("mounted"),y=u.useState("openChangeReason"),T=u.useState("activeTriggerElement"),I=u.useState("floatingRootContext");(0,es.useOpenChangeComplete)({open:v,ref:u.context.popupRef,onComplete(){v&&u.context.onOpenChangeComplete?.(!0)}});let P=u.useState("disabled"),k=u.useState("openOnHover"),w=u.useState("closeDelay");(0,er.useHoverFloatingInteraction)(I,{enabled:k&&!P,closeDelay:w});let M=void 0===s?function(e){return"touch"!==e||u.context.popupRef.current}:s,F={open:v,side:d.side,align:d.align,instant:S,transitionStatus:h},j=r.useCallback(e=>{u.set("popupElement",e)},[u]),D=(0,N.useRenderElement)("div",e,{state:F,ref:[t,u.context.popupRef,j],props:[b,{"aria-labelledby":R,"aria-describedby":x,onKeyDown(e){p&&ea.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ee.getDisabledMountTransitionStyles)(h),l],stateAttributesMapping:ep});return(0,n.jsx)(eo.FloatingFocusManager,{context:I,openInteractionType:m,modal:!1!==C&&g,disabled:!O||y===E.REASONS.triggerHover,initialFocus:M,returnFocus:a,restoreFocus:"popup",previousFocusableElement:(0,en.isHTMLElement)(T)?T:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(ed,{value:c,children:D})})}),eg=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),{arrowRef:a,side:l,align:u,arrowUncentered:d,arrowStyles:p}=J();return(0,N.useRenderElement)("div",e,{state:{open:s,side:l,align:u,uncentered:d},ref:[t,a],props:[{style:p,"aria-hidden":!0},r],stateAttributesMapping:F.popupStateMapping})}),ef={...F.popupStateMapping,...ei.transitionStatusMapping},ev=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),a=i.useState("mounted"),l=i.useState("transitionStatus"),u=i.useState("openChangeReason");return(0,N.useRenderElement)("div",e,{state:{open:s,transitionStatus:l},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:u===E.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},r],stateAttributesMapping:ef})}),em=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("titleElementId",s),()=>{i.set("titleElementId",void 0)}),[i,s]),(0,N.useRenderElement)("h2",e,{ref:t,props:[{id:s},r]})}),eS=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",s),()=>{i.set("descriptionElementId",void 0)}),[i,s]),(0,N.useRenderElement)("p",e,{ref:t,props:[{id:s},r]})}),eh=r.forwardRef(function(e,t){let n,{render:o,className:i,disabled:s=!1,nativeButton:a=!0,...l}=e,{buttonRef:u,getButtonProps:d}=(0,M.useButton)({disabled:s,focusableWhenDisabled:!1,native:a}),{store:p}=f();return n=r.useContext(eu),(0,Y.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,N.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){p.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,d]})}),eb=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eR=e.i(203667);let eE={activationDirection:e=>e?{"data-activation-direction":e}:null},ex=r.forwardRef(function(e,t){let{render:n,className:o,children:r,...i}=e,{store:s}=f(),{side:a}=J(),l=s.useState("instantType"),{children:u,state:d}=(0,eR.usePopupViewport)({store:s,side:a,cssVars:eb,children:r}),p={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:l};return(0,N.useRenderElement)("div",e,{state:p,ref:t,props:[i,{children:u}],stateAttributesMapping:eE})});class eC{constructor(){this.store=new T}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,c.default)(80,e));this.store.setOpen(!0,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,eg,"Backdrop",0,ev,"Close",0,eh,"Description",0,eS,"Handle",0,eC,"Popup",0,ec,"Portal",0,z,"Positioner",0,et,"Root",0,function(e){return f(!0)?(0,n.jsx)(w,{props:e}):(0,n.jsx)(d.FloatingTree,{children:(0,n.jsx)(w,{props:e})})},"Title",0,em,"Trigger",0,G,"Viewport",0,ex,"createHandle",0,function(){return new eC}],107641);var eO=e.i(107641),eO=eO;e.s(["Popover",0,function({...e}){return(0,n.jsx)(eO.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...a}){return(0,n.jsx)(eO.Portal,{children:(0,n.jsx)(eO.Positioner,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:(0,n.jsx)(eO.Popup,{"data-slot":"popover-content",className:(0,o.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(eO.Trigger,{"data-slot":"popover-trigger",...e})}],337822)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487486,e=>{"use strict";var t=e.i(565455),n=e.i(581263),o=e.i(294237),r=e.i(975157);let i=(0,o.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:o="default",render:s,...a}){var l;return l={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,r.cn)(i({variant:o}),e)},a),render:s,state:{slot:"badge",variant:o}},(0,n.useRenderElement)(l.defaultTagName??"div",l,l)}],487486)},991764,e=>{"use strict";var t=e.i(514798);let n=(0,t.createServerReference)("4098a2e12f3bf84cda1b91fe6b63e5cd2f57a431c5",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,n])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},110204,337822,e=>{"use strict";var t,n=e.i(289721),o=e.i(975157);e.s(["Label",0,function({className:e,...t}){return(0,n.jsx)("label",{"data-slot":"label",className:(0,o.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}],110204),e.s([],707132),e.i(707132);var r=e.i(965652),i=e.i(620163),s=e.i(528796),a=e.i(594640),l=e.i(306296),u=e.i(344478),d=e.i(205995),p=e.i(611008);e.i(708878);var c=e.i(462902);let g=r.createContext(void 0);function f(e){let t=r.useContext(g);if(void 0===t&&!e)throw Error((0,c.default)(47));return t}var v=e.i(585012),m=e.i(370161),S=e.i(596290),h=e.i(161476),b=e.i(903224),R=e.i(774641),E=e.i(586622),x=e.i(771326),C=e.i(87396),O=e.i(693354);let y={...x.popupStoreSelectors,disabled:(0,S.createSelector)(e=>e.disabled),instantType:(0,S.createSelector)(e=>e.instantType),openMethod:(0,S.createSelector)(e=>e.openMethod),openChangeReason:(0,S.createSelector)(e=>e.openChangeReason),modal:(0,S.createSelector)(e=>e.modal),stickIfOpen:(0,S.createSelector)(e=>e.stickIfOpen),titleElementId:(0,S.createSelector)(e=>e.titleElementId),descriptionElementId:(0,S.createSelector)(e=>e.descriptionElementId),openOnHover:(0,S.createSelector)(e=>e.openOnHover),closeDelay:(0,S.createSelector)(e=>e.closeDelay),hasViewport:(0,S.createSelector)(e=>e.hasViewport)};class T extends m.ReactStore{constructor(e){const t={...(0,x.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new h.Timeout,triggerElements:new C.PopupTriggerMap},y)}setOpen=(e,t)=>{let n=t.reason===E.REASONS.triggerHover,o=t.reason===E.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===E.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},s=this.state.floatingRootContext.context.events;s?.emit("openchange",i);let a=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(O.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),v.flushSync(a)):a(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===E.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,b.useRefWithInit)(()=>new T(t)).current,o=e??n;return(0,R.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var I=e.i(67077),P=e.i(894621),k=e.i(892069);function w({props:e}){let{children:t,open:o,defaultOpen:c=!1,onOpenChange:f,onOpenChangeComplete:v,modal:m=!1,handle:S,triggerId:h,defaultTriggerId:b=null}=e,R=T.useStore(S?.store,{modal:m,open:c,openProp:o,activeTriggerId:b,triggerIdProp:h});(0,s.useOnFirstRender)(()=>{void 0===o&&!1===R.state.open&&!0===c&&R.update({open:!0,activeTriggerId:b})}),R.useControlledProp("openProp",o),R.useControlledProp("triggerIdProp",h);let x=R.useState("open"),C=R.useState("positionerElement"),O=R.useState("payload"),y=R.useState("openChangeReason");R.useContextCallback("onOpenChange",f),R.useContextCallback("onOpenChangeComplete",v);let{openMethod:A,triggerProps:M}=(0,k.useOpenInteractionType)(x);(0,P.useImplicitActiveTrigger)(R);let{forceUnmount:F}=(0,P.useOpenStateTransitions)(x,R,()=>{R.update({stickIfOpen:!0,openChangeReason:null})});(0,i.useScrollLock)(x&&!0===m&&y!==E.REASONS.triggerHover&&"touch"!==A,C),r.useEffect(()=>{x||R.context.stickIfOpenTimeout.clear()},[R,x]);let N=r.useCallback(e=>{let t=(0,I.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{R.set("preventUnmountingOnClose",!0)},t},[R]),j=r.useCallback(()=>{R.setOpen(!1,N(E.REASONS.imperativeAction))},[R,N]);r.useImperativeHandle(e.actionsRef,()=>({unmount:F,close:j}),[F,j]);let D=(0,p.useSyncedFloatingRootContext)({popupStore:R,onOpenChange:R.setOpen}),H=(0,a.useDismiss)(D,{outsidePressEvent:{mouse:"trap-focus"===m?"sloppy":"intentional",touch:"sloppy"}}),B=(0,u.useRole)(D),{getReferenceProps:V,getFloatingProps:L,getTriggerProps:U}=(0,l.useInteractions)([H,B]),G=r.useMemo(()=>V(M),[V,M]),K=r.useMemo(()=>U(M),[U,M]),_=r.useMemo(()=>L(),[L]);R.useSyncedValues({modal:m,openMethod:A,activeTriggerProps:G,inactiveTriggerProps:K,popupProps:_,floatingRootContext:D,nested:null!=(0,d.useFloatingParentNodeId)()});let z=r.useMemo(()=>({store:R}),[R]);return(0,n.jsx)(g.Provider,{value:z,children:"function"==typeof t?t({payload:O}):t})}var A=e.i(887642),M=e.i(282109),F=e.i(845756),N=e.i(581263),j=e.i(660272),D=e.i(430557),H=e.i(411657),B=e.i(207516),V=e.i(221732),L=e.i(682354),U=e.i(870541);let G=r.forwardRef(function(e,t){let{render:o,className:i,disabled:s=!1,nativeButton:a=!0,handle:u,payload:d,openOnHover:p=!1,delay:g=300,closeDelay:m=0,id:S,...h}=e,b=f(!0),R=u?.store??b?.store;if(!R)throw Error((0,c.default)(74));let x=(0,B.useBaseUiId)(S),C=R.useState("isTriggerActive",x),y=R.useState("floatingRootContext"),T=R.useState("isOpenedByTrigger",x),k=r.useRef(null),{registerTrigger:w,isMountedByThisTrigger:G}=(0,P.useTriggerDataForwarding)(x,k,R,{payload:d,disabled:s,openOnHover:p,closeDelay:m}),K=R.useState("openChangeReason"),_=R.useState("stickIfOpen"),z=R.useState("openMethod"),W=(0,H.useHoverReferenceInteraction)(y,{enabled:null!=y&&p&&("touch"!==z||K!==E.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,j.safePolygon)(),restMs:g,delay:{close:m},triggerElementRef:k,isActiveTrigger:C}),Y=(0,D.useClick)(y,{enabled:null!=y,stickIfOpen:_}),q=(0,l.useInteractions)([Y]),J=R.useState("triggerProps",G),{getButtonProps:Q,buttonRef:X}=(0,M.useButton)({disabled:s,native:a}),Z=r.useMemo(()=>({open:e=>e&&K===E.REASONS.triggerPress?F.pressableTriggerOpenStateMapping.open(e):F.triggerOpenStateMapping.open(e)}),[K]),$=(0,N.useRenderElement)("button",e,{state:{disabled:s,open:T},ref:[X,t,w,k],props:[q.getReferenceProps(),W,J,{[O.CLICK_TRIGGER_IDENTIFIER]:"",id:x},h,Q],stateAttributesMapping:Z}),ee=r.useRef(null),et=(0,A.useStableCallback)(e=>{v.flushSync(()=>{R.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,U.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,A.useStableCallback)(e=>{let t=R.select("positionerElement");if(t&&(0,U.isOutsideEvent)(e,t))R.context.beforeContentFocusGuardRef.current?.focus();else{v.flushSync(()=>{R.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,U.getTabbableAfterElement)(R.context.triggerFocusTargetRef.current||k.current);for(;null!==n&&(0,L.contains)(t,n);){let e=n;if((n=(0,U.getNextTabbable)(n))===e)break}n?.focus()}});return C?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(V.FocusGuard,{ref:ee,onFocus:et}),(0,n.jsx)(r.Fragment,{children:$},x),(0,n.jsx)(V.FocusGuard,{ref:R.context.triggerFocusTargetRef,onFocus:en})]}):(0,n.jsx)(r.Fragment,{children:$},x)});var K=e.i(888393);let _=r.createContext(void 0),z=r.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=f();return i.useState("mounted")||o?(0,n.jsx)(_.Provider,{value:o,children:(0,n.jsx)(K.FloatingPortal,{ref:t,...r})}):null});var W=e.i(831766),Y=e.i(804849);let q=r.createContext(void 0);function J(){let e=r.useContext(q);if(!e)throw Error((0,c.default)(46));return e}var Q=e.i(887943),X=e.i(72287),Z=e.i(412522),$=e.i(431362),ee=e.i(808754);let et=r.forwardRef(function(e,t){let{render:o,className:i,anchor:s,positionMethod:a="absolute",side:l="bottom",align:u="center",sideOffset:p=0,alignOffset:g=0,collisionBoundary:v="clipping-ancestors",collisionPadding:m=5,arrowPadding:S=5,sticky:h=!1,disableAnchorTracking:b=!1,collisionAvoidance:R=O.POPUP_COLLISION_AVOIDANCE,...x}=e,{store:C}=f(),y=function(){let e=r.useContext(_);if(void 0===e)throw Error((0,c.default)(45));return e}(),T=(0,d.useFloatingNodeId)(),I=C.useState("floatingRootContext"),P=C.useState("mounted"),k=C.useState("open"),w=C.useState("openChangeReason"),A=C.useState("activeTriggerElement"),M=C.useState("modal"),j=C.useState("positionerElement"),D=C.useState("instantType"),H=C.useState("transitionStatus"),B=C.useState("hasViewport"),V=r.useRef(null),L=(0,Z.useAnimationsFinished)(j,!1,!1),U=(0,Q.useAnchorPositioning)({anchor:s,floatingRootContext:I,positionMethod:a,mounted:P,side:l,sideOffset:p,align:u,alignOffset:g,arrowPadding:S,collisionBoundary:v,collisionPadding:m,sticky:h,disableAnchorTracking:b,keepMounted:y,nodeId:T,collisionAvoidance:R,adaptiveOrigin:B?$.adaptiveOrigin:void 0}),G=r.useMemo(()=>{let e={};return k||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...U.positionerStyles,...e}}},[k,P,U.positionerStyles]),K=r.useMemo(()=>({props:G,...U}),[G,U]),z=I.useState("domReferenceElement");(0,Y.useIsoLayoutEffect)(()=>{let e=V.current;if(z&&(V.current=z),e&&z&&z!==e){C.set("instantType",void 0);let e=new AbortController;return L(()=>{C.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[z,L,C]);let J={open:k,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:D},et=r.useCallback(e=>{C.set("positionerElement",e)},[C]),en=(0,N.useRenderElement)("div",e,{state:J,props:[K.props,(0,ee.getDisabledMountTransitionStyles)(H),x],ref:[t,et],stateAttributesMapping:F.popupStateMapping});return(0,n.jsxs)(q.Provider,{value:K,children:[P&&!0===M&&w!==E.REASONS.triggerHover&&(0,n.jsx)(X.InternalBackdrop,{ref:C.context.internalBackdropRef,inert:(0,W.inertValue)(!k),cutout:A}),(0,n.jsx)(d.FloatingNode,{id:T,children:en})]})});var en=e.i(92615),eo=e.i(11931),er=e.i(511980),ei=e.i(809058),es=e.i(504068),ea=e.i(197920),el=e.i(196368);let eu=r.createContext(void 0);function ed(e){let{value:t,children:o}=e;return(0,n.jsx)(eu.Provider,{value:t,children:o})}let ep={...F.popupStateMapping,...ei.transitionStatusMapping},ec=r.forwardRef(function(e,t){let{className:o,render:i,initialFocus:s,finalFocus:a,...l}=e,{store:u}=f(),d=J(),p=null!=(0,el.useToolbarRootContext)(!0),{context:c,hasClosePart:g}=function(){let[e,t]=r.useState(0),n=(0,A.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),v=u.useState("open"),m=u.useState("openMethod"),S=u.useState("instantType"),h=u.useState("transitionStatus"),b=u.useState("popupProps"),R=u.useState("titleElementId"),x=u.useState("descriptionElementId"),C=u.useState("modal"),O=u.useState("mounted"),y=u.useState("openChangeReason"),T=u.useState("activeTriggerElement"),I=u.useState("floatingRootContext");(0,es.useOpenChangeComplete)({open:v,ref:u.context.popupRef,onComplete(){v&&u.context.onOpenChangeComplete?.(!0)}});let P=u.useState("disabled"),k=u.useState("openOnHover"),w=u.useState("closeDelay");(0,er.useHoverFloatingInteraction)(I,{enabled:k&&!P,closeDelay:w});let M=void 0===s?function(e){return"touch"!==e||u.context.popupRef.current}:s,F={open:v,side:d.side,align:d.align,instant:S,transitionStatus:h},j=r.useCallback(e=>{u.set("popupElement",e)},[u]),D=(0,N.useRenderElement)("div",e,{state:F,ref:[t,u.context.popupRef,j],props:[b,{"aria-labelledby":R,"aria-describedby":x,onKeyDown(e){p&&ea.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ee.getDisabledMountTransitionStyles)(h),l],stateAttributesMapping:ep});return(0,n.jsx)(eo.FloatingFocusManager,{context:I,openInteractionType:m,modal:!1!==C&&g,disabled:!O||y===E.REASONS.triggerHover,initialFocus:M,returnFocus:a,restoreFocus:"popup",previousFocusableElement:(0,en.isHTMLElement)(T)?T:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(ed,{value:c,children:D})})}),eg=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),{arrowRef:a,side:l,align:u,arrowUncentered:d,arrowStyles:p}=J();return(0,N.useRenderElement)("div",e,{state:{open:s,side:l,align:u,uncentered:d},ref:[t,a],props:[{style:p,"aria-hidden":!0},r],stateAttributesMapping:F.popupStateMapping})}),ef={...F.popupStateMapping,...ei.transitionStatusMapping},ev=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),a=i.useState("mounted"),l=i.useState("transitionStatus"),u=i.useState("openChangeReason");return(0,N.useRenderElement)("div",e,{state:{open:s,transitionStatus:l},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:u===E.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},r],stateAttributesMapping:ef})}),em=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("titleElementId",s),()=>{i.set("titleElementId",void 0)}),[i,s]),(0,N.useRenderElement)("h2",e,{ref:t,props:[{id:s},r]})}),eS=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",s),()=>{i.set("descriptionElementId",void 0)}),[i,s]),(0,N.useRenderElement)("p",e,{ref:t,props:[{id:s},r]})}),eh=r.forwardRef(function(e,t){let n,{render:o,className:i,disabled:s=!1,nativeButton:a=!0,...l}=e,{buttonRef:u,getButtonProps:d}=(0,M.useButton)({disabled:s,focusableWhenDisabled:!1,native:a}),{store:p}=f();return n=r.useContext(eu),(0,Y.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,N.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){p.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,d]})}),eb=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eR=e.i(203667);let eE={activationDirection:e=>e?{"data-activation-direction":e}:null},ex=r.forwardRef(function(e,t){let{render:n,className:o,children:r,...i}=e,{store:s}=f(),{side:a}=J(),l=s.useState("instantType"),{children:u,state:d}=(0,eR.usePopupViewport)({store:s,side:a,cssVars:eb,children:r}),p={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:l};return(0,N.useRenderElement)("div",e,{state:p,ref:t,props:[i,{children:u}],stateAttributesMapping:eE})});class eC{constructor(){this.store=new T}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,c.default)(80,e));this.store.setOpen(!0,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,eg,"Backdrop",0,ev,"Close",0,eh,"Description",0,eS,"Handle",0,eC,"Popup",0,ec,"Portal",0,z,"Positioner",0,et,"Root",0,function(e){return f(!0)?(0,n.jsx)(w,{props:e}):(0,n.jsx)(d.FloatingTree,{children:(0,n.jsx)(w,{props:e})})},"Title",0,em,"Trigger",0,G,"Viewport",0,ex,"createHandle",0,function(){return new eC}],107641);var eO=e.i(107641),eO=eO;e.s(["Popover",0,function({...e}){return(0,n.jsx)(eO.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...a}){return(0,n.jsx)(eO.Portal,{children:(0,n.jsx)(eO.Positioner,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:(0,n.jsx)(eO.Popup,{"data-slot":"popover-content",className:(0,o.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(eO.Trigger,{"data-slot":"popover-trigger",...e})}],337822)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487976,e=>{"use strict";var r=e.i(289721),t=e.i(965652),n=e.i(946822),l=e.i(40448),a=e.i(821957),o=e.i(
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487976,e=>{"use strict";var r=e.i(289721),t=e.i(965652),n=e.i(946822),l=e.i(40448),a=e.i(821957),o=e.i(807265),c=e.i(461526);e.s(["PreviewLogTerminal",0,function({previewKey:e,taskId:i}){let{resolvedTheme:u}=(0,a.useTheme)(),s=(0,t.useRef)(null),d=(0,t.useRef)(null),f=(0,t.useRef)(null),m=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!s.current)return;let r="light"!==u,t=new n.Terminal({fontFamily:"Menlo, Monaco, 'Courier New', monospace",fontSize:12,scrollback:5e3,cursorBlink:!1,disableStdin:!0,allowTransparency:!1,convertEol:!0,theme:r?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}}),a=new l.FitAddon;t.loadAddon(a),t.open(s.current);let w=s.current.querySelector(".xterm-helper-textarea");w&&(w.style.opacity="0"),d.current=t,m.current=a;try{a.fit()}catch{}let y=!1,g=null;(async()=>{let r=await (0,o.getActualWsPort)();if(y)return;let n=new URLSearchParams({taskId:c.PREVIEW_TASK_ID,role:"terminal",previewKey:e,connectionId:crypto.randomUUID(),clientTaskId:i});(g=new WebSocket(`ws://localhost:${r}/?${n.toString()}`)).binaryType="arraybuffer",f.current=g,g.onmessage=e=>{let r="string"==typeof e.data?e.data:new TextDecoder().decode(e.data);t.write(r)}})();let b=()=>{try{m.current?.fit()}catch{}};return window.addEventListener("resize",b),()=>{y=!0,window.removeEventListener("resize",b),f.current?.close(),f.current=null,d.current&&(d.current.dispose(),d.current=null),m.current=null}},[e,i,u]),(0,r.jsx)("div",{ref:s,className:"size-full bg-black"})}])},461834,e=>{e.n(e.i(487976))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},301348,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],301348);let s=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,s],181209)},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},673984,e=>{"use strict";let t=(0,e.i(572989).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],673984)},566606,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),l=e.i(821957),i=e.i(519455),n=e.i(793479),r=e.i(905455),o=e.i(746798),d=e.i(224277),c=e.i(975157);function m({className:e,size:s="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":s,className:(0,c.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})}function x({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-4 group-data-[size=sm]/card:px-3",e),...s})}var h=e.i(400355),u=e.i(597746),p=e.i(657153),g=e.i(567860),f=e.i(301348),b=e.i(181209),j=e.i(533499);function v({adapterType:e,adapterLabel:a,provider:l,hideHeader:n,onResult:r}){let[o,d]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),{t:k}=(0,j.useI18n)();async function w(){if(!o){d(!0),y(null);try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e,provider:l})}),s=await t.json();y(s),r?.(s)}catch{let e={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};y(e),r?.(e)}finally{d(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[!n&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,t.jsx)(g.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:k("settings.aiTools.cliVerification")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:k("settings.aiTools.cliVerificationDesc")})]})]}),(0,t.jsx)(m,{children:(0,t.jsxs)(x,{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:a&&(0,t.jsx)("p",{className:"font-medium",children:a})}),(0,t.jsx)(i.Button,{onClick:w,disabled:o,variant:"outline",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),k("settings.aiTools.testing")]}):k("settings.aiTools.testConnection")})]}),N&&(0,t.jsxs)("div",{className:(0,c.cn)("rounded-lg border p-4 space-y-3",N.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[N.ok?(0,t.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,t.jsx)(b.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,t.jsx)("span",{className:(0,c.cn)("text-sm font-medium",N.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:k(N.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,t.jsx)("div",{className:"space-y-2",children:N.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[s.passed?(0,t.jsx)(u.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,t.jsx)(p.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,t.jsx)("span",{className:(0,c.cn)(s.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:s.message})]},`${e}-${s.name}`))})]})]})})]})}var N=e.i(846266),y=e.i(673984),k=e.i(226145),w=e.i(245697),C=e.i(19671),T=e.i(368490),S=e.i(387091),L=e.i(15299),M=e.i(572989);let P=(0,M.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),B=(0,M.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var R=e.i(232545),$=e.i(998626),z=e.i(453889),I=e.i(475958),U=e.i(887911),H=e.i(9608),F=e.i(514798);let O=(0,F.createServerReference)("602ebb4afa308d031087f196c68af4b48c2c328910",F.callServer,void 0,F.findSourceMapURL,"completeOnboarding"),E=(0,F.createServerReference)("60833fa33531c02f00a1f5248eb271eabd3b1a0e25",F.callServer,void 0,F.findSourceMapURL,"setOnboardingExtensions");function q({username:e,onComplete:a}){let{t:l}=(0,j.useI18n)(),n=(0,U.listExtensionMetadata)(),[r,o]=(0,s.useState)(()=>new Set(n.map(e=>e.id))),[d,c]=(0,s.useState)(!1),m=n.length,x=r.size;async function u(){c(!0);let t=Array.from(r),s=[];if(t.length>0)for(let e of(await Promise.all(t.map(async e=>{try{let t=await (0,H.installExtension)(e);return{id:e,success:t.success}}catch{return{id:e,success:!1}}}))))e.success&&s.push(e.id);await E(t,s),await O(e),c(!1),a()}return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:l("onboarding.step4.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:l("onboarding.step4.desc")})]}),(0,t.jsx)("div",{className:"space-y-2",children:n.map(e=>{let s=e.icon,a=r.has(e.id);return(0,t.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border border-border bg-background p-3 cursor-pointer hover:bg-accent/50 transition-colors",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{var t;return t=e.id,void o(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},disabled:d,className:"mt-0.5 h-4 w-4 cursor-pointer accent-primary"}),(0,t.jsxs)("div",{className:"flex flex-1 items-start gap-3 min-w-0",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:(0,t.jsx)(s,{className:"h-4 w-4 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description}),(0,t.jsxs)("a",{href:e.homepageUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(I.ExternalLink,{className:"h-3 w-3"}),l("settings.extensions.visitHomepage")]})]})]})]},e.id)})}),x<m&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground italic",children:l("onboarding.step4.skipHint")}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(i.Button,{onClick:u,disabled:d,children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),l("onboarding.step4.installing")]}):0===x?l("onboarding.step4.continueWithoutInstall"):l("onboarding.step4.continue")})})]})}function D({step:e}){let s=[y.User,g.Terminal,k.GitBranch,w.Package][e-1]??y.User,a=["Profile","Connect","Configure","Extensions"][e-1]??"";return(0,t.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,t.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,t.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,t.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,t.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,t.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,t.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,t.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,t.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,t.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,t.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,t.jsx)(s,{className:"h-7 w-7 text-amber-400"})})}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,t.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:a})})]})}let V={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,c,m,x=(0,a.useRouter)(),{t:h,locale:p,setLocale:f}=(0,j.useI18n)(),{theme:b,setTheme:M}=(0,l.useTheme)(),[I,U]=(0,s.useState)(!1),[H,F]=(0,s.useState)(1),[O,E]=(0,s.useState)(""),[_,A]=(0,s.useState)({}),G=Object.values(_).some(e=>e.ok),[W,X]=(0,s.useState)([]),[K,Z]=(0,s.useState)({...V}),[J,Q]=(0,s.useState)(!0),[Y,ee]=(0,s.useState)(0),[et,es]=(0,s.useState)(!1),[ea,el]=(0,s.useState)(!1);(0,s.useEffect)(()=>U(!0),[]);let ei=[{value:"light",label:(0,t.jsx)(S.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,t.jsx)(L.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,t.jsx)(P,{className:"h-4 w-4"})}];function en(){F(e=>e+1)}function er(){F(e=>Math.max(1,e-1))}let eo=[{icon:y.User,label:h("onboarding.step1.title")},{icon:g.Terminal,label:h("onboarding.step2.title")},{icon:k.GitBranch,label:h("onboarding.step3.title")},{icon:w.Package,label:h("onboarding.step4.title")}];return(0,t.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,t.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,t.jsx)(D,{step:H})}),(0,t.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,t.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,t.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:eo.map((e,s)=>{let a=s+1,l=a===H,i=a<H,n=e.icon;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[s>0&&(0,t.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${i?"bg-primary":"bg-border"}`}),(0,t.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${l?"bg-primary text-primary-foreground shadow-sm":i?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[i?(0,t.jsx)(u.Check,{className:"h-3 w-3 shrink-0"}):(0,t.jsx)(n,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.label})]})]},s)})})]}),(0,t.jsxs)("div",{children:[1===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step1.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step1.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:h("onboarding.step1.usernameLabel")}),(0,t.jsx)("input",{id:"onboarding-username",type:"text",value:O,onChange:e=>E(e.target.value),placeholder:h("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.language")})]}),(0,t.jsx)(r.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:p,onChange:e=>f(e)})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.theme")})]}),I?(0,t.jsx)(r.SegmentedControl,{options:ei.map(e=>({value:e.value,label:e.label})),value:b??"system",onChange:e=>M(e)}):(0,t.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,t.jsx)("div",{className:"flex justify-end pt-3",children:(0,t.jsxs)(i.Button,{onClick:en,disabled:0===O.trim().length,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step2.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step2.desc")})]}),(0,t.jsx)(v,{adapterType:"claude_code",adapterLabel:"Claude CLI",provider:"claude",onResult:e=>A(t=>({...t,claude:e}))}),(0,t.jsx)(v,{adapterType:"codex_cli",adapterLabel:"Codex CLI",provider:"codex",hideHeader:!0,onResult:e=>A(t=>({...t,codex:e}))}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:en,disabled:!G,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===H&&(0,t.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step3.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step3.desc")})]}),W.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:h("onboarding.step3.added").replace("{count}",String(W.length))}),W.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,t.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void X(e=>e.filter(e=>e.id!==t))},children:(0,t.jsx)($.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),J?(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.hostLabel")}),(0,t.jsx)(n.Input,{value:K.host,onChange:e=>Z(t=>({...t,host:e.target.value})),placeholder:h("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.ownerLabel")}),(0,t.jsx)(n.Input,{value:K.ownerMatch,onChange:e=>Z(t=>({...t,ownerMatch:e.target.value})),placeholder:h("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:h("onboarding.step3.pathLabel")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Input,{value:K.localPathTemplate,onChange:e=>Z(t=>({...t,localPathTemplate:e.target.value})),placeholder:h("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:et?"default":"outline",size:"sm",type:"button",onClick:()=>{es(e=>(e||ee(2),!e))},className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(o.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:h("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:h("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>el(!0),children:(0,t.jsx)(z.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(o.TooltipContent,{children:h("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:h(et?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),K.localPathTemplate&&(e=K.localPathTemplate.trim().replace(/\/+$/,""),c=et?`${e}/{path}`:e,m=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",children:m.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>ee(s),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${Y===s?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},s))}),(0,t.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:m[Y].url}),(0,t.jsxs)("p",{className:"font-mono text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],l=s.match(/^git@[^:]+:(.+)$/);if(l)a=l[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let i=a[0],n=a[a.length-1],r=a.join("/");if(e.includes("{path}"))return e.replace("{path}",r).replace("{owner}",i).replace("{repo}",n).replace(/\/+$/,"");let o=e.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return`${o}/${n}`}(c,m[Y].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[W.length>0&&(0,t.jsx)(i.Button,{variant:"ghost",onClick:()=>Q(!1),children:h("settings.config.git.cancel")}),(0,t.jsxs)(i.Button,{onClick:function(){if(!K.host.trim()||!K.localPathTemplate.trim())return;let e=K.localPathTemplate.trim().replace(/\/+$/,""),t=et?`${e}/{path}`:e,s={id:crypto.randomUUID(),host:K.host.trim(),ownerMatch:K.ownerMatch.trim()||"*",localPathTemplate:t,priority:W.length};X(e=>[...e,s]),Z({...V}),es(!1),Q(!1)},disabled:!K.host.trim()||!K.localPathTemplate.trim(),children:[(0,t.jsx)(u.Check,{className:"h-4 w-4 mr-1"}),h("settings.config.git.save")]})]})]}):(0,t.jsxs)(i.Button,{variant:"outline",onClick:()=>{Z({...V}),Q(!0)},children:[(0,t.jsx)(R.Plus,{className:"h-4 w-4 mr-1"}),h("settings.config.git.addRule")]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:async()=>{W.length>0&&await (0,N.setConfigValue)("git.pathMappingRules",W),F(e=>e+1)},className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),4===H&&(0,t.jsx)(q,{username:O,onComplete:()=>x.replace("/workspaces")})]}),(0,t.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:h("onboarding.stepIndicator").replace("{current}",String(H)).replace("{total}",String(4))})]})}),(0,t.jsx)(d.FolderBrowserDialog,{open:ea,onOpenChange:el,onSelect:e=>{Z(t=>({...t,localPathTemplate:e})),el(!1)}})]})}],566606)}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},101448,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("4084d56f97fc2d106951c08ef353d5dff8b6a7972e",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,a])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},35967,e=>{"use strict";var t=e.i(289721);let a=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var r=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function l(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let n={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:l="",title:n}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${l}`,title:n??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:a("version.type.uncategorized")})},"typeBadgeColor",0,l],35967)},814686,792934,12659,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40ebc54780e47a891ec14da48ad2e8c835e7e10e1e",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],814686);let r=(0,t.createServerReference)("40cae26d8c2823110d8bb96e1ee8d8db922742701f",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],792934);let s=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,s],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,a],736061);let r=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,r],460707)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},980376,842767,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),l=e.i(670123);function n({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:d="right",showCloseButton:c=!0,...u}){return(0,t.jsxs)(n,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":d,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,c&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(l.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let d=(0,o.createServerReference)("40d80a8b15d1ad48610f6dbdfcd578ec5e0217c8d1",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,d],842767)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),l=e.i(487486),n=e.i(519455),i=e.i(533499),o=e.i(557107),d=e.i(842767),c=e.i(41546),u=e.i(814686),m=e.i(792934),x=e.i(101448),p=e.i(744798),h=e.i(685149),g=e.i(606393),f=e.i(875840),b=e.i(245697),y=e.i(12659),j=e.i(736061),k=e.i(460707),w=e.i(567860);function v({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var N=e.i(35967),S=e.i(360112);e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:I,taskId:C}){let{t:T}=(0,i.useI18n)(),[D,M]=(0,a.useState)(null),[E,L]=(0,a.useTransition)(),[R,$]=(0,a.useState)(!1),[O,P]=(0,a.useState)([]);(0,a.useEffect)(()=>{C&&e?L(async()=>{let e=await (0,d.getTaskOverview)(C);e&&(M(e),e.project?.workspaceId&&(0,c.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{P(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>P([])))}):M(null)},[C,e]);let A=D?h.BOARD_COLUMNS.find(e=>e.id===D.status):null,B=D?h.PRIORITY_CONFIG[D.priority]:null,z=D?.executions?.[0]??null,F=(()=>{if(z?.worktreePath)return z.worktreePath;let e=D?.project?.localPath;return e?D?.subPath?`${e}/${D.subPath}`:e:null})(),V=(()=>{let e=z?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),_=async e=>{if(D?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:D.project.id}),S.toast.success(T("taskDrawer.duplicateSuccess")),$(!1),I(!1)}catch{S.toast.error(T("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:I,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:D?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:T("taskDrawer.title")}),D&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[A&&(0,t.jsxs)(l.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${A.color}`}),A.label]}),B&&(0,t.jsx)(l.Badge,{variant:"secondary",className:`text-xs ${B.color}`,children:B.label}),D.version&&(0,t.jsx)(N.TaskVersionTag,{number:D.version.number,name:D.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:E&&!D?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:T("assets.loading")}):D?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:T("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:D.description||T("taskDrawer.noDescription")})]}),D.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:D.labels.map(e=>(0,t.jsx)(l.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(g.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(D.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(b.Package,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:D._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.fileChanges")}),V?(0,t.jsx)(v,{added:V.added,removed:V.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(y.PlayCircle,{className:"h-3.5 w-3.5"}),T("taskDrawer.lastExecution")]}),z?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(l.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:z.status}),z.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:z.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noExecution")})]}),F&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,u.openInFileManager)(F)}catch(e){console.error("openInFileManager failed:",e),S.toast.error(T("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(j.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInFileManager")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInEditor)(F)}catch(e){console.error("openInEditor failed:",e),S.toast.error(T("git.openInEditorFailed"))}},children:[(0,t.jsx)(k.Code,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInEditor")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,x.openInTerminal)(F)}catch(e){console.error("openInTerminal failed:",e),S.toast.error(T("git.openInTerminalFailed"))}},children:[(0,t.jsx)(w.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(n.Button,{variant:"default",className:"w-full",onClick:()=>{D&&$(!0)},disabled:!D,children:[(0,t.jsx)(f.Copy,{className:"h-4 w-4"}),T("taskDrawer.duplicate")]})})]}):null})]}),D?.project&&(0,t.jsx)(p.CreateTaskDialog,{open:R,onOpenChange:$,onSubmit:_,labels:O,projectType:D.project.type,projectLocalPath:D.project.localPath,prefillFromTask:{title:D.title,description:D.description,priority:D.priority,subPath:D.subPath,labelIds:D.labels.map(e=>e.label.id),baseBranch:D.baseBranch}})]})}],605005)},340873,e=>{"use strict";let t=(0,e.i(572989).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"}]]);e.s(["GitCommitHorizontal",0,t],340873)},960518,e=>{"use strict";let t=(0,e.i(572989).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"}]]);e.s(["GitCompare",0,t],960518)},707631,(e,t,a)=>{t.exports=e=>{if(!e||"string"!=typeof e||e.match(/^\s+$/))return[];let t=e.split(`
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},949780,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("400b85788c94fdf13b91ebd07c6b0c654b4639bd26",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,a])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},35967,e=>{"use strict";var t=e.i(289721);let a=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var r=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function l(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let n={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:l="",title:n}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${l}`,title:n??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:a("version.type.uncategorized")})},"typeBadgeColor",0,l],35967)},876533,554622,12659,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("408c17cfecd963a980c178b4da5d44d388638100bd",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],876533);let r=(0,t.createServerReference)("40cb4a6bb2aa8c3f18f26548a6a34c458196c45e81",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],554622);let s=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,s],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,a],736061);let r=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,r],460707)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},980376,326264,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),l=e.i(670123);function n({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:d="right",showCloseButton:c=!0,...u}){return(0,t.jsxs)(n,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":d,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,c&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(l.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let d=(0,o.createServerReference)("402a9489f0725e413bf18bc3eb7e0110de6e3dafbd",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,d],326264)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),l=e.i(487486),n=e.i(519455),i=e.i(533499),o=e.i(792003),d=e.i(326264),c=e.i(4342),u=e.i(876533),m=e.i(554622),x=e.i(949780),p=e.i(744798),h=e.i(685149),g=e.i(606393),f=e.i(875840),b=e.i(245697),y=e.i(12659),j=e.i(736061),k=e.i(460707),w=e.i(567860);function v({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var N=e.i(35967),S=e.i(360112);e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:I,taskId:C}){let{t:T}=(0,i.useI18n)(),[D,M]=(0,a.useState)(null),[E,L]=(0,a.useTransition)(),[R,$]=(0,a.useState)(!1),[O,P]=(0,a.useState)([]);(0,a.useEffect)(()=>{C&&e?L(async()=>{let e=await (0,d.getTaskOverview)(C);e&&(M(e),e.project?.workspaceId&&(0,c.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{P(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>P([])))}):M(null)},[C,e]);let A=D?h.BOARD_COLUMNS.find(e=>e.id===D.status):null,B=D?h.PRIORITY_CONFIG[D.priority]:null,z=D?.executions?.[0]??null,F=(()=>{if(z?.worktreePath)return z.worktreePath;let e=D?.project?.localPath;return e?D?.subPath?`${e}/${D.subPath}`:e:null})(),V=(()=>{let e=z?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),_=async e=>{if(D?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:D.project.id}),S.toast.success(T("taskDrawer.duplicateSuccess")),$(!1),I(!1)}catch{S.toast.error(T("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:I,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:D?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:T("taskDrawer.title")}),D&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[A&&(0,t.jsxs)(l.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${A.color}`}),A.label]}),B&&(0,t.jsx)(l.Badge,{variant:"secondary",className:`text-xs ${B.color}`,children:B.label}),D.version&&(0,t.jsx)(N.TaskVersionTag,{number:D.version.number,name:D.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:E&&!D?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:T("assets.loading")}):D?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:T("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:D.description||T("taskDrawer.noDescription")})]}),D.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:D.labels.map(e=>(0,t.jsx)(l.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(g.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(D.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(b.Package,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:D._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.fileChanges")}),V?(0,t.jsx)(v,{added:V.added,removed:V.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(y.PlayCircle,{className:"h-3.5 w-3.5"}),T("taskDrawer.lastExecution")]}),z?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(l.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:z.status}),z.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:z.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noExecution")})]}),F&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,u.openInFileManager)(F)}catch(e){console.error("openInFileManager failed:",e),S.toast.error(T("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(j.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInFileManager")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInEditor)(F)}catch(e){console.error("openInEditor failed:",e),S.toast.error(T("git.openInEditorFailed"))}},children:[(0,t.jsx)(k.Code,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInEditor")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,x.openInTerminal)(F)}catch(e){console.error("openInTerminal failed:",e),S.toast.error(T("git.openInTerminalFailed"))}},children:[(0,t.jsx)(w.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(n.Button,{variant:"default",className:"w-full",onClick:()=>{D&&$(!0)},disabled:!D,children:[(0,t.jsx)(f.Copy,{className:"h-4 w-4"}),T("taskDrawer.duplicate")]})})]}):null})]}),D?.project&&(0,t.jsx)(p.CreateTaskDialog,{open:R,onOpenChange:$,onSubmit:_,labels:O,projectType:D.project.type,projectLocalPath:D.project.localPath,prefillFromTask:{title:D.title,description:D.description,priority:D.priority,subPath:D.subPath,labelIds:D.labels.map(e=>e.label.id),baseBranch:D.baseBranch}})]})}],605005)},340873,e=>{"use strict";let t=(0,e.i(572989).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"}]]);e.s(["GitCommitHorizontal",0,t],340873)},960518,e=>{"use strict";let t=(0,e.i(572989).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"}]]);e.s(["GitCompare",0,t],960518)},707631,(e,t,a)=>{t.exports=e=>{if(!e||"string"!=typeof e||e.match(/^\s+$/))return[];let t=e.split(`
|
|
2
2
|
`);if(0===t.length)return[];let a=[],r=null,s=null,n=0,o=0,d=null,c=e=>{let[t,s]=l(e)??[];r={chunks:[],deletions:0,additions:0,from:t,to:s},a.push(r)},u=()=>{(!r||r.chunks.length)&&c()},m=e=>{if(!s)return;let[t]=s.changes.slice(-1);s.changes.push({type:t.type,[t.type]:!0,ln1:t.ln1,ln2:t.ln2,ln:t.ln,content:e})},x=[[/^diff\s/,c],[/^new file mode (\d+)$/,(e,t)=>{u(),r.new=!0,r.newMode=t[1],r.from="/dev/null"}],[/^deleted file mode (\d+)$/,(e,t)=>{u(),r.deleted=!0,r.oldMode=t[1],r.to="/dev/null"}],[/^old mode (\d+)$/,(e,t)=>{u(),r.oldMode=t[1]}],[/^new mode (\d+)$/,(e,t)=>{u(),r.newMode=t[1]}],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,(e,t)=>{u(),r.index=e.split(" ").slice(1),t[1]&&(r.oldMode=r.newMode=t[1].trim())}],[/^---\s/,e=>{u(),r.from=i(e)}],[/^\+\+\+\s/,e=>{u(),r.to=i(e)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(e,t)=>{r||c(e);let[a,l,i,u]=t.slice(1);n=+a,o=+i,s={content:e,changes:[],oldStart:+a,oldLines:+(l||1),newStart:+i,newLines:+(u||1)},d={oldLines:+(l||1),newLines:+(u||1)},r.chunks.push(s)}],[/^\$/,m]],p=[[/^\$/,m],[/^-/,e=>{s&&(s.changes.push({type:"del",del:!0,ln:n++,content:e}),r.deletions++,d.oldLines--)}],[/^\+/,e=>{s&&(s.changes.push({type:"add",add:!0,ln:o++,content:e}),r.additions++,d.newLines--)}],[/^\s*/,e=>{s?.changes.push({type:"normal",normal:!0,ln1:n++,ln2:o++,content:e}),d.oldLines--,d.newLines--}]],h=e=>{d?(e=>{for(let[t,a]of p){let r=e.match(t);if(r){a(e,r);break}}0===d.oldLines&&0===d.newLines&&(d=null)})(e):(e=>{for(let[t,a]of x){let r=e.match(t);if(r){a(e,r);break}}})(e)};for(let e of t)h(e);return a};let r=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,s=/^(a|b|i|w|c|o|1|2)\//,l=e=>e?.match(r)?.map(e=>e.replace(s,"").replace(/("|')$/,"")),n=/^\\?['"]|\\?['"]$/g,i=e=>{let t=o(e,"-+").trim();return(t=c(t)).replace(n,"").replace(s,"")},o=(e,t)=>{if(e=m(e),!t&&String.prototype.trimLeft)return e.trimLeft();let a=u(t);return e.replace(RegExp(`^${a}+`),"")},d=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,c=e=>{let t=d.exec(e);return t&&(e=e.substring(0,t.index).trim()),e},u=e=>null==e?"\\s":e instanceof RegExp?e.source:`[${m(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,m=e=>`${e??""}`},196199,e=>{"use strict";var t=e.i(707631);function a(e){return e.replace(/\r\n/g,"\n")}e.s(["normalizeLF",0,a,"parseUnifiedDiff",0,function(e){return(0,t.default)(a(e))}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},490865,e=>{"use strict";var t=e.i(514798);let n=(0,t.createServerReference)("40237e4dbff3868f964dd9913f9a4ca85f84822c10",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,n])},110204,337822,e=>{"use strict";var t,n=e.i(289721),o=e.i(975157);e.s(["Label",0,function({className:e,...t}){return(0,n.jsx)("label",{"data-slot":"label",className:(0,o.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}],110204),e.s([],707132),e.i(707132);var r=e.i(965652),i=e.i(620163),s=e.i(528796),a=e.i(594640),l=e.i(306296),u=e.i(344478),p=e.i(205995),c=e.i(611008);e.i(708878);var d=e.i(462902);let g=r.createContext(void 0);function f(e){let t=r.useContext(g);if(void 0===t&&!e)throw Error((0,d.default)(47));return t}var S=e.i(585012),v=e.i(370161),m=e.i(596290),h=e.i(161476),R=e.i(903224),E=e.i(774641),C=e.i(586622),O=e.i(771326),b=e.i(87396),x=e.i(693354);let T={...O.popupStoreSelectors,disabled:(0,m.createSelector)(e=>e.disabled),instantType:(0,m.createSelector)(e=>e.instantType),openMethod:(0,m.createSelector)(e=>e.openMethod),openChangeReason:(0,m.createSelector)(e=>e.openChangeReason),modal:(0,m.createSelector)(e=>e.modal),stickIfOpen:(0,m.createSelector)(e=>e.stickIfOpen),titleElementId:(0,m.createSelector)(e=>e.titleElementId),descriptionElementId:(0,m.createSelector)(e=>e.descriptionElementId),openOnHover:(0,m.createSelector)(e=>e.openOnHover),closeDelay:(0,m.createSelector)(e=>e.closeDelay),hasViewport:(0,m.createSelector)(e=>e.hasViewport)};class I extends v.ReactStore{constructor(e){const t={...(0,O.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new h.Timeout,triggerElements:new b.PopupTriggerMap},T)}setOpen=(e,t)=>{let n=t.reason===C.REASONS.triggerHover,o=t.reason===C.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===C.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},s=this.state.floatingRootContext.context.events;s?.emit("openchange",i);let a=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(x.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),S.flushSync(a)):a(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===C.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,R.useRefWithInit)(()=>new I(t)).current,o=e??n;return(0,E.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var y=e.i(67077),P=e.i(894621),A=e.i(892069);function M({props:e}){let{children:t,open:o,defaultOpen:d=!1,onOpenChange:f,onOpenChangeComplete:S,modal:v=!1,handle:m,triggerId:h,defaultTriggerId:R=null}=e,E=I.useStore(m?.store,{modal:v,open:d,openProp:o,activeTriggerId:R,triggerIdProp:h});(0,s.useOnFirstRender)(()=>{void 0===o&&!1===E.state.open&&!0===d&&E.update({open:!0,activeTriggerId:R})}),E.useControlledProp("openProp",o),E.useControlledProp("triggerIdProp",h);let O=E.useState("open"),b=E.useState("positionerElement"),x=E.useState("payload"),T=E.useState("openChangeReason");E.useContextCallback("onOpenChange",f),E.useContextCallback("onOpenChangeComplete",S);let{openMethod:k,triggerProps:w}=(0,A.useOpenInteractionType)(O);(0,P.useImplicitActiveTrigger)(E);let{forceUnmount:F}=(0,P.useOpenStateTransitions)(O,E,()=>{E.update({stickIfOpen:!0,openChangeReason:null})});(0,i.useScrollLock)(O&&!0===v&&T!==C.REASONS.triggerHover&&"touch"!==k,b),r.useEffect(()=>{O||E.context.stickIfOpenTimeout.clear()},[E,O]);let N=r.useCallback(e=>{let t=(0,y.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},t},[E]),j=r.useCallback(()=>{E.setOpen(!1,N(C.REASONS.imperativeAction))},[E,N]);r.useImperativeHandle(e.actionsRef,()=>({unmount:F,close:j}),[F,j]);let D=(0,c.useSyncedFloatingRootContext)({popupStore:E,onOpenChange:E.setOpen}),H=(0,a.useDismiss)(D,{outsidePressEvent:{mouse:"trap-focus"===v?"sloppy":"intentional",touch:"sloppy"}}),B=(0,u.useRole)(D),{getReferenceProps:L,getFloatingProps:V,getTriggerProps:U}=(0,l.useInteractions)([H,B]),G=r.useMemo(()=>L(w),[L,w]),K=r.useMemo(()=>U(w),[U,w]),_=r.useMemo(()=>V(),[V]);E.useSyncedValues({modal:v,openMethod:k,activeTriggerProps:G,inactiveTriggerProps:K,popupProps:_,floatingRootContext:D,nested:null!=(0,p.useFloatingParentNodeId)()});let z=r.useMemo(()=>({store:E}),[E]);return(0,n.jsx)(g.Provider,{value:z,children:"function"==typeof t?t({payload:x}):t})}var k=e.i(887642),w=e.i(282109),F=e.i(845756),N=e.i(581263),j=e.i(660272),D=e.i(430557),H=e.i(411657),B=e.i(207516),L=e.i(221732),V=e.i(682354),U=e.i(870541);let G=r.forwardRef(function(e,t){let{render:o,className:i,disabled:s=!1,nativeButton:a=!0,handle:u,payload:p,openOnHover:c=!1,delay:g=300,closeDelay:v=0,id:m,...h}=e,R=f(!0),E=u?.store??R?.store;if(!E)throw Error((0,d.default)(74));let O=(0,B.useBaseUiId)(m),b=E.useState("isTriggerActive",O),T=E.useState("floatingRootContext"),I=E.useState("isOpenedByTrigger",O),A=r.useRef(null),{registerTrigger:M,isMountedByThisTrigger:G}=(0,P.useTriggerDataForwarding)(O,A,E,{payload:p,disabled:s,openOnHover:c,closeDelay:v}),K=E.useState("openChangeReason"),_=E.useState("stickIfOpen"),z=E.useState("openMethod"),W=(0,H.useHoverReferenceInteraction)(T,{enabled:null!=T&&c&&("touch"!==z||K!==C.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,j.safePolygon)(),restMs:g,delay:{close:v},triggerElementRef:A,isActiveTrigger:b}),Y=(0,D.useClick)(T,{enabled:null!=T,stickIfOpen:_}),q=(0,l.useInteractions)([Y]),J=E.useState("triggerProps",G),{getButtonProps:Q,buttonRef:X}=(0,w.useButton)({disabled:s,native:a}),Z=r.useMemo(()=>({open:e=>e&&K===C.REASONS.triggerPress?F.pressableTriggerOpenStateMapping.open(e):F.triggerOpenStateMapping.open(e)}),[K]),$=(0,N.useRenderElement)("button",e,{state:{disabled:s,open:I},ref:[X,t,M,A],props:[q.getReferenceProps(),W,J,{[x.CLICK_TRIGGER_IDENTIFIER]:"",id:O},h,Q],stateAttributesMapping:Z}),ee=r.useRef(null),et=(0,k.useStableCallback)(e=>{S.flushSync(()=>{E.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,U.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,k.useStableCallback)(e=>{let t=E.select("positionerElement");if(t&&(0,U.isOutsideEvent)(e,t))E.context.beforeContentFocusGuardRef.current?.focus();else{S.flushSync(()=>{E.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,U.getTabbableAfterElement)(E.context.triggerFocusTargetRef.current||A.current);for(;null!==n&&(0,V.contains)(t,n);){let e=n;if((n=(0,U.getNextTabbable)(n))===e)break}n?.focus()}});return b?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(L.FocusGuard,{ref:ee,onFocus:et}),(0,n.jsx)(r.Fragment,{children:$},O),(0,n.jsx)(L.FocusGuard,{ref:E.context.triggerFocusTargetRef,onFocus:en})]}):(0,n.jsx)(r.Fragment,{children:$},O)});var K=e.i(888393);let _=r.createContext(void 0),z=r.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=f();return i.useState("mounted")||o?(0,n.jsx)(_.Provider,{value:o,children:(0,n.jsx)(K.FloatingPortal,{ref:t,...r})}):null});var W=e.i(831766),Y=e.i(804849);let q=r.createContext(void 0);function J(){let e=r.useContext(q);if(!e)throw Error((0,d.default)(46));return e}var Q=e.i(887943),X=e.i(72287),Z=e.i(412522),$=e.i(431362),ee=e.i(808754);let et=r.forwardRef(function(e,t){let{render:o,className:i,anchor:s,positionMethod:a="absolute",side:l="bottom",align:u="center",sideOffset:c=0,alignOffset:g=0,collisionBoundary:S="clipping-ancestors",collisionPadding:v=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:R=!1,collisionAvoidance:E=x.POPUP_COLLISION_AVOIDANCE,...O}=e,{store:b}=f(),T=function(){let e=r.useContext(_);if(void 0===e)throw Error((0,d.default)(45));return e}(),I=(0,p.useFloatingNodeId)(),y=b.useState("floatingRootContext"),P=b.useState("mounted"),A=b.useState("open"),M=b.useState("openChangeReason"),k=b.useState("activeTriggerElement"),w=b.useState("modal"),j=b.useState("positionerElement"),D=b.useState("instantType"),H=b.useState("transitionStatus"),B=b.useState("hasViewport"),L=r.useRef(null),V=(0,Z.useAnimationsFinished)(j,!1,!1),U=(0,Q.useAnchorPositioning)({anchor:s,floatingRootContext:y,positionMethod:a,mounted:P,side:l,sideOffset:c,align:u,alignOffset:g,arrowPadding:m,collisionBoundary:S,collisionPadding:v,sticky:h,disableAnchorTracking:R,keepMounted:T,nodeId:I,collisionAvoidance:E,adaptiveOrigin:B?$.adaptiveOrigin:void 0}),G=r.useMemo(()=>{let e={};return A||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...U.positionerStyles,...e}}},[A,P,U.positionerStyles]),K=r.useMemo(()=>({props:G,...U}),[G,U]),z=y.useState("domReferenceElement");(0,Y.useIsoLayoutEffect)(()=>{let e=L.current;if(z&&(L.current=z),e&&z&&z!==e){b.set("instantType",void 0);let e=new AbortController;return V(()=>{b.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[z,V,b]);let J={open:A,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:D},et=r.useCallback(e=>{b.set("positionerElement",e)},[b]),en=(0,N.useRenderElement)("div",e,{state:J,props:[K.props,(0,ee.getDisabledMountTransitionStyles)(H),O],ref:[t,et],stateAttributesMapping:F.popupStateMapping});return(0,n.jsxs)(q.Provider,{value:K,children:[P&&!0===w&&M!==C.REASONS.triggerHover&&(0,n.jsx)(X.InternalBackdrop,{ref:b.context.internalBackdropRef,inert:(0,W.inertValue)(!A),cutout:k}),(0,n.jsx)(p.FloatingNode,{id:I,children:en})]})});var en=e.i(92615),eo=e.i(11931),er=e.i(511980),ei=e.i(809058),es=e.i(504068),ea=e.i(197920),el=e.i(196368);let eu=r.createContext(void 0);function ep(e){let{value:t,children:o}=e;return(0,n.jsx)(eu.Provider,{value:t,children:o})}let ec={...F.popupStateMapping,...ei.transitionStatusMapping},ed=r.forwardRef(function(e,t){let{className:o,render:i,initialFocus:s,finalFocus:a,...l}=e,{store:u}=f(),p=J(),c=null!=(0,el.useToolbarRootContext)(!0),{context:d,hasClosePart:g}=function(){let[e,t]=r.useState(0),n=(0,k.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),S=u.useState("open"),v=u.useState("openMethod"),m=u.useState("instantType"),h=u.useState("transitionStatus"),R=u.useState("popupProps"),E=u.useState("titleElementId"),O=u.useState("descriptionElementId"),b=u.useState("modal"),x=u.useState("mounted"),T=u.useState("openChangeReason"),I=u.useState("activeTriggerElement"),y=u.useState("floatingRootContext");(0,es.useOpenChangeComplete)({open:S,ref:u.context.popupRef,onComplete(){S&&u.context.onOpenChangeComplete?.(!0)}});let P=u.useState("disabled"),A=u.useState("openOnHover"),M=u.useState("closeDelay");(0,er.useHoverFloatingInteraction)(y,{enabled:A&&!P,closeDelay:M});let w=void 0===s?function(e){return"touch"!==e||u.context.popupRef.current}:s,F={open:S,side:p.side,align:p.align,instant:m,transitionStatus:h},j=r.useCallback(e=>{u.set("popupElement",e)},[u]),D=(0,N.useRenderElement)("div",e,{state:F,ref:[t,u.context.popupRef,j],props:[R,{"aria-labelledby":E,"aria-describedby":O,onKeyDown(e){c&&ea.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ee.getDisabledMountTransitionStyles)(h),l],stateAttributesMapping:ec});return(0,n.jsx)(eo.FloatingFocusManager,{context:y,openInteractionType:v,modal:!1!==b&&g,disabled:!x||T===C.REASONS.triggerHover,initialFocus:w,returnFocus:a,restoreFocus:"popup",previousFocusableElement:(0,en.isHTMLElement)(I)?I:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(ep,{value:d,children:D})})}),eg=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),{arrowRef:a,side:l,align:u,arrowUncentered:p,arrowStyles:c}=J();return(0,N.useRenderElement)("div",e,{state:{open:s,side:l,align:u,uncentered:p},ref:[t,a],props:[{style:c,"aria-hidden":!0},r],stateAttributesMapping:F.popupStateMapping})}),ef={...F.popupStateMapping,...ei.transitionStatusMapping},eS=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),a=i.useState("mounted"),l=i.useState("transitionStatus"),u=i.useState("openChangeReason");return(0,N.useRenderElement)("div",e,{state:{open:s,transitionStatus:l},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:u===C.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},r],stateAttributesMapping:ef})}),ev=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("titleElementId",s),()=>{i.set("titleElementId",void 0)}),[i,s]),(0,N.useRenderElement)("h2",e,{ref:t,props:[{id:s},r]})}),em=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",s),()=>{i.set("descriptionElementId",void 0)}),[i,s]),(0,N.useRenderElement)("p",e,{ref:t,props:[{id:s},r]})}),eh=r.forwardRef(function(e,t){let n,{render:o,className:i,disabled:s=!1,nativeButton:a=!0,...l}=e,{buttonRef:u,getButtonProps:p}=(0,w.useButton)({disabled:s,focusableWhenDisabled:!1,native:a}),{store:c}=f();return n=r.useContext(eu),(0,Y.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,N.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){c.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,p]})}),eR=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eE=e.i(203667);let eC={activationDirection:e=>e?{"data-activation-direction":e}:null},eO=r.forwardRef(function(e,t){let{render:n,className:o,children:r,...i}=e,{store:s}=f(),{side:a}=J(),l=s.useState("instantType"),{children:u,state:p}=(0,eE.usePopupViewport)({store:s,side:a,cssVars:eR,children:r}),c={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:l};return(0,N.useRenderElement)("div",e,{state:c,ref:t,props:[i,{children:u}],stateAttributesMapping:eC})});class eb{constructor(){this.store=new I}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,d.default)(80,e));this.store.setOpen(!0,(0,y.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,eg,"Backdrop",0,eS,"Close",0,eh,"Description",0,em,"Handle",0,eb,"Popup",0,ed,"Portal",0,z,"Positioner",0,et,"Root",0,function(e){return f(!0)?(0,n.jsx)(M,{props:e}):(0,n.jsx)(p.FloatingTree,{children:(0,n.jsx)(M,{props:e})})},"Title",0,ev,"Trigger",0,G,"Viewport",0,eO,"createHandle",0,function(){return new eb}],107641);var ex=e.i(107641),ex=ex;e.s(["Popover",0,function({...e}){return(0,n.jsx)(ex.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...a}){return(0,n.jsx)(ex.Portal,{children:(0,n.jsx)(ex.Positioner,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:(0,n.jsx)(ex.Popup,{"data-slot":"popover-content",className:(0,o.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(ex.Trigger,{"data-slot":"popover-trigger",...e})}],337822)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},991764,e=>{"use strict";var t=e.i(514798);let n=(0,t.createServerReference)("4098a2e12f3bf84cda1b91fe6b63e5cd2f57a431c5",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,n])},110204,337822,e=>{"use strict";var t,n=e.i(289721),o=e.i(975157);e.s(["Label",0,function({className:e,...t}){return(0,n.jsx)("label",{"data-slot":"label",className:(0,o.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}],110204),e.s([],707132),e.i(707132);var r=e.i(965652),i=e.i(620163),s=e.i(528796),a=e.i(594640),l=e.i(306296),u=e.i(344478),p=e.i(205995),c=e.i(611008);e.i(708878);var d=e.i(462902);let g=r.createContext(void 0);function f(e){let t=r.useContext(g);if(void 0===t&&!e)throw Error((0,d.default)(47));return t}var S=e.i(585012),v=e.i(370161),m=e.i(596290),h=e.i(161476),R=e.i(903224),E=e.i(774641),C=e.i(586622),O=e.i(771326),b=e.i(87396),x=e.i(693354);let T={...O.popupStoreSelectors,disabled:(0,m.createSelector)(e=>e.disabled),instantType:(0,m.createSelector)(e=>e.instantType),openMethod:(0,m.createSelector)(e=>e.openMethod),openChangeReason:(0,m.createSelector)(e=>e.openChangeReason),modal:(0,m.createSelector)(e=>e.modal),stickIfOpen:(0,m.createSelector)(e=>e.stickIfOpen),titleElementId:(0,m.createSelector)(e=>e.titleElementId),descriptionElementId:(0,m.createSelector)(e=>e.descriptionElementId),openOnHover:(0,m.createSelector)(e=>e.openOnHover),closeDelay:(0,m.createSelector)(e=>e.closeDelay),hasViewport:(0,m.createSelector)(e=>e.hasViewport)};class I extends v.ReactStore{constructor(e){const t={...(0,O.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new h.Timeout,triggerElements:new b.PopupTriggerMap},T)}setOpen=(e,t)=>{let n=t.reason===C.REASONS.triggerHover,o=t.reason===C.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===C.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},s=this.state.floatingRootContext.context.events;s?.emit("openchange",i);let a=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(x.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),S.flushSync(a)):a(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===C.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,R.useRefWithInit)(()=>new I(t)).current,o=e??n;return(0,E.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var y=e.i(67077),P=e.i(894621),A=e.i(892069);function M({props:e}){let{children:t,open:o,defaultOpen:d=!1,onOpenChange:f,onOpenChangeComplete:S,modal:v=!1,handle:m,triggerId:h,defaultTriggerId:R=null}=e,E=I.useStore(m?.store,{modal:v,open:d,openProp:o,activeTriggerId:R,triggerIdProp:h});(0,s.useOnFirstRender)(()=>{void 0===o&&!1===E.state.open&&!0===d&&E.update({open:!0,activeTriggerId:R})}),E.useControlledProp("openProp",o),E.useControlledProp("triggerIdProp",h);let O=E.useState("open"),b=E.useState("positionerElement"),x=E.useState("payload"),T=E.useState("openChangeReason");E.useContextCallback("onOpenChange",f),E.useContextCallback("onOpenChangeComplete",S);let{openMethod:k,triggerProps:w}=(0,A.useOpenInteractionType)(O);(0,P.useImplicitActiveTrigger)(E);let{forceUnmount:F}=(0,P.useOpenStateTransitions)(O,E,()=>{E.update({stickIfOpen:!0,openChangeReason:null})});(0,i.useScrollLock)(O&&!0===v&&T!==C.REASONS.triggerHover&&"touch"!==k,b),r.useEffect(()=>{O||E.context.stickIfOpenTimeout.clear()},[E,O]);let N=r.useCallback(e=>{let t=(0,y.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},t},[E]),j=r.useCallback(()=>{E.setOpen(!1,N(C.REASONS.imperativeAction))},[E,N]);r.useImperativeHandle(e.actionsRef,()=>({unmount:F,close:j}),[F,j]);let D=(0,c.useSyncedFloatingRootContext)({popupStore:E,onOpenChange:E.setOpen}),H=(0,a.useDismiss)(D,{outsidePressEvent:{mouse:"trap-focus"===v?"sloppy":"intentional",touch:"sloppy"}}),B=(0,u.useRole)(D),{getReferenceProps:L,getFloatingProps:V,getTriggerProps:U}=(0,l.useInteractions)([H,B]),G=r.useMemo(()=>L(w),[L,w]),K=r.useMemo(()=>U(w),[U,w]),_=r.useMemo(()=>V(),[V]);E.useSyncedValues({modal:v,openMethod:k,activeTriggerProps:G,inactiveTriggerProps:K,popupProps:_,floatingRootContext:D,nested:null!=(0,p.useFloatingParentNodeId)()});let z=r.useMemo(()=>({store:E}),[E]);return(0,n.jsx)(g.Provider,{value:z,children:"function"==typeof t?t({payload:x}):t})}var k=e.i(887642),w=e.i(282109),F=e.i(845756),N=e.i(581263),j=e.i(660272),D=e.i(430557),H=e.i(411657),B=e.i(207516),L=e.i(221732),V=e.i(682354),U=e.i(870541);let G=r.forwardRef(function(e,t){let{render:o,className:i,disabled:s=!1,nativeButton:a=!0,handle:u,payload:p,openOnHover:c=!1,delay:g=300,closeDelay:v=0,id:m,...h}=e,R=f(!0),E=u?.store??R?.store;if(!E)throw Error((0,d.default)(74));let O=(0,B.useBaseUiId)(m),b=E.useState("isTriggerActive",O),T=E.useState("floatingRootContext"),I=E.useState("isOpenedByTrigger",O),A=r.useRef(null),{registerTrigger:M,isMountedByThisTrigger:G}=(0,P.useTriggerDataForwarding)(O,A,E,{payload:p,disabled:s,openOnHover:c,closeDelay:v}),K=E.useState("openChangeReason"),_=E.useState("stickIfOpen"),z=E.useState("openMethod"),W=(0,H.useHoverReferenceInteraction)(T,{enabled:null!=T&&c&&("touch"!==z||K!==C.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,j.safePolygon)(),restMs:g,delay:{close:v},triggerElementRef:A,isActiveTrigger:b}),Y=(0,D.useClick)(T,{enabled:null!=T,stickIfOpen:_}),q=(0,l.useInteractions)([Y]),J=E.useState("triggerProps",G),{getButtonProps:Q,buttonRef:X}=(0,w.useButton)({disabled:s,native:a}),Z=r.useMemo(()=>({open:e=>e&&K===C.REASONS.triggerPress?F.pressableTriggerOpenStateMapping.open(e):F.triggerOpenStateMapping.open(e)}),[K]),$=(0,N.useRenderElement)("button",e,{state:{disabled:s,open:I},ref:[X,t,M,A],props:[q.getReferenceProps(),W,J,{[x.CLICK_TRIGGER_IDENTIFIER]:"",id:O},h,Q],stateAttributesMapping:Z}),ee=r.useRef(null),et=(0,k.useStableCallback)(e=>{S.flushSync(()=>{E.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,U.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,k.useStableCallback)(e=>{let t=E.select("positionerElement");if(t&&(0,U.isOutsideEvent)(e,t))E.context.beforeContentFocusGuardRef.current?.focus();else{S.flushSync(()=>{E.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,U.getTabbableAfterElement)(E.context.triggerFocusTargetRef.current||A.current);for(;null!==n&&(0,V.contains)(t,n);){let e=n;if((n=(0,U.getNextTabbable)(n))===e)break}n?.focus()}});return b?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(L.FocusGuard,{ref:ee,onFocus:et}),(0,n.jsx)(r.Fragment,{children:$},O),(0,n.jsx)(L.FocusGuard,{ref:E.context.triggerFocusTargetRef,onFocus:en})]}):(0,n.jsx)(r.Fragment,{children:$},O)});var K=e.i(888393);let _=r.createContext(void 0),z=r.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=f();return i.useState("mounted")||o?(0,n.jsx)(_.Provider,{value:o,children:(0,n.jsx)(K.FloatingPortal,{ref:t,...r})}):null});var W=e.i(831766),Y=e.i(804849);let q=r.createContext(void 0);function J(){let e=r.useContext(q);if(!e)throw Error((0,d.default)(46));return e}var Q=e.i(887943),X=e.i(72287),Z=e.i(412522),$=e.i(431362),ee=e.i(808754);let et=r.forwardRef(function(e,t){let{render:o,className:i,anchor:s,positionMethod:a="absolute",side:l="bottom",align:u="center",sideOffset:c=0,alignOffset:g=0,collisionBoundary:S="clipping-ancestors",collisionPadding:v=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:R=!1,collisionAvoidance:E=x.POPUP_COLLISION_AVOIDANCE,...O}=e,{store:b}=f(),T=function(){let e=r.useContext(_);if(void 0===e)throw Error((0,d.default)(45));return e}(),I=(0,p.useFloatingNodeId)(),y=b.useState("floatingRootContext"),P=b.useState("mounted"),A=b.useState("open"),M=b.useState("openChangeReason"),k=b.useState("activeTriggerElement"),w=b.useState("modal"),j=b.useState("positionerElement"),D=b.useState("instantType"),H=b.useState("transitionStatus"),B=b.useState("hasViewport"),L=r.useRef(null),V=(0,Z.useAnimationsFinished)(j,!1,!1),U=(0,Q.useAnchorPositioning)({anchor:s,floatingRootContext:y,positionMethod:a,mounted:P,side:l,sideOffset:c,align:u,alignOffset:g,arrowPadding:m,collisionBoundary:S,collisionPadding:v,sticky:h,disableAnchorTracking:R,keepMounted:T,nodeId:I,collisionAvoidance:E,adaptiveOrigin:B?$.adaptiveOrigin:void 0}),G=r.useMemo(()=>{let e={};return A||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...U.positionerStyles,...e}}},[A,P,U.positionerStyles]),K=r.useMemo(()=>({props:G,...U}),[G,U]),z=y.useState("domReferenceElement");(0,Y.useIsoLayoutEffect)(()=>{let e=L.current;if(z&&(L.current=z),e&&z&&z!==e){b.set("instantType",void 0);let e=new AbortController;return V(()=>{b.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[z,V,b]);let J={open:A,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:D},et=r.useCallback(e=>{b.set("positionerElement",e)},[b]),en=(0,N.useRenderElement)("div",e,{state:J,props:[K.props,(0,ee.getDisabledMountTransitionStyles)(H),O],ref:[t,et],stateAttributesMapping:F.popupStateMapping});return(0,n.jsxs)(q.Provider,{value:K,children:[P&&!0===w&&M!==C.REASONS.triggerHover&&(0,n.jsx)(X.InternalBackdrop,{ref:b.context.internalBackdropRef,inert:(0,W.inertValue)(!A),cutout:k}),(0,n.jsx)(p.FloatingNode,{id:I,children:en})]})});var en=e.i(92615),eo=e.i(11931),er=e.i(511980),ei=e.i(809058),es=e.i(504068),ea=e.i(197920),el=e.i(196368);let eu=r.createContext(void 0);function ep(e){let{value:t,children:o}=e;return(0,n.jsx)(eu.Provider,{value:t,children:o})}let ec={...F.popupStateMapping,...ei.transitionStatusMapping},ed=r.forwardRef(function(e,t){let{className:o,render:i,initialFocus:s,finalFocus:a,...l}=e,{store:u}=f(),p=J(),c=null!=(0,el.useToolbarRootContext)(!0),{context:d,hasClosePart:g}=function(){let[e,t]=r.useState(0),n=(0,k.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),S=u.useState("open"),v=u.useState("openMethod"),m=u.useState("instantType"),h=u.useState("transitionStatus"),R=u.useState("popupProps"),E=u.useState("titleElementId"),O=u.useState("descriptionElementId"),b=u.useState("modal"),x=u.useState("mounted"),T=u.useState("openChangeReason"),I=u.useState("activeTriggerElement"),y=u.useState("floatingRootContext");(0,es.useOpenChangeComplete)({open:S,ref:u.context.popupRef,onComplete(){S&&u.context.onOpenChangeComplete?.(!0)}});let P=u.useState("disabled"),A=u.useState("openOnHover"),M=u.useState("closeDelay");(0,er.useHoverFloatingInteraction)(y,{enabled:A&&!P,closeDelay:M});let w=void 0===s?function(e){return"touch"!==e||u.context.popupRef.current}:s,F={open:S,side:p.side,align:p.align,instant:m,transitionStatus:h},j=r.useCallback(e=>{u.set("popupElement",e)},[u]),D=(0,N.useRenderElement)("div",e,{state:F,ref:[t,u.context.popupRef,j],props:[R,{"aria-labelledby":E,"aria-describedby":O,onKeyDown(e){c&&ea.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ee.getDisabledMountTransitionStyles)(h),l],stateAttributesMapping:ec});return(0,n.jsx)(eo.FloatingFocusManager,{context:y,openInteractionType:v,modal:!1!==b&&g,disabled:!x||T===C.REASONS.triggerHover,initialFocus:w,returnFocus:a,restoreFocus:"popup",previousFocusableElement:(0,en.isHTMLElement)(I)?I:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(ep,{value:d,children:D})})}),eg=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),{arrowRef:a,side:l,align:u,arrowUncentered:p,arrowStyles:c}=J();return(0,N.useRenderElement)("div",e,{state:{open:s,side:l,align:u,uncentered:p},ref:[t,a],props:[{style:c,"aria-hidden":!0},r],stateAttributesMapping:F.popupStateMapping})}),ef={...F.popupStateMapping,...ei.transitionStatusMapping},eS=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),a=i.useState("mounted"),l=i.useState("transitionStatus"),u=i.useState("openChangeReason");return(0,N.useRenderElement)("div",e,{state:{open:s,transitionStatus:l},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:u===C.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},r],stateAttributesMapping:ef})}),ev=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("titleElementId",s),()=>{i.set("titleElementId",void 0)}),[i,s]),(0,N.useRenderElement)("h2",e,{ref:t,props:[{id:s},r]})}),em=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",s),()=>{i.set("descriptionElementId",void 0)}),[i,s]),(0,N.useRenderElement)("p",e,{ref:t,props:[{id:s},r]})}),eh=r.forwardRef(function(e,t){let n,{render:o,className:i,disabled:s=!1,nativeButton:a=!0,...l}=e,{buttonRef:u,getButtonProps:p}=(0,w.useButton)({disabled:s,focusableWhenDisabled:!1,native:a}),{store:c}=f();return n=r.useContext(eu),(0,Y.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,N.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){c.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,p]})}),eR=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eE=e.i(203667);let eC={activationDirection:e=>e?{"data-activation-direction":e}:null},eO=r.forwardRef(function(e,t){let{render:n,className:o,children:r,...i}=e,{store:s}=f(),{side:a}=J(),l=s.useState("instantType"),{children:u,state:p}=(0,eE.usePopupViewport)({store:s,side:a,cssVars:eR,children:r}),c={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:l};return(0,N.useRenderElement)("div",e,{state:c,ref:t,props:[i,{children:u}],stateAttributesMapping:eC})});class eb{constructor(){this.store=new I}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,d.default)(80,e));this.store.setOpen(!0,(0,y.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,eg,"Backdrop",0,eS,"Close",0,eh,"Description",0,em,"Handle",0,eb,"Popup",0,ed,"Portal",0,z,"Positioner",0,et,"Root",0,function(e){return f(!0)?(0,n.jsx)(M,{props:e}):(0,n.jsx)(p.FloatingTree,{children:(0,n.jsx)(M,{props:e})})},"Title",0,ev,"Trigger",0,G,"Viewport",0,eO,"createHandle",0,function(){return new eb}],107641);var ex=e.i(107641),ex=ex;e.s(["Popover",0,function({...e}){return(0,n.jsx)(ex.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...a}){return(0,n.jsx)(ex.Portal,{children:(0,n.jsx)(ex.Positioner,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:(0,n.jsx)(ex.Popup,{"data-slot":"popover-content",className:(0,o.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(ex.Trigger,{"data-slot":"popover-trigger",...e})}],337822)}]);
|