@puddle-code/cli 0.2.14 → 0.2.15
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 +3 -8
- package/dist/host-control.mjs +1 -1
- package/dist/index.js +4 -3
- package/dist/public/assets/App-CWsXEgQo.js +2 -0
- package/dist/public/assets/Dashboard-C15aDbkk.js +1 -0
- package/dist/public/assets/{EditorTabClose-DgHiWUeH.js → EditorTabClose-BFzx32u3.js} +1 -1
- package/dist/public/assets/{FindWidget-DvE5pM_m.js → FindWidget-9Ywn_ivQ.js} +1 -1
- package/dist/public/assets/{LazyTerminal-D_WH4lhZ.js → LazyTerminal-6Bphkjrt.js} +2 -2
- package/dist/public/assets/{ModelRefcount-CrcIbyvv.js → ModelRefcount-BEFEhOd-.js} +1 -1
- package/dist/public/assets/NewProjectDialog-FuWwzfl3.js +1 -0
- package/dist/public/assets/{PaneEditorBody-B6bdrN7S.js → PaneEditorBody-ewLML4UF.js} +5 -5
- package/dist/public/assets/{PdfViewer-BHSLh8dm.js → PdfViewer-5fGgoeRa.js} +2 -2
- package/dist/public/assets/SettingsDialog-CfjM1tX0.js +8 -0
- package/dist/public/assets/Terminal-ByNpeJX9.js +61 -0
- package/dist/public/assets/Workspace-keytr4i3.js +20 -0
- package/dist/public/assets/{abnfDiagram-VCTEODGH-CYiBJCKB.js → abnfDiagram-VCTEODGH-XhK-a9bV.js} +1 -1
- package/dist/public/assets/architecture-7GRP2DOG-MIdlSbNT.js +1 -0
- package/dist/public/assets/{architectureDiagram-5GKGNRK7-7dDnpr2A.js → architectureDiagram-5GKGNRK7-BQsZjKQJ.js} +1 -1
- package/dist/public/assets/{blockDiagram-I7D4REHJ-CnHBCey1.js → blockDiagram-I7D4REHJ-S9hiaolp.js} +1 -1
- package/dist/public/assets/{buffer-store-DjjKlkBx.js → buffer-store-Dzoky9Vk.js} +2 -2
- package/dist/public/assets/{button-C2U4JLSJ.js → button-DGZ41AMs.js} +1 -1
- package/dist/public/assets/{c4Diagram-7LVT6UL2-Dh4L8JvS.js → c4Diagram-7LVT6UL2-C6TJUUbc.js} +1 -1
- package/dist/public/assets/channel-N3bn9EDb.js +1 -0
- package/dist/public/assets/{chunk-2E4U76K2-DZ0SBCfs.js → chunk-2E4U76K2-ByXO-8Jy.js} +1 -1
- package/dist/public/assets/{chunk-4HAMMTFA-DDQ7TZvS.js → chunk-4HAMMTFA-B7Ra5AlZ.js} +1 -1
- package/dist/public/assets/{chunk-75Z2AOVW-b-3efKur.js → chunk-75Z2AOVW-C43rOJkc.js} +1 -1
- package/dist/public/assets/{chunk-CLGD4ZFX-I3haxkb8.js → chunk-CLGD4ZFX-CbsVLCQc.js} +1 -1
- package/dist/public/assets/{chunk-DU6HZSFF-DU6gnSTi.js → chunk-DU6HZSFF-Ca-rr7Zz.js} +1 -1
- package/dist/public/assets/{chunk-F27PBJKO-CLOxkQ_H.js → chunk-F27PBJKO-B9Cce-ZX.js} +1 -1
- package/dist/public/assets/{chunk-GMAD6QVW-BgNxh1Wg.js → chunk-GMAD6QVW-s6lxZwdj.js} +1 -1
- package/dist/public/assets/{chunk-GVQU2GXP-CNaIDciQ.js → chunk-GVQU2GXP-DRviL7ux.js} +1 -1
- package/dist/public/assets/{chunk-IMKFNOWR-B5c6xExk.js → chunk-IMKFNOWR-B2Nnx4Lg.js} +1 -1
- package/dist/public/assets/{chunk-L3NEJ4N5-59iBItHO.js → chunk-L3NEJ4N5-C56MSu53.js} +1 -1
- package/dist/public/assets/{chunk-OSK3NFVY-SdTDzoMy.js → chunk-OSK3NFVY-mliURn7i.js} +1 -1
- package/dist/public/assets/{chunk-P2QGCYS3-VniWvIJd.js → chunk-P2QGCYS3-CPc7THMm.js} +1 -1
- package/dist/public/assets/{chunk-POPQ4Y6H-BUjB1fDF.js → chunk-POPQ4Y6H-D0UNfRu-.js} +1 -1
- package/dist/public/assets/{chunk-PWAF6VOD--PrNfcDv.js → chunk-PWAF6VOD-CduHIAB_.js} +1 -1
- package/dist/public/assets/{chunk-SHT3W25Y-iS7BNavD.js → chunk-SHT3W25Y-yBu3YZFN.js} +1 -1
- package/dist/public/assets/{chunk-SVP7TREG-es_cu5SS.js → chunk-SVP7TREG-DkwvYHWO.js} +1 -1
- package/dist/public/assets/{chunk-TICWLB2K-CAQdSlKl.js → chunk-TICWLB2K-szMdmNBk.js} +1 -1
- package/dist/public/assets/{chunk-TLUHSLCS-CivtNrZW.js → chunk-TLUHSLCS-BbRvA7V9.js} +2 -2
- package/dist/public/assets/classDiagram-ZZMXUADV-DB1dQcGs.js +1 -0
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-DB1dQcGs.js +1 -0
- package/dist/public/assets/{context-menu-C99CAwCo.js → context-menu-CMR3quc3.js} +1 -1
- package/dist/public/assets/{cssMode-BYtLhrHD.js → cssMode-D9ZNJNk8.js} +1 -1
- package/dist/public/assets/{cynefin-OW5HDTMX-CnreCTXF.js → cynefin-OW5HDTMX-DuWZHcIt.js} +1 -1
- package/dist/public/assets/{cynefinDiagram-5FMLGOSQ-CBhOEGQq.js → cynefinDiagram-5FMLGOSQ-BVe6SJXs.js} +1 -1
- package/dist/public/assets/{dagre-GXQ25YYZ-CtMkNeKj.js → dagre-GXQ25YYZ-LBBjMgc9.js} +1 -1
- package/dist/public/assets/{diagram-S7CK7UJ4-BwGNVBES.js → diagram-S7CK7UJ4-B4sD_cGV.js} +1 -1
- package/dist/public/assets/{diagram-UQ7AKVKN-NvnuUqC5.js → diagram-UQ7AKVKN-D14T_Ejl.js} +1 -1
- package/dist/public/assets/{diagram-VSXAHHWV-A1jhKo-L.js → diagram-VSXAHHWV-BsUsOo2p.js} +1 -1
- package/dist/public/assets/{diagram-VX7I27RA-Dm82GNqE.js → diagram-VX7I27RA-0Rs_NGAd.js} +1 -1
- package/dist/public/assets/{diagram-Z3DM3KII-BfSG8tI1.js → diagram-Z3DM3KII-DNODOMxK.js} +1 -1
- package/dist/public/assets/{dialog-BWYDvidH.js → dialog-Cmn5pHjL.js} +1 -1
- package/dist/public/assets/{disclosure-BwmmXyDN.js → disclosure-DjzCBlJA.js} +1 -1
- package/dist/public/assets/{dist-B1yD4sI3.js → dist-B9oip1LR.js} +1 -1
- package/dist/public/assets/{dist-CXaqo3cO.js → dist-BJToJfnO.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-PWID7BFC-CRZBgWXo.js → ebnfDiagram-PWID7BFC-C3tG-YWl.js} +1 -1
- package/dist/public/assets/{erDiagram-RLTQ6QDP-BGgBvFkm.js → erDiagram-RLTQ6QDP-BjJBvNFm.js} +1 -1
- package/dist/public/assets/eventmodeling-NTZA5JFV-DkPsptXM.js +1 -0
- package/dist/public/assets/flowDiagram-HODETNUW-Cos7ERss.js +1 -0
- package/dist/public/assets/{ganttDiagram-EL5Y4UJY-BPnnrdiz.js → ganttDiagram-EL5Y4UJY-Bp7Kcqlf.js} +1 -1
- package/dist/public/assets/{gitGraph-4MIJSDKK-DwnCyNC0.js → gitGraph-4MIJSDKK-B9sWzsBd.js} +1 -1
- package/dist/public/assets/{gitGraphDiagram-WWUBYQGX-DPK44hHT.js → gitGraphDiagram-WWUBYQGX-Cun29dQ7.js} +1 -1
- package/dist/public/assets/{htmlMode-DUwVyVGW.js → htmlMode-DQSWM26C.js} +1 -1
- package/dist/public/assets/{index-BuCcWx9p.js → index-CL_uWson.js} +2 -2
- package/dist/public/assets/{info-A6RAGUB7-BZfkzQZ9.js → info-A6RAGUB7-CzsgGaNb.js} +1 -1
- package/dist/public/assets/{infoDiagram-27XIBGKW-De3RP-ip.js → infoDiagram-27XIBGKW-Bg1W61Gw.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-5VMMS53U-CgKS_YTG.js → ishikawaDiagram-5VMMS53U-6IHY1rOf.js} +1 -1
- package/dist/public/assets/{journeyDiagram-3NMN7TZE-C3O0Ecte.js → journeyDiagram-3NMN7TZE-B_agREdq.js} +1 -1
- package/dist/public/assets/{jsonMode-BXRjPbsP.js → jsonMode-D9cfPVjU.js} +1 -1
- package/dist/public/assets/{kanban-definition-UXKFOSKX-CZ7RgNB2.js → kanban-definition-UXKFOSKX-D2wcFvhb.js} +1 -1
- package/dist/public/assets/{line-4f0hVotd.js → line-Bwz8kfjg.js} +1 -1
- package/dist/public/assets/media-refresh-store-6tLpeYlc.js +1 -0
- package/dist/public/assets/{mermaid-parser.core-BDA8Oa7i.js → mermaid-parser.core-Bij84NHT.js} +3 -3
- package/dist/public/assets/{mermaid.core-cvYygy5u.js → mermaid.core-BQCS3LpW.js} +3 -3
- package/dist/public/assets/{mindmap-definition-YA3MSWOX-CWYhHFvQ.js → mindmap-definition-YA3MSWOX-thQjkbqR.js} +1 -1
- package/dist/public/assets/notification-permission-CP-Ev34n.js +1 -0
- package/dist/public/assets/{packet-AYTQ26CC-CB-X1biA.js → packet-AYTQ26CC-VEf85sJW.js} +1 -1
- package/dist/public/assets/{pdf-ZHMExUNo.js → pdf-pdjeUnwA.js} +1 -1
- package/dist/public/assets/{pegDiagram-XKGWAZYB-2tLrxoF1.js → pegDiagram-XKGWAZYB-DjeXy23-.js} +1 -1
- package/dist/public/assets/{pie-WAS4IAKB-BIcZ1M_1.js → pie-WAS4IAKB-DQ4Pzsu9.js} +1 -1
- package/dist/public/assets/{pieDiagram-E7YTZNPT-DBO0Vc1V.js → pieDiagram-E7YTZNPT-D3Wr8BWV.js} +1 -1
- package/dist/public/assets/{project-abbrev-D6zdXeC-.js → project-abbrev-BGeqmg57.js} +1 -1
- package/dist/public/assets/protocol-support-DaYYcqG_.js +1 -0
- package/dist/public/assets/{quadrantDiagram-AXDQQJYC-81wtxryw.js → quadrantDiagram-AXDQQJYC-lBYptjAR.js} +1 -1
- package/dist/public/assets/{radar-RG4KPBEZ-ChF4ZoCX.js → radar-RG4KPBEZ-DVZohL9m.js} +1 -1
- package/dist/public/assets/{railroad-74A4TZTK-OtZozV0Q.js → railroad-74A4TZTK-Dmhib9Zs.js} +1 -1
- package/dist/public/assets/railroad-abnf-HS5TGJTU-cLJl7G8r.js +1 -0
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-C7AZtQYe.js +1 -0
- package/dist/public/assets/railroad-peg-WCYAUIDC-m1NYo-UH.js +1 -0
- package/dist/public/assets/{railroadDiagram-O6MQD6OU-D0o8VE08.js → railroadDiagram-O6MQD6OU-Bd1ZQ21E.js} +1 -1
- package/dist/public/assets/{requirementDiagram-BXWQKSXE-3zzyqA14.js → requirementDiagram-BXWQKSXE-ConecC48.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-P5KCCOFB-hUUgKGHN.js → sankeyDiagram-P5KCCOFB-C4lXXGjQ.js} +1 -1
- package/dist/public/assets/{scroll-restoration-CuOEoIlj.js → scroll-restoration-Bilkt5uk.js} +1 -1
- package/dist/public/assets/selection-actions-Cqc4SzZ3.js +1 -0
- package/dist/public/assets/{sequenceDiagram-WJ2MYXX4-Cwk3h-rN.js → sequenceDiagram-WJ2MYXX4-CGD6epTx.js} +1 -1
- package/dist/public/assets/{stateDiagram-D77RDMKH-BOHkHb7y.js → stateDiagram-D77RDMKH-BcQB6zAy.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH-BLJcIDB-.js +1 -0
- package/dist/public/assets/{swimlanes-42K2YHIH-P69oIcuJ.js → swimlanes-42K2YHIH-CH64A-ib.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-B-XMrfmY.js +8 -0
- package/dist/public/assets/{switch-Cw0Ot6EQ.js → switch-Cbf2XiYk.js} +1 -1
- package/dist/public/assets/{timeline-definition-24CTP7MA-DbMqQLnN.js → timeline-definition-24CTP7MA-Bwx2bFj5.js} +1 -1
- package/dist/public/assets/{treeView-Q6P3EWNA-B0EapB0i.js → treeView-Q6P3EWNA-xMDq_lmo.js} +1 -1
- package/dist/public/assets/{treemap-WGGIJYW6-DlgZgQf2.js → treemap-WGGIJYW6-2Nm-KmFC.js} +1 -1
- package/dist/public/assets/{tsMode-DZaSoOf6.js → tsMode-hIR7zVp-.js} +1 -1
- package/dist/public/assets/use-ui-state-yjATjSie.js +1 -0
- package/dist/public/assets/{vennDiagram-4TSXK5OY-BympGav2.js → vennDiagram-4TSXK5OY-BJ_I3GhP.js} +1 -1
- package/dist/public/assets/{view-state-store-DC0jfhBX.js → view-state-store-B972uFu5.js} +1 -1
- package/dist/public/assets/{wardley-WFR3VGLG-Dbf8bnG7.js → wardley-WFR3VGLG-BunCz_zh.js} +1 -1
- package/dist/public/assets/{wardleyDiagram-VM6X3IG4-BgekmxbV.js → wardleyDiagram-VM6X3IG4-DxgqzL3a.js} +1 -1
- package/dist/public/assets/{ws-ffUcAuKj.js → ws-BvrqdKhU.js} +1 -1
- package/dist/public/assets/{xychartDiagram-S5SC5T6Z-Ctmrmwdh.js → xychartDiagram-S5SC5T6Z-DqCBllTD.js} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +1 -1
- package/dist/public/assets/App-DmpTrUZ_.js +0 -2
- package/dist/public/assets/Dashboard-B_Wl5BUW.js +0 -1
- package/dist/public/assets/NewProjectDialog-Cz1ogICv.js +0 -1
- package/dist/public/assets/SettingsDialog-CfC9lvq9.js +0 -8
- package/dist/public/assets/Terminal-1wvLIdsn.js +0 -61
- package/dist/public/assets/Workspace-BA7HLQtr.js +0 -20
- package/dist/public/assets/architecture-7GRP2DOG-lF7MgvlB.js +0 -1
- package/dist/public/assets/channel-QRQcomU6.js +0 -1
- package/dist/public/assets/classDiagram-ZZMXUADV-ZU8dp57e.js +0 -1
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-ZU8dp57e.js +0 -1
- package/dist/public/assets/eventmodeling-NTZA5JFV-D59DFIHa.js +0 -1
- package/dist/public/assets/flowDiagram-HODETNUW-B5A3kSmc.js +0 -1
- package/dist/public/assets/hotkeys-B5IFr8Wj.js +0 -1
- package/dist/public/assets/media-refresh-store-DJBTfex1.js +0 -1
- package/dist/public/assets/notification-permission-BKYFvjLt.js +0 -1
- package/dist/public/assets/protocol-support-C3qZDXsO.js +0 -1
- package/dist/public/assets/railroad-abnf-HS5TGJTU-BdWrV_su.js +0 -1
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-BVjLGse_.js +0 -1
- package/dist/public/assets/railroad-peg-WCYAUIDC-B6r-AmeI.js +0 -1
- package/dist/public/assets/selection-actions-BAD5y0Aa.js +0 -1
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH-CsZg8ab0.js +0 -1
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-Dz_fGSxz.js +0 -8
- package/dist/public/assets/use-ui-state-BONthfkR.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{M as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createArchitectureServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as e,it as t}from"./chunk-DU6HZSFF-DU6gnSTi.js";var n=(n,r)=>e.lang.round(t.parse(n)[r]);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-DU6gnSTi.js";import"./chunk-75Z2AOVW-b-3efKur.js";import"./chunk-PWAF6VOD--PrNfcDv.js";import"./chunk-GMAD6QVW-BgNxh1Wg.js";import"./chunk-P2QGCYS3-VniWvIJd.js";import"./chunk-4HAMMTFA-DDQ7TZvS.js";import"./chunk-GVQU2GXP-CNaIDciQ.js";import"./chunk-OSK3NFVY-SdTDzoMy.js";import"./chunk-F27PBJKO-CLOxkQ_H.js";import"./chunk-XXDRQBXY-BuE3VzE_.js";import"./chunk-POPQ4Y6H-BUjB1fDF.js";import"./chunk-L3NEJ4N5-59iBItHO.js";import"./chunk-TLUHSLCS-CivtNrZW.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-CAQdSlKl.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-DU6gnSTi.js";import"./chunk-75Z2AOVW-b-3efKur.js";import"./chunk-PWAF6VOD--PrNfcDv.js";import"./chunk-GMAD6QVW-BgNxh1Wg.js";import"./chunk-P2QGCYS3-VniWvIJd.js";import"./chunk-4HAMMTFA-DDQ7TZvS.js";import"./chunk-GVQU2GXP-CNaIDciQ.js";import"./chunk-OSK3NFVY-SdTDzoMy.js";import"./chunk-F27PBJKO-CLOxkQ_H.js";import"./chunk-XXDRQBXY-BuE3VzE_.js";import"./chunk-POPQ4Y6H-BUjB1fDF.js";import"./chunk-L3NEJ4N5-59iBItHO.js";import"./chunk-TLUHSLCS-CivtNrZW.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-CAQdSlKl.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{O as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createEventModelingServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-DU6gnSTi.js";import"./chunk-75Z2AOVW-b-3efKur.js";import"./chunk-PWAF6VOD--PrNfcDv.js";import"./chunk-GMAD6QVW-BgNxh1Wg.js";import"./chunk-P2QGCYS3-VniWvIJd.js";import"./chunk-4HAMMTFA-DDQ7TZvS.js";import"./chunk-GVQU2GXP-CNaIDciQ.js";import"./chunk-OSK3NFVY-SdTDzoMy.js";import"./chunk-F27PBJKO-CLOxkQ_H.js";import"./chunk-XXDRQBXY-BuE3VzE_.js";import"./chunk-POPQ4Y6H-BUjB1fDF.js";import"./chunk-L3NEJ4N5-59iBItHO.js";import"./chunk-TLUHSLCS-CivtNrZW.js";import"./chunk-LNGE3PJU-DNNNwF8Y.js";import{n as e}from"./chunk-SHT3W25Y-iS7BNavD.js";export{e as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{b as n,n as r}from"./index-BuCcWx9p.js";import{i}from"./dist-B1yD4sI3.js";var a=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},o=new class extends a{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},s={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},c=new class{#e=s;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function l(e){setTimeout(e,0)}var u=typeof window>`u`||`Deno`in globalThis;function d(){}function f(e,t){return typeof e==`function`?e(t):e}function p(e){return typeof e==`number`&&e>=0&&e!==1/0}function m(e,t){return Math.max(e+(t||0)-Date.now(),0)}function h(e,t){return typeof e==`function`?e(t):e}function g(e,t){return typeof e==`function`?e(t):e}function _(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==y(o,t.options))return!1}else if(!x(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function v(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(a))return!1}else if(!x(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function y(e,t){return(t?.queryKeyHashFn||b)(e)}function b(e){return JSON.stringify(e,(e,t)=>w(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function x(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>x(e[n],t[n])):!1}var S=Object.prototype.hasOwnProperty;function ee(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=te(e)&&te(t);if(!r&&!(w(e)&&w(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:S.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ee(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function te(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w(e){if(!ne(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ne(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ne(e){return Object.prototype.toString.call(e)===`[object Object]`}function re(e){return new Promise(t=>{c.setTimeout(t,e)})}function T(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ee(e,t)}function ie(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ae(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var E=Symbol();function oe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===E?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function D(e,t){return typeof e==`function`?e(...t):!!e}function se(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var O=(()=>{let e=()=>u;return{isServer(){return e()},setIsServer(t){e=t}}})();function k(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ce=l;function le(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ce,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var A=le(),j=new class extends a{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ue(e){return Math.min(1e3*2**e,3e4)}function de(e){return(e??`online`)!==`online`||j.isOnline()}var M=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function fe(e){let t=!1,n=0,r,i=k(),a=()=>i.status!==`pending`,s=t=>{if(!a()){let n=new M(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>o.isFocused()&&(e.networkMode===`always`||j.isOnline())&&e.canRun(),d=()=>de(e.networkMode)&&e.canRun(),f=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(a())return;let i=e.retry??(O.isServer()?0:3),o=e.retryDelay??ue,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),re(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var pe=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),p(this.gcTime)&&(this.#e=c.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(O.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(c.clearTimeout(this.#e),this.#e=void 0)}};function me(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{se(e,()=>t.signal,()=>n=!0)},u=oe(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?ae:ie;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?he:N,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:N(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function N(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function he(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ge(e,t){return t?N(e,t)!=null:!1}function _e(e,t){return!t||!e.getPreviousPageParam?!1:he(e,t)!=null}var ve=class extends pe{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=I(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=I(this.options);e.data!==void 0&&(this.setState(F(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=T(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(d).catch(d):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>g(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===E||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>h(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!m(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=oe(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?me(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=fe({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof M&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof M){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...P(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...F(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),A.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function P(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:de(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function F(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function I(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ye=class extends a{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=k(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),xe(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return L(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return L(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof g(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Se(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||h(this.options.staleTime,this.#t)!==h(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ce(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(d)),t}#g(){this.#b();let e=h(this.options.staleTime,this.#t);if(O.isServer()||this.#r.isStale||!p(e))return;let t=m(this.#r.dataUpdatedAt,e)+1;this.#d=c.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(O.isServer()||g(this.options.enabled,this.#t)===!1||!p(this.#p)||this.#p===0)&&(this.#f=c.setInterval(()=>{(this.options.refetchIntervalInBackground||o.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(c.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(c.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&xe(e,t),o=i&&Se(e,n,t,r);(a||o)&&(l={...l,...P(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=T(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=T(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:R(e,t),refetch:this.refetch,promise:this.#o,isEnabled:g(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{let e=this.#o=S.promise=k();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!C(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){A.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function be(e,t){return g(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&g(t.retryOnMount,e)===!1)}function xe(e,t){return be(e,t)||e.state.data!==void 0&&L(e,t,t.refetchOnMount)}function L(e,t,n){if(g(t.enabled,e)!==!1&&h(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&R(e,t)}return!1}function Se(e,t,n,r){return(e!==t||g(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&R(e,n)}function R(e,t){return g(t.enabled,e)!==!1&&e.isStaleByTime(h(t.staleTime,e))}function Ce(e,t){return!C(e.getCurrentResult(),t)}var we=class extends pe{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Te(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=fe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),A.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Te(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ee=class extends a{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),C(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&b(t.mutationKey)!==b(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Te();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){A.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},z=e(t(),1),De=r(),Oe=z.createContext(void 0),B=e=>{let t=z.useContext(Oe);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ke=({client:e,children:t})=>(z.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,De.jsx)(Oe.Provider,{value:e,children:t})),Ae=z.createContext(!1),je=()=>z.useContext(Ae);Ae.Provider;function Me(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ne=z.createContext(Me()),Pe=()=>z.useContext(Ne),Fe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?D(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Ie=e=>{z.useEffect(()=>{e.clearReset()},[e])},Le=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||D(n,[e.error,r])),Re=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},ze=(e,t)=>e.isLoading&&e.isFetching&&!t,Be=(e,t)=>e?.suspense&&t.isPending,Ve=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function He(e,t,n){let r=je(),i=Pe(),a=B(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Re(o),Fe(o,i,s),Ie(i);let l=!a.getQueryCache().get(o.queryHash),[u]=z.useState(()=>new t(a,o)),f=u.getOptimisticResult(o),p=!r&&c;if(z.useSyncExternalStore(z.useCallback(e=>{let t=p?u.subscribe(A.batchCalls(e)):d;return u.updateResult(),t},[u,p]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),z.useEffect(()=>{u.setOptions(o)},[o,u]),Be(o,f))throw Ve(o,u,i);if(Le({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!O.isServer()&&ze(f,r)&&(l?Ve(o,u,i):s?.promise)?.catch(d).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?f:u.trackResult(f)}function V(e,t){return He(e,ye,t)}function H(e,t){let n=B(t),[r]=z.useState(()=>new Ee(n,e));z.useEffect(()=>{r.setOptions(e)},[r,e]);let i=z.useSyncExternalStore(z.useCallback(e=>r.subscribe(A.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=z.useCallback((e,t)=>{r.mutate(e,t).catch(d)},[r]);if(i.error&&D(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Ue=12,U=typeof document<`u`?document.hasFocus():!0;typeof window<`u`&&(window.addEventListener(`focus`,()=>{U=!0}),window.addEventListener(`blur`,()=>{U=!1}),o.setEventListener(e=>{let t=()=>e(void 0);return window.addEventListener(`visibilitychange`,t,!1),window.addEventListener(`focus`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t),window.removeEventListener(`focus`,t)}}));function W(e){return()=>U?e:e*Ue}function We(){return V({queryKey:[`profiles`],queryFn:()=>i(`GET`,`/api/profiles`)})}function Ge(e){return V({queryKey:[`profile-settings`,e],queryFn:()=>i(`GET`,`/api/profiles/${e}/settings`),enabled:e!==void 0})}function Ke(e){return V({queryKey:[`accounts`,e],queryFn:()=>i(`GET`,`/api/accounts?profile=${e}`),enabled:e!==void 0})}function qe(e){return V({queryKey:[`account-usage`,e],queryFn:()=>i(`GET`,`/api/accounts/${e}/usage`),enabled:e!==void 0,staleTime:15e3})}function Je(){return V({queryKey:[`repos`],queryFn:()=>i(`GET`,`/api/repos`)})}function Ye(e,t=!0){return V({queryKey:[`projects`,e??`all`],queryFn:()=>i(`GET`,e===void 0?`/api/projects`:`/api/projects?profile=${e}`),enabled:t})}function Xe(e){return V({queryKey:[`project`,e],queryFn:()=>i(`GET`,`/api/projects/${e}`),enabled:e!==void 0,placeholderData:e=>e})}function Ze(e){return i(`POST`,`/api/projects/${e}/conversations/refresh`)}function Qe(e){return V({queryKey:[`sessions`,e],queryFn:()=>i(`GET`,`/api/sessions?project=${e}`),enabled:e!==void 0})}var $e={queryKey:[`sessions`,`all`],queryFn:()=>i(`GET`,`/api/sessions`)};function et(e=!0){return V({...$e,enabled:e})}function tt(e){return e.fetchQuery($e)}function nt(){return V({queryKey:[`config`],queryFn:()=>i(`GET`,`/api/config`)})}function rt(e){return V({queryKey:[`repo-branches`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/branches`),enabled:e!==void 0,staleTime:3e4})}function it(e,t=1e4){return V({queryKey:[`repo-worktrees`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/worktrees`),enabled:e!==void 0,staleTime:t})}function at(e,t){let n=B();return H({mutationFn:t=>i(`DELETE`,`/api/repos/${e}/worktrees?path=${encodeURIComponent(t)}`),onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function ot(e,t){let n=B();return H({mutationFn:({name:t,confirm:n})=>{let r=new URLSearchParams({name:t});return n&&r.set(`confirm`,`1`),i(`DELETE`,`/api/repos/${e}/branches?${r.toString()}`)},onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function st(e){return V({queryKey:[`fs-dirs`,e],queryFn:()=>i(`GET`,`/api/fs/dirs?prefix=${encodeURIComponent(e)}`),enabled:e.startsWith(`/`)||e.startsWith(`~`),placeholderData:e=>e,staleTime:1e4})}function ct(){return V({queryKey:[`version`],queryFn:()=>i(`GET`,`/api/version`),staleTime:1/0})}function lt(){return V({queryKey:[`host`],queryFn:()=>i(`GET`,`/api/host`),staleTime:1/0})}function ut(e){return e?e.displayName||e.hostname:void 0}function dt(){return V({queryKey:[`agents`],queryFn:()=>i(`GET`,`/api/agents`),staleTime:3e4,refetchOnWindowFocus:!0})}function ft(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/profiles`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function pt(e){let t=B();return H({mutationFn:t=>i(`PATCH`,`/api/profiles/${e}/settings`,t),onSuccess:n=>t.setQueryData([`profile-settings`,e],n)})}function mt(){let e=B();return H({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/profiles/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function ht(){let e=B();return H({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/accounts/${e}`,t),onSuccess:t=>{e.invalidateQueries({queryKey:[`accounts`,t.profile_id]}),e.invalidateQueries({queryKey:[`account-usage`,t.id]})}})}function gt(){let e=B();return H({mutationFn:e=>i(`DELETE`,`/api/profiles/${e}`),onSuccess:()=>e.clear()})}function _t(){let e=B();return H({mutationFn:e=>i(`DELETE`,`/api/accounts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`accounts`]})})}function vt(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/accounts`,e),onSuccess:t=>void e.invalidateQueries({queryKey:[`accounts`,t.profile_id]})})}function yt(){return H({mutationFn:e=>i(`POST`,`/api/accounts/${e}/login`)})}function bt(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/repos`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function xt(){let e=B();return H({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/repos/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function St(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/repos/${e}/fetch`),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function Ct(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/projects`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`projects`]})})}function wt(){let e=B();return H({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/projects/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`projects`]})})}function Tt(e,t){return V({queryKey:[`scratchpad`,e,t??`none`],queryFn:()=>i(`GET`,`/api/scratchpad?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function Et(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/scratchpad`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Dt(){let e=B();return H({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/scratchpad/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Ot(){let e=B();return H({mutationFn:e=>i(`DELETE`,`/api/scratchpad/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function kt(e,t){return V({queryKey:[`layouts`,e,t??`none`],queryFn:()=>i(`GET`,`/api/layouts?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function At(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/layouts`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function jt(){let e=B();return H({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/layouts/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function Mt(){let e=B();return H({mutationFn:e=>i(`DELETE`,`/api/layouts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function G(e,t){e.invalidateQueries({queryKey:[`sessions`]}),e.invalidateQueries({queryKey:[`project`,t.project_id]})}function Nt(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/sessions`,e),onSuccess:t=>G(e,t)})}function Pt(e){let t=B();return H({mutationFn:t=>i(`POST`,`/api/sessions/${t}/${e}`),onSuccess:e=>G(t,e)})}function Ft(){let e=B();return H({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/migrate`,{account_id:t}),onSuccess:t=>G(e,t)})}function It(){let e=B();return H({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/handoff`,{account_id:t}),onSuccess:(t,{sessionId:n})=>{G(e,t),e.invalidateQueries({queryKey:[`session`,n]})}})}function Lt(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/sessions/${e}/archive`),onSuccess:t=>G(e,t)})}function Rt(){let e=B();return H({mutationFn:e=>i(`POST`,`/api/sessions/${e}/unarchive`),onSuccess:t=>G(e,t)})}function zt(){let e=B();return H({mutationFn:({sessionId:e,title:t})=>i(`PATCH`,`/api/sessions/${e}`,{title:t}),onSuccess:t=>G(e,t)})}function Bt(){let e=B();return H({mutationFn:e=>i(`PATCH`,`/api/config`,e),onSuccess:(t,n)=>{e.setQueryData([`config`],t),`displayName`in n&&e.invalidateQueries({queryKey:[`host`]})}})}async function Vt(e){try{return await i(`GET`,`/api/profiles/${e}/state`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`no_state`)return null;throw e}}function Ht(e,t){return i(`PUT`,`/api/profiles/${e}/state`,{ui_state:t})}function Ut(e,t){return V({queryKey:[`ports`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/ports`),enabled:e!==void 0&&t,refetchInterval:W(5e3),refetchIntervalInBackground:!1})}function Wt(e,t){return V({queryKey:[`session-env`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/env`),enabled:e!==void 0&&t,refetchInterval:W(5e3),refetchIntervalInBackground:!1})}function Gt(){let e=B();return H({mutationFn:e=>i(`DELETE`,`/api/sessions/${e}/env`),onSuccess:(t,n)=>{e.setQueryData([`session-env`,n],{vars:[]})}})}var K=n(`puddle.profile-id`);function Kt(){let e=(0,z.useSyncExternalStore)(K.subscribe,K.get);return e!==null&&/^[0-9a-f]{10}$/.test(e)?e:null}function qt(e){window.location.pathname!==`/`&&window.history.replaceState(null,``,`/`),K.set(e)}function q(){return window.puddleDesktop}function Jt(){let[e,t]=(0,z.useState)({fullScreen:!1,animate:!1});return(0,z.useEffect)(()=>{let e=q();if(!e)return;let n=!0;e.isFullScreen?.()?.then(e=>{n&&t({fullScreen:e,animate:!1})});let r=e.onFullScreenChange?.(e=>t({fullScreen:e,animate:!0}));return()=>{n=!1,r?.()}},[]),e}var Yt=[`Layout & tabs`,`Editor`,`Left sidebar`,`Right sidebar`],J=[{id:`palette.toggle`,label:`Command palette`,group:`Layout & tabs`,defaultBinding:`meta+KeyK`},{id:`tab.close`,label:`Close current tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyW`,desktopBinding:`meta+KeyW`},{id:`tab.reopen`,label:`Reopen last closed tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyT`,desktopBinding:`shift+meta+KeyT`},{id:`tab.newUntitled`,label:`New untitled file`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyN`,desktopBinding:`meta+KeyN`},{id:`tab.next`,label:`Next tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketRight`,desktopBinding:`ctrl+Tab`},{id:`tab.prev`,label:`Previous tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketLeft`,desktopBinding:`ctrl+shift+Tab`},{id:`window.close`,label:`Close window`,group:`Layout & tabs`,defaultBinding:`meta+KeyW`,desktopBinding:`shift+meta+KeyW`},{id:`sidebar.left`,label:`Toggle left sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Comma`,desktopBinding:`meta+KeyB`},{id:`sidebar.right`,label:`Toggle right sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Period`,desktopBinding:`shift+meta+KeyB`},{id:`editor.save`,label:`Save`,group:`Editor`,defaultBinding:`meta+KeyS`,editor:!0},{id:`editor.wordWrap`,label:`Toggle word wrap`,group:`Editor`,defaultBinding:`alt+KeyZ`,editor:!0},{id:`nav.files`,label:`Open Files`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyE`},{id:`nav.search`,label:`Open Search`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyF`},{id:`nav.changes`,label:`Open Changes`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyV`},{id:`nav.worktrees`,label:`Open Worktrees`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyB`},{id:`session.newAgent`,label:`New agent`,group:`Right sidebar`,defaultBinding:`ctrl+alt+Backquote`,desktopBinding:`meta+KeyT`},{id:`session.newTerminal`,label:`New terminal`,group:`Right sidebar`,defaultBinding:`ctrl+Backquote`},{id:`scratchpad.toggle`,label:`Toggle Scratchpad`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyS`},{id:`layouts.toggle`,label:`Toggle Layouts`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyL`}],Xt=new Map(J.map(e=>[e.id,e])),Zt=typeof window<`u`&&q()!==void 0;function Y(e,t=Zt){return t&&e.desktopBinding?e.desktopBinding:e.defaultBinding}function Qt(e){let t=e.code;if(!t||/^(Control|Alt|Shift|Meta)(Left|Right)$/.test(t))return null;let n=[];return e.ctrlKey&&n.push(`ctrl`),e.altKey&&n.push(`alt`),e.shiftKey&&n.push(`shift`),e.metaKey&&n.push(`meta`),n.length===0?null:(n.push(t),n.join(`+`))}var $t={ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`},en={Comma:`,`,Period:`.`,Backquote:"`",Slash:`/`,Backslash:`\\`,Minus:`-`,Equal:`=`,Space:`␣`,Enter:`↵`,Escape:`Esc`,Tab:`⇥`,BracketLeft:`[`,BracketRight:`]`};function tn(e){return e.startsWith(`Key`)?e.slice(3):e.startsWith(`Digit`)?e.slice(5):en[e]??e}function nn(e){if(!e)return`—`;let t=e.split(`+`),n=t.pop()??``;return t.map(e=>$t[e]??e).join(``)+tn(n)}var X=new Map;function rn(e,t){return X.set(e,t),()=>{X.get(e)===t&&X.delete(e)}}var an=e=>X.get(e),on=e=>Xt.get(e);function sn(e,t){return e.id===`editor.save`||t&&e.editor!==!0}var cn={},Z=new Set,Q=$();function $(){let e={};for(let t of J)e[t.id]=cn[t.id]||Y(t);return e}function ln(e){cn=e??{},Q=$(),Z.forEach(e=>e())}var un=e=>Q[e]??``;function dn(e){for(let[t,n]of Object.entries(Q))if(n===e)return t}function fn(e){return nn(pn()[e]??``)}function pn(){return(0,z.useSyncExternalStore)(e=>(Z.add(e),()=>Z.delete(e)),()=>Q)}export{jt as $,nt as A,_e as At,ot as B,h as Bt,Ze as C,He as Ct,et as D,ye as Dt,dt as E,we as Et,bt as F,y as Ft,St as G,gt as H,o as Ht,Et as I,v as It,kt as J,It as K,Nt as L,_ as Lt,At as M,A as Mt,ft as N,f as Nt,Lt as O,ve as Ot,Ct as P,b as Pt,Bt as Q,ct as R,d as Rt,Ht as S,V as St,Ke as T,B as Tt,Ot as U,a as Ut,Mt as V,E as Vt,st as W,Ft as X,yt as Y,ht as Z,qt as _,Ut as _t,nn as a,Ge as at,Vt as b,W as bt,un as c,Ye as ct,ln as d,rt as dt,mt as et,Y as f,it as ft,K as g,Wt as gt,Jt as h,Pt as ht,Qt as i,Dt as it,vt as j,j as jt,Gt as k,ge as kt,sn as l,at as lt,q as m,Tt as mt,Yt as n,wt as nt,on as o,We as ot,fn as p,Je as pt,lt as q,dn as r,xt as rt,an as s,Xe as st,J as t,pt as tt,rn as u,zt as ut,Kt as v,Qe as vt,qe as w,ke as wt,ut as x,H as xt,tt as y,Rt as yt,_t as z,x as zt};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n}from"./index-BuCcWx9p.js";import{a as r,i,n as a}from"./dist-B1yD4sI3.js";import{At as o,Ct as s,Dt as c,St as l,Tt as u,bt as d,kt as f,xt as p}from"./hotkeys-B5IFr8Wj.js";import{t as m}from"./createLucideIcon-DyMAgLa3.js";var h=class extends c{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:s,isRefetchError:c}=r,l=n.fetchMeta?.fetchMore?.direction,u=s&&l===`forward`,d=i&&l===`forward`,p=s&&l===`backward`,m=i&&l===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:f(t,n.data),hasPreviousPage:o(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:c&&!u&&!p,isRefetching:a&&!d&&!m}}};function g(e,t){return s(e,h,t)}var ee=m(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),_=50;function v(e){return e===void 0?``:`&root=${encodeURIComponent(e)}`}function y(e){return e?{placeholderData:e=>e}:{}}function b(e,t,n){let r=e!==void 0;return l({queryKey:n===void 0?[`wt-tree`,e,t]:[`wt-tree`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/tree?path=${encodeURIComponent(t)}${v(n)}`),enabled:r,...y(r)})}function x(e,t,n){let r=n?.root;return l({queryKey:r===void 0?[`wt-file`,e,t]:[`wt-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0),...n?.live===!0?{refetchInterval:d(3e3),refetchOnWindowFocus:!0}:{}})}function S(e,t){let n=u();return p({mutationFn:({path:n,...r})=>i(`PUT`,`/api/worktrees/${e}/file?path=${encodeURIComponent(n)}${v(t)}`,r),onSuccess:(r,{path:i})=>{n.invalidateQueries({queryKey:t===void 0?[`wt-file`,e,i]:[`wt-file`,e,i,t]}),n.invalidateQueries({queryKey:[`wt-diff`,e]})}})}function te(e,t){let n=t?.against??`base`,r=t?.area,a=t?.root,o=e!==void 0&&(t?.enabled??!0);return l({queryKey:a===void 0?[`wt-diff`,e,n,r]:[`wt-diff`,e,n,r,a],queryFn:()=>{let t=r===void 0?``:`&area=${r}`;return i(`GET`,`/api/worktrees/${e}/diff?against=${n}${t}${v(a)}`)},enabled:o,refetchInterval:d(1e4),refetchOnWindowFocus:!0,...y(o)})}function ne(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return l({queryKey:n===void 0?[`git-repositories`,e]:[`git-repositories`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-repositories${C(n)}`),enabled:r,refetchInterval:d(1e4),refetchOnWindowFocus:!0,...y(r)})}function re(e,t,n){let r=n?.root,a=e!==void 0&&(n?.enabled??!0);return l({queryKey:[`git-original`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-original?path=${encodeURIComponent(t)}${v(r)}`),enabled:a,refetchInterval:d(1e4),refetchOnWindowFocus:!0})}function ie(e,t,n){let r=n?.root;return l({queryKey:[`git-index-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/index-file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0)})}function ae(e,t){let n=u();return p({mutationFn:({action:n,...r})=>i(`POST`,`/api/worktrees/${e}/git-${n}${C(t)}`,r),onSuccess:()=>{n.invalidateQueries({queryKey:[`git-repositories`,e]}),n.invalidateQueries({queryKey:[`wt-git-status`,e]}),n.invalidateQueries({queryKey:[`wt-diff`,e]}),n.invalidateQueries({queryKey:[`wt-log`,e]}),n.invalidateQueries({queryKey:[`wt-show`,e]}),n.invalidateQueries({queryKey:[`git-original`,e]}),n.invalidateQueries({queryKey:[`git-index-file`,e]})}})}function oe(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return l({queryKey:n===void 0?[`wt-git-status`,e]:[`wt-git-status`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-status${C(n)}`),enabled:r,refetchInterval:d(1e4),refetchOnWindowFocus:!0,...y(r)})}function C(e){return e===void 0?``:`?root=${encodeURIComponent(e)}`}function se(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/create${C(r)}`,{path:t,kind:n})}function ce(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/rename${C(r)}`,{from:t,to:n})}function le(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/copy${C(r)}`,{from:t,to:n})}function ue(e,t,n){return i(`POST`,`/api/worktrees/${e}/transfer${C(n)}`,t)}function de(e,t,n){return i(`POST`,`/api/worktrees/${e}/delete${C(n)}`,{path:t})}function fe(e,t,n){let{query:r,regex:a,caseSensitive:o,wholeWord:s}=t;return l({queryKey:[`wt-search`,e,r,a,o,s,n],queryFn:()=>{let t=new URLSearchParams({q:r});return a&&t.set(`regex`,`1`),o&&t.set(`case`,`1`),s&&t.set(`word`,`1`),n!==void 0&&t.set(`root`,n),i(`GET`,`/api/worktrees/${e}/search?${t.toString()}`)},enabled:e!==void 0&&r.length>0,staleTime:2e3})}function pe(e,t,n,r){let a=r?.root;return l({queryKey:[`wt-file-at`,e,t,n,a],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file-at?ref=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${v(a)}`),enabled:e!==void 0&&(r?.enabled??!0),staleTime:1/0})}function me(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return g({queryKey:n===void 0?[`wt-log`,e]:[`wt-log`,e,n],queryFn:({pageParam:t})=>i(`GET`,`/api/worktrees/${e}/log?limit=${_}&skip=${t}${v(n)}`),initialPageParam:0,getNextPageParam:(e,t)=>e.has_more?t.length*_:void 0,enabled:r,...y(r)})}function w(e,t,n){return l({queryKey:n===void 0?[`wt-show`,e,t]:[`wt-show`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/show/${t}${C(n)}`),enabled:e!==void 0&&t!==void 0,staleTime:1/0})}var T=64*1024*1024;function E(e,t){let n=[],r=[],i=0;for(let a of e)r.length>0&&i+a.size>t&&(n.push(r),r=[],i=0),r.push(a),i+=a.size;return r.length>0&&n.push(r),n}async function D(e,t,n,i){let a=[];for(let o of E(n,T)){let n=new FormData;for(let e of o)n.append(`files`,e,e.name);let s=await r(`POST`,`/api/worktrees/${e}/upload?dir=${encodeURIComponent(t)}${v(i)}`,{body:n});a.push(...(await s.json()).files)}return{files:a}}function O(e,t){if(!e)return t;let n=/filename\*=UTF-8''([^;]+)/i.exec(e);if(n?.[1])try{return decodeURIComponent(n[1])}catch{return t}return/filename="?([^"; ]+)"?/i.exec(e)?.[1]??t}async function k(e,t,n){let i=await r(`GET`,`/api/worktrees/${e}/download?path=${encodeURIComponent(t)}${v(n)}`),a=await i.blob(),o=t.split(`/`).filter(Boolean).pop()??`worktree`,s=O(i.headers.get(`content-disposition`),o),c=URL.createObjectURL(a);try{let e=document.createElement(`a`);e.href=c,e.download=s,document.body.appendChild(e),e.click(),e.remove()}finally{URL.revokeObjectURL(c)}}var A=e(t(),1),j=[],M=new Map,N=new Map,P=new Map;function F(e,t){let n=M.get(e)??j;t.length===0?M.delete(e):M.set(e,t);let r=new Set([...n.map(e=>B(e.source)),...t.map(e=>B(e.source))]);for(let e of r)z(e)}function I(e){F(e,j)}function L(e,t,n){let r=B({session:e,path:t,...n===void 0?{}:{root:n}});return(0,A.useSyncExternalStore)((0,A.useCallback)(e=>he(r,e),[r]),()=>R({session:e,path:t,...n===void 0?{}:{root:n}}))}function R(e){return N.get(B(e))??j}function z(e){let t=[...M.values()].flatMap(t=>t.filter(t=>B(t.source)===e));t.length===0?N.delete(e):N.set(e,t);for(let t of P.get(e)??[])t()}function he(e,t){let n=P.get(e)??new Set;return n.add(t),P.set(e,n),()=>{n.delete(t),n.size===0&&P.delete(e)}}function B(e){return JSON.stringify([e.session,e.root??null,e.path])}function V(e,t,n){let r=`${encodeURIComponent(e)}:${encodeURIComponent(t)}`;return n===void 0?r:`${r}:${encodeURIComponent(n)}`}var H=new Map;function ge(e,t,n){let r={save:t,...n?{target:n}:{}};return H.set(e,r),()=>{H.get(e)===r&&H.delete(e)}}function _e(e){if(e===null)return!1;let t=H.get(e);return t?(t.save(),!0):!1}async function ve(e,t){let n=V(e.session,e.path,e.root),r=[...H.entries()].flatMap(([r,i])=>{let a=i.target;if(!a||a.session!==e.session||a.root!==e.root)return[];let o=ye(a.path);return r!==n&&!t.has(o)?[]:[Promise.resolve(i.save())]});return(await Promise.all(r)).every(e=>e!==!1)}function ye(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<0?``:t.slice(n+1).toLowerCase()}var be=`UTC`;function xe(e){return new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`,timeZone:be})}var U=60,W=60*U,G=24*W,Se=7*G;function Ce(e,t=new Date){let n=new Date(e).getTime(),r=Math.max(0,Math.floor((t.getTime()-n)/1e3));return r<U?`just now`:r<W?`${Math.floor(r/U)} m ago`:r<G?`${Math.floor(r/W)} h ago`:r<Se?`${Math.floor(r/G)} d ago`:xe(n)}function we(e,t){return t?`added`:e}function Te(e){return i(`POST`,`/api/profiles/${e}/untitled`)}function K(e,t){return[`untitled`,e,t]}function Ee(e,t){return l({queryKey:K(e,t),queryFn:()=>i(`GET`,`/api/profiles/${e}/untitled/${t}`),enabled:e!==null,staleTime:1/0})}function De(e,t,n,r){e.setQueryData(K(t,n),e=>e===void 0?e:{...e,content:r})}function Oe(e,t,n){return i(`PUT`,`/api/profiles/${e}/untitled/${t}`,{content:n})}function ke(e,t){return i(`DELETE`,`/api/profiles/${e}/untitled/${t}`)}var q=null,J=new Map;function Ae(e){q=e}function je(e){q?.(e)}function Me(e,t){J.set(e,t)}function Ne(e){return J.get(e)}function Pe(e){J.delete(e)}var Y=n(),X=(0,A.createContext)({openFile:()=>void 0,handler:null,setHandler:()=>void 0});function Fe({children:e}){let[t,n]=(0,A.useState)(null),r=(0,A.useCallback)(e=>n(()=>e),[]),i=(0,A.useCallback)((e,n,r,i)=>{if(!t){a(`The editor is not ready yet.`);return}t(e,n,r,i)},[t]),o=(0,A.useMemo)(()=>({openFile:i,handler:t,setHandler:r}),[i,t,r]);return(0,Y.jsx)(X.Provider,{value:o,children:e})}function Ie(){let{openFile:e}=(0,A.useContext)(X);return{openFile:e}}function Le(e){let{setHandler:t}=(0,A.useContext)(X),n=(0,A.useRef)(e);n.current=e,(0,A.useEffect)(()=>(t((e,t,r,i)=>n.current(e,t,r,i)),()=>t(null)),[t])}var Z=new Map,Q=new Map;function Re(e,t,n){let r=$(e,t,n);Z.set(r,(Z.get(r)??0)+1);for(let e of Q.get(r)??[])e()}function ze(e,t,n){let r=$(e,t,n),i=(0,A.useCallback)(e=>Be(r,e),[r]),a=(0,A.useCallback)(()=>Z.get(r)??0,[r]);return(0,A.useSyncExternalStore)(i,a,a)}function Be(e,t){let n=Q.get(e);return n||(n=new Set,Q.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&Q.delete(e)}}function $(e,t,n){return JSON.stringify([e,n??null,t])}export{v as A,te as B,F as C,de as D,se as E,ae as F,b as G,oe as H,re as I,ee as K,ne as L,D as M,w as N,k as O,pe as P,ie as R,I as S,le as T,me as U,x as V,fe as W,Ce as _,Le as a,ve as b,je as c,Te as d,ke as f,we as g,Ee as h,Ie as i,ue as j,ce as k,Ae as l,De as m,ze as n,Pe as o,Oe as p,Fe as r,Me as s,Re as t,Ne as u,ge as v,L as w,V as x,_e as y,S as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n}from"./index-BuCcWx9p.js";import{o as r}from"./dist-B1yD4sI3.js";import{St as i,Tt as a,m as o,xt as s}from"./hotkeys-B5IFr8Wj.js";import{S as c,T as l,_ as u,a as d,b as f,d as p,f as m,g as h,h as ee,m as te,n as ne,o as re,p as ie,r as ae,t as oe,v as se,w as ce}from"./dialog-BWYDvidH.js";import{a as g,n as le}from"./button-C2U4JLSJ.js";import{_ as ue,g as de,h as _,o as fe,t as pe,v as me,y as v}from"./LazyTerminal-D_WH4lhZ.js";import{c as he,f as ge,s as _e}from"./switch-Cw0Ot6EQ.js";import{n as y}from"./x-CZCUod6A.js";import{t as b}from"./createLucideIcon-DyMAgLa3.js";var ve=b(`anchor`,[[`path`,{d:`M12 6v16`,key:`nqf5sj`}],[`path`,{d:`m19 13 2-1a9 9 0 0 1-18 0l2 1`,key:`y7qv08`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}]]),ye=b(`bike`,[[`circle`,{cx:`18.5`,cy:`17.5`,r:`3.5`,key:`15x4ox`}],[`circle`,{cx:`5.5`,cy:`17.5`,r:`3.5`,key:`1noe27`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`path`,{d:`M12 17.5V14l-3-3 4-3 2 3h2`,key:`1npguv`}]]),be=b(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),xe=b(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Se=b(`book`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),Ce=b(`brush`,[[`path`,{d:`m11 10 3 3`,key:`fzmg1i`}],[`path`,{d:`M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z`,key:`p4q2r7`}],[`path`,{d:`M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031`,key:`wy6l02`}]]),we=b(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),Te=b(`cake`,[[`path`,{d:`M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8`,key:`1w3rig`}],[`path`,{d:`M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1`,key:`n2jgmb`}],[`path`,{d:`M2 21h20`,key:`1nyx9w`}],[`path`,{d:`M7 8v3`,key:`1qtyvj`}],[`path`,{d:`M12 8v3`,key:`hwp4zt`}],[`path`,{d:`M17 8v3`,key:`1i6e5u`}],[`path`,{d:`M7 4h.01`,key:`1bh4kh`}],[`path`,{d:`M12 4h.01`,key:`1ujb9j`}],[`path`,{d:`M17 4h.01`,key:`1upcoc`}]]),Ee=b(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),De=b(`car`,[[`path`,{d:`M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2`,key:`5owen`}],[`circle`,{cx:`7`,cy:`17`,r:`2`,key:`u2ysq9`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}],[`circle`,{cx:`17`,cy:`17`,r:`2`,key:`axvx0g`}]]),Oe=b(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),x=b(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),S=b(`coffee`,[[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M14 2v2`,key:`6buw04`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`,key:`pwadti`}],[`path`,{d:`M6 2v2`,key:`colzsn`}]]),C=b(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),w=b(`crown`,[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),T=b(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),ke=b(`droplet`,[[`path`,{d:`M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z`,key:`c7niix`}]]),Ae=b(`feather`,[[`path`,{d:`M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z`,key:`18jl4k`}],[`path`,{d:`M16 8 2 22`,key:`vp34q`}],[`path`,{d:`M17.5 15H9`,key:`1oz8nu`}]]),je=b(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),Me=b(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),Ne=b(`flower-2`,[[`path`,{d:`M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1`,key:`3pnvol`}],[`circle`,{cx:`12`,cy:`8`,r:`2`,key:`1822b1`}],[`path`,{d:`M12 10v12`,key:`6ubwww`}],[`path`,{d:`M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z`,key:`9hd38g`}],[`path`,{d:`M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z`,key:`ufn41s`}]]),Pe=b(`flower`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5`,key:`14wa3c`}],[`path`,{d:`M12 7.5V9`,key:`1oy5b0`}],[`path`,{d:`M7.5 12H9`,key:`eltsq1`}],[`path`,{d:`M16.5 12H15`,key:`vk5kw4`}],[`path`,{d:`M12 16.5V15`,key:`k7eayi`}],[`path`,{d:`m8 8 1.88 1.88`,key:`nxy4qf`}],[`path`,{d:`M14.12 9.88 16 8`,key:`1lst6k`}],[`path`,{d:`m8 16 1.88-1.88`,key:`h2eex1`}],[`path`,{d:`M14.12 14.12 16 16`,key:`uqkrx3`}]]),Fe=b(`gamepad-2`,[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]),Ie=b(`gem`,[[`path`,{d:`M10.5 3 8 9l4 13 4-13-2.5-6`,key:`b3dvk1`}],[`path`,{d:`M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z`,key:`7w4byz`}],[`path`,{d:`M2 9h20`,key:`16fsjt`}]]),Le=b(`ghost`,[[`path`,{d:`M9 10h.01`,key:`qbtxuw`}],[`path`,{d:`M15 10h.01`,key:`1qmjsl`}],[`path`,{d:`M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z`,key:`uwwb07`}]]),Re=b(`gift`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`,key:`1sqzm4`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`,key:`kc0143`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`,key:`1hberx`}]]),ze=b(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Be=b(`guitar`,[[`path`,{d:`m11.9 12.1 4.514-4.514`,key:`109xqo`}],[`path`,{d:`M20.1 2.3a1 1 0 0 0-1.4 0l-1.114 1.114A2 2 0 0 0 17 4.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 17.828 7h1.344a2 2 0 0 0 1.414-.586L21.7 5.3a1 1 0 0 0 0-1.4z`,key:`txyc8t`}],[`path`,{d:`m6 16 2 2`,key:`16qmzd`}],[`path`,{d:`M8.23 9.85A3 3 0 0 1 11 8a5 5 0 0 1 5 5 3 3 0 0 1-1.85 2.77l-.92.38A2 2 0 0 0 12 18a4 4 0 0 1-4 4 6 6 0 0 1-6-6 4 4 0 0 1 4-4 2 2 0 0 0 1.85-1.23z`,key:`1de1vg`}]]),Ve=b(`headphones`,[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`,key:`1xhozi`}]]),He=b(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Ue=b(`ice-cream-cone`,[[`path`,{d:`m7 11 4.08 10.35a1 1 0 0 0 1.84 0L17 11`,key:`1v6356`}],[`path`,{d:`M17 7A5 5 0 0 0 7 7`,key:`151p3v`}],[`path`,{d:`M17 7a2 2 0 0 1 0 4H7a2 2 0 0 1 0-4`,key:`1sdaij`}]]),We=b(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Ge=b(`leaf`,[[`path`,{d:`M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z`,key:`nnexq3`}],[`path`,{d:`M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12`,key:`mt58a7`}]]),Ke=b(`map`,[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]),E=b(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),qe=b(`mountain-snow`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}],[`path`,{d:`M4.14 15.08c2.62-1.57 5.24-1.43 7.86.42 2.74 1.94 5.49 2 8.23.19`,key:`1pvmmp`}]]),Je=b(`mountain`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}]]),Ye=b(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]),D=b(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),Xe=b(`paw-print`,[[`circle`,{cx:`11`,cy:`4`,r:`2`,key:`vol9p0`}],[`circle`,{cx:`18`,cy:`8`,r:`2`,key:`17gozi`}],[`circle`,{cx:`20`,cy:`16`,r:`2`,key:`1v9bxh`}],[`path`,{d:`M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z`,key:`1ydw1z`}]]),Ze=b(`pizza`,[[`path`,{d:`m12 14-1 1`,key:`11onhr`}],[`path`,{d:`m13.75 18.25-1.25 1.42`,key:`1yisr3`}],[`path`,{d:`M17.775 5.654a15.68 15.68 0 0 0-12.121 12.12`,key:`1qtqk6`}],[`path`,{d:`M18.8 9.3a1 1 0 0 0 2.1 7.7`,key:`fbbbr2`}],[`path`,{d:`M21.964 20.732a1 1 0 0 1-1.232 1.232l-18-5a1 1 0 0 1-.695-1.232A19.68 19.68 0 0 1 15.732 2.037a1 1 0 0 1 1.232.695z`,key:`1hyfdd`}]]),Qe=b(`plane`,[[`path`,{d:`M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z`,key:`1v9wt8`}]]),$e=b(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),et=b(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),tt=b(`rainbow`,[[`path`,{d:`M22 17a10 10 0 0 0-20 0`,key:`ozegv`}],[`path`,{d:`M6 17a6 6 0 0 1 12 0`,key:`5giftw`}],[`path`,{d:`M10 17a2 2 0 0 1 4 0`,key:`gnsikk`}]]),nt=b(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),rt=b(`sailboat`,[[`path`,{d:`M10 2v15`,key:`1qf71f`}],[`path`,{d:`M7 22a4 4 0 0 1-4-4 1 1 0 0 1 1-1h16a1 1 0 0 1 1 1 4 4 0 0 1-4 4z`,key:`1pxcvx`}],[`path`,{d:`M9.159 2.46a1 1 0 0 1 1.521-.193l9.977 8.98A1 1 0 0 1 20 13H4a1 1 0 0 1-.824-1.567z`,key:`5oog16`}]]),it=b(`ship`,[[`path`,{d:`M12 10.189V14`,key:`1p8cqu`}],[`path`,{d:`M12 2v3`,key:`qbqxhf`}],[`path`,{d:`M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6`,key:`qpkstq`}],[`path`,{d:`M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76`,key:`7tigtc`}],[`path`,{d:`M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1924j5`}]]),at=b(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),ot=b(`snowflake`,[[`path`,{d:`m10 20-1.25-2.5L6 18`,key:`18frcb`}],[`path`,{d:`M10 4 8.75 6.5 6 6`,key:`7mghy3`}],[`path`,{d:`m14 20 1.25-2.5L18 18`,key:`1chtki`}],[`path`,{d:`m14 4 1.25 2.5L18 6`,key:`1b4wsy`}],[`path`,{d:`m17 21-3-6h-4`,key:`15hhxa`}],[`path`,{d:`m17 3-3 6 1.5 3`,key:`11697g`}],[`path`,{d:`M2 12h6.5L10 9`,key:`kv9z4n`}],[`path`,{d:`m20 10-1.5 2 1.5 2`,key:`1swlpi`}],[`path`,{d:`M22 12h-6.5L14 15`,key:`1mxi28`}],[`path`,{d:`m4 10 1.5 2L4 14`,key:`k9enpj`}],[`path`,{d:`m7 21 3-6-1.5-3`,key:`j8hb9u`}],[`path`,{d:`m7 3 3 6h4`,key:`1otusx`}]]),st=b(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),ct=b(`sprout`,[[`path`,{d:`M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3`,key:`139s4v`}],[`path`,{d:`M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4`,key:`1dlkgp`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),lt=b(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),O=b(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),ut=b(`tent`,[[`path`,{d:`M3.5 21 14 3`,key:`1szst5`}],[`path`,{d:`M20.5 21 10 3`,key:`1310c3`}],[`path`,{d:`M15.5 21 12 15l-3.5 6`,key:`1ddtfw`}],[`path`,{d:`M2 21h20`,key:`1nyx9w`}]]),dt=b(`train-front`,[[`path`,{d:`M8 3.1V7a4 4 0 0 0 8 0V3.1`,key:`1v71zp`}],[`path`,{d:`m9 15-1-1`,key:`1yrq24`}],[`path`,{d:`m15 15 1-1`,key:`1t0d6s`}],[`path`,{d:`M9 19c-2.8 0-5-2.2-5-5v-4a8 8 0 0 1 16 0v4c0 2.8-2.2 5-5 5Z`,key:`1p0hjs`}],[`path`,{d:`m8 19-2 3`,key:`13i0xs`}],[`path`,{d:`m16 19 2 3`,key:`xo31yx`}]]),ft=b(`tree-pine`,[[`path`,{d:`m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z`,key:`cpyugq`}],[`path`,{d:`M12 22v-3`,key:`kmzjlo`}]]),pt=b(`trees`,[[`path`,{d:`M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z`,key:`1l6gj6`}],[`path`,{d:`M7 16v6`,key:`1a82de`}],[`path`,{d:`M13 19v3`,key:`13sx9i`}],[`path`,{d:`M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5`,key:`1sj9kv`}]]),mt=b(`trophy`,[[`path`,{d:`M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978`,key:`1n3hpd`}],[`path`,{d:`M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978`,key:`rfe1zi`}],[`path`,{d:`M18 9h1.5a1 1 0 0 0 0-5H18`,key:`7xy6bh`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6 9H4.5a1 1 0 0 1 0-5H6`,key:`tex48p`}]]),ht=b(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),gt=b(`wind`,[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]),k=[{name:`mountain`,Icon:Je},{name:`mountain-snow`,Icon:qe},{name:`tree-pine`,Icon:ft},{name:`trees`,Icon:pt},{name:`leaf`,Icon:Ge},{name:`flower`,Icon:Pe},{name:`flower-2`,Icon:Ne},{name:`sprout`,Icon:ct},{name:`sun`,Icon:O},{name:`moon`,Icon:E},{name:`star`,Icon:lt},{name:`cloud`,Icon:x},{name:`snowflake`,Icon:ot},{name:`zap`,Icon:_e},{name:`flame`,Icon:Me},{name:`droplet`,Icon:ke},{name:`rainbow`,Icon:tt},{name:`wind`,Icon:gt},{name:`bird`,Icon:be},{name:`fish`,Icon:je},{name:`cat`,Icon:Oe},{name:`dog`,Icon:T},{name:`rabbit`,Icon:et},{name:`turtle`,Icon:ht},{name:`bug`,Icon:we},{name:`snail`,Icon:at},{name:`paw-print`,Icon:Xe},{name:`feather`,Icon:Ae},{name:`rocket`,Icon:nt},{name:`anchor`,Icon:ve},{name:`compass`,Icon:C},{name:`map`,Icon:Ke},{name:`tent`,Icon:ut},{name:`camera`,Icon:Ee},{name:`music`,Icon:Ye},{name:`headphones`,Icon:Ve},{name:`palette`,Icon:D},{name:`brush`,Icon:Ce},{name:`pencil`,Icon:fe},{name:`book`,Icon:Se},{name:`book-open`,Icon:xe},{name:`coffee`,Icon:S},{name:`pizza`,Icon:Ze},{name:`ice-cream-cone`,Icon:Ue},{name:`cake`,Icon:Te},{name:`gift`,Icon:Re},{name:`gamepad-2`,Icon:Fe},{name:`puzzle`,Icon:$e},{name:`bike`,Icon:ye},{name:`car`,Icon:De},{name:`plane`,Icon:Qe},{name:`ship`,Icon:it},{name:`sailboat`,Icon:rt},{name:`train-front`,Icon:dt},{name:`heart`,Icon:He},{name:`sparkles`,Icon:st},{name:`crown`,Icon:w},{name:`gem`,Icon:Ie},{name:`trophy`,Icon:mt},{name:`ghost`,Icon:Le},{name:`bot`,Icon:ge},{name:`globe`,Icon:ze},{name:`guitar`,Icon:Be}],_t=Object.fromEntries(k.map(e=>[e.name,e.Icon])),A=n(),vt={navy:`text-fg`,gold:`text-fg-gold`,blue:`text-icon-blue`,green:`text-icon-green`,amber:`text-icon-amber`,red:`text-icon-red`,violet:`text-icon-violet`,cyan:`text-icon-cyan`,accent:`text-accent`};function j(e){return e&&vt[e]||``}function yt({icon:e,colour:t,className:n}){let r=y(`size-4 shrink-0`,t?j(t):`text-fg-muted`,n);return(0,A.jsx)(e&&_t[e]||he,{className:r})}var M=e(t(),1),N=`Popover`,[P,bt]=ce(N,[v]),F=v(),[xt,I]=P(N),L=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=F(t),c=M.useRef(null),[l,u]=M.useState(!1),[d,f]=ee({prop:r,defaultProp:i??!1,onChange:a,caller:N});return(0,A.jsx)(me,{...s,children:(0,A.jsx)(xt,{scope:t,contentId:se(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:M.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:M.useCallback(()=>u(!0),[]),onCustomAnchorRemove:M.useCallback(()=>u(!1),[]),modal:o,children:n})})};L.displayName=N;var R=`PopoverAnchor`,St=M.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=I(R,n),a=F(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return M.useEffect(()=>(o(),()=>s()),[o,s]),(0,A.jsx)(_,{...a,...r,ref:t})});St.displayName=R;var z=`PopoverTrigger`,B=M.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=I(z,n),a=F(n),o=g(t,i.triggerRef),s=(0,A.jsx)(c.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":q(i.open),...r,ref:o,onClick:l(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,A.jsx)(_,{asChild:!0,...a,children:s})});B.displayName=z;var V=`PopoverPortal`,[Ct,wt]=P(V,{forceMount:void 0}),H=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=I(V,t);return(0,A.jsx)(Ct,{scope:t,forceMount:n,children:(0,A.jsx)(h,{present:n||a.open,children:(0,A.jsx)(u,{asChild:!0,container:i,children:r})})})};H.displayName=V;var U=`PopoverContent`,W=M.forwardRef((e,t)=>{let n=wt(U,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=I(U,e.__scopePopover);return(0,A.jsx)(h,{present:r||a.open,children:a.modal?(0,A.jsx)(Et,{...i,ref:t}):(0,A.jsx)(Dt,{...i,ref:t})})});W.displayName=U;var Tt=le(`PopoverContent.RemoveScroll`),Et=M.forwardRef((e,t)=>{let n=I(U,e.__scopePopover),r=M.useRef(null),i=g(t,r),a=M.useRef(!1);return M.useEffect(()=>{let e=r.current;if(e)return p(e)},[]),(0,A.jsx)(m,{as:Tt,allowPinchZoom:!0,children:(0,A.jsx)(G,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:l(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:l(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:l(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Dt=M.forwardRef((e,t)=>{let n=I(U,e.__scopePopover),r=M.useRef(!1),i=M.useRef(!1);return(0,A.jsx)(G,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),G=M.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,p=I(U,n),m=F(n);return ie(),(0,A.jsx)(te,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,A.jsx)(f,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,A.jsx)(ue,{"data-state":q(p.open),role:`dialog`,id:p.contentId,...m,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),K=`PopoverClose`,Ot=M.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=I(K,n);return(0,A.jsx)(c.button,{type:`button`,...r,ref:t,onClick:l(e.onClick,()=>i.onOpenChange(!1))})});Ot.displayName=K;var kt=`PopoverArrow`,At=M.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=F(n);return(0,A.jsx)(de,{...i,...r,ref:t})});At.displayName=kt;function q(e){return e?`open`:`closed`}var jt=L,Mt=B,Nt=H,Pt=W,Ft=jt,It=Mt;function Lt({className:e,align:t=`end`,sideOffset:n=8,...r}){return(0,A.jsx)(Nt,{children:(0,A.jsx)(Pt,{align:t,sideOffset:n,className:y(`z-50 rounded-lg bg-elevated p-5 shadow-2xl outline-none`,e),...r})})}function Rt({stream:e,label:t,hint:n,onClose:r}){let[i,a]=(0,M.useState)(null);return(0,A.jsx)(oe,{open:!0,onOpenChange:e=>!e&&r(),children:(0,A.jsxs)(ne,{className:`h-[85vh] max-w-[calc(100vw-4rem)]`,children:[(0,A.jsxs)(d,{children:[(0,A.jsxs)(re,{children:[t,` — login`]}),(0,A.jsx)(ae,{children:i===null?`Complete the agent’s login flow below.${n===void 0?` The account shows as logged in once it finishes cleanly.`:` ${n}`}`:`The login exited with code ${i} without completing. The output above may say why; close this and try again.`})]}),(0,A.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-md bg-ground p-1`,children:(0,A.jsx)(pe,{stream:e,onExit:e=>e===0?r():a(e)})})]})})}var J=e=>e&&typeof e==`object`?e:{},Y=[{id:`appearance`,label:`Appearance`,fields:[{key:`theme`,store:`theme`},{key:`cursorPackage`,store:`client`},{key:`uiFontSize`,store:`client`},{key:`terminalFontSize`,store:`client`},{key:`editorFontSize`,store:`client`},{key:`density`,store:`client`},{key:`terminalScrollback`,store:`client`},{key:`projectBasedLayout`,store:`client`},{key:`showAllProjectSessions`,store:`client`}]},{id:`profile`,label:`Profile`,fields:[{key:`branch_prefix`,store:`profileColumn`},{key:`icon`,store:`profileColumn`},{key:`icon_colour`,store:`profileColumn`}]},{id:`sessions`,label:`Sessions`,fields:[{key:`onboardingTemplate`,store:`profileSettings`},{key:`concurrentTemplate`,store:`profileSettings`},{key:`restartTemplate`,store:`profileSettings`},{key:`tabTitleTemplate`,store:`profileSettings`},{key:`sessionDefaults`,store:`profileSettings`},{key:`allowSkipPermissions`,store:`profileSettings`},{key:`captureSessionEnv`,store:`profileSettings`}]},{id:`editor`,label:`Editor`,fields:[{key:`editorTabSize`,store:`client`},{key:`editorWordWrap`,store:`client`},{key:`editorLinkSshHost`,store:`client`}]},{id:`hotkeys`,label:`Hotkeys`,fields:[{key:`hotkeys`,store:`profileSettings`}]},{id:`notifications`,label:`Notifications`,fields:[{key:`notifications`,store:`profileSettings`,pick:e=>{let{desktop:t,sound:n}=J(e);return{desktop:t,sound:n}},mergeInto:(e,t)=>({...J(t),...J(e)})}]},{id:`scratchpad`,label:`Scratchpad (profile-wide entries)`,fields:[{key:`entries`,store:`scratchpad`}]}];function X(e){return e.filter(e=>e.scope===`profile`).map(e=>({title:e.title,body:e.body,tags:e.tags,agent_type:e.agent_type}))}function Z(e){return JSON.stringify([e.title??``,e.body,e.tags,e.agent_type??``])}function zt(e,t){if(!Array.isArray(e))return[];let n=new Set(X(t).map(Z)),r=new Set,i=[];for(let t of e){let e=J(t);if(typeof e.body!=`string`||e.body.length===0)continue;let a={title:typeof e.title==`string`&&e.title!==``?e.title:null,body:e.body,tags:Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`):[],agent_type:typeof e.agent_type==`string`?e.agent_type:null},o=Z(a);n.has(o)||r.has(o)||(r.add(o),i.push(a))}return i}function Bt(e,t){switch(e.store){case`client`:return t.client[e.key];case`theme`:return t.theme;case`profileSettings`:return t.profileSettings[e.key];case`profileColumn`:return t.profile[e.key];case`scratchpad`:return X(t.scratchpad)}}function Q(e,t){let n={};for(let r of Y){if(!e.includes(r.id))continue;let i={};for(let e of r.fields){let n=Bt(e,t);n!==void 0&&(i[e.key]=e.pick?e.pick(n):n)}Object.keys(i).length>0&&(n[r.id]=i)}return n}function Vt(e,t,n,r){if(!e||typeof e!=`object`)return[];let i=e,a={},o={},s={},c=[];for(let e of Y){if(r&&!r.includes(e.id))continue;let l=i[e.id];if(!l||typeof l!=`object`)continue;let u=l,d=!1;for(let r of e.fields){if(!(r.key in u))continue;let e=u[r.key];if(r.store===`scratchpad`){let r=zt(e,n.scratchpad);r.length>0&&(t.createScratchpad(r),d=!0);continue}d=!0;let i=r.mergeInto?r.mergeInto(e,r.store===`profileSettings`?n.profileSettings[r.key]:void 0):e;r.store===`client`?a[r.key]=i:r.store===`theme`?t.setTheme(i):r.store===`profileSettings`?o[r.key]=i:s[r.key]=i}d&&c.push(e.label)}return Object.keys(a).length>0&&t.setClient(a),Object.keys(o).length>0&&t.patchProfileSettings(o),Object.keys(s).length>0&&t.patchProfileColumns(s),c}var $={version:1,profiles:{}};function Ht(e,t){return e.profiles[t]??{enabled:!0,groups:Y.map(e=>e.id),doc:{},updatedAt:new Date(0).toISOString()}}async function Ut(){try{let e=await fetch(`/cockpit/local-sync`,{headers:r(),cache:`no-store`});return e.ok?{available:!0,file:await e.json()}:{available:!1,file:$}}catch{return{available:!1,file:$}}}function Wt(){return i({queryKey:[`local-sync`],queryFn:Ut,staleTime:5e3,refetchOnWindowFocus:!0,retry:!1})}function Gt(){let e=a();return s({mutationFn:async e=>{let t=await fetch(`/cockpit/local-sync`,{method:`PUT`,headers:{...r(),"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(`The local sync store did not accept the write.`);return await t.json()},onSuccess:t=>e.setQueryData([`local-sync`],{available:!0,file:t})})}function Kt(){return typeof Notification>`u`?`unsupported`:o()?`granted`:Notification.permission}export{E as _,Y as a,Rt as c,It as d,yt as f,D as g,O as h,Gt as i,Ft as l,k as m,Ht as n,Vt as o,j as p,Wt as r,Q as s,Kt as t,Lt as u,We as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t,n){return!e||e.major>t||e.major===t&&e.minor>=n}var t=t=>t!==void 0&&e(t,21,3);function n(t){return e(t,17,1)}function r(t){return e(t,17,3)}var i=t=>e(t,10,3),a=t=>e(t,12,3),o=t=>e(t,12,4),s=t=>e(t,15,3),c=t=>t!==void 0&&e(t,16,3),l=t=>e(t,16,4),u=t=>e(t,14,1);export{u as a,l as c,c as i,s as l,r as n,o,n as r,t as s,a as t,i as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{m as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createRailroadAbnfServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{f as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createRailroadEbnfServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{u as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createRailroadPegServices};
|
|
@@ -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,et as s,n as c,p as l,w as u,x as d,z as f}from"./index-BuCcWx9p.js";import{i as p,n as m}from"./dist-B1yD4sI3.js";import{t as h}from"./button-C2U4JLSJ.js";import{t as g}from"./x-CZCUod6A.js";import{t as _}from"./createLucideIcon-DyMAgLa3.js";import{t as v}from"./copy-CGsu8426.js";import{t as y}from"./ws-ffUcAuKj.js";var b=_(`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=_(`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`}]]),te=_(`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`}]]),x=_(`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 ne(){return l.get()}var re=a.options.join(`,`),S=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<=S)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<=S)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 C=new WeakSet,oe=Math.floor((r.requestBytes-1024)*3/4);async function se(e,t,r,a,o,c,l){let d=e.generation,p=()=>{if(c?.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(C.has(e))throw Error(`An image upload is already in progress.`);C.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,c),a=await i.json();if(p(),!i.ok){let e=s.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(l?.(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 l?.(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.`);l?.(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{}C.delete(e)}}function w(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?(T(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 T(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 E(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 E(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 D=/(?:^|[\s"'`([<])((?:(?:\/|\.{1,2}\/|~\/)(?:[\w.+@~-]+\/)*[\w.+@~-]+|(?:[\w.+@~-]+\/)+[\w.+@~-]*|[\w.+@~-]+\.[A-Za-z]\w{0,11}))(?::(\d{1,6})(?::(\d{1,6}))?)?/dg,O=new Set([`.`,`,`,`;`,`:`,`)`,`]`,`'`,`"`]);function k(e){let t=[],n=new RegExp(D.source,D.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&&O.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}var A=32,ce=2048;function le(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 ue(e,t,n){return{...e,text:e.text.slice(t,n),cells:e.cells.slice(t,n)}}function j(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 M(e,t,n){if(t<0||n<1)return[];let r=Math.max(0,t-A+1),i=new Map;for(let a=r;a<t+A;a++){let t=le(e,a,n);if(!t)break;i.set(a,t)}let a=new Set,o=[];for(let e of[!0,!1])for(let s=r;s<=t;s++){if(i.get(s)?.isWrapped&&s>r)continue;let c=``,l=[];for(let r=s;r<s+A;r++){let u=i.get(r);if(!u)break;let d=i.get(r-1);if(r>s&&!u.isWrapped&&!(e&&d&&j(d,u,n)))break;let f=i.get(r+1),p=ue(u,r>s&&!u.isWrapped?u.text.length-u.text.trimStart().length:0,f?.isWrapped?u.text.length:u.text.trimEnd().length);if(c.length+p.text.length>ce)break;if(c+=p.text,l.push(...p.cells),!(r<t))for(let e of k(c)){let n=l[e.start],r=l[e.end-1];if(!n||!r||n.row>t||r.row<t)continue;let i=`${e.path}\0${e.line??``}\0${e.column??``}\0${n.row}:${n.col}-${r.row}:${r.col}`;a.has(i)||(a.add(i),o.push({candidate:e,start:n,end:r,text:c.slice(e.start,e.end)}))}}}return o.sort((e,t)=>t.text.length-e.text.length)}function N(e,t){return e.kind===`file`&&e.root!==void 0&&e.root!==t?e.root:null}var P=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 F(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 I(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 L(e,t,n){return I(await F(e,t,n?.line,n?.root),n?.line,n?.column)}async function R(e,t,n){try{return await F(e,t,n)}catch{return null}}function z(e,t,n){let r=new P({fetcher:R});return e.registerLinkProvider({provideLinks(i,a){let o=e.buffer.active,s=M(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(I(s,e.line,e.column))}}:null})).then(e=>{let t=e.filter(e=>e!==null);a(t.length>0?t:void 0)})}})}var B=e(t(),1);function V(e,t){let n=(t&1)!=0,r=(t&2)!=0;if(H(e))return t?`\x1b[1;${1+(r?2:0)+(n?4:0)}${e.slice(-1)}`:e;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 H(e){return e.length===3&&e.startsWith(`\x1B[`)&&`ABCD`.includes(e[2])}var 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 de(e,t){return(0,B.useSyncExternalStore)(q,()=>U.has(Y(e,t)))}function fe(e,t,n,r){let i=Y(e,t);return U.set(i,n),r&&W.set(i,r),J(),()=>{U.get(i)===n&&(U.delete(i),W.delete(i),G.delete(i),J())}}function X(e,t){W.get(Y(e,t))?.()}function pe(e,t){return(0,B.useSyncExternalStore)(q,()=>G.get(Y(e,t))??0)}function me(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||n.startsWith(`\x1B`)&&!H(n)?n:(G.delete(r),J(),V(n,i))}async function he(e,t,n,r=!1){let i=U.get(Y(e,t));if(!i)throw Error(`Wait for the terminal to attach; nothing was sent`);await Q(e,t,r?`${i(n)}\r`:Z(e,t,n))}async function ge(e,t,n){let r=Y(e,t),i=U.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()||U.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 $=c();function _e({text:e,label:t,clear:n,paste:r}){let[i,a]=(0,B.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)(h,{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)(v,{}),` Copy`]}),r&&(0,$.jsxs)(h,{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)(h,{variant:`ghost`,size:`icon`,"aria-label":`Clear selection`,disabled:i,onClick:n,children:(0,$.jsx)(g,{})})]})}export{x as _,fe as a,de as c,z as d,L as f,ne as g,re as h,ge as i,pe as l,T as m,Z as n,he as o,w as p,X as r,me as s,_e as t,N as u,te as v,b as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-DU6gnSTi.js";import"./chunk-75Z2AOVW-b-3efKur.js";import"./chunk-PWAF6VOD--PrNfcDv.js";import"./chunk-GMAD6QVW-BgNxh1Wg.js";import"./chunk-P2QGCYS3-VniWvIJd.js";import"./chunk-4HAMMTFA-DDQ7TZvS.js";import"./chunk-GVQU2GXP-CNaIDciQ.js";import"./chunk-OSK3NFVY-SdTDzoMy.js";import"./chunk-F27PBJKO-CLOxkQ_H.js";import"./chunk-XXDRQBXY-BuE3VzE_.js";import"./chunk-POPQ4Y6H-BUjB1fDF.js";import"./chunk-L3NEJ4N5-59iBItHO.js";import"./chunk-TLUHSLCS-CivtNrZW.js";import{i as t,n,r,t as i}from"./chunk-IMKFNOWR-B5c6xExk.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-DU6gnSTi.js";import"./chunk-75Z2AOVW-b-3efKur.js";import"./chunk-PWAF6VOD--PrNfcDv.js";import"./chunk-GMAD6QVW-BgNxh1Wg.js";import"./chunk-P2QGCYS3-VniWvIJd.js";import"./chunk-4HAMMTFA-DDQ7TZvS.js";import"./chunk-GVQU2GXP-CNaIDciQ.js";import"./chunk-OSK3NFVY-SdTDzoMy.js";import"./chunk-F27PBJKO-CLOxkQ_H.js";import"./chunk-XXDRQBXY-BuE3VzE_.js";import"./chunk-POPQ4Y6H-BUjB1fDF.js";import"./chunk-L3NEJ4N5-59iBItHO.js";import"./chunk-TLUHSLCS-CivtNrZW.js";import"./chunk-LNGE3PJU-DNNNwF8Y.js";import{r as t,t as n}from"./chunk-SHT3W25Y-iS7BNavD.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{U as n,n as r}from"./index-BuCcWx9p.js";import{S as i,at as a,b as o,v as s}from"./hotkeys-B5IFr8Wj.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-BWYDvidH.js";import{a as h,r as te}from"./button-C2U4JLSJ.js";import{_ as g,g as _,h as v,v as ne,y}from"./LazyTerminal-D_WH4lhZ.js";import{c as b,p as x,r as S}from"./switch-Cw0Ot6EQ.js";import{n as re}from"./x-CZCUod6A.js";import{t as ie}from"./createLucideIcon-DyMAgLa3.js";import{a as C,n as ae,o as w}from"./preview-kind-QJSMKfUN.js";import{t as oe}from"./debounce-B9DrqirV.js";var T=e(t(),1),E=r(),[D,se]=m(`Tooltip`,[y]),O=y(),ce=`TooltipProvider`,le=700,k=`tooltip.open`,[ue,A]=D(ce),de=e=>{let{__scopeTooltip:t,delayDuration:n=le,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=T.useRef(!0),s=T.useRef(!1),c=T.useRef(0);return T.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,E.jsx)(ue,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:T.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:T.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:T.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};de.displayName=ce;var j=`Tooltip`,[fe,M]=D(j),pe=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=A(j,e.__scopeTooltip),l=O(t),[u,d]=T.useState(null),f=ee(),m=T.useRef(0),h=o??c.disableHoverableContent,te=s??c.delayDuration,g=T.useRef(!1),[_,v]=p({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(k))):c.onClose(),a?.(e)},caller:j}),y=T.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=T.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,v(!0)},[v]),x=T.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v(!1)},[v]),S=T.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,v(!0),m.current=0},te)},[te,v]);return T.useEffect(()=>()=>{m.current&&=(window.clearTimeout(m.current),0)},[]),(0,E.jsx)(ne,{...l,children:(0,E.jsx)(fe,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:T.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:T.useCallback(()=>{h?x():(window.clearTimeout(m.current),m.current=0)},[x,h]),onOpen:b,onClose:x,disableHoverableContent:h,children:n})})};pe.displayName=j;var N=`TooltipTrigger`,me=T.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=M(N,n),a=A(N,n),o=O(n),s=h(t,T.useRef(null),i.onTriggerChange),u=T.useRef(!1),d=T.useRef(!1),f=T.useCallback(()=>u.current=!1,[]);return T.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,E.jsx)(v,{asChild:!0,...o,children:(0,E.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)})})});me.displayName=N;var P=`TooltipPortal`,[he,ge]=D(P,{forceMount:void 0}),_e=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=M(P,t);return(0,E.jsx)(he,{scope:t,forceMount:n,children:(0,E.jsx)(f,{present:n||a.open,children:(0,E.jsx)(u,{asChild:!0,container:i,children:r})})})};_e.displayName=P;var F=`TooltipContent`,ve=T.forwardRef((e,t)=>{let n=ge(F,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=M(F,e.__scopeTooltip);return(0,E.jsx)(f,{present:r||o.open,children:o.disableHoverableContent?(0,E.jsx)(Ce,{side:i,...a,ref:t}):(0,E.jsx)(ye,{side:i,...a,ref:t})})}),ye=T.forwardRef((e,t)=>{let n=M(F,e.__scopeTooltip),r=A(F,e.__scopeTooltip),i=T.useRef(null),a=h(t,i),[o,s]=T.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=T.useCallback(()=>{s(null),d(!1)},[d]),p=T.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=De(r,Ee(r,n.getBoundingClientRect())),a=Oe(t.getBoundingClientRect()),o=Ae([...i,...a]);s(o),d(!0)},[d]);return T.useEffect(()=>()=>f(),[f]),T.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]),T.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=!ke(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,E.jsx)(Ce,{...e,ref:a})}),[be,xe]=D(j,{isInside:!1}),Se=te(`TooltipContent`),Ce=T.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=M(F,n),l=O(n),{onClose:u}=c;return T.useEffect(()=>(document.addEventListener(k,u),()=>document.removeEventListener(k,u)),[u]),T.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,E.jsx)(d,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,E.jsxs)(g,{"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,E.jsx)(Se,{children:r}),(0,E.jsx)(be,{scope:n,isInside:!0,children:(0,E.jsx)(x,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});ve.displayName=F;var we=`TooltipArrow`,Te=T.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=O(n);return xe(we,n).isInside?null:(0,E.jsx)(_,{...i,...r,ref:t})});Te.displayName=we;function Ee(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 De(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 Oe(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 ke(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 Ae(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)),je(t)}function je(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 Me=de,Ne=pe,Pe=me,Fe=_e,Ie=ve,Le=Me,Re=Ne,ze=Pe;function Be({className:e,sideOffset:t=4,...n}){return(0,E.jsx)(Fe,{children:(0,E.jsx)(Ie,{sideOffset:t,className:re(`z-50 overflow-hidden rounded-md bg-elevated px-2 py-1 text-xs text-fg shadow-lg`,e),...n})})}var Ve=ie(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);function He({initial:e,maxLength:t,className:n,onCommit:r,onCancel:i}){let[a,o]=(0,T.useState)(e);return(0,E.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:re(`bg-transparent outline-none`,n)})}function Ue(e){return{onClick:e=>{e.detail===2&&e.preventDefault()},onDoubleClick:t=>{t.preventDefault(),e()}}}var I=null;function We(e){return I=e,()=>{I===e&&(I=null)}}function Ge(){I?.()}var L=null;function Ke(e){return L=e,()=>{L===e&&(L=null)}}async function qe(e){if(!L)throw Error(`Open a project before opening a path.`);await L(e)}function Je(){let e=a(s()??void 0).data?.tabTitleTemplate;return(0,T.useCallback)(t=>S(t,e),[e])}var Ye=(0,T.createContext)({open:()=>void 0,handler:null,setHandler:()=>void 0});function Xe({children:e}){let[t,n]=(0,T.useState)(null),r=(0,T.useCallback)(e=>n(()=>e),[]),i=(0,T.useCallback)(e=>t?.(e),[t]),a=(0,T.useMemo)(()=>({open:i,handler:t,setHandler:r}),[i,t,r]);return(0,E.jsx)(Ye.Provider,{value:a,children:e})}function Ze(){return(0,T.useContext)(Ye)}function Qe({className:e,strokeScale:t=1}){return(0,E.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.8*t,strokeLinecap:`round`,"aria-hidden":!0,children:[(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`22`,y2:`12`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`20.66`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`20.66`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`2`,y2:`12`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`3.34`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`3.34`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`15.25`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`18.5`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`15.25`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`8.75`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`5.5`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`8.75`})]})}function $e({className:e,strokeScale:t=1}){return(0,E.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.6*t,"aria-hidden":!0,children:[(0,E.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`}),(0,E.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(60 12 12)`}),(0,E.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(120 12 12)`})]})}function et({className:e,strokeScale:t=1}){return(0,E.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,E.jsx)(`path`,{d:`M8 4H4v16h4`}),(0,E.jsx)(`path`,{d:`M16 4h4v16h-4`}),(0,E.jsx)(`rect`,{x:`10.5`,y:`10.5`,width:`3`,height:`3`,fill:`currentColor`,stroke:`none`})]})}function tt({className:e}){return(0,E.jsx)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`currentColor`,"aria-hidden":!0,children:(0,E.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 nt({type:e,className:t,strokeScale:n=1}){switch(e){case`claude-code`:return(0,E.jsx)(Qe,{className:t,strokeScale:n});case`codex`:return(0,E.jsx)($e,{className:t,strokeScale:n});case`opencode`:return(0,E.jsx)(et,{className:t,strokeScale:n});case`gemini-cli`:return(0,E.jsx)(tt,{className:t});default:return(0,E.jsx)(b,{className:t,strokeWidth:2*n})}}var R=new Set,z=!1,rt=null;function it(){for(let e of R)e()}function at(e){return R.add(e),()=>R.delete(e)}function ot(e){z!==e&&(z=e,it())}function st(){ot(!z)}function ct(){return(0,T.useSyncExternalStore)(at,()=>z)}function lt(e){rt=e,it()}function ut(){return(0,T.useSyncExternalStore)(at,()=>rt)}function B(){return crypto.randomUUID()}function V(e){return e.type===`terminal`?`term:${e.session}`:`editor:${C(e.tab)}`}function dt(e,t){return V(e)===V(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(V),r=t&&n.includes(t)?t:n.length>0?n[0]:null;return{kind:`leaf`,id:B(),tabs:e,activeKey:r,previewKey:null}}function U(e,t,n){return{kind:`split`,id:B(),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=>V(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:B()}:{...e,id:B(),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)?B():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(V),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=>V(e)===n))return e;let t=e.tabs.filter(e=>V(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=>V(e)===t);if(n===-1)return e.activeKey;let r=e.tabs.filter(e=>V(e)!==t);return r.length===0?null:V(r[Math.min(n,r.length-1)])}function xt(e,t,n){let r=e.tabs.filter(e=>!dt(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:V(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=V(n),o=t.copy===!0&&!ft(n),s=t.index;if(i===`center`&&s!==void 0){let t=W(e,r)?.tabs.findIndex(e=>V(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=>V(e)===n)?{...e,tabs:e.tabs.filter(e=>V(e)!==n),activeKey:e.activeKey===n?bt(e,n):e.activeKey}:e))}function Et(e,t,n){let r=V(n);return J(Y(e,t,e=>{let t=e.previewKey===r?null:e.previewKey;return e.tabs.some(e=>dt(e,n))?{...e,activeKey:r,previewKey:t}:{...e,tabs:[...e.tabs,n],activeKey:r,previewKey:t}}))}function Dt(e,t,n){let r=V(n);return J(Y(e,t,e=>e.tabs.some(e=>V(e)===r)?{...e,tabs:e.tabs.map(e=>V(e)===r?n:e),previewKey:e.previewKey===r?null:e.previewKey}:{...e,tabs:[...e.tabs,n]}))}function Ot(e,t,n){let r=V(n);return Y(e,t,e=>({...e,tabs:e.tabs.map(e=>V(e)===r?n:e)}))}function kt(e,t,n){let r=C(t),i=e=>e.kind===`split`?{...e,children:e.children.map(i)}:{...e,tabs:e.tabs.map(e=>e.type===`editor`&&C(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||ae(t.tab.path)===null?t:{...t,tab:{...t.tab,view:`preview`}}}function jt(e,t,n){let r=V(n);return J(Y(e,t,e=>{if(e.tabs.some(e=>dt(e,n)))return{...e,activeKey:r};let t=e.previewKey?e.tabs.findIndex(t=>V(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`&&V(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=V(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&&V(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=w(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(V(e),V(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=w(t);return n!==`file`&&n!==`external`||t.view===`linked`||t.view===`locked`||ae(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??``)&&w(r)===w(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??``)&&w(e)===w(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=>V(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(V(e)))),i=q(e);if(i.length!==0){for(let e of i)t.add(V(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?V({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(V)}:{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,T.useSyncExternalStore)(Yt,()=>$)}function $t(e){qt=e,Jt()}function en(){return(0,T.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=s(),[t,n]=(0,T.useState)(!1),[r,a]=(0,T.useState)(fn),c=(0,T.useRef)(r);c.current=r;let l=(0,T.useRef)(null),u=(0,T.useMemo)(()=>oe((e,t)=>{i(e,t).catch(e=>console.warn(`ui-state save failed: ${e.message}`))},dn),[]);return(0,T.useEffect)(()=>{if(e===null){l.current=null;return}let t=pn(e);l.current=t;let r=!1;n(!1),a(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`?(a(i.snapshot),n(!0)):o(e).then(e=>{r||(e&&a(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,a(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{We as $,jt as A,Ot as B,Ct as C,G as D,zt as E,It as F,ct as G,ot as H,kt as I,Ze as J,nt as K,Mt as L,Z as M,Pt as N,Ft as O,Bt as P,Ge as Q,Rt as R,_t as S,q as T,st as U,lt as V,ut as W,qe as X,Je as Y,Ke as Z,Et as _,cn as a,Le as at,Wt as b,sn as c,Xt as d,He as et,Zt as f,Dt as g,Gt as h,ln as i,Be as it,X as j,H as k,un as l,Qt as m,hn as n,Ve as nt,rn as o,ze as ot,en as p,Xe as q,pn as r,Re as rt,on as s,mn as t,Ue as tt,$t as u,K as v,W as w,Tt as x,Ht as y,V as z};
|