@intent-hq/web 2.378.0 → 2.379.0
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.CntaSdOs.css → 0.CTPF0Qlx.css} +1 -1
- package/web/app/immutable/chunks/{CI7RbtEr.js → -WAhkWcN.js} +1 -1
- package/web/app/immutable/chunks/{DrJzqwYl.js → 3LDzw5hr.js} +1 -1
- package/web/app/immutable/chunks/{BqwJFhy0.js → 3gy7b498.js} +1 -1
- package/web/app/immutable/chunks/{DxRn1b69.js → 5JKCI89x.js} +1 -1
- package/web/app/immutable/chunks/{Cha0m9_p.js → 7xVzJhz9.js} +3 -3
- package/web/app/immutable/chunks/{H1XKoyU7.js → 95fFKc_B.js} +1 -1
- package/web/app/immutable/chunks/{BiyXqzpr.js → 99N6trPd.js} +1 -1
- package/web/app/immutable/chunks/{Ct7u3x4Z.js → 9Oy7dzP1.js} +1 -1
- package/web/app/immutable/chunks/{BOjnK0ib.js → 9Wfd5HgS.js} +1 -1
- package/web/app/immutable/chunks/{C9q9AVLE.js → ASj4zc4i.js} +1 -1
- package/web/app/immutable/chunks/{CDK1PUhb.js → AX9GlL7f.js} +1 -1
- package/web/app/immutable/chunks/{D7x-7T1z.js → B-VOV29o.js} +1 -1
- package/web/app/immutable/chunks/{Bzs3gWUn.js → B-qkLMcw.js} +1 -1
- package/web/app/immutable/chunks/{CWdPByc8.js → B08HT3WC.js} +1 -1
- package/web/app/immutable/chunks/{DhZiRE53.js → B09v4S72.js} +1 -1
- package/web/app/immutable/chunks/{bWHoQAZ0.js → B0xk6zYz.js} +1 -1
- package/web/app/immutable/chunks/{BR7wr0TX.js → B1sTTKq-.js} +1 -1
- package/web/app/immutable/chunks/{B8vdzcge.js → B23p8GKo.js} +1 -1
- package/web/app/immutable/chunks/{DuKUDTXp.js → B2kxgCpF.js} +4 -4
- package/web/app/immutable/chunks/{FJwOmaJn.js → B5OCsMya.js} +1 -1
- package/web/app/immutable/chunks/{DHOJXRBs.js → B5qu4FK-.js} +1 -1
- package/web/app/immutable/chunks/{YCbY89i6.js → B5x8b2Md.js} +1 -1
- package/web/app/immutable/chunks/{BFBac69t.js → B61Vm2jJ.js} +1 -1
- package/web/app/immutable/chunks/{CMRXj5iU.js → B6ARnCFm.js} +1 -1
- package/web/app/immutable/chunks/{CYF61-VE.js → B7Mft14L.js} +3 -3
- package/web/app/immutable/chunks/{DNg21Y1b.js → B7QvV8MS.js} +1 -1
- package/web/app/immutable/chunks/{C_iKPxuE.js → B7pJ0oQN.js} +3 -3
- package/web/app/immutable/chunks/{D7wqIX40.js → B90WO3Nw.js} +1 -1
- package/web/app/immutable/chunks/{CqsHYBSd.js → B9QnX69E.js} +1 -1
- package/web/app/immutable/chunks/{Bjpdj-Rz.js → BAaqzMEP.js} +1 -1
- package/web/app/immutable/chunks/{D3e1peXC.js → BBibLZN0.js} +1 -1
- package/web/app/immutable/chunks/{B6IP3G-s.js → BDciodIO.js} +1 -1
- package/web/app/immutable/chunks/{BRHA9tcr.js → BED17zwc.js} +2 -2
- package/web/app/immutable/chunks/BEKwCWB-.js +1 -0
- package/web/app/immutable/chunks/{DwpTtGo9.js → BFHz4Mic.js} +4 -4
- package/web/app/immutable/chunks/{BKSCrb1m.js → BGpvxEza.js} +1 -1
- package/web/app/immutable/chunks/{RKhqePYS.js → BHl8a9sq.js} +1 -1
- package/web/app/immutable/chunks/{Dn1azdNN.js → BI0xIaK5.js} +1 -1
- package/web/app/immutable/chunks/{D1DuB8m6.js → BIpZTv4V.js} +1 -1
- package/web/app/immutable/chunks/{NppR00xP.js → BLp3-Mdk.js} +2 -2
- package/web/app/immutable/chunks/{D5n4bmLW.js → BMz9z95U.js} +1 -1
- package/web/app/immutable/chunks/{DPVg7jvq.js → BOIa3b7l.js} +1 -1
- package/web/app/immutable/chunks/{BGsL8K0y.js → BOVF8j6B.js} +1 -1
- package/web/app/immutable/chunks/{Y8mQJY9P.js → BOlkYOOx.js} +1 -1
- package/web/app/immutable/chunks/{DkuxYFAh.js → BOrCm7f7.js} +1 -1
- package/web/app/immutable/chunks/{1RAMMSz2.js → BQiJMsZZ.js} +1 -1
- package/web/app/immutable/chunks/{D95TUop3.js → BSD-ntGx.js} +1 -1
- package/web/app/immutable/chunks/{CDLMG5g2.js → BT1eR3Bj.js} +1 -1
- package/web/app/immutable/chunks/{BMqjLC9C.js → BUOJIxHm.js} +1 -1
- package/web/app/immutable/chunks/{BupGSW0e.js → BVGm2-7m.js} +1 -1
- package/web/app/immutable/chunks/{DRCQRBOX.js → BVVYfWqp.js} +1 -1
- package/web/app/immutable/chunks/{nNR5liVx.js → BVdTA_y5.js} +1 -1
- package/web/app/immutable/chunks/{DNxs15P5.js → BVhmKG23.js} +1 -1
- package/web/app/immutable/chunks/{CH6hoQCh.js → BWP_R2MA.js} +1 -1
- package/web/app/immutable/chunks/{Dl5T14-N.js → BXA0q2RP.js} +1 -1
- package/web/app/immutable/chunks/{BDWzwjAw.js → BXEhOBKy.js} +1 -1
- package/web/app/immutable/chunks/{CMITzGAq.js → BXWV2GsM.js} +1 -1
- package/web/app/immutable/chunks/{DNAYSx3o.js → BZD36hSJ.js} +1 -1
- package/web/app/immutable/chunks/{dC4Ouk4t.js → BZi270zL.js} +1 -1
- package/web/app/immutable/chunks/{DXvCGoHo.js → B_7rDlJA.js} +1 -1
- package/web/app/immutable/chunks/{C9XPvdvP.js → B_SqXKMX.js} +1 -1
- package/web/app/immutable/chunks/{C1-QjOg0.js → B_rj1oI3.js} +1 -1
- package/web/app/immutable/chunks/{D4BcrleY.js → BblUoKwU.js} +1 -1
- package/web/app/immutable/chunks/{DXxnoOGg.js → BhP2yLip.js} +1 -1
- package/web/app/immutable/chunks/{CC73Ord3.js → Bjc6stZr.js} +1 -1
- package/web/app/immutable/chunks/{AHKUBHmH.js → BkE4ThRL.js} +2 -2
- package/web/app/immutable/chunks/{DpwIptaI.js → BkK6L2aU.js} +1 -1
- package/web/app/immutable/chunks/{DAkxD-CW.js → Bln5N5gf.js} +1 -1
- package/web/app/immutable/chunks/{B16ZhAkF.js → Bm1YRNX5.js} +1 -1
- package/web/app/immutable/chunks/{BRyCucnb.js → BmMxtG34.js} +1 -1
- package/web/app/immutable/chunks/{CQco45Cg.js → BmusT0yN.js} +3 -3
- package/web/app/immutable/chunks/{C5Zy1enh.js → BncYKhak.js} +1 -1
- package/web/app/immutable/chunks/{ChB7enBh.js → BpUidpA4.js} +1 -1
- package/web/app/immutable/chunks/{DLE3vveN.js → BpzZdAGA.js} +1 -1
- package/web/app/immutable/chunks/{CuWqPurf.js → BpznkfWn.js} +1 -1
- package/web/app/immutable/chunks/{Bf_h69U3.js → Bqdjarag.js} +1 -1
- package/web/app/immutable/chunks/{yYqgfv9t.js → BqnC5jpg.js} +1 -1
- package/web/app/immutable/chunks/{IclfFZoe.js → Bqvx2p-8.js} +1 -1
- package/web/app/immutable/chunks/{DEsbP_jO.js → BrF70gz7.js} +1 -1
- package/web/app/immutable/chunks/{qdAkw__e.js → Bs9C3yw5.js} +1 -1
- package/web/app/immutable/chunks/{yTn_UE0E.js → BtupVFyT.js} +1 -1
- package/web/app/immutable/chunks/{BOW58NW5.js → Bue8rt91.js} +1 -1
- package/web/app/immutable/chunks/{a3l5znCa.js → BwJyU0G0.js} +2 -2
- package/web/app/immutable/chunks/{DzEfixuL.js → Bwe4xLDo.js} +1 -1
- package/web/app/immutable/chunks/{BTiEQBIg.js → Bx1sm-W9.js} +1 -1
- package/web/app/immutable/chunks/{DTPgmjai.js → Bx3lRAzK.js} +1 -1
- package/web/app/immutable/chunks/{BFxBQddb.js → Byz3i90Q.js} +1 -1
- package/web/app/immutable/chunks/{DdNx-LMu.js → Bz1UdUMu.js} +1 -1
- package/web/app/immutable/chunks/{Cr0HizBS.js → Bz43dY69.js} +1 -1
- package/web/app/immutable/chunks/{Dv-DK4ZQ.js → C-662HWr.js} +1 -1
- package/web/app/immutable/chunks/{8ScDICwb.js → C-6kZjgn.js} +1 -1
- package/web/app/immutable/chunks/{250ka2gI.js → C-QdzJwG.js} +1 -1
- package/web/app/immutable/chunks/{C4F64iPQ.js → C-jJNcMR.js} +1 -1
- package/web/app/immutable/chunks/{B1Weu8fb.js → C-nHSAUo.js} +3 -3
- package/web/app/immutable/chunks/{BPRCBm84.js → C0EhdYGV.js} +1 -1
- package/web/app/immutable/chunks/{Brh3GO3O.js → C3puOFC3.js} +1 -1
- package/web/app/immutable/chunks/{JIE_7jo4.js → C6CbeYqw.js} +1 -1
- package/web/app/immutable/chunks/{C7FWeTQP.js → C6Xyba22.js} +1 -1
- package/web/app/immutable/chunks/{Di1597mK.js → C6w4HIHS.js} +4 -4
- package/web/app/immutable/chunks/{DhPOXvW2.js → C8VLUX_C.js} +1 -1
- package/web/app/immutable/chunks/{DWx-rRFl.js → C99ttMY5.js} +1 -1
- package/web/app/immutable/chunks/{CGwoBkMN.js → C9BFhP02.js} +1 -1
- package/web/app/immutable/chunks/{Crl5h76T.js → C9of0fiN.js} +1 -1
- package/web/app/immutable/chunks/{0KXDpLHs.js → CAMYapEA.js} +1 -1
- package/web/app/immutable/chunks/{TE5M669U.js → CB6JpnWC.js} +1 -1
- package/web/app/immutable/chunks/{DAFCfCw4.js → CBcFUe2n.js} +1 -1
- package/web/app/immutable/chunks/{B1cgGcI0.js → CBm8wTeU.js} +1 -1
- package/web/app/immutable/chunks/{CtssBApV.js → CBoDYG4N.js} +1 -1
- package/web/app/immutable/chunks/{ER2tmGzm.js → CC4qGxb7.js} +1 -1
- package/web/app/immutable/chunks/{Kl08LBTM.js → CCZp7LCQ.js} +1 -1
- package/web/app/immutable/chunks/{DzRCnjNV.js → CDYyrBGY.js} +1 -1
- package/web/app/immutable/chunks/{PbmSZkiX.js → CEAmSotY.js} +1 -1
- package/web/app/immutable/chunks/{SORTQVEW.js → CEeEOvCL.js} +1 -1
- package/web/app/immutable/chunks/{u_aTJYPF.js → CFLU9fq8.js} +1 -1
- package/web/app/immutable/chunks/{D5TWWYRb.js → CFTAk3la.js} +1 -1
- package/web/app/immutable/chunks/{Cc2CqLcV.js → CFg7iVIZ.js} +1 -1
- package/web/app/immutable/chunks/{DsALDj-G.js → CFxNovSS.js} +1 -1
- package/web/app/immutable/chunks/{C7hiMHci.js → CGFkplEn.js} +1 -1
- package/web/app/immutable/chunks/{DufyJpiq.js → CGnn93LH.js} +1 -1
- package/web/app/immutable/chunks/{Mvzzws-D.js → CGuufzS0.js} +1 -1
- package/web/app/immutable/chunks/{Bb3DLwd-.js → CHKsRESt.js} +1 -1
- package/web/app/immutable/chunks/CHWIPzMj.js +1 -0
- package/web/app/immutable/chunks/{CG1uBvn1.js → CI1ntq87.js} +1 -1
- package/web/app/immutable/chunks/{CqB0bCAG.js → CJ3l-lGj.js} +2 -2
- package/web/app/immutable/chunks/{BIx2KRjJ.js → CKC2M8j1.js} +1 -1
- package/web/app/immutable/chunks/{D2Vwu3SP.js → CKhPlHZj.js} +1 -1
- package/web/app/immutable/chunks/{fs3EIvPV.js → CPE--RtJ.js} +1 -1
- package/web/app/immutable/chunks/{DuNaiyu-.js → CPp2qH2q.js} +1 -1
- package/web/app/immutable/chunks/{BSJqN5vZ.js → CRSdOrSC.js} +1 -1
- package/web/app/immutable/chunks/{DaOZBaPJ.js → CR_d2Ton.js} +1 -1
- package/web/app/immutable/chunks/{C_AcfC1L.js → CSCM9u80.js} +4 -4
- package/web/app/immutable/chunks/{CDuekMJZ.js → CUV6PvQK.js} +1 -1
- package/web/app/immutable/chunks/{uh7Y9z2F.js → CWVqIb-d.js} +1 -1
- package/web/app/immutable/chunks/{DPL73Y_l.js → CWcntBOg.js} +1 -1
- package/web/app/immutable/chunks/{UZmeM7G7.js → CWgzsPKB.js} +1 -1
- package/web/app/immutable/chunks/{Cdn6MckB.js → CYv_coXk.js} +1 -1
- package/web/app/immutable/chunks/{Ck_gSwZK.js → CZ4sJNRy.js} +1 -1
- package/web/app/immutable/chunks/{egYaebOi.js → C_T3jbC9.js} +1 -1
- package/web/app/immutable/chunks/{CON-zxWG.js → C_VUI8Os.js} +1 -1
- package/web/app/immutable/chunks/{D22DhEZM.js → C_a7D1qz.js} +1 -1
- package/web/app/immutable/chunks/{D9x2HEXw.js → CeGIZnmi.js} +2 -2
- package/web/app/immutable/chunks/{Gw1t2Srm.js → CeOa9B5I.js} +1 -1
- package/web/app/immutable/chunks/{BturI3jj.js → CezXhCS3.js} +1 -1
- package/web/app/immutable/chunks/{Bl3WKtdy.js → CfiSkM8N.js} +1 -1
- package/web/app/immutable/chunks/{C-4lCpez.js → Cg7Nu4Va.js} +1 -1
- package/web/app/immutable/chunks/{CcC3AMEc.js → CkCYZCke.js} +1 -1
- package/web/app/immutable/chunks/{WZfEgods.js → Cl2rjjSj.js} +1 -1
- package/web/app/immutable/chunks/{CcBZUrE6.js → Cl7-Lh5E.js} +1 -1
- package/web/app/immutable/chunks/{CpL_C-GJ.js → Clz72PsI.js} +1 -1
- package/web/app/immutable/chunks/{CpRRerrb.js → CmE98hO-.js} +1 -1
- package/web/app/immutable/chunks/{BgXHwBod.js → CoCpxnqY.js} +6 -6
- package/web/app/immutable/chunks/{B9ibu-4g.js → CpK9Zfzc.js} +1 -1
- package/web/app/immutable/chunks/{Du66vBdT.js → CpasQsOr.js} +1 -1
- package/web/app/immutable/chunks/{BcG7yxE2.js → CprGZ_vQ.js} +1 -1
- package/web/app/immutable/chunks/{CZ6S_xft.js → Cq8HYngI.js} +1 -1
- package/web/app/immutable/chunks/{DBX7lh1O.js → CsXyRQ8j.js} +55 -55
- package/web/app/immutable/chunks/{Dal4fUVD.js → CtJv8xMf.js} +1 -1
- package/web/app/immutable/chunks/{BH0cA3lf.js → CuKET43j.js} +2 -2
- package/web/app/immutable/chunks/{B12Be-IL.js → Cum-TdZd.js} +1 -1
- package/web/app/immutable/chunks/{q7CfEA0Z.js → CwSTmJL9.js} +1 -1
- package/web/app/immutable/chunks/{ypTw5Sl1.js → CxWH-8GW.js} +1 -1
- package/web/app/immutable/chunks/{D_zFSOgZ.js → CxdlCefM.js} +1 -1
- package/web/app/immutable/chunks/{C_yzewkM.js → Cy7afLsK.js} +1 -1
- package/web/app/immutable/chunks/{CfrT9tcw.js → CzU9DzbS.js} +2 -2
- package/web/app/immutable/chunks/{N88c9xuK.js → D-Cja9EW.js} +1 -1
- package/web/app/immutable/chunks/{XUs6uy3h.js → D-vbvcep.js} +1 -1
- package/web/app/immutable/chunks/{Dollk5ZG.js → D0LnBaLt.js} +1 -1
- package/web/app/immutable/chunks/{BR2JfJtY.js → D2KpwJIq.js} +1 -1
- package/web/app/immutable/chunks/{C7zasWUf.js → D3OvqZhX.js} +2 -2
- package/web/app/immutable/chunks/{C6oWsXP5.js → D3hR-AME.js} +1 -1
- package/web/app/immutable/chunks/{CEswnMLF.js → D4EK6U-m.js} +1 -1
- package/web/app/immutable/chunks/{BP3qefPW.js → D5uBa-Ne.js} +1 -1
- package/web/app/immutable/chunks/{BQaHhd4d.js → D5yaIVD5.js} +1 -1
- package/web/app/immutable/chunks/{B3PM4xsG.js → D7IJPBQY.js} +2 -2
- package/web/app/immutable/chunks/{C-Rjcf-U.js → D8DBejPV.js} +1 -1
- package/web/app/immutable/chunks/{D2h8OBcY.js → DA2RRspt.js} +1 -1
- package/web/app/immutable/chunks/{BhxN6u9j.js → DBsXclsv.js} +1 -1
- package/web/app/immutable/chunks/{BGa2D4m6.js → DC1aoXyY.js} +1 -1
- package/web/app/immutable/chunks/{CSfG5Ybw.js → DCpFqaYA.js} +3 -3
- package/web/app/immutable/chunks/{DumVye9M.js → DD2BajRb.js} +1 -1
- package/web/app/immutable/chunks/{jRZT2QjD.js → DDfMifm6.js} +1 -1
- package/web/app/immutable/chunks/{ByjFf28U.js → DDtBtnNz.js} +1 -1
- package/web/app/immutable/chunks/{CHWbLwXf.js → DED90qCG.js} +1 -1
- package/web/app/immutable/chunks/{B0m0-2MI.js → DF8x1-0S.js} +1 -1
- package/web/app/immutable/chunks/{83xTN5fk.js → DFztsOdi.js} +1 -1
- package/web/app/immutable/chunks/{GAJ0U6Fj.js → DGfmWFo_.js} +1 -1
- package/web/app/immutable/chunks/{D1mB9_6q.js → DH2vm-1i.js} +1 -1
- package/web/app/immutable/chunks/{ha_PYGcR.js → DIZhZiBE.js} +1 -1
- package/web/app/immutable/chunks/{DK4nL43d.js → DInAnkwK.js} +1 -1
- package/web/app/immutable/chunks/{DJrPi4os.js → DJ6GAsDd.js} +1 -1
- package/web/app/immutable/chunks/{eqIwOdFV.js → DJM-jC4D.js} +1 -1
- package/web/app/immutable/chunks/{BmET8lGk.js → DKpBQuZo.js} +1 -1
- package/web/app/immutable/chunks/{DFMLCzQx.js → DMkatOMg.js} +1 -1
- package/web/app/immutable/chunks/{DZ6X6WRI.js → DNhGGhpW.js} +1 -1
- package/web/app/immutable/chunks/{DIweBffD.js → DOPKn6Qc.js} +1 -1
- package/web/app/immutable/chunks/{BK9wcqQr.js → DPWIkUJh.js} +1 -1
- package/web/app/immutable/chunks/{DzCaG8dx.js → DPbAP8qP.js} +1 -1
- package/web/app/immutable/chunks/DS9Nses5.js +1 -0
- package/web/app/immutable/chunks/{BvR4li8f.js → DSQXi-HI.js} +1 -1
- package/web/app/immutable/chunks/{CN5rDbbI.js → DVBcpomn.js} +3 -3
- package/web/app/immutable/chunks/{CQaQS_9E.js → DW6LpaLb.js} +1 -1
- package/web/app/immutable/chunks/{B50wbSca.js → DXujHnPt.js} +1 -1
- package/web/app/immutable/chunks/{BT9wsXKO.js → DZBWbkQT.js} +1 -1
- package/web/app/immutable/chunks/{DsNGTbSH.js → D_gp0b_i.js} +1 -1
- package/web/app/immutable/chunks/{Brv29rn8.js → D_p0cMgQ.js} +1 -1
- package/web/app/immutable/chunks/{1ppucs3B.js → DaHFtoCa.js} +1 -1
- package/web/app/immutable/chunks/{Cweq-0-O.js → DaNzos5O.js} +1 -1
- package/web/app/immutable/chunks/{B4CGkc2Z.js → DaauQgcE.js} +1 -1
- package/web/app/immutable/chunks/{2bm1-WPv.js → DavOW4Pn.js} +1 -1
- package/web/app/immutable/chunks/{CWOgcDNw.js → DbYmdzfs.js} +1 -1
- package/web/app/immutable/chunks/{BaifPKCC.js → Dc7HNZUt.js} +1 -1
- package/web/app/immutable/chunks/{BhaVZ25C.js → DdAvLI3S.js} +1 -1
- package/web/app/immutable/chunks/{B_kNlUD-.js → Dg1VUJOX.js} +1 -1
- package/web/app/immutable/chunks/{BB-o-_x6.js → DhbIivmf.js} +1 -1
- package/web/app/immutable/chunks/{Qetkvafr.js → DlGq0K29.js} +1 -1
- package/web/app/immutable/chunks/{BIcRvrKV.js → Dlhp692a.js} +1 -1
- package/web/app/immutable/chunks/{CtXwHt_m.js → Dm5sb2T9.js} +1 -1
- package/web/app/immutable/chunks/{BHWU1Psx.js → DmzyDWxY.js} +1 -1
- package/web/app/immutable/chunks/{rS28LQlr.js → DnPj8kAJ.js} +1 -1
- package/web/app/immutable/chunks/{DZMdKpsk.js → DnuPDvKn.js} +1 -1
- package/web/app/immutable/chunks/{BWIk2_6S.js → DoQcVvIo.js} +1 -1
- package/web/app/immutable/chunks/{Dnhf6K_4.js → DpOnLCwB.js} +1 -1
- package/web/app/immutable/chunks/{1FvEkC51.js → DrJBkQ-6.js} +1 -1
- package/web/app/immutable/chunks/{CUkvXPuX.js → Drf7hLVf.js} +1 -1
- package/web/app/immutable/chunks/{CBcz8VK6.js → Ds2ZtSdQ.js} +1 -1
- package/web/app/immutable/chunks/{DyvHB1Xe.js → DsOeQrzx.js} +1 -1
- package/web/app/immutable/chunks/{BLB-tbz2.js → DtR7mmzX.js} +1 -1
- package/web/app/immutable/chunks/{u_ejDIBY.js → DtgMvDnf.js} +1 -1
- package/web/app/immutable/chunks/{CbKyR6Kf.js → DvRDNe8t.js} +2 -2
- package/web/app/immutable/chunks/{7FbFoR5r.js → Dw3sD88n.js} +1 -1
- package/web/app/immutable/chunks/{DQg0oSRW.js → Dwv8zw-4.js} +1 -1
- package/web/app/immutable/chunks/{BAduOJD2.js → DxTOze69.js} +1 -1
- package/web/app/immutable/chunks/{CL61Lx-U.js → DyRcp3T7.js} +1 -1
- package/web/app/immutable/chunks/{CcIA3l7Z.js → Dym3QysO.js} +1 -1
- package/web/app/immutable/chunks/{BuvlavTl.js → DzUGhIyX.js} +1 -1
- package/web/app/immutable/chunks/{CJPgBxaF.js → DzyqDyL5.js} +1 -1
- package/web/app/immutable/chunks/{Dof5KDCr.js → EVnmmycb.js} +1 -1
- package/web/app/immutable/chunks/EyifK0YY.js +1 -0
- package/web/app/immutable/chunks/{CuTVPcxo.js → JtSO6K6S.js} +1 -1
- package/web/app/immutable/chunks/{DK-gr9PF.js → Jy2VtQ-j.js} +1 -1
- package/web/app/immutable/chunks/{DaNk_UZD.js → LqqBQeq2.js} +1 -1
- package/web/app/immutable/chunks/M46vYfPG.js +1 -0
- package/web/app/immutable/chunks/{CxfjSsAX.js → MpQYVCAl.js} +1 -1
- package/web/app/immutable/chunks/{D0boXdmz.js → P8ajY_OC.js} +1 -1
- package/web/app/immutable/chunks/{O62vZaBr.js → Q-AtJOxP.js} +1 -1
- package/web/app/immutable/chunks/{Bn7ZmTkF.js → QgUSWdkO.js} +2 -2
- package/web/app/immutable/chunks/{CVvdpvXK.js → R5mMERAP.js} +3 -3
- package/web/app/immutable/chunks/{4nEMohmP.js → Rx9iChBc.js} +1 -1
- package/web/app/immutable/chunks/{h37VgGKw.js → T8wSaQKw.js} +1 -1
- package/web/app/immutable/chunks/{DYg3sgSl.js → U_nfJe6p.js} +1 -1
- package/web/app/immutable/chunks/{D1u6MWVh.js → VpUwDjJ_.js} +1 -1
- package/web/app/immutable/chunks/{DP0ovMwg.js → XMeuZ35b.js} +1 -1
- package/web/app/immutable/chunks/XslshjYv.js +1 -0
- package/web/app/immutable/chunks/{D2524wRl.js → Yqp_UZB_.js} +1 -1
- package/web/app/immutable/chunks/{8jMj1OGX.js → ZANjZw72.js} +1 -1
- package/web/app/immutable/chunks/{D1mEn0KC.js → ZEAS6srh.js} +1 -1
- package/web/app/immutable/chunks/{Be253aOc.js → ZUA6bo0t.js} +1 -1
- package/web/app/immutable/chunks/{Bd1sW9PE.js → _H8LGW4O.js} +1 -1
- package/web/app/immutable/chunks/{AF10H5eK.js → a3c0uoAC.js} +1 -1
- package/web/app/immutable/chunks/{DRG3CbTe.js → asAq0Q4G.js} +1 -1
- package/web/app/immutable/chunks/{BxsHp3SH.js → d-SabBb_.js} +1 -1
- package/web/app/immutable/chunks/{GIg9PMOU.js → dlAoKLi8.js} +1 -1
- package/web/app/immutable/chunks/{Ci7no3-D.js → ePwjer8w.js} +1 -1
- package/web/app/immutable/chunks/{jBPLh4Hv.js → eapM1N3E.js} +1 -1
- package/web/app/immutable/chunks/{BO7alE7_.js → g4xg1V0H.js} +4 -4
- package/web/app/immutable/chunks/{DUtR3SZU.js → gFHNPMAw.js} +1 -1
- package/web/app/immutable/chunks/{DWoxVXOI.js → icAEjhzY.js} +1 -1
- package/web/app/immutable/chunks/{CVmi7DTf.js → jCrYQ4Ri.js} +2 -2
- package/web/app/immutable/chunks/{PxI72ehJ.js → lJ4MSEIh.js} +1 -1
- package/web/app/immutable/chunks/{oZTI_u9n.js → lWlirZMs.js} +1 -1
- package/web/app/immutable/chunks/{DyyOhufN.js → o551VboC.js} +1 -1
- package/web/app/immutable/chunks/{CtZ-vglf.js → ohZ0BtRB.js} +1 -1
- package/web/app/immutable/chunks/{BHSnSmbO.js → ouMJlHY1.js} +1 -1
- package/web/app/immutable/chunks/{CPZGjCPW.js → pElsZ4dt.js} +1 -1
- package/web/app/immutable/chunks/{Dx1gCWLU.js → pV_14PeY.js} +1 -1
- package/web/app/immutable/chunks/{DmQDTavV.js → rCQAZGb3.js} +2 -2
- package/web/app/immutable/chunks/{BYge7mVb.js → sASsqJNT.js} +1 -1
- package/web/app/immutable/chunks/{C62iVnTg.js → s_zHQBKW.js} +1 -1
- package/web/app/immutable/chunks/{Cn-uVT14.js → tOpgiK5L.js} +1 -1
- package/web/app/immutable/chunks/{1wWPoJ5Q.js → tp06XFI7.js} +1 -1
- package/web/app/immutable/chunks/{D4SYJpS6.js → tsVy-iyH.js} +1 -1
- package/web/app/immutable/chunks/{BL9pxyXQ.js → uN_eK4W9.js} +1 -1
- package/web/app/immutable/chunks/{Btv0cBol.js → uod76J5c.js} +1 -1
- package/web/app/immutable/chunks/{Ddfl3sUZ.js → v1zTkmPU.js} +1 -1
- package/web/app/immutable/chunks/{4K9ZZSJu.js → w4-ZULNa.js} +1 -1
- package/web/app/immutable/chunks/{7CEHC6fO.js → wOi8eNbH.js} +1 -1
- package/web/app/immutable/chunks/{D-GPCP_y.js → waJ4nm9k.js} +1 -1
- package/web/app/immutable/chunks/{Dm98AfRw.js → wwOYCksJ.js} +1 -1
- package/web/app/immutable/chunks/{DjBfsgFx.js → yQuAS-d_.js} +1 -1
- package/web/app/immutable/chunks/{DzQEubr_.js → z2dT_sfg.js} +1 -1
- package/web/app/immutable/entry/{app.DnvWkWuC.js → app.Bg9ukl2W.js} +3 -3
- package/web/app/immutable/entry/start.DrKu0acT.js +1 -0
- package/web/app/immutable/nodes/{0.BHNsHbq6.js → 0.w7cQ0D88.js} +1 -1
- package/web/app/immutable/nodes/{1.CxKhOECT.js → 1.4ql_JuYe.js} +1 -1
- package/web/app/immutable/nodes/{10.mSXX1b86.js → 10.Db5zVRj1.js} +5 -5
- package/web/app/immutable/nodes/{11.LQ-kpfGf.js → 11.5Xli6dPl.js} +1 -1
- package/web/app/immutable/nodes/{12.moZNbeME.js → 12.Dmc_y_qK.js} +1 -1
- package/web/app/immutable/nodes/{13.B9ngkS9V.js → 13.DZTGM0cb.js} +1 -1
- package/web/app/immutable/nodes/{14.BvKaKKlx.js → 14.BJwsFDEF.js} +3 -3
- package/web/app/immutable/nodes/{15.VPLfb8v_.js → 15.DMW9u33y.js} +1 -1
- package/web/app/immutable/nodes/{16.Bfi41nCp.js → 16.BcrbQLum.js} +1 -1
- package/web/app/immutable/nodes/{17.BaloRRSg.js → 17.8JKljX5l.js} +1 -1
- package/web/app/immutable/nodes/{18.DPo7p8bY.js → 18.YeTMHnFS.js} +1 -1
- package/web/app/immutable/nodes/{19.CavDiJik.js → 19.CTmJfPwB.js} +2 -2
- package/web/app/immutable/nodes/{2.kzpobJJm.js → 2.bsXLvGyt.js} +4 -4
- package/web/app/immutable/nodes/{20.EaJ-UneM.js → 20.C1sgyqm8.js} +1 -1
- package/web/app/immutable/nodes/{3.DZFV57al.js → 3.JBWvrxuJ.js} +1 -1
- package/web/app/immutable/nodes/{4.Dfre4p0n.js → 4.D6e8o0bC.js} +1 -1
- package/web/app/immutable/nodes/{5.BnBSTXSN.js → 5.BiCuWA6k.js} +1 -1
- package/web/app/immutable/nodes/{6.BYj21cDV.js → 6.IF1PmeP7.js} +1 -1
- package/web/app/immutable/nodes/{7.CvDxUVa8.js → 7.BlK4mw1L.js} +1 -1
- package/web/app/immutable/nodes/{8.CTVkGhmt.js → 8.CUVVZTwf.js} +1 -1
- package/web/app/immutable/nodes/9.JkDekIr4.js +12 -0
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +49 -49
- package/web/index.html +19 -19
- package/web/app/immutable/chunks/2CFsxajB.js +0 -1
- package/web/app/immutable/chunks/2CQlphfn.js +0 -1
- package/web/app/immutable/chunks/6QXvr4x0.js +0 -1
- package/web/app/immutable/chunks/BOaPEJcS.js +0 -1
- package/web/app/immutable/chunks/CXjastM3.js +0 -1
- package/web/app/immutable/chunks/Cr_KTPcL.js +0 -1
- package/web/app/immutable/entry/start.D5h2aGMe.js +0 -1
- package/web/app/immutable/nodes/9.Dq4n-Ddo.js +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var N_=Object.defineProperty;var Fg=n=>{throw TypeError(n)};var B_=(n,r,a)=>r in n?N_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>B_(n,typeof r!="symbol"?r+"":r,a),W_=(n,r,a)=>r.has(n)||Fg("Cannot "+a);var Ro=(n,r,a)=>(W_(n,r,"read from private field"),a?a.call(n):r.get(n)),Dg=(n,r,a)=>r.has(n)?Fg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as ln,bo as Z,bw as dn,bp as cf,b as cn,bm as g,bq as Ur,bs as pe,br as qi}from"./2CQlphfn.js";import{bs as un,a5 as S,bf as fs,bA as y,W as p,bn as gn,aA as ee,aB as E,ca as ie,a7 as Ot,ay as ye,aD as e,cd as Bn,c9 as o,bS as _,bl as de,be as vn,b_ as q,bO as j,c5 as dt,bH as b,bV as he,bj as Es,bk as no,b$ as on,ai as Bc,aj as ps,bo as jl,br as Mr,c0 as qt,cb as sc,aw as bi,a as U_}from"./3SdAC2_C.js";import{i as N}from"./ByjFf28U.js";import{k as xi}from"./DzCaG8dx.js";import{g as Dn,i as z_,I as qo,p as Lo,e as Mo}from"./Bf_h69U3.js";import{n as Lt,l as ma,c as eo,j as Ng,k as Fo,h as j_}from"./DsNGTbSH.js";import{b as uf,e as Wc,f as ke,s as Ne,c as Wt,g as gs}from"./DhZiRE53.js";import{b as G_}from"./goTpbPhD.js";import{b as br}from"./Dn334wJv.js";import{m as V_,U as K_,Z as Q_,X as J_,Y as Y_,I as Bg,o as X_,l as Z_,a2 as eb,x as Wg,$ as tb,a0 as Ug,r as nb,s as rb}from"./B1Weu8fb.js";import{Jt as O,fo as ab,eW as sb,f3 as ob,eX as ib,f1 as lb,f0 as db,eZ as cb,e$ as ub,eY as gb,ru as pb,c6 as fb,i as $i,J2 as vb,Db as gf,Dg as hb,Di as zg,Df as mb,Dh as _b,vD as bb,vF as wb,Co as pf,cp as yb,cn as Ib,Bx as Sb,bE as $b,A3 as kb,Cd as oc,u$ as xb,cq as jg,dB as Cb,dC as Pb,Cn as Rb,el as Tb,CH as Ab,CG as Mb,CL as Eb,CK as qb,cQ as Lb,cT as Hb,nC as Ob,er as Fb,wR as Db,CM as Nb,wT as Bb,CN as Wb,cU as Ub,cV as zb,nK as jb,Ag as Gb,Ds as Vb,wm as Kb,wn as Qb,y$ as Jb,z3 as ic,wi as Yb,wj as Xb,rS as Zb,rf as ew,rd as tw,f_ as nw,HN as rw,Lh as aw,GL as sw,gn as ow,p2 as iw,Jh as lw,oj as dw,A2 as cw,ft as Gg,r2 as Vg,fm as uw,fl as gw,tB as pw,g3 as Kg,re as fw,fe as vw,C8 as hw,m as mw,nL as _w,zH as bw,yZ as ww,Ey as yw,En as Qg,xh as Iw,xi as Jg,u_ as Yg,p3 as Sw,DE as $w,gj as kw,g1 as xw,eU as Cw,cM as Pw,A6 as Rw,Lm as Tw,Ct as Aw,LE as Mw,y2 as Ew,ga as qw,fd as Lw,cL as Hw,cI as Ow,cH as Fw,vr as Dw,xo as Nw,xm as Bw,cF as Ww,cE as Uw,z5 as zw,z0 as jw,xn as Gw}from"./eqIwOdFV.js";import{a as Uc}from"./CC7to1B5.js";import{aM as Vw,aL as Kw,bg as Qw,a7 as Jw,aD as Yw,aO as Xw,M as ff,a0 as vf,b8 as Zw,b2 as ey,as as Xg,P as wl,b0 as Zg,a$ as ep,a_ as tp}from"./DwpTtGo9.js";import{k as hf,F as ty,G as Cc,ar as ny,a_ as El,a8 as mf,Q as ry,aT as lc,ao as ay,aG as sy,B as oy,y as _f,r as iy,z as ly,u as dy,aY as cy,aE as bf,aD as wf,aF as uy,aJ as dc,aQ as np,aP as yl,aR as rp,P as ap,d as gy,e as py,av as fy,V as sp,aC as vy,c as hy,l as my,aS as op,an as _y,au as ip,a as by,ay as wy,ac as lp,aB as yy,aU as dp,aX as cp,m as up,ad as Iy,R as Sy,aw as gp,ak as $y,O as ky,aq as xy,h as Cy,p as Py,_ as cc,Z as Ry,aA as pp,a7 as Ty,f as Ay,i as My,a5 as Ey,ab as qy}from"./C_AcfC1L.js";import{f as Ly,o as Hy,E as Oy,C as Fy,m as Dy,a2 as fp,aa as Ny,K as By,e as Wy,y as Uy}from"./uh7Y9z2F.js";import{g as Pi}from"./DypB-Dwi.js";import{dV as Dl,cT as yf,O as If,W as zy,bu as jy,aF as Sf,dG as $f,aU as Eo,e7 as Gy,dv as kf,aw as zc,dU as jc,aN as xf,cO as Vy,V as ha,a3 as Xs,B as Ky,a7 as Qy,a4 as Jy,M as Yy,a6 as Xy,ar as Zy,aG as Cf,aO as ql,r as eI,n as Pc,H as tI,dX as nI,aQ as rI,aK as aI,c8 as sI,aW as oI,bL as iI,bJ as lI,bK as dI,c7 as cI,c6 as uI,cM as gI,cL as pI,aS as fI,ba as vI,bc as hI,bf as mI,bb as _I,bk as bI,be as wI,bd as yI,bg as II,bh as SI,bj as $I,bi as kI,ax as xI,ay as CI,ci as PI,cj as RI,du as TI,dt as AI,a$ as MI,G as EI,b3 as qI,ce as LI,C as vp,c$ as HI,b9 as cs,b_ as OI,X as FI,bp as DI,E as NI,ad as BI,t as WI,cV as UI,d2 as hp,Q as mp,ds as zI,cP as uc}from"./TE5M669U.js";import{u as Pf,a as Il,ag as jI,x as GI,ad as Rf,af as VI,ac as Tf,a4 as KI,F as _p,D as QI,e as JI,n as YI,s as XI,m as ZI,Y as eS,k as tS}from"./D9x2HEXw.js";import{a2 as nS,b5 as rS,cM as aS,a_ as sS,b4 as oS,c2 as iS,c9 as lS,w as dS,x as cS,cd as uS}from"./DWx-rRFl.js";import{n as gS,P as Af,F as pS,ai as fS,r as vS,ac as hS}from"./D22DhEZM.js";import{I as mS,s as _S,H as bp}from"./Bqd7fdCF.js";import{e as bS}from"./CL3a4Hm1.js";import{e as wS,f as yS}from"./DXvCGoHo.js";import{s as IS,o as Zs,b as SS,g as Nl,d as $S,l as wi}from"./CIyUrgF0.js";import{a5 as kS,a7 as xS,D as CS,N as PS,ac as wp,X as RS,i as TS,r as cr,v as Ri,u as na,p as ki,x as wr,S as Gc,m as Gl,s as Ho,y as Ti,o as ro,n as ao,t as yp,aa as so,w as oo,a9 as Vc,q as _a,z as Oo,J as Rc,_ as Ip,g as AS,F as MS,U as Mf,I as Ef,a8 as qf,a6 as Ll,O as ES,E as Lf,V as qS,A as LS,b as HS,ab as OS,ad as Sl,G as FS,e as gc,l as DS,C as NS,f as Ys,j as Sp,H as us,Q as BS,d as $l,c as WS,a as $p,h as US,L as zS,Y as kp,a4 as pc,a1 as xp,a0 as jS,a3 as Cp,$ as Pp,T as GS,B as VS,k as KS,a2 as QS,K as JS,R as YS,P as XS,W as ZS}from"./DRCQRBOX.js";import{m as e$}from"./Dms_DO28.js";import{g as Hf}from"./Dn1azdNN.js";import{b as t$}from"./BturI3jj.js";import{g as n$}from"./FJwOmaJn.js";import{a as r$}from"./Crl5h76T.js";import{q as Of,d as ur,r as a$,e as Bl,j as s$,g as Tc,i as o$,f as Ac,c as i$,A as l$,O as Rp,k as d$}from"./83xTN5fk.js";import{P as c$}from"./DpwIptaI.js";import{e as u$}from"./CtssBApV.js";import{b as g$,a as p$,g as f$,c as v$,i as h$}from"./DufyJpiq.js";import{R as m$,g as _$,W as kl,c as b$}from"./C5Zy1enh.js";import"./DkuxYFAh.js";import"./D1mB9_6q.js";import{s as Ai}from"./DTPgmjai.js";import{F as w$,h as y$}from"./Bn7ZmTkF.js";import"./h37VgGKw.js";import{C as I$,e as Br,L as S$,l as Vl,d as Kl,K as Ql,h as Kc,M as Jl,S as Da}from"./BKSCrb1m.js";import{D as $$}from"./C7hiMHci.js";import{f as Tp}from"./BaifPKCC.js";import"./DU3vNstz.js";import{i as Ff}from"./BjLb7AHW.js";import{h as Ap,i as Mp,g as Ep,P as qp,C as k$,m as Hl,R as x$}from"./jRZT2QjD.js";import{f as It,ae as C$}from"./BvR4li8f.js";import{F as ft,bs as P$,cd as R$,aw as Na,a2 as Df,c9 as T$,bf as A$,be as M$,bg as E$,aO as Lp,aj as fc,aB as vc,bB as Nf,d3 as Wl,cF as q$,aM as Hp,cb as Op,cK as Ul,bu as L$,aS as H$,d0 as O$,a8 as Bf,ac as F$,ag as D$,cr as N$,ba as B$,aC as Wf,cT as Fp,cz as W$,ax as U$,cD as z$,c3 as j$}from"./B16ZhAkF.js";import{c as Uf}from"./ChTqQfQN.js";import"./Gw1t2Srm.js";import{c as Rt}from"./CON-zxWG.js";import{a5 as zf,bg as G$,ar as V$,k as K$,Y as Q$,W as J$,a2 as Y$,Z as X$,bw as Z$,V as ek,a1 as tk,ah as nk}from"./Cr_KTPcL.js";import{d as zl,f as rk,e as ak}from"./Bjpdj-Rz.js";import{A as sk}from"./C_yzewkM.js";import{D as ok}from"./BFBac69t.js";import"./DNxs15P5.js";import{a as ik,C as lk}from"./O62vZaBr.js";import"./CC73Ord3.js";import{C as dk}from"./8jMj1OGX.js";import{h as Mc,r as ck,a as uk}from"./a3l5znCa.js";import{s as gk}from"./BQaHhd4d.js";import{I as pk,a as jf}from"./DjBfsgFx.js";import{L as fk}from"./DQg0oSRW.js";import{g as vk,f as hk,b as mk}from"./BhaVZ25C.js";import{s as Mi,g as Yn,i as _k,j as bk,e as Dp,r as Np,f as wk,d as yk,a as hc,h as Ik}from"./BRyCucnb.js";import{i as Bp,a as Sk}from"./Bu13V5mO.js";import{seekConversationToMessage as Wp}from"./Bb3DLwd-.js";import{l as Kt,o as mc,h as Qc,n as Ec,q as $k}from"./Be253aOc.js";import{o as kk}from"./CqB0bCAG.js";import{A as Gf}from"./CpRRerrb.js";import{b as Vf}from"./C62iVnTg.js";import{g as xk,e as Kf,v as Ck,f as Pk,N as Rk,M as Tk,K as Ak,k as Qf,l as Mk,H as Jf,s as Yf}from"./u_ejDIBY.js";import{selectCurrentWorkspaceTabId as _c}from"./DK-gr9PF.js";import{o as Ek}from"./CDK1PUhb.js";import{d as qk}from"./B0Z-1lwJ.js";import{P as Lk}from"./CDLMG5g2.js";import{g as Hk}from"./1RAMMSz2.js";import{H as Xf,M as Ok,y as Fk,g as Dk,i as Nk,u as Bk,e as Zf,c as ev,d as Wk}from"./SORTQVEW.js";import{c as Uk,h as Jc,f as tv,O as zk}from"./CXjastM3.js";import{t as jk}from"./DAsc1V4f.js";import{s as Gk}from"./BsieX9dN.js";import{i as nv}from"./GIg9PMOU.js";import{d as Vk,i as Kk,r as Qk}from"./CH6hoQCh.js";import{g as Jk}from"./q7CfEA0Z.js";var Yk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Xk=E("<div><!></div>");function rv(n,r){if(new.target)return ln({component:rv,...n});un(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),d=Z(r,"children",7),l=cf(r,Yk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return d()},set children(v){d(v),ee()},$set:dn,$on:(v,R)=>cn(r,v,R)},u=Xk();uf(u,v=>({"data-slot":"card-header",class:v,...l}),[()=>Wc("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",dk,i())]);var w=S(u);return Ai(w,()=>d()??fs),y(u),br(u,v=>a(v),()=>a()),p(n,u),gn(f)}var Zk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ex=E("<div><!></div>");function av(n,r){if(new.target)return ln({component:av,...n});un(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),d=Z(r,"children",7),l=cf(r,Zk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return d()},set children(v){d(v),ee()},$set:dn,$on:(v,R)=>cn(r,v,R)},u=ex();uf(u,v=>({"data-slot":"card-title",class:v,...l}),[()=>Wc("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var w=S(u);return Ai(w,()=>d()??fs),y(u),br(u,v=>a(v),()=>a()),p(n,u),gn(f)}const xl=mS.CHAT_MEDIA,bc=IS().min(1).max(512);Zs({workspaceId:bc,agentId:bc,draftId:Nl(),principalId:bc,media:SS(gS).min(1).max(20)}).strict();const tx=Zs({sessionId:Nl()}).strict();tx.extend({control:$S("action",[Zs({action:wi("readiness")}).strict(),Zs({action:wi("export"),request:wS}).strict(),Zs({action:wi("transcribe"),request:yS}).strict(),Zs({action:wi("release"),jobId:Nl()}).strict(),Zs({action:wi("adopt"),jobId:Nl()}).strict()])}).strict();function Yc(n,r,a,i=async(d,l)=>typeof window>"u"||_S(window)!=="electron"?{ok:!1,error:"unavailable"}:bS().invoke(d,l)){let d=null,l=null,f=!1;async function u(){f=!0,a.removeEventListener("abort",w);const x=d;d=null,x&&await i(xl.CLOSE,{sessionId:x}).catch(()=>{})}const w=()=>{u()};a.addEventListener("abort",w,{once:!0});const v=()=>{if(f||a.aborted||!r())throw new Error("media-send-retired")};async function R(){if(v(),d)return d;if(l)return l;l=(async()=>{const x=await i(xl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");d=x.value.sessionId;try{return v(),d}catch(F){throw await u(),F}})();try{return await l}finally{l=null}}async function I(x){const F=await R();v();const D=await i(xl.CONTROL,{sessionId:F,control:x});return v(),D}return{service:{exportMedia:x=>I({action:"export",request:x}),adoptMediaJob:x=>I({action:"adopt",jobId:x}),transcribeMedia:x=>I({action:"transcribe",request:x}),releaseMediaJob:async x=>d?await i(xl.CONTROL,{sessionId:d,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:u,readiness:()=>I({action:"readiness"})}}const wc=new Set;async function nx(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),d=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:f,agentId:u}=i,w=Pi(O.state),v=Dl.select(O.state,f),R=yf.select(O.state),I=hf(),M=JSON.stringify([w,f,u]);if(!w||!v||!R||l.wsId!==f||wc.has(M))return!1;wc.add(M);const x=new AbortController,F=()=>x.abort();a.addEventListener("abort",F,{once:!0});const D=()=>!a.aborted&&!x.signal.aborted&&Pi(O.state)===w&&Dl.select(O.state,f)===v&&mf(I)&&r.isCurrentDraft(i),T=O.getReadableState().subscribe(()=>{D()||x.abort()});let H=null;try{if(!D()||nS(d))return!1;const V=Pf(i.attachments),oe=Af(pS(f,u),V,d.map(ce=>({contextItemId:ce.id,attachmentId:ce.attachmentId,path:ce.path}))),P=new Set([...oe.images,...oe.clips].map(ce=>ce.contextItemId));if(V.some(([ce])=>!P.has(ce))||oe.images.some(ce=>ce.mediaError)||oe.clips.some(ce=>ce.mediaError)||!fS(l.text,oe))throw new Error("invalid-evidence");if(H=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!D())return!1;const k=await Ly.agents.get(u,f);if(!D())return!1;if(!k||k.workspaceId!==f||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const J=oe.clips.flatMap(ce=>ce.media?[ce.media]:[]);J.length&&!H&&(H=Yc({workspaceId:f,agentId:u,draftId:crypto.randomUUID(),principalId:R.principal.id,media:J},D,x.signal));const ge=ty(d,oe),Te=Cc(ge),ve=await ny({workspaceId:f,agentId:u,evidence:oe,clickedItems:d,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Te.imageBlocks,fileBlocks:Te.fileBlocks},binding:I,service:H?.service??null,current:D,onRecord:()=>{}});return!ve||!D()?!1:El(O,u,ve)}catch{return D()&&O.dispatch(ab(u,g.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",F),await H?.dispose(),wc.delete(M)}}const sv=1e4,Up={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function zp(n){return kS(n.messageMetadata)}function rx(n,r){if(n.some(zp)){const a=n[0];return a&&!zp(a)&&jp(a,r)?[a.id]:[]}return n.filter(a=>jp(a,r)).map(a=>a.id)}function ax(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function jp(n,r){return!n.requeuedAfterFailure&&xS(n,r)}function sx(n,r){const{busy:a,queue:i,delivered:d,now:l}=r,f=r.blocked||r.interrupted,u=r.timeoutMs??sv;let w=n.prediction;if(w){const x=new Set(i.map(H=>H.id)),F=w.ids.filter(H=>x.has(H)&&!d.has(H)),D=l-w.startedAt>=u,T=n.wasBusy&&!a;!F.length||D||f&&!a||T?w=null:F.length!==w.ids.length&&(w={...w,ids:F})}const v=n.wasBusy&&!a,R=n.wasBusy?n.busySince:a?l:null,I=n.wasBusy&&n.preempted||R!==null&&r.directSendAt!==null&&r.directSendAt>R;if(!w&&v&&!f&&!I){const x=rx(i,l).filter(F=>!d.has(F));x.length&&(w={ids:x,startedAt:l})}const M={wasBusy:a,busySince:a?R:null,preempted:a&&I,prediction:w};return n.wasBusy===M.wasBusy&&n.busySince===M.busySince&&n.preempted===M.preempted&&n.prediction===M.prediction?n:M}class ox{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let d;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(f=>{d=setTimeout(()=>f(!0),i)})]);if(clearTimeout(d),l)return!1}return!0}}function ix(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Gp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var lx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function ov(n,r){if(new.target)return ln({component:ov,...n});un(r,!0);const a=()=>pe(R,"$typing$",i),[i,d]=Ur();let l=Z(r,"workspaceId",7),f=Z(r,"agentId",7),u=Z(r,"class",7,"");const w=Bn(""),v=Bn("");ie(()=>{w.set(l())}),ie(()=>{v.set(f())});const R=rS(w,v),I=o(()=>u$(a()));var M={get workspaceId(){return l()},set workspaceId(H){l(H),ee()},get agentId(){return f()},set agentId(H){f(H),ee()},get class(){return u()},set class(H=""){u(H),ee()},$set:dn,$on:(H,V)=>cn(r,H,V)},x=Ot(),F=ye(x);{var D=H=>{var V=lx(),oe=S(V),P=S(oe);c$(P,{get people(){return a()},size:12,decorative:!0}),y(oe);var k=_(oe,2),J=de(k,!0);vn(2),y(V),q(()=>{ke(V,1,`${Of} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${u()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(J,e(I))}),p(H,V)};N(F,H=>{e(I)&&H(D)})}p(n,x);var T=gn(M);return d(),T}const dx=50,cx=5e3,ux=500,gx=()=>({authority:()=>Pi(O.state),persistSnapshot:ay,dispatch:n=>O.dispatch(n),ownerView:n=>sy.withStore(O)(n)});function px(n){const r=n.store??gx(),a=crypto.randomUUID();let i=he(!1),d=he(!1),l=he(!1),f=null,u=null,w=0,v=!1,R=null,I=null,M=null,x=0,F=null,D=null;const T={};let H,V=he([]),oe=null,P=0,k="",J=0,ge="";const Te=()=>{const B=n.workspaceId(),C=n.agentId();if(!B||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||v)return null;const Me=n.inputValue(),L=ce(),X=H?.shared,Y=X?.workspaceId===B&&X.agentId===C?X.lifetime:null,we=JSON.stringify([re,B,C,x,Y,L.map(z=>[z.id,z.attachmentId,z.path])]);we!==ge&&(ge=we,J+=1);const De=JSON.stringify([re,B,C,Me,L,x]);return De!==k&&(k=De,P+=1),{authority:re,ownerId:a,workspaceId:B,agentId:C,text:Me,attachments:JSON.parse(JSON.stringify(L)),generation:P,attachmentEpoch:J}};let ve=null;const ce=()=>jI(n.contextItems(),GI(n.contextItems(),e(V))),be=B=>{if(H=B,!B||v)return;const C=B.restore;if(D&&C?.requestId===D.requestId&&C.status!=="pending"){const{apply:L}=D;D=null,b(d,!1),C.status==="restored"&&b(V,C.draft?.attachments??[]),L(C)}const re=B.shared;if(re&&!e(d)&&u===`${re.workspaceId}\0${re.agentId}`){const L=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(oe!==L){oe=L;const X=ve??f,Y=X&&n.inputValue()===X.text&&JSON.stringify(ce())===X.attachmentsJson;re.origin===a?ve={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:Y&&(w+=1,M&&clearTimeout(M),b(V,re.snapshot.attachments),ve=f={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(Il(e(V))),n.applyEditorContent(re.snapshot.text))}}dt(Te);const Me=[];for(const L of B.saves){if(L.status==="pending")continue;Me.push(L.id);const X=T[L.id];delete T[L.id],X?.(L)}Me.length>0&&queueMicrotask(()=>r.dispatch(lb(a,Me)))},ne=(B,C,re)=>{const Me=crypto.randomUUID();D={requestId:Me,apply:re},b(d,!0),r.dispatch(cb(a,Me,B,C))},te=()=>{D&&(D=null,b(d,!1),r.dispatch(gb(a)))},Be=()=>{const B=F;B&&(F=null,r.dispatch(ub(a)),H?.saves.some(C=>C.id===B)||delete T[B])};r.dispatch(sb(a));const se=r.ownerView(a).subscribe(B=>dt(()=>be(B))),me=()=>{I&&(clearTimeout(I),I=null),b(l,!1)},Ee=()=>{F&&(F=null,r.dispatch(db(a)))};ie(()=>{const B=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!B){dt(()=>{w+=1,u=null,te(),R&&clearTimeout(R),R=null,me(),M&&clearTimeout(M),M=null,b(i,!1),Ee()});return}if(!C||!re)return;const Me=`${C}\0${re}`;if(u===Me)return;const L=u!==null;u=Me;const X=++w;dt(()=>{f=null,ve=null,oe=null,b(V,[]),R&&clearTimeout(R),me(),M&&(clearTimeout(M),M=null),L&&(Ee(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const Y=ry(C,re);if(Y){b(V,Y.attachments),b(i,!1);const De=n.contextItems().length>0,z=Y.text,Ie=JSON.stringify(Y.attachments);n.setInputValue(Y.text),De||n.setContextItems(Il(Y.attachments)),n.applyEditorContent(Y.text),f={text:Y.text,attachmentsJson:Ie},ne(C,re,Ce=>{if(Ce.status!=="restored")return;const He=Ce.draft;if(v||!(n.active?.()??!0)||u!==Me||w!==X)return;const st=He?.text??"",Je=He?.attachments??[],Oe=JSON.stringify(Je);lc(C,re,{text:st,attachments:Je});const Pe=n.inputValue()===z&&JSON.stringify(ce())===Ie;De||!Pe||(st!==z&&(n.setInputValue(st),n.applyEditorContent(st)),Oe!==Ie&&n.setContextItems(Il(Je)),f={text:st,attachmentsJson:Oe})});return}b(i,!0),I=setTimeout(()=>{I=null,(n.active?.()??!0)&&b(l,!0)},ux),R=setTimeout(()=>{(n.active?.()??!0)&&(b(i,!1),me())},cx);const we=()=>{!(n.active?.()??!0)||u!==Me||w!==X||(R&&clearTimeout(R),b(i,!1),me())};ne(C,re,De=>{if(De.status!=="restored"){we();return}const z=De.draft;if(v||!(n.active?.()??!0)||u!==Me||w!==X)return;const Ie=!!n.inputValue();if(!Ie&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Il(z.attachments)),!Ie&&z?.text&&(n.setInputValue(z.text),M=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},dx)),f===null){const Ce=z?.text??"",He=z?.attachments??[];f={text:Ce,attachmentsJson:JSON.stringify(He)},lc(C,re,{text:Ce,attachments:He})}we()})})}),ie(()=>{const B=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Me=e(i);if(!B){dt(Be);return}if(!C||!re)return;const L=n.inputValue(),X=ce();if(dt(Te),dt(Be),Me||f===null&&!L&&X.length===0)return;const Y=JSON.stringify(X);if(f!==null&&f.text===L&&f.attachmentsJson===Y)return;JSON.stringify(e(V))!==Y&&b(V,X);const we=`${C}\0${re}`,De=x,z=crypto.randomUUID();T[z]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){u===we&&x===De&&(f={text:L,attachmentsJson:Y});return}n.onSaveError?.(new Error(Ie.error))}},dt(()=>{F=z,r.dispatch(ob(a,z,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:L,attachments:X,rollback:f?{text:f.text,attachments:JSON.parse(f.attachmentsJson)}:null}))})}),ie(()=>()=>{v=!0,R&&clearTimeout(R),I&&clearTimeout(I),M&&clearTimeout(M),Ee(),se(),r.dispatch(ib(a))});const qe=B=>{const C=Te();return C!==null&&C.authority===B.authority&&C.ownerId===B.ownerId&&C.workspaceId===B.workspaceId&&C.agentId===B.agentId&&C.generation===B.generation&&C.text===B.text&&JSON.stringify(C.attachments)===JSON.stringify(B.attachments)};return{captureDraft:Te,isCurrentDraft:qe,updateAttachmentScreen(B,C,re){return!qe(B)||!B.attachments.some(Me=>Me.id===C)?null:(b(V,B.attachments.map(Me=>Me.id===C?{...Me,screen:structuredClone(re)}:Me)),Te())},async flushDraft(B){if(!qe(B))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,B.workspaceId,B.agentId,B,B.authority),qe(B)},get restorePending(){return e(d)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(w+=1,x+=1,te(),R&&(clearTimeout(R),R=null),M&&(clearTimeout(M),M=null),b(i,!1),me(),Be(),u!==null){const[B,C]=u.split("\0");lc(B,C,{text:"",attachments:[]}),ve=null,b(V,[]),f={text:"",attachmentsJson:"[]"}}}}}function Ei(n){if(!n)return null;const r=Af(JSON.stringify([n.workspaceId,n.agentId]),Pf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(d=>d.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function fx(n,r,a){const i=O.state.principal.snapshot,d=()=>Pi(O.state)===n.authority&&a.isCurrentDraft(n);if(!i||!d()||!await a.flushDraft(n)||!d())return{ready:!1};const l=new AbortController,f=Yc({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},d,l.signal);try{const u=await f.readiness();return!d()||!u.ok?{ready:!1}:u.value.find(w=>w.sourceId===r.source.id)??{ready:!1}}finally{await f.dispose()}}function Vp(n){let r=he(null),a=he(!1),i=he(!1),d=null,l=!0,f=0,u=null;Es(()=>{l=!1,f++}),ie(()=>{const I=n.capture();e(r)&&(!I||I.authority!==e(r).capture.authority||I.ownerId!==e(r).capture.ownerId||I.workspaceId!==e(r).capture.workspaceId||I.agentId!==e(r).capture.agentId||I.attachmentEpoch!==e(r).capture.attachmentEpoch)&&b(r,null)});async function w(I){if(n.disabled()||e(a))return;const M=n.drafts.captureDraft(),x=Ei(M),F=x?.clips.find(V=>V.contextItemId===I);if(!M||!F?.media||!x)return;const D=oy({workspaceId:M.workspaceId,agentId:M.agentId,clip:F,evidence:x,marks:x.marks}),T=_f(M.workspaceId,F.path);if(!D||!T)return;const H=++f;d=document.activeElement instanceof HTMLElement?document.activeElement:null,b(a,!0),b(i,!1);try{if(await n.beforeOpen?.(),!l||f!==H||!n.drafts.isCurrentDraft(M))return;const V=await(n.prepareOutput??fx)(M,F.media,n.drafts);if(!l||f!==H||!n.drafts.isCurrentDraft(M))return;const{attachmentPath:oe,...P}=D;b(r,{capture:M,contextItemId:I,snapshot:{...P,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&f===H&&b(i,!0)}finally{l&&f===H&&b(a,!1)}}async function v(I){const M=crypto.randomUUID(),x=e(r),F=n.drafts.captureDraft();if(!x||!F||F.authority!==x.capture.authority||F.ownerId!==x.capture.ownerId||F.workspaceId!==x.capture.workspaceId||F.agentId!==x.capture.agentId||F.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:M,result:"stale-source"};const D=Ei(F),T=D?.clips.find(J=>J.contextItemId===x.contextItemId);if(!D||!T?.media)return{requestId:M,result:"stale-source"};const V=u?.openId===x.snapshot.openId&&u.inputRevision===I.revision&&JSON.stringify(u.media)===JSON.stringify(T.media)?{...I,revision:T.media.saved?.revision??0}:I,oe=vS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:F.workspaceId,agentId:F.agentId},sourceId:I.sourceId,sourceRevision:I.sourceRevision,expectedEditRevision:V.revision,edit:V});if(oe.status!=="saved")return{requestId:M,result:oe.status==="invalid-edit"?"failed":oe.status};const P=hS({...D,clips:D.clips.map(J=>J.id===T.id?{...J,media:oe.media}:J)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(F,x.contextItemId,P);if(!k)return{requestId:M,result:"stale-source"};u={openId:x.snapshot.openId,media:oe.media,inputRevision:I.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:M,result:"stale-source"};await n.drafts.flushDraft(k);const J=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!J||J.attachmentEpoch!==x.capture.attachmentEpoch||J.authority!==k.authority||J.ownerId!==k.ownerId||J.workspaceId!==k.workspaceId||J.agentId!==k.agentId||JSON.stringify(J.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(P)?{requestId:M,result:"stale-source"}:(u=null,{requestId:M,result:"saved",saved:oe.media.saved??void 0})}catch{return{requestId:M,result:"failed"}}}function R(I){return n.disabled()||!n.onRemove(I)?!1:(e(r)?.contextItemId===I&&b(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:w,save:v,remove:R,close(){b(r,null)},restoreFocus(){d?.isConnected&&d.focus()}}}var vx=E('<p role="alert"> </p>'),hx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),mx=E("<!> <!> <!>",1);function iv(n,r){if(new.target)return ln({component:iv,...n});un(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),d=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),f=Z(r,"controllerFactory",7,Vp),u=Z(r,"beforeOpen",7),w=Z(r,"onReviewChange",7);const v=dt(()=>f()({drafts:i(),capture:()=>a(),disabled:()=>d(),onRemove:P=>l()(P),beforeOpen:()=>u()?.()??Promise.resolve()}));ie(()=>{const P=v.opening,k=v.session;dt(()=>w()?.(P,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const R=o(iy),I=o(()=>Ei(a())),M=o(()=>e(I)?.clips.map(P=>({id:P.contextItemId,kind:"clip",owner:"evidence",duration:Tp(P.durationMs),recording:!1,url:a()?_f(a().workspaceId,P.path):void 0,...P.media?.saved?{summary:ly(P.media.saved)}:{}}))??[]);let x=he(null);var F={get capture(){return a()},set capture(P){a(P),ee()},get drafts(){return i()},set drafts(P){i(P),ee()},get disabled(){return d()},set disabled(P=!1){d(P),ee()},get onRemove(){return l()},set onRemove(P){l(P),ee()},get controllerFactory(){return f()},set controllerFactory(P=Vp){f(P),ee()},get beforeOpen(){return u()},set beforeOpen(P){u(P),ee()},get onReviewChange(){return w()},set onReviewChange(P){w(P),ee()},$set:dn,$on:(P,k)=>cn(r,P,k)},D=mx(),T=ye(D);{let P=o(()=>d()||v.opening);CS(T,{get items(){return e(M)},get labels(){return e(R)},get disabled(){return e(P)},onEdit:k=>void v.open(k),onMarkUp:k=>void v.open(k),get onRemove(){return v.remove}})}var H=_(T,2);{var V=P=>{var k=vx(),J=de(k,!0);q(ge=>j(J,ge),[()=>g.dock_captureEditor_saveFailed_label()]),p(P,k)};N(H,P=>{v.problem&&P(V)})}var oe=_(H,2);{let P=o(()=>!!v.session),k=o(()=>g.dock_captureEditor_recording_title({duration:v.session?Tp(v.session.snapshot.durationMs??0):""}));I$(oe,{get open(){return e(P)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>v.close(),onCloseAutoFocus:J=>{J.preventDefault(),v.restoreFocus()},get contentRef(){return e(x)},set contentRef(J){b(x,J,!0)},children:(J,ge)=>{var Te=Ot(),ve=ye(Te);{var ce=be=>{var ne=Ot(),te=ye(ne);xi(te,()=>v.session.snapshot.openId,Be=>{var se=hx(),me=S(se);$$(me,{get snapshot(){return v.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>v.close(),get onSave(){return v.save},onDelete:async()=>!!v.session&&v.remove(v.session.contextItemId)}),y(se),p(Be,se)}),p(be,ne)};N(ve,be=>{v.session&&be(ce)})}p(J,Te)},$$slots:{default:!0}})}return p(n,D),gn(F)}const Cl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function _x(n){let r=he(!1),a=he(!1),i=he(null),d=!1,l=0,f=null,u=null;async function w(I){I.abort.abort(),I.slot?.cancel(),await I.native?.dispose()}async function v(){l++;const I=u;u=null,I&&await w(I)}no(()=>{const I=()=>{b(r,document.hasFocus(),!0)};return I(),window.addEventListener("focus",I),window.addEventListener("blur",I),()=>{window.removeEventListener("focus",I),window.removeEventListener("blur",I)}});const R=O.getReadableState().subscribe(()=>{u&&!u.current()&&v()});return Es(()=>{d=!0,R(),v()}),ie(()=>{const I=n.capture(),M=I?Cl(I):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===M);dt(()=>{if(!x||!I){v();return}if(u?.key===M)return;if(f===M){v();return}v();const D=Ei(I)?.clips.flatMap(Te=>!Te.mediaError&&Te.media?[Te.media]:[])??[],T=D[0],H=O.state.principal.snapshot,V=Dl.select(O.state,I.workspaceId);if(!T||!H||!V||n.drafts.gateActive)return;const oe=hf(),P=new AbortController,k=()=>!d&&!P.signal.aborted&&Pi(O.state)===I.authority&&Dl.select(O.state,I.workspaceId)===V&&mf(oe)&&!!n.capture()&&Cl(n.capture())===M,J={key:M,capture:I,abort:P,native:null,slot:null,current:k};u=J;const ge=l;n.drafts.flushDraft(I).then(async Te=>{if(!(u!==J||ge!==l||!k())){if(!Te){f=M,await v();return}J.native=Yc({workspaceId:I.workspaceId,agentId:I.agentId,draftId:crypto.randomUUID(),principalId:H.principal.id,media:structuredClone(D)},k,P.signal),J.slot=dy(J.native.service),f=M,J.slot.warm(M,T,k)}}).catch(()=>{u===J&&v()})})}),{cancel:v,async beforeEditorOpen(){b(a,!0),f=null,await v()},editorState(I,M){b(a,I,!0);const x=M?Cl(M.capture):null;M&&e(i)?.openId!==M.openId&&(f=null),b(i,M&&x?{openId:M.openId,key:x}:null)},take(I,M){const x=u;if(!x?.native||!x.slot||x.key!==Cl(I)||!x.current())return v(),null;u=null,l++;const F=x.native,D=x.slot,T=()=>x.abort.abort();return M.addEventListener("abort",T,{once:!0}),M.aborted&&T(),{service:{...F.service,takePreparedRecording:H=>D.take(x.key,H,()=>!M.aborted&&x.current())},async dispose(){M.removeEventListener("abort",T),await w(x)}}}}}var bx=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function lv(n,r){if(new.target)return ln({component:lv,...n});un(r,!1);var a={$set:dn,$on:(f,u)=>cn(r,f,u)};Ff();var i=bx(),d=S(i),l=de(d,!0);return y(i),q(f=>j(l,f),[()=>g.chat_draftGate_loading_label()]),p(n,i),gn(a)}var wx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function qc(n,r){if(new.target)return ln({component:qc,...n});un(r,!1);var a={$set:dn,$on:(f,u)=>cn(r,f,u)};Ff();var i=wx(),d=_(S(i),2),l=de(d,!0);return vn(2),y(i),q((f,u)=>{Ne(i,"aria-label",f),j(l,u)},[()=>g.chat_newMessagesDivider_label(),()=>g.chat_newMessagesDivider_label()]),p(n,i),gn(a)}function yx(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Ix(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Sx(n,r){return r&&n.includes(r)?r:null}function Kp(n,r,a){return r-n<=a}const $x=.2;function Qp(n,r,a){const i=Math.max(0,a-r),d=n-$x*r;return Math.min(Math.max(0,d),i)}function kx(n,r,a){return n!==null&&a&&n===r}function xx(n){return n?pb(n)&&fb(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Cx(n){const r=[],a=new Set;let i,d;for(const H of n.messages){if(H.agentId&&H.agentId!==n.agentId){i=void 0,d=void 0;continue}if(a.has(H.id))continue;a.add(H.id),n.breakBeforeMessageIds?.has(H.id)&&(i=void 0,d=void 0);const V=PS(H);if(V?.kind!=="turn-failure")d=void 0;else{const oe=i?.seq!==void 0&&H.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(H.seq)&&H.seq===i.seq+1;(!d||!oe)&&(d={key:JSON.stringify([n.agentId,"notice",H.id]),anchorMessageId:H.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(d)),d.records.push({messageId:H.id,reason:V.reason,timestamp:H.timestamp}),d.recordedFailureCount+=1}i=H}const l=new Map;for(const H of n.queue){if(!H.requeuedAfterFailure)continue;const V=H.turnId||void 0,oe=JSON.stringify([n.agentId,V?"turn":"queue",V??H.id]);let P=l.get(oe);P||(P={key:oe,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(oe,P)),P.queueIds.includes(H.id)||P.queueIds.push(H.id)}const f=[...l.values()],u=n.session?.id===n.agentId?n.session:void 0,w=u?.status===$i.Error,v=n.transientError||w&&u.stopReason||null,R=w&&!v,I=w&&(!n.transientError||n.transientError===u.stopReason)?u.stopReasonTimestamp:void 0,M=I?wp(I):null,x=M&&v&&v===u?.stopReason?r.flatMap(H=>H.records).filter(H=>H.reason===v&&wp(H.timestamp)===M):[],F=x.length===1?x[0].messageId:void 0,T=(u?If(u):!1)?"attempting":f.length?"queued":v||R?"action-needed":"inactive";return{history:r,queueRecovery:f,current:{state:T,error:v,needsFallbackReason:R,timestamp:I,noticeId:F}}}function Px(n,r){const a=n.hiddenTail[0]?.id,i=Cx({...r,messages:[...n.groups.flatMap(u=>u.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),d=i.current.noticeId,l=i.history.map(u=>({...u,records:u.records.filter(w=>w.messageId!==d)})).filter(u=>u.records.length>0),f=new Set(l.map(u=>u.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(u=>[u.records[0].messageId,u])),collapsedMessageIds:new Set(i.history.flatMap(u=>u.records.map(w=>w.messageId).filter(w=>!f.has(w))))}}var Rx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Tx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Ax=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Mx=E('<div class="mb-5"><!></div>'),Ex=E('<p data-testid="agent-welcome-description"> </p> <!>',1),qx=E("<!> <!>",1),Lx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),Hx=E("<!> <span> </span>",1),Ox=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function dv(n,r){if(new.target)return ln({component:dv,...n});un(r,!0);const a=()=>pe(x,"$userOverrides$",f),i=()=>pe(M,"$specialists$",f),d=()=>pe(H,"$isGitHubAuth$",f),l=()=>pe(V,"$recentSpecialistIds$",f),[f,u]=Ur();let w=Z(r,"onSpecialistChange",7),v=Z(r,"session",7),R=Z(r,"workspaceId",7);const I=Bn(R()??"");ie(()=>I.set(R()??""));const M=zf(I),x=G$();ie(()=>{a()});const F=o(()=>{if(!v()||zy(v()))return null;const B=v().metadata?.specialist||v().agentMetadata?.specialist;return B&&i().find(C=>C.id===B)||null});async function D(B){B?await zl({specialist:B,hash:"specialists"}):await zl({view:"create-specialist"})}let T=he(!1);const H=V$(),V=aS(),oe=o(()=>vb(K$(i(),d()),l()));let P=he(!1);const k=o(()=>g.chat_regularAgentWelcome_generalDescription_label()),J=o(()=>e(F)?.name??g.chat_shared_general_fallback()),ge=o(()=>e(F)?.description??g.chat_shared_noSpecializedBehavior_label()),Te=o(()=>e(F)?e(F).defaultBehaviorPrompt||"":e(k));var ve={get onSpecialistChange(){return w()},set onSpecialistChange(B){w(B),ee()},get session(){return v()},set session(B){v(B),ee()},get workspaceId(){return R()},set workspaceId(B){R(B),ee()},$set:dn,$on:(B,C)=>cn(r,B,C)},ce=Ox(),be=S(ce);{var ne=B=>{var C=Mx(),re=S(C);ok(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(P)},set open(X){b(P,X,!0)},trigger:(X,Y)=>{let we=()=>(Y?.()).props;{let De=o(()=>Wc("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));It(X,qi(we,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(De)},"data-testid":"specialist-picker-trigger",children:(z,Ie)=>{var Ce=Rx(),He=ye(Ce),st=S(He);{let Se=o(()=>e(F)?.id??null),Ae=o(()=>e(F)?.icon??null);sk(st,{agentId:"blank",variant:"emphasized",get specialist(){return e(Se)},get icon(){return e(Ae)}})}y(He);var Je=_(He,2),Oe=S(Je),Pe=de(Oe,!0),G=_(Oe,2),ae=de(G,!0);y(Je);var Le=_(Je,2),Q=S(Le);ft(Q,{get icon(){return Na},size:10}),y(Le),q(()=>{j(Pe,e(J)),j(ae,e(ge))}),p(z,Ce)},$$slots:{default:!0}}))}},content:X=>{var Y=Ax(),we=S(Y),De=S(we),z=de(De,!0),Ie=_(De,2),Ce=de(Ie,!0);y(we);var He=_(we,2),st=S(He);{let Pe=o(()=>e(F)?.id??null);V_(st,{get specialists(){return e(oe)},get value(){return e(Pe)},onchange:G=>{b(P,!1),w()?.(G)}})}y(He);var Je=_(He,2),Oe=S(Je);Rt(Oe,()=>Br,(Pe,G)=>{G(Pe,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{b(P,!1),D()},children:(ae,Le)=>{var Q=Tx(),Se=ye(Q),Ae=S(Se);ft(Ae,{get icon(){return R$},size:12}),y(Se);var ze=_(Se,2),Ge=de(ze,!0);q(We=>j(Ge,We),[()=>g.chat_regularAgentWelcome_createSpecialist_label()]),p(ae,Q)},$$slots:{default:!0}})}),y(Je),y(Y),q((Pe,G)=>{j(z,Pe),j(Ce,G)},[()=>g.workspace_createAgentSection_specialists_label(),()=>g.workspace_createAgentSection_specialists_description()]),p(X,Y)},$$slots:{trigger:!0,content:!0}}),y(C),p(B,C)};N(be,B=>{w()&&B(ne)})}var te=_(be,2);{var Be=B=>{var C=Ot(),re=ye(C);{let Me=o(()=>g.chat_specialistSelector_prompt_label());Rt(re,()=>lk,(L,X)=>{X(L,{class:"mb-3",role:"region",get"aria-label"(){return e(Me)},children:(Y,we)=>{var De=qx(),z=ye(De);Rt(z,()=>rv,(Ce,He)=>{He(Ce,{children:(st,Je)=>{var Oe=Ot(),Pe=ye(Oe);Rt(Pe,()=>av,(G,ae)=>{ae(G,{class:"type-caption font-medium",children:(Le,Q)=>{vn();var Se=on();q(Ae=>j(Se,Ae),[()=>g.chat_specialistSelector_prompt_label()]),p(Le,Se)},$$slots:{default:!0}})}),p(st,Oe)},$$slots:{default:!0}})});var Ie=_(z,2);Rt(Ie,()=>ik,(Ce,He)=>{He(Ce,{children:(st,Je)=>{var Oe=Ex(),Pe=ye(Oe),G=de(Pe,!0),ae=_(Pe,2);It(ae,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>b(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Le,Q)=>{vn();var Se=on();q(Ae=>j(Se,Ae),[()=>e(T)?g.chat_regularAgentWelcome_showLess_label():g.chat_regularAgentWelcome_showMore_label()]),p(Le,Se)},$$slots:{default:!0}}),q(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(G,e(Te))}),p(st,Oe)},$$slots:{default:!0}})}),p(Y,De)},$$slots:{default:!0}})})}p(B,C)},se=B=>{var C=Lx(),re=de(C,!0);q(()=>j(re,e(Te))),p(B,C)};N(te,B=>{e(F)?B(Be):B(se,-1)})}var me=_(te,2);{var Ee=B=>{It(B,{variant:"ghost-light",size:"sm",onclick:()=>D(e(F).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(C,re)=>{var Me=Hx(),L=ye(Me);ft(L,{get icon(){return P$},size:12,class:"opacity-60"});var X=_(L,2),Y=de(X,!0);q(we=>j(Y,we),[()=>g.chat_regularAgentWelcome_customize_label()]),p(C,Me)},$$slots:{default:!0}})};N(me,B=>{e(F)&&B(Ee)})}y(ce),p(n,ce);var qe=gn(ve);return u(),qe}var Fx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Dx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Nx=E('<span class="type-caption"> </span>'),Bx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Wx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Xc(n,r){if(new.target)return ln({component:Xc,...n});un(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),d=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),f=Z(r,"showShortcutHints",7,!1),u=Z(r,"reserveShortcutHintSpace",7,!1),w=Z(r,"workspaceId",7);const R=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",I=s$.replace("text-ui","type-caption");function M(k){i()(k)}function x(k,J){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),M(J))}function F(k,J){k.preventDefault(),k.stopPropagation(),Mc(J,{workspaceId:w(),event:k})}function D(k,J){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Mc(J,{workspaceId:w(),event:k}))}function T(k){return k<3}var H={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return d()},set onEdit(k){d(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return f()},set showShortcutHints(k=!1){f(k),ee()},get reserveShortcutHintSpace(){return u()},set reserveShortcutHintSpace(k=!1){u(k),ee()},get workspaceId(){return w()},set workspaceId(k){w(k),ee()},$set:dn,$on:(k,J)=>cn(r,k,J)},V=Ot(),oe=ye(V);{var P=k=>{var J=Wx(),ge=S(J);{const Te=(ce,be)=>{let ne=()=>(be?.()).item,te=()=>(be?.()).index;const Be=o(()=>Qw(ne())),se=o(()=>e(Be)[0]?.type==="text"?e(Be)[0].content:"");var me=Bx(),Ee=S(me),qe=S(Ee);ft(qe,{get icon(){return Df},size:16,get class(){return ur}}),y(Ee);var B=_(Ee,2),C=S(B),re=de(C,!0),Me=_(C);Dn(Me,17,()=>e(Be).slice(e(se)?1:0),z_,(z,Ie)=>{var Ce=Ot(),He=ye(Ce);{var st=Oe=>{const Pe=o(()=>Kw(e(Ie).url));var G=Fx(),ae=de(G,!0);q(()=>{Ne(G,"href",e(Pe)),Ne(G,"title",e(Pe)),j(ae,e(Ie).label)}),ps("click",G,Le=>F(Le,e(Pe))),ps("keydown",G,Le=>D(Le,e(Pe))),p(Oe,G)},Je=Oe=>{var Pe=on();q(()=>j(Pe,e(Ie).content)),p(Oe,Pe)};N(He,Oe=>{e(Ie).type==="link"?Oe(st):Oe(Je,-1)})}p(z,Ce)}),y(B);var L=_(B,2);{var X=z=>{var Ie=Dx();let Ce;var He=de(Ie);q(()=>{Ce=ke(Ie,1,`${I??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!f()}),Ne(Ie,"aria-hidden",f()?void 0:"true"),Ne(Ie,"data-hint-visible",f()),j(He,`${R}${te()+1}`)}),p(z,Ie)},Y=o(()=>T(te())&&(f()||u()));N(L,z=>{e(Y)&&z(X)})}var we=_(L,2);{var De=z=>{C$(z,{side:"top",delayDuration:300,trigger:He=>{{let st=o(()=>g.chat_suggestedPrompts_editInInput_ariaLabel());It(He,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:Je=>{Je.stopPropagation(),d()(ne())},get"aria-label"(){return e(st)},children:(Je,Oe)=>{ft(Je,{get icon(){return T$},size:"xs"})},$$slots:{default:!0}})}},content:He=>{var st=Nx(),Je=de(st,!0);q(Oe=>j(Je,Oe),[()=>g.chat_suggestedPrompts_edit_tooltip()]),p(He,st)},$$slots:{trigger:!0,content:!0}})};N(we,z=>{d()&&z(De)})}y(me),q(z=>{ke(me,1,`${Of} ${a$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),ke(Ee,1,`${Bl??""} mt-px self-start`),Ne(C,"aria-label",z),j(re,e(se))},[()=>Vw(ne())]),ps("click",C,z=>{z.stopPropagation(),M(ne())}),ps("keydown",C,z=>x(z,ne())),p(ce,me)};let ve=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");S$(ge,{get items(){return a()},virtualize:!1,onActivate:M,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(ve)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Te,$$slots:{row:!0}})}y(J),Lt(1,J,()=>ma,()=>({tier:"fast",y:0,scale:1})),Lt(2,J,()=>eo,()=>({tier:"fast"})),p(k,J)};N(oe,k=>{a().length>0&&k(P)})}return p(n,V),gn(H)}Bc(["click","keydown"]);var Ux=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function cv(n,r){if(new.target)return ln({component:cv,...n});un(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const d=o(()=>[{label:g.chat_chiefEmptyState_assignedPrs_label(),prompt:g.chat_chiefEmptyState_assignedPrs_prompt()},{label:g.chat_chiefEmptyState_staleWorkspaces_label(),prompt:g.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:g.chat_chiefEmptyState_agentPerformance_label(),prompt:g.chat_chiefEmptyState_agentPerformance_prompt()},{label:g.chat_chiefEmptyState_morningBrief_label(),prompt:g.chat_chiefEmptyState_morningBrief_prompt()},{label:g.chat_chiefEmptyState_randomTheme_label(),prompt:g.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(d).map(M=>M.label));function f(M){const x=e(d).find(F=>F.label===M);x&&a()(x.prompt)}var u={get onSelect(){return a()},set onSelect(M){a(M),ee()},get compact(){return i()},set compact(M=!1){i(M),ee()},$set:dn,$on:(M,x)=>cn(r,M,x)},w=Ux(),v=S(w),R=de(v,!0),I=_(v,2);return Xc(I,{get prompts(){return e(l)},onSelect:f,get compact(){return i()}}),y(w),q(M=>j(R,M),[()=>g.chat_chiefEmptyState_intro_label()]),p(n,w),gn(u)}const Zc=2e3,zx=4e3,jx=zx-Zc-2;function Gx(n,r=Zc){const a=[];let i=0;for(let d=n.length-1;d>=0&&i<r;d-=1){const l=n[d];if(l.role!=="user"&&l.role!=="assistant")continue;const f=(l.contentBlocks??[]).filter(w=>w.type==="text").map(w=>w.text||w.content||"").join(""),u=(l.role==="assistant"?K_(f).cleanedContent:f).trim();u&&(a.unshift({role:l.role,text:u}),i+=u.length)}return a}function Vx(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
|
|
1
|
+
var N_=Object.defineProperty;var Fg=n=>{throw TypeError(n)};var B_=(n,r,a)=>r in n?N_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>B_(n,typeof r!="symbol"?r+"":r,a),W_=(n,r,a)=>r.has(n)||Fg("Cannot "+a);var Ro=(n,r,a)=>(W_(n,r,"read from private field"),a?a.call(n):r.get(n)),Dg=(n,r,a)=>r.has(n)?Fg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as ln,bo as Z,bw as dn,bp as cf,b as cn,bm as g,bq as Ur,bs as pe,br as qi}from"./CHWIPzMj.js";import{bs as un,a5 as S,bf as fs,bA as y,W as p,bn as gn,aA as ee,aB as E,ca as ie,a7 as Ot,ay as ye,aD as e,cd as Bn,c9 as o,bS as _,bl as de,be as vn,b_ as q,bO as j,c5 as dt,bH as b,bV as he,bj as Es,bk as no,b$ as on,ai as Bc,aj as ps,bo as jl,br as Mr,c0 as qt,cb as sc,aw as bi,a as U_}from"./3SdAC2_C.js";import{i as N}from"./DDtBtnNz.js";import{k as xi}from"./DPbAP8qP.js";import{g as Dn,i as z_,I as qo,p as Lo,e as Mo}from"./Bqdjarag.js";import{n as Lt,l as ma,c as eo,j as Ng,k as Fo,h as j_}from"./D_gp0b_i.js";import{b as uf,e as Wc,f as ke,s as Ne,c as Wt,g as gs}from"./B09v4S72.js";import{b as G_}from"./goTpbPhD.js";import{b as br}from"./Dn334wJv.js";import{m as V_,U as K_,Z as Q_,X as J_,Y as Y_,I as Bg,o as X_,l as Z_,a2 as eb,x as Wg,$ as tb,a0 as Ug,r as nb,s as rb}from"./C-nHSAUo.js";import{Jt as O,fo as ab,eW as sb,f3 as ob,eX as ib,f1 as lb,f0 as db,eZ as cb,e$ as ub,eY as gb,ru as pb,c6 as fb,i as $i,J2 as vb,Db as gf,Dg as hb,Di as zg,Df as mb,Dh as _b,vD as bb,vF as wb,Co as pf,cp as yb,cn as Ib,Bx as Sb,bE as $b,A3 as kb,Cd as oc,u$ as xb,cq as jg,dB as Cb,dC as Pb,Cn as Rb,el as Tb,CH as Ab,CG as Mb,CL as Eb,CK as qb,cQ as Lb,cT as Hb,nC as Ob,er as Fb,wR as Db,CM as Nb,wT as Bb,CN as Wb,cU as Ub,cV as zb,nK as jb,Ag as Gb,Ds as Vb,wm as Kb,wn as Qb,y$ as Jb,z3 as ic,wi as Yb,wj as Xb,rS as Zb,rf as ew,rd as tw,f_ as nw,HN as rw,Lh as aw,GL as sw,gn as ow,p2 as iw,Jh as lw,oj as dw,A2 as cw,ft as Gg,r2 as Vg,fm as uw,fl as gw,tB as pw,g3 as Kg,re as fw,fe as vw,C8 as hw,m as mw,nL as _w,zH as bw,yZ as ww,Ey as yw,En as Qg,xh as Iw,xi as Jg,u_ as Yg,p3 as Sw,DE as $w,gj as kw,g1 as xw,eU as Cw,cM as Pw,A6 as Rw,Lm as Tw,Ct as Aw,LE as Mw,y2 as Ew,ga as qw,fd as Lw,cL as Hw,cI as Ow,cH as Fw,vr as Dw,xo as Nw,xm as Bw,cF as Ww,cE as Uw,z5 as zw,z0 as jw,xn as Gw}from"./DJM-jC4D.js";import{a as Uc}from"./CC7to1B5.js";import{aM as Vw,aL as Kw,bg as Qw,a7 as Jw,aD as Yw,aO as Xw,M as ff,a0 as vf,b8 as Zw,b2 as ey,as as Xg,P as wl,b0 as Zg,a$ as ep,a_ as tp}from"./BFHz4Mic.js";import{k as hf,F as ty,G as Cc,ar as ny,a_ as El,a8 as mf,Q as ry,aT as lc,ao as ay,aG as sy,B as oy,y as _f,r as iy,z as ly,u as dy,aY as cy,aE as bf,aD as wf,aF as uy,aJ as dc,aQ as np,aP as yl,aR as rp,P as ap,d as gy,e as py,av as fy,V as sp,aC as vy,c as hy,l as my,aS as op,an as _y,au as ip,a as by,ay as wy,ac as lp,aB as yy,aU as dp,aX as cp,m as up,ad as Iy,R as Sy,aw as gp,ak as $y,O as ky,aq as xy,h as Cy,p as Py,_ as cc,Z as Ry,aA as pp,a7 as Ty,f as Ay,i as My,a5 as Ey,ab as qy}from"./CSCM9u80.js";import{f as Ly,o as Hy,E as Oy,C as Fy,m as Dy,a2 as fp,aa as Ny,K as By,e as Wy,y as Uy}from"./CWVqIb-d.js";import{g as Pi}from"./DypB-Dwi.js";import{dV as Dl,cT as yf,O as If,W as zy,bu as jy,aF as Sf,dG as $f,aU as Eo,e7 as Gy,dv as kf,aw as zc,dU as jc,aN as xf,cO as Vy,V as ha,a3 as Xs,B as Ky,a7 as Qy,a4 as Jy,M as Yy,a6 as Xy,ar as Zy,aG as Cf,aO as ql,r as eI,n as Pc,H as tI,dX as nI,aQ as rI,aK as aI,c8 as sI,aW as oI,bL as iI,bJ as lI,bK as dI,c7 as cI,c6 as uI,cM as gI,cL as pI,aS as fI,ba as vI,bc as hI,bf as mI,bb as _I,bk as bI,be as wI,bd as yI,bg as II,bh as SI,bj as $I,bi as kI,ax as xI,ay as CI,ci as PI,cj as RI,du as TI,dt as AI,a$ as MI,G as EI,b3 as qI,ce as LI,C as vp,c$ as HI,b9 as cs,b_ as OI,X as FI,bp as DI,E as NI,ad as BI,t as WI,cV as UI,d2 as hp,Q as mp,ds as zI,cP as uc}from"./CB6JpnWC.js";import{u as Pf,a as Il,ag as jI,x as GI,ad as Rf,af as VI,ac as Tf,a4 as KI,F as _p,D as QI,e as JI,n as YI,s as XI,m as ZI,Y as eS,k as tS}from"./CeGIZnmi.js";import{a2 as nS,b5 as rS,cM as aS,a_ as sS,b4 as oS,c2 as iS,c9 as lS,w as dS,x as cS,cd as uS}from"./C99ttMY5.js";import{n as gS,P as Af,F as pS,ai as fS,r as vS,ac as hS}from"./C_a7D1qz.js";import{I as mS,s as _S,H as bp}from"./Bqd7fdCF.js";import{e as bS}from"./CL3a4Hm1.js";import{e as wS,f as yS}from"./B_7rDlJA.js";import{s as IS,o as Zs,b as SS,g as Nl,d as $S,l as wi}from"./CIyUrgF0.js";import{a5 as kS,a7 as xS,D as CS,N as PS,ac as wp,X as RS,i as TS,r as cr,v as Ri,u as na,p as ki,x as wr,S as Gc,m as Gl,s as Ho,y as Ti,o as ro,n as ao,t as yp,aa as so,w as oo,a9 as Vc,q as _a,z as Oo,J as Rc,_ as Ip,g as AS,F as MS,U as Mf,I as Ef,a8 as qf,a6 as Ll,O as ES,E as Lf,V as qS,A as LS,b as HS,ab as OS,ad as Sl,G as FS,e as gc,l as DS,C as NS,f as Ys,j as Sp,H as us,Q as BS,d as $l,c as WS,a as $p,h as US,L as zS,Y as kp,a4 as pc,a1 as xp,a0 as jS,a3 as Cp,$ as Pp,T as GS,B as VS,k as KS,a2 as QS,K as JS,R as YS,P as XS,W as ZS}from"./BVVYfWqp.js";import{m as e$}from"./Dms_DO28.js";import{g as Hf}from"./BI0xIaK5.js";import{b as t$}from"./CezXhCS3.js";import{g as n$}from"./B5OCsMya.js";import{a as r$}from"./C9of0fiN.js";import{q as Of,d as ur,r as a$,e as Bl,j as s$,g as Tc,i as o$,f as Ac,c as i$,A as l$,O as Rp,k as d$}from"./DFztsOdi.js";import{P as c$}from"./BkK6L2aU.js";import{e as u$}from"./CBoDYG4N.js";import{b as g$,a as p$,g as f$,c as v$,i as h$}from"./CGnn93LH.js";import{R as m$,g as _$,W as kl,c as b$}from"./BncYKhak.js";import"./BOrCm7f7.js";import"./DH2vm-1i.js";import{s as Ai}from"./Bx3lRAzK.js";import{F as w$,h as y$}from"./QgUSWdkO.js";import"./T8wSaQKw.js";import{C as I$,e as Br,L as S$,l as Vl,d as Kl,K as Ql,h as Kc,M as Jl,S as Da}from"./BGpvxEza.js";import{D as $$}from"./CGFkplEn.js";import{f as Tp}from"./Dc7HNZUt.js";import"./DU3vNstz.js";import{i as Ff}from"./BjLb7AHW.js";import{h as Ap,i as Mp,g as Ep,P as qp,C as k$,m as Hl,R as x$}from"./DDfMifm6.js";import{f as It,ae as C$}from"./DSQXi-HI.js";import{F as ft,bs as P$,cd as R$,aw as Na,a2 as Df,c9 as T$,bf as A$,be as M$,bg as E$,aO as Lp,aj as fc,aB as vc,bB as Nf,d3 as Wl,cF as q$,aM as Hp,cb as Op,cK as Ul,bu as L$,aS as H$,d0 as O$,a8 as Bf,ac as F$,ag as D$,cr as N$,ba as B$,aC as Wf,cT as Fp,cz as W$,ax as U$,cD as z$,c3 as j$}from"./Bm1YRNX5.js";import{c as Uf}from"./ChTqQfQN.js";import"./CeOa9B5I.js";import{c as Rt}from"./C_VUI8Os.js";import{a5 as zf,bg as G$,ar as V$,k as K$,Y as Q$,W as J$,a2 as Y$,Z as X$,bw as Z$,V as ek,a1 as tk,ah as nk}from"./XslshjYv.js";import{d as zl,f as rk,e as ak}from"./BAaqzMEP.js";import{A as sk}from"./Cy7afLsK.js";import{D as ok}from"./B61Vm2jJ.js";import"./BVhmKG23.js";import{a as ik,C as lk}from"./Q-AtJOxP.js";import"./Bjc6stZr.js";import{C as dk}from"./ZANjZw72.js";import{h as Mc,r as ck,a as uk}from"./BwJyU0G0.js";import{s as gk}from"./D5yaIVD5.js";import{I as pk,a as jf}from"./yQuAS-d_.js";import{L as fk}from"./Dwv8zw-4.js";import{g as vk,f as hk,b as mk}from"./DdAvLI3S.js";import{s as Mi,g as Yn,i as _k,j as bk,e as Dp,r as Np,f as wk,d as yk,a as hc,h as Ik}from"./BmMxtG34.js";import{i as Bp,a as Sk}from"./Bu13V5mO.js";import{seekConversationToMessage as Wp}from"./CHKsRESt.js";import{l as Kt,o as mc,h as Qc,n as Ec,q as $k}from"./ZUA6bo0t.js";import{o as kk}from"./CJ3l-lGj.js";import{A as Gf}from"./CmE98hO-.js";import{b as Vf}from"./s_zHQBKW.js";import{g as xk,e as Kf,v as Ck,f as Pk,N as Rk,M as Tk,K as Ak,k as Qf,l as Mk,H as Jf,s as Yf}from"./DtgMvDnf.js";import{selectCurrentWorkspaceTabId as _c}from"./Jy2VtQ-j.js";import{o as Ek}from"./AX9GlL7f.js";import{d as qk}from"./B0Z-1lwJ.js";import{P as Lk}from"./BT1eR3Bj.js";import{g as Hk}from"./BQiJMsZZ.js";import{H as Xf,M as Ok,y as Fk,g as Dk,i as Nk,u as Bk,e as Zf,c as ev,d as Wk}from"./CEeEOvCL.js";import{c as Uk,h as Jc,f as tv,Q as zk}from"./DS9Nses5.js";import{t as jk}from"./DAsc1V4f.js";import{s as Gk}from"./BsieX9dN.js";import{i as nv}from"./dlAoKLi8.js";import{d as Vk,i as Kk,r as Qk}from"./BWP_R2MA.js";import{g as Jk}from"./CwSTmJL9.js";var Yk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Xk=E("<div><!></div>");function rv(n,r){if(new.target)return ln({component:rv,...n});un(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),d=Z(r,"children",7),l=cf(r,Yk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return d()},set children(v){d(v),ee()},$set:dn,$on:(v,R)=>cn(r,v,R)},u=Xk();uf(u,v=>({"data-slot":"card-header",class:v,...l}),[()=>Wc("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",dk,i())]);var w=S(u);return Ai(w,()=>d()??fs),y(u),br(u,v=>a(v),()=>a()),p(n,u),gn(f)}var Zk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ex=E("<div><!></div>");function av(n,r){if(new.target)return ln({component:av,...n});un(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),d=Z(r,"children",7),l=cf(r,Zk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return d()},set children(v){d(v),ee()},$set:dn,$on:(v,R)=>cn(r,v,R)},u=ex();uf(u,v=>({"data-slot":"card-title",class:v,...l}),[()=>Wc("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var w=S(u);return Ai(w,()=>d()??fs),y(u),br(u,v=>a(v),()=>a()),p(n,u),gn(f)}const xl=mS.CHAT_MEDIA,bc=IS().min(1).max(512);Zs({workspaceId:bc,agentId:bc,draftId:Nl(),principalId:bc,media:SS(gS).min(1).max(20)}).strict();const tx=Zs({sessionId:Nl()}).strict();tx.extend({control:$S("action",[Zs({action:wi("readiness")}).strict(),Zs({action:wi("export"),request:wS}).strict(),Zs({action:wi("transcribe"),request:yS}).strict(),Zs({action:wi("release"),jobId:Nl()}).strict(),Zs({action:wi("adopt"),jobId:Nl()}).strict()])}).strict();function Yc(n,r,a,i=async(d,l)=>typeof window>"u"||_S(window)!=="electron"?{ok:!1,error:"unavailable"}:bS().invoke(d,l)){let d=null,l=null,f=!1;async function u(){f=!0,a.removeEventListener("abort",w);const x=d;d=null,x&&await i(xl.CLOSE,{sessionId:x}).catch(()=>{})}const w=()=>{u()};a.addEventListener("abort",w,{once:!0});const v=()=>{if(f||a.aborted||!r())throw new Error("media-send-retired")};async function R(){if(v(),d)return d;if(l)return l;l=(async()=>{const x=await i(xl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");d=x.value.sessionId;try{return v(),d}catch(F){throw await u(),F}})();try{return await l}finally{l=null}}async function I(x){const F=await R();v();const D=await i(xl.CONTROL,{sessionId:F,control:x});return v(),D}return{service:{exportMedia:x=>I({action:"export",request:x}),adoptMediaJob:x=>I({action:"adopt",jobId:x}),transcribeMedia:x=>I({action:"transcribe",request:x}),releaseMediaJob:async x=>d?await i(xl.CONTROL,{sessionId:d,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:u,readiness:()=>I({action:"readiness"})}}const wc=new Set;async function nx(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),d=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:f,agentId:u}=i,w=Pi(O.state),v=Dl.select(O.state,f),R=yf.select(O.state),I=hf(),M=JSON.stringify([w,f,u]);if(!w||!v||!R||l.wsId!==f||wc.has(M))return!1;wc.add(M);const x=new AbortController,F=()=>x.abort();a.addEventListener("abort",F,{once:!0});const D=()=>!a.aborted&&!x.signal.aborted&&Pi(O.state)===w&&Dl.select(O.state,f)===v&&mf(I)&&r.isCurrentDraft(i),T=O.getReadableState().subscribe(()=>{D()||x.abort()});let H=null;try{if(!D()||nS(d))return!1;const V=Pf(i.attachments),oe=Af(pS(f,u),V,d.map(ce=>({contextItemId:ce.id,attachmentId:ce.attachmentId,path:ce.path}))),P=new Set([...oe.images,...oe.clips].map(ce=>ce.contextItemId));if(V.some(([ce])=>!P.has(ce))||oe.images.some(ce=>ce.mediaError)||oe.clips.some(ce=>ce.mediaError)||!fS(l.text,oe))throw new Error("invalid-evidence");if(H=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!D())return!1;const k=await Ly.agents.get(u,f);if(!D())return!1;if(!k||k.workspaceId!==f||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const J=oe.clips.flatMap(ce=>ce.media?[ce.media]:[]);J.length&&!H&&(H=Yc({workspaceId:f,agentId:u,draftId:crypto.randomUUID(),principalId:R.principal.id,media:J},D,x.signal));const ge=ty(d,oe),Te=Cc(ge),ve=await ny({workspaceId:f,agentId:u,evidence:oe,clickedItems:d,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Te.imageBlocks,fileBlocks:Te.fileBlocks},binding:I,service:H?.service??null,current:D,onRecord:()=>{}});return!ve||!D()?!1:El(O,u,ve)}catch{return D()&&O.dispatch(ab(u,g.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",F),await H?.dispose(),wc.delete(M)}}const sv=1e4,Up={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function zp(n){return kS(n.messageMetadata)}function rx(n,r){if(n.some(zp)){const a=n[0];return a&&!zp(a)&&jp(a,r)?[a.id]:[]}return n.filter(a=>jp(a,r)).map(a=>a.id)}function ax(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function jp(n,r){return!n.requeuedAfterFailure&&xS(n,r)}function sx(n,r){const{busy:a,queue:i,delivered:d,now:l}=r,f=r.blocked||r.interrupted,u=r.timeoutMs??sv;let w=n.prediction;if(w){const x=new Set(i.map(H=>H.id)),F=w.ids.filter(H=>x.has(H)&&!d.has(H)),D=l-w.startedAt>=u,T=n.wasBusy&&!a;!F.length||D||f&&!a||T?w=null:F.length!==w.ids.length&&(w={...w,ids:F})}const v=n.wasBusy&&!a,R=n.wasBusy?n.busySince:a?l:null,I=n.wasBusy&&n.preempted||R!==null&&r.directSendAt!==null&&r.directSendAt>R;if(!w&&v&&!f&&!I){const x=rx(i,l).filter(F=>!d.has(F));x.length&&(w={ids:x,startedAt:l})}const M={wasBusy:a,busySince:a?R:null,preempted:a&&I,prediction:w};return n.wasBusy===M.wasBusy&&n.busySince===M.busySince&&n.preempted===M.preempted&&n.prediction===M.prediction?n:M}class ox{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let d;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(f=>{d=setTimeout(()=>f(!0),i)})]);if(clearTimeout(d),l)return!1}return!0}}function ix(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Gp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var lx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function ov(n,r){if(new.target)return ln({component:ov,...n});un(r,!0);const a=()=>pe(R,"$typing$",i),[i,d]=Ur();let l=Z(r,"workspaceId",7),f=Z(r,"agentId",7),u=Z(r,"class",7,"");const w=Bn(""),v=Bn("");ie(()=>{w.set(l())}),ie(()=>{v.set(f())});const R=rS(w,v),I=o(()=>u$(a()));var M={get workspaceId(){return l()},set workspaceId(H){l(H),ee()},get agentId(){return f()},set agentId(H){f(H),ee()},get class(){return u()},set class(H=""){u(H),ee()},$set:dn,$on:(H,V)=>cn(r,H,V)},x=Ot(),F=ye(x);{var D=H=>{var V=lx(),oe=S(V),P=S(oe);c$(P,{get people(){return a()},size:12,decorative:!0}),y(oe);var k=_(oe,2),J=de(k,!0);vn(2),y(V),q(()=>{ke(V,1,`${Of} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${u()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(J,e(I))}),p(H,V)};N(F,H=>{e(I)&&H(D)})}p(n,x);var T=gn(M);return d(),T}const dx=50,cx=5e3,ux=500,gx=()=>({authority:()=>Pi(O.state),persistSnapshot:ay,dispatch:n=>O.dispatch(n),ownerView:n=>sy.withStore(O)(n)});function px(n){const r=n.store??gx(),a=crypto.randomUUID();let i=he(!1),d=he(!1),l=he(!1),f=null,u=null,w=0,v=!1,R=null,I=null,M=null,x=0,F=null,D=null;const T={};let H,V=he([]),oe=null,P=0,k="",J=0,ge="";const Te=()=>{const B=n.workspaceId(),C=n.agentId();if(!B||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||v)return null;const Me=n.inputValue(),L=ce(),X=H?.shared,Y=X?.workspaceId===B&&X.agentId===C?X.lifetime:null,we=JSON.stringify([re,B,C,x,Y,L.map(z=>[z.id,z.attachmentId,z.path])]);we!==ge&&(ge=we,J+=1);const De=JSON.stringify([re,B,C,Me,L,x]);return De!==k&&(k=De,P+=1),{authority:re,ownerId:a,workspaceId:B,agentId:C,text:Me,attachments:JSON.parse(JSON.stringify(L)),generation:P,attachmentEpoch:J}};let ve=null;const ce=()=>jI(n.contextItems(),GI(n.contextItems(),e(V))),be=B=>{if(H=B,!B||v)return;const C=B.restore;if(D&&C?.requestId===D.requestId&&C.status!=="pending"){const{apply:L}=D;D=null,b(d,!1),C.status==="restored"&&b(V,C.draft?.attachments??[]),L(C)}const re=B.shared;if(re&&!e(d)&&u===`${re.workspaceId}\0${re.agentId}`){const L=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(oe!==L){oe=L;const X=ve??f,Y=X&&n.inputValue()===X.text&&JSON.stringify(ce())===X.attachmentsJson;re.origin===a?ve={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:Y&&(w+=1,M&&clearTimeout(M),b(V,re.snapshot.attachments),ve=f={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(Il(e(V))),n.applyEditorContent(re.snapshot.text))}}dt(Te);const Me=[];for(const L of B.saves){if(L.status==="pending")continue;Me.push(L.id);const X=T[L.id];delete T[L.id],X?.(L)}Me.length>0&&queueMicrotask(()=>r.dispatch(lb(a,Me)))},ne=(B,C,re)=>{const Me=crypto.randomUUID();D={requestId:Me,apply:re},b(d,!0),r.dispatch(cb(a,Me,B,C))},te=()=>{D&&(D=null,b(d,!1),r.dispatch(gb(a)))},Be=()=>{const B=F;B&&(F=null,r.dispatch(ub(a)),H?.saves.some(C=>C.id===B)||delete T[B])};r.dispatch(sb(a));const se=r.ownerView(a).subscribe(B=>dt(()=>be(B))),me=()=>{I&&(clearTimeout(I),I=null),b(l,!1)},Ee=()=>{F&&(F=null,r.dispatch(db(a)))};ie(()=>{const B=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!B){dt(()=>{w+=1,u=null,te(),R&&clearTimeout(R),R=null,me(),M&&clearTimeout(M),M=null,b(i,!1),Ee()});return}if(!C||!re)return;const Me=`${C}\0${re}`;if(u===Me)return;const L=u!==null;u=Me;const X=++w;dt(()=>{f=null,ve=null,oe=null,b(V,[]),R&&clearTimeout(R),me(),M&&(clearTimeout(M),M=null),L&&(Ee(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const Y=ry(C,re);if(Y){b(V,Y.attachments),b(i,!1);const De=n.contextItems().length>0,z=Y.text,Ie=JSON.stringify(Y.attachments);n.setInputValue(Y.text),De||n.setContextItems(Il(Y.attachments)),n.applyEditorContent(Y.text),f={text:Y.text,attachmentsJson:Ie},ne(C,re,Ce=>{if(Ce.status!=="restored")return;const He=Ce.draft;if(v||!(n.active?.()??!0)||u!==Me||w!==X)return;const st=He?.text??"",Je=He?.attachments??[],Oe=JSON.stringify(Je);lc(C,re,{text:st,attachments:Je});const Pe=n.inputValue()===z&&JSON.stringify(ce())===Ie;De||!Pe||(st!==z&&(n.setInputValue(st),n.applyEditorContent(st)),Oe!==Ie&&n.setContextItems(Il(Je)),f={text:st,attachmentsJson:Oe})});return}b(i,!0),I=setTimeout(()=>{I=null,(n.active?.()??!0)&&b(l,!0)},ux),R=setTimeout(()=>{(n.active?.()??!0)&&(b(i,!1),me())},cx);const we=()=>{!(n.active?.()??!0)||u!==Me||w!==X||(R&&clearTimeout(R),b(i,!1),me())};ne(C,re,De=>{if(De.status!=="restored"){we();return}const z=De.draft;if(v||!(n.active?.()??!0)||u!==Me||w!==X)return;const Ie=!!n.inputValue();if(!Ie&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Il(z.attachments)),!Ie&&z?.text&&(n.setInputValue(z.text),M=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},dx)),f===null){const Ce=z?.text??"",He=z?.attachments??[];f={text:Ce,attachmentsJson:JSON.stringify(He)},lc(C,re,{text:Ce,attachments:He})}we()})})}),ie(()=>{const B=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Me=e(i);if(!B){dt(Be);return}if(!C||!re)return;const L=n.inputValue(),X=ce();if(dt(Te),dt(Be),Me||f===null&&!L&&X.length===0)return;const Y=JSON.stringify(X);if(f!==null&&f.text===L&&f.attachmentsJson===Y)return;JSON.stringify(e(V))!==Y&&b(V,X);const we=`${C}\0${re}`,De=x,z=crypto.randomUUID();T[z]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){u===we&&x===De&&(f={text:L,attachmentsJson:Y});return}n.onSaveError?.(new Error(Ie.error))}},dt(()=>{F=z,r.dispatch(ob(a,z,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:L,attachments:X,rollback:f?{text:f.text,attachments:JSON.parse(f.attachmentsJson)}:null}))})}),ie(()=>()=>{v=!0,R&&clearTimeout(R),I&&clearTimeout(I),M&&clearTimeout(M),Ee(),se(),r.dispatch(ib(a))});const qe=B=>{const C=Te();return C!==null&&C.authority===B.authority&&C.ownerId===B.ownerId&&C.workspaceId===B.workspaceId&&C.agentId===B.agentId&&C.generation===B.generation&&C.text===B.text&&JSON.stringify(C.attachments)===JSON.stringify(B.attachments)};return{captureDraft:Te,isCurrentDraft:qe,updateAttachmentScreen(B,C,re){return!qe(B)||!B.attachments.some(Me=>Me.id===C)?null:(b(V,B.attachments.map(Me=>Me.id===C?{...Me,screen:structuredClone(re)}:Me)),Te())},async flushDraft(B){if(!qe(B))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,B.workspaceId,B.agentId,B,B.authority),qe(B)},get restorePending(){return e(d)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(w+=1,x+=1,te(),R&&(clearTimeout(R),R=null),M&&(clearTimeout(M),M=null),b(i,!1),me(),Be(),u!==null){const[B,C]=u.split("\0");lc(B,C,{text:"",attachments:[]}),ve=null,b(V,[]),f={text:"",attachmentsJson:"[]"}}}}}function Ei(n){if(!n)return null;const r=Af(JSON.stringify([n.workspaceId,n.agentId]),Pf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(d=>d.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function fx(n,r,a){const i=O.state.principal.snapshot,d=()=>Pi(O.state)===n.authority&&a.isCurrentDraft(n);if(!i||!d()||!await a.flushDraft(n)||!d())return{ready:!1};const l=new AbortController,f=Yc({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},d,l.signal);try{const u=await f.readiness();return!d()||!u.ok?{ready:!1}:u.value.find(w=>w.sourceId===r.source.id)??{ready:!1}}finally{await f.dispose()}}function Vp(n){let r=he(null),a=he(!1),i=he(!1),d=null,l=!0,f=0,u=null;Es(()=>{l=!1,f++}),ie(()=>{const I=n.capture();e(r)&&(!I||I.authority!==e(r).capture.authority||I.ownerId!==e(r).capture.ownerId||I.workspaceId!==e(r).capture.workspaceId||I.agentId!==e(r).capture.agentId||I.attachmentEpoch!==e(r).capture.attachmentEpoch)&&b(r,null)});async function w(I){if(n.disabled()||e(a))return;const M=n.drafts.captureDraft(),x=Ei(M),F=x?.clips.find(V=>V.contextItemId===I);if(!M||!F?.media||!x)return;const D=oy({workspaceId:M.workspaceId,agentId:M.agentId,clip:F,evidence:x,marks:x.marks}),T=_f(M.workspaceId,F.path);if(!D||!T)return;const H=++f;d=document.activeElement instanceof HTMLElement?document.activeElement:null,b(a,!0),b(i,!1);try{if(await n.beforeOpen?.(),!l||f!==H||!n.drafts.isCurrentDraft(M))return;const V=await(n.prepareOutput??fx)(M,F.media,n.drafts);if(!l||f!==H||!n.drafts.isCurrentDraft(M))return;const{attachmentPath:oe,...P}=D;b(r,{capture:M,contextItemId:I,snapshot:{...P,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&f===H&&b(i,!0)}finally{l&&f===H&&b(a,!1)}}async function v(I){const M=crypto.randomUUID(),x=e(r),F=n.drafts.captureDraft();if(!x||!F||F.authority!==x.capture.authority||F.ownerId!==x.capture.ownerId||F.workspaceId!==x.capture.workspaceId||F.agentId!==x.capture.agentId||F.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:M,result:"stale-source"};const D=Ei(F),T=D?.clips.find(J=>J.contextItemId===x.contextItemId);if(!D||!T?.media)return{requestId:M,result:"stale-source"};const V=u?.openId===x.snapshot.openId&&u.inputRevision===I.revision&&JSON.stringify(u.media)===JSON.stringify(T.media)?{...I,revision:T.media.saved?.revision??0}:I,oe=vS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:F.workspaceId,agentId:F.agentId},sourceId:I.sourceId,sourceRevision:I.sourceRevision,expectedEditRevision:V.revision,edit:V});if(oe.status!=="saved")return{requestId:M,result:oe.status==="invalid-edit"?"failed":oe.status};const P=hS({...D,clips:D.clips.map(J=>J.id===T.id?{...J,media:oe.media}:J)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(F,x.contextItemId,P);if(!k)return{requestId:M,result:"stale-source"};u={openId:x.snapshot.openId,media:oe.media,inputRevision:I.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:M,result:"stale-source"};await n.drafts.flushDraft(k);const J=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!J||J.attachmentEpoch!==x.capture.attachmentEpoch||J.authority!==k.authority||J.ownerId!==k.ownerId||J.workspaceId!==k.workspaceId||J.agentId!==k.agentId||JSON.stringify(J.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(P)?{requestId:M,result:"stale-source"}:(u=null,{requestId:M,result:"saved",saved:oe.media.saved??void 0})}catch{return{requestId:M,result:"failed"}}}function R(I){return n.disabled()||!n.onRemove(I)?!1:(e(r)?.contextItemId===I&&b(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:w,save:v,remove:R,close(){b(r,null)},restoreFocus(){d?.isConnected&&d.focus()}}}var vx=E('<p role="alert"> </p>'),hx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),mx=E("<!> <!> <!>",1);function iv(n,r){if(new.target)return ln({component:iv,...n});un(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),d=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),f=Z(r,"controllerFactory",7,Vp),u=Z(r,"beforeOpen",7),w=Z(r,"onReviewChange",7);const v=dt(()=>f()({drafts:i(),capture:()=>a(),disabled:()=>d(),onRemove:P=>l()(P),beforeOpen:()=>u()?.()??Promise.resolve()}));ie(()=>{const P=v.opening,k=v.session;dt(()=>w()?.(P,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const R=o(iy),I=o(()=>Ei(a())),M=o(()=>e(I)?.clips.map(P=>({id:P.contextItemId,kind:"clip",owner:"evidence",duration:Tp(P.durationMs),recording:!1,url:a()?_f(a().workspaceId,P.path):void 0,...P.media?.saved?{summary:ly(P.media.saved)}:{}}))??[]);let x=he(null);var F={get capture(){return a()},set capture(P){a(P),ee()},get drafts(){return i()},set drafts(P){i(P),ee()},get disabled(){return d()},set disabled(P=!1){d(P),ee()},get onRemove(){return l()},set onRemove(P){l(P),ee()},get controllerFactory(){return f()},set controllerFactory(P=Vp){f(P),ee()},get beforeOpen(){return u()},set beforeOpen(P){u(P),ee()},get onReviewChange(){return w()},set onReviewChange(P){w(P),ee()},$set:dn,$on:(P,k)=>cn(r,P,k)},D=mx(),T=ye(D);{let P=o(()=>d()||v.opening);CS(T,{get items(){return e(M)},get labels(){return e(R)},get disabled(){return e(P)},onEdit:k=>void v.open(k),onMarkUp:k=>void v.open(k),get onRemove(){return v.remove}})}var H=_(T,2);{var V=P=>{var k=vx(),J=de(k,!0);q(ge=>j(J,ge),[()=>g.dock_captureEditor_saveFailed_label()]),p(P,k)};N(H,P=>{v.problem&&P(V)})}var oe=_(H,2);{let P=o(()=>!!v.session),k=o(()=>g.dock_captureEditor_recording_title({duration:v.session?Tp(v.session.snapshot.durationMs??0):""}));I$(oe,{get open(){return e(P)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>v.close(),onCloseAutoFocus:J=>{J.preventDefault(),v.restoreFocus()},get contentRef(){return e(x)},set contentRef(J){b(x,J,!0)},children:(J,ge)=>{var Te=Ot(),ve=ye(Te);{var ce=be=>{var ne=Ot(),te=ye(ne);xi(te,()=>v.session.snapshot.openId,Be=>{var se=hx(),me=S(se);$$(me,{get snapshot(){return v.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>v.close(),get onSave(){return v.save},onDelete:async()=>!!v.session&&v.remove(v.session.contextItemId)}),y(se),p(Be,se)}),p(be,ne)};N(ve,be=>{v.session&&be(ce)})}p(J,Te)},$$slots:{default:!0}})}return p(n,D),gn(F)}const Cl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function _x(n){let r=he(!1),a=he(!1),i=he(null),d=!1,l=0,f=null,u=null;async function w(I){I.abort.abort(),I.slot?.cancel(),await I.native?.dispose()}async function v(){l++;const I=u;u=null,I&&await w(I)}no(()=>{const I=()=>{b(r,document.hasFocus(),!0)};return I(),window.addEventListener("focus",I),window.addEventListener("blur",I),()=>{window.removeEventListener("focus",I),window.removeEventListener("blur",I)}});const R=O.getReadableState().subscribe(()=>{u&&!u.current()&&v()});return Es(()=>{d=!0,R(),v()}),ie(()=>{const I=n.capture(),M=I?Cl(I):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===M);dt(()=>{if(!x||!I){v();return}if(u?.key===M)return;if(f===M){v();return}v();const D=Ei(I)?.clips.flatMap(Te=>!Te.mediaError&&Te.media?[Te.media]:[])??[],T=D[0],H=O.state.principal.snapshot,V=Dl.select(O.state,I.workspaceId);if(!T||!H||!V||n.drafts.gateActive)return;const oe=hf(),P=new AbortController,k=()=>!d&&!P.signal.aborted&&Pi(O.state)===I.authority&&Dl.select(O.state,I.workspaceId)===V&&mf(oe)&&!!n.capture()&&Cl(n.capture())===M,J={key:M,capture:I,abort:P,native:null,slot:null,current:k};u=J;const ge=l;n.drafts.flushDraft(I).then(async Te=>{if(!(u!==J||ge!==l||!k())){if(!Te){f=M,await v();return}J.native=Yc({workspaceId:I.workspaceId,agentId:I.agentId,draftId:crypto.randomUUID(),principalId:H.principal.id,media:structuredClone(D)},k,P.signal),J.slot=dy(J.native.service),f=M,J.slot.warm(M,T,k)}}).catch(()=>{u===J&&v()})})}),{cancel:v,async beforeEditorOpen(){b(a,!0),f=null,await v()},editorState(I,M){b(a,I,!0);const x=M?Cl(M.capture):null;M&&e(i)?.openId!==M.openId&&(f=null),b(i,M&&x?{openId:M.openId,key:x}:null)},take(I,M){const x=u;if(!x?.native||!x.slot||x.key!==Cl(I)||!x.current())return v(),null;u=null,l++;const F=x.native,D=x.slot,T=()=>x.abort.abort();return M.addEventListener("abort",T,{once:!0}),M.aborted&&T(),{service:{...F.service,takePreparedRecording:H=>D.take(x.key,H,()=>!M.aborted&&x.current())},async dispose(){M.removeEventListener("abort",T),await w(x)}}}}}var bx=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function lv(n,r){if(new.target)return ln({component:lv,...n});un(r,!1);var a={$set:dn,$on:(f,u)=>cn(r,f,u)};Ff();var i=bx(),d=S(i),l=de(d,!0);return y(i),q(f=>j(l,f),[()=>g.chat_draftGate_loading_label()]),p(n,i),gn(a)}var wx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function qc(n,r){if(new.target)return ln({component:qc,...n});un(r,!1);var a={$set:dn,$on:(f,u)=>cn(r,f,u)};Ff();var i=wx(),d=_(S(i),2),l=de(d,!0);return vn(2),y(i),q((f,u)=>{Ne(i,"aria-label",f),j(l,u)},[()=>g.chat_newMessagesDivider_label(),()=>g.chat_newMessagesDivider_label()]),p(n,i),gn(a)}function yx(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Ix(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Sx(n,r){return r&&n.includes(r)?r:null}function Kp(n,r,a){return r-n<=a}const $x=.2;function Qp(n,r,a){const i=Math.max(0,a-r),d=n-$x*r;return Math.min(Math.max(0,d),i)}function kx(n,r,a){return n!==null&&a&&n===r}function xx(n){return n?pb(n)&&fb(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Cx(n){const r=[],a=new Set;let i,d;for(const H of n.messages){if(H.agentId&&H.agentId!==n.agentId){i=void 0,d=void 0;continue}if(a.has(H.id))continue;a.add(H.id),n.breakBeforeMessageIds?.has(H.id)&&(i=void 0,d=void 0);const V=PS(H);if(V?.kind!=="turn-failure")d=void 0;else{const oe=i?.seq!==void 0&&H.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(H.seq)&&H.seq===i.seq+1;(!d||!oe)&&(d={key:JSON.stringify([n.agentId,"notice",H.id]),anchorMessageId:H.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(d)),d.records.push({messageId:H.id,reason:V.reason,timestamp:H.timestamp}),d.recordedFailureCount+=1}i=H}const l=new Map;for(const H of n.queue){if(!H.requeuedAfterFailure)continue;const V=H.turnId||void 0,oe=JSON.stringify([n.agentId,V?"turn":"queue",V??H.id]);let P=l.get(oe);P||(P={key:oe,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(oe,P)),P.queueIds.includes(H.id)||P.queueIds.push(H.id)}const f=[...l.values()],u=n.session?.id===n.agentId?n.session:void 0,w=u?.status===$i.Error,v=n.transientError||w&&u.stopReason||null,R=w&&!v,I=w&&(!n.transientError||n.transientError===u.stopReason)?u.stopReasonTimestamp:void 0,M=I?wp(I):null,x=M&&v&&v===u?.stopReason?r.flatMap(H=>H.records).filter(H=>H.reason===v&&wp(H.timestamp)===M):[],F=x.length===1?x[0].messageId:void 0,T=(u?If(u):!1)?"attempting":f.length?"queued":v||R?"action-needed":"inactive";return{history:r,queueRecovery:f,current:{state:T,error:v,needsFallbackReason:R,timestamp:I,noticeId:F}}}function Px(n,r){const a=n.hiddenTail[0]?.id,i=Cx({...r,messages:[...n.groups.flatMap(u=>u.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),d=i.current.noticeId,l=i.history.map(u=>({...u,records:u.records.filter(w=>w.messageId!==d)})).filter(u=>u.records.length>0),f=new Set(l.map(u=>u.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(u=>[u.records[0].messageId,u])),collapsedMessageIds:new Set(i.history.flatMap(u=>u.records.map(w=>w.messageId).filter(w=>!f.has(w))))}}var Rx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Tx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Ax=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Mx=E('<div class="mb-5"><!></div>'),Ex=E('<p data-testid="agent-welcome-description"> </p> <!>',1),qx=E("<!> <!>",1),Lx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),Hx=E("<!> <span> </span>",1),Ox=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function dv(n,r){if(new.target)return ln({component:dv,...n});un(r,!0);const a=()=>pe(x,"$userOverrides$",f),i=()=>pe(M,"$specialists$",f),d=()=>pe(H,"$isGitHubAuth$",f),l=()=>pe(V,"$recentSpecialistIds$",f),[f,u]=Ur();let w=Z(r,"onSpecialistChange",7),v=Z(r,"session",7),R=Z(r,"workspaceId",7);const I=Bn(R()??"");ie(()=>I.set(R()??""));const M=zf(I),x=G$();ie(()=>{a()});const F=o(()=>{if(!v()||zy(v()))return null;const B=v().metadata?.specialist||v().agentMetadata?.specialist;return B&&i().find(C=>C.id===B)||null});async function D(B){B?await zl({specialist:B,hash:"specialists"}):await zl({view:"create-specialist"})}let T=he(!1);const H=V$(),V=aS(),oe=o(()=>vb(K$(i(),d()),l()));let P=he(!1);const k=o(()=>g.chat_regularAgentWelcome_generalDescription_label()),J=o(()=>e(F)?.name??g.chat_shared_general_fallback()),ge=o(()=>e(F)?.description??g.chat_shared_noSpecializedBehavior_label()),Te=o(()=>e(F)?e(F).defaultBehaviorPrompt||"":e(k));var ve={get onSpecialistChange(){return w()},set onSpecialistChange(B){w(B),ee()},get session(){return v()},set session(B){v(B),ee()},get workspaceId(){return R()},set workspaceId(B){R(B),ee()},$set:dn,$on:(B,C)=>cn(r,B,C)},ce=Ox(),be=S(ce);{var ne=B=>{var C=Mx(),re=S(C);ok(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(P)},set open(X){b(P,X,!0)},trigger:(X,Y)=>{let we=()=>(Y?.()).props;{let De=o(()=>Wc("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));It(X,qi(we,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(De)},"data-testid":"specialist-picker-trigger",children:(z,Ie)=>{var Ce=Rx(),He=ye(Ce),st=S(He);{let Se=o(()=>e(F)?.id??null),Ae=o(()=>e(F)?.icon??null);sk(st,{agentId:"blank",variant:"emphasized",get specialist(){return e(Se)},get icon(){return e(Ae)}})}y(He);var Je=_(He,2),Oe=S(Je),Pe=de(Oe,!0),G=_(Oe,2),ae=de(G,!0);y(Je);var Le=_(Je,2),Q=S(Le);ft(Q,{get icon(){return Na},size:10}),y(Le),q(()=>{j(Pe,e(J)),j(ae,e(ge))}),p(z,Ce)},$$slots:{default:!0}}))}},content:X=>{var Y=Ax(),we=S(Y),De=S(we),z=de(De,!0),Ie=_(De,2),Ce=de(Ie,!0);y(we);var He=_(we,2),st=S(He);{let Pe=o(()=>e(F)?.id??null);V_(st,{get specialists(){return e(oe)},get value(){return e(Pe)},onchange:G=>{b(P,!1),w()?.(G)}})}y(He);var Je=_(He,2),Oe=S(Je);Rt(Oe,()=>Br,(Pe,G)=>{G(Pe,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{b(P,!1),D()},children:(ae,Le)=>{var Q=Tx(),Se=ye(Q),Ae=S(Se);ft(Ae,{get icon(){return R$},size:12}),y(Se);var ze=_(Se,2),Ge=de(ze,!0);q(We=>j(Ge,We),[()=>g.chat_regularAgentWelcome_createSpecialist_label()]),p(ae,Q)},$$slots:{default:!0}})}),y(Je),y(Y),q((Pe,G)=>{j(z,Pe),j(Ce,G)},[()=>g.workspace_createAgentSection_specialists_label(),()=>g.workspace_createAgentSection_specialists_description()]),p(X,Y)},$$slots:{trigger:!0,content:!0}}),y(C),p(B,C)};N(be,B=>{w()&&B(ne)})}var te=_(be,2);{var Be=B=>{var C=Ot(),re=ye(C);{let Me=o(()=>g.chat_specialistSelector_prompt_label());Rt(re,()=>lk,(L,X)=>{X(L,{class:"mb-3",role:"region",get"aria-label"(){return e(Me)},children:(Y,we)=>{var De=qx(),z=ye(De);Rt(z,()=>rv,(Ce,He)=>{He(Ce,{children:(st,Je)=>{var Oe=Ot(),Pe=ye(Oe);Rt(Pe,()=>av,(G,ae)=>{ae(G,{class:"type-caption font-medium",children:(Le,Q)=>{vn();var Se=on();q(Ae=>j(Se,Ae),[()=>g.chat_specialistSelector_prompt_label()]),p(Le,Se)},$$slots:{default:!0}})}),p(st,Oe)},$$slots:{default:!0}})});var Ie=_(z,2);Rt(Ie,()=>ik,(Ce,He)=>{He(Ce,{children:(st,Je)=>{var Oe=Ex(),Pe=ye(Oe),G=de(Pe,!0),ae=_(Pe,2);It(ae,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>b(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Le,Q)=>{vn();var Se=on();q(Ae=>j(Se,Ae),[()=>e(T)?g.chat_regularAgentWelcome_showLess_label():g.chat_regularAgentWelcome_showMore_label()]),p(Le,Se)},$$slots:{default:!0}}),q(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(G,e(Te))}),p(st,Oe)},$$slots:{default:!0}})}),p(Y,De)},$$slots:{default:!0}})})}p(B,C)},se=B=>{var C=Lx(),re=de(C,!0);q(()=>j(re,e(Te))),p(B,C)};N(te,B=>{e(F)?B(Be):B(se,-1)})}var me=_(te,2);{var Ee=B=>{It(B,{variant:"ghost-light",size:"sm",onclick:()=>D(e(F).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(C,re)=>{var Me=Hx(),L=ye(Me);ft(L,{get icon(){return P$},size:12,class:"opacity-60"});var X=_(L,2),Y=de(X,!0);q(we=>j(Y,we),[()=>g.chat_regularAgentWelcome_customize_label()]),p(C,Me)},$$slots:{default:!0}})};N(me,B=>{e(F)&&B(Ee)})}y(ce),p(n,ce);var qe=gn(ve);return u(),qe}var Fx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Dx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Nx=E('<span class="type-caption"> </span>'),Bx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Wx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Xc(n,r){if(new.target)return ln({component:Xc,...n});un(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),d=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),f=Z(r,"showShortcutHints",7,!1),u=Z(r,"reserveShortcutHintSpace",7,!1),w=Z(r,"workspaceId",7);const R=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",I=s$.replace("text-ui","type-caption");function M(k){i()(k)}function x(k,J){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),M(J))}function F(k,J){k.preventDefault(),k.stopPropagation(),Mc(J,{workspaceId:w(),event:k})}function D(k,J){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Mc(J,{workspaceId:w(),event:k}))}function T(k){return k<3}var H={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return d()},set onEdit(k){d(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return f()},set showShortcutHints(k=!1){f(k),ee()},get reserveShortcutHintSpace(){return u()},set reserveShortcutHintSpace(k=!1){u(k),ee()},get workspaceId(){return w()},set workspaceId(k){w(k),ee()},$set:dn,$on:(k,J)=>cn(r,k,J)},V=Ot(),oe=ye(V);{var P=k=>{var J=Wx(),ge=S(J);{const Te=(ce,be)=>{let ne=()=>(be?.()).item,te=()=>(be?.()).index;const Be=o(()=>Qw(ne())),se=o(()=>e(Be)[0]?.type==="text"?e(Be)[0].content:"");var me=Bx(),Ee=S(me),qe=S(Ee);ft(qe,{get icon(){return Df},size:16,get class(){return ur}}),y(Ee);var B=_(Ee,2),C=S(B),re=de(C,!0),Me=_(C);Dn(Me,17,()=>e(Be).slice(e(se)?1:0),z_,(z,Ie)=>{var Ce=Ot(),He=ye(Ce);{var st=Oe=>{const Pe=o(()=>Kw(e(Ie).url));var G=Fx(),ae=de(G,!0);q(()=>{Ne(G,"href",e(Pe)),Ne(G,"title",e(Pe)),j(ae,e(Ie).label)}),ps("click",G,Le=>F(Le,e(Pe))),ps("keydown",G,Le=>D(Le,e(Pe))),p(Oe,G)},Je=Oe=>{var Pe=on();q(()=>j(Pe,e(Ie).content)),p(Oe,Pe)};N(He,Oe=>{e(Ie).type==="link"?Oe(st):Oe(Je,-1)})}p(z,Ce)}),y(B);var L=_(B,2);{var X=z=>{var Ie=Dx();let Ce;var He=de(Ie);q(()=>{Ce=ke(Ie,1,`${I??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!f()}),Ne(Ie,"aria-hidden",f()?void 0:"true"),Ne(Ie,"data-hint-visible",f()),j(He,`${R}${te()+1}`)}),p(z,Ie)},Y=o(()=>T(te())&&(f()||u()));N(L,z=>{e(Y)&&z(X)})}var we=_(L,2);{var De=z=>{C$(z,{side:"top",delayDuration:300,trigger:He=>{{let st=o(()=>g.chat_suggestedPrompts_editInInput_ariaLabel());It(He,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:Je=>{Je.stopPropagation(),d()(ne())},get"aria-label"(){return e(st)},children:(Je,Oe)=>{ft(Je,{get icon(){return T$},size:"xs"})},$$slots:{default:!0}})}},content:He=>{var st=Nx(),Je=de(st,!0);q(Oe=>j(Je,Oe),[()=>g.chat_suggestedPrompts_edit_tooltip()]),p(He,st)},$$slots:{trigger:!0,content:!0}})};N(we,z=>{d()&&z(De)})}y(me),q(z=>{ke(me,1,`${Of} ${a$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),ke(Ee,1,`${Bl??""} mt-px self-start`),Ne(C,"aria-label",z),j(re,e(se))},[()=>Vw(ne())]),ps("click",C,z=>{z.stopPropagation(),M(ne())}),ps("keydown",C,z=>x(z,ne())),p(ce,me)};let ve=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");S$(ge,{get items(){return a()},virtualize:!1,onActivate:M,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(ve)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Te,$$slots:{row:!0}})}y(J),Lt(1,J,()=>ma,()=>({tier:"fast",y:0,scale:1})),Lt(2,J,()=>eo,()=>({tier:"fast"})),p(k,J)};N(oe,k=>{a().length>0&&k(P)})}return p(n,V),gn(H)}Bc(["click","keydown"]);var Ux=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function cv(n,r){if(new.target)return ln({component:cv,...n});un(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const d=o(()=>[{label:g.chat_chiefEmptyState_assignedPrs_label(),prompt:g.chat_chiefEmptyState_assignedPrs_prompt()},{label:g.chat_chiefEmptyState_staleWorkspaces_label(),prompt:g.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:g.chat_chiefEmptyState_agentPerformance_label(),prompt:g.chat_chiefEmptyState_agentPerformance_prompt()},{label:g.chat_chiefEmptyState_morningBrief_label(),prompt:g.chat_chiefEmptyState_morningBrief_prompt()},{label:g.chat_chiefEmptyState_randomTheme_label(),prompt:g.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(d).map(M=>M.label));function f(M){const x=e(d).find(F=>F.label===M);x&&a()(x.prompt)}var u={get onSelect(){return a()},set onSelect(M){a(M),ee()},get compact(){return i()},set compact(M=!1){i(M),ee()},$set:dn,$on:(M,x)=>cn(r,M,x)},w=Ux(),v=S(w),R=de(v,!0),I=_(v,2);return Xc(I,{get prompts(){return e(l)},onSelect:f,get compact(){return i()}}),y(w),q(M=>j(R,M),[()=>g.chat_chiefEmptyState_intro_label()]),p(n,w),gn(u)}const Zc=2e3,zx=4e3,jx=zx-Zc-2;function Gx(n,r=Zc){const a=[];let i=0;for(let d=n.length-1;d>=0&&i<r;d-=1){const l=n[d];if(l.role!=="user"&&l.role!=="assistant")continue;const f=(l.contentBlocks??[]).filter(w=>w.type==="text").map(w=>w.text||w.content||"").join(""),u=(l.role==="assistant"?K_(f).cleanedContent:f).trim();u&&(a.unshift({role:l.role,text:u}),i+=u.length)}return a}function Vx(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
|
|
2
2
|
|
|
3
3
|
`).slice(-Zc),i=r.map(l=>l.trim()).filter(Boolean);if(i.length===0)return a;const d=`Suggested prompts:
|
|
4
4
|
${i.map(l=>`- ${l}`).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as a}from"./
|
|
1
|
+
import{g as l,r as m,d as a}from"./DKpBQuZo.js";import{p}from"./icAEjhzY.js";import{b as t,ay as o}from"./C6w4HIHS.js";import{M as u,b as c}from"./VpUwDjJ_.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=y(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),y=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),v=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(v(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:b,db:a,renderer:m,styles:l};export{$ as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as n}from"./
|
|
1
|
+
import{g as l,r as m,d as n}from"./DKpBQuZo.js";import{p}from"./icAEjhzY.js";import{b as t,ay as o}from"./C6w4HIHS.js";import{M as u,a as f}from"./VpUwDjJ_.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),y=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),d=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(d(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},N={parser:g,db:n,renderer:m,styles:l};export{N as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as W}from"./
|
|
1
|
+
import{I as W}from"./CBm8wTeU.js";import{p as X}from"./icAEjhzY.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"./C6w4HIHS.js";import{p as te}from"./VpUwDjJ_.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,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{bm as v,_ as h}from"./2CQlphfn.js";import{a as S}from"./BdWqymET.js";import{bq as A,Jt as k,m as T,HZ as C,GZ as D,vt as j,vr as B,vI as V,nE as z}from"./eqIwOdFV.js";import{bL as $}from"./Cr_KTPcL.js";import{m as R}from"./jRZT2QjD.js";import"./3SdAC2_C.js";import"./DhZiRE53.js";import"./DTPgmjai.js";import{R as N,F as g,E as G,Q as O}from"./Bn7ZmTkF.js";import"./ChTqQfQN.js";import"./Gw1t2Srm.js";import{o as q}from"./CH6hoQCh.js";import{i as F}from"./BBWuirRW.js";const y=new WeakMap;function ye(e,t){const a=n=>{n&&n!=="new"?y.set(e,n):y.delete(e)};return a(t),{update:a,destroy(){y.delete(e)}}}function K(e){for(let t=e;t;t=t.parentElement){const a=y.get(t);if(a)return a}}function Z(e,t){const a=e?.closest("[data-workspace-link-target]")?.dataset.workspaceLinkTarget;return{openInWorkspace:!!t&&a===t,panelId:e?.closest("[data-panel-id]")?.dataset.panelId,assistantLayoutId:e?.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId,surfaceWorkspaceId:K(e)}}const s=new S("LinkHandler");async function J(e,t){try{const a=t.event?.target,n=Z(a instanceof Element?a:null,t.workspaceId),o=t.openInWorkspace??n.openInWorkspace,r=o?void 0:t.sourcePanelId||n.panelId,{assistantLayoutId:l}=n,u=t.workspaceId??(n.surfaceWorkspaceId?A(n.surfaceWorkspaceId):void 0);if(t={...t,workspaceId:u,openInWorkspace:o,sourcePanelId:r},t.customHandler&&await t.customHandler(e))return s.debug("Link handled by custom handler",{url:e}),!0;if(/^workspace-asset:/i.test(e.trim()))return R.error(v.ui_linkHandler_assetUnavailable_error()),!1;const i=N(e),{event:d}=t,f=i&&d&&!g(t)?t.githubLinkDefaultAction??q.select(k.state):void 0,c=!f||f==="open-in-app";if(t.workspaceId===T&&!t.forceExternal&&c){const{showAssistantContent:m}=await h(async()=>{const{showAssistantContent:_}=await import("./B3PM4xsG.js");return{showAssistantContent:_}},__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,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url),I=t.rawHref?.startsWith("/workspace/")?t.rawHref:e;if(await m(I,{layoutId:l}))return!0}if(e.startsWith("intent://"))return await Q(e,{...t,sourcePanelId:r});if(e.startsWith("devspace://"))return await X(e,{...t,sourcePanelId:r});const p=ne(e,t.rawHref);if(p)return await re(p.path,{...t,sourcePanelId:r},p.fromResolvedUrl);if(e.startsWith("http://")||e.startsWith("https://")){if(G(e))return s.debug("Auth URL detected, opening in external browser",{url:e}),await w(e);if(t.forceExternal)return await w(e);if(o&&c||g(t))return t.workspaceId?await E(e,t.workspaceId,{...t,assistantLayoutId:l}):(s.debug("No workspaceId available, opening in external browser",{url:e}),await w(e));if(i&&d&&f)switch(f){case"open-in-browser":return await w(e);case"open-in-app":return t.workspaceId?await E(e,t.workspaceId,{...t,assistantLayoutId:l}):await w(e);case"copy-link":return await $(e),!0;case"start-workspace":return k.dispatch(C({...i,url:e})),k.dispatch(D(!0)),!0;case"show-choices":return await oe(e,i,d,t,l)}return await w(e)}return e.startsWith("file://")?t.canOpenFile?.()===!1?!1:await H(e):(s.warn("Unknown link type, falling back to external browser",{url:e}),await w(e))}catch(a){return s.error("Failed to handle link",{url:e,error:a}),!1}}async function Q(e,t){try{const{parseIntentLink:a,handleIntentLink:n}=await h(async()=>{const{parseIntentLink:l,handleIntentLink:u}=await import("./CfrT9tcw.js");return{parseIntentLink:l,handleIntentLink:u}},__vite__mapDeps([24,1,2,25,11,7,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39,40,22,41,42,23]),import.meta.url),o=a(e);if(t.canOpenFile&&o.type==="file"&&!t.canOpenFile())return!1;const r=o.workspaceId?A(o.workspaceId):t.workspaceId;return o.valid&&o.type!=="workspace"&&await L(r,t),P(t),await n(e,{workspaceId:t.openInWorkspace?r:t.workspaceId,sourcePanelId:t.sourcePanelId,openInAdjacentPanel:t.openInAdjacentPanel??g(t),openInNewAdjacentPanel:t.openInNewAdjacentPanel??!1})}catch(a){return s.error("Failed to handle intent link",{url:e,error:a}),!1}}async function X(e,t){try{const a=e.match(/^devspace:\/\/terminal\/(.+)$/);if(a){if(!t.workspaceId)return s.warn("Cannot open terminal without workspaceId",{url:e}),!1;const n=decodeURIComponent(a[1]);s.debug("Opening terminal from devspace link",{terminalId:n,workspaceId:t.workspaceId}),await L(t.workspaceId,t),P(t);const o={type:"terminal",title:v.layout_tabTypes_terminal_title(),terminalId:n,closable:!0};return g(t)?k.dispatch(j(t.workspaceId,o,t.sourcePanelId)):k.dispatch(B(t.workspaceId,o)),!0}return s.warn("Unhandled devspace:// link type",{url:e}),!1}catch(a){return s.error("Failed to handle devspace link",{url:e,error:a}),!1}}const Y=/^[a-z][a-z0-9+.-]*:/i,x=/^[a-z]:\/(?!\/)/i;function W(e){return e.replace(/\\/g,"/")}function ee(e){try{return W(decodeURIComponent(e))}catch{return null}}function te(e){return e.split("/").some(t=>t==="..")}function ae(e){const t=e.split("/").filter(a=>a&&a!==".");return t.length===0||t.some(a=>a==="..")?null:t.join("/")}async function L(e,t){if(!t.openInWorkspace||!e)return;const{openAndShowWorkspace:a}=await h(async()=>{const{openAndShowWorkspace:n}=await import("./CDK1PUhb.js").then(o=>o.s);return{openAndShowWorkspace:n}},__vite__mapDeps([45,4,2,3,5,6,7,8,1,9,10,11,46,47]),import.meta.url);try{await a(e)}catch(n){throw R.error(v.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:v.ui_linkHandler_unknownError_label()}),n}}function P(e){!e.workspaceId||!e.sourcePanelId||k.dispatch(z(e.workspaceId,e.sourcePanelId))}function ne(e,t){const a=t??e;if(a){if(a.startsWith("#"))return null;const n=O(a).path;if(!a.startsWith("//")&&(x.test(W(n))||!Y.test(n)))return{path:a,fromResolvedUrl:!1}}if((e.startsWith("http://")||e.startsWith("https://"))&&typeof window<"u")try{const n=new URL(e);if(n.origin===window.location.origin)return{path:n.pathname+n.hash,fromResolvedUrl:!0}}catch{}return null}async function re(e,t,a){try{if(t.canOpenFile?.()===!1)return!1;const n=O(e),o=ee(n.path);if(!o||o.includes("\0"))return!1;let r=o;const{line:l,column:u}=n,{workspaceId:i}=t;if(!i)return s.warn("Cannot open file link without workspaceId",{path:r}),!1;if(te(r))return s.warn("Rejected file link with path traversal",{path:r}),!1;if(r.startsWith("/")||x.test(r)){const{selectWorkspaceById:c}=await h(async()=>{const{selectWorkspaceById:b}=await import("./TE5M669U.js").then(M=>M.ed);return{selectWorkspaceById:b}},__vite__mapDeps([40,10,7,1,2,3,4,5,6,8,9,11,35,30,26,16,17,29,22,14,15,18,41,32]),import.meta.url),p=c.select(k.state,i),m=p?.worktreePath??p?.path,I=m?W(m):void 0,_=I?.endsWith("/")?I.slice(0,-1):I;if(_&&r.startsWith(`${_}/`))r=r.slice(_.length+1);else if(a)r=r.replace(/^\/+/,"");else{s.debug("Absolute path outside workspace root, opening in external editor",{path:r});const b=l===void 0?"":`:${l}${u===void 0?"":`:${u}`}`;return await H(`file://${r}${b}`)}}const d=ae(r);if(!d)return s.warn("Rejected invalid workspace file link",{path:r}),!1;r=d;const f=g(t);return await L(i,t),P(t),k.dispatch(V(i,r,{filePathIsLiteral:!0,line:l,openInAdjacentPanel:f,...t.sourcePanelId?{sourcePanelId:t.sourcePanelId}:{}})),s.debug("Opened file link in workspace file viewer",{path:r,workspaceId:i,line:l}),!0}catch(n){return s.error("Failed to open file link",{target:e,error:n}),!1}}async function oe(e,t,a,{workspaceId:n,openInWorkspace:o,sourcePanelId:r},l){try{const{showLinkActionMenu:u}=await h(async()=>{const{showLinkActionMenu:p}=await import("./CGcJ5lqH.js");return{showLinkActionMenu:p}},__vite__mapDeps([48,2]),import.meta.url),i=a.target instanceof HTMLElement?a.target:null;let d=a instanceof MouseEvent?a.clientX:0,f=a instanceof MouseEvent?a.clientY:0;if(d===0&&f===0&&i){const p=i.getBoundingClientRect();d=p.left,f=p.bottom}const c=u({url:e,gitHubRef:t,x:d,y:f,workspaceId:n,anchorElement:i,openInWorkspace:o??!1,sourcePanelId:r,assistantLayoutId:l});return t.kind==="pr"&&se(c,e),s.debug("Opened link action menu",{url:e,workspaceId:n}),!0}catch(u){return s.warn("Failed to open link action menu, falling back to external browser",{url:e,error:u}),await w(e)}}function se(e,t){h(async()=>{const{loadLinkActionMenuLinkedWorkspaces:a}=await import("./BSJqN5vZ.js");return{loadLinkActionMenuLinkedWorkspaces:a}},__vite__mapDeps([49,12,13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,40,35,30,26,29,41,32,48]),import.meta.url).then(({loadLinkActionMenuLinkedWorkspaces:a})=>a(e,t)).catch(a=>{s.debug("PR workspace lookup unavailable",{url:t,error:a})})}async function ie(e){try{return await L(e,{openInWorkspace:!0}),!0}catch(t){return s.warn("Failed to open linked workspace",{workspaceId:e,error:t}),!1}}async function E(e,t,a={}){if(t===T){try{const{showAssistantContent:o}=await h(async()=>{const{showAssistantContent:r}=await import("./B3PM4xsG.js");return{showAssistantContent:r}},__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,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await o(e,{layoutId:a.assistantLayoutId}))return!0}catch(o){s.warn("Assistant panel unavailable, opening in external browser",{url:e,error:o})}return await w(e)}try{await L(t,a)}catch(o){return s.warn("Failed to enter workspace for in-app link",{url:e,workspaceId:t,error:o}),!1}const n=a.openInWorkspace?void 0:a.sourcePanelId;return await U(e,t,n)}async function U(e,t,a){let n=e,o;try{const{resolveBrowserLinkForOpen:r}=await h(async()=>{const{resolveBrowserLinkForOpen:u}=await import("./DPL73Y_l.js").then(i=>i.b);return{resolveBrowserLinkForOpen:u}},__vite__mapDeps([50,25,11,7,1,2,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39]),import.meta.url),l=await r(e);n=l.url,o=l.requestedUrl}catch(r){s.warn("URL resolution failed, opening the URL unresolved",{url:e,error:r})}try{P({workspaceId:t,sourcePanelId:a});const{getPanelLayoutManager:r}=await h(async()=>{const{getPanelLayoutManager:u}=await import("./Dn1azdNN.js").then(i=>i.p);return{getPanelLayoutManager:u}},__vite__mapDeps([51,3,4,2,5,6,7,8,1,9,10,11,43]),import.meta.url);return r(t).openBrowserPanel(n,void 0,a,o),s.debug("Opened URL in browser panel",{url:e,targetUrl:n,workspaceId:t}),!0}catch(r){return s.warn("Failed to open URL in browser panel, falling back to external browser",{url:e,error:r}),await w(n)}}async function w(e){try{return await F("shell:openExternal",{url:e}),s.debug("Opened URL in external browser",{url:e}),!0}catch(t){return s.error("Failed to open URL in external browser",{url:e,error:t}),!1}}async function H(e){try{const t=e.replace("file://","");return typeof window<"u"&&window.electronAPI?(await F("shell:openExternal",{url:`vscode://file/${t}`}),s.debug("Opened file in external editor",{filePath:t}),!0):!1}catch(t){return s.error("Failed to open file in external editor",{url:e,error:t}),!1}}function ce(e,t={}){let a=null,n=null,o=null;async function r(){if(!n||!o){const d=await h(()=>import("./Bn7ZmTkF.js").then(f=>f.K),__vite__mapDeps([14,1,2,11,7,15,10,16,8,17,18]),import.meta.url);n=d.showLinkTooltip,o=d.hideLinkTooltip}}function l(d){const c=d.target.closest("a");if(c?.href&&!c.href.startsWith("intent://")&&!c.href.startsWith("devspace://")){if(c===a)return;a=c;const p=t.workspaceId??c.closest("[data-workspace-id]")?.dataset.workspaceId??c.closest("[data-workspace-surface]")?.dataset.workspaceSurface;r().then(()=>{a===c&&n&&n(c,c.href,p)})}else a&&(a=null,o?.())}function u(d){const c=d.target.closest("a");if(c&&c===a){const p=d.relatedTarget;if(p&&c.contains(p))return;a=null,o?.()}}function i(){a&&(a=null,o?.())}return e.addEventListener("mouseover",l),e.addEventListener("mouseout",u),e.addEventListener("click",i),()=>{e.removeEventListener("mouseover",l),e.removeEventListener("mouseout",u),e.removeEventListener("click",i),o?.()}}const ve=Object.freeze(Object.defineProperty({__proto__:null,createLinkTooltipHandler:ce,handleLink:J,openInBrowserPanel:U,openInExternalBrowser:w,openLinkInApp:E,openLinkedWorkspace:ie},Symbol.toStringTag,{value:"Module"}));export{E as a,ie as b,ce as c,J as h,ve as l,w as o,Z as r,ye as w};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/D7IJPBQY.js","/app/immutable/chunks/CHWIPzMj.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/DJM-jC4D.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/C_a7D1qz.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Bx3lRAzK.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CWVqIb-d.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/QgUSWdkO.js","/app/immutable/chunks/DxTOze69.js","/app/immutable/chunks/B09v4S72.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/tOpgiK5L.js","/app/immutable/chunks/CzU9DzbS.js","/app/immutable/chunks/DDfMifm6.js","/app/immutable/chunks/DDtBtnNz.js","/app/immutable/chunks/DSQXi-HI.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/Bqdjarag.js","/app/immutable/chunks/C_VUI8Os.js","/app/immutable/chunks/DPbAP8qP.js","/app/immutable/chunks/ZUA6bo0t.js","/app/immutable/chunks/CeOa9B5I.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/Bm1YRNX5.js","/app/immutable/chunks/D_gp0b_i.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CB6JpnWC.js","/app/immutable/chunks/BWP_R2MA.js","/app/immutable/chunks/Jy2VtQ-j.js","/app/immutable/chunks/CezXhCS3.js","/app/immutable/chunks/DtgMvDnf.js","/app/immutable/chunks/AX9GlL7f.js","/app/immutable/chunks/CuKET43j.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CGcJ5lqH.js","/app/immutable/chunks/CRSdOrSC.js","/app/immutable/chunks/CWcntBOg.js","/app/immutable/chunks/BI0xIaK5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bm as v,_ as h}from"./CHWIPzMj.js";import{a as S}from"./BdWqymET.js";import{bq as A,Jt as k,m as T,HZ as C,GZ as D,vt as j,vr as B,vI as V,nE as z}from"./DJM-jC4D.js";import{bL as $}from"./XslshjYv.js";import{m as R}from"./DDfMifm6.js";import"./3SdAC2_C.js";import"./B09v4S72.js";import"./Bx3lRAzK.js";import{R as N,F as g,E as G,Q as O}from"./QgUSWdkO.js";import"./ChTqQfQN.js";import"./CeOa9B5I.js";import{o as q}from"./BWP_R2MA.js";import{i as F}from"./BBWuirRW.js";const y=new WeakMap;function ye(e,t){const a=n=>{n&&n!=="new"?y.set(e,n):y.delete(e)};return a(t),{update:a,destroy(){y.delete(e)}}}function K(e){for(let t=e;t;t=t.parentElement){const a=y.get(t);if(a)return a}}function Z(e,t){const a=e?.closest("[data-workspace-link-target]")?.dataset.workspaceLinkTarget;return{openInWorkspace:!!t&&a===t,panelId:e?.closest("[data-panel-id]")?.dataset.panelId,assistantLayoutId:e?.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId,surfaceWorkspaceId:K(e)}}const s=new S("LinkHandler");async function J(e,t){try{const a=t.event?.target,n=Z(a instanceof Element?a:null,t.workspaceId),o=t.openInWorkspace??n.openInWorkspace,r=o?void 0:t.sourcePanelId||n.panelId,{assistantLayoutId:l}=n,u=t.workspaceId??(n.surfaceWorkspaceId?A(n.surfaceWorkspaceId):void 0);if(t={...t,workspaceId:u,openInWorkspace:o,sourcePanelId:r},t.customHandler&&await t.customHandler(e))return s.debug("Link handled by custom handler",{url:e}),!0;if(/^workspace-asset:/i.test(e.trim()))return R.error(v.ui_linkHandler_assetUnavailable_error()),!1;const i=N(e),{event:d}=t,f=i&&d&&!g(t)?t.githubLinkDefaultAction??q.select(k.state):void 0,c=!f||f==="open-in-app";if(t.workspaceId===T&&!t.forceExternal&&c){const{showAssistantContent:m}=await h(async()=>{const{showAssistantContent:_}=await import("./D7IJPBQY.js");return{showAssistantContent:_}},__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,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url),I=t.rawHref?.startsWith("/workspace/")?t.rawHref:e;if(await m(I,{layoutId:l}))return!0}if(e.startsWith("intent://"))return await Q(e,{...t,sourcePanelId:r});if(e.startsWith("devspace://"))return await X(e,{...t,sourcePanelId:r});const p=ne(e,t.rawHref);if(p)return await re(p.path,{...t,sourcePanelId:r},p.fromResolvedUrl);if(e.startsWith("http://")||e.startsWith("https://")){if(G(e))return s.debug("Auth URL detected, opening in external browser",{url:e}),await w(e);if(t.forceExternal)return await w(e);if(o&&c||g(t))return t.workspaceId?await E(e,t.workspaceId,{...t,assistantLayoutId:l}):(s.debug("No workspaceId available, opening in external browser",{url:e}),await w(e));if(i&&d&&f)switch(f){case"open-in-browser":return await w(e);case"open-in-app":return t.workspaceId?await E(e,t.workspaceId,{...t,assistantLayoutId:l}):await w(e);case"copy-link":return await $(e),!0;case"start-workspace":return k.dispatch(C({...i,url:e})),k.dispatch(D(!0)),!0;case"show-choices":return await oe(e,i,d,t,l)}return await w(e)}return e.startsWith("file://")?t.canOpenFile?.()===!1?!1:await H(e):(s.warn("Unknown link type, falling back to external browser",{url:e}),await w(e))}catch(a){return s.error("Failed to handle link",{url:e,error:a}),!1}}async function Q(e,t){try{const{parseIntentLink:a,handleIntentLink:n}=await h(async()=>{const{parseIntentLink:l,handleIntentLink:u}=await import("./CzU9DzbS.js");return{parseIntentLink:l,handleIntentLink:u}},__vite__mapDeps([24,1,2,25,11,7,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39,40,22,41,42,23]),import.meta.url),o=a(e);if(t.canOpenFile&&o.type==="file"&&!t.canOpenFile())return!1;const r=o.workspaceId?A(o.workspaceId):t.workspaceId;return o.valid&&o.type!=="workspace"&&await L(r,t),P(t),await n(e,{workspaceId:t.openInWorkspace?r:t.workspaceId,sourcePanelId:t.sourcePanelId,openInAdjacentPanel:t.openInAdjacentPanel??g(t),openInNewAdjacentPanel:t.openInNewAdjacentPanel??!1})}catch(a){return s.error("Failed to handle intent link",{url:e,error:a}),!1}}async function X(e,t){try{const a=e.match(/^devspace:\/\/terminal\/(.+)$/);if(a){if(!t.workspaceId)return s.warn("Cannot open terminal without workspaceId",{url:e}),!1;const n=decodeURIComponent(a[1]);s.debug("Opening terminal from devspace link",{terminalId:n,workspaceId:t.workspaceId}),await L(t.workspaceId,t),P(t);const o={type:"terminal",title:v.layout_tabTypes_terminal_title(),terminalId:n,closable:!0};return g(t)?k.dispatch(j(t.workspaceId,o,t.sourcePanelId)):k.dispatch(B(t.workspaceId,o)),!0}return s.warn("Unhandled devspace:// link type",{url:e}),!1}catch(a){return s.error("Failed to handle devspace link",{url:e,error:a}),!1}}const Y=/^[a-z][a-z0-9+.-]*:/i,x=/^[a-z]:\/(?!\/)/i;function W(e){return e.replace(/\\/g,"/")}function ee(e){try{return W(decodeURIComponent(e))}catch{return null}}function te(e){return e.split("/").some(t=>t==="..")}function ae(e){const t=e.split("/").filter(a=>a&&a!==".");return t.length===0||t.some(a=>a==="..")?null:t.join("/")}async function L(e,t){if(!t.openInWorkspace||!e)return;const{openAndShowWorkspace:a}=await h(async()=>{const{openAndShowWorkspace:n}=await import("./AX9GlL7f.js").then(o=>o.s);return{openAndShowWorkspace:n}},__vite__mapDeps([45,4,2,3,5,6,7,8,1,9,10,11,46,47]),import.meta.url);try{await a(e)}catch(n){throw R.error(v.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:v.ui_linkHandler_unknownError_label()}),n}}function P(e){!e.workspaceId||!e.sourcePanelId||k.dispatch(z(e.workspaceId,e.sourcePanelId))}function ne(e,t){const a=t??e;if(a){if(a.startsWith("#"))return null;const n=O(a).path;if(!a.startsWith("//")&&(x.test(W(n))||!Y.test(n)))return{path:a,fromResolvedUrl:!1}}if((e.startsWith("http://")||e.startsWith("https://"))&&typeof window<"u")try{const n=new URL(e);if(n.origin===window.location.origin)return{path:n.pathname+n.hash,fromResolvedUrl:!0}}catch{}return null}async function re(e,t,a){try{if(t.canOpenFile?.()===!1)return!1;const n=O(e),o=ee(n.path);if(!o||o.includes("\0"))return!1;let r=o;const{line:l,column:u}=n,{workspaceId:i}=t;if(!i)return s.warn("Cannot open file link without workspaceId",{path:r}),!1;if(te(r))return s.warn("Rejected file link with path traversal",{path:r}),!1;if(r.startsWith("/")||x.test(r)){const{selectWorkspaceById:c}=await h(async()=>{const{selectWorkspaceById:b}=await import("./CB6JpnWC.js").then(M=>M.ed);return{selectWorkspaceById:b}},__vite__mapDeps([40,10,7,1,2,3,4,5,6,8,9,11,35,30,26,16,17,29,22,14,15,18,41,32]),import.meta.url),p=c.select(k.state,i),m=p?.worktreePath??p?.path,I=m?W(m):void 0,_=I?.endsWith("/")?I.slice(0,-1):I;if(_&&r.startsWith(`${_}/`))r=r.slice(_.length+1);else if(a)r=r.replace(/^\/+/,"");else{s.debug("Absolute path outside workspace root, opening in external editor",{path:r});const b=l===void 0?"":`:${l}${u===void 0?"":`:${u}`}`;return await H(`file://${r}${b}`)}}const d=ae(r);if(!d)return s.warn("Rejected invalid workspace file link",{path:r}),!1;r=d;const f=g(t);return await L(i,t),P(t),k.dispatch(V(i,r,{filePathIsLiteral:!0,line:l,openInAdjacentPanel:f,...t.sourcePanelId?{sourcePanelId:t.sourcePanelId}:{}})),s.debug("Opened file link in workspace file viewer",{path:r,workspaceId:i,line:l}),!0}catch(n){return s.error("Failed to open file link",{target:e,error:n}),!1}}async function oe(e,t,a,{workspaceId:n,openInWorkspace:o,sourcePanelId:r},l){try{const{showLinkActionMenu:u}=await h(async()=>{const{showLinkActionMenu:p}=await import("./CGcJ5lqH.js");return{showLinkActionMenu:p}},__vite__mapDeps([48,2]),import.meta.url),i=a.target instanceof HTMLElement?a.target:null;let d=a instanceof MouseEvent?a.clientX:0,f=a instanceof MouseEvent?a.clientY:0;if(d===0&&f===0&&i){const p=i.getBoundingClientRect();d=p.left,f=p.bottom}const c=u({url:e,gitHubRef:t,x:d,y:f,workspaceId:n,anchorElement:i,openInWorkspace:o??!1,sourcePanelId:r,assistantLayoutId:l});return t.kind==="pr"&&se(c,e),s.debug("Opened link action menu",{url:e,workspaceId:n}),!0}catch(u){return s.warn("Failed to open link action menu, falling back to external browser",{url:e,error:u}),await w(e)}}function se(e,t){h(async()=>{const{loadLinkActionMenuLinkedWorkspaces:a}=await import("./CRSdOrSC.js");return{loadLinkActionMenuLinkedWorkspaces:a}},__vite__mapDeps([49,12,13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,40,35,30,26,29,41,32,48]),import.meta.url).then(({loadLinkActionMenuLinkedWorkspaces:a})=>a(e,t)).catch(a=>{s.debug("PR workspace lookup unavailable",{url:t,error:a})})}async function ie(e){try{return await L(e,{openInWorkspace:!0}),!0}catch(t){return s.warn("Failed to open linked workspace",{workspaceId:e,error:t}),!1}}async function E(e,t,a={}){if(t===T){try{const{showAssistantContent:o}=await h(async()=>{const{showAssistantContent:r}=await import("./D7IJPBQY.js");return{showAssistantContent:r}},__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,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await o(e,{layoutId:a.assistantLayoutId}))return!0}catch(o){s.warn("Assistant panel unavailable, opening in external browser",{url:e,error:o})}return await w(e)}try{await L(t,a)}catch(o){return s.warn("Failed to enter workspace for in-app link",{url:e,workspaceId:t,error:o}),!1}const n=a.openInWorkspace?void 0:a.sourcePanelId;return await U(e,t,n)}async function U(e,t,a){let n=e,o;try{const{resolveBrowserLinkForOpen:r}=await h(async()=>{const{resolveBrowserLinkForOpen:u}=await import("./CWcntBOg.js").then(i=>i.b);return{resolveBrowserLinkForOpen:u}},__vite__mapDeps([50,25,11,7,1,2,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39]),import.meta.url),l=await r(e);n=l.url,o=l.requestedUrl}catch(r){s.warn("URL resolution failed, opening the URL unresolved",{url:e,error:r})}try{P({workspaceId:t,sourcePanelId:a});const{getPanelLayoutManager:r}=await h(async()=>{const{getPanelLayoutManager:u}=await import("./BI0xIaK5.js").then(i=>i.p);return{getPanelLayoutManager:u}},__vite__mapDeps([51,3,4,2,5,6,7,8,1,9,10,11,43]),import.meta.url);return r(t).openBrowserPanel(n,void 0,a,o),s.debug("Opened URL in browser panel",{url:e,targetUrl:n,workspaceId:t}),!0}catch(r){return s.warn("Failed to open URL in browser panel, falling back to external browser",{url:e,error:r}),await w(n)}}async function w(e){try{return await F("shell:openExternal",{url:e}),s.debug("Opened URL in external browser",{url:e}),!0}catch(t){return s.error("Failed to open URL in external browser",{url:e,error:t}),!1}}async function H(e){try{const t=e.replace("file://","");return typeof window<"u"&&window.electronAPI?(await F("shell:openExternal",{url:`vscode://file/${t}`}),s.debug("Opened file in external editor",{filePath:t}),!0):!1}catch(t){return s.error("Failed to open file in external editor",{url:e,error:t}),!1}}function ce(e,t={}){let a=null,n=null,o=null;async function r(){if(!n||!o){const d=await h(()=>import("./QgUSWdkO.js").then(f=>f.K),__vite__mapDeps([14,1,2,11,7,15,10,16,8,17,18]),import.meta.url);n=d.showLinkTooltip,o=d.hideLinkTooltip}}function l(d){const c=d.target.closest("a");if(c?.href&&!c.href.startsWith("intent://")&&!c.href.startsWith("devspace://")){if(c===a)return;a=c;const p=t.workspaceId??c.closest("[data-workspace-id]")?.dataset.workspaceId??c.closest("[data-workspace-surface]")?.dataset.workspaceSurface;r().then(()=>{a===c&&n&&n(c,c.href,p)})}else a&&(a=null,o?.())}function u(d){const c=d.target.closest("a");if(c&&c===a){const p=d.relatedTarget;if(p&&c.contains(p))return;a=null,o?.()}}function i(){a&&(a=null,o?.())}return e.addEventListener("mouseover",l),e.addEventListener("mouseout",u),e.addEventListener("click",i),()=>{e.removeEventListener("mouseover",l),e.removeEventListener("mouseout",u),e.removeEventListener("click",i),o?.()}}const ve=Object.freeze(Object.defineProperty({__proto__:null,createLinkTooltipHandler:ce,handleLink:J,openInBrowserPanel:U,openInExternalBrowser:w,openLinkInApp:E,openLinkedWorkspace:ie},Symbol.toStringTag,{value:"Module"}));export{E as a,ie as b,ce as c,J as h,ve as l,w as o,Z as r,ye as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Ot,bo as F,bm as u,bw as Rt,b as Ft}from"./2CQlphfn.js";import{bs as Gt,bV as K,br as rt,bk as er,bj as tr,bH as r,a5 as c,aD as e,bS as n,bl as S,bA as l,b_ as g,bO as m,W as o,bn as Mt,aA as G,c9 as z,be as Ve,b$ as Be,aB as b,c5 as mt,ca as ft,a7 as Ue,ay as U,ai as rr,aj as ar,bf as sr}from"./3SdAC2_C.js";import{i as W}from"./ByjFf28U.js";import{I as or,g as Xe}from"./Bf_h69U3.js";import{c as Ee}from"./CON-zxWG.js";import{n as Oe,j as Ze,h as $t}from"./DsNGTbSH.js";import{f as Re,c as gt,s as nr}from"./DhZiRE53.js";import{b as xt}from"./Dn334wJv.js";import{F as Te,cR as ir,au as lr,cK as bt,c$ as Pt,cd as cr}from"./B16ZhAkF.js";import{f as ye}from"./BvR4li8f.js";import"./Bn7ZmTkF.js";import"./DNxs15P5.js";import{M as nt}from"./CSfG5Ybw.js";import{M as dr}from"./DsALDj-G.js";import{w as _e}from"./BHSnSmbO.js";import{h as Ct,i as Et,g as Tt,P as At}from"./jRZT2QjD.js";import{C as ht}from"./DJrPi4os.js";import{c as pr}from"./ChTqQfQN.js";import{A as ur}from"./C_yzewkM.js";import"./DTPgmjai.js";import{f as vr}from"./uh7Y9z2F.js";import{Jt as _r}from"./eqIwOdFV.js";import{dR as mr}from"./TE5M669U.js";import{S as et,j as fr,a as jt}from"./DuKUDTXp.js";import{R as qe,c as it,m as gr,bE as tt}from"./BO7alE7_.js";import"./Cr_KTPcL.js";var xr=b('<div class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></div>'),br=b('<div class="text-sm text-danger bg-danger-background/10 rounded-md p-3"> </div>'),hr=b('<div class="flex items-center gap-2 text-subtle"><!> <span class="text-sm"> </span></div>'),Sr=b('<div class="p-4 max-h-60 overflow-y-auto overscroll-contain"><!></div>'),wr=b('<div class="p-3 bg-muted/30"><div class="flex items-center justify-between mb-2"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span></div> <!></div> <p class="text-xs text-subtle mb-2"> </p> <div class="h-32 rounded border border-border overflow-hidden"><!></div></div>'),yr=b('<div class="flex flex-col bg-background border border-border rounded-lg overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-border bg-muted/30"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span> <!></div> <div class="flex items-center gap-1"><!></div></div> <!> <!></div>');function St(He,P){if(new.target)return Ot({component:St,...He});Gt(P,!0);const at=pr("SetupScriptAgent");let Ae=F(P,"repoPath",7),Fe=F(P,"onScriptGenerated",7),Ge=F(P,"onClose",7),Me=K(rt(crypto.randomUUID())),O=K(!1),ae=K(null),me=!1,ie=K(null);er(()=>{me=!0,C()}),tr(()=>{me=!1});async function le(){try{const v=mr.select(_r.state).find(E=>E.repositoryPath===Ae()||E.path===Ae()||E.worktreePath===Ae());return v?String(v.id):null}catch{return null}}async function C(){r(O,!0),r(ae,null),r(ie,null);try{const s=await le();if(!me)return;if(!s){r(ae,u.workspace_setupScriptAgent_noWorkspace_error(),!0),r(O,!1);return}const v=await vr.setupScripts.generate(s);if(!me)return;if(!v||!v.script){r(ae,u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1);return}r(ie,{name:v.projectType?u.workspace_setupScriptAgent_projectTypeSetup_label({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedSetup_label(),description:v.projectType?u.workspace_setupScriptAgent_generatedForProject_description({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedFromAnalysis_description(),content:v.script},!0),r(O,!1)}catch(s){if(at.error("Failed to generate setup script",s),!me)return;r(ae,s instanceof Error?s.message:u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1)}}function fe(s){Fe()?.(s)}var ge={get repoPath(){return Ae()},set repoPath(s){Ae(s),G()},get onScriptGenerated(){return Fe()},set onScriptGenerated(s){Fe(s),G()},get onClose(){return Ge()},set onClose(s){Ge(s),G()},$set:Rt,$on:(s,v)=>Ft(P,s,v)},ce=yr(),xe=c(ce),be=c(xe),De=c(be);ur(De,{variant:"standard",get agentId(){return e(Me)}});var Le=n(De,2),je=S(Le,!0),he=n(Le,2);{var de=s=>{var v=xr();o(s,v)};W(he,s=>{e(O)&&s(de)})}l(be);var Y=n(be,2),ke=c(Y);{let s=z(()=>u.workspace_setupScriptAgent_close_ariaLabel());ye(ke,{variant:"ghost-light",size:"icon-sm",iconOnly:!0,get"aria-label"(){return e(s)},get onclick(){return Ge()},children:(v,E)=>{Te(v,{get icon(){return ir}})},$$slots:{default:!0}})}l(Y),l(xe);var $e=n(xe,2);{var Ie=s=>{var v=Sr(),E=c(v);{var q=B=>{var M=br(),Q=S(M,!0);g(()=>m(Q,e(ae))),o(B,M)},se=B=>{var M=hr(),Q=c(M);or(Q,{size:16,class:"text-primary"});var Se=n(Q,2),ze=S(Se,!0);l(M),g(we=>m(ze,we),[()=>u.workspace_setupScriptAgent_analyzing_label()]),o(B,M)};W(E,B=>{e(ae)?B(q):B(se,-1)})}l(v),o(s,v)};W($e,s=>{(e(ae)||e(O))&&s(Ie)})}var Je=n($e,2);{var pe=s=>{var v=wr(),E=c(v),q=c(E),se=c(q);Te(se,{get icon(){return lr},class:"text-green-500"});var B=n(se,2),M=S(B,!0);l(q);var Q=n(q,2);ye(Q,{variant:"primary",size:"sm",onclick:()=>fe(e(ie)),class:"h-7",children:(Pe,st)=>{Ve();var Ye=Be();g(ct=>m(Ye,ct),[()=>u.workspace_setupScriptAgent_createScript_label()]),o(Pe,Ye)},$$slots:{default:!0}}),l(E);var Se=n(E,2),ze=S(Se,!0),we=n(Se,2),lt=c(we);ht(lt,{get value(){return e(ie).content},language:"shell",readOnly:!0,lineNumbers:!1}),l(we),l(v),g(()=>{m(M,e(ie).name),m(ze,e(ie).description)}),o(s,v)};W(Je,s=>{e(ie)&&!e(O)&&s(pe)})}return l(ce),g(s=>m(je,s),[()=>u.workspace_setupScriptAgent_title()]),o(He,ce),Mt(ge)}var kr=b('<span class="block truncate"> </span>'),$r=b("<div></div>"),Pr=b('<div role="group"></div> <div class="mt-2 border-t border-border pt-2"><!></div> <!> <div class="mt-2 border-t border-border pt-2"><!> <!></div>',1),Cr=b('<code class="type-caption text-muted-foreground"> </code>'),Er=b('<p> </p> <code class="type-caption"> </code>',1),It=b("<!> <!>",1),Tr=b('<div class="mt-2 flex flex-wrap gap-2 px-2"></div>'),Ar=b('<div class="h-44 min-w-0 overflow-hidden rounded-(--radius-medium) border border-border bg-background py-2"><!></div> <div class="mt-2 px-1"><!> <!></div>',1),jr=b('<div class="mb-2 flex items-center justify-between gap-3 px-2"><div class="min-w-0"><h3> </h3> <p class="type-caption truncate text-muted-foreground"> </p></div> <!></div> <!>',1),Ke=b("<div><!></div>"),Ir=b("<!> ",1),Nt=b('<div class="min-w-0 w-full"><span class="text-sm"> </span> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ut=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>'),Nr=b('<span class="type-caption px-1.5 py-0.5 rounded-full bg-primary/10 text-primary font-medium shrink-0"> </span>'),Ur=b('<div class="min-w-0 w-full"><div class="flex flex-wrap items-center gap-x-2 gap-y-1"><span class="text-sm"> </span> <!></div> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Or=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <p class="text-xs text-subtle px-2 mb-2"> </p> <!></div> <!> <!> <div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>',1),Rr=b('<code class="type-caption px-1.5 py-0.5 rounded bg-background/80 text-muted-foreground font-mono cursor-pointer hover:bg-background hover:text-foreground transition-colors"> </code>'),Fr=b('<p class="text-xs"> </p> <p class="mt-1 text-xs text-muted-foreground"> <code class="type-caption"> </code></p>',1),Gr=b('<div class="flex flex-wrap items-center gap-x-3 gap-y-1.5 px-3 py-1.5 bg-muted/30 shrink-0"><span class="type-caption font-medium text-muted-foreground shrink-0"> </span> <div class="flex flex-wrap gap-1.5"></div></div> <div class="flex-1 min-h-0 min-w-0 overflow-hidden py-3 bg-background"><!></div>',1),Mr=b('<div class="flex min-h-0 min-w-0 flex-col overflow-y-auto"><!></div> <div class="flex min-h-0 min-w-0 flex-col"><!></div>',1),Dr=b('<div class="flex flex-col min-h-0 min-w-0 overflow-y-auto p-2 md:pr-4"><!></div> <div class="flex flex-col min-w-0 min-h-0"><!></div>',1),Lr=b('<!> <span class="text-sm font-normal text-subtle"> </span> <span class="text-subtle font-normal"> </span>',1),zr=b('<div class="mt-1 pl-7 space-y-3"><!></div>'),Wr=b('<div class="space-y-3"><!></div>'),qr=b("<div><!> <!></div> <!>",1);function Kr(He,P){if(new.target)return Ot({component:Kr,...He});Gt(P,!0);const at=(t,a=sr)=>{{const y=_=>{Te(_,{get icon(){return bt},get class(){return _e.icon}})},j=_=>{var i=kr(),f=S(i,!0);g(()=>m(f,a().name)),o(_,i)},T=_=>{{let i=z(()=>e(st)===a().id?"checked":"empty");dr(_,{get state(){return e(i)}})}};let h=z(()=>e(st)===a().id),$=z(()=>e(st)===a().id);nt(t,{get selected(){return e(h)},get"aria-pressed"(){return e($)},get"data-setup-source"(){return a().id},get class(){return _e.row},onclick:()=>a().id==="custom"?Dt():we(a().id),leading:y,title:j,trailing:T,$$slots:{leading:!0,title:!0,trailing:!0}})}},Ae=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Pr(),_=U($);Xe(_,21,()=>e(Ye),I=>I.id,(I,R)=>{at(I,()=>e(R))}),l(_);var i=n(_,2),f=c(i);nt(f,{get"aria-expanded"(){return e($e)},get class(){return _e.row},onclick:()=>r($e,!e($e)),leading:w=>{Te(w,{get icon(){return cr},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptEditor_templates_label()]),o(w,d)},$$slots:{leading:!0,title:!0}}),l(i);var x=n(i,2);{var k=I=>{var R=$r();Xe(R,21,()=>e(ct),w=>w.id,(w,d)=>{at(w,()=>({id:`template-${e(d).id}`,name:e(d).name}))}),l(R),Oe(3,R,()=>Ze,()=>({tier:"moderate"})),o(I,R)};W(x,I=>{e($e)&&I(k)})}var D=n(x,2),ue=c(D);nt(ue,{get class(){return _e.row},onclick:()=>r(ke,!0),leading:w=>{Te(w,{get icon(){return bt},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptPicker_edit_label()]),o(w,d)},$$slots:{leading:!0,title:!0}});var ve=n(ue,2);{const I=d=>{Te(d,{get icon(){return Pt},get class(){return _e.icon}})},R=d=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(d,p)};let w=z(()=>!O());nt(ve,{get class(){return _e.row},get disabled(){return e(w)},onclick:()=>{r(ke,!0),r(Y,!0)},leading:I,title:R,$$slots:{leading:!0,title:!0}})}l(D),g(I=>nr(_,"aria-label",I),[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(h,$)},T=h=>{var $=jr(),_=U($),i=c(_),f=c(i),x=S(f,!0),k=n(f,2),D=S(k,!0);l(i);var ue=n(i,2);ye(ue,{variant:"ghost",size:"sm",onclick:()=>{r(ke,!1),r(Y,!1)},children:(w,d)=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptPicker_choose_label()]),o(w,p)},$$slots:{default:!0}}),l(_);var ve=n(_,2);{var I=w=>{St(w,{get repoPath(){return O()},onScriptGenerated:Lt,onClose:()=>r(Y,!1)})},R=w=>{var d=Ar(),p=U(d),N=c(p);xt(ht(N,{language:"shell",lineNumbers:!1,get lineWrapping(){return e(Se)},get value(){return C()},set value(A){C(A)}}),A=>r(pe,A,!0),()=>e(pe)),l(p);var X=n(p,2),H=c(X);ye(H,{variant:"ghost",size:"sm",get active(){return e(Ie)},get"aria-expanded"(){return e(Ie)},onclick:()=>r(Ie,!e(Ie)),children:(A,oe)=>{Ve();var L=Be();g(ee=>m(L,ee),[()=>u.workspace_setupScriptEditor_variables_label()]),o(A,L)},$$slots:{default:!0}});var V=n(H,2);{var Z=A=>{var oe=Ue(),L=U(oe);Ee(L,()=>At,(ee,te)=>{te(ee,{delayDuration:100,children:(ne,Ce)=>{var J=Tr();Xe(J,21,()=>jt,re=>re.name,(re,Ne)=>{var We=Ue(),pt=U(We);Ee(pt,()=>Ct,(Vt,Bt)=>{Bt(Vt,{children:(Ht,Vr)=>{var yt=It(),kt=U(yt);Ee(kt,()=>Et,(ut,vt)=>{vt(ut,{children:(_t,Yt)=>{var Qe=Cr(),ot=S(Qe);g(()=>m(ot,`$${e(Ne).name??""}`)),o(_t,Qe)},$$slots:{default:!0}})});var Jt=n(kt,2);Ee(Jt,()=>Tt,(ut,vt)=>{vt(ut,{side:"top",class:"max-w-xs",children:(_t,Yt)=>{var Qe=Er(),ot=U(Qe),Qt=S(ot,!0),Xt=n(ot,2),Zt=S(Xt,!0);g(()=>{m(Qt,e(Ne).description),m(Zt,e(Ne).example)}),o(_t,Qe)},$$slots:{default:!0}})}),o(Ht,yt)},$$slots:{default:!0}})}),o(re,We)}),l(J),o(ne,J)},$$slots:{default:!0}})}),o(A,oe)};W(V,A=>{e(Ie)&&A(Z)})}l(X),o(w,d)};W(ve,w=>{e(Y)&&O()?w(I):w(R,-1)})}g(w=>{Re(f,1,gt(_e.title),"svelte-1yy464i"),m(x,w),m(D,e(ze))},[()=>u.workspace_setupScriptPicker_commands_label()]),o(h,$)};W(y,h=>{e(ke)?h(T,-1):h(j)})}l(a),xt(a,h=>r(Je,h),()=>e(Je)),g(()=>Re(a,1,`${_e.rows} min-w-0`,"svelte-1yy464i")),o(t,a)},Fe=t=>{var a=Or(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2),$=S(h,!0),_=n(h,2);{var i=d=>{var p=Ke(),N=c(p);St(N,{get repoPath(){return O()},onScriptGenerated:X=>{r(se,!0),r(s,""),C(X.content),r(E,X.name,!0),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())},onClose:()=>r(Y,!1)}),l(p),Oe(3,p,()=>Ze,()=>({tier:"moderate"})),o(d,p)},f=d=>{{let p=z(()=>!O());ye(d,{variant:"ghost",size:"sm",class:"w-full justify-start text-subtle",onclick:()=>r(Y,!0),get disabled(){return e(p)},children:(N,X)=>{var H=Ir(),V=U(H);Te(V,{get icon(){return Pt},class:"mr-1.5"});var Z=n(V);g(A=>m(Z,` ${A??""}`),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(N,H)},$$slots:{default:!0}})}};W(_,d=>{e(Y)&&O()?d(i):d(f,-1)})}l(y);var x=n(y,2);{var k=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===qe),Z=z(()=>e(s)===qe);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(qe),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(it,"repo-config"),()=>u.workspace_setupScriptEditor_repoConfig_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_repoConfig_label()]),o(d,p)};W(x,d=>{le()&&d(k)})}var D=n(x,2);{var ue=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===B),Z=z(()=>e(s)===B);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(B),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(e(M).name,e(M).nameSource),()=>u.workspace_setupScriptEditor_lastUsed_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_lastUsed_label()]),o(d,p)};W(D,d=>{e(M)&&d(ue)})}var ve=n(D,2),I=c(ve),R=S(I,!0),w=n(I,2);Xe(w,17,()=>et,d=>d.id,(d,p)=>{{let N=z(()=>e(s)===`template-${e(p).id}`),X=z(()=>e(s)===`template-${e(p).id}`);ye(d,{variant:"ghost",truncateLabel:!1,get active(){return e(N)},get"aria-pressed"(){return e(X)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(`template-${e(p).id}`),children:(H,V)=>{var Z=Ur(),A=c(Z),oe=c(A),L=S(oe,!0),ee=n(oe,2);{var te=J=>{var re=Nr(),Ne=S(re,!0);g(We=>m(Ne,We),[()=>u.workspace_setupScriptEditor_recommended_label()]),o(J,re)};W(ee,J=>{e(p).projectType===ie()&&J(te)})}l(A);var ne=n(A,2),Ce=S(ne,!0);l(Z),g(()=>{m(L,e(p).name),m(Ce,e(p).description)}),o(H,Z)},$$slots:{default:!0}})}}),l(ve),g((d,p,N)=>{m(T,d),m($,p),m(R,N)},[()=>u.workspace_setupScriptEditor_generate_label(),()=>u.workspace_setupScriptEditor_generate_description(),()=>u.workspace_setupScriptEditor_templates_label()]),o(t,a)},Ge=t=>{var a=Gr(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2);Xe(h,21,()=>jt,i=>i.name,(i,f)=>{var x=Ue(),k=U(x);Ee(k,()=>At,(D,ue)=>{ue(D,{delayDuration:100,children:(ve,I)=>{var R=Ue(),w=U(R);Ee(w,()=>Ct,(d,p)=>{p(d,{delayDuration:100,children:(N,X)=>{var H=It(),V=U(H);Ee(V,()=>Et,(A,oe)=>{oe(A,{children:(L,ee)=>{var te=Rr(),ne=S(te);g(()=>m(ne,`$${e(f).name??""}`)),o(L,te)},$$slots:{default:!0}})});var Z=n(V,2);Ee(Z,()=>Tt,(A,oe)=>{oe(A,{side:"bottom",class:"max-w-xs z-[200]",children:(L,ee)=>{var te=Fr(),ne=U(te),Ce=S(ne,!0),J=n(ne,2),re=c(J),Ne=n(re),We=S(Ne,!0);l(J),g(pt=>{m(Ce,e(f).description),m(re,`${pt??""} `),m(We,e(f).example)},[()=>u.workspace_setupScriptEditor_example_before()]),o(L,te)},$$slots:{default:!0}})}),o(N,H)},$$slots:{default:!0}})}),o(ve,R)},$$slots:{default:!0}})}),o(i,x)}),l(h),l(y);var $=n(y,2),_=c($);xt(ht(_,{language:"shell",lineNumbers:!0,get lineWrapping(){return e(Se)},get value(){return C()},set value(i){C(i)}}),i=>r(pe,i,!0),()=>e(pe)),l($),g(i=>m(T,i),[()=>u.workspace_setupScriptEditor_variables_label()]),ar("keydown",$,i=>{i.altKey&&i.key==="z"&&(i.preventDefault(),r(Se,!e(Se)))}),o(t,a)},Me=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Mr(),_=U($),i=c(_);Fe(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),Oe(1,_,()=>$t,()=>({tier:"moderate",axis:"x",distance:-8})),Oe(1,f,()=>$t,()=>({tier:"moderate",axis:"x"})),o(h,$)},T=h=>{var $=Dr(),_=U($),i=c(_);Fe(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),o(h,$)};W(y,h=>{he()==="workspace"?h(j):h(T,-1)})}l(a),g(()=>Re(a,1,gt(he()==="workspace"?"setup-workspace-layout":"grid flex-1 min-h-0 min-w-0 grid-cols-1 grid-rows-[minmax(0,1fr)_minmax(0,2fr)] md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] md:grid-rows-1"),"svelte-1yy464i")),o(t,a)};let O=F(P,"repoPath",7,""),ae=F(P,"repositoryKey",7),me=F(P,"githubUrl",7,null),ie=F(P,"projectType",7,void 0),le=F(P,"repoConfigScript",7,null),C=F(P,"value",15,""),fe=F(P,"expanded",15,!1),ge=F(P,"scriptName",31,()=>rt(u.workspace_setupScriptEditor_custom_name())),ce=F(P,"scriptNameSource",15,"named"),xe=F(P,"isCustomScript",15,!1),be=F(P,"compact",7,!1),De=F(P,"triggerClass",7,""),Le=F(P,"contentOnly",7,!1),je=F(P,"contentClass",7,""),he=F(P,"presentation",7,"editor"),de=F(P,"onchange",7),Y=K(!1),ke=K(rt(mt(()=>xe()))),$e=K(!1),Ie=K(!1),Je=K(void 0),pe=K(void 0),s=K(""),v=K(!1),E=K(rt(ge())),q=K(rt(ce())),se=K(!1);const B="last-used",M=z(()=>{const t=ae()??O(),a=t?gr(t,me()):void 0;return a?.nameSource==="repo-config"?{...a,name:"Custom",nameSource:"custom"}:a}),Q=z(()=>{const t=new Map;return le()&&t.set(qe,{content:le(),label:it,source:"repo-config"}),e(M)&&t.set(B,{content:e(M).content,label:e(M).name,source:e(M).nameSource}),et.forEach(a=>{t.set(`template-${a.id}`,{content:fr(a),label:a.name,source:"named"})}),t});let Se=K(!0);const ze=z(()=>{if(e(v))return tt(e(E),e(q));if(!e(s))return u.workspace_setupScriptEditor_custom_name();const t=e(Q).get(e(s));return t?tt(t.label,t.source):u.workspace_setupScriptEditor_custom_name()});function we(t){r(s,t,!0),r(v,!1),r(se,!0);const a=e(Q).get(t);a&&(C(a.content),r(E,a.label,!0),r(q,a.source,!0),de()?.(C())),he()==="picker"?(r(ke,!1),r($e,!1),requestAnimationFrame(()=>e(Je)?.querySelector("[data-setup-source][aria-pressed=true]")?.focus())):requestAnimationFrame(()=>e(pe)?.focus())}function lt(t){if(e(s)&&e(s)!=="none"){const a=e(Q).get(e(s));a&&r(v,t!==a.content)}else t&&r(v,!0)}const Pe=(()=>{const t=et.find(a=>a.id==="generic");return t?`template-${t.id}`:""})(),st=z(()=>e(v)||!e(s)?"custom":e(s)),Ye=z(()=>{const t=[];le()&&t.push({id:qe,name:tt(it,"repo-config")}),e(M)&&t.push({id:B,name:u.workspace_setupScriptEditor_lastUsed_label()});for(const a of et){const y=`template-${a.id}`;(y===Pe||y===e(s))&&t.push({id:y,name:a.name})}return t.push({id:"custom",name:u.workspace_setupScriptPicker_custom_label()}),t}),ct=z(()=>et.filter(t=>!e(Ye).some(a=>a.id===`template-${t.id}`)));function Dt(){r(s,""),r(v,!0),r(E,"Custom"),r(q,"custom"),r(Y,!1),r(ke,!0),requestAnimationFrame(()=>e(pe)?.focus())}function Lt(t){r(se,!0),r(s,""),C(t.content),r(E,t.name,!0),r(q,"named"),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())}let dt=K(null);ft(()=>{const t=ae()??O();if(t===e(dt))return;const a=e(dt)===null&&(xe()||C().trim().length>0);if(r(dt,t,!0),a){mt(()=>{let T=!1;const h=C().trim();for(const[$,_]of e(Q).entries())if(h===_.content.trim()&&_.source===ce()&&_.label===ge()){r(s,$,!0),r(E,_.label,!0),r(q,_.source,!0),r(v,!1),T=!0;break}T||(r(v,!0),e(E)||(r(E,ge()||u.workspace_setupScriptEditor_custom_name(),!0),r(q,ge()?ce():"named",!0))),r(se,!0)});return}const y=!!le(),j=e(M);if(mt(()=>{if(r(v,!1),r(se,!0),y)r(s,qe,!0),r(E,it,!0),r(q,"repo-config");else if(j)r(s,B),r(E,j.name,!0),r(q,j.nameSource,!0);else if(Pe){r(s,Pe,!0);const T=e(Q).get(Pe);r(E,T?.label||u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}else r(E,u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}),y&&le())C(le()),de()?.(C());else if(j)C(j.content),de()?.(C());else if(Pe){const T=e(Q).get(Pe);T&&(C(T.content),de()?.(C()))}}),ft(()=>{if(e(se)){r(se,!1);return}C()!==void 0&<(C())}),ft(()=>{ge(e(E)),ce(e(q)),xe(e(v))});var zt={get repoPath(){return O()},set repoPath(t=""){O(t),G()},get repositoryKey(){return ae()},set repositoryKey(t){ae(t),G()},get githubUrl(){return me()},set githubUrl(t=null){me(t),G()},get projectType(){return ie()},set projectType(t=void 0){ie(t),G()},get repoConfigScript(){return le()},set repoConfigScript(t=null){le(t),G()},get value(){return C()},set value(t=""){C(t),G()},get expanded(){return fe()},set expanded(t=!1){fe(t),G()},get scriptName(){return ge()},set scriptName(t=u.workspace_setupScriptEditor_custom_name()){ge(t),G()},get scriptNameSource(){return ce()},set scriptNameSource(t="named"){ce(t),G()},get isCustomScript(){return xe()},set isCustomScript(t=!1){xe(t),G()},get compact(){return be()},set compact(t=!1){be(t),G()},get triggerClass(){return De()},set triggerClass(t=""){De(t),G()},get contentOnly(){return Le()},set contentOnly(t=!1){Le(t),G()},get contentClass(){return je()},set contentClass(t=""){je(t),G()},get presentation(){return he()},set presentation(t="editor"){he(t),G()},get onchange(){return de()},set onchange(t){de(t),G()},$set:Rt,$on:(t,a)=>Ft(P,t,a)},wt=Ue(),Wt=U(wt);{var qt=t=>{var a=Ue(),y=U(a);{var j=T=>{var h=Ue(),$=U(h);{var _=x=>{var k=Ke(),D=c(k);Ae(D),l(k),g(()=>Re(k,1,`${je()??""} min-w-0`,"svelte-1yy464i")),o(x,k)},i=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Re(k,1,`${je()??""} flex min-h-0 min-w-0 flex-1 flex-col`,"svelte-1yy464i")),o(x,k)},f=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Re(k,1,`${je()??""} flex flex-col gap-3 flex-1 min-h-0 min-w-0`,"svelte-1yy464i")),Oe(3,k,()=>Ze,()=>({tier:"moderate"})),o(x,k)};W($,x=>{he()==="picker"?x(_):he()==="workspace"?x(i,1):x(f,-1)})}o(T,h)};W(y,T=>{fe()&&T(j)})}o(t,a)},Kt=t=>{var a=qr(),y=U(a),j=c(y);ye(j,{variant:"ghost",size:"sm",get class(){return`whitespace-nowrap hover:text-inherit! ${De()??""}`},onclick:()=>fe(!fe()),children:(i,f)=>{var x=Lr(),k=U(x);Te(k,{get icon(){return bt},size:"xs"});var D=n(k,2),ue=S(D,!0),ve=n(D,2),I=S(ve,!0);g(R=>{m(ue,R),m(I,e(ze))},[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(i,x)},$$slots:{default:!0}});var T=n(j,2);{var h=i=>{var f=zr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W(T,i=>{fe()&&!be()&&i(h)})}l(y);var $=n(y,2);{var _=i=>{var f=Wr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W($,i=>{fe()&&be()&&i(_)})}g(()=>Re(y,1,gt(be()?"":"w-full"))),o(t,a)};W(Wt,t=>{Le()?t(qt):t(Kt,-1)})}return o(He,wt),Mt(zt)}rr(["keydown"]);export{Kr as default};
|
|
1
|
+
import{t as Ot,bo as F,bm as u,bw as Rt,b as Ft}from"./CHWIPzMj.js";import{bs as Gt,bV as K,br as rt,bk as er,bj as tr,bH as r,a5 as c,aD as e,bS as n,bl as S,bA as l,b_ as g,bO as m,W as o,bn as Mt,aA as G,c9 as z,be as Ve,b$ as Be,aB as b,c5 as mt,ca as ft,a7 as Ue,ay as U,ai as rr,aj as ar,bf as sr}from"./3SdAC2_C.js";import{i as W}from"./DDtBtnNz.js";import{I as or,g as Xe}from"./Bqdjarag.js";import{c as Ee}from"./C_VUI8Os.js";import{n as Oe,j as Ze,h as $t}from"./D_gp0b_i.js";import{f as Re,c as gt,s as nr}from"./B09v4S72.js";import{b as xt}from"./Dn334wJv.js";import{F as Te,cR as ir,au as lr,cK as bt,c$ as Pt,cd as cr}from"./Bm1YRNX5.js";import{f as ye}from"./DSQXi-HI.js";import"./QgUSWdkO.js";import"./BVhmKG23.js";import{M as nt}from"./DCpFqaYA.js";import{M as dr}from"./CFxNovSS.js";import{w as _e}from"./ouMJlHY1.js";import{h as Ct,i as Et,g as Tt,P as At}from"./DDfMifm6.js";import{C as ht}from"./DJ6GAsDd.js";import{c as pr}from"./ChTqQfQN.js";import{A as ur}from"./Cy7afLsK.js";import"./Bx3lRAzK.js";import{f as vr}from"./CWVqIb-d.js";import{Jt as _r}from"./DJM-jC4D.js";import{dR as mr}from"./CB6JpnWC.js";import{S as et,j as fr,a as jt}from"./B2kxgCpF.js";import{R as qe,c as it,m as gr,bE as tt}from"./g4xg1V0H.js";import"./XslshjYv.js";var xr=b('<div class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></div>'),br=b('<div class="text-sm text-danger bg-danger-background/10 rounded-md p-3"> </div>'),hr=b('<div class="flex items-center gap-2 text-subtle"><!> <span class="text-sm"> </span></div>'),Sr=b('<div class="p-4 max-h-60 overflow-y-auto overscroll-contain"><!></div>'),wr=b('<div class="p-3 bg-muted/30"><div class="flex items-center justify-between mb-2"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span></div> <!></div> <p class="text-xs text-subtle mb-2"> </p> <div class="h-32 rounded border border-border overflow-hidden"><!></div></div>'),yr=b('<div class="flex flex-col bg-background border border-border rounded-lg overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-border bg-muted/30"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span> <!></div> <div class="flex items-center gap-1"><!></div></div> <!> <!></div>');function St(He,P){if(new.target)return Ot({component:St,...He});Gt(P,!0);const at=pr("SetupScriptAgent");let Ae=F(P,"repoPath",7),Fe=F(P,"onScriptGenerated",7),Ge=F(P,"onClose",7),Me=K(rt(crypto.randomUUID())),O=K(!1),ae=K(null),me=!1,ie=K(null);er(()=>{me=!0,C()}),tr(()=>{me=!1});async function le(){try{const v=mr.select(_r.state).find(E=>E.repositoryPath===Ae()||E.path===Ae()||E.worktreePath===Ae());return v?String(v.id):null}catch{return null}}async function C(){r(O,!0),r(ae,null),r(ie,null);try{const s=await le();if(!me)return;if(!s){r(ae,u.workspace_setupScriptAgent_noWorkspace_error(),!0),r(O,!1);return}const v=await vr.setupScripts.generate(s);if(!me)return;if(!v||!v.script){r(ae,u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1);return}r(ie,{name:v.projectType?u.workspace_setupScriptAgent_projectTypeSetup_label({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedSetup_label(),description:v.projectType?u.workspace_setupScriptAgent_generatedForProject_description({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedFromAnalysis_description(),content:v.script},!0),r(O,!1)}catch(s){if(at.error("Failed to generate setup script",s),!me)return;r(ae,s instanceof Error?s.message:u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1)}}function fe(s){Fe()?.(s)}var ge={get repoPath(){return Ae()},set repoPath(s){Ae(s),G()},get onScriptGenerated(){return Fe()},set onScriptGenerated(s){Fe(s),G()},get onClose(){return Ge()},set onClose(s){Ge(s),G()},$set:Rt,$on:(s,v)=>Ft(P,s,v)},ce=yr(),xe=c(ce),be=c(xe),De=c(be);ur(De,{variant:"standard",get agentId(){return e(Me)}});var Le=n(De,2),je=S(Le,!0),he=n(Le,2);{var de=s=>{var v=xr();o(s,v)};W(he,s=>{e(O)&&s(de)})}l(be);var Y=n(be,2),ke=c(Y);{let s=z(()=>u.workspace_setupScriptAgent_close_ariaLabel());ye(ke,{variant:"ghost-light",size:"icon-sm",iconOnly:!0,get"aria-label"(){return e(s)},get onclick(){return Ge()},children:(v,E)=>{Te(v,{get icon(){return ir}})},$$slots:{default:!0}})}l(Y),l(xe);var $e=n(xe,2);{var Ie=s=>{var v=Sr(),E=c(v);{var q=B=>{var M=br(),Q=S(M,!0);g(()=>m(Q,e(ae))),o(B,M)},se=B=>{var M=hr(),Q=c(M);or(Q,{size:16,class:"text-primary"});var Se=n(Q,2),ze=S(Se,!0);l(M),g(we=>m(ze,we),[()=>u.workspace_setupScriptAgent_analyzing_label()]),o(B,M)};W(E,B=>{e(ae)?B(q):B(se,-1)})}l(v),o(s,v)};W($e,s=>{(e(ae)||e(O))&&s(Ie)})}var Je=n($e,2);{var pe=s=>{var v=wr(),E=c(v),q=c(E),se=c(q);Te(se,{get icon(){return lr},class:"text-green-500"});var B=n(se,2),M=S(B,!0);l(q);var Q=n(q,2);ye(Q,{variant:"primary",size:"sm",onclick:()=>fe(e(ie)),class:"h-7",children:(Pe,st)=>{Ve();var Ye=Be();g(ct=>m(Ye,ct),[()=>u.workspace_setupScriptAgent_createScript_label()]),o(Pe,Ye)},$$slots:{default:!0}}),l(E);var Se=n(E,2),ze=S(Se,!0),we=n(Se,2),lt=c(we);ht(lt,{get value(){return e(ie).content},language:"shell",readOnly:!0,lineNumbers:!1}),l(we),l(v),g(()=>{m(M,e(ie).name),m(ze,e(ie).description)}),o(s,v)};W(Je,s=>{e(ie)&&!e(O)&&s(pe)})}return l(ce),g(s=>m(je,s),[()=>u.workspace_setupScriptAgent_title()]),o(He,ce),Mt(ge)}var kr=b('<span class="block truncate"> </span>'),$r=b("<div></div>"),Pr=b('<div role="group"></div> <div class="mt-2 border-t border-border pt-2"><!></div> <!> <div class="mt-2 border-t border-border pt-2"><!> <!></div>',1),Cr=b('<code class="type-caption text-muted-foreground"> </code>'),Er=b('<p> </p> <code class="type-caption"> </code>',1),It=b("<!> <!>",1),Tr=b('<div class="mt-2 flex flex-wrap gap-2 px-2"></div>'),Ar=b('<div class="h-44 min-w-0 overflow-hidden rounded-(--radius-medium) border border-border bg-background py-2"><!></div> <div class="mt-2 px-1"><!> <!></div>',1),jr=b('<div class="mb-2 flex items-center justify-between gap-3 px-2"><div class="min-w-0"><h3> </h3> <p class="type-caption truncate text-muted-foreground"> </p></div> <!></div> <!>',1),Ke=b("<div><!></div>"),Ir=b("<!> ",1),Nt=b('<div class="min-w-0 w-full"><span class="text-sm"> </span> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ut=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>'),Nr=b('<span class="type-caption px-1.5 py-0.5 rounded-full bg-primary/10 text-primary font-medium shrink-0"> </span>'),Ur=b('<div class="min-w-0 w-full"><div class="flex flex-wrap items-center gap-x-2 gap-y-1"><span class="text-sm"> </span> <!></div> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Or=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <p class="text-xs text-subtle px-2 mb-2"> </p> <!></div> <!> <!> <div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>',1),Rr=b('<code class="type-caption px-1.5 py-0.5 rounded bg-background/80 text-muted-foreground font-mono cursor-pointer hover:bg-background hover:text-foreground transition-colors"> </code>'),Fr=b('<p class="text-xs"> </p> <p class="mt-1 text-xs text-muted-foreground"> <code class="type-caption"> </code></p>',1),Gr=b('<div class="flex flex-wrap items-center gap-x-3 gap-y-1.5 px-3 py-1.5 bg-muted/30 shrink-0"><span class="type-caption font-medium text-muted-foreground shrink-0"> </span> <div class="flex flex-wrap gap-1.5"></div></div> <div class="flex-1 min-h-0 min-w-0 overflow-hidden py-3 bg-background"><!></div>',1),Mr=b('<div class="flex min-h-0 min-w-0 flex-col overflow-y-auto"><!></div> <div class="flex min-h-0 min-w-0 flex-col"><!></div>',1),Dr=b('<div class="flex flex-col min-h-0 min-w-0 overflow-y-auto p-2 md:pr-4"><!></div> <div class="flex flex-col min-w-0 min-h-0"><!></div>',1),Lr=b('<!> <span class="text-sm font-normal text-subtle"> </span> <span class="text-subtle font-normal"> </span>',1),zr=b('<div class="mt-1 pl-7 space-y-3"><!></div>'),Wr=b('<div class="space-y-3"><!></div>'),qr=b("<div><!> <!></div> <!>",1);function Kr(He,P){if(new.target)return Ot({component:Kr,...He});Gt(P,!0);const at=(t,a=sr)=>{{const y=_=>{Te(_,{get icon(){return bt},get class(){return _e.icon}})},j=_=>{var i=kr(),f=S(i,!0);g(()=>m(f,a().name)),o(_,i)},T=_=>{{let i=z(()=>e(st)===a().id?"checked":"empty");dr(_,{get state(){return e(i)}})}};let h=z(()=>e(st)===a().id),$=z(()=>e(st)===a().id);nt(t,{get selected(){return e(h)},get"aria-pressed"(){return e($)},get"data-setup-source"(){return a().id},get class(){return _e.row},onclick:()=>a().id==="custom"?Dt():we(a().id),leading:y,title:j,trailing:T,$$slots:{leading:!0,title:!0,trailing:!0}})}},Ae=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Pr(),_=U($);Xe(_,21,()=>e(Ye),I=>I.id,(I,R)=>{at(I,()=>e(R))}),l(_);var i=n(_,2),f=c(i);nt(f,{get"aria-expanded"(){return e($e)},get class(){return _e.row},onclick:()=>r($e,!e($e)),leading:w=>{Te(w,{get icon(){return cr},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptEditor_templates_label()]),o(w,d)},$$slots:{leading:!0,title:!0}}),l(i);var x=n(i,2);{var k=I=>{var R=$r();Xe(R,21,()=>e(ct),w=>w.id,(w,d)=>{at(w,()=>({id:`template-${e(d).id}`,name:e(d).name}))}),l(R),Oe(3,R,()=>Ze,()=>({tier:"moderate"})),o(I,R)};W(x,I=>{e($e)&&I(k)})}var D=n(x,2),ue=c(D);nt(ue,{get class(){return _e.row},onclick:()=>r(ke,!0),leading:w=>{Te(w,{get icon(){return bt},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptPicker_edit_label()]),o(w,d)},$$slots:{leading:!0,title:!0}});var ve=n(ue,2);{const I=d=>{Te(d,{get icon(){return Pt},get class(){return _e.icon}})},R=d=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(d,p)};let w=z(()=>!O());nt(ve,{get class(){return _e.row},get disabled(){return e(w)},onclick:()=>{r(ke,!0),r(Y,!0)},leading:I,title:R,$$slots:{leading:!0,title:!0}})}l(D),g(I=>nr(_,"aria-label",I),[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(h,$)},T=h=>{var $=jr(),_=U($),i=c(_),f=c(i),x=S(f,!0),k=n(f,2),D=S(k,!0);l(i);var ue=n(i,2);ye(ue,{variant:"ghost",size:"sm",onclick:()=>{r(ke,!1),r(Y,!1)},children:(w,d)=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptPicker_choose_label()]),o(w,p)},$$slots:{default:!0}}),l(_);var ve=n(_,2);{var I=w=>{St(w,{get repoPath(){return O()},onScriptGenerated:Lt,onClose:()=>r(Y,!1)})},R=w=>{var d=Ar(),p=U(d),N=c(p);xt(ht(N,{language:"shell",lineNumbers:!1,get lineWrapping(){return e(Se)},get value(){return C()},set value(A){C(A)}}),A=>r(pe,A,!0),()=>e(pe)),l(p);var X=n(p,2),H=c(X);ye(H,{variant:"ghost",size:"sm",get active(){return e(Ie)},get"aria-expanded"(){return e(Ie)},onclick:()=>r(Ie,!e(Ie)),children:(A,oe)=>{Ve();var L=Be();g(ee=>m(L,ee),[()=>u.workspace_setupScriptEditor_variables_label()]),o(A,L)},$$slots:{default:!0}});var V=n(H,2);{var Z=A=>{var oe=Ue(),L=U(oe);Ee(L,()=>At,(ee,te)=>{te(ee,{delayDuration:100,children:(ne,Ce)=>{var J=Tr();Xe(J,21,()=>jt,re=>re.name,(re,Ne)=>{var We=Ue(),pt=U(We);Ee(pt,()=>Ct,(Vt,Bt)=>{Bt(Vt,{children:(Ht,Vr)=>{var yt=It(),kt=U(yt);Ee(kt,()=>Et,(ut,vt)=>{vt(ut,{children:(_t,Yt)=>{var Qe=Cr(),ot=S(Qe);g(()=>m(ot,`$${e(Ne).name??""}`)),o(_t,Qe)},$$slots:{default:!0}})});var Jt=n(kt,2);Ee(Jt,()=>Tt,(ut,vt)=>{vt(ut,{side:"top",class:"max-w-xs",children:(_t,Yt)=>{var Qe=Er(),ot=U(Qe),Qt=S(ot,!0),Xt=n(ot,2),Zt=S(Xt,!0);g(()=>{m(Qt,e(Ne).description),m(Zt,e(Ne).example)}),o(_t,Qe)},$$slots:{default:!0}})}),o(Ht,yt)},$$slots:{default:!0}})}),o(re,We)}),l(J),o(ne,J)},$$slots:{default:!0}})}),o(A,oe)};W(V,A=>{e(Ie)&&A(Z)})}l(X),o(w,d)};W(ve,w=>{e(Y)&&O()?w(I):w(R,-1)})}g(w=>{Re(f,1,gt(_e.title),"svelte-1yy464i"),m(x,w),m(D,e(ze))},[()=>u.workspace_setupScriptPicker_commands_label()]),o(h,$)};W(y,h=>{e(ke)?h(T,-1):h(j)})}l(a),xt(a,h=>r(Je,h),()=>e(Je)),g(()=>Re(a,1,`${_e.rows} min-w-0`,"svelte-1yy464i")),o(t,a)},Fe=t=>{var a=Or(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2),$=S(h,!0),_=n(h,2);{var i=d=>{var p=Ke(),N=c(p);St(N,{get repoPath(){return O()},onScriptGenerated:X=>{r(se,!0),r(s,""),C(X.content),r(E,X.name,!0),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())},onClose:()=>r(Y,!1)}),l(p),Oe(3,p,()=>Ze,()=>({tier:"moderate"})),o(d,p)},f=d=>{{let p=z(()=>!O());ye(d,{variant:"ghost",size:"sm",class:"w-full justify-start text-subtle",onclick:()=>r(Y,!0),get disabled(){return e(p)},children:(N,X)=>{var H=Ir(),V=U(H);Te(V,{get icon(){return Pt},class:"mr-1.5"});var Z=n(V);g(A=>m(Z,` ${A??""}`),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(N,H)},$$slots:{default:!0}})}};W(_,d=>{e(Y)&&O()?d(i):d(f,-1)})}l(y);var x=n(y,2);{var k=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===qe),Z=z(()=>e(s)===qe);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(qe),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(it,"repo-config"),()=>u.workspace_setupScriptEditor_repoConfig_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_repoConfig_label()]),o(d,p)};W(x,d=>{le()&&d(k)})}var D=n(x,2);{var ue=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===B),Z=z(()=>e(s)===B);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(B),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(e(M).name,e(M).nameSource),()=>u.workspace_setupScriptEditor_lastUsed_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_lastUsed_label()]),o(d,p)};W(D,d=>{e(M)&&d(ue)})}var ve=n(D,2),I=c(ve),R=S(I,!0),w=n(I,2);Xe(w,17,()=>et,d=>d.id,(d,p)=>{{let N=z(()=>e(s)===`template-${e(p).id}`),X=z(()=>e(s)===`template-${e(p).id}`);ye(d,{variant:"ghost",truncateLabel:!1,get active(){return e(N)},get"aria-pressed"(){return e(X)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(`template-${e(p).id}`),children:(H,V)=>{var Z=Ur(),A=c(Z),oe=c(A),L=S(oe,!0),ee=n(oe,2);{var te=J=>{var re=Nr(),Ne=S(re,!0);g(We=>m(Ne,We),[()=>u.workspace_setupScriptEditor_recommended_label()]),o(J,re)};W(ee,J=>{e(p).projectType===ie()&&J(te)})}l(A);var ne=n(A,2),Ce=S(ne,!0);l(Z),g(()=>{m(L,e(p).name),m(Ce,e(p).description)}),o(H,Z)},$$slots:{default:!0}})}}),l(ve),g((d,p,N)=>{m(T,d),m($,p),m(R,N)},[()=>u.workspace_setupScriptEditor_generate_label(),()=>u.workspace_setupScriptEditor_generate_description(),()=>u.workspace_setupScriptEditor_templates_label()]),o(t,a)},Ge=t=>{var a=Gr(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2);Xe(h,21,()=>jt,i=>i.name,(i,f)=>{var x=Ue(),k=U(x);Ee(k,()=>At,(D,ue)=>{ue(D,{delayDuration:100,children:(ve,I)=>{var R=Ue(),w=U(R);Ee(w,()=>Ct,(d,p)=>{p(d,{delayDuration:100,children:(N,X)=>{var H=It(),V=U(H);Ee(V,()=>Et,(A,oe)=>{oe(A,{children:(L,ee)=>{var te=Rr(),ne=S(te);g(()=>m(ne,`$${e(f).name??""}`)),o(L,te)},$$slots:{default:!0}})});var Z=n(V,2);Ee(Z,()=>Tt,(A,oe)=>{oe(A,{side:"bottom",class:"max-w-xs z-[200]",children:(L,ee)=>{var te=Fr(),ne=U(te),Ce=S(ne,!0),J=n(ne,2),re=c(J),Ne=n(re),We=S(Ne,!0);l(J),g(pt=>{m(Ce,e(f).description),m(re,`${pt??""} `),m(We,e(f).example)},[()=>u.workspace_setupScriptEditor_example_before()]),o(L,te)},$$slots:{default:!0}})}),o(N,H)},$$slots:{default:!0}})}),o(ve,R)},$$slots:{default:!0}})}),o(i,x)}),l(h),l(y);var $=n(y,2),_=c($);xt(ht(_,{language:"shell",lineNumbers:!0,get lineWrapping(){return e(Se)},get value(){return C()},set value(i){C(i)}}),i=>r(pe,i,!0),()=>e(pe)),l($),g(i=>m(T,i),[()=>u.workspace_setupScriptEditor_variables_label()]),ar("keydown",$,i=>{i.altKey&&i.key==="z"&&(i.preventDefault(),r(Se,!e(Se)))}),o(t,a)},Me=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Mr(),_=U($),i=c(_);Fe(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),Oe(1,_,()=>$t,()=>({tier:"moderate",axis:"x",distance:-8})),Oe(1,f,()=>$t,()=>({tier:"moderate",axis:"x"})),o(h,$)},T=h=>{var $=Dr(),_=U($),i=c(_);Fe(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),o(h,$)};W(y,h=>{he()==="workspace"?h(j):h(T,-1)})}l(a),g(()=>Re(a,1,gt(he()==="workspace"?"setup-workspace-layout":"grid flex-1 min-h-0 min-w-0 grid-cols-1 grid-rows-[minmax(0,1fr)_minmax(0,2fr)] md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] md:grid-rows-1"),"svelte-1yy464i")),o(t,a)};let O=F(P,"repoPath",7,""),ae=F(P,"repositoryKey",7),me=F(P,"githubUrl",7,null),ie=F(P,"projectType",7,void 0),le=F(P,"repoConfigScript",7,null),C=F(P,"value",15,""),fe=F(P,"expanded",15,!1),ge=F(P,"scriptName",31,()=>rt(u.workspace_setupScriptEditor_custom_name())),ce=F(P,"scriptNameSource",15,"named"),xe=F(P,"isCustomScript",15,!1),be=F(P,"compact",7,!1),De=F(P,"triggerClass",7,""),Le=F(P,"contentOnly",7,!1),je=F(P,"contentClass",7,""),he=F(P,"presentation",7,"editor"),de=F(P,"onchange",7),Y=K(!1),ke=K(rt(mt(()=>xe()))),$e=K(!1),Ie=K(!1),Je=K(void 0),pe=K(void 0),s=K(""),v=K(!1),E=K(rt(ge())),q=K(rt(ce())),se=K(!1);const B="last-used",M=z(()=>{const t=ae()??O(),a=t?gr(t,me()):void 0;return a?.nameSource==="repo-config"?{...a,name:"Custom",nameSource:"custom"}:a}),Q=z(()=>{const t=new Map;return le()&&t.set(qe,{content:le(),label:it,source:"repo-config"}),e(M)&&t.set(B,{content:e(M).content,label:e(M).name,source:e(M).nameSource}),et.forEach(a=>{t.set(`template-${a.id}`,{content:fr(a),label:a.name,source:"named"})}),t});let Se=K(!0);const ze=z(()=>{if(e(v))return tt(e(E),e(q));if(!e(s))return u.workspace_setupScriptEditor_custom_name();const t=e(Q).get(e(s));return t?tt(t.label,t.source):u.workspace_setupScriptEditor_custom_name()});function we(t){r(s,t,!0),r(v,!1),r(se,!0);const a=e(Q).get(t);a&&(C(a.content),r(E,a.label,!0),r(q,a.source,!0),de()?.(C())),he()==="picker"?(r(ke,!1),r($e,!1),requestAnimationFrame(()=>e(Je)?.querySelector("[data-setup-source][aria-pressed=true]")?.focus())):requestAnimationFrame(()=>e(pe)?.focus())}function lt(t){if(e(s)&&e(s)!=="none"){const a=e(Q).get(e(s));a&&r(v,t!==a.content)}else t&&r(v,!0)}const Pe=(()=>{const t=et.find(a=>a.id==="generic");return t?`template-${t.id}`:""})(),st=z(()=>e(v)||!e(s)?"custom":e(s)),Ye=z(()=>{const t=[];le()&&t.push({id:qe,name:tt(it,"repo-config")}),e(M)&&t.push({id:B,name:u.workspace_setupScriptEditor_lastUsed_label()});for(const a of et){const y=`template-${a.id}`;(y===Pe||y===e(s))&&t.push({id:y,name:a.name})}return t.push({id:"custom",name:u.workspace_setupScriptPicker_custom_label()}),t}),ct=z(()=>et.filter(t=>!e(Ye).some(a=>a.id===`template-${t.id}`)));function Dt(){r(s,""),r(v,!0),r(E,"Custom"),r(q,"custom"),r(Y,!1),r(ke,!0),requestAnimationFrame(()=>e(pe)?.focus())}function Lt(t){r(se,!0),r(s,""),C(t.content),r(E,t.name,!0),r(q,"named"),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())}let dt=K(null);ft(()=>{const t=ae()??O();if(t===e(dt))return;const a=e(dt)===null&&(xe()||C().trim().length>0);if(r(dt,t,!0),a){mt(()=>{let T=!1;const h=C().trim();for(const[$,_]of e(Q).entries())if(h===_.content.trim()&&_.source===ce()&&_.label===ge()){r(s,$,!0),r(E,_.label,!0),r(q,_.source,!0),r(v,!1),T=!0;break}T||(r(v,!0),e(E)||(r(E,ge()||u.workspace_setupScriptEditor_custom_name(),!0),r(q,ge()?ce():"named",!0))),r(se,!0)});return}const y=!!le(),j=e(M);if(mt(()=>{if(r(v,!1),r(se,!0),y)r(s,qe,!0),r(E,it,!0),r(q,"repo-config");else if(j)r(s,B),r(E,j.name,!0),r(q,j.nameSource,!0);else if(Pe){r(s,Pe,!0);const T=e(Q).get(Pe);r(E,T?.label||u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}else r(E,u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}),y&&le())C(le()),de()?.(C());else if(j)C(j.content),de()?.(C());else if(Pe){const T=e(Q).get(Pe);T&&(C(T.content),de()?.(C()))}}),ft(()=>{if(e(se)){r(se,!1);return}C()!==void 0&<(C())}),ft(()=>{ge(e(E)),ce(e(q)),xe(e(v))});var zt={get repoPath(){return O()},set repoPath(t=""){O(t),G()},get repositoryKey(){return ae()},set repositoryKey(t){ae(t),G()},get githubUrl(){return me()},set githubUrl(t=null){me(t),G()},get projectType(){return ie()},set projectType(t=void 0){ie(t),G()},get repoConfigScript(){return le()},set repoConfigScript(t=null){le(t),G()},get value(){return C()},set value(t=""){C(t),G()},get expanded(){return fe()},set expanded(t=!1){fe(t),G()},get scriptName(){return ge()},set scriptName(t=u.workspace_setupScriptEditor_custom_name()){ge(t),G()},get scriptNameSource(){return ce()},set scriptNameSource(t="named"){ce(t),G()},get isCustomScript(){return xe()},set isCustomScript(t=!1){xe(t),G()},get compact(){return be()},set compact(t=!1){be(t),G()},get triggerClass(){return De()},set triggerClass(t=""){De(t),G()},get contentOnly(){return Le()},set contentOnly(t=!1){Le(t),G()},get contentClass(){return je()},set contentClass(t=""){je(t),G()},get presentation(){return he()},set presentation(t="editor"){he(t),G()},get onchange(){return de()},set onchange(t){de(t),G()},$set:Rt,$on:(t,a)=>Ft(P,t,a)},wt=Ue(),Wt=U(wt);{var qt=t=>{var a=Ue(),y=U(a);{var j=T=>{var h=Ue(),$=U(h);{var _=x=>{var k=Ke(),D=c(k);Ae(D),l(k),g(()=>Re(k,1,`${je()??""} min-w-0`,"svelte-1yy464i")),o(x,k)},i=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Re(k,1,`${je()??""} flex min-h-0 min-w-0 flex-1 flex-col`,"svelte-1yy464i")),o(x,k)},f=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Re(k,1,`${je()??""} flex flex-col gap-3 flex-1 min-h-0 min-w-0`,"svelte-1yy464i")),Oe(3,k,()=>Ze,()=>({tier:"moderate"})),o(x,k)};W($,x=>{he()==="picker"?x(_):he()==="workspace"?x(i,1):x(f,-1)})}o(T,h)};W(y,T=>{fe()&&T(j)})}o(t,a)},Kt=t=>{var a=qr(),y=U(a),j=c(y);ye(j,{variant:"ghost",size:"sm",get class(){return`whitespace-nowrap hover:text-inherit! ${De()??""}`},onclick:()=>fe(!fe()),children:(i,f)=>{var x=Lr(),k=U(x);Te(k,{get icon(){return bt},size:"xs"});var D=n(k,2),ue=S(D,!0),ve=n(D,2),I=S(ve,!0);g(R=>{m(ue,R),m(I,e(ze))},[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(i,x)},$$slots:{default:!0}});var T=n(j,2);{var h=i=>{var f=zr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W(T,i=>{fe()&&!be()&&i(h)})}l(y);var $=n(y,2);{var _=i=>{var f=Wr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W($,i=>{fe()&&be()&&i(_)})}g(()=>Re(y,1,gt(be()?"":"w-full"))),o(t,a)};W(Wt,t=>{Le()?t(qt):t(Kt,-1)})}return o(He,wt),Mt(zt)}rr(["keydown"]);export{Kr as default};
|