@intent-hq/web 2.327.0 → 2.327.2
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/package.json +1 -1
- package/web/app/immutable/assets/0.BHoek2bX.css +1 -0
- package/web/app/immutable/assets/BrowserTabType.DojB6H-_.css +1 -0
- package/web/app/immutable/chunks/{Bx77RH2D.js → -ntpqjUQ.js} +1 -1
- package/web/app/immutable/chunks/{BNaHRmzO.js → 1JDc8gDP.js} +1 -1
- package/web/app/immutable/chunks/{BG0wXYTP.js → 2BNczbc1.js} +1 -1
- package/web/app/immutable/chunks/{D12HgGYA.js → 2Yr7qZy-.js} +1 -1
- package/web/app/immutable/chunks/{DNHsSCes.js → 2bCqOBlF.js} +2 -2
- package/web/app/immutable/chunks/{LsGMNfQF.js → 6eTaxSHq.js} +1 -1
- package/web/app/immutable/chunks/{NOdC8P9f.js → 7nLxl2IJ.js} +1 -1
- package/web/app/immutable/chunks/{0LhXCP94.js → 7rjdCDDK.js} +1 -1
- package/web/app/immutable/chunks/{CT-tNtwL.js → 95PmebfY.js} +1 -1
- package/web/app/immutable/chunks/{XNWMykPO.js → 9iFKJfkz.js} +1 -1
- package/web/app/immutable/chunks/{CWc2npkj.js → 9taqgPH1.js} +1 -1
- package/web/app/immutable/chunks/{Br4R2ugZ.js → Am8TuXrW.js} +1 -1
- package/web/app/immutable/chunks/{KeVqoPE3.js → AuTI2CWB.js} +1 -1
- package/web/app/immutable/chunks/{DBZtPAw6.js → Aw3-65IC.js} +1 -1
- package/web/app/immutable/chunks/{DMqElfxm.js → B-B22ZmQ.js} +1 -1
- package/web/app/immutable/chunks/{D9xO6S0s.js → B-LxAE4l.js} +1 -1
- package/web/app/immutable/chunks/{2NEwynpS.js → B-mVY4KG.js} +1 -1
- package/web/app/immutable/chunks/{O_PsNJaQ.js → B1nmZwVF.js} +1 -1
- package/web/app/immutable/chunks/{DJwbeAP3.js → B4Qf0RS5.js} +1 -1
- package/web/app/immutable/chunks/{QbsT67gn.js → B4Rscrf6.js} +1 -1
- package/web/app/immutable/chunks/{Bh1wyaG7.js → B5kBEM9z.js} +1 -1
- package/web/app/immutable/chunks/{DStHpf1P.js → B6ZEHAgn.js} +1 -1
- package/web/app/immutable/chunks/{T-K_7EnC.js → BBYPPwon.js} +1 -1
- package/web/app/immutable/chunks/{BMeZr_ZY.js → BCBkAQhq.js} +1 -1
- package/web/app/immutable/chunks/{jkLGgu1-.js → BDUVRWqe.js} +3 -3
- package/web/app/immutable/chunks/{Cufju0io.js → BFQmpH-Y.js} +1 -1
- package/web/app/immutable/chunks/{Bz8cPQaz.js → BGUHg5o_.js} +1 -1
- package/web/app/immutable/chunks/{DLGpFr8e.js → BIfN-lxi.js} +1 -1
- package/web/app/immutable/chunks/{dSxiKw5u.js → BJFbczXI.js} +1 -1
- package/web/app/immutable/chunks/{CpBlZvWi.js → BJpbRkma.js} +1 -1
- package/web/app/immutable/chunks/{BjM8_HSR.js → BK3YE2GB.js} +1 -1
- package/web/app/immutable/chunks/{BfF3Bko_.js → BMmC4e8Y.js} +1 -1
- package/web/app/immutable/chunks/{BuxJaWiM.js → BOY33UBS.js} +4 -4
- package/web/app/immutable/chunks/{aYTkKC29.js → BOod2-vo.js} +1 -1
- package/web/app/immutable/chunks/{OJckcu3J.js → BQKilZql.js} +1 -1
- package/web/app/immutable/chunks/{BsxzjRia.js → BTxVcBTE.js} +1 -1
- package/web/app/immutable/chunks/{B1ohiv8G.js → BUU84hQY.js} +1 -1
- package/web/app/immutable/chunks/{CRTNdBBv.js → BUcg736f.js} +1 -1
- package/web/app/immutable/chunks/{CFBUnCgB.js → BV4AHhCq.js} +1 -1
- package/web/app/immutable/chunks/{Cq8Jt7n-.js → BXo80d0I.js} +1 -1
- package/web/app/immutable/chunks/BYCQnKWG.js +227 -0
- package/web/app/immutable/chunks/{Ovgvmxzk.js → B_oexMWu.js} +1 -1
- package/web/app/immutable/chunks/{CQFSvKTc.js → BaUvfuFA.js} +1 -1
- package/web/app/immutable/chunks/BbEZgkca.js +2 -0
- package/web/app/immutable/chunks/{CW3DpzM0.js → BbiJIN_E.js} +1 -1
- package/web/app/immutable/chunks/{B3sypLPs.js → BclymnXe.js} +1 -1
- package/web/app/immutable/chunks/Bdee7uP3.js +1 -0
- package/web/app/immutable/chunks/{AyNqjFrC.js → BedviAdk.js} +1 -1
- package/web/app/immutable/chunks/{Cg9SqQ7c.js → BerYBtY0.js} +1 -1
- package/web/app/immutable/chunks/{wWvgnlMJ.js → BgiA9PsC.js} +2 -2
- package/web/app/immutable/chunks/{DAJaDZx7.js → Bhff3giG.js} +1 -1
- package/web/app/immutable/chunks/{BShEFC79.js → BiYl2nZq.js} +3 -3
- package/web/app/immutable/chunks/{DnFiaMvl.js → Bil-5-Mv.js} +1 -1
- package/web/app/immutable/chunks/{DzVbP61K.js → BirvpWBa.js} +1 -1
- package/web/app/immutable/chunks/{B_KuwYoa.js → BlmamAqo.js} +1 -1
- package/web/app/immutable/chunks/{giU_rdFX.js → BmnlV2jU.js} +1 -1
- package/web/app/immutable/chunks/{COnSiP7q.js → Bn-dz7cW.js} +1 -1
- package/web/app/immutable/chunks/{BzaZqOK5.js → BnxF3EEm.js} +1 -1
- package/web/app/immutable/chunks/{CHajdz2j.js → Bq9BF2kT.js} +1 -1
- package/web/app/immutable/chunks/{Bqp-VB-g.js → BrXRAcqE.js} +1 -1
- package/web/app/immutable/chunks/{CNJgwoNk.js → BsesepNZ.js} +1 -1
- package/web/app/immutable/chunks/{Dq6j0-2d.js → BvDDdxJ_.js} +1 -1
- package/web/app/immutable/chunks/{BxbB0_fE.js → BvULLTwA.js} +2 -2
- package/web/app/immutable/chunks/{_ANEY4lF.js → Bw8BPAST.js} +1 -1
- package/web/app/immutable/chunks/{BOAArWys.js → BwVx_Xm9.js} +1 -1
- package/web/app/immutable/chunks/{D7CVY9y_.js → BwY7DKzU.js} +1 -1
- package/web/app/immutable/chunks/{CloK0EEY.js → BxRFeUGV.js} +1 -1
- package/web/app/immutable/chunks/{1vv2LgJU.js → Byv1V5rF.js} +1 -1
- package/web/app/immutable/chunks/{B2pW1Srg.js → C-am1GTe.js} +1 -1
- package/web/app/immutable/chunks/{CJfy0DGd.js → C0AexULD.js} +1 -1
- package/web/app/immutable/chunks/{Cz0WCDEU.js → C1TwLTiC.js} +1 -1
- package/web/app/immutable/chunks/{-y8aRUXK.js → C1vc2ZF2.js} +1 -1
- package/web/app/immutable/chunks/{Bpv_7NSe.js → C2vxCrLD.js} +1 -1
- package/web/app/immutable/chunks/{CGyfJ3wZ.js → C3g8Ux-E.js} +15 -15
- package/web/app/immutable/chunks/{Btvd3YqX.js → C4ih-xND.js} +2 -2
- package/web/app/immutable/chunks/{DttEjUfQ.js → C5SMJxa0.js} +2 -2
- package/web/app/immutable/chunks/{CtrcoLr_.js → C5bHHEee.js} +1 -1
- package/web/app/immutable/chunks/{TthnIsvT.js → C5mH9Vrl.js} +1 -1
- package/web/app/immutable/chunks/{DffOpxnk.js → C6-cGH2l.js} +1 -1
- package/web/app/immutable/chunks/{XEwS43QE.js → C6LN2Lq-.js} +1 -1
- package/web/app/immutable/chunks/{BIDHVOHc.js → C7eFRIGF.js} +1 -1
- package/web/app/immutable/chunks/{D-RJNO4X.js → C9-oKvmU.js} +1 -1
- package/web/app/immutable/chunks/{ncAOXs0r.js → CAL5qbag.js} +1 -1
- package/web/app/immutable/chunks/{CQs3nGye.js → CB-J-0bJ.js} +1 -1
- package/web/app/immutable/chunks/{MFRf7XsP.js → CBEZBV7x.js} +1 -1
- package/web/app/immutable/chunks/{L34ozHWW.js → CDFRtA1F.js} +1 -1
- package/web/app/immutable/chunks/{0FIzxpig.js → CFXA-WTd.js} +1 -1
- package/web/app/immutable/chunks/{CVrziC3b.js → CHb5dSdm.js} +1 -1
- package/web/app/immutable/chunks/{DywqqPBY.js → CIno4eJd.js} +1 -1
- package/web/app/immutable/chunks/{DoUTd6YZ.js → CJvik4ry.js} +1 -1
- package/web/app/immutable/chunks/{DQtJDu2z.js → CKjldRop.js} +1 -1
- package/web/app/immutable/chunks/{CZ3gqcH0.js → CLDLGPLG.js} +1 -1
- package/web/app/immutable/chunks/{BfxuxK8H.js → CLbcqiJX.js} +1 -1
- package/web/app/immutable/chunks/{wtQc1nfb.js → CNZwPZBB.js} +1 -1
- package/web/app/immutable/chunks/CNdlzZOD.js +1 -0
- package/web/app/immutable/chunks/{B1HL5ujX.js → COPJQClu.js} +1 -1
- package/web/app/immutable/chunks/{CJNRFxp-.js → COyObFie.js} +1 -1
- package/web/app/immutable/chunks/{h64QYX68.js → CPzusSaQ.js} +1 -1
- package/web/app/immutable/chunks/{Djac9356.js → CSk0KPBP.js} +1 -1
- package/web/app/immutable/chunks/CTMsT2IU.js +13 -0
- package/web/app/immutable/chunks/{CAGE-6rK.js → CTc1mqQ1.js} +1 -1
- package/web/app/immutable/chunks/{Bv_Vppnv.js → CW87SeGI.js} +1 -1
- package/web/app/immutable/chunks/{DG_DKtEi.js → CW9PUdij.js} +1 -1
- package/web/app/immutable/chunks/{CR_DZSId.js → CWXjKpBJ.js} +1 -1
- package/web/app/immutable/chunks/{D_3K3qbV.js → CXCbFJ1d.js} +1 -1
- package/web/app/immutable/chunks/{Bw_y1gSr.js → CYgFtonv.js} +1 -1
- package/web/app/immutable/chunks/{C7QVfuKS.js → C_4hXDel.js} +1 -1
- package/web/app/immutable/chunks/{shMIdOXY.js → Ca3Yads8.js} +4 -4
- package/web/app/immutable/chunks/{CIas9vXT.js → CaaDYQm4.js} +6 -6
- package/web/app/immutable/chunks/{D4V2xQ2J.js → CcSZNfbk.js} +1 -1
- package/web/app/immutable/chunks/{Dv5eIHFX.js → CdhZKdub.js} +1 -1
- package/web/app/immutable/chunks/{C46AGI2o.js → CdlZ8r5v.js} +1 -1
- package/web/app/immutable/chunks/{CLKUBIbV.js → CeL4K7HS.js} +1 -1
- package/web/app/immutable/chunks/{BHt8Cv_F.js → ChyK3c5O.js} +1 -1
- package/web/app/immutable/chunks/{C_GLszen.js → Ciht8P3-.js} +1 -1
- package/web/app/immutable/chunks/{7DG8yVyI.js → ClBnJ15C.js} +1 -1
- package/web/app/immutable/chunks/{CECd-ew5.js → ClHpwdNk.js} +1 -1
- package/web/app/immutable/chunks/{BhpvRaEf.js → Co3V5w5D.js} +1 -1
- package/web/app/immutable/chunks/{DyVs3tqq.js → ColHxoku.js} +4 -4
- package/web/app/immutable/chunks/{CrgKSEA9.js → CpOX1cm0.js} +4 -4
- package/web/app/immutable/chunks/{cEpdukj-.js → CpPVAOg5.js} +1 -1
- package/web/app/immutable/chunks/{SFeFj2Mb.js → CqnfptVg.js} +1 -1
- package/web/app/immutable/chunks/{OcoLTaau.js → CrN8CpnY.js} +1 -1
- package/web/app/immutable/chunks/{B90oo4Fg.js → CtRuzEKN.js} +1 -1
- package/web/app/immutable/chunks/{BbM6p2an.js → CuF24etW.js} +1 -1
- package/web/app/immutable/chunks/{CEB0BOhp.js → CuimWTUN.js} +1 -1
- package/web/app/immutable/chunks/{x_2obwKo.js → CvG8wNT6.js} +1 -1
- package/web/app/immutable/chunks/{C_P93GWd.js → Cw26kBCe.js} +1 -1
- package/web/app/immutable/chunks/{CV8S2_aN.js → Cwdoe-yo.js} +1 -1
- package/web/app/immutable/chunks/{CfViy2AB.js → Cy1SRgRj.js} +1 -1
- package/web/app/immutable/chunks/{BBuOsJY_.js → CypQ6Hrf.js} +1 -1
- package/web/app/immutable/chunks/{BEDYQfP7.js → CzSCQAr8.js} +1 -1
- package/web/app/immutable/chunks/{Bz7DX0NE.js → CzxoHP9X.js} +1 -1
- package/web/app/immutable/chunks/{CAhkQWjW.js → D-YrUZis.js} +1 -1
- package/web/app/immutable/chunks/{Bgx4jaT-.js → D0OfnhNR.js} +3 -3
- package/web/app/immutable/chunks/{BGS5RHiS.js → D19QPbvx.js} +3 -3
- package/web/app/immutable/chunks/{DRs_Vsjz.js → D1ynivqZ.js} +1 -1
- package/web/app/immutable/chunks/{exWdi0_e.js → D3NOBSUZ.js} +3 -3
- package/web/app/immutable/chunks/{DvIxHqlz.js → D4fSLYwV.js} +1 -1
- package/web/app/immutable/chunks/{CI_vWjAX.js → D4wUHJ-V.js} +1 -1
- package/web/app/immutable/chunks/{Cz7lWcpW.js → D4wVqBkS.js} +1 -1
- package/web/app/immutable/chunks/{ChbqD4nY.js → D6NxvjAo.js} +2 -2
- package/web/app/immutable/chunks/{B7UZ3osx.js → D6R6bmhK.js} +1 -1
- package/web/app/immutable/chunks/{1eeMnGBt.js → D7NWkz7l.js} +1 -1
- package/web/app/immutable/chunks/{DVTqQKPY.js → D7jA8MQK.js} +1 -1
- package/web/app/immutable/chunks/{BIJpUOPV.js → D8iLOeUT.js} +1 -1
- package/web/app/immutable/chunks/{5cZ8f6NM.js → D9E32u14.js} +1 -1
- package/web/app/immutable/chunks/{CchLUU-A.js → DAXKoZjm.js} +1 -1
- package/web/app/immutable/chunks/{DG0gPQWA.js → DCo2M5nt.js} +1 -1
- package/web/app/immutable/chunks/{DhMntDzP.js → DF5OSHTI.js} +1 -1
- package/web/app/immutable/chunks/{dHhYWIBz.js → DFghII67.js} +1 -1
- package/web/app/immutable/chunks/{B3FUftaT.js → DFxg8FPE.js} +1 -1
- package/web/app/immutable/chunks/{BwA79r4u.js → DGuIJztL.js} +1 -1
- package/web/app/immutable/chunks/{g2wqtBd2.js → DIh4SQwA.js} +1 -1
- package/web/app/immutable/chunks/{B_68BQEQ.js → DKz0oh_l.js} +1 -1
- package/web/app/immutable/chunks/DLrZLCmS.js +1 -0
- package/web/app/immutable/chunks/{COzH17cB.js → DQfuBwT8.js} +1 -1
- package/web/app/immutable/chunks/{D3HFKabi.js → DSwaqM2D.js} +1 -1
- package/web/app/immutable/chunks/{kD3RPqIy.js → DT-w4ZA3.js} +1 -1
- package/web/app/immutable/chunks/{CmKBHt37.js → DTOenBGo.js} +1 -1
- package/web/app/immutable/chunks/{CZq5__sk.js → DULzeUbw.js} +1 -1
- package/web/app/immutable/chunks/{Du-ii3l_.js → DVe2mCXY.js} +1 -1
- package/web/app/immutable/chunks/{EYJPT7ez.js → DVnJa0eT.js} +1 -1
- package/web/app/immutable/chunks/{Bu6O9iBY.js → DXmMVRov.js} +1 -1
- package/web/app/immutable/chunks/{D7UcpeiI.js → DZzTUgIA.js} +1 -1
- package/web/app/immutable/chunks/{BNn8Ec2v.js → D_TIL4Xc.js} +1 -1
- package/web/app/immutable/chunks/{DVWkN6zJ.js → D_fIP8PG.js} +1 -1
- package/web/app/immutable/chunks/{CHtnIE14.js → D_kdhP8o.js} +1 -1
- package/web/app/immutable/chunks/{gTEq_pBM.js → DacYbmEF.js} +1 -1
- package/web/app/immutable/chunks/{C28yvyOi.js → DbYMKWAI.js} +2 -2
- package/web/app/immutable/chunks/{CXJnOaE2.js → Dd-c6aT7.js} +1 -1
- package/web/app/immutable/chunks/{BRqn1o3u.js → DeB-Py0k.js} +1 -1
- package/web/app/immutable/chunks/{Ca70R1oc.js → DeQzn7pT.js} +1 -1
- package/web/app/immutable/chunks/Debl1LJu.js +1 -0
- package/web/app/immutable/chunks/{DzgG9d04.js → DgtgAyRj.js} +1 -1
- package/web/app/immutable/chunks/{BTHiTKPc.js → DguixOqZ.js} +1 -1
- package/web/app/immutable/chunks/{B07w1Xvt.js → DhAAH4rU.js} +1 -1
- package/web/app/immutable/chunks/{b9Vr5sSO.js → DhJNH_hq.js} +1 -1
- package/web/app/immutable/chunks/{DWPjXtoT.js → DkPB5Gyi.js} +1 -1
- package/web/app/immutable/chunks/{gAYIZ12J.js → DkcUxSHK.js} +1 -1
- package/web/app/immutable/chunks/{D1TG5G7m.js → Dmq2MLxr.js} +1 -1
- package/web/app/immutable/chunks/{VGIN_p1t.js → Do9PiZ5P.js} +2 -2
- package/web/app/immutable/chunks/{FVYA7zYF.js → DoKuqfYA.js} +1 -1
- package/web/app/immutable/chunks/{B7-qYhrK.js → DoV4Ngwf.js} +1 -1
- package/web/app/immutable/chunks/Dp0wSsDS.js +2 -0
- package/web/app/immutable/chunks/{B1LjZG7N.js → DpJ6ItFS.js} +1 -1
- package/web/app/immutable/chunks/DqIdPWw6.js +1 -0
- package/web/app/immutable/chunks/{ComHdR-u.js → DqLpc8uk.js} +1 -1
- package/web/app/immutable/chunks/{BawcAaK2.js → Dr-K85Pz.js} +1 -1
- package/web/app/immutable/chunks/{CdmW6laI.js → DrH3w3jB.js} +1 -1
- package/web/app/immutable/chunks/{BtodRLK5.js → DsvlGcLM.js} +1 -1
- package/web/app/immutable/chunks/{D88AXVkV.js → DuXpPbhO.js} +1 -1
- package/web/app/immutable/chunks/{B7UjoaT4.js → DugVvFNn.js} +1 -1
- package/web/app/immutable/chunks/{CnMWAn59.js → DvnDAxdo.js} +1 -1
- package/web/app/immutable/chunks/{BgtLN2kD.js → DwkxcWNI.js} +3 -3
- package/web/app/immutable/chunks/{BoLnGk3G.js → Es_LZ_6E.js} +1 -1
- package/web/app/immutable/chunks/{vpJZSAdN.js → Fb6bTqJy.js} +1 -1
- package/web/app/immutable/chunks/{BACH6cFH.js → Gh0Bk6WC.js} +1 -1
- package/web/app/immutable/chunks/{1cW9cCot.js → HVSUZ4Kq.js} +1 -1
- package/web/app/immutable/chunks/{BX_AS4NO.js → HdOtmFfs.js} +1 -1
- package/web/app/immutable/chunks/{-YfVx6Lr.js → HpcR9-ZP.js} +1 -1
- package/web/app/immutable/chunks/{BwBvFc9f.js → IsBHRTqp.js} +1 -1
- package/web/app/immutable/chunks/{YqIGmKYo.js → KuKwSJYu.js} +1 -1
- package/web/app/immutable/chunks/{Dz2fLbdn.js → LknVBIaq.js} +1 -1
- package/web/app/immutable/chunks/{DDBvEq_9.js → M0UFWl_S.js} +1 -1
- package/web/app/immutable/chunks/{tLxzRwgx.js → M47n670V.js} +1 -1
- package/web/app/immutable/chunks/{D16bMDoO.js → MgRcWC-F.js} +1 -1
- package/web/app/immutable/chunks/{91je9Py3.js → OhUwMaQy.js} +1 -1
- package/web/app/immutable/chunks/{C43voWK4.js → Ou2B083h.js} +3 -3
- package/web/app/immutable/chunks/{ifFNiH_Q.js → Ph7T0qF8.js} +1 -1
- package/web/app/immutable/chunks/{CWf45qwn.js → Q-FVgluz.js} +1 -1
- package/web/app/immutable/chunks/{C2jgF35o.js → RgXiUiyX.js} +1 -1
- package/web/app/immutable/chunks/{BqIts_L0.js → X6OEIYik.js} +1 -1
- package/web/app/immutable/chunks/{G424GJSb.js → XKfxOi0c.js} +1 -1
- package/web/app/immutable/chunks/{CToUKfVS.js → YcWsBw0J.js} +1 -1
- package/web/app/immutable/chunks/{DI2RXiNP.js → ZynkSP7B.js} +1 -1
- package/web/app/immutable/chunks/{Bxb00R27.js → _tv07_-D.js} +1 -1
- package/web/app/immutable/chunks/{CrYKIqze.js → b0njYmMP.js} +1 -1
- package/web/app/immutable/chunks/{C89aUqor.js → b8_D7H9k.js} +1 -1
- package/web/app/immutable/chunks/{CRgWqp0Q.js → bkMlvHq9.js} +1 -1
- package/web/app/immutable/chunks/{CM-bTlQg.js → dd8yLL6Y.js} +1 -1
- package/web/app/immutable/chunks/{BKGMAISF.js → dinOFH6z.js} +1 -1
- package/web/app/immutable/chunks/{Ctnx9l23.js → ewlOsRgS.js} +1 -1
- package/web/app/immutable/chunks/{XgnGQLkv.js → fSndiqme.js} +1 -1
- package/web/app/immutable/chunks/{CMGTMc9v.js → ffjPpoAP.js} +1 -1
- package/web/app/immutable/chunks/{D3JfjJlO.js → gnxdhh79.js} +1 -1
- package/web/app/immutable/chunks/{BiQ0kKJZ.js → jD6u_pUu.js} +1 -1
- package/web/app/immutable/chunks/jxb5pgpW.js +19 -0
- package/web/app/immutable/chunks/{CnFIAIdG.js → l7AMrk83.js} +1 -1
- package/web/app/immutable/chunks/{DiU_67YU.js → marbulK7.js} +1 -1
- package/web/app/immutable/chunks/{MvsbJRbe.js → n9Db8fQb.js} +1 -1
- package/web/app/immutable/chunks/{CZ2HrVJB.js → qB-JaQGy.js} +1 -1
- package/web/app/immutable/chunks/{D1tS2Sh2.js → se5GXd0p.js} +1 -1
- package/web/app/immutable/chunks/{Boy3njow.js → tVWh__3e.js} +1 -1
- package/web/app/immutable/chunks/{C2u3n3wb.js → uxNvmxnz.js} +1 -1
- package/web/app/immutable/chunks/{DvXSnwEo.js → vxH9TB8u.js} +1 -1
- package/web/app/immutable/chunks/{BotIyjuf.js → wOsjtdPJ.js} +1 -1
- package/web/app/immutable/chunks/{BsmdqgDs.js → xNaKu_mj.js} +1 -1
- package/web/app/immutable/entry/{app.D13wouTF.js → app.CUk63TN3.js} +3 -3
- package/web/app/immutable/entry/start.ByRHyT3-.js +1 -0
- package/web/app/immutable/nodes/{0.4_Enqr75.js → 0.D4UmpUyl.js} +1 -1
- package/web/app/immutable/nodes/{1.0GDoH7pL.js → 1.DTuLvyGe.js} +1 -1
- package/web/app/immutable/nodes/{10.BLmBSn8S.js → 10.yW5YYZcV.js} +1 -1
- package/web/app/immutable/nodes/{11.CS_mVYvl.js → 11.fqpT905Q.js} +1 -1
- package/web/app/immutable/nodes/{12.DWOozFK_.js → 12.B-WFagfi.js} +1 -1
- package/web/app/immutable/nodes/{13.CRnWHlMu.js → 13.knDmuG_H.js} +3 -3
- package/web/app/immutable/nodes/{14.D9wSVPA8.js → 14.CtAbrlVb.js} +1 -1
- package/web/app/immutable/nodes/{15.CvF4Yj4G.js → 15.5d-87wXx.js} +1 -1
- package/web/app/immutable/nodes/{16.CbnUh4xL.js → 16.BcAEiIYy.js} +1 -1
- package/web/app/immutable/nodes/{17.D8qEGYSE.js → 17.S_DWC10F.js} +2 -2
- package/web/app/immutable/nodes/{2.Bb9M8Sb_.js → 2.D-iQ8fmd.js} +11 -11
- package/web/app/immutable/nodes/{3.3kLveQ--.js → 3.CQKvVdrW.js} +1 -1
- package/web/app/immutable/nodes/{4.Di28fdFS.js → 4.Dq9WSzj3.js} +1 -1
- package/web/app/immutable/nodes/{5.DFuaA1cK.js → 5.C2b8MeJP.js} +2 -2
- package/web/app/immutable/nodes/{6.CSKX9gfc.js → 6.DZyVWynY.js} +1 -1
- package/web/app/immutable/nodes/{7.pjH2istV.js → 7.BNPj2Hjb.js} +1 -1
- package/web/app/immutable/nodes/{8.JlRHumI8.js → 8.CYaF3iZ7.js} +4 -4
- package/web/app/immutable/nodes/{9.Dfi2ySix.js → 9.D9yeuWg6.js} +16 -16
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +49 -49
- package/web/index.html +20 -20
- package/web/app/immutable/assets/0.B58gYYGv.css +0 -1
- package/web/app/immutable/assets/BrowserTabType.Dm5f_Y-q.css +0 -1
- package/web/app/immutable/chunks/BCH_5tMO.js +0 -13
- package/web/app/immutable/chunks/BkBjviLd.js +0 -1
- package/web/app/immutable/chunks/CCTMo-Up.js +0 -19
- package/web/app/immutable/chunks/CfbNoxr9.js +0 -2
- package/web/app/immutable/chunks/Ct_6Kn0V.js +0 -1
- package/web/app/immutable/chunks/Cw90TeMe.js +0 -2
- package/web/app/immutable/chunks/DM-tQz5k.js +0 -227
- package/web/app/immutable/chunks/Df216rki.js +0 -1
- package/web/app/immutable/chunks/WfmfYu3F.js +0 -1
- package/web/app/immutable/chunks/syxE6N1N.js +0 -1
- package/web/app/immutable/entry/start.CNSNzsXg.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./
|
|
1
|
+
import{r as e}from"./9iFKJfkz.js";const s=[{id:"input-message-state-matrix",title:"Input message states",states:["helper","error","success","light","dark","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0}];e({id:"input-message",source:"src/lib/components/ui/input-message/input-message.svelte",publicImport:"$lib/components/ui/input-message",legacyImports:[],exports:["InputMessage","inputMessageMetadata"],category:"pattern",owner:"design-system",callers:["src/features/hud/components/DockConversationPanel.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ScreenStatesCatalogPreview.svelte","src/lib/components/ui/file-input/file-input.svelte","src/lib/components/ui/input-group/input-group.svelte","src/lib/components/ui/input/input.svelte","src/lib/components/ui/textarea/textarea.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/input-message/input-message.test.ts",removalGate:"Retain while helper and error semantics use fast-tier motion.",dynamicImports:[],fixtures:s,useWhen:["Explain a field or announce a validation error directly below its input."]});const t=[{id:"input-state-matrix",title:"Input states",states:["default","rest","hover","focus","empty","placeholder","disabled","read-only","invalid","error","described","keyboard-focus","long-content","light","dark","zoom-200","file","compact-28","medium-32","large-36","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0}];e({id:"input",source:"src/lib/components/ui/input/input.svelte",publicImport:"$lib/components/ui/input",legacyImports:["$lib/components/ui/input/index.js","$lib/components/ui/input/input.svelte"],exports:["Input","inputMetadata"],category:"primitive",owner:"007-B2",callers:["src/features/accept-changes/components/NativeReviewAttempt.svelte","src/features/accept-changes/components/NativeSidebarReview.svelte","src/features/accept-changes/components/RepositorySelectionEditor.svelte","src/features/collaboration-auth/renderer/CollaborationSignInModal.svelte","src/features/dev-console/DaemonLinksView.svelte","src/features/dev-console/TrafficInspector.svelte","src/features/home/HomeNewLabelDialog.svelte","src/features/home/HomeSearch.svelte","src/features/home/assistant-panels.preview.svelte","src/features/host-membership/HostInvitationDialog.svelte","src/features/hud/components/DockOverview.svelte","src/features/hud/media-editor/recording/DockRecordingFrameMarks.svelte","src/features/inline-html/InlineHtmlPreview.svelte","src/features/layout/components/content-header/ContentHeader.svelte","src/features/onboarding/messages/DirectoryPickerView.svelte","src/features/onboarding/messages/GitHubRepoTab.svelte","src/features/onboarding/messages/LocalRepoTab.svelte","src/features/onboarding/messages/NewProjectTab.svelte","src/lib/component-catalog/CatalogShell.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ModalCatalogPreview.svelte","src/lib/component-catalog/renderers/OverlayCatalogPreview.svelte","src/lib/component-catalog/renderers/PopoversCatalogPreview.svelte","src/lib/component-catalog/renderers/ProposalCatalogPreview.svelte","src/lib/components/CommandPalette.svelte","src/lib/components/GitLabConnectForm.svelte","src/lib/components/browser/BrowserViewerTabHeader.svelte","src/lib/components/browser/BrowserViewportDialog.svelte","src/lib/components/browser/EmbeddedBrowser.svelte","src/lib/components/chat/AgentCard.svelte","src/lib/components/chat/AssistantThreadTitle.svelte","src/lib/components/chat/ChatMessageNavigator.svelte","src/lib/components/chat/TaskProgressControl.svelte","src/lib/components/chat/input/ContextPickerButton.svelte","src/lib/components/chat/input/SimpleRichInput.svelte","src/lib/components/chat/input/mention-results.preview.svelte","src/lib/components/chat/proposals/ProposalCard.svelte","src/lib/components/chat/secrets/SecretRequestCard.svelte","src/lib/components/code-review/walkthrough/WalkthroughCommentThread.svelte","src/lib/components/code-review/walkthrough/WalkthroughInlineComment.svelte","src/lib/components/debug/DebugPanel.svelte","src/lib/components/file-explorer/VirtualizedFileTree.svelte","src/lib/components/file-explorer/file-explorer-sidebar.svelte","src/lib/components/layout/ConnectBackendForm.svelte","src/lib/components/layout/WorkspaceTabGroupChip.svelte","src/lib/components/layout/panel-system/PanelTabBar.svelte","src/lib/components/modals/FeatureCodeDialog.svelte","src/lib/components/modals/InputDialog.svelte","src/lib/components/modals/ShareWorkspaceDialog.svelte","src/lib/components/modals/modal-polish.preview.svelte","src/lib/components/patterns/confirm/ConfirmRequestView.svelte","src/lib/components/patterns/confirm/modal-heading-spacing.preview.svelte","src/lib/components/patterns/settings/SettingsControl.svelte","src/lib/components/patterns/settings/custom-controls.ts","src/lib/components/terminal/QuakeTerminalOverlay.svelte","src/lib/components/terminal/RootQuakeTerminalOverlay.svelte","src/lib/components/terminal/SetupScriptBanner.svelte","src/lib/components/terminal/TerminalSidebar.svelte","src/lib/components/tiptap/BubbleMenu.svelte","src/lib/components/ui/EditableName.svelte","src/lib/components/ui/dropdown/Dropdown.svelte","src/lib/components/ui/menu-search.preview.svelte","src/lib/components/ui/message-composer/message-composer.svelte","src/lib/components/ui/panel-find-bar/PanelFindBar.svelte","src/lib/components/ui/searchable-combobox/searchable-combobox.svelte","src/lib/components/ui/select/select.test-harness.svelte","src/lib/components/ui/sidebar/sidebar-input.svelte","src/lib/components/ui/text-entry-focus.preview.svelte","src/lib/components/ui/tooltip/tooltip-audit.preview.svelte","src/lib/components/workspace/CompactWorkspaceInitializer.svelte","src/lib/components/workspace/PullRequestCreator.svelte","src/lib/components/workspace/WorkspaceSidebarHeader.svelte","src/lib/components/workspace/initializer/AddRemoteSetupModal.svelte","src/lib/components/workspace/initializer/GitLabPickerList.svelte","src/lib/components/workspace/initializer/GitLabProjectPicker.svelte","src/lib/components/workspace/initializer/IssueSuggestions.svelte","src/lib/components/workspace/initializer/RepoSelector.svelte","src/lib/components/workspace/sidebar/BranchDisplay.svelte","src/lib/components/workspace/sidebar/CommitsTimeline.svelte","src/lib/components/workspace/sidebar/NotesPanel.svelte","src/lib/components/workspace/sidebar/PRSection.svelte","src/lib/components/workspace/sidebar/SidebarExpandableSearch.svelte","src/lib/components/workspace/sidebar/WorkspaceProgressCard.svelte","src/lib/components/workspace/sidebar/context-picker/BrowserUrlPicker.svelte","src/lib/components/workspace/sidebar/context-picker/LinearPicker.svelte","src/lib/components/workspace/sidebar/context-picker/SentryPicker.svelte","src/routes/sandbox/recipes/+page.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/input/input.test.ts",removalGate:"Retain while exported and binding, focus, validation, and fixture tests pass.",dynamicImports:[],fixtures:t});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
var Oh=Object.defineProperty;var Ih=(t,e,i)=>e in t?Oh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var P=(t,e,i)=>Ih(t,typeof e!="symbol"?e+"":e,i);import{cd as $h}from"./DYhIMPy1.js";import{bo as Fs,_ as Bn}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/9taqgPH1.js","/app/immutable/chunks/YcWsBw0J.js","/app/immutable/chunks/DrH3w3jB.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/CNdlzZOD.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/9iFKJfkz.js","/app/immutable/chunks/DIh4SQwA.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DwkxcWNI.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/b0njYmMP.js","/app/immutable/chunks/CrN8CpnY.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/HVSUZ4Kq.js","/app/immutable/chunks/CqnfptVg.js","/app/immutable/chunks/BJpbRkma.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/DsvlGcLM.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/BIfN-lxi.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/Fb6bTqJy.js","/app/immutable/chunks/1JDc8gDP.js","/app/immutable/chunks/C6LN2Lq-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Oh=Object.defineProperty;var Ih=(t,e,i)=>e in t?Oh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var P=(t,e,i)=>Ih(t,typeof e!="symbol"?e+"":e,i);import{cd as $h}from"./DYhIMPy1.js";import{bo as Fs,_ as Bn}from"./CNdlzZOD.js";import{a as ji}from"./BJzHxIyr.js";import{i as Ns}from"./Gh0Bk6WC.js";import{d as Fh}from"./D-YrUZis.js";import{t as Nh}from"./D4fSLYwV.js";import{d as Ui}from"./B0Z-1lwJ.js";import{c as zh}from"./ChTqQfQN.js";import{bf as Wh}from"./DwkxcWNI.js";import{Ig as Mt,Ji as An,gp as Hh,Bs as Uh,zF as Kh,rA as qh}from"./BJpbRkma.js";import{H as Vh,O as Gh}from"./DrH3w3jB.js";import{g as Yh}from"./DhJNH_hq.js";import{f as Xh,l as jh}from"./C7eFRIGF.js";/**
|
|
3
3
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
4
4
|
* @license MIT
|
|
5
5
|
*
|
|
@@ -141,6 +141,6 @@ void main() {
|
|
|
141
141
|
`))}},lf=class extends Error{constructor(t,e){super(t),this.name="ListenerLeakError",this.stack=e}},cf=class extends Error{constructor(t,e){super(t),this.name="ListenerRefusalError",this.stack=e}},df=0,ur=class{constructor(t){this.value=t,this.id=df++}},uf=2,_f,ut=class{constructor(t){this._size=0,this._options=t,this._leakageMon=this._options?.leakWarningThreshold?new af(t?.onListenerError??dr,this._options?.leakWarningThreshold??of):void 0,this._perfMon=this._options?._profName?new nf(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(t,e,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);let a=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],l=new cf(`${o}. HINT: Stack shows most frequent listener (${a[1]}-times)`,a[0]);return(this._options?.onListenerError||dr)(l),qt.None}if(this._disposed)return qt.None;e&&(t=t.bind(e));let s=new ur(t),r;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=hf.create(),r=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof ur?(this._deliveryQueue??=new ff,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let n=yi(()=>{r?.(),this._removeListener(s)});return i instanceof kn?i.add(n):Array.isArray(i)&&i.push(n),n},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let e=this._listeners,i=e.indexOf(t);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,e[i]=void 0;let s=this._deliveryQueue.current===this;if(this._size*uf<=e.length){let r=0;for(let n=0;n<e.length;n++)e[n]?e[r++]=e[n]:s&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);e.length=r}}_deliver(t,e){if(!t)return;let i=this._options?.onListenerError||dr;if(!i){t.value(e);return}try{t.value(e)}catch(s){i(s)}}_deliverQueue(t){let e=t.current._listeners;for(;t.i<t.end;)this._deliver(e[t.i++],t.value);t.reset()}fire(t){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof ur)this._deliver(this._listeners,t);else{let e=this._deliveryQueue;e.enqueue(this,t,this._listeners.length),this._deliverQueue(e)}this._perfMon?.stop()}hasListeners(){return this._size>0}},ff=class{constructor(){this.i=-1,this.end=0}enqueue(t,e,i){this.i=0,this.end=i,this.current=t,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Dh=Object.freeze(function(t,e){let i=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(i)}}}),gf;(t=>{function e(i){return i===t.None||i===t.Cancelled||i instanceof pf?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:En.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Dh})})(gf||={});var pf=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Dh:(this._emitter||(this._emitter=new ut),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},mi="en",_r=!1,ds,Cs=mi,sa=mi,mf,Et,ni=globalThis,Ge;typeof ni.vscode<"u"&&typeof ni.vscode.process<"u"?Ge=ni.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Ge=process);var vf=typeof Ge?.versions?.electron=="string",Sf=vf&&Ge?.type==="renderer";if(typeof Ge=="object"){Ge.platform,Ge.platform,_r=Ge.platform==="linux",_r&&Ge.env.SNAP&&Ge.env.SNAP_REVISION,Ge.env.CI||Ge.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ds=mi,Cs=mi;let t=Ge.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t);ds=e.userLocale,sa=e.osLocale,Cs=e.resolvedLanguage||mi,mf=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!Sf?(Et=navigator.userAgent,Et.indexOf("Windows")>=0,Et.indexOf("Macintosh")>=0,(Et.indexOf("Macintosh")>=0||Et.indexOf("iPad")>=0||Et.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_r=Et.indexOf("Linux")>=0,Et?.indexOf("Mobi")>=0,Cs=globalThis._VSCODE_NLS_LANGUAGE||mi,ds=navigator.language.toLowerCase(),sa=ds):console.error("Unable to resolve platform.");var mt=Et,$t=Cs,wf;(t=>{function e(){return $t}t.value=e;function i(){return $t.length===2?$t==="en":$t.length>=3?$t[0]==="e"&&$t[1]==="n"&&$t[2]==="-":!1}t.isDefaultVariant=i;function s(){return $t==="en"}t.isDefault=s})(wf||={});var bf=typeof ni.postMessage=="function"&&!ni.importScripts;(()=>{if(bf){let t=[];ni.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=t.length;s<r;s++){let n=t[s];if(n.id===i.data.vscodeScheduleAsyncWork){t.splice(s,1),n.callback();return}}});let e=0;return i=>{let s=++e;t.push({id:s,callback:i}),ni.postMessage({vscodeScheduleAsyncWork:s},"*")}}return t=>setTimeout(t)})();var Cf=!!(mt&&mt.indexOf("Chrome")>=0);mt&&mt.indexOf("Firefox")>=0;!Cf&&mt&&mt.indexOf("Safari")>=0;mt&&mt.indexOf("Edg/")>=0;mt&&mt.indexOf("Android")>=0;function Bh(t,e=0,i){let s=setTimeout(()=>{t()},e);return yi(()=>{clearTimeout(s)})}var yf;(t=>{async function e(s){let r,n=await Promise.all(s.map(o=>o.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return n}t.settled=e;function i(s){return new Promise(async(r,n)=>{try{await s(r,n)}catch(o){n(o)}})}t.withAsyncBody=i})(yf||={});var ra=class Qe{static fromArray(e){return new Qe(i=>{i.emitMany(e)})}static fromPromise(e){return new Qe(async i=>{i.emitMany(await e)})}static fromPromises(e){return new Qe(async i=>{await Promise.all(e.map(async s=>i.emitOne(await s)))})}static merge(e){return new Qe(async i=>{await Promise.all(e.map(async s=>{for await(let r of s)i.emitOne(r)}))})}constructor(e,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new ut,queueMicrotask(async()=>{let s={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(e(s)),this.resolve()}catch(r){this.reject(r)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await En.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,i){return new Qe(async s=>{for await(let r of e)s.emitOne(i(r))})}map(e){return Qe.map(this,e)}static filter(e,i){return new Qe(async s=>{for await(let r of e)i(r)&&s.emitOne(r)})}filter(e){return Qe.filter(this,e)}static coalesce(e){return Qe.filter(e,i=>!!i)}coalesce(){return Qe.coalesce(this)}static async toPromise(e){let i=[];for await(let s of e)i.push(s);return i}toPromise(){return Qe.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};ra.EMPTY=ra.fromArray([]);var xf=class extends qt{constructor(t){super(),this._terminal=t,this._linesCacheTimeout=this._register(new Rs),this._linesCacheDisposables=this._register(new Rs),this._register(yi(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=new Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=xh(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=Bh(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(t){return this._linesCache?.[t]}setLineInCache(t,e){this._linesCache&&(this._linesCache[t]=e)}translateBufferLineToStringWithWrap(t,e){let i=[],s=[0],r=this._terminal.buffer.active.getLine(t);for(;r;){let n=this._terminal.buffer.active.getLine(t+1),o=n?n.isWrapped:!1,a=r.translateToString(!o&&e);if(o&&n){let l=r.getCell(r.length-1);l&&l.getCode()===0&&l.getWidth()===1&&n.getCell(0)?.getWidth()===2&&(a=a.slice(0,-1))}if(i.push(a),o)s.push(s[s.length-1]+a.length);else break;t++,r=n}return[i.join(""),s]}},kf=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(t){this._cachedSearchTerm=t}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(t){this._lastSearchOptions=t}isValidSearchTerm(t){return!!(t&&t.length>0)}didOptionsChange(t){return this._lastSearchOptions?t?this._lastSearchOptions.caseSensitive!==t.caseSensitive||this._lastSearchOptions.regex!==t.regex||this._lastSearchOptions.wholeWord!==t.wholeWord:!1:!0}shouldUpdateHighlighting(t,e){return e?.decorations?this._cachedSearchTerm===void 0||t!==this._cachedSearchTerm||this.didOptionsChange(e):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},Ef=class{constructor(t,e){this._terminal=t,this._lineCache=e}find(t,e,i,s){if(!t||t.length===0){this._terminal.clearSelection();return}if(i>this._terminal.cols)throw new Error(`Invalid col: ${i} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let r={startRow:e,startCol:i},n=this._findInLine(t,r,s);if(!n)for(let o=e+1;o<this._terminal.buffer.active.baseY+this._terminal.rows&&(r.startRow=o,r.startCol=0,n=this._findInLine(t,r,s),!n);o++);return n}findNextWithSelection(t,e,i){if(!t||t.length===0){this._terminal.clearSelection();return}let s=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=0,n=0;s&&(i===t?(r=s.end.x,n=s.end.y):(r=s.start.x,n=s.start.y)),this._lineCache.initLinesCache();let o={startRow:n,startCol:r},a=this._findInLine(t,o,e);if(!a)for(let l=n+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=l,o.startCol=0,a=this._findInLine(t,o,e),!a);l++);if(!a&&n!==0)for(let l=0;l<n&&(o.startRow=l,o.startCol=0,a=this._findInLine(t,o,e),!a);l++);return!a&&s&&(o.startRow=s.start.y,o.startCol=0,a=this._findInLine(t,o,e)),a}findPreviousWithSelection(t,e,i){if(!t||t.length===0){this._terminal.clearSelection();return}let s=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=this._terminal.buffer.active.baseY+this._terminal.rows-1,n=this._terminal.cols,o=!0;this._lineCache.initLinesCache();let a={startRow:r,startCol:n},l;if(s&&(a.startRow=r=s.start.y,a.startCol=n=s.start.x,i!==t&&(l=this._findInLine(t,a,e,!1),l||(a.startRow=r=s.end.y,a.startCol=n=s.end.x))),l||(l=this._findInLine(t,a,e,o)),!l){a.startCol=Math.max(a.startCol,this._terminal.cols);for(let h=r-1;h>=0&&(a.startRow=h,l=this._findInLine(t,a,e,o),!l);h--);}if(!l&&r!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let h=this._terminal.buffer.active.baseY+this._terminal.rows-1;h>=r&&(a.startRow=h,l=this._findInLine(t,a,e,o),!l);h--);return l}_isWholeWord(t,e,i){return(t===0||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(e[t-1]))&&(t+i.length===e.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(e[t+i.length]))}_findInLine(t,e,i={},s=!1){let r=e.startRow,n=e.startCol;if(this._terminal.buffer.active.getLine(r)?.isWrapped){if(s){e.startCol+=this._terminal.cols;return}return e.startRow--,e.startCol+=this._terminal.cols,this._findInLine(t,e,i)}let o=this._lineCache.getLineFromCache(r);o||(o=this._lineCache.translateBufferLineToStringWithWrap(r,!0),this._lineCache.setLineInCache(r,o));let[a,l]=o,h=this._bufferColsToStringOffset(r,n),c=t,d=a;i.regex||(c=i.caseSensitive?t:t.toLowerCase(),d=i.caseSensitive?a:a.toLowerCase());let u=-1;if(i.regex){let f=RegExp(c,i.caseSensitive?"g":"gi"),g;if(s)for(;g=f.exec(d.slice(0,h));)u=f.lastIndex-g[0].length,t=g[0],f.lastIndex-=t.length-1;else g=f.exec(d.slice(h)),g&&g[0].length>0&&(u=h+(f.lastIndex-g[0].length),t=g[0])}else s?h-c.length>=0&&(u=d.lastIndexOf(c,h-c.length)):u=d.indexOf(c,h);if(u>=0){if(i.wholeWord&&!this._isWholeWord(u,d,t))return;let f=0;for(;f<l.length-1&&u>=l[f+1];)f++;let g=f;for(;g<l.length-1&&u+t.length>=l[g+1];)g++;let C=u-l[f],E=u+t.length-l[g],D=this._stringLengthToBufferSize(r+f,C),B=this._stringLengthToBufferSize(r+g,E)-D+this._terminal.cols*(g-f);return{term:t,col:D,row:r+f,size:B}}}_stringLengthToBufferSize(t,e){let i=this._terminal.buffer.active.getLine(t);if(!i)return 0;for(let s=0;s<e;s++){let r=i.getCell(s);if(!r)break;let n=r.getChars();n.length>1&&(e-=n.length-1);let o=i.getCell(s+1);o&&o.getWidth()===0&&e++}return e}_bufferColsToStringOffset(t,e){let i=t,s=0,r=this._terminal.buffer.active.getLine(i);for(;e>0&&r;){for(let n=0;n<e&&n<this._terminal.cols;n++){let o=r.getCell(n);if(!o)break;o.getWidth()&&(s+=o.getCode()===0?1:o.getChars().length)}if(i++,r=this._terminal.buffer.active.getLine(i),r&&!r.isWrapped)break;e-=this._terminal.cols}return s}},Lf=class extends qt{constructor(t){super(),this._terminal=t,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(yi(()=>this.clearHighlightDecorations()))}createHighlightDecorations(t,e){this.clearHighlightDecorations();for(let i of t){let s=this._createResultDecorations(i,e,!1);if(s)for(let r of s)this._storeDecoration(r,i)}}createActiveDecoration(t,e){let i=this._createResultDecorations(t,e,!0);if(i)return{decorations:i,match:t,dispose(){qi(i)}}}clearHighlightDecorations(){qi(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(t,e){this._highlightedLines.add(t.marker.line),this._highlightDecorations.push({decoration:t,match:e,dispose(){t.dispose()}})}_applyStyles(t,e,i){t.classList.contains("xterm-find-result-decoration")||(t.classList.add("xterm-find-result-decoration"),e&&(t.style.outline=`1px solid ${e}`)),i&&t.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(t,e,i){let s=[],r=t.col,n=t.size,o=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+t.row;for(;n>0;){let l=Math.min(this._terminal.cols-r,n);s.push([o,r,l]),r=0,n-=l,o++}let a=[];for(let l of s){let h=this._terminal.registerMarker(l[0]),c=this._terminal.registerDecoration({marker:h,x:l[1],width:l[2],backgroundColor:i?e.activeMatchBackground:e.matchBackground,overviewRulerOptions:this._highlightedLines.has(h.line)?void 0:{color:i?e.activeMatchColorOverviewRuler:e.matchOverviewRuler,position:"center"}});if(c){let d=[];d.push(h),d.push(c.onRender(u=>this._applyStyles(u,i?e.activeMatchBorder:e.matchBorder,!1))),d.push(c.onDispose(()=>qi(d))),a.push(c)}}return a.length===0?void 0:a}},Mf=class extends qt{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new ut)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(t){this._selectedDecoration=t}updateResults(t,e){this._searchResults=t.slice(0,e)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(t){for(let e=0;e<this._searchResults.length;e++){let i=this._searchResults[e];if(i.row===t.row&&i.col===t.col&&i.size===t.size)return e}return-1}fireResultsChanged(t){if(!t)return;let e=-1;this._selectedDecoration&&(e=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:e,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},Tf=class extends qt{constructor(t){super(),this._highlightTimeout=this._register(new Rs),this._lineCache=this._register(new Rs),this._state=new kf,this._resultTracker=this._register(new Mf),this._highlightLimit=t?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(t){this._terminal=t,this._lineCache.value=new xf(t),this._engine=new Ef(t,this._lineCache.value),this._decorationManager=new Lf(t),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(yi(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=Bh(()=>{let t=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(t,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(t){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),t||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(t,e,i){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=e,this._state.shouldUpdateHighlighting(t,e)&&this._highlightAllMatches(t,e);let s=this._findNextAndSelect(t,e,i);return this._fireResults(e),this._state.cachedSearchTerm=t,s}_highlightAllMatches(t,e){if(!this._terminal||!this._engine||!this._decorationManager)throw new Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(t)){this.clearDecorations();return}this.clearDecorations(!0);let i=[],s,r=this._engine.find(t,0,0,e);for(;r&&(s?.row!==r.row||s?.col!==r.col)&&!(i.length>=this._highlightLimit);)s=r,i.push(s),r=this._engine.find(t,s.col+s.term.length>=this._terminal.cols?s.row+1:s.row,s.col+s.term.length>=this._terminal.cols?0:s.col+1,e);this._resultTracker.updateResults(i,this._highlightLimit),e.decorations&&this._decorationManager.createHighlightDecorations(i,e.decorations)}_findNextAndSelect(t,e,i){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(t))return this._terminal.clearSelection(),this.clearDecorations(),!1;let s=this._engine.findNextWithSelection(t,e,this._state.cachedSearchTerm);return this._selectResult(s,e?.decorations,i?.noScroll)}findPrevious(t,e,i){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=e,this._state.shouldUpdateHighlighting(t,e)&&this._highlightAllMatches(t,e);let s=this._findPreviousAndSelect(t,e,i);return this._fireResults(e),this._state.cachedSearchTerm=t,s}_fireResults(t){this._resultTracker.fireResultsChanged(!!t?.decorations)}_findPreviousAndSelect(t,e,i){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(t))return this._terminal.clearSelection(),this.clearDecorations(),!1;let s=this._engine.findPreviousWithSelection(t,e,this._state.cachedSearchTerm);return this._selectResult(s,e?.decorations,i?.noScroll)}_selectResult(t,e,i){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!t)return this._terminal.clearSelection(),!1;if(this._terminal.select(t.col,t.row,t.size),e){let s=this._decorationManager.createActiveDecoration(t,e);s&&(this._resultTracker.selectedDecoration=s)}if(!i&&(t.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||t.row<this._terminal.buffer.active.viewportY)){let s=t.row-this._terminal.buffer.active.viewportY;s-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(s)}return!0}};const Yt=new ji("TerminalStateMachine");var et=(t=>(t.UNINITIALIZED="uninitialized",t.INITIALIZING="initializing",t.CONNECTING="connecting",t.CONNECTED="connected",t.RECONNECTING="reconnecting",t.DISCONNECTED="disconnected",t.ERROR="error",t.DISPOSED="disposed",t))(et||{});class Rf{constructor(e){P(this,"currentState","uninitialized");P(this,"stateListeners",new Map);P(this,"transitionListeners",new Set);P(this,"errorHandlers",new Set);P(this,"transitions",[{from:["uninitialized"],to:"initializing",action:"initialize"},{from:["initializing"],to:"connecting",action:"connect"},{from:["connecting"],to:"connected",action:"connected"},{from:["disconnected","error"],to:"reconnecting",action:"reconnect"},{from:["reconnecting"],to:"connected",action:"reconnected"},{from:["connected","connecting"],to:"disconnected",action:"disconnect"},{from:["initializing","connecting","connected","reconnecting"],to:"error",action:"error"},{from:["uninitialized","initializing","connecting","connected","reconnecting","disconnected","error"],to:"disposed",action:"dispose"}]);this.terminalId=e}getState(){return this.currentState}canTransition(e){const i=this.transitions.find(s=>s.action===e&&s.from.includes(this.currentState));return!(!i||i.guard&&!i.guard())}transition(e){const i=this.transitions.find(r=>r.action===e&&r.from.includes(this.currentState));if(!i)return Yt.warn(`Invalid transition: ${e} from ${this.currentState}`),!1;if(i.guard&&!i.guard())return Yt.warn(`Guard failed for transition: ${e}`),!1;const s=this.currentState;return this.currentState=i.to,Yt.info(`Terminal ${this.terminalId}: ${s} -> ${this.currentState} (${e})`),this.notifyStateListeners(this.currentState),this.notifyTransitionListeners(s,this.currentState),!0}onStateChange(e,i){let s=this.stateListeners.get(e);return s||(s=new Set,this.stateListeners.set(e,s)),s.add(i),()=>{this.stateListeners.get(e)?.delete(i)}}onTransition(e){return this.transitionListeners.add(e),()=>{this.transitionListeners.delete(e)}}onError(e){return this.errorHandlers.add(e),()=>{this.errorHandlers.delete(e)}}reportError(e){Yt.error(`Terminal ${this.terminalId} error:`,e),this.errorHandlers.forEach(i=>{try{i(e)}catch(s){Yt.error("Error handler threw exception:",s)}}),this.currentState!=="disposed"&&this.transition("error")}isHealthy(){return["connected","connecting","reconnecting"].includes(this.currentState)}canAcceptInput(){return this.currentState==="connected"}isDisposed(){return this.currentState==="disposed"}notifyStateListeners(e){this.stateListeners.get(e)?.forEach(i=>{try{i()}catch(s){Yt.error("Error in state listener:",s)}})}notifyTransitionListeners(e,i){this.transitionListeners.forEach(s=>{try{s(e,i)}catch(r){Yt.error("Error in transition listener:",r)}})}dispose(){this.isDisposed()||this.transition("dispose"),this.stateListeners.clear(),this.transitionListeners.clear(),this.errorHandlers.clear()}}const ct=new ji("TerminalBufferManager"),Ln="terminal-buffer-index";let Jt=null,hn=0;const Df=5e3;function Mn(){const t=Date.now();if(Jt&&t-hn<Df)return Jt;try{const e=localStorage.getItem(Ln);if(e){const i=JSON.parse(e);Jt=new Map(i.map(s=>[s.key,s.timestamp]))}else Jt=new Map}catch{Jt=new Map}return hn=t,Jt}function Tn(t){try{const e=Array.from(t.entries()).map(([i,s])=>({key:i,timestamp:s}));localStorage.setItem(Ln,JSON.stringify(e)),Jt=t,hn=Date.now()}catch{}}function na(t,e){const i=Mn();i.set(t,e),Tn(i)}function oa(t){const e=Mn();e.delete(t),Tn(e)}const $e=class $e{constructor(e,i){P(this,"storageKey");P(this,"fallbackStorage",new Map);this.workspaceId=e,this.terminalId=i,this.storageKey=`terminal-buffer-${e}-${i}`}async saveBuffer(e,i,s){try{const n={lines:this.trimBuffer(e),cursorX:i,cursorY:s,timestamp:Date.now(),version:$e.BUFFER_VERSION};if(await this.hasStorageSpace(n))try{return localStorage.setItem(this.storageKey,JSON.stringify(n)),na(this.storageKey,n.timestamp),ct.debug(`Saved buffer for terminal ${this.terminalId}`),!0}catch(o){return ct.warn("localStorage failed, using fallback storage:",o),this.fallbackStorage.set(this.storageKey,n),!0}else{await this.cleanupOldBuffers();try{return localStorage.setItem(this.storageKey,JSON.stringify(n)),na(this.storageKey,n.timestamp),!0}catch{return this.fallbackStorage.set(this.storageKey,n),!0}}}catch(r){return ct.error("Failed to save buffer:",r),!1}}async restoreBuffer(){try{const e=localStorage.getItem(this.storageKey);if(e){const s=JSON.parse(e);if(this.isValidSnapshot(s))return ct.debug(`Restored buffer for terminal ${this.terminalId}`),s;localStorage.removeItem(this.storageKey)}const i=this.fallbackStorage.get(this.storageKey);return i&&this.isValidSnapshot(i)?i:null}catch(e){return ct.error("Failed to restore buffer:",e),null}}async clearBuffer(){try{localStorage.removeItem(this.storageKey),this.fallbackStorage.delete(this.storageKey),oa(this.storageKey)}catch(e){ct.error("Failed to clear buffer:",e)}}trimBuffer(e){for(;e.length>0&&!e[e.length-1].trim();)e.pop();return e.length>$e.MAX_BUFFER_SIZE&&(e=e.slice(-1e4)),e.map(i=>i.length>$e.MAX_LINE_LENGTH?`${i.substring(0,$e.MAX_LINE_LENGTH)}…`:i)}isValidSnapshot(e){return!(e.version!==$e.BUFFER_VERSION||Date.now()-e.timestamp>$e.RETENTION_PERIOD||!Array.isArray(e.lines))}async hasStorageSpace(e){try{const i=JSON.stringify(e).length;if("storage"in navigator&&"estimate"in navigator.storage){const s=await navigator.storage.estimate();return(s.quota||0)-(s.usage||0)>i+$e.STORAGE_QUOTA_BUFFER}return!0}catch{return!0}}async cleanupOldBuffers(){try{const e=[],i=Date.now(),s=Mn();for(const[r,n]of s)i-n>$e.RETENTION_PERIOD&&e.push(r);for(const r of e)localStorage.removeItem(r),oa(r),ct.debug(`Cleaned up old buffer: ${r}`);s.size===0&&await this.rebuildBufferIndex()}catch(e){ct.error("Failed to cleanup old buffers:",e)}}async rebuildBufferIndex(){try{const e=new Map;for(let i=0;i<localStorage.length;i++){const s=localStorage.key(i);if(s?.startsWith("terminal-buffer-")&&s!==Ln)try{const r=localStorage.getItem(s);if(r){const n=JSON.parse(r);e.set(s,n.timestamp)}}catch{}}e.size>0&&(Tn(e),ct.debug(`Rebuilt buffer index with ${e.size} entries`))}catch(e){ct.error("Failed to rebuild buffer index:",e)}}getStats(){try{const e=localStorage.getItem(this.storageKey);if(e){const i=JSON.parse(e);return{size:e.length,lineCount:i.lines.length,age:Date.now()-i.timestamp}}return null}catch{return null}}};P($e,"BUFFER_VERSION",1),P($e,"MAX_BUFFER_SIZE",1e4),P($e,"MAX_LINE_LENGTH",1e3),P($e,"RETENTION_PERIOD",1440*60*1e3),P($e,"STORAGE_QUOTA_BUFFER",100*1024);let Ds=$e;const Oi=new ji("TerminalThemeManager"),Se=class Se{constructor(e){P(this,"currentTheme");P(this,"customTerminalTheme",null);P(this,"themeObserver",null);P(this,"transitionTimeout",null);P(this,"darkModeQuery",null);P(this,"darkModeChangeHandler",null);P(this,"themeChangeHandler",null);this.container=e,this.currentTheme=this.detectSystemTheme(),this.setContainer(this.container??null),this.setupThemeObserver()}setContainer(e){this.transitionTimeout&&(clearTimeout(this.transitionTimeout),this.transitionTimeout=null),this.container&&this.container!==e&&(this.container.style.transition=""),this.container=e,this.container&&(this.container.style.backgroundColor=this.currentTheme.background||"transparent")}getCurrentTheme(){return this.currentTheme}applyTheme(e,i){const s=i||this.detectSystemTheme();if(s.name!==this.currentTheme.name)try{this.container&&(this.container.style.transition=`background-color ${Se.TRANSITION_DURATION}ms ease`),e.options.theme=s,this.container&&(this.container.style.backgroundColor=s.background||"transparent"),e.refresh(0,e.rows-1),this.currentTheme=s,Oi.debug(`Applied theme: ${s.name}`),this.transitionTimeout&&clearTimeout(this.transitionTimeout),this.transitionTimeout=setTimeout(()=>{this.container&&(this.container.style.transition="")},Se.TRANSITION_DURATION)}catch(r){Oi.error("Failed to apply theme:",r)}}detectSystemTheme(){if(this.customTerminalTheme)return this.customTerminalTheme;const e=document.documentElement.classList.contains("dark"),i=document.documentElement.classList.contains("light");if(e)return Se.DARK_THEME;if(i)return Se.LIGHT_THEME;const s=document.documentElement.getAttribute("data-theme");if(s==="dark")return Se.DARK_THEME;if(s==="light")return Se.LIGHT_THEME;const n=getComputedStyle(document.documentElement).getPropertyValue("--background").trim();return n&&this.isColorDark(n)||Nh.isDark()?Se.DARK_THEME:Se.LIGHT_THEME}isColorDark(e){const i=this.colorToRgb(e);return i?(.299*i.r+.587*i.g+.114*i.b)/255<.5:!1}colorToRgb(e){if(e.startsWith("#")){const s=e.slice(1);if(s.length===3)return{r:parseInt(s[0]+s[0],16),g:parseInt(s[1]+s[1],16),b:parseInt(s[2]+s[2],16)};if(s.length===6)return{r:parseInt(s.slice(0,2),16),g:parseInt(s.slice(2,4),16),b:parseInt(s.slice(4,6),16)}}const i=e.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);return i?{r:parseInt(i[1]),g:parseInt(i[2]),b:parseInt(i[3])}:null}setupThemeObserver(){typeof window>"u"||(this.themeObserver=new MutationObserver(e=>{for(const i of e)if(i.type==="attributes"){const s=i.attributeName;if(s==="class"||s==="data-theme"){const r=this.detectSystemTheme();r.name!==this.currentTheme.name&&(Oi.debug(`Theme change detected: ${this.currentTheme.name} -> ${r.name}`),Ui("terminal-theme-changed",{theme:r}))}}}),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),this.darkModeQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.darkModeChangeHandler=()=>{Oi.debug("System theme preference changed");const e=this.detectSystemTheme();e.name!==this.currentTheme.name&&Ui("terminal-theme-changed",{theme:e})},this.darkModeQuery.addEventListener("change",this.darkModeChangeHandler),this.themeChangeHandler=e=>{const i=e.detail?.isDark,s=e.detail?.terminalColors;let r;s&&Object.keys(s).length>0?(r={...i?Se.DARK_THEME:Se.LIGHT_THEME,...s,name:"custom",isDark:i},this.customTerminalTheme=r):(this.customTerminalTheme=null,r=i?Se.DARK_THEME:Se.LIGHT_THEME),(r.name!==this.currentTheme.name||s)&&(Oi.debug(`App theme changed to ${r.name}`),Ui("terminal-theme-changed",{theme:r}))},window.addEventListener("theme-changed",this.themeChangeHandler))}dispose(){this.themeObserver&&(this.themeObserver.disconnect(),this.themeObserver=null),this.darkModeQuery&&this.darkModeChangeHandler&&(this.darkModeQuery.removeEventListener("change",this.darkModeChangeHandler),this.darkModeQuery=null,this.darkModeChangeHandler=null),this.themeChangeHandler&&(window.removeEventListener("theme-changed",this.themeChangeHandler),this.themeChangeHandler=null),this.transitionTimeout&&(clearTimeout(this.transitionTimeout),this.transitionTimeout=null),this.setContainer(null)}};P(Se,"TRANSITION_DURATION",200),P(Se,"DARK_THEME",{name:"sleek-dark",isDark:!0,background:"#0B0B0E",foreground:"#e4e4e7",cursor:"#fbbf24",cursorAccent:"#1a1a1a",selectionBackground:"#3f3f46",selectionForeground:"#F7F7F7",selectionInactiveBackground:"#27272a",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#d4d4d8",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#f4f4f5"}),P(Se,"LIGHT_THEME",{name:"sleek-light",isDark:!1,background:"#F7F7F8",foreground:"#18181b",cursor:"#f59e0b",cursorAccent:"#F7F7F7",selectionBackground:"#e4e4e7",selectionForeground:"#09090b",selectionInactiveBackground:"#f4f4f5",black:"#18181b",red:"#dc2626",green:"#16a34a",yellow:"#ca8a04",blue:"#2563eb",magenta:"#9333ea",cyan:"#0891b2",white:"#e4e4e7",brightBlack:"#71717a",brightRed:"#ef4444",brightGreen:"#22c55e",brightYellow:"#eab308",brightBlue:"#3b82f6",brightMagenta:"#a855f7",brightCyan:"#06b6d4",brightWhite:"#F7F7F7"});let ln=Se;const Ft="***",Bf="(?=[A-Za-z_])[A-Za-z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASS|CREDENTIAL|AUTH|PWD)[A-Za-z0-9_]*",Af=new RegExp(`((?:^|(?<=\\s)|&&|;|\\|\\|)\\s*(?:export\\s+)?)(${Bf})(=)("(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|\\\`[^\\\`]*\\\`|\\S+)`,"gi"),Pf=/(-[Hh]\s+|--header\s+)(['"])(Authorization:\s*)[^'"]*(\2)/gi,Of=/([\w+.-]+:\/\/[^\s@]+):([^\s@]+)@(?=\S)/gi,If=/(curl\s+(?:\S+\s+)*(?:-u|--user)[=\s]\s*)(["']?)([^\s"':]+):([^\s"']+)\2/gi,$f=/(--(?:password|passwd|token|secret|api-key|api-token|auth-token|access-token|client-secret|private-key))(=)("(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|\S+)/gi,Ff=/(--(?:password|passwd|token|secret|api-key|api-token|auth-token|access-token|client-secret|private-key))\s+("(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|\S+)/gi,Nf=/((?:mysql|mongosh?|redis-cli|sshpass)\s+(?:\S+\s+)*-[pP])\s+(\S+)/gi,zf=/(mysql\s+(?:\S+\s+)*-[pP])(\S+)/gi;function Ut(t){if(!t)return t;let e=t;return e=e.replace(Pf,`$1$2Authorization: ${Ft}$4`),e=e.replace(If,`$1$2$3:${Ft}$2`),e=e.replace(Of,`$1:${Ft}@`),e=e.replace($f,`$1$2${Ft}`),e=e.replace(Ff,`$1 ${Ft}`),e=e.replace(Nf,`$1 ${Ft}`),e=e.replace(zf,`$1${Ft}`),e=e.replace(Af,`$1$2$3${Ft}`),e}function Op(t){try{const e=new URL(t);return`${e.origin}${e.pathname}`.substring(0,100)}catch{return""}}const Xt=zh("TerminalHistoryTracker"),Qt=class Qt{constructor(){P(this,"histories",new Map);P(this,"MAX_HISTORY_SIZE",10);P(this,"MAX_OUTPUT_LENGTH",500);P(this,"STORAGE_PREFIX","terminal-history-");P(this,"_updateCounter",$h(0));P(this,"updateCounter",{subscribe:this._updateCounter.subscribe});this.loadHistories()}notifyUpdate(){this._updateCounter.update(e=>e+1)}static getInstance(){return Qt.instance||(Qt.instance=new Qt),Qt.instance}getOrCreateHistory(e,i){let s=this.histories.get(e);return s||(s={terminalId:e,workspaceId:i,commands:[],currentOutput:"",isExecuting:!1},this.histories.set(e,s)),s}onCommandStart(e,i,s){const r=this.getOrCreateHistory(e,i),n=Ut(s);r.currentCommand=n,r.currentOutput="",r.isExecuting=!0,r.lastCommand=n,this.notifyUpdate(),Xt.debug(`Command started for terminal ${e}: ${n}`)}onOutput(e,i,s){const r=this.getOrCreateHistory(e,i);r.currentOutput.length<this.MAX_OUTPUT_LENGTH&&(r.currentOutput+=s,r.currentOutput.length>this.MAX_OUTPUT_LENGTH&&(r.currentOutput=`${r.currentOutput.substring(0,this.MAX_OUTPUT_LENGTH)}...`))}onCommandFinish(e,i){const s=this.getOrCreateHistory(e,i);if(s.currentCommand){const r=Ut(s.currentCommand),n={command:r,timestamp:Date.now(),output:s.currentOutput};s.commands.push(n),s.commands.length>this.MAX_HISTORY_SIZE&&(s.commands=s.commands.slice(-this.MAX_HISTORY_SIZE)),s.lastCommand=r,s.lastOutput=s.currentOutput,this.saveHistory(e,s),Xt.debug(`Command finished for terminal ${e}: ${r}`)}s.currentCommand=void 0,s.currentOutput="",s.isExecuting=!1,this.notifyUpdate()}getHistory(e){return this.histories.get(e)}getHistoriesForWorkspace(e){return Array.from(this.histories.values()).filter(i=>i.workspaceId===e)}getLastCommand(e){return this.histories.get(e)?.lastCommand}getLastOutput(e){return this.histories.get(e)?.lastOutput}saveHistory(e,i){try{const s=`${this.STORAGE_PREFIX}${e}`,r={terminalId:i.terminalId,workspaceId:i.workspaceId,commands:i.commands.slice(-5).map(n=>({...n,command:Ut(n.command)})),lastCommand:i.lastCommand?Ut(i.lastCommand):void 0,lastOutput:i.lastOutput?.substring(0,200)};localStorage.setItem(s,JSON.stringify(r))}catch(s){Xt.warn("Failed to save terminal history:",s)}}loadHistories(){try{const e=Object.keys(localStorage).filter(i=>i.startsWith(this.STORAGE_PREFIX));for(const i of e)try{const s=localStorage.getItem(i);if(s){const r=JSON.parse(s);r.terminalId&&this.histories.set(r.terminalId,{...r,currentOutput:"",isExecuting:!1,commands:r.commands||[]})}}catch(s){Xt.warn(`Failed to load terminal history for ${i}:`,s)}Xt.info(`Loaded ${this.histories.size} terminal histories from localStorage`)}catch(e){Xt.error("Failed to load terminal histories:",e)}}clearHistory(e){this.histories.delete(e);try{localStorage.removeItem(`${this.STORAGE_PREFIX}${e}`)}catch(i){Xt.warn("Failed to clear terminal history:",i)}}clearWorkspaceHistories(e){const i=[];for(const[s,r]of this.histories.entries())r.workspaceId===e&&i.push(s);for(const s of i)this.clearHistory(s)}};P(Qt,"instance");let cn=Qt;const Ii=cn.getInstance();function Wf(t,e){return setTimeout(()=>{try{t.dispose()}catch(i){if(e)e(i);else throw i}},0)}const Hf=["panel.focus-next-column","panel.focus-previous-column","global.next-space-alt","global.previous-space-alt"];function Uf(t,e,i){return Hf.some(s=>Vh(t,Gh(s,e),i))}const Kf=Tf,I=new ji("TerminalAdapter"),qf=typeof process<"u"&&process.platform==="win32",Vf=100,Ae=class Ae{constructor(e){P(this,"xterm");P(this,"fitAddon");P(this,"searchAddon");P(this,"webLinksAddon");P(this,"webglAddon",null);P(this,"stateMachine");P(this,"bufferManager");P(this,"themeManager");P(this,"terminalId");P(this,"workspaceId");P(this,"container");P(this,"eventListeners",[]);P(this,"resizeObserver",null);P(this,"reattachFitObserver",null);P(this,"reattachFitTimer",null);P(this,"visibilityObserver",null);P(this,"wasVisible",!0);P(this,"isVisible",!0);P(this,"lastFittedSize",null);P(this,"resizeDebounceTimer",null);P(this,"bufferSaveTimer",null);P(this,"dataDisposable",null);P(this,"resizeDisposable",null);P(this,"selectionDisposable",null);P(this,"ipcCleanup",null);P(this,"themeCleanup",null);P(this,"webglContextLostCleanup",null);P(this,"isDisposed",!1);P(this,"isXtermOpened",!1);P(this,"autoReconnectTimer",null);P(this,"autoReconnectAttempts",0);P(this,"heartbeatTimer",null);P(this,"webglRecoveryAttempts",0);P(this,"exitedNormally",!1);P(this,"lastCwd");P(this,"isExecuting",!1);P(this,"startTime",Date.now());P(this,"commandBuffer","");P(this,"currentLineBuffer","");P(this,"isAtPrompt",!1);P(this,"callbacks");P(this,"terminals");this.workspaceId=e.workspaceId,this.terminalId=e.terminalId||`terminal-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,this.container=e.container,this.terminals=(e.appClient??Fh).terminals,this.callbacks={onReady:e.onReady,onExit:e.onExit,onCommandStart:e.onCommandStart,onCommandFinished:e.onCommandFinished,onCwdChanged:e.onCwdChanged,onError:e.onError,onToggleSearch:e.onToggleSearch},this.stateMachine=new Rf(this.terminalId),this.setupStateMachineListeners(),this.bufferManager=new Ds(this.workspaceId,this.terminalId),this.themeManager=new ln(this.container);const i=e.fontFamily??Yh.select(Mt.state);this.xterm=new nu({allowProposedApi:!0,fontFamily:i,fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!0,cursorStyle:"block",cursorWidth:1,scrollback:1e4,allowTransparency:!0,windowsPty:qf?{backend:"conpty"}:void 0,macOptionIsMeta:!0,rightClickSelectsWord:!0,convertEol:!0,drawBoldTextInBrightColors:!0,scrollSensitivity:1,theme:this.themeManager.getCurrentTheme()}),this.fitAddon=new hu,this.xterm.loadAddon(this.fitAddon),this.webLinksAddon=new fu((s,r)=>{this.handleLinkClick(r)}),this.xterm.loadAddon(this.webLinksAddon),this.searchAddon=new Kf,this.xterm.loadAddon(this.searchAddon),this.searchAddon.onDidChangeResults(s=>{this.callbacks.onSearchResultsChange?.(s.resultIndex,s.resultCount)})}getSearchDecorations(){return{matchBackground:"#515c6a",matchBorder:"#515c6a",matchOverviewRuler:"#515c6a",activeMatchBackground:"#eab308",activeMatchBorder:"#ca8a04",activeMatchColorOverviewRuler:"#eab308"}}setupStateMachineListeners(){this.stateMachine.onTransition((e,i)=>{i===et.ERROR&&this.handleError(new Error(`Terminal entered error state from ${e}`)),(i===et.DISCONNECTED||i===et.ERROR)&&(this.stopHeartbeat(),this.exitedNormally||this.scheduleAutoReconnect()),i===et.CONNECTED&&(this.autoReconnectAttempts=0,this.cancelAutoReconnect(),this.startHeartbeat())}),this.stateMachine.onError(e=>{this.handleError(e)})}async initialize(e=!1){if(this.isDisposed)throw new Error("Cannot initialize disposed terminal");if(!this.container)throw new Error("Cannot initialize terminal without a container");const i=this.container;if(!this.stateMachine.canTransition("initialize"))throw new Error(`Cannot initialize terminal in state ${this.stateMachine.getState()}`);this.stateMachine.transition("initialize");try{this.isXtermOpened?I.warn(`[initialize] XTerm already opened for terminal ${this.terminalId}, skipping open()`):(this.xterm.open(i),this.isXtermOpened=!0,I.info(`[initialize] XTerm opened for terminal ${this.terminalId}`)),this.themeManager.getCurrentTheme().isDark?this.loadWebglAddon():I.debug("[Renderer] Using Canvas renderer for light theme (better anti-aliasing)"),this.themeManager.applyTheme(this.xterm),this.fitTerminalToContainer()||(I.warn("Container has no dimensions, delaying fit"),setTimeout(()=>{this.fitTerminalToContainer()},100)),this.setupResizeObserver(),this.setupXTermEventHandlers(),this.setupThemeChangeListener();const r=this.xterm.cols,n=this.xterm.rows,o=await this.findBackendTerminal(),a=o!==null;if(!e)if(a)try{const l=await this.terminals.getBuffer(this.terminalId,void 0,this.workspaceId);l&&(I.info(`Restoring ${l.length} bytes of buffered output from backend`),this.xterm.write(l),this.parseTerminalOutput(l))}catch(l){I.warn("Could not restore terminal buffer from backend:",l)}else{const l=await this.bufferManager.restoreBuffer();l&&(I.info("Restoring terminal buffer from local storage"),this.restoreFromSnapshot(l))}this.startBufferAutoSave(),this.stateMachine.transition("connect"),a?(this.setupIpcEventHandlers(),this.stateMachine.transition("connected"),this.resize(r,n),o?.isExecuting===!1&&this.hideCursorOnExit(),this.callbacks.onReady?.()):(I.debug(`[initialize] Terminal ${this.terminalId} creating new PTY`),await this.openPtyConnection(r,n)),requestAnimationFrame(()=>{!this.isDisposed&&this.isVisible&&this.xterm.focus()})}catch(s){throw this.stateMachine.reportError(s),s}}async openPtyConnection(e,i){try{const s=await this.terminals.create({workspaceId:this.workspaceId,cols:e,rows:i});if(!s.success)throw new Error(s.error||Fs.terminal_adapter_openFailed_error());s.id&&(this.terminalId=s.id),this.setupIpcEventHandlers(),this.stateMachine.transition("connected"),this.restoreCursor(),this.callbacks.onReady?.()}catch(s){throw this.stateMachine.reportError(s),s}}async findBackendTerminal(){try{const{terminals:e}=await this.terminals.list(this.workspaceId);return e.find(i=>i.id===this.terminalId)??null}catch(e){return I.warn("Could not check terminal existence:",e),null}}async terminalExistsOnBackend(){return await this.findBackendTerminal()!==null}hideCursorOnExit(){this.isDisposed||(this.xterm.options.cursorBlink=!1,this.xterm.write("\x1B[?25l"))}restoreCursor(){this.isDisposed||(this.xterm.options.cursorBlink=!0,this.xterm.write("\x1B[?25h"))}setupXTermEventHandlers(){this.container&&(this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.resizeDisposable&&(this.resizeDisposable.dispose(),this.resizeDisposable=null),this.selectionDisposable&&(this.selectionDisposable.dispose(),this.selectionDisposable=null),this.xterm.attachCustomKeyEventHandler(e=>{const i=navigator.platform.toUpperCase().includes("MAC"),s=i?e.metaKey:e.ctrlKey;return e.metaKey&&e.key==="k"&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&this.clear(),!1):s&&e.key==="j"&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&Mt.dispatch(An(this.workspaceId)),!1):s&&e.key==="f"&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&this.callbacks.onToggleSearch?.(),!1):s&&(e.key==="t"||e.key==="T")&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&Ui("workspace:new-terminal",{workspaceId:this.workspaceId}),!1):s&&(e.key==="w"||e.key==="W")&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&Mt.dispatch(Hh(this.workspaceId)),!1):Uf(e,Mt.state.userPreferences?.shortcutOverrides??{},i)||s&&e.shiftKey&&!e.altKey&&(e.key==="]"||e.key==="}"||e.key==="["||e.key==="{")?!1:e.ctrlKey&&!e.metaKey&&!e.altKey&&(e.key==="`"||e.key==="~")?(e.type==="keydown"&&(e.shiftKey||e.key==="~"?Ui("workspace:new-terminal",{workspaceId:this.workspaceId}):Mt.dispatch(An(this.workspaceId))),!1):!0}),this.dataDisposable=this.xterm.onData(e=>{this.isDisposed||this.write(e)}),this.resizeDisposable=this.xterm.onResize(({cols:e,rows:i})=>{!this.isDisposed&&this.stateMachine.canAcceptInput()&&this.resize(e,i)}),this.selectionDisposable=this.xterm.onSelectionChange(()=>{}))}setupIpcEventHandlers(){this.ipcCleanup&&(this.ipcCleanup(),this.ipcCleanup=null);let e=!1;const i=this.terminals.subscribeEvents(this.terminalId,{onData:({chunk:s})=>{e||this.isDisposed||this.stateMachine.canAcceptInput()&&(this.xterm.write(s),this.parseTerminalOutput(s))},onExit:({exitCode:s})=>{e||this.isDisposed||(this.exitedNormally=!0,this.hideCursorOnExit(),this.callbacks.onExit?.(s),this.stateMachine.transition("disconnect"))},onCwd:({cwd:s})=>{e||this.isDisposed||(this.lastCwd=s,this.callbacks.onCwdChanged?.(s))}},this.workspaceId);this.ipcCleanup=()=>{e=!0;try{i()}catch(s){I.warn("Failed to unsubscribe terminal events:",s)}}}setupResizeObserver(){if(!this.container||!this.isVisible)return;const e=this.container;this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null),this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=setTimeout(()=>{this.fitTerminalToContainer()},100)}),this.resizeObserver.observe(e),this.setupVisibilityObserver()}setupVisibilityObserver(){if(!this.container)return;const e=this.container;this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.visibilityObserver=new IntersectionObserver(i=>{for(const s of i){const r=s.isIntersecting;r&&!this.wasVisible&&(I.debug(`[visibility] Terminal ${this.terminalId} became visible, reconnecting ResizeObserver`),this.resizeObserver||(this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=setTimeout(()=>{this.fitTerminalToContainer()},100)}),this.resizeObserver.observe(e)),this.fitTerminalToContainer()),this.wasVisible=r}}),this.visibilityObserver.observe(e)}loadWebglAddon(){this.disposeWebglAddon();try{this.webglAddon=new X_,this.xterm.loadAddon(this.webglAddon);const e=this.xterm.element?.querySelector("canvas");if(e){const i=s=>{s.preventDefault(),I.warn(`[WebGL] Context lost for terminal ${this.terminalId}, recovering...`),!this.isDisposed&&(this.disposeWebglAddon(),setTimeout(()=>{if(this.isDisposed)return;if(!this.themeManager.getCurrentTheme().isDark){I.info("[WebGL] Skipping WebGL recovery on light theme, using Canvas renderer");return}if(this.webglRecoveryAttempts>=Ae.MAX_WEBGL_RECOVERY_ATTEMPTS){I.warn(`[WebGL] Max recovery attempts (${Ae.MAX_WEBGL_RECOVERY_ATTEMPTS}) reached for terminal ${this.terminalId}, staying on Canvas renderer`);return}this.webglRecoveryAttempts++;try{this.loadWebglAddon(),I.info(`[WebGL] Successfully recovered from context loss (attempt ${this.webglRecoveryAttempts})`)}catch(n){I.warn("[WebGL] Failed to recover from context loss, falling back to Canvas renderer:",n),this.webglAddon=null}},100))};e.addEventListener("webglcontextlost",i),this.webglContextLostCleanup=()=>{e.removeEventListener("webglcontextlost",i)}}}catch(e){I.warn("Failed to load WebGL renderer, falling back to Canvas renderer:",e),this.webglAddon=null}}disposeWebglAddon(){if(this.webglContextLostCleanup&&(this.webglContextLostCleanup(),this.webglContextLostCleanup=null),this.webglAddon){try{this.webglAddon.dispose()}catch(e){I.warn("Error disposing WebGL addon:",e)}this.webglAddon=null}}setupThemeChangeListener(){this.themeCleanup&&(this.themeCleanup(),this.themeCleanup=null);const e=i=>{const s=i.detail?.theme;s&&this.xterm&&(I.info(`[Theme] Theme changed to: ${s.name} (isDark: ${s.isDark})`),this.themeManager.applyTheme(this.xterm,s),s.isDark?this.webglAddon||this.loadWebglAddon():this.webglAddon&&(this.disposeWebglAddon(),I.info("[WebGL] Disposed WebGL addon for light theme (using Canvas renderer)")))};window.addEventListener("terminal-theme-changed",e),this.themeCleanup=()=>{window.removeEventListener("terminal-theme-changed",e)}}parseTerminalOutput(e){Ii.onOutput(this.terminalId,this.workspaceId,e),e.includes("\x1B]133;C\x07")?(this.isExecuting&&(this.isExecuting=!1,this.callbacks.onCommandFinished?.(),Ii.onCommandFinish(this.terminalId,this.workspaceId)),this.commandBuffer="",this.isAtPrompt=!0):e.includes("\x1B]133;A\x07")&&(this.isExecuting||(this.isExecuting=!0,this.callbacks.onCommandStart?.()),this.isAtPrompt=!0,this.commandBuffer="");const i=/[\$%]\s*$/,s=/^.*[\$%]\s+(.+)$/,r=e.split(/\r?\n/);for(const o of r){const a=o.replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b\][^\x07]*\x07/g,"").replace(/\x1b\][^\x1b]*\x1b\\/g,"").replace(/\x1b[()][AB0-2]/g,"").replace(/\x1b[=>]/g,"").replace(/\x1b[78]/g,"").replace(/\x1b[DME]/g,"").replace(/\x1b[HZ]/g,"").replace(/\x1b[c]/g,"").replace(/\[\?[0-9;]*[a-zA-Z]/g,"").replace(/\x07/g,"").replace(/\x00-\x08\x0b\x0c\x0e-\x1f/g,"").trim();if(!a||/^\[[\?0-9;]*[a-zA-Z]$/.test(a))continue;const l=a.match(s);if(l&&l[1]){const h=l[1].trim(),c=/^[a-zA-Z0-9.\/~]/.test(h);h.length>0&&!this.isExecuting&&c?(I.info(`[TerminalAdapter] Detected command from output: ${Ut(h)}`),Ii.onCommandStart(this.terminalId,this.workspaceId,h),this.isExecuting=!0,this.callbacks.onCommandStart?.()):h.length>0&&!c&&I.debug(`[TerminalAdapter] Skipping suspicious command detection: ${Ut(h)}`)}i.test(a)&&!l&&(this.isExecuting&&(this.isExecuting=!1,this.callbacks.onCommandFinished?.(),Ii.onCommandFinish(this.terminalId,this.workspaceId),I.debug(`[TerminalAdapter] Command finished, prompt detected: ${Ut(a)}`)),this.isAtPrompt=!0,this.commandBuffer="")}const n=e.match(/\x1b\]7;file:\/\/[^/]*([^\x07]*)\x07/);if(n){const o=decodeURIComponent(n[1]);o!==this.lastCwd&&(this.lastCwd=o,this.callbacks.onCwdChanged?.(o))}}startBufferAutoSave(){this.bufferSaveTimer=setInterval(()=>{this.stateMachine?.canAcceptInput()&&this.saveBuffer()},5e3)}async saveBuffer(){try{const e=this.xterm.buffer.active,i=[];for(let s=0;s<e.length;s++){const r=e.getLine(s);r&&i.push(r.translateToString(!0))}await this.bufferManager.saveBuffer(i,e.cursorX,e.cursorY)}catch(e){I.error("Failed to save buffer:",e)}}restoreFromSnapshot(e){if(e.lines&&e.lines.length>0){this.xterm.clear();const i=[...e.lines];for(;i.length>0&&i[i.length-1].trim()==="";)i.pop();const s=/[\$>#%]\s*$/,r=/@[\w-]+/;if(i.length>0){const n=i[i.length-1],o=i.length>1?i[i.length-2]:"";if(s.test(n)&&r.test(n))i.pop();else if(s.test(n)&&n.trim().length<80)i.pop(),i.length>0&&r.test(i[i.length-1])&&i.pop();else if(i.length>=2){const a=o+n;s.test(a)&&r.test(a)&&(i.pop(),i.pop())}}for(let n=0;n<i.length;n++)n<i.length-1?this.xterm.writeln(i[n]):i[n].trim()&&this.xterm.writeln(i[n]);I.debug(`Restored terminal buffer for ${this.terminalId} with ${i.length} lines (prompt removed)`)}}getCommandFromXtermBuffer(){try{const e=this.xterm.buffer.active,i=e.cursorY+e.baseY,s=e.getLine(i);if(!s)return null;const r=s.translateToString(!0);if(!r||!r.trim())return null;const n=r.replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b\][^\x07]*\x07/g,"").replace(/\x1b[()][AB0-2]/g,"").replace(/\x07/g,"").trim();if(!n)return null;const o=n.match(/^.*[\$%#❯➜]\s+(.+)$/);return o&&o[1]?o[1].trim():null}catch{return null}}write(e){if(!(this.isDisposed||!this.stateMachine.canAcceptInput())){if(e==="\r"||e===`
|
|
142
142
|
`){const i=this.getCommandFromXtermBuffer(),s=i||this.commandBuffer.trim();s&&(Ii.onCommandStart(this.terminalId,this.workspaceId,s),this.isExecuting=!0,I.debug(`Command executed: ${Ut(s)}${i?" (from xterm buffer)":" (from keystroke buffer)"}`)),this.commandBuffer="",this.currentLineBuffer=""}else e===""||e==="\b"?this.commandBuffer.length>0&&(this.commandBuffer=this.commandBuffer.slice(0,-1)):e===""?(this.commandBuffer="",this.currentLineBuffer=""):e===""?(this.commandBuffer="",this.currentLineBuffer=""):e.match(/[\x00-\x1F\x7F]/)||(this.commandBuffer+=e,this.currentLineBuffer+=e);this.terminals.write(this.terminalId,e,this.workspaceId).then(i=>{i.success||I.error(`[write] Terminal ${this.terminalId}: write failed - ${i.error}`)}).catch(i=>{I.error(`[write] Terminal ${this.terminalId}: transport error - ${i}`),this.isDisposed||this.stateMachine.reportError(i)})}}resize(e,i){this.isDisposed||!this.stateMachine.canAcceptInput()||this.terminals.resize(this.terminalId,e,i,this.workspaceId).catch(s=>{I.error("Failed to resize terminal:",s)})}focus(){!this.isDisposed&&this.isVisible&&this.xterm.focus()}blur(){this.isDisposed||this.xterm.blur()}setVisible(e){if(!(this.isDisposed||this.isVisible===e)){if(this.isVisible=e,this.wasVisible=e,!e){this.xterm.blur(),this.disconnectLayoutObservers();return}this.setupResizeObserver(),requestAnimationFrame(()=>this.fitTerminalToContainer())}}fitTerminalToContainer(){if(this.isDisposed||!this.isVisible||!this.container)return!1;const{width:e,height:i}=this.container.getBoundingClientRect();return e<=0||i<=0?!1:(this.lastFittedSize?.width===e&&this.lastFittedSize.height===i||(this.fitAddon.fit(),this.lastFittedSize={width:e,height:i}),!0)}disconnectLayoutObservers(){this.resizeObserver?.disconnect(),this.resizeObserver=null,this.visibilityObserver?.disconnect(),this.visibilityObserver=null,this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null)}fitAfterReattach(e){if(this.cancelReattachFit(),this.fitReattachedContainer(e))return;const i=new ResizeObserver(()=>{if(this.reattachFitObserver!==i){i.disconnect();return}this.hasReattachedContainerBox(e)&&(this.reattachFitTimer&&clearTimeout(this.reattachFitTimer),this.reattachFitTimer=setTimeout(()=>{this.reattachFitTimer=null,this.fitReattachedContainer(e)&&this.cancelReattachFit()},Vf))});this.reattachFitObserver=i,i.observe(e)}fitReattachedContainer(e){if(this.isDisposed||this.container!==e)return!0;if(!this.hasReattachedContainerBox(e))return!1;const{width:i,height:s}=e.getBoundingClientRect();return this.fitAddon.fit(),this.lastFittedSize={width:i,height:s},this.xterm.refresh(0,this.xterm.rows-1),!0}hasReattachedContainerBox(e){if(!this.isVisible)return!1;const{width:i,height:s}=e.getBoundingClientRect();return i>0&&s>0}cancelReattachFit(){this.reattachFitObserver?.disconnect(),this.reattachFitObserver=null,this.reattachFitTimer&&(clearTimeout(this.reattachFitTimer),this.reattachFitTimer=null)}clear(){this.isDisposed||this.xterm.clear()}async reattach(e){if(this.isDisposed||this.stateMachine.isDisposed())throw new Error("Cannot reattach disposed terminal");this.cancelAutoReconnect(),this.autoReconnectAttempts=0,this.webglRecoveryAttempts=0,this.exitedNormally=!1,this.setupIpcEventHandlers();const i=this.stateMachine.getState();if(i!==et.CONNECTED){I.info(`[reattach] Terminal ${this.terminalId} not in CONNECTED state (${i}), attempting to restore`);const n=await this.findBackendTerminal();n&&(i===et.DISCONNECTED||i===et.ERROR?(this.stateMachine.transition("reconnect"),this.stateMachine.transition("reconnected")):i===et.CONNECTING&&this.stateMachine.transition("connected"),n.isExecuting===!1&&this.hideCursorOnExit(),I.info(`[reattach] Terminal ${this.terminalId} state restored to ${this.stateMachine.getState()}`))}const s=this.xterm.element;if(s){e.appendChild(s),this.container=e,this.themeManager.setContainer(e),this.disposeWebglAddon(),this.themeManager.applyTheme(this.xterm),this.themeManager.getCurrentTheme().isDark?this.loadWebglAddon():I.debug("[Renderer] Using Canvas renderer after move (light theme)"),this.fitAfterReattach(e),this.setupResizeObserver(),this.setupXTermEventHandlers(),this.commandBuffer="",this.currentLineBuffer="",this.isAtPrompt=!1,this.startHeartbeat(),requestAnimationFrame(()=>{!this.isDisposed&&this.isVisible&&this.xterm.focus()});return}I.warn(`Could not move terminal element, recreating for terminal ${this.terminalId}`),this.container&&(this.container.innerHTML=""),this.disposeWebglAddon(),this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.container=e,this.themeManager.setContainer(e),this.isXtermOpened&&I.warn(`[reattach] XTerm was already opened for terminal ${this.terminalId}, calling open() again may cause duplicate handlers`),this.xterm.open(e),this.isXtermOpened=!0,this.themeManager.applyTheme(this.xterm),this.themeManager.getCurrentTheme().isDark?this.loadWebglAddon():I.debug("[Renderer] Using Canvas renderer on reattach (light theme)"),this.fitAfterReattach(e),this.setupXTermEventHandlers(),this.setupResizeObserver(),this.commandBuffer="",this.currentLineBuffer="",this.isAtPrompt=!1,this.startHeartbeat(),requestAnimationFrame(()=>{!this.isDisposed&&this.isVisible&&this.xterm.focus()})}updateCallbacks(e){Object.assign(this.callbacks,e)}updateFontFamily(e){this.isDisposed||this.xterm.options.fontFamily!==e&&(this.xterm.options.fontFamily=e)}findNext(e,i){return this.searchAddon.findNext(e,{caseSensitive:i?.caseSensitive??!1,wholeWord:i?.wholeWord??!1,regex:i?.regex??!1,incremental:!1,decorations:this.getSearchDecorations()})}findPrevious(e,i){return this.searchAddon.findPrevious(e,{caseSensitive:i?.caseSensitive??!1,wholeWord:i?.wholeWord??!1,regex:i?.regex??!1,incremental:!1,decorations:this.getSearchDecorations()})}clearSearch(){this.searchAddon.clearDecorations()}getSelection(){return this.xterm.getSelection()}getInfo(){const e=this.bufferManager.getStats();return{id:this.terminalId,workspaceId:this.workspaceId,state:this.stateMachine.getState(),cwd:this.lastCwd,isExecuting:this.isExecuting,stats:e?{bufferSize:e.size,lineCount:e.lineCount,uptime:Date.now()-this.startTime}:void 0}}startHeartbeat(){this.heartbeatTimer||this.isDisposed||(I.debug(`[heartbeat] Starting for terminal ${this.terminalId} (every ${Ae.HEARTBEAT_INTERVAL_MS}ms)`),this.heartbeatTimer=setInterval(()=>{this.performHealthCheck()},Ae.HEARTBEAT_INTERVAL_MS))}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null,I.debug(`[heartbeat] Stopped for terminal ${this.terminalId}`))}async performHealthCheck(){if(this.isDisposed||!this.ipcCleanup||this.stateMachine.getState()!==et.CONNECTED)return;let e=null;try{const i=await Promise.race([this.terminalExistsOnBackend(),new Promise((s,r)=>{e=setTimeout(()=>r(new Error("Heartbeat timeout")),Ae.HEARTBEAT_TIMEOUT_MS)})]);if(e&&clearTimeout(e),this.isDisposed)return;i||(I.warn(`[heartbeat] Terminal ${this.terminalId}: PTY not found on backend, transitioning to DISCONNECTED`),this.stopHeartbeat(),this.stateMachine.transition("disconnect"))}catch(i){if(e&&clearTimeout(e),this.isDisposed)return;I.warn(`[heartbeat] Terminal ${this.terminalId}: health check failed:`,i),this.stopHeartbeat(),this.stateMachine.transition("disconnect")}}scheduleAutoReconnect(){if(this.isDisposed)return;if(this.autoReconnectAttempts>=Ae.MAX_RECONNECT_ATTEMPTS){I.warn(`[auto-reconnect] Terminal ${this.terminalId}: max reconnect attempts (${Ae.MAX_RECONNECT_ATTEMPTS}) reached, giving up`);return}this.cancelAutoReconnect();const e=Ae.BASE_RECONNECT_DELAY_MS*Math.pow(2,this.autoReconnectAttempts);this.autoReconnectAttempts++,I.info(`[auto-reconnect] Terminal ${this.terminalId}: scheduling attempt ${this.autoReconnectAttempts}/${Ae.MAX_RECONNECT_ATTEMPTS} in ${e}ms`),this.autoReconnectTimer=setTimeout(()=>{this.autoReconnectTimer=null,this.attemptAutoReconnect()},e)}cancelAutoReconnect(){this.autoReconnectTimer&&(clearTimeout(this.autoReconnectTimer),this.autoReconnectTimer=null)}async attemptAutoReconnect(){if(this.isDisposed)return;const e=this.stateMachine.getState();if(e!==et.DISCONNECTED&&e!==et.ERROR){I.debug(`[auto-reconnect] Terminal ${this.terminalId}: skipping, state is ${e}`);return}this.exitedNormally=!1,I.info(`[auto-reconnect] Terminal ${this.terminalId}: attempting reconnect (attempt ${this.autoReconnectAttempts})`);try{const i=await this.findBackendTerminal();if(this.isDisposed)return;i?(I.info(`[auto-reconnect] Terminal ${this.terminalId}: PTY exists on backend, re-establishing connection`),this.setupIpcEventHandlers(),this.stateMachine.transition("reconnect"),this.stateMachine.transition("reconnected"),this.xterm.cols&&this.xterm.rows&&this.resize(this.xterm.cols,this.xterm.rows),i.isExecuting===!1&&this.hideCursorOnExit(),this.callbacks.onReady?.(),I.info(`[auto-reconnect] Terminal ${this.terminalId}: reconnected successfully`)):(I.info(`[auto-reconnect] Terminal ${this.terminalId}: PTY not found, creating new PTY`),await this.reconnect(),I.info(`[auto-reconnect] Terminal ${this.terminalId}: new PTY created successfully`))}catch(i){I.error(`[auto-reconnect] Terminal ${this.terminalId}: attempt ${this.autoReconnectAttempts} failed:`,i),this.scheduleAutoReconnect()}}handleError(e){I.error(`Terminal ${this.terminalId} error:`,e),this.callbacks.onError?.(e),this.isDisposed||this.xterm.writeln(`\r
|
|
143
143
|
\x1B[31m${Fs.terminal_adapter_errorLine_label({message:e.message})}\x1B[0m\r
|
|
144
|
-
`)}handleLinkClick(e){try{if(Wh(e)){I.debug("GitHub URL detected in terminal, opening in external browser",{uri:e,workspaceId:this.workspaceId}),Ns("shell:openExternal",{url:e});return}Bn(async()=>{const{resolveBrowserLinkForOpen:i}=await import("./
|
|
144
|
+
`)}handleLinkClick(e){try{if(Wh(e)){I.debug("GitHub URL detected in terminal, opening in external browser",{uri:e,workspaceId:this.workspaceId}),Ns("shell:openExternal",{url:e});return}Bn(async()=>{const{resolveBrowserLinkForOpen:i}=await import("./9taqgPH1.js").then(s=>s.b);return{resolveBrowserLinkForOpen:i}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]),import.meta.url).then(({resolveBrowserLinkForOpen:i})=>i(e)).catch(()=>({url:e})).then(i=>{Bn(async()=>{const{getPanelLayoutManager:s}=await import("./Fb6bTqJy.js").then(r=>r.p);return{getPanelLayoutManager:s}},__vite__mapDeps([27,17,18,3,19,20,5,7,4,21,13,2,28,29]),import.meta.url).then(({getPanelLayoutManager:s})=>{s(this.workspaceId).openBrowserPanel(i.url,void 0,void 0,i.requestedUrl),I.debug("Opened URL in browser panel",{uri:e,resolvedUrl:i.url,workspaceId:this.workspaceId})}).catch(s=>{I.warn("Failed to open URL in browser panel, falling back to external browser",{uri:e,error:s}),Ns("shell:openExternal",{url:i.url})})})}catch(i){I.warn("Failed to handle link click",{uri:e,error:i}),Ns("shell:openExternal",{url:e})}}async reconnect(){if(this.isDisposed)throw new Error("Cannot reconnect disposed terminal");if(!this.stateMachine.canTransition("reconnect"))throw new Error(`Cannot reconnect in state ${this.stateMachine.getState()}`);this.exitedNormally=!1,this.stateMachine.transition("reconnect");try{const e=this.xterm.cols,i=this.xterm.rows,s=await this.terminals.create({workspaceId:this.workspaceId,cols:e,rows:i});if(!s.success)throw new Error(s.error||Fs.terminal_adapter_reconnectFailed_error());s.id&&(this.terminalId=s.id),this.setupIpcEventHandlers(),this.stateMachine.transition("reconnected"),this.restoreCursor(),this.callbacks.onReady?.()}catch(e){throw this.stateMachine.reportError(e),e}}detach(){this.ipcCleanup&&(this.ipcCleanup(),this.ipcCleanup=null),this.stopHeartbeat(),this.cancelAutoReconnect(),this.cancelReattachFit(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null);const e=this.xterm.element;e&&e.parentNode&&e.parentNode.removeChild(e),this.themeManager.setContainer(null),this.container=null}dispose(e={}){if(!(this.isDisposed||this.stateMachine.isDisposed())){if(this.isDisposed=!0,this.cancelAutoReconnect(),this.stopHeartbeat(),this.cancelReattachFit(),this.stateMachine.transition("dispose"),this.saveBuffer().catch(()=>{}),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null),this.bufferSaveTimer&&(clearInterval(this.bufferSaveTimer),this.bufferSaveTimer=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.dataDisposable){try{this.dataDisposable.dispose()}catch(i){I.error("Error disposing data handler:",i)}this.dataDisposable=null}if(this.resizeDisposable){try{this.resizeDisposable.dispose()}catch(i){I.error("Error disposing resize handler:",i)}this.resizeDisposable=null}if(this.selectionDisposable){try{this.selectionDisposable.dispose()}catch(i){I.error("Error disposing selection handler:",i)}this.selectionDisposable=null}if(this.ipcCleanup){try{this.ipcCleanup()}catch(i){I.error("Error cleaning up IPC handlers:",i)}this.ipcCleanup=null}if(this.themeCleanup){try{this.themeCleanup()}catch(i){I.error("Error cleaning up theme listener:",i)}this.themeCleanup=null}this.eventListeners.forEach(i=>{try{i()}catch(s){I.error("Error cleaning up event listener:",s)}}),this.eventListeners=[],e.killPty!==!1&&this.terminals.kill(this.terminalId,this.workspaceId).catch(i=>{I.error("Error killing PTY connection:",i)});try{this.searchAddon?.dispose&&this.searchAddon.dispose(),this.webLinksAddon?.dispose&&this.webLinksAddon.dispose(),this.disposeWebglAddon(),this.fitAddon?.dispose&&this.fitAddon.dispose()}catch(i){I.error("Error disposing addons:",i)}try{this.themeManager.dispose()}catch(i){I.error("Error disposing theme manager:",i)}try{this.stateMachine.dispose()}catch(i){I.error("Error disposing state machine:",i)}Wf(this.xterm,i=>{I.error("Error disposing xterm:",i)})}}};P(Ae,"MAX_RECONNECT_ATTEMPTS",5),P(Ae,"BASE_RECONNECT_DELAY_MS",1e3),P(Ae,"HEARTBEAT_INTERVAL_MS",3e4),P(Ae,"HEARTBEAT_TIMEOUT_MS",1e4),P(Ae,"MAX_WEBGL_RECOVERY_ATTEMPTS",3);let dn=Ae;const le=new ji("TerminalManager");class Gf{constructor(){P(this,"terminals",new Map)}saveTerminalMetadata(e,i,s){try{Mt.dispatch(Uh(i,e,s,new Date().toISOString())),le.debug(`[RendererTerminalManager] Saved terminal metadata for ${e}`)}catch(r){le.error("[RendererTerminalManager] Failed to save terminal metadata:",r)}}loadTerminalMetadata(e){try{return Xh.select(Mt.state,e).map(i=>({terminalId:i.id,workspaceId:i.workspaceId??e,createdAt:i.createdAt??"",title:i.customName||jh(i.name)}))}catch(i){le.error("[RendererTerminalManager] Failed to load terminal metadata:",i)}return[]}removeTerminalMetadata(e,i){try{Mt.dispatch(Kh(i,e)),le.debug(`[RendererTerminalManager] Removed terminal metadata for ${e}`)}catch(s){le.error("[RendererTerminalManager] Failed to remove terminal metadata:",s)}}hasTerminal(e){return this.terminals.has(e)}async getOrCreateTerminal(e,i,s,r,n=!1){let o=this.terminals.get(e);if(n&&o&&(le.info(`[RendererTerminalManager] Force creating new terminal, disposing existing: ${e}`),this.disposeTerminal(e),o=void 0),o)if(o.workspaceId!==i)le.warn(`[RendererTerminalManager] Terminal ${e} has mismatched workspaceId (has: ${o.workspaceId}, requested: ${i}). Disposing and recreating.`),this.disposeTerminal(e),o=void 0;else return le.info(`[RendererTerminalManager] Reattaching to existing terminal: ${e} (was attached: ${o.isAttached})`),o.container=s,o.isAttached=!0,await o.adapter.reattach(s),r&&(o.adapter.updateCallbacks(r),r.onReady?.()),le.info(`[RendererTerminalManager] Successfully reattached terminal: ${e}`),o.adapter;le.info(`[RendererTerminalManager] Creating new terminal: ${e}`);const a=new dn({workspaceId:i,terminalId:e,container:s,...r});return o={adapter:a,terminalId:e,workspaceId:i,isAttached:!0,container:s},this.terminals.set(e,o),this.saveTerminalMetadata(e,i),await a.initialize(n),a}isAttachedTo(e,i){const s=this.terminals.get(e);return!!s&&s.isAttached&&s.container===i}detachTerminal(e,i){const s=this.terminals.get(e);if(s){if(i&&s.container!==i){le.info(`[RendererTerminalManager] Ignoring detach from a stale surface: ${e}`);return}le.info(`[RendererTerminalManager] Detaching terminal: ${e}`),s.isAttached=!1,s.adapter.detach(),s.container=null}}disposeTerminal(e,i){const s=this.terminals.get(e);s?(le.info(`[RendererTerminalManager] Disposing terminal: ${e}`),s.adapter.dispose(),this.terminals.delete(e),this.removeTerminalMetadata(e,s.workspaceId)):Mt.dispatch(qh(e,i))}disposeExitedTerminal(e){const i=this.terminals.get(e);i&&(le.info(`[RendererTerminalManager] Disposing exited terminal: ${e}`),i.adapter.dispose({killPty:!1}),this.terminals.delete(e))}clearTerminal(e){const i=this.terminals.get(e);i&&(le.info(`[RendererTerminalManager] Clearing terminal: ${e}`),i.adapter.clear())}getTerminalInfo(e){const i=this.terminals.get(e);return i?i.adapter.getInfo():null}async getBufferContent(e,i){const s=this.terminals.get(e);if(s?.adapter)try{const r=s.adapter.xterm;if(r?.buffer?.active){const n=r.buffer.active,o=[];for(let a=0;a<n.length;a++){const l=n.getLine(a);l&&o.push(l.translateToString(!0))}for(;o.length>0&&!o[o.length-1].trim();)o.pop();if(o.length>0)return o.join(`
|
|
145
145
|
`)}}catch(r){le.warn("[RendererTerminalManager] Failed to read live buffer, falling back:",r)}try{const n=await new Ds(i,e).restoreBuffer();if(n&&n.lines.length>0){const o=[...n.lines];for(;o.length>0&&!o[o.length-1].trim();)o.pop();return o.join(`
|
|
146
146
|
`)}}catch(r){le.error("[RendererTerminalManager] Failed to read persisted buffer:",r)}return null}disposeWorkspaceTerminals(e){const i=[];for(const[s,r]of this.terminals)r.workspaceId===e&&i.push(s);if(i.length>0){le.info(`[RendererTerminalManager] Disposing ${i.length} terminals for workspace ${e}`);for(const s of i)try{const r=this.terminals.get(s);r&&(r.adapter.dispose(),this.terminals.delete(s))}catch(r){le.error(`[RendererTerminalManager] Failed to dispose terminal ${s}:`,r)}}}disposeAll(){le.info(`[RendererTerminalManager] Disposing all ${this.terminals.size} terminals`);for(const[e,i]of this.terminals)try{i.adapter.dispose()}catch(s){le.error(`[RendererTerminalManager] Failed to dispose terminal ${e}:`,s)}this.terminals.clear()}}typeof window<"u"&&!window.__terminalManager&&(window.__terminalManager=new Gf);const Yf=window.__terminalManager,Ip=Object.freeze(Object.defineProperty({__proto__:null,terminalManager:Yf},Symbol.toStringTag,{value:"Module"}));export{nu as D,fu as L,ln as T,Wf as a,Yf as b,Ip as c,Op as d,hu as o,Ut as s,Ii as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as W}from"./
|
|
1
|
+
import{I as W}from"./Cw26kBCe.js";import{p as X}from"./DacYbmEF.js";import{b0 as z,a_ as G,aZ as Y,Y as P,U as F,V as Z,b as g,q as N,ay as A,aX as q,B as U,W as E,r as j,aV as J,a0 as K,O as Q,aO as ee}from"./BOY33UBS.js";import{p as te}from"./CFXA-WTd.js";var L=/[─━│┃└┗├┣]/,D=/[└┗├┣]/,ne=/[─━]/,V=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,$=/^\s*%%/,re=" ";function _(n){return n.some(t=>L.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=D.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
|
|
2
2
|
`),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p<t.length;p++){const c=t[p];c.trim()===""||$.test(c)||T.test(c)||V.test(c)||s.push(c.replace(/\t/g," "))}if(!_(s))return{text:n,lineMap:e};const i=M(s),o=[];let a=0;for(let p=0;p<=r;p++)o.push(t[p]),a++,e.set(a,p+1);for(let p=r+1;p<t.length;p++){const c=t[p],d=c.trim(),h=p+1;if(d===""){o.push(c),a++,e.set(a,h);continue}if($.test(c)){o.push(c),a++,e.set(a,h);continue}if(T.test(c)){o.push(c),a++,e.set(a,h);continue}if(V.test(c))continue;const l=c.replace(/\t/g," "),w=D.exec(l);if(w?.index!==void 0){const f=w.index,m=Math.round(f/i)+1;let u=f+1;for(;u<l.length&&ne.test(l[u]);)u++;for(;u<l.length&&l[u]===" ";)u++;const v=l.slice(u).trimEnd();if(!v)throw new Error(`Line ${h}: Empty node — expected a filename or directory name after the box-drawing prefix`);const O=re.repeat(m);o.push(O+v),a++,e.set(a,h)}else{if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;if(L.test(l))o.push(c),a++,e.set(a,h);else{if(/^\s+/.test(l))throw new Error(`Line ${h}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);o.push(c),a++,e.set(a,h)}}}return{text:o.join(`
|
|
3
3
|
`),lineMap:e}}g(R,"preprocessBoxDrawing");var x=new W(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ie=g(()=>{x.reset(),j()},"clear"),oe=g(()=>x.records.stack[0],"getRoot"),se=g(()=>x.records.cnt,"getCount"),ae=Q.treeView,ce=g(()=>N(ae,E().treeView),"getConfig"),le=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),de={clear:ie,addNode:le,getRoot:oe,getCount:se,getConfig:ce,getAccTitle:Z,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:z},I=de,he=g(n=>{X(n,I);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?J(c,E()):void 0;I.addNode(e,r,i,o,p,d)}},"populate"),pe={parse:g(async n=>{const{text:t,lineMap:e}=R(n);try{const r=await te("treeView",t);A.debug(r),he(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=S(r.message,e)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function H(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}g(H,"detectIcon");function C(n,t){return n.includes(":")?n:n in b.icons||!t?`${b.prefix}:${n}`:`${t}:${n}`}g(C,"qualifyIcon");function B(n,t){if(n.icon!=="none"){if(n.icon)return C(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=H(n.name,t);if(e==="none")return;if(e)return C(e,t.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}g(B,"getNodeIcon");ee([{name:b.prefix,icons:b}]);var y=14,ge=4,fe=16,ue=g(async(n,t)=>{const e=[],r=g(i=>{const o=B(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await K(i,{height:y,width:y})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=y+ge,c=B(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:w}=h.node().getBBox(),f=l+s.paddingY*2,m=n+s.paddingX+(d?p:0);h.attr("x",m),h.attr("y",t+f/2);const u=m+w,v=w+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:v,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),k=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),me=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,w)=>{const f=w*(l.rowIndent+l.paddingX),m=we(f,s,h,d,l,r);o.push(m);const{height:u,width:v}=h.BBox;k(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+v),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(m=>{p(m,h+1)});const{x:l,y:w,height:f}=d.BBox;if(d.children.length){const{y:m,height:u}=d.children[d.children.length-1].BBox;k(n,l+e.paddingX,w+f,l+e.paddingX,m+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+fe;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),xe=g(async(n,t,e,r)=>{A.debug(`Rendering treeView diagram
|
|
4
4
|
`+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=q(t),p=a.append("g");p.attr("class","tree-view");const c=await ue(i,o),{totalHeight:d,totalWidth:h}=me(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),U(a,d,h,o.useMaxWidth)},"draw"),ve={draw:xe},be=ve,Ie={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ce=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=N(Ie,n);return`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./
|
|
1
|
+
import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./BOY33UBS.js";import{b as Xt,l as Yt}from"./DFghII67.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&<[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+ft.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(L==Vt?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[L]||L,line:D.yylineno,loc:At,expected:ft})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+L);switch(B[0]){case 1:u.push(L),S.push(D.yytext),o.push(D.yylloc),u.push(B[1]),L=null,zt=D.yyleng,p=D.yytext,dt=D.yylineno,At=D.yylloc;break;case 2:if(N=this.productions_[B[1]][1],j.$=S[S.length-N],j._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},xi&&(j._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),wt=this.performAction.apply(j,[p,zt,dt,$.yy,B[1],S,o].concat(di)),typeof wt<"u")return wt;N&&(u=u.slice(0,-1*N*2),S=S.slice(0,-1*N),o=o.slice(0,-1*N)),u.push(this.productions_[B[1]][0]),S.push(j.$),o.push(j._$),Wt=lt[u[u.length-2]][u[u.length-1]],u.push(Wt);break;case 3:return!0}}return!0},"parse")},rt=(function(){var O={EOF:1,parseError:n(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:n(function(r,g){return this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var g=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),g=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t as D,bq as d,a_ as P,by as b,b as S}from"./
|
|
1
|
+
import{t as D,bq as d,a_ as P,by as b,b as S}from"./CNdlzZOD.js";import{bs as x,a7 as A,ay as C,W as M,bn as z,aA as m,aD as i,c9 as c}from"./DYhIMPy1.js";import{D as f,M as B}from"./BOY33UBS.js";import{S as N,p as R}from"./-ntpqjUQ.js";import{N as W}from"./CdlZ8r5v.js";import{Ig as $,uR as j,be as E}from"./BJpbRkma.js";import{x as J}from"./D6NxvjAo.js";import{a0 as K}from"./BsesepNZ.js";function O(l,s){if(new.target)return D({component:O,...l});x(s,!0);let o=d(s,"kind",7),t=d(s,"source",7),a=d(s,"workspaceId",7);const g=new W,u=c(()=>{if(o()==="mermaid")return null;const e=g.parseMarkdown(`\`\`\`ws-block:diagram
|
|
2
2
|
${t()}
|
|
3
3
|
\`\`\``)[0],r=e?.primitive.type==="diagram"?JSON.stringify(e.primitive):t();return R(r,!0)});function k(e,r){if(!a()||!r.target)return;const n={openInAdjacentPanel:e.metaKey||e.ctrlKey,sourcePanelId:e.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0};r.type==="file"?$.dispatch(j(a(),r.target,n)):r.type==="note"&&J(K(r.target,a()),{...n,workspaceId:E(a()),event:e})}var w={get kind(){return o()},set kind(e){o(e),m()},get source(){return t()},set source(e){t(e),m()},get workspaceId(){return a()},set workspaceId(e){a(e),m()},$set:b,$on:(e,r)=>S(s,e,r)},p=A(),y=C(p);{var I=e=>{f(e,{kind:"mermaid",rendererOwnsActions:!0,children:(r,n)=>{B(r,{get code(){return t()},showExportButton:!0})},$$slots:{default:!0}})},_=e=>{f(e,{kind:"custom",children:(r,n)=>{{let h=c(()=>i(u)?.diagram??null),v=c(()=>i(u)?.error);N(r,{get diagram(){return i(h)},get source(){return t()},get sourceError(){return i(v)},onBindingClick:k})}},$$slots:{default:!0}})};P(y,e=>{o()==="mermaid"?e(I):e(_,-1)})}return M(l,p),z(w)}export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gV as x,gB as B,Iu as E,Jf as G,tg as F,ua as z,zQ as D,zR as V,Is as $,It as H,zS as N}from"./
|
|
1
|
+
import{gV as x,gB as B,Iu as E,Jf as G,tg as F,ua as z,zQ as D,zR as V,Is as $,It as H,zS as N}from"./BJpbRkma.js";import{Q as f,o as Q,C as J,e as K,l as y,p as U,u as j,v as q}from"./1JDc8gDP.js";import{g as X}from"./D1ynivqZ.js";import{bo as l}from"./CNdlzZOD.js";import{b5 as Y,a9 as g}from"./DwkxcWNI.js";import{B as Z}from"./DrH3w3jB.js";import{g as M}from"./dinOFH6z.js";function W(e,t){const a=f.select(e.state),n=y.select(e.state);if(!n)return null;const c=a.indexOf(n),s=c+(t==="left"?-1:1),r=a[s];return c<0||!r?null:(e.dispatch(F(n,r,t==="left"?"before":"after")),n)}function A(e){const t=y.select(e);return t&&f.select(e).includes(t)?t:null}function w(e,t,a){const n=A(e.state),c=n?`/workspace/${n}`:X(e.state);return t!==c&&a(c),n}function ee(e,t,a,n){return e.dispatch(x(t)),w(e,a,n),t}function I(e,t){const n=t.match(/^\/workspace\/([^/]+)/)?.[1];return n?n==="new"?null:n:null}function v(e,t,a,n){if(a==="/")return O(e,t==="next"?0:"last",a,n);e.dispatch(t==="next"?$():H());const c=y.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return a!==s&&n(s),c}function te(e,t,a){const n=I(e,t);return n?ee(e,n,t,a):null}function ae(e,t,a){const n=I(e,t);if(!n)return null;const c=Q.select(e.state,n);if(!c)return null;const s=c.tabs.find(T=>T.id===c.activeTabId),r=c.tabs.length===0&&c.activeTabId===null,m=J.select(e.state,n)>1&&(r||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!m)return null;const h=a??M(n)?.availableCanvasWidth??void 0;return e.dispatch(B(n,void 0,h)),s?.id??c.id}function ne(e,t){const a=e.state.panelLayout.byWorkspaceId[t];return!a||a.restoreStatus==="pending"?!1:K.select(e.state,t).length===0}function oe(e,t,a){A(e.state)||e.dispatch(E(0)),w(e,t,a)}function C(e,t,{navigate:a,closeWindow:n}){return n?(n(),"window"):(w(e,t,a),null)}function ce(e,t,a){const n=I(e,t);return n?ae(e,t,a.availableCanvasWidth)!==null?"panel":ne(e,n)?(e.dispatch(x(n)),f.select(e.state).length>0?(oe(e,t,a.navigate),"workspace"):C(e,t,a)??"workspace"):null:f.select(e.state).length>0?null:C(e,t,a)}function se(e,t,a){return e.dispatch(N()),w(e,t,a)}function le(e,t,a){const n=t.match(/^\/workspace\/([^/]+)/),c=n&&n[1]!=="new"?n[1]:null,s=j.select(e.state),r=c?q.select(e.state,c):null;return c&&r&&(!s||r.closedAt>=s.closedAt)?r.kind==="column"?(e.dispatch(D(c)),"column"):(e.dispatch(V(c)),r.kind):s?(se(e,t,a),"workspace"):null}function re(e,t){const a=t.match(/^\/workspace\/([^/]+)/),n=a&&a[1]!=="new"?a[1]:null;if(!n)return null;const c=z(n);return e.dispatch(c),U.select(e.state,n)}function O(e,t,a,n){const c=f.select(e.state),s=t==="last"?c.length-1:t;return s<0||s>=c.length?null:(e.dispatch(E(s)),w(e,a,n))}function we({isMac:e,register:t,store:a,getCurrentPath:n,navigate:c,openNewWorkspace:s,onCreateAgent:r,onCreateNote:m,onCreateTerminal:h,onCreateBrowser:T,onWorkspaceTabMoved:S,closeWindow:L,resolveBinding:k}){const p=e?{meta:!0}:{ctrl:!0},P=Y("TOGGLE_SIDEBAR",e),b=o=>()=>o(n()),R=o=>()=>{const u=n().match(/^\/workspace\/([^/]+)/);u?.[1]&&u[1]!=="new"&&o(u[1])},i=o=>k?{binding:()=>k(o)}:{};t({...i("global.new-space"),...p,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),t({...i("panel.toggle-sidebar"),...P,global:!0,description:g.TOGGLE_SIDEBAR.label,action:()=>a.dispatch(G())}),t({...i("navigation.new-tab"),...p,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:b(o=>re(a,o))});for(const[o,u,_,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),r],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),m],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),h],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),T]])d&&t({...i(o),...p,key:u,alt:!0,global:!0,allowInTerminal:!0,description:_,action:R(d)});t({...i("navigation.close-tab"),...p,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:b(o=>ce(a,o,{navigate:c,closeWindow:L}))}),t({...i("navigation.close-space-tab"),...p,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:b(o=>te(a,o,c))}),t({...i("navigation.reopen-tab"),...p,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:b(o=>le(a,o,c))}),t({...i("navigation.move-space-tab-left"),...p,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:g.MOVE_SPACE_TAB_LEFT.label,action:()=>{const o=W(a,"left");o&&S?.({workspaceId:o,position:f.select(a.state).indexOf(o)+1})}}),t({...i("navigation.move-space-tab-right"),...p,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:g.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const o=W(a,"right");o&&S?.({workspaceId:o,position:f.select(a.state).indexOf(o)+1})}});for(const[o,u]of[["next",!1],["previous",!0]]){t({...i(o==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:u,global:!0,description:o==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:b(d=>v(a,o,d,c))});const _=o==="next"?"global.next-space-alt":"global.previous-space-alt";t({...i(_),...p,key:o==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!k||!Z(_,d,k,e),description:o==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:b(d=>v(a,o,d,c))})}for(let o=1;o<=9;o++)t({...k?{binding:()=>k("navigation.go-to-tab").replace(/([1-8])-9$/,String(o))}:{},...p,key:String(o),global:!0,description:o===1?l.home_navigation_description():o===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:o}),action:b(u=>o===1?c("/"):O(a,o===9?"last":o-2,u,c))})}export{ce as c,we as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as h,IH as w,r7 as S}from"./
|
|
1
|
+
import{_ as h,IH as w,r7 as S}from"./BJpbRkma.js";import{cd as E}from"./DYhIMPy1.js";const f="intent://pair";function T(t){const e=t.trim().toLowerCase();if(!e.startsWith(f))return!1;const n=e.charAt(f.length);return n===""||n==="?"||n==="/"||n==="#"}function H(t){const e=t.trim();if(!T(e))return null;let n;try{n=new URL(e.replace(/^intent:\/\//i,"http://"))}catch{return null}const a=n.searchParams,c=(a.get("host")??"").split(",").map(d=>d.trim()).filter(d=>d.length>0),s=a.get("port")?.trim()??"",i=/^\d+$/.test(s)?Number(s):NaN,o=Number.isInteger(i)&&i>0&&i<=65535?i:null,u=(a.get("fp")??a.get("certFingerprint"))?.trim()||null,l=a.get("token")?.trim()||null,m=a.get("tc")?.trim()||null,k=a.get("mode")?.trim().toLowerCase()==="node"?"node":null;return{hosts:c,port:o,fingerprint:u,token:l,tcAddress:m,modeHint:k}}function F(t){return t.trim().replace(/([?&]token=)[^&#]*/gi,"$1••••")}const _=["agent:started","agent:completed","agent:failed","agent:idle","agent:status-changed","task:created","task:status-changed","workspace:displayStatus-changed","workspace:attention-changed","pr:linked","pr:updated","pr:unlinked","git:commit","git:pull"],L="agent:delegated";function r(t){return typeof t=="string"&&t.length>0?t:void 0}function I(t,e){if(t==="agent:failed")return"err";if(t==="agent:status-changed"){const n=r(e.status)??"";return n==="error"||n==="failed"?"err":n==="completed"?"ok":w(n)==="running"?"info":"idle"}if(t==="agent:idle")return"idle";if(t==="agent:completed")return"ok";if(t==="task:created")return"info";if(t==="task:status-changed")return r(e.newStatus)==="complete"?"ok":"info";if(t==="workspace:displayStatus-changed"){const n=r(e.displayStatus);return n==="pr_merged"||n==="complete"?"ok":n==="pr_ready"||n==="pr_queued"||n==="pr_open"?"accent":n==="needs_attention"?"warn":n==="idle"||n==="not_started"?"idle":"info"}return t==="workspace:attention-changed"?S(r(e.attention)??"")?"warn":"info":t.startsWith("pr:")?"accent":"info"}function N(t,e){switch(t){case"agent:started":case"agent:completed":case"agent:idle":return"";case"agent:failed":return r(e.error)??"";case"agent:status-changed":return"";case"task:created":return r(e.noteTitle)??r(e.noteId)??"";case"task:status-changed":return[r(e.noteTitle)??r(e.noteId),r(e.newStatus)].filter(Boolean).join(" → ");case"workspace:displayStatus-changed":return"";case"workspace:attention-changed":return r(e.attention)??"";case"pr:linked":case"pr:updated":return[typeof e.prNumber=="number"?`#${e.prNumber}`:void 0,r(e.prStatus)].filter(Boolean).join(" ");case"pr:unlinked":return"";case"git:commit":return r(e.message)??r(e.commit)??"";case"git:pull":return r(e.branch)??"";default:return""}}const b=new Set(["idle","inactive"]);function A(t,e){if(t!=="agent:status-changed")return!1;const n=(r(e.status)??"").toLowerCase();return b.has(n)}function y(t,e){return t==="workspace:attention-changed"&&r(e.attention)===h}function P(t){const e=typeof t.type=="string"?t.type:"";if(!_.includes(e))return null;const n=r(t.id),a=r(t.timestamp),c=r(t.workspaceId);if(!n||!a||!c)return null;const s=t.data&&typeof t.data=="object"?t.data:{};if(A(e,s)||y(e,s))return null;const i={id:n,ts:a,colorClass:I(e,s),source:c,kind:e,text:N(e,s)};if(e.startsWith("agent:")){const o=r(s.agentId),u=r(s.agentName);if(o&&(i.agentId=o),u&&(i.agentName=u),e==="agent:status-changed"){const l=r(s.status);l&&(i.agentStatus=l)}}if(e==="workspace:displayStatus-changed"){const o=r(s.displayStatus);o&&(i.displayStatus=o)}return i}const g=new Set;function C(t){return g.add(t),()=>g.delete(t)}function R(t){for(const e of g)e(t)}const p=E(null),x={subscribe:p.subscribe};function B(t){p.set(t)}export{L as H,_ as a,F as b,R as e,T as i,P as m,C as o,H as p,B as s,x as t};
|