@puddle-code/cli 0.3.1 → 0.3.3
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/CHANGELOG.md +8 -4
- package/dist/host-control.mjs +38 -7
- package/dist/index.js +162 -32
- package/dist/public/assets/App-CkunCEjY.js +2 -0
- package/dist/public/assets/Dashboard-3XQN7EWB.js +1 -0
- package/dist/public/assets/EditorTabClose-CCYbaxcQ.js +1 -0
- package/dist/public/assets/FindWidget-BsFwo-Vf.js +1 -0
- package/dist/public/assets/LazyTerminal-CRonN-zb.js +2 -0
- package/dist/public/assets/{ModelRefcount-DaHZ2vpK.js → ModelRefcount-BdmA-Mgb.js} +1 -1
- package/dist/public/assets/NewProjectDialog-Bsp8NGgY.js +1 -0
- package/dist/public/assets/PaneEditorBody-MSWyifa9.js +299 -0
- package/dist/public/assets/PdfViewer-C3kK31fw.js +2 -0
- package/dist/public/assets/SettingsDialog-CGT3gjKB.js +8 -0
- package/dist/public/assets/Terminal-_KJe85Cp.js +66 -0
- package/dist/public/assets/Workspace-ZdFFHXHa.js +20 -0
- package/dist/public/assets/abnfDiagram-VCTEODGH-CIbaiPRK.js +1 -0
- package/dist/public/assets/architecture-7GRP2DOG-C37y6gLW.js +1 -0
- package/dist/public/assets/architectureDiagram-5GKGNRK7-OE8n13hC.js +36 -0
- package/dist/public/assets/auth-C3Hg0pRq.js +73 -0
- package/dist/public/assets/{blockDiagram-I7D4REHJ-BnnIsbDF.js → blockDiagram-I7D4REHJ-TUFuv4qI.js} +1 -1
- package/dist/public/assets/buffer-store-De6oYRzb.js +16 -0
- package/dist/public/assets/button-DkCgQgIz.js +1 -0
- package/dist/public/assets/{c4Diagram-7LVT6UL2-CSC_Hbql.js → c4Diagram-7LVT6UL2-Cwvhq15S.js} +1 -1
- package/dist/public/assets/channel-Bl1m0NKH.js +1 -0
- package/dist/public/assets/chunk-2E4U76K2-3abpRZU5.js +2 -0
- package/dist/public/assets/chunk-2ZTRR5NV-NvRGlFrK.js +2 -0
- package/dist/public/assets/chunk-3Z5EZCMW-DiR4QWP9.js +1 -0
- package/dist/public/assets/{chunk-4HAMMTFA-CFf6LTHp.js → chunk-4HAMMTFA-eolw8o4c.js} +1 -1
- package/dist/public/assets/chunk-5V3GS4D5-C1iY134n.js +1 -0
- package/dist/public/assets/chunk-6AZGARVD-_0gi5QUW.js +1 -0
- package/dist/public/assets/chunk-6EIED4P4-BxkNo1Kd.js +1 -0
- package/dist/public/assets/chunk-6K3QC6MW-3E45BuBF.js +1 -0
- package/dist/public/assets/chunk-6TQVIW2G-CakkaKNk.js +1 -0
- package/dist/public/assets/chunk-747NJXEK-pfB9pTl1.js +2 -0
- package/dist/public/assets/{chunk-75Z2AOVW-DmsoAjw5.js → chunk-75Z2AOVW-CYC6lmPG.js} +1 -1
- package/dist/public/assets/{chunk-CLGD4ZFX-Dx1fE4HX.js → chunk-CLGD4ZFX-85mvsF4F.js} +1 -1
- package/dist/public/assets/chunk-DU6HZSFF-1ZoT19aa.js +125 -0
- package/dist/public/assets/{chunk-F27PBJKO-BSaAmHi0.js → chunk-F27PBJKO-DM71futS.js} +1 -1
- package/dist/public/assets/{chunk-GMAD6QVW-Dna8BJJq.js → chunk-GMAD6QVW-BzDEhlK8.js} +1 -1
- package/dist/public/assets/{chunk-GVQU2GXP-DOhlGSDl.js → chunk-GVQU2GXP-CZrUjjq3.js} +1 -1
- package/dist/public/assets/chunk-I5DQTOEV-Dcwirj_w.js +1 -0
- package/dist/public/assets/chunk-ICYGCRZG-BJAGKQA9.js +1 -0
- package/dist/public/assets/chunk-IH6LHLGP-BN2I9ljI.js +1 -0
- package/dist/public/assets/{chunk-IMKFNOWR-D65oIwAv.js → chunk-IMKFNOWR-CLsPi8Op.js} +1 -1
- package/dist/public/assets/chunk-KI3K4JFJ-v5_17D28.js +1 -0
- package/dist/public/assets/{chunk-L3NEJ4N5-BwcBPm7M.js → chunk-L3NEJ4N5-BW3s5_r9.js} +1 -1
- package/dist/public/assets/{chunk-OSK3NFVY-82MNmgWe.js → chunk-OSK3NFVY-Cs_K17E_.js} +1 -1
- package/dist/public/assets/chunk-OUJLGHUK-FHDQe81Z.js +2 -0
- package/dist/public/assets/{chunk-P2QGCYS3-CfrZ7JB4.js → chunk-P2QGCYS3-C5-f0Lvg.js} +1 -1
- package/dist/public/assets/{chunk-POPQ4Y6H-CHs8yAQU.js → chunk-POPQ4Y6H-gkafJx1Z.js} +1 -1
- package/dist/public/assets/{chunk-PWAF6VOD-BXxrEmLT.js → chunk-PWAF6VOD-CTSTb7zN.js} +1 -1
- package/dist/public/assets/{chunk-SHT3W25Y-DMUmvTem.js → chunk-SHT3W25Y-Cg6sVFNA.js} +1 -1
- package/dist/public/assets/{chunk-SVP7TREG-CPru3m3o.js → chunk-SVP7TREG-DRUnItYx.js} +1 -1
- package/dist/public/assets/{chunk-TICWLB2K-zN8e4oYt.js → chunk-TICWLB2K-HtG8ibWH.js} +1 -1
- package/dist/public/assets/chunk-TLUHSLCS-CcE5HWjm.js +2 -0
- package/dist/public/assets/chunk-UY3FDG6J-DHD-4eXF.js +1 -0
- package/dist/public/assets/chunk-XHIXRSVI-DRL0dwtI.js +1 -0
- package/dist/public/assets/classDiagram-ZZMXUADV-AgT8hWlv.js +1 -0
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-AgT8hWlv.js +1 -0
- package/dist/public/assets/client-settings-CwqpIric.js +1 -0
- package/dist/public/assets/context-menu-0Tb8cG9E.js +1 -0
- package/dist/public/assets/copy-CKvSfzPk.js +1 -0
- package/dist/public/assets/cssMode-CSjHtANE.js +1 -0
- package/dist/public/assets/cynefin-OW5HDTMX-Dy2ZNO0g.js +1 -0
- package/dist/public/assets/cynefinDiagram-5FMLGOSQ-C2miE5p0.js +62 -0
- package/dist/public/assets/{dagre-GXQ25YYZ-t9AbgVhY.js → dagre-GXQ25YYZ-BjnR_o63.js} +1 -1
- package/dist/public/assets/{diagram-S7CK7UJ4-BldMPLHQ.js → diagram-S7CK7UJ4-CBYedG6v.js} +3 -3
- package/dist/public/assets/diagram-UQ7AKVKN-CUL346-t.js +41 -0
- package/dist/public/assets/diagram-VSXAHHWV-1DKb_UJ5.js +3 -0
- package/dist/public/assets/{diagram-VX7I27RA-DtaAnFuF.js → diagram-VX7I27RA-DYP31PbY.js} +2 -2
- package/dist/public/assets/{diagram-Z3DM3KII-Bu1-SbmM.js → diagram-Z3DM3KII-C-mC8cmq.js} +1 -1
- package/dist/public/assets/dialog-UpZ_vNTE.js +41 -0
- package/dist/public/assets/disclosure-D7vpyXdR.js +1 -0
- package/dist/public/assets/dist-C2WZA469.js +1 -0
- package/dist/public/assets/dist-v3Pwgb3Q.js +1 -0
- package/dist/public/assets/ebnfDiagram-PWID7BFC-CnSa44Tb.js +1 -0
- package/dist/public/assets/{erDiagram-RLTQ6QDP-C359QLoG.js → erDiagram-RLTQ6QDP-ZmDlrO9k.js} +1 -1
- package/dist/public/assets/{errors-1cUzcK5v.js → errors-BH_S68Hd.js} +1 -1
- package/dist/public/assets/eventmodeling-NTZA5JFV-uFnlWNGc.js +1 -0
- package/dist/public/assets/flowDiagram-HODETNUW-CW47qpBT.js +1 -0
- package/dist/public/assets/{ganttDiagram-EL5Y4UJY-xq_Yuf1R.js → ganttDiagram-EL5Y4UJY-raM_gefY.js} +1 -1
- package/dist/public/assets/gitGraph-4MIJSDKK-1PxNX92k.js +1 -0
- package/dist/public/assets/gitGraphDiagram-WWUBYQGX-DnLrgk4s.js +106 -0
- package/dist/public/assets/htmlMode-CIHMS93l.js +1 -0
- package/dist/public/assets/index-xDhpMZgv.js +10 -0
- package/dist/public/assets/info-A6RAGUB7-BZV44TW1.js +1 -0
- package/dist/public/assets/infoDiagram-27XIBGKW-eCv-Vsx8.js +2 -0
- package/dist/public/assets/{ishikawaDiagram-5VMMS53U-Bob975Xt.js → ishikawaDiagram-5VMMS53U-DCFnvrdr.js} +1 -1
- package/dist/public/assets/{journeyDiagram-3NMN7TZE-x9ssExSV.js → journeyDiagram-3NMN7TZE-6o4KvbhJ.js} +1 -1
- package/dist/public/assets/{jsonMode-CmlPrpF1.js → jsonMode-BijgXT6I.js} +1 -1
- package/dist/public/assets/jsx-runtime-ffCh33zF.js +1 -0
- package/dist/public/assets/{kanban-definition-UXKFOSKX-Cy8SkNND.js → kanban-definition-UXKFOSKX-CQKuhkFV.js} +1 -1
- package/dist/public/assets/{line-C0YxHEKk.js → line-D4r_bmlv.js} +1 -1
- package/dist/public/assets/markdown-mermaid-D0nzztEz.js +2 -0
- package/dist/public/assets/{math-B4Pf1FaR.js → math-CSw6sgCC.js} +2 -2
- package/dist/public/assets/math-delimiters-BCnTi7Ii.js +1 -0
- package/dist/public/assets/media-refresh-store-Ddvr6wz1.js +1 -0
- package/dist/public/assets/mermaid-parser.core-CICMKhjq.js +4 -0
- package/dist/public/assets/mermaid.core-D2QzpYEE.js +11 -0
- package/dist/public/assets/{mindmap-definition-YA3MSWOX-B6ghAwaT.js → mindmap-definition-YA3MSWOX-DAB8mHOv.js} +1 -1
- package/dist/public/assets/monaco.contribution-C0TYpF88.js +2 -0
- package/dist/public/assets/notification-delivery-CDu_5PS7.js +1 -0
- package/dist/public/assets/packet-AYTQ26CC-Cw5JteoC.js +1 -0
- package/dist/public/assets/{pdf-C7rjnygQ.js → pdf-EQHMWEbX.js} +1 -1
- package/dist/public/assets/pegDiagram-XKGWAZYB-BE_LYTdh.js +1 -0
- package/dist/public/assets/pie-WAS4IAKB-CnPKaBaN.js +1 -0
- package/dist/public/assets/pieDiagram-E7YTZNPT-BRffiJ1a.js +39 -0
- package/dist/public/assets/preload-helper-Czpn1I53.js +1 -0
- package/dist/public/assets/project-abbrev-Br6sQqPh.js +1 -0
- package/dist/public/assets/protocol-support-CLMCHX8i.js +1 -0
- package/dist/public/assets/{quadrantDiagram-AXDQQJYC-DRGzxdVf.js → quadrantDiagram-AXDQQJYC-DYWp1Jjq.js} +1 -1
- package/dist/public/assets/radar-RG4KPBEZ-Dqx79rlE.js +1 -0
- package/dist/public/assets/railroad-74A4TZTK-BkDQqaz7.js +1 -0
- package/dist/public/assets/railroad-abnf-HS5TGJTU-kgqWL-Ba.js +1 -0
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-GspfOzjs.js +1 -0
- package/dist/public/assets/railroad-peg-WCYAUIDC-qO23KZap.js +1 -0
- package/dist/public/assets/railroadDiagram-O6MQD6OU-wuPYUWJ2.js +1 -0
- package/dist/public/assets/{requirementDiagram-BXWQKSXE-CSioB-S4.js → requirementDiagram-BXWQKSXE-BtGNZ92J.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-P5KCCOFB-Be_RNG6h.js → sankeyDiagram-P5KCCOFB-XgIIrsbe.js} +1 -1
- package/dist/public/assets/{scroll-restoration-C6CrXFrx.js → scroll-restoration-hNqYmCAE.js} +1 -1
- package/dist/public/assets/selection-actions-Bh9Fkkqv.js +1 -0
- package/dist/public/assets/{sequenceDiagram-WJ2MYXX4-QO7Ba1BQ.js → sequenceDiagram-WJ2MYXX4-CVIIE7ze.js} +1 -1
- package/dist/public/assets/{stateDiagram-D77RDMKH-B52l08Ki.js → stateDiagram-D77RDMKH-0kIDexDQ.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH-DdU6a-zG.js +1 -0
- package/dist/public/assets/{swimlanes-42K2YHIH-CEkCp-cn.js → swimlanes-42K2YHIH-BY2JV_Jb.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-BCiIa4tX.js +8 -0
- package/dist/public/assets/switch-SW6BMps1.js +1 -0
- package/dist/public/assets/{timeline-definition-24CTP7MA-0rICk4bz.js → timeline-definition-24CTP7MA-CPRUSXUS.js} +1 -1
- package/dist/public/assets/treeView-Q6P3EWNA-CiZNqz_z.js +1 -0
- package/dist/public/assets/treemap-WGGIJYW6-5hDYDC6e.js +1 -0
- package/dist/public/assets/{tsMode-iBk8vwDB.js → tsMode-B7q3gz7a.js} +1 -1
- package/dist/public/assets/use-ui-state-BiAROr3D.js +1 -0
- package/dist/public/assets/{vennDiagram-4TSXK5OY-B1JUHS0H.js → vennDiagram-4TSXK5OY-CU1Q7iGV.js} +1 -1
- package/dist/public/assets/view-state-store-C6OmciCC.js +1 -0
- package/dist/public/assets/wardley-WFR3VGLG-CWb_ROLo.js +1 -0
- package/dist/public/assets/{wardleyDiagram-VM6X3IG4-WNi3mtNy.js → wardleyDiagram-VM6X3IG4-B2Pn7CDF.js} +3 -3
- package/dist/public/assets/whole-word-2m2pmAFT.js +1 -0
- package/dist/public/assets/workers-Ck67TJT4.js +1 -0
- package/dist/public/assets/ws-DNNH0sEH.js +1 -0
- package/dist/public/assets/{xychartDiagram-S5SC5T6Z-CbKt4_V3.js → xychartDiagram-S5SC5T6Z-xhQ4tT_S.js} +1 -1
- package/dist/public/index.html +5 -1
- package/dist/pudl.js +45 -13
- package/package.json +1 -1
- package/dist/public/assets/App-CNmIJjl_.js +0 -2
- package/dist/public/assets/Dashboard-CXo8Im5Y.js +0 -1
- package/dist/public/assets/EditorTabClose--kyKHSwZ.js +0 -1
- package/dist/public/assets/FindWidget-PycvFKIo.js +0 -1
- package/dist/public/assets/LazyTerminal-CAhb0T8p.js +0 -2
- package/dist/public/assets/NewProjectDialog-BWkhYVKJ.js +0 -1
- package/dist/public/assets/PaneEditorBody-DKpaey4n.js +0 -299
- package/dist/public/assets/PdfViewer-B-O3C5Fb.js +0 -2
- package/dist/public/assets/SettingsDialog-DxI5UQty.js +0 -8
- package/dist/public/assets/Terminal-DE7QO3Lv.js +0 -66
- package/dist/public/assets/Workspace-CcPBZYc6.js +0 -20
- package/dist/public/assets/abnfDiagram-VCTEODGH-Bn8NH7EO.js +0 -1
- package/dist/public/assets/architecture-7GRP2DOG-Di8Z0gNN.js +0 -1
- package/dist/public/assets/architectureDiagram-5GKGNRK7-rXpMU6RM.js +0 -36
- package/dist/public/assets/buffer-store-B24QspY2.js +0 -16
- package/dist/public/assets/button-CcKBhdZO.js +0 -1
- package/dist/public/assets/channel-BpgRfG_m.js +0 -1
- package/dist/public/assets/chunk-2E4U76K2-BBFx22L7.js +0 -2
- package/dist/public/assets/chunk-DU6HZSFF-p5k9qXhh.js +0 -125
- package/dist/public/assets/chunk-TLUHSLCS-D9SadBk_.js +0 -2
- package/dist/public/assets/classDiagram-ZZMXUADV-Cvjt82YE.js +0 -1
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-Cvjt82YE.js +0 -1
- package/dist/public/assets/context-menu-DeidX0Pi.js +0 -1
- package/dist/public/assets/copy-DWjBcRsB.js +0 -1
- package/dist/public/assets/cssMode-CZGyU_SG.js +0 -1
- package/dist/public/assets/cynefin-OW5HDTMX-DWHI9hMS.js +0 -1
- package/dist/public/assets/cynefinDiagram-5FMLGOSQ-D6ufz00C.js +0 -62
- package/dist/public/assets/diagram-UQ7AKVKN-D9T4tJbc.js +0 -41
- package/dist/public/assets/diagram-VSXAHHWV-Dh7CRewi.js +0 -3
- package/dist/public/assets/dialog-CxBgPsab.js +0 -41
- package/dist/public/assets/disclosure-BH-wuD_D.js +0 -1
- package/dist/public/assets/dist-D5t_kbYW.js +0 -1
- package/dist/public/assets/dist-qyIRFVt1.js +0 -1
- package/dist/public/assets/ebnfDiagram-PWID7BFC-DInnl0wx.js +0 -1
- package/dist/public/assets/eventmodeling-NTZA5JFV-BQVYxt7A.js +0 -1
- package/dist/public/assets/flowDiagram-HODETNUW--HTl_4V1.js +0 -1
- package/dist/public/assets/gitGraph-4MIJSDKK-U5qKRzrG.js +0 -1
- package/dist/public/assets/gitGraphDiagram-WWUBYQGX-BcXQM8eP.js +0 -106
- package/dist/public/assets/htmlMode-23yFfFGb.js +0 -1
- package/dist/public/assets/index-CPDXsNn7.js +0 -82
- package/dist/public/assets/info-A6RAGUB7-BXjSF_iH.js +0 -1
- package/dist/public/assets/infoDiagram-27XIBGKW-BIJ52Gpm.js +0 -2
- package/dist/public/assets/markdown-mermaid-wVNP7t8F.js +0 -2
- package/dist/public/assets/media-refresh-store-CcMOJ-U-.js +0 -1
- package/dist/public/assets/mermaid-parser.core-Cy8AG-qQ.js +0 -7
- package/dist/public/assets/mermaid.core-DoDuR-5f.js +0 -11
- package/dist/public/assets/notification-delivery-0LhR-ShC.js +0 -1
- package/dist/public/assets/packet-AYTQ26CC-BpWwI2oX.js +0 -1
- package/dist/public/assets/pegDiagram-XKGWAZYB-yj3GPtMG.js +0 -1
- package/dist/public/assets/pie-WAS4IAKB-DvE_icUX.js +0 -1
- package/dist/public/assets/pieDiagram-E7YTZNPT-DdwpR7qt.js +0 -39
- package/dist/public/assets/project-abbrev-DUQCetLc.js +0 -1
- package/dist/public/assets/protocol-support-DWTHwckn.js +0 -1
- package/dist/public/assets/radar-RG4KPBEZ-BMUoktqq.js +0 -1
- package/dist/public/assets/railroad-74A4TZTK-CRCU-hfz.js +0 -1
- package/dist/public/assets/railroad-abnf-HS5TGJTU-DgF_7Rby.js +0 -1
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-yoQjOTe4.js +0 -1
- package/dist/public/assets/railroad-peg-WCYAUIDC-Bi2UnAcg.js +0 -1
- package/dist/public/assets/railroadDiagram-O6MQD6OU-DoYXFCYn.js +0 -1
- package/dist/public/assets/selection-actions-BuV-nTRE.js +0 -1
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH-DyfZNcXp.js +0 -1
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-9I9MU74C.js +0 -8
- package/dist/public/assets/switch-B5sIV745.js +0 -1
- package/dist/public/assets/treeView-Q6P3EWNA-UwjA1jwm.js +0 -1
- package/dist/public/assets/treemap-WGGIJYW6-BWpfnhSW.js +0 -1
- package/dist/public/assets/use-ui-state-Bxj6PnLE.js +0 -1
- package/dist/public/assets/view-state-store-B5KgrWCh.js +0 -1
- package/dist/public/assets/wardley-WFR3VGLG-DGkljHJE.js +0 -1
- package/dist/public/assets/ws-D9g0r8Jb.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{$ as n,A as r,C as i,R as a,S as o,n as s,p as c,rt as l,w as u,x as d,z as f}from"./index-CPDXsNn7.js";import{i as p,n as m}from"./dist-qyIRFVt1.js";import{t as h}from"./copy-DWjBcRsB.js";import{t as g}from"./button-CcKBhdZO.js";import{t as _}from"./x-CZCUod6A.js";import{t as v}from"./createLucideIcon-DyMAgLa3.js";import{t as y}from"./ws-D9g0r8Jb.js";var b=v(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),ee=v(`clipboard-paste`,[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]),x=v(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),S=v(`regex`,[[`path`,{d:`M17 3v10`,key:`15fgeh`}],[`path`,{d:`m12.67 5.5 8.66 5`,key:`1gpheq`}],[`path`,{d:`m12.67 10.5 8.66-5`,key:`1dkfa6`}],[`path`,{d:`M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z`,key:`swwfx4`}]]),C=v(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]);function w(){return c.get()}var T=32,te=2048;function E(e,t,n){let r=e.getLine(t);if(!r)return null;let i=e.getNullCell(),a=``,o=[];for(let s=0;s<Math.min(n,r.length);s++){if(!r.getCell(s,i)||i.getWidth()===0)continue;if(s===n-1&&i.getChars()===``){let n=e.getLine(t+1);if(n?.isWrapped&&n.getCell(0)?.getWidth()===2)continue}let c=i.getChars()||` `;a+=c;for(let e=0;e<c.length;e++)o.push({row:t,col:s})}return{text:a,cells:o,isWrapped:r.isWrapped}}function ne(e,t,n){return{...e,text:e.text.slice(t,n),cells:e.cells.slice(t,n)}}function D(e,t,n,r,i){if(t<0||n<1)return[];let a=Math.max(0,t-T+1),o=new Map;for(let r=a;r<t+T;r++){let t=E(e,r,n);if(!t)break;o.set(r,t)}let s=new Set,c=[];for(let l of[!0,!1])for(let u=a;u<=t;u++){if(o.get(u)?.isWrapped&&u>a)continue;let d=``,f=[];for(let a=u;a<u+T;a++){let p=o.get(a);if(!p)break;let m=o.get(a-1);if(a>u&&!p.isWrapped&&!(l&&m&&i(m,p,n,d)))break;let h=o.get(a+1),g=ne(p,a>u&&!p.isWrapped?p.text.length-p.text.trimStart().length:0,h?.isWrapped?p.text.length:p.text.trimEnd().length);if(d.length+g.text.length>te)break;if(d+=g.text,f.push(...g.cells),!(a<t))for(let n of r(d)){let r=f[n.start],i=f[n.end-1];if(!r||!i||r.row>t||i.row<t)continue;let a=`${d.slice(n.start,n.end)}\0${r.row}:${r.col}-${i.row}:${i.col}`;if(s.has(a))continue;s.add(a);let o=e.getLine(i.row)?.getCell(i.col)?.getWidth()??1;c.push({candidate:n,start:r,end:{row:i.row,col:i.col+Math.max(1,o)-1},text:d.slice(n.start,n.end)})}}}return c.sort((e,t)=>t.text.length-e.text.length)}var re=a.options.join(`,`),O=i.imageBytes,ie=20*1024*1024;async function ae(e,t,n){n?.throwIfAborted();let r=a.safeParse(e.type);if(!r.success)throw Error(`Choose a PNG, JPEG, GIF or WebP image.`);if(e.size===0)throw Error(`This image is empty.`);if(e.size>ie)throw Error(`Choose an image smaller than 20 MiB.`);if(!t||e.size<=O)return{blob:e,mime:r.data,resized:!1};if(r.data===`image/gif`)throw Error(`Choose a GIF no larger than 4 MiB for remote access.`);let i=await createImageBitmap(e);try{n?.throwIfAborted();let e=document.createElement(`canvas`),t=e.getContext(`2d`);if(!t)throw Error(`Could not prepare this image.`);let o=r.data===`image/jpeg`?`image/jpeg`:`image/webp`,s=Math.min(1,2048/Math.max(i.width,i.height));for(let r=0;r<8;r++){e.width=Math.max(1,Math.round(i.width*s)),e.height=Math.max(1,Math.round(i.height*s)),t.drawImage(i,0,0,e.width,e.height);for(let t of[.85,.7,.55]){let r=await new Promise(n=>e.toBlob(n,o,t));if(n?.throwIfAborted(),r&&r.size<=O)return{blob:r,mime:a.parse(r.type),resized:!0}}s*=.75}throw Error(`This image is too large to attach remotely. Choose a smaller image.`)}finally{i.close()}}var k=new WeakSet,oe=Math.floor((r.requestBytes-1024)*3/4);async function se(e,t,r,a,o,s,c){let d=e.generation,p=()=>{if(s?.throwIfAborted(),o(),e.generation!==d)throw Error(`The connection changed; the image upload was interrupted.`)};if(p(),!r.size||r.size>i.imageBytes)throw Error(`The prepared image must be no larger than 4 MiB.`);if(k.has(e))throw Error(`An image upload is already in progress.`);k.add(e);let m=crypto.randomUUID(),h=`/api/worktrees/${t}/paste-upload`,g=!1,_=!1,v=async(t,n,r)=>{p();let i=await e.request(t,n,r,s),a=await i.json();if(p(),!i.ok){let e=l.safeParse(a);throw Error(e.success?e.data.error.message:`The image upload failed.`)}return a},y=e=>v(`POST`,h,e),b=async e=>{let t=new Uint8Array(await e.arrayBuffer());return p(),btoa(Array.from(t,e=>String.fromCharCode(e)).join(``))};try{let e=n.parse(await v(`GET`,`/api/version`));if(c?.(0,r.size),!e.remote_image_uploads){if(r.size>oe)throw Error(`Update the host connector to upload images larger than 191 KiB.`);let e=await b(r),n=f.parse(await v(`POST`,`/api/worktrees/${t}/paste`,{mime:a,data:e}));return c?.(r.size,r.size),n}if(g=!0,u.parse(await y({action:`start`,upload:m,mime:a,size:r.size})).received!==0)throw Error(`Invalid image upload acknowledgement.`);for(let e=0;e<r.size;e+=i.chunkBytes){let t=r.slice(e,e+i.chunkBytes),n=await b(t),a=u.parse(await y({action:`chunk`,upload:m,offset:e,data:n}));if(a.received!==e+t.size)throw Error(`Invalid image upload acknowledgement.`);c?.(a.received,r.size)}let o=f.parse(await y({action:`finish`,upload:m}));return _=!0,o}finally{if(g&&!_&&e.generation===d)try{o(),e.request(`POST`,h,{action:`cancel`,upload:m}).catch(()=>{})}catch{}k.delete(e)}}function A(e,t,n){if(t.startsWith(`login-`)||t===`home`)return!1;let r=Array.from(e.clipboardData?.items??[]);if(r.some(e=>e.type===`text/plain`))return!1;let i=r.find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!i)return!1;let a=i.getAsFile();return a?(j(a,t,n).then(({resized:e})=>{e&&m(`Image resized for remote access`)}).catch(e=>{m.error(e instanceof Error?`Image paste failed: ${e.message}`:`Image paste failed`)}),!0):!1}async function j(e,t,n,r={}){if(t.startsWith(`login-`)||t===`home`)throw Error(`Open a project terminal to attach an image.`);let i=o(),a=i?.generation,s=()=>{if(o()!==i||i?.generation!==a||!y.isConnected())throw Error(`The terminal connection changed; the image was not inserted.`)};r.signal?.throwIfAborted(),s(),r.onProgress?.({stage:`preparing`});let{blob:c,mime:l,resized:u}=await ae(e,i!==null,r.signal);s();let d=i?await se(i,t,c,l,s,r.signal,(e,t)=>r.onProgress?.(e===t?{stage:`saving`}:{stage:`uploading`,received:e,total:t})):await(async()=>{let e=await ce(c);return s(),r.signal?.throwIfAborted(),f.parse(await p(`POST`,`/api/worktrees/${t}/paste`,{mime:l,data:e}))})();return r.signal?.throwIfAborted(),s(),r.onProgress?.({stage:`inserting`}),r.insert?r.insert(`${d.path} `):i?await i.input(t,n,`${d.path} `):y.write(t,n,`${d.path} `),{resized:u}}function ce(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).replace(/^data:[^,]*,/,``)),r.onerror=()=>n(r.error??Error(`could not read the clipboard image`)),r.readAsDataURL(e)})}var M=/(?:^|[\s"'`([<])((?:(?:\/|\.{1,2}\/|~\/)(?:[\w.+@~-]+\/)*[\w.+@~-]+|(?:[\w.+@~-]+\/)+[\w.+@~-]*|[\w.+@~-]+\.[A-Za-z]\w{0,11}))(?::(\d{1,6})(?::(\d{1,6}))?)?/dg,le=new Set([`.`,`,`,`;`,`:`,`)`,`]`,`'`,`"`]);function ue(e){let t=[],n=new RegExp(M.source,M.flags),r;for(;r=n.exec(e);){let e=r.indices,n=r[1];if(!e?.[1]||n===void 0)continue;let i=e[1][0],a=e[1][1],o=n;for(o.startsWith(`@`)&&(o=o.slice(1),i++);o.length>0&&le.has(o[o.length-1]);)o=o.slice(0,-1),a--;if(o.length===0)continue;let s=r[2]===void 0?void 0:Number.parseInt(r[2],10),c=r[3]===void 0?void 0:Number.parseInt(r[3],10),l=c!==void 0&&e[3]?e[3][1]:s!==void 0&&e[2]?e[2][1]:a;t.push({path:o,line:s,column:c,start:i,end:l})}return t}function de(e,t,n){let r=e.text.trimEnd(),i=t.text.trimStart();if(!/[\w.+@~/:-]$/.test(r)||!/^[\w.+@~:-]/.test(i)||/^(?:~\/|\.{1,2}\/)/.test(i))return!1;let a=e.cells[r.length-1];return r.endsWith(`/`)||a!==void 0&&a.col>=n-9}function fe(e,t,n){return D(e,t,n,ue,de)}function pe(e,t){return e.kind===`file`&&e.root!==void 0&&e.root!==t?e.root:null}var me=class{fetcher;now;positiveTtlMs;negativeTtlMs;maxEntries;maxConcurrent;entries=new Map;inflight=new Map;inUse=0;waiters=[];constructor(e){this.fetcher=e.fetcher,this.now=e.now??Date.now,this.positiveTtlMs=e.positiveTtlMs??15e3,this.negativeTtlMs=e.negativeTtlMs??5e3,this.maxEntries=e.maxEntries??500,this.maxConcurrent=e.maxConcurrent??4}resolve(e,t,n){let r=`${e}\0${t}`,i=this.entries.get(r);if(i){if(this.now()<i.expiresAt)return Promise.resolve(i.value);this.entries.delete(r)}let a=this.inflight.get(r);if(a)return a;let o=this.withSlot(()=>this.fetcher(e,t,n)).then(e=>(this.store(r,e),e)).finally(()=>{this.inflight.delete(r)});return this.inflight.set(r,o),o}store(e,t){let n=t?this.positiveTtlMs:this.negativeTtlMs;for(this.entries.set(e,{value:t,expiresAt:this.now()+n});this.entries.size>this.maxEntries;){let e=this.entries.keys().next().value;if(e===void 0)break;this.entries.delete(e)}}async withSlot(e){this.inUse>=this.maxConcurrent&&await new Promise(e=>this.waiters.push(e)),this.inUse++;try{return await e()}finally{this.inUse--,this.waiters.shift()?.()}}};async function N(e,t,n,r){let i=new URLSearchParams({path:t});return n!==void 0&&i.set(`line`,String(n)),r!==void 0&&i.set(`root`,r),p(`GET`,`/api/worktrees/${e}/resolve?${i}`)}function P(e,t,n){let r=e.kind??`file`;return{kind:r,path:e.path,...e.root===void 0?{}:{root:e.root},...e.relative_path===void 0?{}:{relativePath:e.relative_path},...r===`file`&&t!==void 0?{line:Math.max(1,t)}:{},...r===`file`&&n!==void 0?{column:n}:{}}}async function F(e,t,n){return P(await N(e,t,n?.line,n?.root),n?.line,n?.column)}async function I(e,t,n){try{return await N(e,t,n)}catch{return null}}function L(e,t,n){let r=new me({fetcher:I});return e.registerLinkProvider({provideLinks(i,a){let o=e.buffer.active,s=fe(o,i-1,e.cols);if(s.length===0){a(void 0);return}Promise.all(s.map(async({candidate:e,start:i,end:a,text:o})=>{let s=await r.resolve(t,e.path,e.line);return s?{range:{start:{x:i.col+1,y:i.row+1},end:{x:a.col+1,y:a.row+1}},text:o,decorations:{underline:!0,pointerCursor:!0},activate:t=>{!t.metaKey&&!t.ctrlKey||n(P(s,e.line,e.column))}}:null})).then(e=>{let t=e.filter(e=>e!==null);a(t.length>0?t:void 0)})}})}var R=e(t(),1),z={ctrl:1,alt:2,shift:4},he=/^(?:\[[ABCD]|O[ABCD]|\[1;([2-8])[ABCD])$/,B=e=>e.startsWith(`\x1B`)?he.exec(e.slice(1)):null;function V(e){return!e.startsWith(`\x1B`)||e===`\x1B`||B(e)!==null||e===`\x1B[Z`}function ge(e,t){if(!t)return e;let n=(t&z.ctrl)!==0,r=(t&z.alt)!==0,i=(t&z.shift)!==0,a=!!i|(r?2:0)|(n?4:0),o=B(e);if(o)return`\x1b[1;${1+(a|(o[1]?Number(o[1])-1:0))}${e.slice(-1)}`;if(!V(e))return e;if(e===` `||e===`\x1B[Z`)return i||e===`\x1B[Z`?`\x1B[Z`:` `;if(e===`\r`&&i)return`\x1b[13;${1+a}u`;if(i&&e.length===1){let t="`1234567890-=[]\\;',./".indexOf(e);t===-1?/[a-z]/.test(e)&&(e=e.toUpperCase()):e=`~!@#$%^&*()_+{}|:"<>?`[t]}if(n&&e.length===1){let t=e.toUpperCase().charCodeAt(0);t>=64&&t<=95?e=String.fromCharCode(t-64):e===` `?e=`\0`:e===`?`&&(e=``)}return r?`\x1b${e}`:e}function _e(e){return e.length===3&&(e.startsWith(`\x1B[`)||e.startsWith(`\x1BO`))&&`ABCD`.includes(e[2])}var H=new Map,U=new Map,W=new Map,G=new Map,K=new Set,q=e=>(K.add(e),()=>{K.delete(e)}),J=()=>{for(let e of K)e()},Y=(e,t)=>d(JSON.stringify([e,t]));function ve(e,t){return(0,R.useSyncExternalStore)(q,()=>H.has(Y(e,t)))}function ye(e,t,n,r,i){let a=Y(e,t);return H.set(a,n),r&&U.set(a,r),i?W.set(a,i):W.delete(a),J(),()=>{H.get(a)===n&&(H.delete(a),U.delete(a),W.delete(a),G.delete(a),J())}}function X(e,t){U.get(Y(e,t))?.()}function be(e,t){return(0,R.useSyncExternalStore)(q,()=>G.get(Y(e,t))??0)}function xe(e,t,n){let r=Y(e,t);G.set(r,(G.get(r)??0)^n),J()}function Z(e,t,n){let r=Y(e,t),i=G.get(r)??0;return!i||!V(n)?n:(G.delete(r),J(),ge(n,i))}async function Se(e,t,n,r=!1){let i=Y(e,t),a=H.get(i);if(!a)throw Error(`Wait for the terminal to attach; nothing was sent`);let o=r?`${a(n)}\r`:Z(e,t,n);!r&&_e(o)&&W.get(i)?.()&&(o=`\x1bO${o.slice(-1)}`),await Q(e,t,o)}async function Ce(e,t,n){let r=Y(e,t),i=H.get(r),a=o(),s=a?.generation;if(!i||!n()||!y.isConnected())throw Error(`Wait for the terminal to attach; nothing was pasted.`);let c;try{let n=navigator.clipboard.readText();X(e,t),c=await n}catch{throw Error(`Could not read the clipboard. Allow clipboard access or use your keyboard’s Paste action.`)}if(!n()||H.get(r)!==i||o()!==a||a?.generation!==s||!y.isConnected())throw Error(`The terminal changed; nothing was pasted. Try again in the active terminal.`);c&&await Q(e,t,i(c))}async function Q(e,t,n){let r=o();if(r)await r.input(e,t,n);else{if(!y.isConnected())throw Error(`Terminal is disconnected; nothing was sent`);y.write(e,t,n)}}var $=s();function we({text:e,label:t,clear:n,paste:r}){let[i,a]=(0,R.useState)(!1);return(0,$.jsxs)(`div`,{role:`toolbar`,"aria-label":t,onPointerDown:e=>e.preventDefault(),className:`absolute right-2 top-2 z-20 flex gap-1 rounded-md bg-elevated p-1 shadow-lg`,children:[(0,$.jsxs)(g,{variant:`ghost`,size:`sm`,disabled:!e||i,onClick:async()=>{try{await navigator.clipboard.writeText(e),n()}catch{m.error(`Could not copy the selection. Try again.`)}},children:[(0,$.jsx)(h,{}),` Copy`]}),r&&(0,$.jsxs)(g,{variant:`ghost`,size:`sm`,disabled:i,onClick:async()=>{if(!i){a(!0);try{await r(),n()}catch(e){m.error(e instanceof Error?e.message:`Could not paste. Try again.`)}finally{a(!1)}}},children:[(0,$.jsx)(ee,{}),` Paste`]}),(0,$.jsx)(g,{variant:`ghost`,size:`icon`,"aria-label":`Clear selection`,disabled:i,onClick:n,children:(0,$.jsx)(_,{})})]})}export{b as C,x as S,D as _,ye as a,C as b,ve as c,pe as d,L as f,re as g,j as h,Ce as i,be as l,A as m,Z as n,Se as o,F as p,X as r,xe as s,we as t,z as u,E as v,S as x,w as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-p5k9qXhh.js";import"./chunk-75Z2AOVW-DmsoAjw5.js";import"./chunk-PWAF6VOD-BXxrEmLT.js";import"./chunk-GMAD6QVW-Dna8BJJq.js";import"./chunk-P2QGCYS3-CfrZ7JB4.js";import"./chunk-4HAMMTFA-CFf6LTHp.js";import"./chunk-GVQU2GXP-DOhlGSDl.js";import"./chunk-OSK3NFVY-82MNmgWe.js";import"./chunk-F27PBJKO-BSaAmHi0.js";import"./chunk-XXDRQBXY-BuE3VzE_.js";import"./chunk-POPQ4Y6H-CHs8yAQU.js";import"./chunk-L3NEJ4N5-BwcBPm7M.js";import"./chunk-TLUHSLCS-D9SadBk_.js";import{i as t,n,r,t as i}from"./chunk-IMKFNOWR-D65oIwAv.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-p5k9qXhh.js";import"./chunk-75Z2AOVW-DmsoAjw5.js";import"./chunk-PWAF6VOD-BXxrEmLT.js";import"./chunk-GMAD6QVW-Dna8BJJq.js";import"./chunk-P2QGCYS3-CfrZ7JB4.js";import"./chunk-4HAMMTFA-CFf6LTHp.js";import"./chunk-GVQU2GXP-DOhlGSDl.js";import"./chunk-OSK3NFVY-82MNmgWe.js";import"./chunk-F27PBJKO-BSaAmHi0.js";import"./chunk-XXDRQBXY-BuE3VzE_.js";import"./chunk-POPQ4Y6H-CHs8yAQU.js";import"./chunk-L3NEJ4N5-BwcBPm7M.js";import"./chunk-TLUHSLCS-D9SadBk_.js";import"./chunk-LNGE3PJU-DNNNwF8Y.js";import{r as t,t as n}from"./chunk-SHT3W25Y-DMUmvTem.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)}
|
|
2
|
-
.swimlane.cluster rect {
|
|
3
|
-
stroke: ${e.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,`getStyles`)});export{r as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{X as n,n as r}from"./index-CPDXsNn7.js";import{S as i,T as a,h as o,w as s}from"./dialog-CxBgPsab.js";import{a as c}from"./button-CcKBhdZO.js";import{v as l}from"./LazyTerminal-CAhb0T8p.js";import{n as u}from"./x-CZCUod6A.js";import{t as d}from"./createLucideIcon-DyMAgLa3.js";var f=e(t(),1),p=r(),m=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`}),h=`VisuallyHidden`,g=f.forwardRef((e,t)=>(0,p.jsx)(i.span,{...e,ref:t,style:{...m,...e.style}}));g.displayName=h;var _=g,v=d(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),y=d(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),b=d(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),x=d(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),S=d(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),C=d(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),w=new Set;function T(e){let t=/^#settings\/([\w-]+)$/.exec(e);return t?t[1]:null}var E=T(window.location.hash);function D(){let e=E?`#settings/${E}`:``;window.location.hash!==e&&history.replaceState(null,``,window.location.pathname+window.location.search+e)}function O(e){if(e!==E){E=e;for(let e of w)e()}queueMicrotask(D)}window.addEventListener(`hashchange`,()=>O(T(window.location.hash))),window.addEventListener(`popstate`,()=>O(T(window.location.hash)));function k(){return(0,f.useSyncExternalStore)(e=>(w.add(e),()=>{w.delete(e)}),()=>E)}function A(e=`appearance`){O(e)}function j(){O(null)}function M(e){return e.title??e.agent_title??e.osc_title??e.id.slice(0,8)}var N=` — `;function P(e){return e.replace(/\/+$/,``).split(`/`).pop()??``}function F(e){return{name:M(e),title:e.title??``,agentName:e.agent_title??``,sequence:e.osc_title??``,branch:e.branch,cwd:P(e.worktree_path),id:e.id.slice(0,8),status:e.status,agent:e.agent_type??``}}function I(e,t){let r=t&&t.length>0?t:n,i=F(e),a=[];for(let e of r.split(/(\$\{[a-zA-Z]+\})/)){if(e===``)continue;let t=/^\$\{([a-zA-Z]+)\}$/.exec(e)?.[1];t===void 0?a.push({text:e,sep:!1}):t===`separator`?a.push({text:N,sep:!0}):a.push({text:i[t]??e,sep:!1})}let o=[];a.forEach((e,t)=>{if(!e.sep){o.push(e.text);return}let n=o.join(``).trim().length>0,r=a.slice(t+1).some(e=>!e.sep&&e.text.trim().length>0);n&&r&&o.push(e.text)});let s=o.join(``).trim();return s.length>0?s:e.id.slice(0,8)}function L(e){let t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var R=`Switch`,[z,B]=s(R),[V,H]=z(R);function U(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:s,name:c,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:m}=e,[h,g]=o({prop:n,defaultProp:i??!1,onChange:l,caller:R}),[_,v]=f.useState(null),[y,b]=f.useState(null),x={checked:h,setChecked:g,disabled:a,control:_,setControl:v,name:c,form:s,value:d,hasConsumerStoppedPropagationRef:f.useRef(!1),required:u,defaultChecked:i,isFormControl:!_||!!s||!!_.closest(`form`),bubbleInput:y,setBubbleInput:b};return(0,p.jsx)(V,{scope:t,...x,children:Z(m)?m(x):r})}var W=`SwitchTrigger`,G=f.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{let{control:o,form:s,value:l,disabled:u,checked:d,required:m,setControl:h,setChecked:g,hasConsumerStoppedPropagationRef:_,isFormControl:v,bubbleInput:y}=H(W,e),b=c(r,h),x=f.useRef(d);return f.useEffect(()=>{let e=s?o?.ownerDocument.getElementById(s):o?.form;if(e instanceof HTMLFormElement){let t=()=>g(x.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[o,s,g]),(0,p.jsx)(i.button,{type:`button`,role:`switch`,"aria-checked":d,"aria-required":m,"data-state":Q(d),"data-disabled":u?``:void 0,disabled:u,value:l,...n,ref:b,onClick:a(t,e=>{g(e=>!e),y&&v&&(_.current=e.isPropagationStopped(),_.current||e.stopPropagation())})})});G.displayName=W;var K=f.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,p.jsx)(U,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(G,{...d,ref:t,__scopeSwitch:n}),e&&(0,p.jsx)(X,{__scopeSwitch:n})]})})});K.displayName=R;var q=`SwitchThumb`,J=f.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,a=H(q,n);return(0,p.jsx)(i.span,{"data-state":Q(a.checked),"data-disabled":a.disabled?``:void 0,...r,ref:t})});J.displayName=q;var Y=`SwitchBubbleInput`,X=f.forwardRef(({__scopeSwitch:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:s,required:u,disabled:d,name:m,value:h,form:g,bubbleInput:_,setBubbleInput:v}=H(Y,e),y=c(n,v),b=L(o),x=l(r);f.useEffect(()=>{let e=_;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!a.current;if(b!==o&&n){let t=new Event(`click`,{bubbles:r});n.call(e,o),e.dispatchEvent(t)}},[_,b,o,a]);let S=f.useRef(o);return(0,p.jsx)(i.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??S.current,required:u,disabled:d,name:m,value:h,form:g,...t,tabIndex:-1,ref:y,style:{...t.style,...x,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});X.displayName=Y;function Z(e){return typeof e==`function`}function Q(e){return e?`checked`:`unchecked`}function $({className:e,...t}){return(0,p.jsx)(K,{className:u(`peer group/switch inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,p.jsx)(`span`,{className:`pointer-events-none inline-flex h-5 w-9 shrink-0 items-center rounded-full bg-border transition-colors group-hover/switch:bg-border/70 group-data-[state=checked]/switch:bg-action`,children:(0,p.jsx)(J,{className:`block size-4 rounded-full bg-ground shadow-sm transition-transform data-[state=checked]:translate-x-[1.125rem] data-[state=unchecked]:translate-x-0.5`})})})}export{A as a,S as c,y as d,v as f,j as i,x as l,m,L as n,k as o,_ as p,I as r,C as s,$ as t,b as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{c as e}from"./mermaid-parser.core-Cy8AG-qQ.js";export{e as createTreeViewServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{o as e}from"./mermaid-parser.core-Cy8AG-qQ.js";export{e as createTreemapServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{U as n,n as r}from"./index-CPDXsNn7.js";import{A as i,E as a,O as o,pt as s}from"./protocol-support-DWTHwckn.js";import{S as c,T as l,_ as u,b as d,g as f,h as p,v as ee,w as m}from"./dialog-CxBgPsab.js";import{a as h,r as te}from"./button-CcKBhdZO.js";import{_ as g,g as ne,h as _,m as v,p as re}from"./LazyTerminal-CAhb0T8p.js";import{c as y,p as b,r as x}from"./switch-B5sIV745.js";import{n as ie}from"./x-CZCUod6A.js";import{t as ae}from"./createLucideIcon-DyMAgLa3.js";import{a as S,n as oe,o as C}from"./preview-kind-QJSMKfUN.js";import{t as se}from"./debounce-B9DrqirV.js";var w=e(t(),1),T=r(),[E,ce]=m(`Tooltip`,[g]),D=g(),le=`TooltipProvider`,ue=700,O=`tooltip.open`,[de,k]=E(le),fe=e=>{let{__scopeTooltip:t,delayDuration:n=ue,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=w.useRef(!0),s=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,T.jsx)(de,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:w.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:w.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:w.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};fe.displayName=le;var A=`Tooltip`,[pe,j]=E(A),me=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=k(A,e.__scopeTooltip),l=D(t),[u,d]=w.useState(null),f=ee(),m=w.useRef(0),h=o??c.disableHoverableContent,te=s??c.delayDuration,g=w.useRef(!1),[_,v]=p({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(O))):c.onClose(),a?.(e)},caller:A}),re=w.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),y=w.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,v(!0)},[v]),b=w.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v(!1)},[v]),x=w.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,v(!0),m.current=0},te)},[te,v]);return w.useEffect(()=>()=>{m.current&&=(window.clearTimeout(m.current),0)},[]),(0,T.jsx)(ne,{...l,children:(0,T.jsx)(pe,{scope:t,contentId:f,open:_,stateAttribute:re,trigger:u,onTriggerChange:d,onTriggerEnter:w.useCallback(()=>{c.isOpenDelayedRef.current?x():y()},[c.isOpenDelayedRef,x,y]),onTriggerLeave:w.useCallback(()=>{h?b():(window.clearTimeout(m.current),m.current=0)},[b,h]),onOpen:y,onClose:b,disableHoverableContent:h,children:n})})};me.displayName=A;var M=`TooltipTrigger`,he=w.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=j(M,n),a=k(M,n),o=D(n),s=h(t,w.useRef(null),i.onTriggerChange),u=w.useRef(!1),d=w.useRef(!1),f=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,T.jsx)(re,{asChild:!0,...o,children:(0,T.jsx)(c.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:l(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:l(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:l(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:l(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:l(e.onBlur,i.onClose),onClick:l(e.onClick,i.onClose)})})});he.displayName=M;var N=`TooltipPortal`,[ge,_e]=E(N,{forceMount:void 0}),ve=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=j(N,t);return(0,T.jsx)(ge,{scope:t,forceMount:n,children:(0,T.jsx)(f,{present:n||a.open,children:(0,T.jsx)(u,{asChild:!0,container:i,children:r})})})};ve.displayName=N;var P=`TooltipContent`,ye=w.forwardRef((e,t)=>{let n=_e(P,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=j(P,e.__scopeTooltip);return(0,T.jsx)(f,{present:r||o.open,children:o.disableHoverableContent?(0,T.jsx)(we,{side:i,...a,ref:t}):(0,T.jsx)(be,{side:i,...a,ref:t})})}),be=w.forwardRef((e,t)=>{let n=j(P,e.__scopeTooltip),r=k(P,e.__scopeTooltip),i=w.useRef(null),a=h(t,i),[o,s]=w.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=w.useCallback(()=>{s(null),d(!1)},[d]),p=w.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Oe(r,De(r,n.getBoundingClientRect())),a=ke(t.getBoundingClientRect()),o=je([...i,...a]);s(o),d(!0)},[d]);return w.useEffect(()=>()=>f(),[f]),w.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),w.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Ae(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,T.jsx)(we,{...e,ref:a})}),[xe,Se]=E(A,{isInside:!1}),Ce=te(`TooltipContent`),we=w.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=j(P,n),l=D(n),{onClose:u}=c;return w.useEffect(()=>(document.addEventListener(O,u),()=>document.removeEventListener(O,u)),[u]),w.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,T.jsx)(d,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,T.jsxs)(_,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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:[(0,T.jsx)(Ce,{children:r}),(0,T.jsx)(xe,{scope:n,isInside:!0,children:(0,T.jsx)(b,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});ye.displayName=P;var Te=`TooltipArrow`,Ee=w.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=D(n);return Se(Te,n).isInside?null:(0,T.jsx)(v,{...i,...r,ref:t})});Ee.displayName=Te;function De(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Oe(e,t,n=5){let 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 ke(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Ae(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function je(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Me(t)}function Me(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}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 Ne=fe,Pe=me,Fe=he,Ie=ve,Le=ye,Re=Ne,ze=Pe,Be=Fe;function Ve({className:e,sideOffset:t=4,...n}){return(0,T.jsx)(Ie,{children:(0,T.jsx)(Le,{sideOffset:t,className:ie(`z-50 overflow-hidden rounded-md bg-elevated px-2 py-1 text-xs text-fg shadow-lg`,e),...n})})}var He=ae(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);function Ue({initial:e,maxLength:t,className:n,onCommit:r,onCancel:i}){let[a,o]=(0,w.useState)(e);return(0,T.jsx)(`input`,{autoFocus:!0,value:a,maxLength:t,onFocus:e=>e.currentTarget.select(),onChange:e=>o(e.target.value),onBlur:()=>r(a),onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`?r(a):e.key===`Escape`&&i()},className:ie(`bg-transparent outline-none`,n)})}function We(e){return{onClick:e=>{e.detail===2&&e.preventDefault()},onDoubleClick:t=>{t.preventDefault(),e()}}}var F=null;function Ge(e){return F=e,()=>{F===e&&(F=null)}}function Ke(){F?.()}var I=null;function qe(e){return I=e,()=>{I===e&&(I=null)}}async function Je(e){if(!I)throw Error(`Open a project before opening a path.`);await I(e)}function Ye(){let e=s(a()??void 0).data?.tabTitleTemplate;return(0,w.useCallback)(t=>x(t,e),[e])}var Xe=(0,w.createContext)({open:()=>void 0,handler:null,setHandler:()=>void 0});function Ze({children:e}){let[t,n]=(0,w.useState)(null),r=(0,w.useCallback)(e=>n(()=>e),[]),i=(0,w.useCallback)(e=>t?.(e),[t]),a=(0,w.useMemo)(()=>({open:i,handler:t,setHandler:r}),[i,t,r]);return(0,T.jsx)(Xe.Provider,{value:a,children:e})}function Qe(){return(0,w.useContext)(Xe)}function $e({className:e,strokeScale:t=1}){return(0,T.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.8*t,strokeLinecap:`round`,"aria-hidden":!0,children:[(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`22`,y2:`12`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`20.66`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`20.66`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`2`,y2:`12`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`3.34`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`3.34`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`15.25`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`18.5`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`15.25`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`8.75`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`5.5`}),(0,T.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`8.75`})]})}function et({className:e,strokeScale:t=1}){return(0,T.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.6*t,"aria-hidden":!0,children:[(0,T.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`}),(0,T.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(60 12 12)`}),(0,T.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(120 12 12)`})]})}function tt({className:e,strokeScale:t=1}){return(0,T.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.8*t,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,T.jsx)(`path`,{d:`M8 4H4v16h4`}),(0,T.jsx)(`path`,{d:`M16 4h4v16h-4`}),(0,T.jsx)(`rect`,{x:`10.5`,y:`10.5`,width:`3`,height:`3`,fill:`currentColor`,stroke:`none`})]})}function nt({className:e}){return(0,T.jsx)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`currentColor`,"aria-hidden":!0,children:(0,T.jsx)(`path`,{d:`M12 1.5c0 5.8 4.7 10.5 10.5 10.5C16.7 12 12 16.7 12 22.5 12 16.7 7.3 12 1.5 12 7.3 12 12 7.3 12 1.5Z`})})}function rt({type:e,className:t,strokeScale:n=1}){switch(e){case`claude-code`:return(0,T.jsx)($e,{className:t,strokeScale:n});case`codex`:return(0,T.jsx)(et,{className:t,strokeScale:n});case`opencode`:return(0,T.jsx)(tt,{className:t,strokeScale:n});case`gemini-cli`:return(0,T.jsx)(nt,{className:t});default:return(0,T.jsx)(y,{className:t,strokeWidth:2*n})}}var L=new Set,R=!1,it=null;function at(){for(let e of L)e()}function ot(e){return L.add(e),()=>L.delete(e)}function st(e){R!==e&&(R=e,at())}function ct(){st(!R)}function lt(){return(0,w.useSyncExternalStore)(ot,()=>R)}function ut(e){it=e,at()}function dt(){return(0,w.useSyncExternalStore)(ot,()=>it)}function z(){return crypto.randomUUID()}function B(e){return e.type===`terminal`?`term:${e.session}`:`editor:${S(e.tab)}`}function V(e,t){return B(e)===B(t)}function ft(e){return e.type===`terminal`}function pt(e){return e.type===`editor`&&(e.tab.view===`linked`||e.tab.view===`locked`)}function H(e=[],t){let n=e.map(B),r=t&&n.includes(t)?t:n.length>0?n[0]:null;return{kind:`leaf`,id:z(),tabs:e,activeKey:r,previewKey:null}}function U(e,t,n){return{kind:`split`,id:z(),direction:e,children:t,sizes:n??t.map(()=>100/Math.max(1,t.length))}}function W(e,t){if(e.kind===`leaf`)return e.id===t?e:null;for(let n of e.children){let e=W(n,t);if(e)return e}return null}function G(e,t){if(e.kind===`leaf`)return e.tabs.some(e=>B(e)===t)?e:null;for(let n of e.children){let e=G(n,t);if(e)return e}return null}function K(e){return e.kind===`leaf`?[e]:e.children.flatMap(K)}function q(e){return K(e).flatMap(e=>e.tabs)}function mt(e){return e.kind===`leaf`?[e.id]:[e.id,...e.children.flatMap(mt)]}function ht(e){let t=mt(e);return new Set(t).size!==t.length}function gt(e){return e.kind===`leaf`?{...e,id:z()}:{...e,id:z(),children:e.children.map(gt)}}function _t(e){if(!ht(e))return e;let t=new Set,n=e=>{let r=t.has(e.id)?z():e.id;return t.add(r),e.kind===`leaf`?{...e,id:r}:{...e,id:r,children:e.children.map(n)}};return n(e)}function vt(e){let t=e.tabs.map(B),n=e.activeKey&&t.includes(e.activeKey)?e.activeKey:t[0]??null,r=e.previewKey&&t.includes(e.previewKey)?e.previewKey:null;return n===e.activeKey&&r===(e.previewKey??null)?e:{...e,activeKey:n,previewKey:r}}function J(e){if(e.kind===`leaf`)return vt(e);let t=e.children.map(J),n=[],r=[];t.forEach((t,i)=>{let a=e.sizes[i]??1;if(t.kind===`split`&&t.direction===e.direction){let e=t.sizes.reduce((e,t)=>e+t,0)||t.children.length;t.children.forEach((i,o)=>{n.push(i),r.push(a*(t.sizes[o]??1)/e)})}else n.push(t),r.push(a)});let i=[],a=[];return n.forEach((e,t)=>{e.kind===`leaf`&&e.tabs.length===0||(i.push(e),a.push(r[t]??1))}),i.length===0?H([]):i.length===1?i[0]:{...e,children:i,sizes:a}}function Y(e,t,n){return e.kind===`leaf`?e.id===t?n(e):e:{...e,children:e.children.map(e=>Y(e,t,n))}}function yt(e,t,n){return Y(e,t,e=>{if(!e.tabs.some(e=>B(e)===n))return e;let t=e.tabs.filter(e=>B(e)!==n),r=e.activeKey===n?bt(e,n):e.activeKey;return{...e,tabs:t,activeKey:r}})}function bt(e,t){let n=e.tabs.findIndex(e=>B(e)===t);if(n===-1)return e.activeKey;let r=e.tabs.filter(e=>B(e)!==t);return r.length===0?null:B(r[Math.min(n,r.length-1)])}function xt(e,t,n){let r=e.tabs.filter(e=>!V(e,t)),i=n===void 0?r.length:Math.max(0,Math.min(n,r.length)),a=[...r.slice(0,i),t,...r.slice(i)];return{...e,tabs:a,activeKey:B(t)}}function St(e,t,n,r){let i=n===`left`||n===`right`?`row`:`col`,a=n===`left`||n===`top`;return J(Y(e,t,e=>{let t=H([r]);return U(i,a?[t,e]:[e,t],[50,50])}))}function Ct(e,t){let{ref:n,toLeafId:r,edge:i}=t,a=B(n),o=t.copy===!0&&!ft(n),s=t.index;if(i===`center`&&s!==void 0){let t=W(e,r)?.tabs.findIndex(e=>B(e)===a)??-1;t!==-1&&t<s&&--s}let c=o?e:yt(e,t.fromLeafId,a);if(i===`center`){let e=Y(c,r,e=>xt(e,n,s));return!W(e,r)&&!G(e,a)?X(J(wt(e,n)),a):X(J(e),a)}return W(c,r)?X(St(c,r,i,n),a):J(H([n]))}function wt(e,t){let n=K(e)[0];return n?Y(e,n.id,e=>xt(e,t)):H([t])}function Tt(e,t,n){return J(Y(e,t,e=>e.tabs.some(e=>B(e)===n)?{...e,tabs:e.tabs.filter(e=>B(e)!==n),activeKey:e.activeKey===n?bt(e,n):e.activeKey}:e))}function Et(e,t,n){let r=B(n);return J(Y(e,t,e=>{let t=e.previewKey===r?null:e.previewKey;return e.tabs.some(e=>V(e,n))?{...e,activeKey:r,previewKey:t}:{...e,tabs:[...e.tabs,n],activeKey:r,previewKey:t}}))}function Dt(e,t,n){let r=B(n);return J(Y(e,t,e=>e.tabs.some(e=>B(e)===r)?{...e,tabs:e.tabs.map(e=>B(e)===r?n:e),previewKey:e.previewKey===r?null:e.previewKey}:{...e,tabs:[...e.tabs,n]}))}function Ot(e,t,n){let r=B(n);return Y(e,t,e=>({...e,tabs:e.tabs.map(e=>B(e)===r?n:e)}))}function kt(e,t,n){let r=S(t),i=e=>e.kind===`split`?{...e,children:e.children.map(i)}:{...e,tabs:e.tabs.map(e=>e.type===`editor`&&S(e.tab)===r?{...e,tab:{...e.tab,compile_mode:n}}:e)};return i(e)}function At(e,t){return e.type!==`editor`||t.type!==`editor`||e.tab.view!==`preview`||t.tab.view!==void 0||oe(t.tab.path)===null?t:{...t,tab:{...t.tab,view:`preview`}}}function jt(e,t,n){let r=B(n);return J(Y(e,t,e=>{if(e.tabs.some(e=>V(e,n)))return{...e,activeKey:r};let t=e.previewKey?e.tabs.findIndex(t=>B(t)===e.previewKey):-1,i=t>=0?e.tabs[t]:void 0,a=i!==void 0&&!ft(i)&&!pt(i),o=a?At(i,n):n,s=a?e.tabs.map((e,n)=>n===t?o:e):[...e.tabs,o];return{...e,tabs:s,activeKey:r,previewKey:r}}))}function X(e,t){let n=e=>e.kind===`leaf`?e.previewKey===t?{...e,previewKey:null}:e:{...e,children:e.children.map(n)};return n(e)}function Mt(e,t,n,r){return Y(e,t,e=>{let t=e.tabs.findIndex(e=>e.type===`editor`&&B(e)===n),i=t>=0?e.tabs[t]:void 0;if(i===void 0||i.type!==`editor`)return e;let a={...i,tab:{...i.tab,view:r}},o=B(a);if(o===n)return{...e,tabs:e.tabs.map((e,n)=>n===t?a:e)};let s=e.tabs.some((e,n)=>n!==t&&B(e)===o),c=s?e.tabs.filter((e,n)=>n!==t):e.tabs.map((e,n)=>n===t?a:e);return{...e,tabs:c,activeKey:e.activeKey===n?o:e.activeKey,previewKey:e.previewKey===n?s?null:o:e.previewKey??null}})}function Nt(e,t){let n=C(e);return n!==`commit`&&n!==`untitled`&&e.session===t.session&&e.path===t.path&&e.root===t.root}function Pt(e,t,n){if(n===t.path)return e;let r=!1,i=e=>{if(e.kind===`split`){let t=e.children.map(i);return t.some((t,n)=>t!==e.children[n])?{...e,children:t}:e}let a=new Map,o=!1,s=e.tabs.map(e=>{if(e.type!==`editor`||!Nt(e.tab,t))return e;let r={...e,tab:{...e.tab,path:n}};return a.set(B(e),B(r)),o=!0,r});if(!o)return e;r=!0;let c=e.activeKey,l=e.previewKey??null;return{...e,tabs:s,activeKey:c===null?null:a.get(c)??c,previewKey:l===null?null:a.get(l)??l}},a=i(e);return r?a:e}function Ft(e){if(e.type!==`editor`)return null;let t=e.tab,n=C(t);return n!==`file`&&n!==`external`||t.view===`linked`||t.view===`locked`||oe(t.path)===null?null:t}function It(e,t){let n=Ft(t);if(!n)return e;let r=!1,i=e=>{if(e.kind===`split`)return{...e,children:e.children.map(i)};let t=!1,a=e.tabs.map(e=>{if(e.type!==`editor`||!pt(e))return e;let r=e.tab;return r.session===n.session&&r.path===n.path&&(r.root??``)===(n.root??``)&&C(r)===C(n)?e:(t=!0,{type:`editor`,tab:{session:n.session,path:n.path,...n.kind===void 0?{}:{kind:n.kind},...n.root===void 0?{}:{root:n.root},view:r.view}})});return t?(r=!0,{...e,tabs:a}):e},a=i(e);return r?a:e}function Lt(e,t){return e.session===t.session&&e.path===t.path&&(e.root??``)===(t.root??``)&&C(e)===C(t)}function Rt(e,t,n){let r=K(e).flatMap(e=>e.tabs.flatMap(n=>n.type!==`editor`||n.tab.view===`linked`||n.tab.view===`locked`||!Lt(n.tab,t)?[]:[{leafId:e.id,ref:n}]));return r.find(({leafId:e})=>e===n)??r.find(({ref:e})=>(e.tab.view??`source`)===`source`)??r[0]??null}function zt(e,t,n){return Y(e,t,e=>e.tabs.some(e=>B(e)===n)?{...e,activeKey:n}:e)}function Bt(e,t,n){function r(e){return e.kind===`leaf`?e:e.id===t&&n.length===e.children.length?{...e,children:e.children.map(r),sizes:[...n]}:{...e,children:e.children.map(r)}}return r(e)}function Vt(e){let t=e.type===`terminal`?e.session:e.tab.session;return t===`00000000-0000-0000-0000-000000000000`?null:t}function Ht(e){return t=>{let n=Vt(t);return n===null||e.has(n)}}function Z(e,t){let n=e=>e.kind===`leaf`?{...e,tabs:e.tabs.filter(t)}:{...e,children:e.children.map(n)};return J(n(e))}function Ut(e){let t=new Set,n=[];for(let r of e){let e=J(Z(r,e=>!t.has(B(e)))),i=q(e);if(i.length!==0){for(let e of i)t.add(B(e));n.push(e)}}return n.length===0?H([]):_t(n.length===1?n[0]:J(U(`row`,n)))}function Wt(e){let t=e.editor_tabs.map(e=>({type:`editor`,tab:e})),n=e.session_tabs.map(e=>({type:`terminal`,session:e})),r=e.active_editor_tab?B({type:`editor`,tab:e.active_editor_tab}):null,i=e.active_session?`term:${e.active_session}`:null;if(t.length===0&&n.length===0)return H([]);if(t.length===0)return H(n,i);if(n.length===0)return H(t,r);let a=e.layout,o=typeof a.editor==`number`?a.editor:40,s=typeof a.session==`number`?a.session:60;return J(U(`col`,[H(t,r),H(n,i)],[o,s]))}function Gt(e){return JSON.stringify(Kt(e))}function Kt(e){return e===null?null:e.kind===`leaf`?e.tabs.length===0?null:{t:e.tabs.map(B)}:{d:e.direction,s:e.sizes.map(e=>Math.round(e*10)/10),c:e.children.map(Kt)}}var Q=new Set,$=!1,qt=null;function Jt(){for(let e of Q)e()}function Yt(e){return Q.add(e),()=>Q.delete(e)}function Xt(e){$!==e&&($=e,Jt())}function Zt(){Xt(!$)}function Qt(){return(0,w.useSyncExternalStore)(Yt,()=>$)}function $t(e){qt=e,Jt()}function en(){return(0,w.useSyncExternalStore)(Yt,()=>qt)}var tn={layout_tree:null,active_session:null,layout_ref:null};function nn(e){return e.type===`terminal`?e.session:e.tab.session}function rn(e,t){let n=new Set;for(let[r,i]of Object.entries(e))if(!(r===t||!i.layout_tree))for(let e of q(i.layout_tree))e.type===`terminal`&&n.add(e.session);return[...n]}function an(e,t){let n=e.project_layouts[t];return{...e,layout_tree:n?.layout_tree??null,active_session:n?.active_session??null,layout_ref:n?.layout_ref??null,session_tabs:[],editor_tabs:[],active_editor_tab:null}}function on(e,t,n){return n?{loaded:e.loaded,snapshot:an(e.snapshot,t),current:()=>an(e.current(),t),update(n){let r={},i={...n};if(`layout_tree`in n&&(r.layout_tree=n.layout_tree??null,delete i.layout_tree),`active_session`in n&&(r.active_session=n.active_session??null,delete i.active_session),`layout_ref`in n&&(r.layout_ref=n.layout_ref??null,delete i.layout_ref),Object.keys(r).length>0){let n=e.current().project_layouts;i.project_layouts={...n,[t]:{...n[t]??tn,...r}}}Object.keys(i).length>0&&e.update(i)}}:e}function sn(e,t,n,r){let i=e.layout_tree??Wt(e),a={};for(let o of t)a[o]={layout_tree:gt(Z(i,e=>{let i=nn(e);return i===`00000000-0000-0000-0000-000000000000`?o===(r??t[0]):n.get(i)===o})),active_session:e.active_session!==null&&n.get(e.active_session)===o?e.active_session:null,layout_ref:null};return{layout_mode:`project`,project_layouts:a}}function cn(e,t,n={}){return{...e,...t,...n}}function ln(e,t,n){let r=t.layout_tree?Z(t.layout_tree,e=>{let t=nn(e);return t===`00000000-0000-0000-0000-000000000000`||n.alive.has(t)}):null,i=t.active_session!==null&&n.alive.has(t.active_session)?t.active_session:null;if(t.scope===`profile`)return{projectBased:!1,patch:{layout_mode:`profile`,layout_tree:r,active_session:i,layout_ref:t.id}};let a=t.project_id??n.currentProject??n.projectIds[0]??``,o={layout_tree:r,active_session:i,layout_ref:t.id};if((e.layout_mode??`profile`)===`project`)return{projectBased:!0,patch:{project_layouts:{...e.project_layouts,[a]:o}}};let s=sn(e,n.projectIds,n.sessionProject,a);return{projectBased:!0,patch:{...s,project_layouts:cn(s.project_layouts??{},e.project_layouts,{[a]:o})}}}function un(e,t){let n=e.project_layouts,r=[...t.filter(e=>e in n),...Object.keys(n).filter(e=>!t.includes(e))].map(e=>n[e]);return{layout_mode:`profile`,project_layouts:{},layout_tree:Ut(r.map(e=>e.layout_tree).filter(e=>e!==null)),active_session:r.map(e=>e.active_session).find(e=>e!==null)??null,layout_ref:null}}var dn=2e3,fn=n.parse({});function pn(e){return`puddle.ws.${e}`}function mn(e){if(e===null)return{kind:`absent`};try{return{kind:`present`,snapshot:n.parse(JSON.parse(e))}}catch{return{kind:`corrupt`}}}function hn(){let e=a(),[t,n]=(0,w.useState)(!1),[r,s]=(0,w.useState)(fn),c=(0,w.useRef)(r);c.current=r;let l=(0,w.useRef)(null),u=(0,w.useMemo)(()=>se((e,t)=>{i(e,t).catch(e=>console.warn(`ui-state save failed: ${e.message}`))},dn),[]);return(0,w.useEffect)(()=>{if(e===null){l.current=null;return}let t=pn(e);l.current=t;let r=!1;n(!1),s(fn);let i;try{i=mn(sessionStorage.getItem(t)),i.kind===`corrupt`&&sessionStorage.removeItem(t)}catch(e){console.warn(`ui-state read failed: ${e.message}`),i={kind:`absent`}}return i.kind===`present`?(s(i.snapshot),n(!0)):o(e).then(e=>{r||(e&&s(e.ui_state),n(!0))}).catch(e=>{console.warn(`ui-state load failed: ${e.message}`),r||n(!0)}),()=>{r=!0,u.flush()}},[e,u]),{loaded:t,snapshot:r,current:()=>c.current,update(t){if(e===null)return;let n={...c.current,...t};c.current=n,s(n);let r=l.current??pn(e);u(e,n);try{sessionStorage.setItem(r,JSON.stringify(n))}catch(e){console.warn(`ui-state write failed: ${e.message}`)}}}}export{Ge as $,jt as A,Ot as B,Ct as C,G as D,zt as E,It as F,lt as G,st as H,kt as I,Qe as J,rt as K,Mt as L,Z as M,Pt as N,Ft as O,Bt as P,Ke as Q,Rt as R,_t as S,q as T,ct as U,ut as V,dt as W,Je as X,Ye as Y,qe as Z,Et as _,cn as a,Re as at,Wt as b,sn as c,Xt as d,Ue as et,Zt as f,Dt as g,Gt as h,ln as i,Ve as it,X as j,H as k,un as l,Qt as m,hn as n,He as nt,rn as o,Be as ot,en as p,Ze as q,pn as r,ze as rt,on as s,mn as t,We as tt,$t as u,K as v,W as w,Tt as x,Ht as y,B as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{x as n}from"./index-CPDXsNn7.js";var r=e(t(),1),i=(0,r.createContext)(``);function a(e,t){let a=(0,r.useContext)(i);return n(JSON.stringify([a,e,t]))}var o=class{limit;entries=new Map;constructor(e=500){this.limit=e}get(e){let t=this.entries.get(e);return t!==void 0&&(this.entries.delete(e),this.entries.set(e,t)),t}set(e,t){for(this.entries.delete(e),this.entries.set(e,t);this.entries.size>this.limit;){let e=this.entries.keys().next().value;if(e===void 0)break;this.entries.delete(e)}}};export{i as n,a as r,o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{i as e}from"./mermaid-parser.core-Cy8AG-qQ.js";export{e as createWardleyServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as e,v as t,y as n}from"./index-CPDXsNn7.js";import{n as r}from"./dist-qyIRFVt1.js";var i=500,a=1e4;function o(e,t){return`${e} ${t}`}var s=new class{ws=null;open=!1;backoff=i;reconnectTimer=null;theme=null;terminals=new Map;notificationListeners=new Set;statusListeners=new Set;renameListeners=new Set;accountListeners=new Set;switchListeners=new Set;sessionsChangedListeners=new Set;connectionListeners=new Set;shellWaiters=new Map;attach(e,t,n,r,i){let a={session:e,term:t,cols:n,rows:r,handlers:i};return this.terminals.set(o(e,t),a),this.ensureConnected(),this.open&&this.send({t:`attach`,session:e,term:t,cols:n,rows:r}),()=>this.detach(e,t)}detach(e,t){this.terminals.delete(o(e,t))&&this.open&&this.send({t:`detach`,session:e,term:t})}write(e,t,n){this.open&&this.send({t:`stdin`,session:e,term:t,data:n})}resize(e,t,n,r){let i=this.terminals.get(o(e,t));i&&(i.cols=n,i.rows=r),this.open&&this.send({t:`resize`,session:e,term:t,cols:n,rows:r})}spawnShell(e){return this.ensureConnected(),this.open?new Promise((t,n)=>{let r=this.shellWaiters.get(e)??[];r.push({resolve:t,reject:n}),this.shellWaiters.set(e,r),this.open&&this.send({t:`spawn-shell`,session:e})}):Promise.reject(Error(`Connection is unavailable`))}killShell(e,t){this.open&&this.send({t:`kill-shell`,session:e,term:t})}onStatus(e){return this.statusListeners.add(e),this.ensureConnected(),()=>this.statusListeners.delete(e)}onAgentNotification(e){return this.notificationListeners.add(e),this.ensureConnected(),()=>this.notificationListeners.delete(e)}onRenamed(e){return this.renameListeners.add(e),this.ensureConnected(),()=>this.renameListeners.delete(e)}onAccount(e){return this.accountListeners.add(e),this.ensureConnected(),()=>this.accountListeners.delete(e)}onSessionSwitched(e){return this.switchListeners.add(e),this.ensureConnected(),()=>this.switchListeners.delete(e)}onSessionsChanged(e){return this.sessionsChangedListeners.add(e),this.ensureConnected(),()=>this.sessionsChangedListeners.delete(e)}onConnectionChange(e){return this.connectionListeners.add(e),()=>this.connectionListeners.delete(e)}isConnected(){return this.open}reportTheme(e,t){this.theme&&this.theme.fg===e&&this.theme.bg===t||(this.theme={fg:e,bg:t},this.open&&this.send({t:`theme`,fg:e,bg:t}))}reset(){this.ws?.close()}switchHost(){let e=this.ws;this.ws=null,this.open=!1,this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.terminals.clear();for(let e of this.shellWaiters.values())for(let t of e)t.reject(Error(`Host changed`));this.shellWaiters.clear(),e?.close();for(let e of this.connectionListeners)e(!1)}ensureConnected(){this.ws||this.reconnectTimer||this.connect()}connect(){let r=n.get(),a=e();if(!r&&!a)return;let o=window.location.protocol===`https:`?`wss`:`ws`,s=a?a.socket():new WebSocket(`${o}://${window.location.host}/ws`);this.ws=s,s.addEventListener(`open`,()=>{if(this.ws!==s){s.close();return}a||s.send(JSON.stringify({t:`auth`,token:r}))}),s.addEventListener(`message`,e=>{if(this.ws!==s)return;let t;try{t=JSON.parse(String(e.data))}catch{return}if(t.t===`authenticated`){if(this.open)return;this.open=!0,this.backoff=i,this.send({t:`subscribe-status`}),this.theme&&this.send({t:`theme`,...this.theme});for(let{session:e,term:t,cols:n,rows:r}of this.terminals.values())this.send({t:`attach`,session:e,term:t,cols:n,rows:r});for(let e of this.connectionListeners)e(!0)}else this.open&&this.handle(t)}),s.addEventListener(`close`,e=>{if(this.ws!==s)return;let n=this.open;this.open=!1,this.ws=null;for(let e of this.shellWaiters.values())for(let t of e)t.reject(Error(`Connection lost; operation outcome is unknown`));if(this.shellWaiters.clear(),n)for(let e of this.connectionListeners)e(!1);if(e.code===4401&&e.reason===`browser_rejected`){t();return}this.scheduleReconnect()})}scheduleReconnect(){this.reconnectTimer||this.terminals.size===0&&this.statusListeners.size===0&&this.notificationListeners.size===0&&this.renameListeners.size===0&&this.accountListeners.size===0&&this.switchListeners.size===0&&this.sessionsChangedListeners.size===0||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},this.backoff),this.backoff=Math.min(this.backoff*2,a))}send(e){this.open&&this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}handle(e){switch(e.t){case`agent-notification`:for(let t of this.notificationListeners)t(e);break;case`replay`:case`output`:this.terminals.get(o(e.session,e.term))?.handlers.onData(e.data,e.t);break;case`exit`:this.terminals.get(o(e.session,e.term))?.handlers.onExit?.(e.code);break;case`status`:for(let t of this.statusListeners)t({session:e.session,status:e.status,last_activity_at:e.last_activity_at});break;case`renamed`:for(let t of this.renameListeners)t({session:e.session,title:e.title,agent_title:e.agent_title,osc_title:e.osc_title});break;case`account`:for(let t of this.accountListeners)t({account_id:e.account_id,profile_id:e.profile_id,logged_in:e.logged_in});break;case`session-switched`:for(let t of this.switchListeners)t(e);break;case`sessions-changed`:for(let t of this.sessionsChangedListeners)t(e);break;case`shell-spawned`:{let t=this.shellWaiters.get(e.session)?.shift();t&&t.resolve(e.term);break}case`notice`:(e.level===`warning`?r.warning:r.error)(e.title,{...e.detail===void 0?{}:{description:e.detail},duration:12e3});break;case`error`:r.error(`Connection error`,{description:e.message});break}}};export{s as t};
|