@saluzi/saluzi-edu 0.2.76 → 0.2.78
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/dist/cli.js +532 -532
- package/dist/rcs-web/assets/{AdminPanel-omPQCGJ3.js → AdminPanel-CeJbvp1y.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/ArtifactView-gpttL9Bm.js → dist/rcs-web/assets/ArtifactView-DG4NEABr.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/ArtifactsGallery-EA1PTLFb.js → dist/rcs-web/assets/ArtifactsGallery-yaOX7eyz.js} +12 -12
- package/{packages/remote-control-server/web/dist/assets/Claim-CcQDX4V4.js → dist/rcs-web/assets/Claim-DcVDtUJW.js} +1 -1
- package/dist/rcs-web/assets/{Dashboard-jAe3pVfO.js → Dashboard--liQacnK.js} +1 -1
- package/dist/rcs-web/assets/{Join-z-lybdiB.js → Join-CTPWU5Mr.js} +1 -1
- package/dist/rcs-web/assets/{Login-1UQ7Tsno.js → Login-CAo4xQR6.js} +1 -1
- package/dist/rcs-web/assets/{Register-PLzfxLKv.js → Register-D1K9V2Cc.js} +1 -1
- package/dist/rcs-web/assets/{SessionDetail-DLqYCAa1.js → SessionDetail-Dlhtkeg9.js} +1 -1
- package/dist/rcs-web/assets/{SessionVisibilityBadge-YYJU7rsU.js → SessionVisibilityBadge-DSBB4hQt.js} +1 -1
- package/dist/rcs-web/assets/{Setup-eKrRj_Cj.js → Setup-BVVR5jB-.js} +1 -1
- package/dist/rcs-web/assets/{ShareLanding-ChhDZDz-.js → ShareLanding-0IFIhCg-.js} +1 -1
- package/dist/rcs-web/assets/{TeamCreate-yh6hBIjW.js → TeamCreate-B9t2hKQE.js} +1 -1
- package/dist/rcs-web/assets/{TeamDetail-V_nG-5yy.js → TeamDetail-CKsvDnnZ.js} +1 -1
- package/dist/rcs-web/assets/{TeamList-8zi79KWI.js → TeamList-Db3o2sd5.js} +1 -1
- package/dist/rcs-web/assets/{TeamSettings-D7NuRKfx.js → TeamSettings-DmElPUhc.js} +1 -1
- package/dist/rcs-web/assets/{UserSearchInput-CH6mJNkv.js → UserSearchInput-Dclznuqh.js} +1 -1
- package/dist/rcs-web/assets/{UserSettings--GHQVpb4.js → UserSettings-CAYmVaEN.js} +1 -1
- package/dist/rcs-web/assets/{arc-CUQyGoJx.js → arc-CdhVjXrk.js} +1 -1
- package/dist/rcs-web/assets/{architectureDiagram-3BPJPVTR-BnfpiA35.js → architectureDiagram-3BPJPVTR-CdUftizr.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-C7EIx897.js → dist/rcs-web/assets/blockDiagram-GPEHLZMM-B3EHysEn.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/c4Diagram-AAUBKEIU-Bh0NqvyH.js → dist/rcs-web/assets/c4Diagram-AAUBKEIU-DHfYdMEZ.js} +1 -1
- package/dist/rcs-web/assets/channel-CI-PMv7a.js +1 -0
- package/dist/rcs-web/assets/{chunk-2J33WTMH-vhUevvwB.js → chunk-2J33WTMH-EhksSUIa.js} +1 -1
- package/dist/rcs-web/assets/{chunk-4BX2VUAB-a8pkgzR3.js → chunk-4BX2VUAB-CSwxuVKu.js} +1 -1
- package/dist/rcs-web/assets/{chunk-55IACEB6-BmhX93YQ.js → chunk-55IACEB6-DlOkG9fU.js} +1 -1
- package/dist/rcs-web/assets/{chunk-727SXJPM-rp7DpY1W.js → chunk-727SXJPM-1CxczIsf.js} +1 -1
- package/dist/rcs-web/assets/{chunk-AQP2D5EJ-BrDELb0G.js → chunk-AQP2D5EJ-DfYiA4nH.js} +1 -1
- package/dist/rcs-web/assets/{chunk-FMBD7UC4-BPZWn7Kb.js → chunk-FMBD7UC4-Bw5pfdve.js} +1 -1
- package/dist/rcs-web/assets/{chunk-ND2GUHAM-CoV8irx0.js → chunk-ND2GUHAM-DdcvT253.js} +1 -1
- package/dist/rcs-web/assets/{chunk-QZHKN3VN-BpciLCM_.js → chunk-QZHKN3VN-HMrF81oZ.js} +1 -1
- package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-B3XAB9kf.js +1 -0
- package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-B3XAB9kf.js +1 -0
- package/dist/rcs-web/assets/{code-block-IT6T5CEO-Dh84ckFz.js → code-block-IT6T5CEO-D_icBEKo.js} +1 -1
- package/dist/rcs-web/assets/{copy-igOaIr5S.js → copy-C6MF0GiS.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/cose-bilkent-S5V4N54A-Bw_9kvTI.js → dist/rcs-web/assets/cose-bilkent-S5V4N54A-BbpIuAyZ.js} +1 -1
- package/dist/rcs-web/assets/{dagre-BM42HDAG-oVTffvvP.js → dagre-BM42HDAG-BBlOWeV0.js} +1 -1
- package/dist/rcs-web/assets/{diagram-2AECGRRQ-DxxksyrF.js → diagram-2AECGRRQ-DMwCFj3q.js} +1 -1
- package/dist/rcs-web/assets/{diagram-5GNKFQAL-CZEaxtlq.js → diagram-5GNKFQAL-CHRU_l-Z.js} +1 -1
- package/dist/rcs-web/assets/{diagram-KO2AKTUF-CtIuIGuB.js → diagram-KO2AKTUF-RqWISfzc.js} +1 -1
- package/dist/rcs-web/assets/{diagram-LMA3HP47-COKmFGX6.js → diagram-LMA3HP47-DcIfgVzs.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/diagram-OG6HWLK6-DYC75Fm_.js → dist/rcs-web/assets/diagram-OG6HWLK6-Cpnv-7XF.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/dialog-B6hfoHoV.js → dist/rcs-web/assets/dialog-y9t3OG8S.js} +1 -1
- package/dist/rcs-web/assets/{erDiagram-TEJ5UH35-DEWI8GgR.js → erDiagram-TEJ5UH35-yRmna5lr.js} +1 -1
- package/dist/rcs-web/assets/{flowDiagram-I6XJVG4X-By2_StrC.js → flowDiagram-I6XJVG4X-_7eLAsX0.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-CcPteQpG.js → dist/rcs-web/assets/ganttDiagram-6RSMTGT7-CFxlByao.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/gitGraphDiagram-PVQCEYII-Cp2tMBlS.js → dist/rcs-web/assets/gitGraphDiagram-PVQCEYII-CIJGDuu2.js} +1 -1
- package/dist/rcs-web/assets/{infoDiagram-5YYISTIA-BaWOi6s4.js → infoDiagram-5YYISTIA-DL26mYqN.js} +1 -1
- package/dist/rcs-web/assets/{ishikawaDiagram-YF4QCWOH-Br83XOr_.js → ishikawaDiagram-YF4QCWOH-ClTbQIgQ.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/journeyDiagram-JHISSGLW-DKrA-8Jk.js → dist/rcs-web/assets/journeyDiagram-JHISSGLW-BDSHXfMK.js} +1 -1
- package/dist/rcs-web/assets/{kanban-definition-UN3LZRKU-CbeuuPnx.js → kanban-definition-UN3LZRKU-bjaNmDdS.js} +1 -1
- package/dist/rcs-web/assets/{linear-CL-QXo7Y.js → linear-HZJSCbjO.js} +1 -1
- package/dist/rcs-web/assets/{main-UQZcxx36.js → main-BtriBTyr.js} +3 -3
- package/{packages/remote-control-server/web/dist/assets/mermaid-VLURNSYL-B7QjpmY_.js → dist/rcs-web/assets/mermaid-VLURNSYL-CrXtMOXy.js} +4 -4
- package/dist/rcs-web/assets/{mermaid.core-BkSyhnnE.js → mermaid.core-DTbrYqLV.js} +5 -5
- package/{packages/remote-control-server/web/dist/assets/mindmap-definition-RKZ34NQL-DxjIAXqd.js → dist/rcs-web/assets/mindmap-definition-RKZ34NQL-9ifL4_5N.js} +1 -1
- package/dist/rcs-web/assets/{pieDiagram-4H26LBE5-pDbW_3Yv.js → pieDiagram-4H26LBE5-BSN1xh9l.js} +1 -1
- package/dist/rcs-web/assets/{quadrantDiagram-W4KKPZXB-awYUqDtP.js → quadrantDiagram-W4KKPZXB-BOGclSnl.js} +1 -1
- package/dist/rcs-web/assets/{requirementDiagram-4Y6WPE33-Ec01jxw-.js → requirementDiagram-4Y6WPE33-BQiBrIyS.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-Bqv5meJU.js → dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-Cmmlv8nQ.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/sequenceDiagram-3UESZ5HK-4IX2ixGT.js → dist/rcs-web/assets/sequenceDiagram-3UESZ5HK-CGqCUPei.js} +1 -1
- package/dist/rcs-web/assets/{stateDiagram-AJRCARHV-DZKpy9jY.js → stateDiagram-AJRCARHV-Crly1oy6.js} +1 -1
- package/dist/rcs-web/assets/{stateDiagram-v2-BHNVJYJU-CO21iBgQ.js → stateDiagram-v2-BHNVJYJU-DgXehnSh.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-CrjfBCmq.js → dist/rcs-web/assets/timeline-definition-PNZ67QCA-BCjEDIqH.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/vennDiagram-CIIHVFJN-BgS-fFrR.js → dist/rcs-web/assets/vennDiagram-CIIHVFJN-BdyNi3pq.js} +1 -1
- package/dist/rcs-web/assets/{wardleyDiagram-YWT4CUSO-CKwkA8N2.js → wardleyDiagram-YWT4CUSO-DG3vTRnZ.js} +1 -1
- package/dist/rcs-web/assets/{xychartDiagram-2RQKCTM6-DOQU-oX2.js → xychartDiagram-2RQKCTM6-ZIOBxK1C.js} +1 -1
- package/dist/rcs-web/index.html +1 -1
- package/package.json +1 -1
- package/packages/remote-control-server/web/dist/assets/{AdminPanel-omPQCGJ3.js → AdminPanel-CeJbvp1y.js} +1 -1
- package/{dist/rcs-web/assets/ArtifactView-gpttL9Bm.js → packages/remote-control-server/web/dist/assets/ArtifactView-DG4NEABr.js} +1 -1
- package/{dist/rcs-web/assets/ArtifactsGallery-EA1PTLFb.js → packages/remote-control-server/web/dist/assets/ArtifactsGallery-yaOX7eyz.js} +12 -12
- package/{dist/rcs-web/assets/Claim-CcQDX4V4.js → packages/remote-control-server/web/dist/assets/Claim-DcVDtUJW.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Dashboard-jAe3pVfO.js → Dashboard--liQacnK.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Join-z-lybdiB.js → Join-CTPWU5Mr.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Login-1UQ7Tsno.js → Login-CAo4xQR6.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Register-PLzfxLKv.js → Register-D1K9V2Cc.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{SessionDetail-DLqYCAa1.js → SessionDetail-Dlhtkeg9.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{SessionVisibilityBadge-YYJU7rsU.js → SessionVisibilityBadge-DSBB4hQt.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Setup-eKrRj_Cj.js → Setup-BVVR5jB-.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{ShareLanding-ChhDZDz-.js → ShareLanding-0IFIhCg-.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamCreate-yh6hBIjW.js → TeamCreate-B9t2hKQE.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamDetail-V_nG-5yy.js → TeamDetail-CKsvDnnZ.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamList-8zi79KWI.js → TeamList-Db3o2sd5.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamSettings-D7NuRKfx.js → TeamSettings-DmElPUhc.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{UserSearchInput-CH6mJNkv.js → UserSearchInput-Dclznuqh.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{UserSettings--GHQVpb4.js → UserSettings-CAYmVaEN.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{arc-CUQyGoJx.js → arc-CdhVjXrk.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{architectureDiagram-3BPJPVTR-BnfpiA35.js → architectureDiagram-3BPJPVTR-CdUftizr.js} +1 -1
- package/{dist/rcs-web/assets/blockDiagram-GPEHLZMM-C7EIx897.js → packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-B3EHysEn.js} +1 -1
- package/{dist/rcs-web/assets/c4Diagram-AAUBKEIU-Bh0NqvyH.js → packages/remote-control-server/web/dist/assets/c4Diagram-AAUBKEIU-DHfYdMEZ.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/channel-CI-PMv7a.js +1 -0
- package/packages/remote-control-server/web/dist/assets/{chunk-2J33WTMH-vhUevvwB.js → chunk-2J33WTMH-EhksSUIa.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-4BX2VUAB-a8pkgzR3.js → chunk-4BX2VUAB-CSwxuVKu.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-55IACEB6-BmhX93YQ.js → chunk-55IACEB6-DlOkG9fU.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-727SXJPM-rp7DpY1W.js → chunk-727SXJPM-1CxczIsf.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-AQP2D5EJ-BrDELb0G.js → chunk-AQP2D5EJ-DfYiA4nH.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-FMBD7UC4-BPZWn7Kb.js → chunk-FMBD7UC4-Bw5pfdve.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-ND2GUHAM-CoV8irx0.js → chunk-ND2GUHAM-DdcvT253.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-QZHKN3VN-BpciLCM_.js → chunk-QZHKN3VN-HMrF81oZ.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-B3XAB9kf.js +1 -0
- package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-B3XAB9kf.js +1 -0
- package/packages/remote-control-server/web/dist/assets/{code-block-IT6T5CEO-Dh84ckFz.js → code-block-IT6T5CEO-D_icBEKo.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{copy-igOaIr5S.js → copy-C6MF0GiS.js} +1 -1
- package/{dist/rcs-web/assets/cose-bilkent-S5V4N54A-Bw_9kvTI.js → packages/remote-control-server/web/dist/assets/cose-bilkent-S5V4N54A-BbpIuAyZ.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{dagre-BM42HDAG-oVTffvvP.js → dagre-BM42HDAG-BBlOWeV0.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-2AECGRRQ-DxxksyrF.js → diagram-2AECGRRQ-DMwCFj3q.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-5GNKFQAL-CZEaxtlq.js → diagram-5GNKFQAL-CHRU_l-Z.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-KO2AKTUF-CtIuIGuB.js → diagram-KO2AKTUF-RqWISfzc.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-LMA3HP47-COKmFGX6.js → diagram-LMA3HP47-DcIfgVzs.js} +1 -1
- package/{dist/rcs-web/assets/diagram-OG6HWLK6-DYC75Fm_.js → packages/remote-control-server/web/dist/assets/diagram-OG6HWLK6-Cpnv-7XF.js} +1 -1
- package/{dist/rcs-web/assets/dialog-B6hfoHoV.js → packages/remote-control-server/web/dist/assets/dialog-y9t3OG8S.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{erDiagram-TEJ5UH35-DEWI8GgR.js → erDiagram-TEJ5UH35-yRmna5lr.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{flowDiagram-I6XJVG4X-By2_StrC.js → flowDiagram-I6XJVG4X-_7eLAsX0.js} +1 -1
- package/{dist/rcs-web/assets/ganttDiagram-6RSMTGT7-CcPteQpG.js → packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-CFxlByao.js} +1 -1
- package/{dist/rcs-web/assets/gitGraphDiagram-PVQCEYII-Cp2tMBlS.js → packages/remote-control-server/web/dist/assets/gitGraphDiagram-PVQCEYII-CIJGDuu2.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{infoDiagram-5YYISTIA-BaWOi6s4.js → infoDiagram-5YYISTIA-DL26mYqN.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{ishikawaDiagram-YF4QCWOH-Br83XOr_.js → ishikawaDiagram-YF4QCWOH-ClTbQIgQ.js} +1 -1
- package/{dist/rcs-web/assets/journeyDiagram-JHISSGLW-DKrA-8Jk.js → packages/remote-control-server/web/dist/assets/journeyDiagram-JHISSGLW-BDSHXfMK.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{kanban-definition-UN3LZRKU-CbeuuPnx.js → kanban-definition-UN3LZRKU-bjaNmDdS.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{linear-CL-QXo7Y.js → linear-HZJSCbjO.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{main-UQZcxx36.js → main-BtriBTyr.js} +3 -3
- package/{dist/rcs-web/assets/mermaid-VLURNSYL-B7QjpmY_.js → packages/remote-control-server/web/dist/assets/mermaid-VLURNSYL-CrXtMOXy.js} +4 -4
- package/packages/remote-control-server/web/dist/assets/{mermaid.core-BkSyhnnE.js → mermaid.core-DTbrYqLV.js} +5 -5
- package/{dist/rcs-web/assets/mindmap-definition-RKZ34NQL-DxjIAXqd.js → packages/remote-control-server/web/dist/assets/mindmap-definition-RKZ34NQL-9ifL4_5N.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{pieDiagram-4H26LBE5-pDbW_3Yv.js → pieDiagram-4H26LBE5-BSN1xh9l.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{quadrantDiagram-W4KKPZXB-awYUqDtP.js → quadrantDiagram-W4KKPZXB-BOGclSnl.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{requirementDiagram-4Y6WPE33-Ec01jxw-.js → requirementDiagram-4Y6WPE33-BQiBrIyS.js} +1 -1
- package/{dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-Bqv5meJU.js → packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-Cmmlv8nQ.js} +1 -1
- package/{dist/rcs-web/assets/sequenceDiagram-3UESZ5HK-4IX2ixGT.js → packages/remote-control-server/web/dist/assets/sequenceDiagram-3UESZ5HK-CGqCUPei.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{stateDiagram-AJRCARHV-DZKpy9jY.js → stateDiagram-AJRCARHV-Crly1oy6.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{stateDiagram-v2-BHNVJYJU-CO21iBgQ.js → stateDiagram-v2-BHNVJYJU-DgXehnSh.js} +1 -1
- package/{dist/rcs-web/assets/timeline-definition-PNZ67QCA-CrjfBCmq.js → packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-BCjEDIqH.js} +1 -1
- package/{dist/rcs-web/assets/vennDiagram-CIIHVFJN-BgS-fFrR.js → packages/remote-control-server/web/dist/assets/vennDiagram-CIIHVFJN-BdyNi3pq.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{wardleyDiagram-YWT4CUSO-CKwkA8N2.js → wardleyDiagram-YWT4CUSO-DG3vTRnZ.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{xychartDiagram-2RQKCTM6-DOQU-oX2.js → xychartDiagram-2RQKCTM6-ZIOBxK1C.js} +1 -1
- package/packages/remote-control-server/web/dist/index.html +1 -1
- package/dist/rcs-web/assets/channel-B93czv4n.js +0 -1
- package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-N7OHu7DO.js +0 -1
- package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-N7OHu7DO.js +0 -1
- package/packages/remote-control-server/web/dist/assets/channel-B93czv4n.js +0 -1
- package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-N7OHu7DO.js +0 -1
- package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-N7OHu7DO.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as c,aD as te,a4 as W,a$ as fe,ak as ye,an as be,aQ as me,b6 as ke,S as Y,aZ as G,aC as Ee,J as _e,au as Se,az as le,L as ce}from"./mermaid.core-
|
|
1
|
+
import{b as c,aD as te,a4 as W,a$ as fe,ak as ye,an as be,aQ as me,b6 as ke,S as Y,aZ as G,aC as Ee,J as _e,au as Se,az as le,L as ce}from"./mermaid.core-DTbrYqLV.js";import{g as Ne}from"./chunk-FMBD7UC4-Bw5pfdve.js";import"./shiki-mEP5vQQu.js";import"./vendor-DE_-CLIE.js";import"./mermaid-VLURNSYL-CrXtMOXy.js";import"./main-BtriBTyr.js";import"./motion-BILbV7YQ.js";var $=(function(){var t=c(function(k,s,n,a){for(n=n||{},a=k.length;a--;n[k[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],M=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],U=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:M}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(P,[2,14],{7:U,11:j}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:M}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:U,11:j}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Q=m.yylloc;e.push(Q);var de=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||m.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var _,R,v,Z,F={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((_===null||typeof _>"u")&&(_=ae()),v=B[R]&&B[R][_]),typeof v>"u"||!v.length||!v[0]){var q="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");m.showPosition?q="Parse error on line "+(z+1)+`:
|
|
2
2
|
`+m.showPosition()+`
|
|
3
3
|
Expecting `+K.join(", ")+", got '"+(this.terminals_[_]||_)+"'":q="Parse error on line "+(z+1)+": Unexpected "+(_==re?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(q,{text:m.match,token:this.terminals_[_]||_,line:m.yylineno,loc:Q,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+_);switch(v[0]){case 1:a.push(_),u.push(m.yytext),e.push(m.yylloc),a.push(v[1]),_=null,ie=m.yyleng,l=m.yytext,z=m.yylineno,Q=m.yylloc;break;case 2:if(I=this.productions_[v[1]][1],F.$=u[u.length-I],F._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(F._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Z=this.performAction.apply(F,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Z<"u")return Z;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(F.$),e.push(F._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},y=(function(){var k={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as j,ar as p,x as w,as as k,at as q}from"./mermaid.core-
|
|
1
|
+
import{G as j,ar as p,x as w,as as k,at as q}from"./mermaid.core-DTbrYqLV.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,b as F,a as x,f as z}from"./defaultLocale-CrowFXzY.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function B(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===B?n:I,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function I(){return 0}function P(n){return n===null?NaN:+n}const V=R(M),$=V.right;R(P).center;const G=Math.sqrt(50),O=Math.sqrt(10),T=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=G?10:f>=O?5:f>=T?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function C(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function E(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=d(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=d(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function d(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function N(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=N(u,e),f=t(a,f)):(e=N(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=N(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=$(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=d,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=E(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),x(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return z(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return C(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,E as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid-VLURNSYL-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid-VLURNSYL-CrXtMOXy.js","assets/shiki-mEP5vQQu.js","assets/vendor-DE_-CLIE.js","assets/Dashboard--liQacnK.js","assets/workerType-Bd-zteMi.js","assets/SessionVisibilityBadge-DSBB4hQt.js","assets/dialog-y9t3OG8S.js","assets/motion-BILbV7YQ.js","assets/SessionDetail-Dlhtkeg9.js","assets/ArtifactsGallery-yaOX7eyz.js","assets/copy-C6MF0GiS.js","assets/UserSearchInput-Dclznuqh.js","assets/ShareLanding-0IFIhCg-.js","assets/ArtifactView-DG4NEABr.js","assets/Claim-DcVDtUJW.js","assets/Login-CAo4xQR6.js","assets/Register-D1K9V2Cc.js","assets/Setup-BVVR5jB-.js","assets/Join-CTPWU5Mr.js","assets/UserSettings-CAYmVaEN.js","assets/TeamList-Db3o2sd5.js","assets/TeamCreate-B9t2hKQE.js","assets/TeamDetail-CKsvDnnZ.js","assets/TeamSettings-DmElPUhc.js","assets/AdminPanel-CeJbvp1y.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var uc=Object.defineProperty;var dc=(e,t,n)=>t in e?uc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var oe=(e,t,n)=>dc(e,typeof t!="symbol"?t+"":t,n);import{e as p,a as it,j as u,R as Zr,r as Gs,b as fc,c as Jr,d as mc}from"./vendor-DE_-CLIE.js";import{_ as Ae}from"./shiki-mEP5vQQu.js";import{m as pc}from"./motion-BILbV7YQ.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function Vs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Vs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ks(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vs(e))&&(r&&(r+=" "),r+=t);return r}const hc=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},gc=(e,t)=>({classGroupId:e,validator:t}),qs=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Mn="-",Bo=[],xc="arbitrary..",vc=e=>{const t=yc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return bc(a);const i=a.split(Mn),m=i[0]===""&&i.length>1?1:0;return Ys(i,m,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const m=r[a],f=n[a];return m?f?hc(f,m):m:f||Bo}return n[a]||Bo}}},Ys=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const f=Ys(e,t+1,s);if(f)return f}const a=n.validators;if(a===null)return;const i=t===0?e.join(Mn):e.slice(t).join(Mn),m=a.length;for(let f=0;f<m;f++){const l=a[f];if(l.validator(i))return l.classGroupId}},bc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?xc+r:void 0})(),yc=e=>{const{theme:t,classGroups:n}=e;return wc(n,t)},wc=(e,t)=>{const n=qs();for(const r in e){const o=e[r];eo(o,n,r,t)}return n},eo=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const a=e[s];Cc(a,t,n,r)}},Cc=(e,t,n,r)=>{if(typeof e=="string"){Sc(e,t,n);return}if(typeof e=="function"){kc(e,t,n,r);return}Ec(e,t,n,r)},Sc=(e,t,n)=>{const r=e===""?t:Xs(t,e);r.classGroupId=n},kc=(e,t,n,r)=>{if(_c(e)){eo(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(gc(n,e))},Ec=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let a=0;a<s;a++){const[i,m]=o[a];eo(m,Xs(t,i),n,r)}},Xs=(e,t)=>{let n=e;const r=t.split(Mn),o=r.length;for(let s=0;s<o;s++){const a=r[s];let i=n.nextPart.get(a);i||(i=qs(),n.nextPart.set(a,i)),n=i}return n},_c=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ac=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return o(s,a),a},set(s,a){s in n?n[s]=a:o(s,a)}}},Pr="!",Ho=":",jc=[],Wo=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Tc=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,m=0,f;const l=o.length;for(let v=0;v<l;v++){const C=o[v];if(a===0&&i===0){if(C===Ho){s.push(o.slice(m,v)),m=v+1;continue}if(C==="/"){f=v;continue}}C==="["?a++:C==="]"?a--:C==="("?i++:C===")"&&i--}const c=s.length===0?o:o.slice(m);let d=c,h=!1;c.endsWith(Pr)?(d=c.slice(0,-1),h=!0):c.startsWith(Pr)&&(d=c.slice(1),h=!0);const g=f&&f>m?f-m:void 0;return Wo(s,h,d,g)};if(t){const o=t+Ho,s=r;r=a=>a.startsWith(o)?s(a.slice(o.length)):Wo(jc,!1,a,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Rc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const a=n[s],i=a[0]==="[",m=t.has(a);i||m?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},Nc=e=>({cache:Ac(e.cacheSize),parseClassName:Tc(e),sortModifiers:Rc(e),postfixLookupClassGroupIds:Ic(e),...vc(e)}),Ic=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Mc=/\s+/,Pc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:a}=t,i=[],m=e.trim().split(Mc);let f="";for(let l=m.length-1;l>=0;l-=1){const c=m[l],{isExternal:d,modifiers:h,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:C}=n(c);if(d){f=c+(f.length>0?" "+f:f);continue}let b=!!C,_;if(b){const j=v.substring(0,C);_=r(j);const x=_&&a[_]?r(v):void 0;x&&x!==_&&(_=x,b=!1)}else _=r(v);if(!_){if(!b){f=c+(f.length>0?" "+f:f);continue}if(_=r(v),!_){f=c+(f.length>0?" "+f:f);continue}b=!1}const A=h.length===0?"":h.length===1?h[0]:s(h).join(":"),E=g?A+Pr:A,L=E+_;if(i.indexOf(L)>-1)continue;i.push(L);const k=o(_,b);for(let j=0;j<k.length;++j){const x=k[j];i.push(E+x)}f=c+(f.length>0?" "+f:f)}return f},Oc=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Qs(n))&&(o&&(o+=" "),o+=r);return o},Qs=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qs(e[r]))&&(n&&(n+=" "),n+=t);return n},Dc=(e,...t)=>{let n,r,o,s;const a=m=>{const f=t.reduce((l,c)=>c(l),e());return n=Nc(f),r=n.cache.get,o=n.cache.set,s=i,i(m)},i=m=>{const f=r(m);if(f)return f;const l=Pc(m,n);return o(m,l),l};return s=a,(...m)=>s(Oc(...m))},Lc=[],Ee=e=>{const t=n=>n[e]||Lc;return t.isThemeGetter=!0,t},Zs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Js=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Fc=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,$c=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Uc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Bc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,at=e=>Fc.test(e),se=e=>!!e&&!Number.isNaN(Number(e)),He=e=>!!e&&Number.isInteger(Number(e)),fr=e=>e.endsWith("%")&&se(e.slice(0,-1)),Qe=e=>$c.test(e),ea=()=>!0,Wc=e=>Uc.test(e)&&!zc.test(e),to=()=>!1,Gc=e=>Bc.test(e),Vc=e=>Hc.test(e),Kc=e=>!X(e)&&!Q(e),qc=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Yc=e=>pt(e,ra,to),X=e=>Zs.test(e),yt=e=>pt(e,oa,Wc),Go=e=>pt(e,ru,se),Xc=e=>pt(e,aa,ea),Qc=e=>pt(e,sa,to),Vo=e=>pt(e,ta,to),Zc=e=>pt(e,na,Vc),wn=e=>pt(e,ia,Gc),Q=e=>Js.test(e),en=e=>Tt(e,oa),Jc=e=>Tt(e,sa),Ko=e=>Tt(e,ta),eu=e=>Tt(e,ra),tu=e=>Tt(e,na),Cn=e=>Tt(e,ia,!0),nu=e=>Tt(e,aa,!0),pt=(e,t,n)=>{const r=Zs.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Tt=(e,t,n=!1)=>{const r=Js.exec(e);return r?r[1]?t(r[1]):n:!1},ta=e=>e==="position"||e==="percentage",na=e=>e==="image"||e==="url",ra=e=>e==="length"||e==="size"||e==="bg-size",oa=e=>e==="length",ru=e=>e==="number",sa=e=>e==="family-name",aa=e=>e==="number"||e==="weight",ia=e=>e==="shadow",ou=()=>{const e=Ee("color"),t=Ee("font"),n=Ee("text"),r=Ee("font-weight"),o=Ee("tracking"),s=Ee("leading"),a=Ee("breakpoint"),i=Ee("container"),m=Ee("spacing"),f=Ee("radius"),l=Ee("shadow"),c=Ee("inset-shadow"),d=Ee("text-shadow"),h=Ee("drop-shadow"),g=Ee("blur"),v=Ee("perspective"),C=Ee("aspect"),b=Ee("ease"),_=Ee("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...E(),Q,X],k=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],x=()=>[Q,X,m],y=()=>[at,"full","auto",...x()],T=()=>[He,"none","subgrid",Q,X],M=()=>["auto",{span:["full",He,Q,X]},He,Q,X],O=()=>[He,"auto",Q,X],F=()=>["auto","min","max","fr",Q,X],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],S=()=>["auto",...x()],w=()=>[at,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],B=()=>[at,"screen","full","dvw","lvw","svw","min","max","fit",...x()],P=()=>[at,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],U=()=>[e,Q,X],q=()=>[...E(),Ko,Vo,{position:[Q,X]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",eu,Yc,{size:[Q,X]}],$=()=>[fr,en,yt],R=()=>["","none","full",f,Q,X],H=()=>["",se,en,yt],G=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[se,fr,Ko,Vo],ne=()=>["","none",g,Q,X],Z=()=>["none",se,Q,X],re=()=>["none",se,Q,X],ue=()=>[se,Q,X],be=()=>[at,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qe],breakpoint:[Qe],color:[ea],container:[Qe],"drop-shadow":[Qe],ease:["in","out","in-out"],font:[Kc],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qe],shadow:[Qe],spacing:["px",se],text:[Qe],"text-shadow":[Qe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",at,X,Q,C]}],container:["container"],"container-type":[{"@container":["","normal","size",Q,X]}],"container-named":[qc],columns:[{columns:[se,X,Q,i]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:y()}],"inset-x":[{"inset-x":y()}],"inset-y":[{"inset-y":y()}],start:[{"inset-s":y(),start:y()}],end:[{"inset-e":y(),end:y()}],"inset-bs":[{"inset-bs":y()}],"inset-be":[{"inset-be":y()}],top:[{top:y()}],right:[{right:y()}],bottom:[{bottom:y()}],left:[{left:y()}],visibility:["visible","invisible","collapse"],z:[{z:[He,"auto",Q,X]}],basis:[{basis:[at,"full","auto",i,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[se,at,"auto","initial","none",X]}],grow:[{grow:["",se,Q,X]}],shrink:[{shrink:["",se,Q,X]}],order:[{order:[He,"first","last","none",Q,X]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mbs:[{mbs:S()}],mbe:[{mbe:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:w()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[i,"screen",...w()]}],"min-w":[{"min-w":[i,"screen","none",...w()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...w()]}],h:[{h:["screen","lh",...w()]}],"min-h":[{"min-h":["screen","lh","none",...w()]}],"max-h":[{"max-h":["screen","lh",...w()]}],"font-size":[{text:["base",n,en,yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,nu,Xc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fr,X]}],"font-family":[{font:[Jc,Qc,t]}],"font-features":[{"font-features":[X]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Q,X]}],"line-clamp":[{"line-clamp":[se,"none",Q,Go]}],leading:[{leading:[s,...x()]}],"list-image":[{"list-image":["none",Q,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Q,X]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[se,"from-font","auto",Q,yt]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[se,"auto",Q,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"tab-size":[{tab:[He,Q,X]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q,X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},He,Q,X],radial:["",Q,X],conic:[He,Q,X]},tu,Zc]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[se,Q,X]}],"outline-w":[{outline:["",se,en,yt]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",l,Cn,wn]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",c,Cn,wn]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[se,yt]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",d,Cn,wn]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[se,Q,X]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[se]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[Q,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[se]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Q,X]}],filter:[{filter:["","none",Q,X]}],blur:[{blur:ne()}],brightness:[{brightness:[se,Q,X]}],contrast:[{contrast:[se,Q,X]}],"drop-shadow":[{"drop-shadow":["","none",h,Cn,wn]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",se,Q,X]}],"hue-rotate":[{"hue-rotate":[se,Q,X]}],invert:[{invert:["",se,Q,X]}],saturate:[{saturate:[se,Q,X]}],sepia:[{sepia:["",se,Q,X]}],"backdrop-filter":[{"backdrop-filter":["","none",Q,X]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[se,Q,X]}],"backdrop-contrast":[{"backdrop-contrast":[se,Q,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",se,Q,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[se,Q,X]}],"backdrop-invert":[{"backdrop-invert":["",se,Q,X]}],"backdrop-opacity":[{"backdrop-opacity":[se,Q,X]}],"backdrop-saturate":[{"backdrop-saturate":[se,Q,X]}],"backdrop-sepia":[{"backdrop-sepia":["",se,Q,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Q,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[se,"initial",Q,X]}],ease:[{ease:["linear","initial",b,Q,X]}],delay:[{delay:[se,Q,X]}],animate:[{animate:["none",_,Q,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Q,X]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Z()}],"rotate-x":[{"rotate-x":Z()}],"rotate-y":[{"rotate-y":Z()}],"rotate-z":[{"rotate-z":Z()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[Q,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":["translate-none"],zoom:[{zoom:[He,Q,X]}],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q,X]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":U()}],"scrollbar-track-color":[{"scrollbar-track":U()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q,X]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[se,en,yt,Go]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},su=Dc(ou);function ee(...e){return su(Ks(e))}function au(e){if(!e)return"";const t=String(e),n=document.createElement("div");return n.textContent=t,n.innerHTML}function Eb(e){return e?new Date(e*1e3).toLocaleString():""}function _b(e){return e==="archived"||e==="inactive"}function Ab(e,t){if(!e)return"";const n=String(e);return n.length>t?n.slice(0,t)+"...":n}function iu(e){e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0"));return[t.slice(0,4).join(""),t.slice(4,6).join(""),t.slice(6,8).join(""),t.slice(8,10).join(""),t.slice(10,16).join("")].join("-")}function jb(){const e=globalThis.crypto;if(e&&typeof e.randomUUID=="function")return e.randomUUID();if(!e||typeof e.getRandomValues!="function")throw new Error("crypto.getRandomValues is required to generate message UUIDs");const t=new Uint8Array(16);return e.getRandomValues(t),iu(t)}function Tb(e){if(!e||typeof e!="object")return!1;if(e.status==="conversation_cleared")return!0;const t=e.raw;return!!t&&typeof t=="object"&&t.status==="conversation_cleared"}const lu=/^Remote Control connecting(?:…|\.\.\.)$/;function Rb(e){return typeof e=="string"&&lu.test(e.trim())}/**
|
|
3
3
|
* @license lucide-react v0.555.0 - ISC
|
|
4
4
|
*
|
|
@@ -223,7 +223,7 @@ self.addEventListener('message', async (e) => {
|
|
|
223
223
|
self.postMessage({ error: e.message + '\\n' + e.stack, id })
|
|
224
224
|
}
|
|
225
225
|
})
|
|
226
|
-
`;let Cr;function Ih(e,t){return new Promise(((n,r)=>{Cr||(Cr=(function(a){const i=[];return i.push(a),URL.createObjectURL(new Blob(i))})(Nh));const o=new Worker(Cr);o.addEventListener("message",(function(a){if(t.signal&&t.signal.aborted)o.terminate();else if(a.data.progress===void 0){if(a.data.error)return r(new Error(a.data.error)),void o.terminate();n(a.data.file),o.terminate()}else t.onProgress(a.data.progress)})),o.addEventListener("error",r),t.signal&&t.signal.addEventListener("abort",(()=>{r(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function je(e,t){return new Promise((function(n,r){let o,s,a,i,m,f;if(o={...t},a=0,{onProgress:i}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,m=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=h=>{a=h,typeof i=="function"&&i(a)},!(e instanceof Blob||e instanceof Rh))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(f=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!m||typeof Worker!="function"||f)return Ss(e,o).then((function(h){try{return s=h,d.call(this)}catch(g){return r(g)}}).bind(this),r);var l=(function(){try{return d.call(this)}catch(h){return r(h)}}).bind(this),c=function(h){try{return Ss(e,o).then((function(g){try{return s=g,l()}catch(v){return r(v)}}),r)}catch(g){return r(g)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Ih(e,o).then((function(h){try{return s=h,l()}catch{return c()}}),c)}catch{c()}function d(){try{s.name=e.name,s.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(s=Hi(e,s))}catch{}return n(s)}}))}je.getDataUrlFromFile=Ki,je.getFilefromDataUrl=Ao,je.loadImage=qi,je.drawImageInCanvas=Xi,je.drawFileInCanvas=Wn,je.canvasToFile=Gn,je.getExifOrientation=Qi,je.handleMaxWidthOrHeight=Zi,je.followExifOrientation=Ji,je.cleanupCanvasMemory=Ge,je.isAutoOrientationInBrowser=$t,je.approximateBelowMaximumCanvasSizeOfBrowser=Yi,je.copyExifWithoutOrientation=Hi,je.getBrowserName=St,je.version="2.0.2";var Mh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ht=Mh.reduce((e,t)=>{const n=ba(`Primitive.${t}`),r=p.forwardRef((o,s)=>{const{asChild:a,...i}=o,m=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(m,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ph=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Oh="VisuallyHidden",el=p.forwardRef((e,t)=>u.jsx(he.span,{...e,ref:t,style:{...Ph,...e.style}}));el.displayName=Oh;var Dh=el,[or]=nt("Tooltip",[Xt]),sr=Xt(),tl="TooltipProvider",Lh=700,Vr="tooltip.open",[Fh,jo]=or(tl),nl=e=>{const{__scopeTooltip:t,delayDuration:n=Lh,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=p.useRef(!0),i=p.useRef(!1),m=p.useRef(0);return p.useEffect(()=>{const f=m.current;return()=>window.clearTimeout(f)},[]),u.jsx(Fh,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(m.current),a.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:p.useCallback(f=>{i.current=f},[]),disableHoverableContent:o,children:s})};nl.displayName=tl;var ln="Tooltip",[$h,vn]=or(ln),rl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,m=jo(ln,e.__scopeTooltip),f=sr(t),[l,c]=p.useState(null),d=Re(),h=p.useRef(0),g=a??m.disableHoverableContent,v=i??m.delayDuration,C=p.useRef(!1),[b,_]=ut({prop:r,defaultProp:o??!1,onChange:j=>{j?(m.onOpen(),document.dispatchEvent(new CustomEvent(Vr))):m.onClose(),s==null||s(j)},caller:ln}),A=p.useMemo(()=>b?C.current?"delayed-open":"instant-open":"closed",[b]),E=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C.current=!1,_(!0)},[_]),L=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,_(!1)},[_]),k=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{C.current=!0,_(!0),h.current=0},v)},[v,_]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(po,{...f,children:u.jsx($h,{scope:t,contentId:d,open:b,stateAttribute:A,trigger:l,onTriggerChange:c,onTriggerEnter:p.useCallback(()=>{m.isOpenDelayedRef.current?k():E()},[m.isOpenDelayedRef,k,E]),onTriggerLeave:p.useCallback(()=>{g?L():(window.clearTimeout(h.current),h.current=0)},[L,g]),onOpen:E,onClose:L,disableHoverableContent:g,children:n})})};rl.displayName=ln;var Kr="TooltipTrigger",ol=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vn(Kr,n),s=jo(Kr,n),a=sr(n),i=p.useRef(null),m=ke(t,i,o.onTriggerChange),f=p.useRef(!1),l=p.useRef(!1),c=p.useCallback(()=>f.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),u.jsx(Jn,{asChild:!0,...a,children:u.jsx(he.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:m,onPointerMove:te(e.onPointerMove,d=>{d.pointerType!=="touch"&&!l.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:te(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:te(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:te(e.onBlur,o.onClose),onClick:te(e.onClick,o.onClose)})})});ol.displayName=Kr;var To="TooltipPortal",[Uh,zh]=or(To,{forceMount:void 0}),sl=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=vn(To,t);return u.jsx(Uh,{scope:t,forceMount:n,children:u.jsx(Oe,{present:n||s.open,children:u.jsx(pn,{asChild:!0,container:o,children:r})})})};sl.displayName=To;var Gt="TooltipContent",al=p.forwardRef((e,t)=>{const n=zh(Gt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=vn(Gt,e.__scopeTooltip);return u.jsx(Oe,{present:r||a.open,children:a.disableHoverableContent?u.jsx(il,{side:o,...s,ref:t}):u.jsx(Bh,{side:o,...s,ref:t})})}),Bh=p.forwardRef((e,t)=>{const n=vn(Gt,e.__scopeTooltip),r=jo(Gt,e.__scopeTooltip),o=p.useRef(null),s=ke(t,o),[a,i]=p.useState(null),{trigger:m,onClose:f}=n,l=o.current,{onPointerInTransitChange:c}=r,d=p.useCallback(()=>{i(null),c(!1)},[c]),h=p.useCallback((g,v)=>{const C=g.currentTarget,b={x:g.clientX,y:g.clientY},_=Vh(b,C.getBoundingClientRect()),A=Kh(b,_),E=qh(v.getBoundingClientRect()),L=Xh([...A,...E]);i(L),c(!0)},[c]);return p.useEffect(()=>()=>d(),[d]),p.useEffect(()=>{if(m&&l){const g=C=>h(C,l),v=C=>h(C,m);return m.addEventListener("pointerleave",g),l.addEventListener("pointerleave",v),()=>{m.removeEventListener("pointerleave",g),l.removeEventListener("pointerleave",v)}}},[m,l,h,d]),p.useEffect(()=>{if(a){const g=v=>{const C=v.target,b={x:v.clientX,y:v.clientY},_=(m==null?void 0:m.contains(C))||(l==null?void 0:l.contains(C)),A=!Yh(b,a);_?d():A&&(d(),f())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[m,l,a,f,d]),u.jsx(il,{...e,ref:s})}),[Hh,Wh]=or(ln,{isInside:!1}),Gh=$d("TooltipContent"),il=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,m=vn(Gt,n),f=sr(n),{onClose:l}=m;return p.useEffect(()=>(document.addEventListener(Vr,l),()=>document.removeEventListener(Vr,l)),[l]),p.useEffect(()=>{if(m.trigger){const c=d=>{const h=d.target;h!=null&&h.contains(m.trigger)&&l()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[m.trigger,l]),u.jsx(fn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c=>c.preventDefault(),onDismiss:l,children:u.jsxs(ho,{"data-state":m.stateAttribute,...f,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(Gh,{children:r}),u.jsx(Hh,{scope:n,isInside:!0,children:u.jsx(Dh,{id:m.contentId,role:"tooltip",children:o||r})})]})})});al.displayName=Gt;var ll="TooltipArrow",cl=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=sr(n);return Wh(ll,n).isInside?null:u.jsx(go,{...o,...r,ref:t})});cl.displayName=ll;function Vh(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Kh(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qh(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Yh(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],m=t[a],f=i.x,l=i.y,c=m.x,d=m.y;l>r!=d>r&&n<(c-f)*(r-l)/(d-l)+f&&(o=!o)}return o}function Xh(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Qh(t)}function Qh(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Zh=nl,Jh=rl,eg=ol,tg=sl,ng=al,rg=cl;function og({delayDuration:e=0,...t}){return u.jsx(Zh,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function sg({...e}){return u.jsx(og,{children:u.jsx(Jh,{"data-slot":"tooltip",...e})})}function ag({...e}){return u.jsx(eg,{"data-slot":"tooltip-trigger",...e})}function ig({className:e,sideOffset:t=0,children:n,...r}){return u.jsx(tg,{children:u.jsxs(ng,{"data-slot":"tooltip-content",sideOffset:t,className:ee("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,u.jsx(rg,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const lg=p.lazy(()=>Ae(()=>import("./mermaid-VLURNSYL-B7QjpmY_.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>({default:e.Streamdown})));p.createContext(null);const Ro=p.memo(({className:e,children:t,...n})=>u.jsx(p.Suspense,{fallback:u.jsx("div",{className:ee("whitespace-pre-wrap break-words",e),children:t}),children:u.jsx(lg,{className:ee("size-full break-words [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...n,children:t})}),(e,t)=>e.children===t.children);Ro.displayName="MessageResponse";var ar="Collapsible",[cg]=nt(ar),[ug,No]=cg(ar),ul=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:a,...i}=e,[m,f]=ut({prop:r,defaultProp:o??!1,onChange:a,caller:ar});return u.jsx(ug,{scope:n,disabled:s,contentId:Re(),open:m,onOpenToggle:p.useCallback(()=>f(l=>!l),[f]),children:u.jsx(he.div,{"data-state":Mo(m),"data-disabled":s?"":void 0,...i,ref:t})})});ul.displayName=ar;var dl="CollapsibleTrigger",fl=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=No(dl,n);return u.jsx(he.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Mo(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:te(e.onClick,o.onOpenToggle)})});fl.displayName=dl;var Io="CollapsibleContent",ml=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=No(Io,e.__scopeCollapsible);return u.jsx(Oe,{present:n||o.open,children:({present:s})=>u.jsx(dg,{...r,ref:t,present:s})})});ml.displayName=Io;var dg=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,a=No(Io,n),[i,m]=p.useState(r),f=p.useRef(null),l=ke(t,f),c=p.useRef(0),d=c.current,h=p.useRef(0),g=h.current,v=a.open||i,C=p.useRef(v),b=p.useRef(void 0);return p.useEffect(()=>{const _=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(_)},[]),Ze(()=>{const _=f.current;if(_){b.current=b.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const A=_.getBoundingClientRect();c.current=A.height,h.current=A.width,C.current||(_.style.transitionDuration=b.current.transitionDuration,_.style.animationName=b.current.animationName),m(r)}},[a.open,r]),u.jsx(he.div,{"data-state":Mo(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...s,ref:l,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:v&&o})});function Mo(e){return e?"open":"closed"}var fg=ul;function mg({...e}){return u.jsx(fg,{"data-slot":"collapsible",...e})}function pg({...e}){return u.jsx(fl,{"data-slot":"collapsible-trigger",...e})}function hg({...e}){return u.jsx(ml,{"data-slot":"collapsible-content",...e})}const gg=({children:e,as:t="p",className:n,duration:r=2})=>{const o=pc.create(t);return u.jsx(o,{animate:{opacity:[.5,1,.5]},className:ee("relative inline-block text-muted-foreground",n),transition:{repeat:Number.POSITIVE_INFINITY,duration:r,ease:"easeInOut"},children:e})},xg=p.memo(gg),pl=p.createContext(null),vg=()=>{const e=p.useContext(pl);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},bg=1e3,yg=1e3,hl=p.memo(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:o,duration:s,children:a,...i})=>{const[m,f]=ut({prop:n,defaultProp:r,onChange:o}),[l,c]=ut({prop:s,defaultProp:void 0}),[d,h]=p.useState(!1),[g,v]=p.useState(null);p.useEffect(()=>{t?g===null&&v(Date.now()):g!==null&&(c(Math.ceil((Date.now()-g)/yg)),v(null))},[t,g,c]);const C=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;p.useEffect(()=>{if(!C&&r&&!t&&m&&!d){const _=setTimeout(()=>{f(!1),h(!0)},bg);return()=>clearTimeout(_)}},[t,m,r,f,d,C]);const b=_=>{f(_)};return u.jsx(pl.Provider,{value:{isStreaming:t,isOpen:m??!1,setIsOpen:f,duration:l},children:u.jsx(mg,{className:ee("not-prose mb-4",e),onOpenChange:b,open:m,...i,children:a})})}),wg=(e,t)=>e||t===0?u.jsx(xg,{duration:1,children:"Thinking..."}):t===void 0?u.jsx("p",{children:"Thought for a few seconds"}):u.jsxs("p",{children:["Thought for ",t," seconds"]}),gl=p.memo(({className:e,children:t,getThinkingMessage:n=wg,...r})=>{const{isStreaming:o,isOpen:s,duration:a}=vg();return u.jsx(pg,{className:ee("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...r,children:t??u.jsxs(u.Fragment,{children:[u.jsx(xu,{className:"size-4"}),n(o,a),u.jsx(Kt,{className:ee("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),xl=p.memo(({className:e,children:t,...n})=>u.jsx(hg,{className:ee("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:t}));hl.displayName="Reasoning";gl.displayName="ReasoningTrigger";xl.displayName="ReasoningContent";const Sr=200;function Cg({entry:e}){const[t,n]=p.useState(!1),[r,o]=p.useState(!1),s=p.useRef(null),a=p.useCallback(()=>{const i=s.current;i&&o(i.scrollHeight>Sr+4)},[]);return p.useEffect(()=>{a()},[a,e.content]),u.jsx("div",{className:"flex justify-end",children:u.jsxs("div",{className:"max-w-[85%] sm:max-w-[70%]",children:[e.images&&e.images.length>0&&u.jsx("div",{className:"flex flex-wrap gap-2 mb-2 justify-end",children:e.images.map((i,m)=>u.jsx(kg,{image:i},m))}),e.attachments&&e.attachments.length>0&&u.jsx("div",{className:"flex flex-wrap gap-2 mb-2 justify-end",children:e.attachments.map((i,m)=>u.jsx(Eg,{attachment:i},m))}),e.content&&u.jsxs("div",{className:"relative rounded-2xl rounded-br-md bg-user-bubble border border-user-bubble-border overflow-hidden",children:[u.jsx("div",{ref:s,className:ee("px-5 py-3 text-sm text-text-primary whitespace-pre-wrap font-display leading-relaxed",!t&&r&&`max-h-[${Sr}px]`),style:!t&&r?{maxHeight:`${Sr}px`}:void 0,children:au(e.content)}),!t&&r&&u.jsx("div",{className:"absolute bottom-0 inset-x-0 flex flex-col items-center pt-8 bg-gradient-to-t from-user-bubble via-user-bubble/80 to-transparent",children:u.jsxs("button",{type:"button",onClick:()=>n(!0),className:"flex items-center gap-1 px-3 py-1 rounded-full text-xs font-display font-medium text-text-secondary hover:bg-brand/10 transition-colors",children:[u.jsx("span",{children:"展开"}),u.jsx(Kt,{className:"h-3 w-3"})]})})]})]})})}function Sg({entry:e,isStreaming:t}){return u.jsxs("div",{className:"flex gap-4 items-start",children:[u.jsx("div",{className:"w-8 h-8 rounded-lg bg-brand/8 flex items-center justify-center flex-shrink-0 mt-0.5 overflow-hidden",children:u.jsx("img",{src:"/code/pony.svg",alt:"Saluzi",width:28,height:28,className:"object-contain",draggable:!1})}),u.jsxs("div",{className:"flex-1 min-w-0 space-y-4",children:[u.jsx("span",{className:"text-sm font-semibold text-text-primary font-display",children:"Saluzi"}),e.chunks.map((n,r)=>{if(n.type==="thought"){const o=r===e.chunks.length-1,s=t&&o;return u.jsxs(hl,{isStreaming:s,children:[u.jsx(gl,{}),u.jsx(xl,{children:u.jsx("div",{className:"text-sm text-text-secondary leading-relaxed",children:n.text})})]},r)}return u.jsx("div",{className:"message-content text-text-primary leading-[1.75]",children:u.jsx(Ro,{children:n.text})},r)})]})]})}function kg({image:e}){const t=`data:${e.mimeType};base64,${e.data}`;return u.jsx("button",{type:"button",className:"rounded-lg overflow-hidden border border-border hover:border-brand/40 transition-colors cursor-pointer",onClick:()=>{const n=window.open("");n&&n.document.write(`<img src="${t}" style="max-width:100%;max-height:100%" />`)},children:u.jsx("img",{src:t,alt:"Uploaded image",className:"h-20 w-20 object-cover"})})}function Eg({attachment:e}){const[t,n]=p.useState(!1),r=(()=>{switch(e.kind){case"text":return u.jsx(Bt,{className:"h-4 w-4"});case"table":return u.jsx(ro,{className:"h-4 w-4"});case"directory":return u.jsx(no,{className:"h-4 w-4"});default:return u.jsx(Bt,{className:"h-4 w-4"})}})(),o=e.size!=null?_g(e.size):null,s=e.kind==="directory"&&e.files?e.files.length:null,a=!!e.textContent;return u.jsxs("div",{className:"min-w-[160px] max-w-[300px]",children:[u.jsxs("button",{type:"button",onClick:()=>a&&n(i=>!i),className:ee("w-full flex items-center gap-2 rounded-lg border border-border bg-surface-1/50 px-3 py-2 text-xs text-text-secondary",a?"hover:border-brand/40 hover:bg-surface-1 cursor-pointer":"cursor-default"),children:[r,u.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[u.jsx("div",{className:"truncate font-mono text-text-primary",title:e.name,children:e.name}),u.jsxs("div",{className:"text-[10px] text-text-muted",children:[o&&u.jsx("span",{children:o}),o&&s!=null&&u.jsx("span",{children:" · "}),s!=null&&u.jsxs("span",{children:[s," 个文件"]})]})]}),a&&u.jsx(Kt,{className:ee("h-3.5 w-3.5 flex-shrink-0 transition-transform",t&&"rotate-180")})]}),t&&a&&u.jsx("div",{className:"mt-1 rounded-lg border border-border bg-surface-2 p-3 max-h-[300px] overflow-auto",children:u.jsx("pre",{className:"text-[11px] text-text-secondary font-mono whitespace-pre-wrap break-words",children:e.textContent})})]})}function _g(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Ag(e){switch(e){case"allow_once":case"allow_always":return"default";case"reject_once":case"reject_always":return"destructive";default:return"outline"}}function jg(e){switch(e){case"allow_once":case"allow_always":return u.jsx(un,{className:"size-4"});case"reject_once":case"reject_always":return u.jsx(dn,{className:"size-4"});default:return null}}function Tg({requestId:e,options:t,onRespond:n,className:r}){const o=s=>{n(e,s.optionId,s.kind)};return u.jsxs("div",{className:ee("p-3 border-t border-warning-border/30 bg-warning-bg/50",r),children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(ma,{className:"size-4 text-warning-text"}),u.jsx("span",{className:"text-xs font-medium text-warning-text",children:"Permission Required"})]}),u.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(s=>u.jsxs(Rt,{variant:Ag(s.kind),size:"sm",onClick:()=>o(s),className:"gap-1.5",children:[jg(s.kind),s.name]},s.optionId))})]})}const ks=1e3,Rg=1e6;function kr({filePath:e,oldString:t,newString:n,label:r}){const o=Ig(t,n),s=_s(o,"add"),a=_s(o,"remove"),i=o.length>ks?o.slice(0,ks):o,m=o.length-i.length;return u.jsxs("div",{className:"rounded-md border border-border overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-2 border-b border-border bg-surface-2 px-2 py-1",children:[u.jsx("span",{className:"min-w-0 max-w-[60%] truncate font-mono text-[11px] text-text-primary",title:e,children:e}),s>0&&u.jsxs("span",{className:"font-mono text-[10px] text-green-600 dark:text-green-400",children:["+",s]}),a>0&&u.jsxs("span",{className:"font-mono text-[10px] text-red-600 dark:text-red-400",children:["-",a]}),r&&u.jsx("span",{className:"ml-auto flex-shrink-0 font-display text-[10px] text-text-muted",children:r})]}),u.jsxs("div",{role:"list","aria-label":`${e} 的改动预览,${s} 行新增,${a} 行删除`,className:"max-h-48 overflow-auto bg-surface-1/50 py-1 font-mono text-xs",children:[i.map((f,l)=>u.jsx(Ng,{line:f},l)),m>0&&u.jsxs("div",{className:"px-5 py-0.5 font-display text-[10px] text-text-muted",children:["… 还有 ",m," 行未显示"]})]})]})}function Ng({line:e}){const t=e.type==="add"?"+":e.type==="remove"?"-":" ";return u.jsxs("div",{role:e.type==="context"?void 0:"listitem","aria-label":e.type==="add"?`新增行: ${e.text}`:e.type==="remove"?`删除行: ${e.text}`:void 0,className:ee("flex px-1 leading-relaxed",e.type==="add"&&"bg-green-500/10 text-green-700 dark:text-green-300",e.type==="remove"&&"bg-red-500/10 text-red-700 dark:text-red-300",e.type==="context"&&"text-text-secondary"),children:[u.jsx("span",{className:"w-4 flex-shrink-0 select-none text-center",children:t}),u.jsx("span",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words",children:e.text.length>0?e.text:" "})]})}function Es(e){return e.length===0?[]:e.split(`
|
|
226
|
+
`;let Cr;function Ih(e,t){return new Promise(((n,r)=>{Cr||(Cr=(function(a){const i=[];return i.push(a),URL.createObjectURL(new Blob(i))})(Nh));const o=new Worker(Cr);o.addEventListener("message",(function(a){if(t.signal&&t.signal.aborted)o.terminate();else if(a.data.progress===void 0){if(a.data.error)return r(new Error(a.data.error)),void o.terminate();n(a.data.file),o.terminate()}else t.onProgress(a.data.progress)})),o.addEventListener("error",r),t.signal&&t.signal.addEventListener("abort",(()=>{r(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function je(e,t){return new Promise((function(n,r){let o,s,a,i,m,f;if(o={...t},a=0,{onProgress:i}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,m=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=h=>{a=h,typeof i=="function"&&i(a)},!(e instanceof Blob||e instanceof Rh))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(f=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!m||typeof Worker!="function"||f)return Ss(e,o).then((function(h){try{return s=h,d.call(this)}catch(g){return r(g)}}).bind(this),r);var l=(function(){try{return d.call(this)}catch(h){return r(h)}}).bind(this),c=function(h){try{return Ss(e,o).then((function(g){try{return s=g,l()}catch(v){return r(v)}}),r)}catch(g){return r(g)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Ih(e,o).then((function(h){try{return s=h,l()}catch{return c()}}),c)}catch{c()}function d(){try{s.name=e.name,s.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(s=Hi(e,s))}catch{}return n(s)}}))}je.getDataUrlFromFile=Ki,je.getFilefromDataUrl=Ao,je.loadImage=qi,je.drawImageInCanvas=Xi,je.drawFileInCanvas=Wn,je.canvasToFile=Gn,je.getExifOrientation=Qi,je.handleMaxWidthOrHeight=Zi,je.followExifOrientation=Ji,je.cleanupCanvasMemory=Ge,je.isAutoOrientationInBrowser=$t,je.approximateBelowMaximumCanvasSizeOfBrowser=Yi,je.copyExifWithoutOrientation=Hi,je.getBrowserName=St,je.version="2.0.2";var Mh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ht=Mh.reduce((e,t)=>{const n=ba(`Primitive.${t}`),r=p.forwardRef((o,s)=>{const{asChild:a,...i}=o,m=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(m,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ph=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Oh="VisuallyHidden",el=p.forwardRef((e,t)=>u.jsx(he.span,{...e,ref:t,style:{...Ph,...e.style}}));el.displayName=Oh;var Dh=el,[or]=nt("Tooltip",[Xt]),sr=Xt(),tl="TooltipProvider",Lh=700,Vr="tooltip.open",[Fh,jo]=or(tl),nl=e=>{const{__scopeTooltip:t,delayDuration:n=Lh,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=p.useRef(!0),i=p.useRef(!1),m=p.useRef(0);return p.useEffect(()=>{const f=m.current;return()=>window.clearTimeout(f)},[]),u.jsx(Fh,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(m.current),a.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:p.useCallback(f=>{i.current=f},[]),disableHoverableContent:o,children:s})};nl.displayName=tl;var ln="Tooltip",[$h,vn]=or(ln),rl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,m=jo(ln,e.__scopeTooltip),f=sr(t),[l,c]=p.useState(null),d=Re(),h=p.useRef(0),g=a??m.disableHoverableContent,v=i??m.delayDuration,C=p.useRef(!1),[b,_]=ut({prop:r,defaultProp:o??!1,onChange:j=>{j?(m.onOpen(),document.dispatchEvent(new CustomEvent(Vr))):m.onClose(),s==null||s(j)},caller:ln}),A=p.useMemo(()=>b?C.current?"delayed-open":"instant-open":"closed",[b]),E=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C.current=!1,_(!0)},[_]),L=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,_(!1)},[_]),k=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{C.current=!0,_(!0),h.current=0},v)},[v,_]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(po,{...f,children:u.jsx($h,{scope:t,contentId:d,open:b,stateAttribute:A,trigger:l,onTriggerChange:c,onTriggerEnter:p.useCallback(()=>{m.isOpenDelayedRef.current?k():E()},[m.isOpenDelayedRef,k,E]),onTriggerLeave:p.useCallback(()=>{g?L():(window.clearTimeout(h.current),h.current=0)},[L,g]),onOpen:E,onClose:L,disableHoverableContent:g,children:n})})};rl.displayName=ln;var Kr="TooltipTrigger",ol=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vn(Kr,n),s=jo(Kr,n),a=sr(n),i=p.useRef(null),m=ke(t,i,o.onTriggerChange),f=p.useRef(!1),l=p.useRef(!1),c=p.useCallback(()=>f.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),u.jsx(Jn,{asChild:!0,...a,children:u.jsx(he.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:m,onPointerMove:te(e.onPointerMove,d=>{d.pointerType!=="touch"&&!l.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:te(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:te(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:te(e.onBlur,o.onClose),onClick:te(e.onClick,o.onClose)})})});ol.displayName=Kr;var To="TooltipPortal",[Uh,zh]=or(To,{forceMount:void 0}),sl=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=vn(To,t);return u.jsx(Uh,{scope:t,forceMount:n,children:u.jsx(Oe,{present:n||s.open,children:u.jsx(pn,{asChild:!0,container:o,children:r})})})};sl.displayName=To;var Gt="TooltipContent",al=p.forwardRef((e,t)=>{const n=zh(Gt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=vn(Gt,e.__scopeTooltip);return u.jsx(Oe,{present:r||a.open,children:a.disableHoverableContent?u.jsx(il,{side:o,...s,ref:t}):u.jsx(Bh,{side:o,...s,ref:t})})}),Bh=p.forwardRef((e,t)=>{const n=vn(Gt,e.__scopeTooltip),r=jo(Gt,e.__scopeTooltip),o=p.useRef(null),s=ke(t,o),[a,i]=p.useState(null),{trigger:m,onClose:f}=n,l=o.current,{onPointerInTransitChange:c}=r,d=p.useCallback(()=>{i(null),c(!1)},[c]),h=p.useCallback((g,v)=>{const C=g.currentTarget,b={x:g.clientX,y:g.clientY},_=Vh(b,C.getBoundingClientRect()),A=Kh(b,_),E=qh(v.getBoundingClientRect()),L=Xh([...A,...E]);i(L),c(!0)},[c]);return p.useEffect(()=>()=>d(),[d]),p.useEffect(()=>{if(m&&l){const g=C=>h(C,l),v=C=>h(C,m);return m.addEventListener("pointerleave",g),l.addEventListener("pointerleave",v),()=>{m.removeEventListener("pointerleave",g),l.removeEventListener("pointerleave",v)}}},[m,l,h,d]),p.useEffect(()=>{if(a){const g=v=>{const C=v.target,b={x:v.clientX,y:v.clientY},_=(m==null?void 0:m.contains(C))||(l==null?void 0:l.contains(C)),A=!Yh(b,a);_?d():A&&(d(),f())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[m,l,a,f,d]),u.jsx(il,{...e,ref:s})}),[Hh,Wh]=or(ln,{isInside:!1}),Gh=$d("TooltipContent"),il=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,m=vn(Gt,n),f=sr(n),{onClose:l}=m;return p.useEffect(()=>(document.addEventListener(Vr,l),()=>document.removeEventListener(Vr,l)),[l]),p.useEffect(()=>{if(m.trigger){const c=d=>{const h=d.target;h!=null&&h.contains(m.trigger)&&l()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[m.trigger,l]),u.jsx(fn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c=>c.preventDefault(),onDismiss:l,children:u.jsxs(ho,{"data-state":m.stateAttribute,...f,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(Gh,{children:r}),u.jsx(Hh,{scope:n,isInside:!0,children:u.jsx(Dh,{id:m.contentId,role:"tooltip",children:o||r})})]})})});al.displayName=Gt;var ll="TooltipArrow",cl=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=sr(n);return Wh(ll,n).isInside?null:u.jsx(go,{...o,...r,ref:t})});cl.displayName=ll;function Vh(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Kh(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qh(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Yh(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],m=t[a],f=i.x,l=i.y,c=m.x,d=m.y;l>r!=d>r&&n<(c-f)*(r-l)/(d-l)+f&&(o=!o)}return o}function Xh(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Qh(t)}function Qh(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Zh=nl,Jh=rl,eg=ol,tg=sl,ng=al,rg=cl;function og({delayDuration:e=0,...t}){return u.jsx(Zh,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function sg({...e}){return u.jsx(og,{children:u.jsx(Jh,{"data-slot":"tooltip",...e})})}function ag({...e}){return u.jsx(eg,{"data-slot":"tooltip-trigger",...e})}function ig({className:e,sideOffset:t=0,children:n,...r}){return u.jsx(tg,{children:u.jsxs(ng,{"data-slot":"tooltip-content",sideOffset:t,className:ee("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,u.jsx(rg,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const lg=p.lazy(()=>Ae(()=>import("./mermaid-VLURNSYL-CrXtMOXy.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>({default:e.Streamdown})));p.createContext(null);const Ro=p.memo(({className:e,children:t,...n})=>u.jsx(p.Suspense,{fallback:u.jsx("div",{className:ee("whitespace-pre-wrap break-words",e),children:t}),children:u.jsx(lg,{className:ee("size-full break-words [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...n,children:t})}),(e,t)=>e.children===t.children);Ro.displayName="MessageResponse";var ar="Collapsible",[cg]=nt(ar),[ug,No]=cg(ar),ul=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:a,...i}=e,[m,f]=ut({prop:r,defaultProp:o??!1,onChange:a,caller:ar});return u.jsx(ug,{scope:n,disabled:s,contentId:Re(),open:m,onOpenToggle:p.useCallback(()=>f(l=>!l),[f]),children:u.jsx(he.div,{"data-state":Mo(m),"data-disabled":s?"":void 0,...i,ref:t})})});ul.displayName=ar;var dl="CollapsibleTrigger",fl=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=No(dl,n);return u.jsx(he.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Mo(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:te(e.onClick,o.onOpenToggle)})});fl.displayName=dl;var Io="CollapsibleContent",ml=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=No(Io,e.__scopeCollapsible);return u.jsx(Oe,{present:n||o.open,children:({present:s})=>u.jsx(dg,{...r,ref:t,present:s})})});ml.displayName=Io;var dg=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,a=No(Io,n),[i,m]=p.useState(r),f=p.useRef(null),l=ke(t,f),c=p.useRef(0),d=c.current,h=p.useRef(0),g=h.current,v=a.open||i,C=p.useRef(v),b=p.useRef(void 0);return p.useEffect(()=>{const _=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(_)},[]),Ze(()=>{const _=f.current;if(_){b.current=b.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const A=_.getBoundingClientRect();c.current=A.height,h.current=A.width,C.current||(_.style.transitionDuration=b.current.transitionDuration,_.style.animationName=b.current.animationName),m(r)}},[a.open,r]),u.jsx(he.div,{"data-state":Mo(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...s,ref:l,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:v&&o})});function Mo(e){return e?"open":"closed"}var fg=ul;function mg({...e}){return u.jsx(fg,{"data-slot":"collapsible",...e})}function pg({...e}){return u.jsx(fl,{"data-slot":"collapsible-trigger",...e})}function hg({...e}){return u.jsx(ml,{"data-slot":"collapsible-content",...e})}const gg=({children:e,as:t="p",className:n,duration:r=2})=>{const o=pc.create(t);return u.jsx(o,{animate:{opacity:[.5,1,.5]},className:ee("relative inline-block text-muted-foreground",n),transition:{repeat:Number.POSITIVE_INFINITY,duration:r,ease:"easeInOut"},children:e})},xg=p.memo(gg),pl=p.createContext(null),vg=()=>{const e=p.useContext(pl);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},bg=1e3,yg=1e3,hl=p.memo(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:o,duration:s,children:a,...i})=>{const[m,f]=ut({prop:n,defaultProp:r,onChange:o}),[l,c]=ut({prop:s,defaultProp:void 0}),[d,h]=p.useState(!1),[g,v]=p.useState(null);p.useEffect(()=>{t?g===null&&v(Date.now()):g!==null&&(c(Math.ceil((Date.now()-g)/yg)),v(null))},[t,g,c]);const C=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;p.useEffect(()=>{if(!C&&r&&!t&&m&&!d){const _=setTimeout(()=>{f(!1),h(!0)},bg);return()=>clearTimeout(_)}},[t,m,r,f,d,C]);const b=_=>{f(_)};return u.jsx(pl.Provider,{value:{isStreaming:t,isOpen:m??!1,setIsOpen:f,duration:l},children:u.jsx(mg,{className:ee("not-prose mb-4",e),onOpenChange:b,open:m,...i,children:a})})}),wg=(e,t)=>e||t===0?u.jsx(xg,{duration:1,children:"Thinking..."}):t===void 0?u.jsx("p",{children:"Thought for a few seconds"}):u.jsxs("p",{children:["Thought for ",t," seconds"]}),gl=p.memo(({className:e,children:t,getThinkingMessage:n=wg,...r})=>{const{isStreaming:o,isOpen:s,duration:a}=vg();return u.jsx(pg,{className:ee("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...r,children:t??u.jsxs(u.Fragment,{children:[u.jsx(xu,{className:"size-4"}),n(o,a),u.jsx(Kt,{className:ee("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),xl=p.memo(({className:e,children:t,...n})=>u.jsx(hg,{className:ee("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:t}));hl.displayName="Reasoning";gl.displayName="ReasoningTrigger";xl.displayName="ReasoningContent";const Sr=200;function Cg({entry:e}){const[t,n]=p.useState(!1),[r,o]=p.useState(!1),s=p.useRef(null),a=p.useCallback(()=>{const i=s.current;i&&o(i.scrollHeight>Sr+4)},[]);return p.useEffect(()=>{a()},[a,e.content]),u.jsx("div",{className:"flex justify-end",children:u.jsxs("div",{className:"max-w-[85%] sm:max-w-[70%]",children:[e.images&&e.images.length>0&&u.jsx("div",{className:"flex flex-wrap gap-2 mb-2 justify-end",children:e.images.map((i,m)=>u.jsx(kg,{image:i},m))}),e.attachments&&e.attachments.length>0&&u.jsx("div",{className:"flex flex-wrap gap-2 mb-2 justify-end",children:e.attachments.map((i,m)=>u.jsx(Eg,{attachment:i},m))}),e.content&&u.jsxs("div",{className:"relative rounded-2xl rounded-br-md bg-user-bubble border border-user-bubble-border overflow-hidden",children:[u.jsx("div",{ref:s,className:ee("px-5 py-3 text-sm text-text-primary whitespace-pre-wrap font-display leading-relaxed",!t&&r&&`max-h-[${Sr}px]`),style:!t&&r?{maxHeight:`${Sr}px`}:void 0,children:au(e.content)}),!t&&r&&u.jsx("div",{className:"absolute bottom-0 inset-x-0 flex flex-col items-center pt-8 bg-gradient-to-t from-user-bubble via-user-bubble/80 to-transparent",children:u.jsxs("button",{type:"button",onClick:()=>n(!0),className:"flex items-center gap-1 px-3 py-1 rounded-full text-xs font-display font-medium text-text-secondary hover:bg-brand/10 transition-colors",children:[u.jsx("span",{children:"展开"}),u.jsx(Kt,{className:"h-3 w-3"})]})})]})]})})}function Sg({entry:e,isStreaming:t}){return u.jsxs("div",{className:"flex gap-4 items-start",children:[u.jsx("div",{className:"w-8 h-8 rounded-lg bg-brand/8 flex items-center justify-center flex-shrink-0 mt-0.5 overflow-hidden",children:u.jsx("img",{src:"/code/pony.svg",alt:"Saluzi",width:28,height:28,className:"object-contain",draggable:!1})}),u.jsxs("div",{className:"flex-1 min-w-0 space-y-4",children:[u.jsx("span",{className:"text-sm font-semibold text-text-primary font-display",children:"Saluzi"}),e.chunks.map((n,r)=>{if(n.type==="thought"){const o=r===e.chunks.length-1,s=t&&o;return u.jsxs(hl,{isStreaming:s,children:[u.jsx(gl,{}),u.jsx(xl,{children:u.jsx("div",{className:"text-sm text-text-secondary leading-relaxed",children:n.text})})]},r)}return u.jsx("div",{className:"message-content text-text-primary leading-[1.75]",children:u.jsx(Ro,{children:n.text})},r)})]})]})}function kg({image:e}){const t=`data:${e.mimeType};base64,${e.data}`;return u.jsx("button",{type:"button",className:"rounded-lg overflow-hidden border border-border hover:border-brand/40 transition-colors cursor-pointer",onClick:()=>{const n=window.open("");n&&n.document.write(`<img src="${t}" style="max-width:100%;max-height:100%" />`)},children:u.jsx("img",{src:t,alt:"Uploaded image",className:"h-20 w-20 object-cover"})})}function Eg({attachment:e}){const[t,n]=p.useState(!1),r=(()=>{switch(e.kind){case"text":return u.jsx(Bt,{className:"h-4 w-4"});case"table":return u.jsx(ro,{className:"h-4 w-4"});case"directory":return u.jsx(no,{className:"h-4 w-4"});default:return u.jsx(Bt,{className:"h-4 w-4"})}})(),o=e.size!=null?_g(e.size):null,s=e.kind==="directory"&&e.files?e.files.length:null,a=!!e.textContent;return u.jsxs("div",{className:"min-w-[160px] max-w-[300px]",children:[u.jsxs("button",{type:"button",onClick:()=>a&&n(i=>!i),className:ee("w-full flex items-center gap-2 rounded-lg border border-border bg-surface-1/50 px-3 py-2 text-xs text-text-secondary",a?"hover:border-brand/40 hover:bg-surface-1 cursor-pointer":"cursor-default"),children:[r,u.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[u.jsx("div",{className:"truncate font-mono text-text-primary",title:e.name,children:e.name}),u.jsxs("div",{className:"text-[10px] text-text-muted",children:[o&&u.jsx("span",{children:o}),o&&s!=null&&u.jsx("span",{children:" · "}),s!=null&&u.jsxs("span",{children:[s," 个文件"]})]})]}),a&&u.jsx(Kt,{className:ee("h-3.5 w-3.5 flex-shrink-0 transition-transform",t&&"rotate-180")})]}),t&&a&&u.jsx("div",{className:"mt-1 rounded-lg border border-border bg-surface-2 p-3 max-h-[300px] overflow-auto",children:u.jsx("pre",{className:"text-[11px] text-text-secondary font-mono whitespace-pre-wrap break-words",children:e.textContent})})]})}function _g(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Ag(e){switch(e){case"allow_once":case"allow_always":return"default";case"reject_once":case"reject_always":return"destructive";default:return"outline"}}function jg(e){switch(e){case"allow_once":case"allow_always":return u.jsx(un,{className:"size-4"});case"reject_once":case"reject_always":return u.jsx(dn,{className:"size-4"});default:return null}}function Tg({requestId:e,options:t,onRespond:n,className:r}){const o=s=>{n(e,s.optionId,s.kind)};return u.jsxs("div",{className:ee("p-3 border-t border-warning-border/30 bg-warning-bg/50",r),children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(ma,{className:"size-4 text-warning-text"}),u.jsx("span",{className:"text-xs font-medium text-warning-text",children:"Permission Required"})]}),u.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(s=>u.jsxs(Rt,{variant:Ag(s.kind),size:"sm",onClick:()=>o(s),className:"gap-1.5",children:[jg(s.kind),s.name]},s.optionId))})]})}const ks=1e3,Rg=1e6;function kr({filePath:e,oldString:t,newString:n,label:r}){const o=Ig(t,n),s=_s(o,"add"),a=_s(o,"remove"),i=o.length>ks?o.slice(0,ks):o,m=o.length-i.length;return u.jsxs("div",{className:"rounded-md border border-border overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-2 border-b border-border bg-surface-2 px-2 py-1",children:[u.jsx("span",{className:"min-w-0 max-w-[60%] truncate font-mono text-[11px] text-text-primary",title:e,children:e}),s>0&&u.jsxs("span",{className:"font-mono text-[10px] text-green-600 dark:text-green-400",children:["+",s]}),a>0&&u.jsxs("span",{className:"font-mono text-[10px] text-red-600 dark:text-red-400",children:["-",a]}),r&&u.jsx("span",{className:"ml-auto flex-shrink-0 font-display text-[10px] text-text-muted",children:r})]}),u.jsxs("div",{role:"list","aria-label":`${e} 的改动预览,${s} 行新增,${a} 行删除`,className:"max-h-48 overflow-auto bg-surface-1/50 py-1 font-mono text-xs",children:[i.map((f,l)=>u.jsx(Ng,{line:f},l)),m>0&&u.jsxs("div",{className:"px-5 py-0.5 font-display text-[10px] text-text-muted",children:["… 还有 ",m," 行未显示"]})]})]})}function Ng({line:e}){const t=e.type==="add"?"+":e.type==="remove"?"-":" ";return u.jsxs("div",{role:e.type==="context"?void 0:"listitem","aria-label":e.type==="add"?`新增行: ${e.text}`:e.type==="remove"?`删除行: ${e.text}`:void 0,className:ee("flex px-1 leading-relaxed",e.type==="add"&&"bg-green-500/10 text-green-700 dark:text-green-300",e.type==="remove"&&"bg-red-500/10 text-red-700 dark:text-red-300",e.type==="context"&&"text-text-secondary"),children:[u.jsx("span",{className:"w-4 flex-shrink-0 select-none text-center",children:t}),u.jsx("span",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words",children:e.text.length>0?e.text:" "})]})}function Es(e){return e.length===0?[]:e.split(`
|
|
227
227
|
`)}function _s(e,t){let n=0;for(const r of e)r.type===t&&n++;return n}function Ig(e,t){const n=Es(e),r=Es(t);let o=0;for(;o<n.length&&o<r.length&&n[o]===r[o];)o++;let s=n.length,a=r.length;for(;s>o&&a>o&&n[s-1]===r[a-1];)s--,a--;const i=[];for(let m=0;m<o;m++)i.push({type:"context",text:n[m]});Mg(n.slice(o,s),r.slice(o,a),i);for(let m=s;m<n.length;m++)i.push({type:"context",text:n[m]});return i}function Mg(e,t,n){const r=e.length,o=t.length;if(r===0&&o===0)return;if(r*o>Rg){for(const f of e)n.push({type:"remove",text:f});for(const f of t)n.push({type:"add",text:f});return}const s=o+1,a=new Uint32Array((r+1)*s);for(let f=r-1;f>=0;f--)for(let l=o-1;l>=0;l--)a[f*s+l]=e[f]===t[l]?a[(f+1)*s+l+1]+1:Math.max(a[(f+1)*s+l],a[f*s+l+1]);let i=0,m=0;for(;i<r&&m<o;)e[i]===t[m]?(n.push({type:"context",text:e[i]}),i++,m++):a[(i+1)*s+m]>=a[i*s+m+1]?(n.push({type:"remove",text:e[i]}),i++):(n.push({type:"add",text:t[m]}),m++);for(;i<r;)n.push({type:"remove",text:e[i]}),i++;for(;m<o;)n.push({type:"add",text:t[m]}),m++}function vl({entries:e,onPermissionRespond:t}){const[n,r]=p.useState(!1);if(e.length===0)return null;if(e.length===1)return u.jsx("div",{className:"pl-10",children:u.jsx(As,{tool:e[0].toolCall,compact:!0,onPermissionRespond:t})});const o=Bg(e);return u.jsx("div",{className:"pl-10",children:u.jsxs("div",{className:"rounded-lg border border-border bg-surface-2/50 overflow-hidden",children:[u.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-brand font-bold hover:bg-brand/10 transition-colors",onClick:()=>r(!n),children:[u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:ee("transition-transform text-text-muted",n&&"rotate-90"),children:u.jsx("path",{d:"M4 2L8 6L4 10",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),u.jsx("span",{className:"text-xs text-brand font-bold font-display",children:o})]}),n&&u.jsx("div",{className:"border-t border-border divide-y divide-border",children:e.map((s,a)=>u.jsx(As,{tool:s.toolCall,compact:!0,onPermissionRespond:t},s.toolCall.id||a))})]})})}function As({tool:e,compact:t,onPermissionRespond:n}){const[r,o]=p.useState(!t),s=(()=>{switch(e.status){case"running":return u.jsx("span",{className:"text-status-running text-[10px]",children:"▶"});case"complete":return u.jsx("span",{className:"text-status-active text-[10px]",children:"✓"});case"error":return u.jsx("span",{className:"text-status-error text-[10px]",children:"✕"});case"waiting_for_confirmation":return u.jsx("span",{className:"text-brand text-[10px]",children:"⍻"});case"canceled":return u.jsx("span",{className:"text-text-muted text-[10px]",children:"—"});case"rejected":return u.jsx("span",{className:"text-status-error text-[10px]",children:"✕"});default:return null}})(),a=Nn(e);return u.jsxs("div",{className:ee("px-3 py-2",t&&"py-1.5"),children:[u.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 text-left group",onClick:()=>o(!r),children:[s,u.jsx("span",{className:"text-xs font-display font-bold text-brand transition-colors truncate",children:e.title}),e.status==="running"&&u.jsx("span",{className:"text-[10px] text-status-running animate-pulse",children:"running"})]}),e.status==="waiting_for_confirmation"&&e.permissionRequest&&u.jsx("div",{className:"mt-1.5 ml-4",children:u.jsx(Tg,{requestId:e.permissionRequest.requestId,options:e.permissionRequest.options,onRespond:n||(()=>{})})}),r&&u.jsx("div",{className:"mt-1.5 ml-4 space-y-1.5",children:Ug(e)??u.jsxs(u.Fragment,{children:[e.rawInput&&Object.keys(e.rawInput).length>0&&u.jsx("pre",{className:"text-[11px] bg-surface-1 rounded-md p-2 overflow-x-auto font-mono max-h-36 text-text-secondary",children:Et(JSON.stringify(e.rawInput,null,2),2e3)}),a&&u.jsx(In,{tool:e})]})})]})}const Pg=new Set(["FileEditTool","Edit","SedEdit"]),Og=new Set(["FileWriteTool","Write"]),Dg=new Set(["MultiEdit"]),Lg=new Set(["BashTool","Bash","PowerShellTool"]),Fg=["old_content","oldContent","old_string","oldString","old_text","oldText","previous_content","previousContent"],$g=["output","stdout","stderr","result"];function Ug(e){const t=Wg(e.title),n=e.rawInput??{};if(Pg.has(t)){const r=We(n,["old_string","oldString"]),o=We(n,["new_string","newString"]);return r===void 0||o===void 0?null:u.jsxs(u.Fragment,{children:[u.jsx(kr,{filePath:We(n,["file_path","filePath"])??t,oldString:r,newString:o}),Nn(e)&&u.jsx(In,{tool:e})]})}if(Og.has(t)){const r=We(n,["file_path","filePath"]),o=We(n,["content"]);if(r===void 0||o===void 0)return null;const s=We(e.rawOutput??{},Fg);return u.jsxs(u.Fragment,{children:[u.jsx(kr,{filePath:r,oldString:s??"",newString:o,label:s===void 0?"新文件":void 0}),Nn(e)&&u.jsx(In,{tool:e})]})}if(Dg.has(t)){const r=n.edits;if(Array.isArray(r)&&r.length>0){const o=We(n,["file_path","filePath"])??t,s=[];for(let a=0;a<r.length;a++){const i=r[a];if(!i||typeof i!="object"||Array.isArray(i))continue;const m=i,f=We(m,["old_string","oldString"]),l=We(m,["new_string","newString"]);f===void 0||l===void 0||s.push(u.jsx(kr,{filePath:o,oldString:f,newString:l,label:`#${a+1}`},a))}if(s.length>0)return u.jsxs(u.Fragment,{children:[s,Nn(e)&&u.jsx(In,{tool:e})]})}return null}if(Lg.has(t)){const r=We(n,["command","cmd","script"]),o=Gg(e);return r===void 0&&o.length===0?null:u.jsx(zg,{command:r!==void 0?Et(r,500):void 0,output:o,isError:e.status==="error"})}return null}function zg({command:e,output:t,isError:n}){return u.jsx("div",{className:ee("rounded-md border overflow-hidden",n?"border-status-error/50":"border-border"),children:u.jsxs("div",{className:"max-h-36 overflow-auto bg-zinc-900 px-2 py-1.5 font-mono text-xs text-zinc-300",children:[e&&u.jsxs("div",{className:"whitespace-pre-wrap break-words text-zinc-500",children:["$ ",e]}),t.length>0&&u.jsx("div",{className:"whitespace-pre-wrap break-words",children:t})]})})}function Bg(e){const t=new Map;for(const r of e){const o=Hg(r.toolCall.title);t.set(o,(t.get(o)||0)+1)}const n=[];for(const[r,o]of t)n.push(o===1?r:`${o} 次${r}`);return n.length===0?`${e.length} 个工具调用`:n.length===1?n[0]:`${e.length} 个工具: ${n.join("、")}`}function Hg(e){const t=e.match(/^(\w+)/);return t?t[1]:e}function Wg(e){const t=e.match(/^([\w-]+)/);return t?t[1]:e}function We(e,t){for(const n of t){const r=e[n];if(typeof r=="string")return r}}function Nn(e){return e.status!=="running"&&e.status!=="waiting_for_confirmation"&&!!(e.rawOutput||e.content)}function bl(e){return!e.content||e.content.length===0?[]:e.content.filter(t=>t.type==="content").filter(t=>t.content.type==="text"&&"text"in t.content).map(t=>t.content.text)}function Gg(e){const t=bl(e);if(t.length>0)return Et(t.join(`
|
|
228
228
|
`),2e3);const n=e.rawOutput;if(n){for(const r of $g){const o=n[r];if(typeof o=="string"&&o.length>0)return Et(o,2e3)}if(Object.keys(n).length>0)return Et(JSON.stringify(n,null,2),2e3)}return""}function In({tool:e}){return u.jsx("pre",{className:ee("text-[11px] rounded-md p-2 overflow-x-auto font-mono max-h-36",e.status==="error"?"bg-status-error/10 text-status-error":"bg-surface-1 text-text-secondary"),children:Vg(e)})}function Vg(e){const t=bl(e);return t.length>0?Et(t.join(`
|
|
229
229
|
`),2e3):e.rawOutput&&Object.keys(e.rawOutput).length>0?Et(JSON.stringify(e.rawOutput,null,2),2e3):""}function Et(e,t){return e.length>t?e.slice(0,t)+"...":e}function Kg({entry:e}){const[t,n]=p.useState(!1),{entries:r}=e;if(r.length===0)return null;const o=r.filter(i=>i.status==="completed").length,s=r.length,a=s>0?Math.round(o/s*100):0;return u.jsx("div",{className:"pl-10",children:u.jsxs("div",{className:"rounded-xl border border-border bg-brand/5 overflow-hidden",children:[u.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 px-3 py-2.5 text-sm hover:bg-surface-1/50 transition-colors",onClick:()=>n(!t),children:[u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:ee("transition-transform text-text-muted flex-shrink-0",t&&"rotate-90"),children:u.jsx("path",{d:"M4 2L8 6L4 10",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),u.jsx("span",{className:"text-xs font-display font-medium text-text-secondary",children:"执行计划"}),u.jsxs("span",{className:"text-[10px] text-text-muted font-mono",children:[o,"/",s]}),u.jsx("div",{className:"flex-1 h-1 rounded-full bg-surface-1 overflow-hidden ml-1 mr-2",children:u.jsx("div",{className:"h-full rounded-full bg-brand/70 transition-all duration-500",style:{width:`${a}%`}})}),u.jsxs("span",{className:"text-[10px] text-text-muted font-mono",children:[a,"%"]})]}),!t&&u.jsx("div",{className:ee("border-t border-border px-3 py-1.5 space-y-0.5",s>5&&"max-h-64 overflow-y-auto"),children:r.map((i,m)=>u.jsx(qg,{entry:i},m))})]})})}function qg({entry:e}){return u.jsxs("div",{className:"flex items-start gap-2 py-1.5 px-1",children:[u.jsx("span",{className:"flex-shrink-0 mt-0.5",children:u.jsx(Yg,{status:e.status})}),u.jsx("span",{className:ee("text-xs leading-relaxed flex-1",e.status==="completed"?"text-text-muted line-through":"text-text-secondary",e.status==="in_progress"&&"text-text-primary font-medium"),children:e.content}),u.jsx(Xg,{priority:e.priority})]})}function Yg({status:e}){switch(e){case"completed":return u.jsx(ku,{className:"h-3.5 w-3.5 text-status-active"});case"in_progress":return u.jsx(ua,{className:"h-3.5 w-3.5 text-brand animate-spin",style:{animationDuration:"2s"}});case"pending":return u.jsx(_u,{className:"h-3.5 w-3.5 text-text-muted"})}}function Xg({priority:e}){const t={high:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300",medium:"bg-brand/10 text-brand dark:bg-brand/20",low:"bg-surface-1 text-text-muted"},n={high:"高",medium:"中",low:"低"};return u.jsx("span",{className:ee("text-[9px] font-display rounded-full px-1.5 py-0.5 flex-shrink-0 leading-none",t[e]),children:n[e]})}function Qg({entry:e}){const t=e.variant==="error";return u.jsxs("div",{className:"w-full",children:[u.jsx("div",{className:ee("border-t-2",t?"border-status-error":"border-border")}),u.jsxs("div",{className:"pt-3",children:[u.jsx("h3",{className:ee("font-bold font-display text-base",t?"text-status-error":"text-brand"),children:e.title}),e.subtitle&&u.jsx("p",{className:"text-sm text-text-muted mt-0.5",children:e.subtitle})]}),u.jsx("div",{className:"py-3 message-content text-text-primary leading-[1.75]",children:u.jsx(Ro,{children:e.outputText})}),u.jsx("div",{className:"pb-1 text-xs text-text-muted italic",children:"命令已执行 · 输入消息继续"})]})}/*!---------------------------------------------------------------------------------------------
|
|
@@ -262,4 +262,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
262
262
|
${Z.textContent}`}else{const ue=Z.size!=null?` (${Xv(Z.size)})`:"";re=`📎 ${Z.name}${ue}
|
|
263
263
|
\`\`\`
|
|
264
264
|
${Z.textContent}
|
|
265
|
-
\`\`\``}H.push({type:"text",text:re}),K.push(Z)}}catch(re){console.error("[ChatInterface] Failed to process attachment:",re)}if(H.length===0)return;const V={type:"user_message",id:`user-${Date.now()}`,content:D,images:G.length>0?G:void 0,attachments:K.length>0?K:void 0};r(Z=>[...Z,V]),s(!0);try{await e.sendPrompt(H)}catch(Z){console.error("[ChatInterface] Failed to send prompt:",Z),s(!1)}},[o,a,e,j,x,y,L,m,T,S]);return u.jsxs("div",{className:"flex flex-col h-full",children:[u.jsx(dx,{entries:n,isLoading:o&&!a?!1:o,onPermissionRespond:(N,D,$)=>{B(N,D,$)},emptyTitle:a?"开始对话":void 0,emptyDescription:a?"输入消息开始与 ACP agent 聊天":void 0}),u.jsx(Ex,{requests:P,onRespond:U}),d&&u.jsx("div",{className:"mx-auto max-w-3xl w-full px-4 sm:px-8 pb-1",children:u.jsxs("div",{className:"rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 px-3 py-2 text-sm text-red-700 dark:text-red-300 flex items-center justify-between",children:[u.jsx("span",{children:d}),u.jsx("button",{type:"button",onClick:()=>h(null),className:"ml-2 text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200 flex-shrink-0",children:"×"})]})}),u.jsxs("div",{className:"flex-shrink-0",children:[u.jsxs("div",{className:"max-w-3xl mx-auto w-full px-4 sm:px-8 pb-1 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(qv,{mode:A??v,onModeChange:N=>{E(null),C(N),localStorage.setItem("acp_permission_mode",N)}}),u.jsx(Pv,{client:e}),u.jsx(Ax,{usage:b})]}),n.length>0&&u.jsxs(sg,{children:[u.jsx(ag,{asChild:!0,children:u.jsxs(Rt,{variant:"ghost",size:"sm",className:"h-7 text-xs text-text-muted hover:text-brand font-display gap-1",onClick:S,children:[u.jsx(fa,{className:"h-3 w-3"}),"新会话"]})}),u.jsx(ig,{children:"New Thread"})]})]}),u.jsx(wx,{onSubmit:q,isLoading:o,onInterrupt:w,disabled:!a,placeholder:a?"给 Saluzi 发送消息…":"等待会话...",supportsAttachments:L,commands:j.length>0?j:void 0,queueWhileLoading:!0})]})]})}function Xv(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Qv({client:e,agentId:t}){const[n,r]=p.useState(!1),o=p.useCallback(async s=>{try{if(e.supportsLoadSession)await e.loadSession({sessionId:s.sessionId,cwd:s.cwd});else if(e.supportsResumeSession)await e.resumeSession({sessionId:s.sessionId,cwd:s.cwd});else throw new Error("Loading or resuming sessions is not supported by this agent.")}catch(a){console.error("Failed to load/resume session:",a)}},[e]);return u.jsxs("div",{className:"flex h-full w-full",children:[u.jsxs("div",{className:ee("hidden md:flex flex-col border-r border-border/60 bg-surface-1/50 transition-all duration-200 flex-shrink-0",n?"w-12":"w-64"),children:[u.jsxs("div",{className:"flex items-center justify-between px-3 py-4",children:[!n&&u.jsx("span",{className:"text-xs font-display font-semibold text-text-muted uppercase tracking-widest px-1",children:"会话"}),u.jsxs("div",{className:ee("flex items-center gap-0.5",n&&"mx-auto"),children:[!n&&u.jsx("button",{type:"button",onClick:()=>{},className:"h-7 w-7 flex items-center justify-center rounded-lg text-text-muted hover:text-brand hover:bg-brand/10 transition-colors",title:"新会话",children:u.jsx(fa,{className:"h-4 w-4"})}),u.jsx("button",{type:"button",onClick:()=>r(!n),className:"h-7 w-7 flex items-center justify-center rounded-lg text-text-muted hover:text-text-primary hover:bg-surface-2 transition-colors",children:n?u.jsx(qu,{className:"h-4 w-4"}):u.jsx(Vu,{className:"h-4 w-4"})})]})]}),!n&&u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(Zv,{client:e,onSelectSession:o})})]}),u.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:u.jsx(Yv,{client:e,agentId:t})})]})}function Zv({client:e,onSelectSession:t}){const[n,r]=p.useState([]),[o,s]=p.useState(!0),[a,i]=p.useState(null),[m,f]=p.useState(null),[l,c]=p.useState(""),[d,h]=p.useState(!0),g=p.useRef(null),v=p.useCallback(async()=>{if(!e.supportsSessionList){s(!1);return}s(!0);try{const j=await e.listSessions();r(j.sessions)}catch(j){console.warn("[SidebarSessionList] Failed to load:",j)}finally{s(!1)}},[e]);p.useEffect(()=>{e.getState()==="connected"&&e.supportsSessionList&&v()},[e,v]),p.useEffect(()=>{const j=x=>{x==="connected"&&setTimeout(v,200)};return e.setConnectionStateHandler(j),()=>e.removeConnectionStateHandler(j)},[e,v]),p.useEffect(()=>{const j=setInterval(v,1e4);return()=>clearInterval(j)},[v]),p.useEffect(()=>{e.setSessionDeletedHandler(j=>{v()}),e.setSessionRenamedHandler((j,x)=>{v()})},[e,v]),p.useEffect(()=>{e.setErrorMessageHandler(j=>{/Method not found/i.test(j)&&/session\/(rename|delete)/i.test(j)&&(h(!1),f(null))})},[e]),p.useEffect(()=>{m&&g.current&&(g.current.focus(),g.current.select())},[m]);const C=p.useCallback(j=>{const x=j.title&&j.title.trim()?j.title:j.sessionId.slice(0,8);if(window.confirm(`删除会话 "${x}"?此操作不可恢复。`))try{e.deleteSession(j.sessionId),r(y=>y.filter(T=>T.sessionId!==j.sessionId)),a===j.sessionId&&i(null)}catch(y){console.error("[SidebarSessionList] delete failed:",y)}},[e,a]),b=p.useCallback(j=>{f(j.sessionId),c(j.title&&j.title.trim()?j.title:"")},[]),_=p.useCallback(()=>{if(!m)return;const j=l.trim();if(!j){f(null);return}try{e.renameSession(m,j),r(x=>x.map(y=>y.sessionId===m?{...y,title:j}:y))}catch(x){console.error("[SidebarSessionList] rename failed:",x)}f(null)},[e,m,l]),A=p.useCallback(()=>{f(null)},[]),E=p.useCallback(j=>{j.key==="Enter"?(j.preventDefault(),_()):j.key==="Escape"&&(j.preventDefault(),A())},[_,A]),L=p.useMemo(()=>[...n].sort((j,x)=>{const y=j.updatedAt?new Date(j.updatedAt).getTime():0;return(x.updatedAt?new Date(x.updatedAt).getTime():0)-y}),[n]);if(o&&n.length===0)return u.jsx("div",{className:"flex items-center justify-center py-8",children:u.jsx("span",{className:"text-xs text-text-muted font-display",children:"加载中..."})});if(n.length===0)return u.jsx("div",{className:"flex items-center justify-center py-8",children:u.jsx("span",{className:"text-xs text-text-muted font-display",children:"暂无会话"})});const k=Jv(L);return u.jsx("nav",{className:"py-1","aria-label":"历史会话",children:k.map((j,x)=>u.jsxs("div",{children:[x>0&&u.jsx("div",{className:"mx-3 my-2 border-t border-border/40"}),u.jsx("div",{className:"px-4 py-2",children:u.jsx("span",{className:"text-[10px] font-display font-semibold uppercase tracking-widest text-text-muted/70",children:j.label})}),j.sessions.map(y=>{const T=m===y.sessionId;return u.jsxs("div",{className:ee("group relative flex items-center gap-2.5 px-4 py-2 transition-colors",y.sessionId===a?"bg-brand/8 text-text-primary":"text-text-secondary hover:bg-surface-2/60 hover:text-text-primary"),children:[u.jsx(zu,{className:"h-3.5 w-3.5 flex-shrink-0 opacity-50"}),T?u.jsx("input",{ref:g,type:"text",value:l,onChange:M=>c(M.target.value),onKeyDown:E,onBlur:_,className:"flex-1 min-w-0 bg-surface-2 border border-border rounded px-1 py-0.5 text-[13px] font-display text-text-primary outline-none focus:border-brand",onClick:M=>M.stopPropagation()}):u.jsx("button",{type:"button",onClick:()=>{i(y.sessionId),t(y)},className:"flex-1 min-w-0 text-left",title:y.title||y.sessionId,children:u.jsx("span",{className:"text-[13px] font-display truncate leading-snug block",children:y.title&&y.title.trim()?y.title:"新会话"})}),T?u.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[u.jsx("button",{type:"button",onClick:_,className:"h-6 w-6 flex items-center justify-center rounded text-text-muted hover:text-brand hover:bg-brand/10 transition-colors",title:"确认",children:u.jsx(un,{className:"h-3.5 w-3.5"})}),u.jsx("button",{type:"button",onClick:A,className:"h-6 w-6 flex items-center justify-center rounded text-text-muted hover:text-status-error hover:bg-status-error/10 transition-colors",title:"取消",children:u.jsx(dn,{className:"h-3.5 w-3.5"})})]}):u.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",title:d?void 0:"该 agent 不支持会话管理(重命名/删除)",children:[u.jsx("button",{type:"button",disabled:!d,onClick:M=>{M.stopPropagation(),d&&b(y)},className:ee("h-6 w-6 flex items-center justify-center rounded transition-colors",d?"text-text-muted hover:text-brand hover:bg-brand/10":"text-text-muted/30 cursor-not-allowed"),title:d?"重命名":"该 agent 不支持会话重命名",children:u.jsx(Zu,{className:"h-3 w-3"})}),u.jsx("button",{type:"button",disabled:!d,onClick:M=>{M.stopPropagation(),d&&C(y)},className:ee("h-6 w-6 flex items-center justify-center rounded transition-colors",d?"text-text-muted hover:text-status-error hover:bg-status-error/10":"text-text-muted/30 cursor-not-allowed"),title:d?"删除":"该 agent 不支持会话删除",children:u.jsx(gd,{className:"h-3 w-3"})})]})]},y.sessionId)})]},j.label))})}function Jv(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(n.getTime()-864e5),o=[{label:"今天",sessions:[]},{label:"昨天",sessions:[]},{label:"更早",sessions:[]}];for(const s of e){const a=s.updatedAt?new Date(s.updatedAt):new Date(0);a>=n?o[0].sessions.push(s):a>=r?o[1].sessions.push(s):o[2].sessions.push(s)}return o.filter(s=>s.sessions.length>0)}function eb({url:e,token:t,onBack:n}){const[r,o]=p.useState(null),[s,a]=p.useState("disconnected"),[i,m]=p.useState(null),f=p.useRef(null);return p.useEffect(()=>{const l=new Gr({proxyUrl:e,token:t});return l.setConnectionStateHandler((c,d)=>{a(c),m(d||null)}),f.current=l,o(l),l.connect().catch(c=>{c instanceof Bi||(m(c.message),a("error"))}),()=>{l.disconnect(),f.current=null,o(null),a("disconnected")}},[e,t]),u.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[i&&s==="error"&&u.jsxs("div",{className:"px-4 py-2 bg-status-error/10 text-status-error text-sm border-b",children:[i,u.jsx("button",{onClick:n,className:"ml-3 underline hover:no-underline",children:"Back to Dashboard"})]}),s==="connecting"&&u.jsx("div",{className:"flex-1 flex items-center justify-center",children:u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-brand border-t-transparent rounded-full mx-auto mb-3"}),u.jsx("p",{className:"text-text-muted text-sm",children:"Connecting to ACP agent..."})]})}),s==="error"&&!r&&u.jsx("div",{className:"flex-1 flex items-center justify-center",children:u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"font-medium mb-1",children:"Connection Failed"}),u.jsx("p",{className:"text-text-muted text-sm mb-3",children:i}),u.jsx("button",{onClick:n,className:"rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white hover:bg-brand-light transition-colors",children:"Back to Dashboard"})]})}),r&&s==="connected"&&u.jsx(Qv,{client:r})]})}const Qr="rcs_admin_key";function tb(){try{return localStorage.getItem(Qr)}catch{return null}}function nb(){const[e,t]=p.useState(tb),n=p.useCallback(r=>{const o=r.trim();t(o||null);try{o?localStorage.setItem(Qr,o):localStorage.removeItem(Qr)}catch{}},[]);return{adminKey:e,setAdminKey:n}}const Us=p.lazy(()=>Ae(()=>import("./Dashboard-jAe3pVfO.js"),__vite__mapDeps([3,2,4,5,6,1,7])).then(e=>({default:e.Dashboard}))),rb=p.lazy(()=>Ae(()=>import("./SessionDetail-DLqYCAa1.js"),__vite__mapDeps([8,2,4,6,9,10,5,11,1,7])).then(e=>({default:e.SessionDetail}))),ob=p.lazy(()=>Ae(()=>import("./ShareLanding-ChhDZDz-.js"),__vite__mapDeps([12,2,1,7])).then(e=>({default:e.ShareLanding}))),zs=p.lazy(()=>Ae(()=>import("./ArtifactsGallery-EA1PTLFb.js").then(e=>e.a),__vite__mapDeps([9,2,6,10])).then(e=>({default:e.ArtifactsGallery}))),sb=p.lazy(()=>Ae(()=>import("./ArtifactView-gpttL9Bm.js"),__vite__mapDeps([13,2,9,6,10,1,7])).then(e=>({default:e.ArtifactView}))),ab=p.lazy(()=>Ae(()=>import("./Claim-CcQDX4V4.js"),__vite__mapDeps([14,2,1,7])).then(e=>({default:e.Claim}))),ib=p.lazy(()=>Ae(()=>import("./Login-1UQ7Tsno.js"),__vite__mapDeps([15,2,1,7])).then(e=>({default:e.Login}))),lb=p.lazy(()=>Ae(()=>import("./Register-PLzfxLKv.js"),__vite__mapDeps([16,2,1,7])).then(e=>({default:e.Register}))),cb=p.lazy(()=>Ae(()=>import("./Setup-eKrRj_Cj.js"),__vite__mapDeps([17,2,1,7])).then(e=>({default:e.Setup}))),ub=p.lazy(()=>Ae(()=>import("./Join-z-lybdiB.js"),__vite__mapDeps([18,2,1,7])).then(e=>({default:e.Join}))),db=p.lazy(()=>Ae(()=>import("./UserSettings--GHQVpb4.js"),__vite__mapDeps([19,2,10,1,7])).then(e=>({default:e.UserSettings}))),fb=p.lazy(()=>Ae(()=>import("./TeamList-8zi79KWI.js"),__vite__mapDeps([20,2,1,7])).then(e=>({default:e.TeamList}))),mb=p.lazy(()=>Ae(()=>import("./TeamCreate-yh6hBIjW.js"),__vite__mapDeps([21,2,1,7])).then(e=>({default:e.TeamCreate}))),pb=p.lazy(()=>Ae(()=>import("./TeamDetail-V_nG-5yy.js"),__vite__mapDeps([22,2,11,10,4,1,7])).then(e=>({default:e.TeamDetail}))),hb=p.lazy(()=>Ae(()=>import("./TeamSettings-D7NuRKfx.js"),__vite__mapDeps([23,2,1,7])).then(e=>({default:e.TeamSettings}))),gb=p.lazy(()=>Ae(()=>import("./AdminPanel-omPQCGJ3.js"),__vite__mapDeps([24,2,1,7])).then(e=>({default:e.AdminPanel}))),xb=new Set(["login","register","setup","join","share"]),vb=new Set(["login","register","setup","join"]);function bb(){return u.jsx(Cd,{defaultTheme:"system",children:u.jsx(wh,{children:u.jsx(yb,{})})})}function yb(){const[e,t]=p.useState("dashboard"),[n,r]=p.useState(null),[o,s]=p.useState(void 0),[a,i]=p.useState(null),[m,f]=p.useState(null),[l,c]=p.useState(null),{adminKey:d}=nb(),{user:h,isLoading:g,checkSetupStatus:v}=zi();p.useEffect(()=>{fh(d)},[d]);const[C,b]=p.useState(!1);p.useEffect(()=>{!g&&!h?v().then(b):h&&b(!1)},[g,h,v]);const _=p.useCallback(()=>{const T=window.location.pathname,M=new URLSearchParams(window.location.search);if(M.get("acp")==="1"){const U=sessionStorage.getItem("acp_connection");if(U)try{const q=JSON.parse(U);if(q.url&&q.token){c({url:q.url,token:q.token}),sessionStorage.removeItem("acp_connection");const N=new URL(window.location.href);N.searchParams.delete("acp"),window.history.replaceState(null,"",N),t("acp");return}}catch{sessionStorage.removeItem("acp_connection")}}const F=M.get("sid");if(F){new URL(window.location.href).searchParams.delete("sid"),window.history.replaceState(null,"",`/code/${F}`),r(F),f(null),t("session");return}if(T==="/login"){t("login");return}if(T==="/register"){t("register");return}if(T==="/setup"){t("setup");return}if(T==="/join"){t("join");return}if(T==="/settings"){t("settings");return}if(T==="/admin"){t("admin");return}if(T==="/teams/new"){t("team-create");return}if(T.match(/^\/teams\/([^/]+)\/settings$/)){t("team-settings");return}if(T.match(/^\/teams\/([^/]+)$/)){t("team-detail");return}if(T==="/teams"){t("teams");return}const S=T.match(/^\/code\/s\/([^/]+)/);if(S&&S[1]){f(S[1]),r(null),s(void 0),t("share");return}const w=T.match(/^\/code\/a\/([^/]+)/);if(w&&w[1]){i(w[1]),r(null),s(void 0),f(null),t("artifact-view");return}if(T==="/code/artifacts"||T==="/code/artifacts/"){i(null),r(null),s(void 0),f(null),t("artifacts");return}const B=T.match(/^\/code\/claim\/([^/]+)/);if(B&&B[1]){t("claim");return}const P=T.match(/^\/code\/([^/]+)/);P&&P[1]?(r(P[1]),s(void 0),f(null),t("session")):(r(null),s(void 0),f(null),t("dashboard"))},[]);p.useEffect(()=>(_(),window.addEventListener("popstate",_),()=>window.removeEventListener("popstate",_)),[_]);const A=p.useCallback(T=>{window.history.pushState(null,"",`/code/${T}`),r(T),s(void 0),f(null),i(null),t("session")},[]),E=p.useCallback(()=>{window.history.pushState(null,"","/code/artifacts"),i(null),r(null),s(void 0),f(null),t("artifacts")},[]),L=p.useCallback(()=>{window.history.pushState(null,"","/code/"),r(null),s(void 0),f(null),i(null),c(null),t("dashboard")},[]),k=(()=>{let T=e;return g||(C&&T!=="setup"&&T!=="join"&&(T="setup"),!h&&!xb.has(T)&&(T="login"),h&&(T==="login"||T==="setup")&&(T="dashboard")),T})();if(p.useEffect(()=>{g||(k==="setup"&&window.location.pathname!=="/setup"?window.history.replaceState(null,"","/setup"):k==="login"&&window.location.pathname!=="/login"?window.history.replaceState(null,"","/login"):k==="dashboard"&&h&&window.location.pathname!=="/code/"&&window.history.replaceState(null,"","/code/"))},[k,h,g]),g)return u.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-muted",children:"Loading..."});const j=()=>{if(l&&k==="acp")return u.jsx(eb,{url:l.url,token:l.token,onBack:L});switch(k){case"login":return u.jsx(ib,{onSuccess:L,onNavigateRegister:()=>t("register")});case"register":return u.jsx(lb,{onSuccess:L,onBack:()=>t("login")});case"setup":return u.jsx(cb,{onSuccess:L,onAlreadyDone:L});case"join":return u.jsx(ub,{onSuccess:L,onInvalidInvite:L});case"settings":return u.jsx(db,{});case"teams":return u.jsx(fb,{});case"team-create":return u.jsx(mb,{});case"team-detail":return u.jsx(pb,{});case"team-settings":return u.jsx(hb,{});case"admin":return(h==null?void 0:h.role)!=="admin"?u.jsx("div",{className:"flex flex-1 items-center justify-center",children:u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"text-status-error",children:"403 — Admin access required"}),u.jsx("a",{href:"/code/",className:"mt-4 inline-block text-brand hover:underline",children:Fe("nav.dashboard")})]})}):u.jsx(gb,{});case"share":return u.jsx(ob,{});case"claim":return u.jsx(ab,{});case"artifacts":return u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(zs,{})});case"artifact-view":return a?u.jsx(sb,{artifactId:a,onBack:E}):u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(zs,{})});case"session":return n?u.jsx(rb,{sessionId:n,onSessionLoaded:T=>s(T.source)},n):u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(Us,{onNavigateSession:A})});default:return u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(Us,{onNavigateSession:A})})}},x=!vb.has(k),y=k==="artifact-view";return u.jsxs("div",{className:"flex h-screen flex-col bg-surface-0 text-text-primary",children:[x&&u.jsx(Sh,{sessionTitle:n||(l?"ACP":void 0),sessionSource:l?"acp":o,onBack:n||l||m?L:void 0,onNavigateArtifacts:y?void 0:E}),u.jsx(p.Suspense,{fallback:u.jsx("div",{className:"flex flex-1 items-center justify-center text-text-muted",children:"Loading..."}),children:j()})]})}Lv();mc.createRoot(document.getElementById("root")).render(u.jsx(p.StrictMode,{children:u.jsx(bb,{})}));export{Pb as $,Gr as A,xe as B,wx as C,Bi as D,Zb as E,Ru as F,Hb as G,ty as H,Gb as I,qb as J,ny as K,ua as L,Mv as M,Bb as N,uv as O,Zu as P,Ob as Q,iy as R,sd as S,sy as T,bd as U,ey as V,Jb as W,dn as X,Fb as Y,Db as Z,Lb as _,Qv as a,zb as a0,Kb as a1,Wb as a2,Vb as a3,Yb as a4,Ub as a5,$b as a6,Xb as a7,Qb as a8,Ks as a9,ee as aa,Dv as ab,ae as ac,kt as ad,au as ae,Eb as af,jb as ag,Mb as ah,ph as ai,Rb as aj,_b as ak,Tb as al,Ib as am,Fe as an,Ab as ao,Gv as ap,su as aq,zi as ar,Fi as as,vh as at,wr as b,dx as c,un as d,Kt as e,ca as f,ju as g,ay as h,dv as i,Pi as j,Di as k,Tn as l,sh as m,ys as n,Oi as o,fa as p,Pl as q,Dl as r,Ol as s,cv as t,lv as u,ld as v,fd as w,ry as x,og as y,gd as z};
|
|
265
|
+
\`\`\``}H.push({type:"text",text:re}),K.push(Z)}}catch(re){console.error("[ChatInterface] Failed to process attachment:",re)}if(H.length===0)return;const V={type:"user_message",id:`user-${Date.now()}`,content:D,images:G.length>0?G:void 0,attachments:K.length>0?K:void 0};r(Z=>[...Z,V]),s(!0);try{await e.sendPrompt(H)}catch(Z){console.error("[ChatInterface] Failed to send prompt:",Z),s(!1)}},[o,a,e,j,x,y,L,m,T,S]);return u.jsxs("div",{className:"flex flex-col h-full",children:[u.jsx(dx,{entries:n,isLoading:o&&!a?!1:o,onPermissionRespond:(N,D,$)=>{B(N,D,$)},emptyTitle:a?"开始对话":void 0,emptyDescription:a?"输入消息开始与 ACP agent 聊天":void 0}),u.jsx(Ex,{requests:P,onRespond:U}),d&&u.jsx("div",{className:"mx-auto max-w-3xl w-full px-4 sm:px-8 pb-1",children:u.jsxs("div",{className:"rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 px-3 py-2 text-sm text-red-700 dark:text-red-300 flex items-center justify-between",children:[u.jsx("span",{children:d}),u.jsx("button",{type:"button",onClick:()=>h(null),className:"ml-2 text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200 flex-shrink-0",children:"×"})]})}),u.jsxs("div",{className:"flex-shrink-0",children:[u.jsxs("div",{className:"max-w-3xl mx-auto w-full px-4 sm:px-8 pb-1 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(qv,{mode:A??v,onModeChange:N=>{E(null),C(N),localStorage.setItem("acp_permission_mode",N)}}),u.jsx(Pv,{client:e}),u.jsx(Ax,{usage:b})]}),n.length>0&&u.jsxs(sg,{children:[u.jsx(ag,{asChild:!0,children:u.jsxs(Rt,{variant:"ghost",size:"sm",className:"h-7 text-xs text-text-muted hover:text-brand font-display gap-1",onClick:S,children:[u.jsx(fa,{className:"h-3 w-3"}),"新会话"]})}),u.jsx(ig,{children:"New Thread"})]})]}),u.jsx(wx,{onSubmit:q,isLoading:o,onInterrupt:w,disabled:!a,placeholder:a?"给 Saluzi 发送消息…":"等待会话...",supportsAttachments:L,commands:j.length>0?j:void 0,queueWhileLoading:!0})]})]})}function Xv(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Qv({client:e,agentId:t}){const[n,r]=p.useState(!1),o=p.useCallback(async s=>{try{if(e.supportsLoadSession)await e.loadSession({sessionId:s.sessionId,cwd:s.cwd});else if(e.supportsResumeSession)await e.resumeSession({sessionId:s.sessionId,cwd:s.cwd});else throw new Error("Loading or resuming sessions is not supported by this agent.")}catch(a){console.error("Failed to load/resume session:",a)}},[e]);return u.jsxs("div",{className:"flex h-full w-full",children:[u.jsxs("div",{className:ee("hidden md:flex flex-col border-r border-border/60 bg-surface-1/50 transition-all duration-200 flex-shrink-0",n?"w-12":"w-64"),children:[u.jsxs("div",{className:"flex items-center justify-between px-3 py-4",children:[!n&&u.jsx("span",{className:"text-xs font-display font-semibold text-text-muted uppercase tracking-widest px-1",children:"会话"}),u.jsxs("div",{className:ee("flex items-center gap-0.5",n&&"mx-auto"),children:[!n&&u.jsx("button",{type:"button",onClick:()=>{},className:"h-7 w-7 flex items-center justify-center rounded-lg text-text-muted hover:text-brand hover:bg-brand/10 transition-colors",title:"新会话",children:u.jsx(fa,{className:"h-4 w-4"})}),u.jsx("button",{type:"button",onClick:()=>r(!n),className:"h-7 w-7 flex items-center justify-center rounded-lg text-text-muted hover:text-text-primary hover:bg-surface-2 transition-colors",children:n?u.jsx(qu,{className:"h-4 w-4"}):u.jsx(Vu,{className:"h-4 w-4"})})]})]}),!n&&u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(Zv,{client:e,onSelectSession:o})})]}),u.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:u.jsx(Yv,{client:e,agentId:t})})]})}function Zv({client:e,onSelectSession:t}){const[n,r]=p.useState([]),[o,s]=p.useState(!0),[a,i]=p.useState(null),[m,f]=p.useState(null),[l,c]=p.useState(""),[d,h]=p.useState(!0),g=p.useRef(null),v=p.useCallback(async()=>{if(!e.supportsSessionList){s(!1);return}s(!0);try{const j=await e.listSessions();r(j.sessions)}catch(j){console.warn("[SidebarSessionList] Failed to load:",j)}finally{s(!1)}},[e]);p.useEffect(()=>{e.getState()==="connected"&&e.supportsSessionList&&v()},[e,v]),p.useEffect(()=>{const j=x=>{x==="connected"&&setTimeout(v,200)};return e.setConnectionStateHandler(j),()=>e.removeConnectionStateHandler(j)},[e,v]),p.useEffect(()=>{const j=setInterval(v,1e4);return()=>clearInterval(j)},[v]),p.useEffect(()=>{e.setSessionDeletedHandler(j=>{v()}),e.setSessionRenamedHandler((j,x)=>{v()})},[e,v]),p.useEffect(()=>{e.setErrorMessageHandler(j=>{/Method not found/i.test(j)&&/session\/(rename|delete)/i.test(j)&&(h(!1),f(null))})},[e]),p.useEffect(()=>{m&&g.current&&(g.current.focus(),g.current.select())},[m]);const C=p.useCallback(j=>{const x=j.title&&j.title.trim()?j.title:j.sessionId.slice(0,8);if(window.confirm(`删除会话 "${x}"?此操作不可恢复。`))try{e.deleteSession(j.sessionId),r(y=>y.filter(T=>T.sessionId!==j.sessionId)),a===j.sessionId&&i(null)}catch(y){console.error("[SidebarSessionList] delete failed:",y)}},[e,a]),b=p.useCallback(j=>{f(j.sessionId),c(j.title&&j.title.trim()?j.title:"")},[]),_=p.useCallback(()=>{if(!m)return;const j=l.trim();if(!j){f(null);return}try{e.renameSession(m,j),r(x=>x.map(y=>y.sessionId===m?{...y,title:j}:y))}catch(x){console.error("[SidebarSessionList] rename failed:",x)}f(null)},[e,m,l]),A=p.useCallback(()=>{f(null)},[]),E=p.useCallback(j=>{j.key==="Enter"?(j.preventDefault(),_()):j.key==="Escape"&&(j.preventDefault(),A())},[_,A]),L=p.useMemo(()=>[...n].sort((j,x)=>{const y=j.updatedAt?new Date(j.updatedAt).getTime():0;return(x.updatedAt?new Date(x.updatedAt).getTime():0)-y}),[n]);if(o&&n.length===0)return u.jsx("div",{className:"flex items-center justify-center py-8",children:u.jsx("span",{className:"text-xs text-text-muted font-display",children:"加载中..."})});if(n.length===0)return u.jsx("div",{className:"flex items-center justify-center py-8",children:u.jsx("span",{className:"text-xs text-text-muted font-display",children:"暂无会话"})});const k=Jv(L);return u.jsx("nav",{className:"py-1","aria-label":"历史会话",children:k.map((j,x)=>u.jsxs("div",{children:[x>0&&u.jsx("div",{className:"mx-3 my-2 border-t border-border/40"}),u.jsx("div",{className:"px-4 py-2",children:u.jsx("span",{className:"text-[10px] font-display font-semibold uppercase tracking-widest text-text-muted/70",children:j.label})}),j.sessions.map(y=>{const T=m===y.sessionId;return u.jsxs("div",{className:ee("group relative flex items-center gap-2.5 px-4 py-2 transition-colors",y.sessionId===a?"bg-brand/8 text-text-primary":"text-text-secondary hover:bg-surface-2/60 hover:text-text-primary"),children:[u.jsx(zu,{className:"h-3.5 w-3.5 flex-shrink-0 opacity-50"}),T?u.jsx("input",{ref:g,type:"text",value:l,onChange:M=>c(M.target.value),onKeyDown:E,onBlur:_,className:"flex-1 min-w-0 bg-surface-2 border border-border rounded px-1 py-0.5 text-[13px] font-display text-text-primary outline-none focus:border-brand",onClick:M=>M.stopPropagation()}):u.jsx("button",{type:"button",onClick:()=>{i(y.sessionId),t(y)},className:"flex-1 min-w-0 text-left",title:y.title||y.sessionId,children:u.jsx("span",{className:"text-[13px] font-display truncate leading-snug block",children:y.title&&y.title.trim()?y.title:"新会话"})}),T?u.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[u.jsx("button",{type:"button",onClick:_,className:"h-6 w-6 flex items-center justify-center rounded text-text-muted hover:text-brand hover:bg-brand/10 transition-colors",title:"确认",children:u.jsx(un,{className:"h-3.5 w-3.5"})}),u.jsx("button",{type:"button",onClick:A,className:"h-6 w-6 flex items-center justify-center rounded text-text-muted hover:text-status-error hover:bg-status-error/10 transition-colors",title:"取消",children:u.jsx(dn,{className:"h-3.5 w-3.5"})})]}):u.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",title:d?void 0:"该 agent 不支持会话管理(重命名/删除)",children:[u.jsx("button",{type:"button",disabled:!d,onClick:M=>{M.stopPropagation(),d&&b(y)},className:ee("h-6 w-6 flex items-center justify-center rounded transition-colors",d?"text-text-muted hover:text-brand hover:bg-brand/10":"text-text-muted/30 cursor-not-allowed"),title:d?"重命名":"该 agent 不支持会话重命名",children:u.jsx(Zu,{className:"h-3 w-3"})}),u.jsx("button",{type:"button",disabled:!d,onClick:M=>{M.stopPropagation(),d&&C(y)},className:ee("h-6 w-6 flex items-center justify-center rounded transition-colors",d?"text-text-muted hover:text-status-error hover:bg-status-error/10":"text-text-muted/30 cursor-not-allowed"),title:d?"删除":"该 agent 不支持会话删除",children:u.jsx(gd,{className:"h-3 w-3"})})]})]},y.sessionId)})]},j.label))})}function Jv(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(n.getTime()-864e5),o=[{label:"今天",sessions:[]},{label:"昨天",sessions:[]},{label:"更早",sessions:[]}];for(const s of e){const a=s.updatedAt?new Date(s.updatedAt):new Date(0);a>=n?o[0].sessions.push(s):a>=r?o[1].sessions.push(s):o[2].sessions.push(s)}return o.filter(s=>s.sessions.length>0)}function eb({url:e,token:t,onBack:n}){const[r,o]=p.useState(null),[s,a]=p.useState("disconnected"),[i,m]=p.useState(null),f=p.useRef(null);return p.useEffect(()=>{const l=new Gr({proxyUrl:e,token:t});return l.setConnectionStateHandler((c,d)=>{a(c),m(d||null)}),f.current=l,o(l),l.connect().catch(c=>{c instanceof Bi||(m(c.message),a("error"))}),()=>{l.disconnect(),f.current=null,o(null),a("disconnected")}},[e,t]),u.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[i&&s==="error"&&u.jsxs("div",{className:"px-4 py-2 bg-status-error/10 text-status-error text-sm border-b",children:[i,u.jsx("button",{onClick:n,className:"ml-3 underline hover:no-underline",children:"Back to Dashboard"})]}),s==="connecting"&&u.jsx("div",{className:"flex-1 flex items-center justify-center",children:u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-brand border-t-transparent rounded-full mx-auto mb-3"}),u.jsx("p",{className:"text-text-muted text-sm",children:"Connecting to ACP agent..."})]})}),s==="error"&&!r&&u.jsx("div",{className:"flex-1 flex items-center justify-center",children:u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"font-medium mb-1",children:"Connection Failed"}),u.jsx("p",{className:"text-text-muted text-sm mb-3",children:i}),u.jsx("button",{onClick:n,className:"rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white hover:bg-brand-light transition-colors",children:"Back to Dashboard"})]})}),r&&s==="connected"&&u.jsx(Qv,{client:r})]})}const Qr="rcs_admin_key";function tb(){try{return localStorage.getItem(Qr)}catch{return null}}function nb(){const[e,t]=p.useState(tb),n=p.useCallback(r=>{const o=r.trim();t(o||null);try{o?localStorage.setItem(Qr,o):localStorage.removeItem(Qr)}catch{}},[]);return{adminKey:e,setAdminKey:n}}const Us=p.lazy(()=>Ae(()=>import("./Dashboard--liQacnK.js"),__vite__mapDeps([3,2,4,5,6,1,7])).then(e=>({default:e.Dashboard}))),rb=p.lazy(()=>Ae(()=>import("./SessionDetail-Dlhtkeg9.js"),__vite__mapDeps([8,2,4,6,9,10,5,11,1,7])).then(e=>({default:e.SessionDetail}))),ob=p.lazy(()=>Ae(()=>import("./ShareLanding-0IFIhCg-.js"),__vite__mapDeps([12,2,1,7])).then(e=>({default:e.ShareLanding}))),zs=p.lazy(()=>Ae(()=>import("./ArtifactsGallery-yaOX7eyz.js").then(e=>e.a),__vite__mapDeps([9,2,6,10])).then(e=>({default:e.ArtifactsGallery}))),sb=p.lazy(()=>Ae(()=>import("./ArtifactView-DG4NEABr.js"),__vite__mapDeps([13,2,9,6,10,1,7])).then(e=>({default:e.ArtifactView}))),ab=p.lazy(()=>Ae(()=>import("./Claim-DcVDtUJW.js"),__vite__mapDeps([14,2,1,7])).then(e=>({default:e.Claim}))),ib=p.lazy(()=>Ae(()=>import("./Login-CAo4xQR6.js"),__vite__mapDeps([15,2,1,7])).then(e=>({default:e.Login}))),lb=p.lazy(()=>Ae(()=>import("./Register-D1K9V2Cc.js"),__vite__mapDeps([16,2,1,7])).then(e=>({default:e.Register}))),cb=p.lazy(()=>Ae(()=>import("./Setup-BVVR5jB-.js"),__vite__mapDeps([17,2,1,7])).then(e=>({default:e.Setup}))),ub=p.lazy(()=>Ae(()=>import("./Join-CTPWU5Mr.js"),__vite__mapDeps([18,2,1,7])).then(e=>({default:e.Join}))),db=p.lazy(()=>Ae(()=>import("./UserSettings-CAYmVaEN.js"),__vite__mapDeps([19,2,10,1,7])).then(e=>({default:e.UserSettings}))),fb=p.lazy(()=>Ae(()=>import("./TeamList-Db3o2sd5.js"),__vite__mapDeps([20,2,1,7])).then(e=>({default:e.TeamList}))),mb=p.lazy(()=>Ae(()=>import("./TeamCreate-B9t2hKQE.js"),__vite__mapDeps([21,2,1,7])).then(e=>({default:e.TeamCreate}))),pb=p.lazy(()=>Ae(()=>import("./TeamDetail-CKsvDnnZ.js"),__vite__mapDeps([22,2,11,10,4,1,7])).then(e=>({default:e.TeamDetail}))),hb=p.lazy(()=>Ae(()=>import("./TeamSettings-DmElPUhc.js"),__vite__mapDeps([23,2,1,7])).then(e=>({default:e.TeamSettings}))),gb=p.lazy(()=>Ae(()=>import("./AdminPanel-CeJbvp1y.js"),__vite__mapDeps([24,2,1,7])).then(e=>({default:e.AdminPanel}))),xb=new Set(["login","register","setup","join","share"]),vb=new Set(["login","register","setup","join"]);function bb(){return u.jsx(Cd,{defaultTheme:"system",children:u.jsx(wh,{children:u.jsx(yb,{})})})}function yb(){const[e,t]=p.useState("dashboard"),[n,r]=p.useState(null),[o,s]=p.useState(void 0),[a,i]=p.useState(null),[m,f]=p.useState(null),[l,c]=p.useState(null),{adminKey:d}=nb(),{user:h,isLoading:g,checkSetupStatus:v}=zi();p.useEffect(()=>{fh(d)},[d]);const[C,b]=p.useState(!1);p.useEffect(()=>{!g&&!h?v().then(b):h&&b(!1)},[g,h,v]);const _=p.useCallback(()=>{const T=window.location.pathname,M=new URLSearchParams(window.location.search);if(M.get("acp")==="1"){const U=sessionStorage.getItem("acp_connection");if(U)try{const q=JSON.parse(U);if(q.url&&q.token){c({url:q.url,token:q.token}),sessionStorage.removeItem("acp_connection");const N=new URL(window.location.href);N.searchParams.delete("acp"),window.history.replaceState(null,"",N),t("acp");return}}catch{sessionStorage.removeItem("acp_connection")}}const F=M.get("sid");if(F){new URL(window.location.href).searchParams.delete("sid"),window.history.replaceState(null,"",`/code/${F}`),r(F),f(null),t("session");return}if(T==="/login"){t("login");return}if(T==="/register"){t("register");return}if(T==="/setup"){t("setup");return}if(T==="/join"){t("join");return}if(T==="/settings"){t("settings");return}if(T==="/admin"){t("admin");return}if(T==="/teams/new"){t("team-create");return}if(T.match(/^\/teams\/([^/]+)\/settings$/)){t("team-settings");return}if(T.match(/^\/teams\/([^/]+)$/)){t("team-detail");return}if(T==="/teams"){t("teams");return}const S=T.match(/^\/code\/s\/([^/]+)/);if(S&&S[1]){f(S[1]),r(null),s(void 0),t("share");return}const w=T.match(/^\/code\/a\/([^/]+)/);if(w&&w[1]){i(w[1]),r(null),s(void 0),f(null),t("artifact-view");return}if(T==="/code/artifacts"||T==="/code/artifacts/"){i(null),r(null),s(void 0),f(null),t("artifacts");return}const B=T.match(/^\/code\/claim\/([^/]+)/);if(B&&B[1]){t("claim");return}const P=T.match(/^\/code\/([^/]+)/);P&&P[1]?(r(P[1]),s(void 0),f(null),t("session")):(r(null),s(void 0),f(null),t("dashboard"))},[]);p.useEffect(()=>(_(),window.addEventListener("popstate",_),()=>window.removeEventListener("popstate",_)),[_]);const A=p.useCallback(T=>{window.history.pushState(null,"",`/code/${T}`),r(T),s(void 0),f(null),i(null),t("session")},[]),E=p.useCallback(()=>{window.history.pushState(null,"","/code/artifacts"),i(null),r(null),s(void 0),f(null),t("artifacts")},[]),L=p.useCallback(()=>{window.history.pushState(null,"","/code/"),r(null),s(void 0),f(null),i(null),c(null),t("dashboard")},[]),k=(()=>{let T=e;return g||(C&&T!=="setup"&&T!=="join"&&(T="setup"),!h&&!xb.has(T)&&(T="login"),h&&(T==="login"||T==="setup")&&(T="dashboard")),T})();if(p.useEffect(()=>{g||(k==="setup"&&window.location.pathname!=="/setup"?window.history.replaceState(null,"","/setup"):k==="login"&&window.location.pathname!=="/login"?window.history.replaceState(null,"","/login"):k==="dashboard"&&h&&window.location.pathname!=="/code/"&&window.history.replaceState(null,"","/code/"))},[k,h,g]),g)return u.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-muted",children:"Loading..."});const j=()=>{if(l&&k==="acp")return u.jsx(eb,{url:l.url,token:l.token,onBack:L});switch(k){case"login":return u.jsx(ib,{onSuccess:L,onNavigateRegister:()=>t("register")});case"register":return u.jsx(lb,{onSuccess:L,onBack:()=>t("login")});case"setup":return u.jsx(cb,{onSuccess:L,onAlreadyDone:L});case"join":return u.jsx(ub,{onSuccess:L,onInvalidInvite:L});case"settings":return u.jsx(db,{});case"teams":return u.jsx(fb,{});case"team-create":return u.jsx(mb,{});case"team-detail":return u.jsx(pb,{});case"team-settings":return u.jsx(hb,{});case"admin":return(h==null?void 0:h.role)!=="admin"?u.jsx("div",{className:"flex flex-1 items-center justify-center",children:u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"text-status-error",children:"403 — Admin access required"}),u.jsx("a",{href:"/code/",className:"mt-4 inline-block text-brand hover:underline",children:Fe("nav.dashboard")})]})}):u.jsx(gb,{});case"share":return u.jsx(ob,{});case"claim":return u.jsx(ab,{});case"artifacts":return u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(zs,{})});case"artifact-view":return a?u.jsx(sb,{artifactId:a,onBack:E}):u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(zs,{})});case"session":return n?u.jsx(rb,{sessionId:n,onSessionLoaded:T=>s(T.source)},n):u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(Us,{onNavigateSession:A})});default:return u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(Us,{onNavigateSession:A})})}},x=!vb.has(k),y=k==="artifact-view";return u.jsxs("div",{className:"flex h-screen flex-col bg-surface-0 text-text-primary",children:[x&&u.jsx(Sh,{sessionTitle:n||(l?"ACP":void 0),sessionSource:l?"acp":o,onBack:n||l||m?L:void 0,onNavigateArtifacts:y?void 0:E}),u.jsx(p.Suspense,{fallback:u.jsx("div",{className:"flex flex-1 items-center justify-center text-text-muted",children:"Loading..."}),children:j()})]})}Lv();mc.createRoot(document.getElementById("root")).render(u.jsx(p.StrictMode,{children:u.jsx(bb,{})}));export{Pb as $,Gr as A,xe as B,wx as C,Bi as D,Zb as E,Ru as F,Hb as G,ty as H,Gb as I,qb as J,ny as K,ua as L,Mv as M,Bb as N,uv as O,Zu as P,Ob as Q,iy as R,sd as S,sy as T,bd as U,ey as V,Jb as W,dn as X,Fb as Y,Db as Z,Lb as _,Qv as a,zb as a0,Kb as a1,Wb as a2,Vb as a3,Yb as a4,Ub as a5,$b as a6,Xb as a7,Qb as a8,Ks as a9,ee as aa,Dv as ab,ae as ac,kt as ad,au as ae,Eb as af,jb as ag,Mb as ah,ph as ai,Rb as aj,_b as ak,Tb as al,Ib as am,Fe as an,Ab as ao,Gv as ap,su as aq,zi as ar,Fi as as,vh as at,wr as b,dx as c,un as d,Kt as e,ca as f,ju as g,ay as h,dv as i,Pi as j,Di as k,Tn as l,sh as m,ys as n,Oi as o,fa as p,Pl as q,Dl as r,Ol as s,cv as t,lv as u,ld as v,fd as w,ry as x,og as y,gd as z};
|