@intent-hq/web 2.300.0 → 2.301.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/chunks/{D24Lh2xV.js → -1vWYJiy.js} +1 -1
- package/web/app/immutable/chunks/{3MzspyfQ.js → 0_FDVEla.js} +1 -1
- package/web/app/immutable/chunks/{CVbstW5g.js → 42GHkgj6.js} +1 -1
- package/web/app/immutable/chunks/{L35vxo_x.js → 4I8WRxn6.js} +1 -1
- package/web/app/immutable/chunks/{uuGBA4cr.js → 4byfznQh.js} +1 -1
- package/web/app/immutable/chunks/{Bhrt6-Mt.js → 6Ql_vn7X.js} +1 -1
- package/web/app/immutable/chunks/{CoKvDYIY.js → 6hOEL6g0.js} +1 -1
- package/web/app/immutable/chunks/{DqZp-_1t.js → 7O3nfCeH.js} +1 -1
- package/web/app/immutable/chunks/{zZaNF0gw.js → 8EDHNAa0.js} +1 -1
- package/web/app/immutable/chunks/{CfjGsJrO.js → 8Q_Was_5.js} +1 -1
- package/web/app/immutable/chunks/{Ba2NpplL.js → 9k5bnL8-.js} +2 -2
- package/web/app/immutable/chunks/{Cz9zjNu0.js → B-JIdXlm.js} +1 -1
- package/web/app/immutable/chunks/{B9P5rUiO.js → B-OGKYEx.js} +2 -2
- package/web/app/immutable/chunks/{g4ZkGYVX.js → B220ai_K.js} +1 -1
- package/web/app/immutable/chunks/{ChhEI5-A.js → B2jj_YAX.js} +1 -1
- package/web/app/immutable/chunks/{BF2JOf_h.js → B4Ys_Zqk.js} +1 -1
- package/web/app/immutable/chunks/{BLML8tyL.js → B52XysAQ.js} +1 -1
- package/web/app/immutable/chunks/{Cr3qamxz.js → B6wnyXxa.js} +1 -1
- package/web/app/immutable/chunks/{s81wpUv4.js → B7VWEjxq.js} +1 -1
- package/web/app/immutable/chunks/{CWh86ZYE.js → B7zUuO00.js} +1 -1
- package/web/app/immutable/chunks/{BJbo_kKO.js → B8S_XDvA.js} +1 -1
- package/web/app/immutable/chunks/{DMlNL7XW.js → B9G1J12P.js} +6 -6
- package/web/app/immutable/chunks/{BxepIPme.js → BAXlZEur.js} +1 -1
- package/web/app/immutable/chunks/{ZfjlDNse.js → BAbzdNi8.js} +1 -1
- package/web/app/immutable/chunks/{Ba3Gl_Rx.js → BBNnH_sw.js} +2 -2
- package/web/app/immutable/chunks/{BOBlxuhv.js → BDHBtQ3l.js} +1 -1
- package/web/app/immutable/chunks/{DJrVxxbZ.js → BEgosT1d.js} +1 -1
- package/web/app/immutable/chunks/{BW4Lb1gb.js → BEj-d9Cx.js} +1 -1
- package/web/app/immutable/chunks/{CXuptX8T.js → BF75AbUh.js} +1 -1
- package/web/app/immutable/chunks/{DLk_QjTP.js → BGv3Ttev.js} +1 -1
- package/web/app/immutable/chunks/{ClQcbOPg.js → BH5cuIQi.js} +1 -1
- package/web/app/immutable/chunks/BJn7bayT.js +1 -0
- package/web/app/immutable/chunks/{CdqaycPl.js → BL-4c5eP.js} +1 -1
- package/web/app/immutable/chunks/BLn5rsUE.js +5 -0
- package/web/app/immutable/chunks/{C1ANrPzv.js → BNPFPBlO.js} +1 -1
- package/web/app/immutable/chunks/{Dps6NMO7.js → BNrl_yXC.js} +1 -1
- package/web/app/immutable/chunks/{B87LX9tB.js → BPzYYRAs.js} +4 -4
- package/web/app/immutable/chunks/{CSSOAZoU.js → BQY3g8uE.js} +6 -6
- package/web/app/immutable/chunks/{0nqxMME2.js → BR-wS1W8.js} +1 -1
- package/web/app/immutable/chunks/{BEp708sp.js → BRMj8a4h.js} +1 -1
- package/web/app/immutable/chunks/{BbB0oN_T.js → BRwNKwD7.js} +1 -1
- package/web/app/immutable/chunks/{DW4Kmsyn.js → BU8fu6L_.js} +1 -1
- package/web/app/immutable/chunks/{CiJPyUxP.js → BVJeg9VF.js} +3 -3
- package/web/app/immutable/chunks/{GIJe6jEe.js → BWjmxT5D.js} +1 -1
- package/web/app/immutable/chunks/{GLxqtUdl.js → BWljXDfF.js} +1 -1
- package/web/app/immutable/chunks/{D2MsQ7CI.js → BXDl97pl.js} +1 -1
- package/web/app/immutable/chunks/{C9oKpMS_.js → BXU_OYLJ.js} +1 -1
- package/web/app/immutable/chunks/{C_A8Orac.js → BYk_qw69.js} +1 -1
- package/web/app/immutable/chunks/{Bx4lXaHY.js → BYxkGGC-.js} +1 -1
- package/web/app/immutable/chunks/{BM96cMym.js → B_iqW4nZ.js} +1 -1
- package/web/app/immutable/chunks/{VSh28uJa.js → BbJJ4Uie.js} +1 -1
- package/web/app/immutable/chunks/{BsbUKqyQ.js → BcmjbiBm.js} +2 -2
- package/web/app/immutable/chunks/{fBLUmxyl.js → BcpdiGRR.js} +1 -1
- package/web/app/immutable/chunks/{COWTRkIf.js → Bd69ye4n.js} +1 -1
- package/web/app/immutable/chunks/{gM93sUNx.js → Bd9XSgIb.js} +1 -1
- package/web/app/immutable/chunks/{DBdZimKy.js → BeAhMSSb.js} +1 -1
- package/web/app/immutable/chunks/{Bmtrue3d.js → BeLl-r8h.js} +1 -1
- package/web/app/immutable/chunks/{3cdteGtc.js → BeRTGLrw.js} +1 -1
- package/web/app/immutable/chunks/{ZJF5u8sT.js → BggwWRGf.js} +1 -1
- package/web/app/immutable/chunks/{BGarQU0H.js → BhkBe7Jc.js} +1 -1
- package/web/app/immutable/chunks/{B4bjCAKW.js → BlFUy1M_.js} +1 -1
- package/web/app/immutable/chunks/{CWRCHISo.js → Bloa0suE.js} +1 -1
- package/web/app/immutable/chunks/{DW-SCc7t.js → BoaSTXep.js} +1 -1
- package/web/app/immutable/chunks/{DJKO9mMv.js → BrAaVsFz.js} +1 -1
- package/web/app/immutable/chunks/{C4GUFULr.js → BspPTfLp.js} +1 -1
- package/web/app/immutable/chunks/{9ZGNcJrk.js → BvUM18CV.js} +1 -1
- package/web/app/immutable/chunks/{BO3uDFyf.js → BwEpZ6hl.js} +3 -3
- package/web/app/immutable/chunks/{JMt_KPti.js → BwlxTP6m.js} +1 -1
- package/web/app/immutable/chunks/{Jwfh1VUw.js → Bzu3FrPq.js} +1 -1
- package/web/app/immutable/chunks/{BN1F2G9L.js → C-VIKqni.js} +1 -1
- package/web/app/immutable/chunks/{efd11D73.js → C4-u_VtZ.js} +1 -1
- package/web/app/immutable/chunks/C5MJ7BeC.js +227 -0
- package/web/app/immutable/chunks/{BaasjTfD.js → C9PGJX9n.js} +1 -1
- package/web/app/immutable/chunks/{DfYbWhJy.js → C9jifMvI.js} +1 -1
- package/web/app/immutable/chunks/{Cyt32IzK.js → C9k7mgs4.js} +4 -4
- package/web/app/immutable/chunks/{CjZ3vck_.js → CBDImldB.js} +1 -1
- package/web/app/immutable/chunks/{s1gAk8mT.js → CBYPZH-W.js} +1 -1
- package/web/app/immutable/chunks/{Dw3FugoV.js → CC4WmnL6.js} +2 -2
- package/web/app/immutable/chunks/{Dp45taKt.js → CEFx_w_J.js} +1 -1
- package/web/app/immutable/chunks/{QXxjhZE8.js → CG9-31He.js} +1 -1
- package/web/app/immutable/chunks/{DMNf8Xuf.js → CHeQtCyR.js} +1 -1
- package/web/app/immutable/chunks/{CDcsX4P8.js → CItSvrO_.js} +1 -1
- package/web/app/immutable/chunks/{B6R8-b5U.js → CJzvjWBQ.js} +1 -1
- package/web/app/immutable/chunks/{ejHd6Wjx.js → CM8AwG-k.js} +3 -3
- package/web/app/immutable/chunks/{CEniOKQx.js → CMBaQAuw.js} +1 -1
- package/web/app/immutable/chunks/{BB2kR3UP.js → CNGkxhSe.js} +1 -1
- package/web/app/immutable/chunks/{BMvMJI9S.js → COMfKjnL.js} +1 -1
- package/web/app/immutable/chunks/{DdWrNe4g.js → CQMDPYtj.js} +1 -1
- package/web/app/immutable/chunks/{BCyYdDY9.js → CS5VoVeF.js} +1 -1
- package/web/app/immutable/chunks/{neAtdZ03.js → CSdV5_bj.js} +1 -1
- package/web/app/immutable/chunks/{BhVtbuhY.js → CTmT5I7Z.js} +1 -1
- package/web/app/immutable/chunks/{C6wHGKVx.js → CUMro1vx.js} +1 -1
- package/web/app/immutable/chunks/{BM44mGhh.js → CUMzsmcb.js} +1 -1
- package/web/app/immutable/chunks/{qpzd1Snw.js → CVC-R1OI.js} +1 -1
- package/web/app/immutable/chunks/{CfXQV99h.js → CXdTWTzB.js} +1 -1
- package/web/app/immutable/chunks/{EaXPzvmD.js → CXkYtIUm.js} +1 -1
- package/web/app/immutable/chunks/{Dh3Ryezx.js → CXqGB8i2.js} +1 -1
- package/web/app/immutable/chunks/{Cxw8qNpn.js → CXtOOnh0.js} +1 -1
- package/web/app/immutable/chunks/{DuBklFcM.js → CZE4HQ01.js} +1 -1
- package/web/app/immutable/chunks/{dAdxFhG6.js → CbF4ODHW.js} +1 -1
- package/web/app/immutable/chunks/{CNvdiqGE.js → Ce-KYi-n.js} +1 -1
- package/web/app/immutable/chunks/{DEqIZOTX.js → Ce8PMxuE.js} +1 -1
- package/web/app/immutable/chunks/{BHOlTerP.js → CeX5z_vs.js} +1 -1
- package/web/app/immutable/chunks/{DYFbONVh.js → CenrrJuj.js} +2 -2
- package/web/app/immutable/chunks/{B0WURFIt.js → Cf891EVZ.js} +1 -1
- package/web/app/immutable/chunks/{CQeSP20x.js → CiBStNAr.js} +3 -3
- package/web/app/immutable/chunks/{k1UqmefG.js → Ciihhv86.js} +1 -1
- package/web/app/immutable/chunks/{CdlxRh10.js → Citu-dNT.js} +1 -1
- package/web/app/immutable/chunks/{eUunsB8W.js → CixlkwsU.js} +1 -1
- package/web/app/immutable/chunks/{CcjAwET4.js → CjhAOkhP.js} +1 -1
- package/web/app/immutable/chunks/{D5eSz8Yy.js → ClJKqwKB.js} +1 -1
- package/web/app/immutable/chunks/{DBQ6-GLb.js → ClOUpVZZ.js} +3 -3
- package/web/app/immutable/chunks/{pb4lGxfr.js → CnWtv34Y.js} +7 -7
- package/web/app/immutable/chunks/{CQzSGmOk.js → CoJOpuAN.js} +1 -1
- package/web/app/immutable/chunks/{C_DS9aXk.js → Cr5KYQBW.js} +1 -1
- package/web/app/immutable/chunks/{BPYkHxEz.js → CtcF6bbr.js} +2 -2
- package/web/app/immutable/chunks/{ByZjDy8O.js → Cu4QpKDr.js} +1 -1
- package/web/app/immutable/chunks/{DZtggwE6.js → Cu8J93FR.js} +3 -3
- package/web/app/immutable/chunks/{CBlh2RgL.js → CunMRDJl.js} +1 -1
- package/web/app/immutable/chunks/{DEKRv2SA.js → CvgQ9EkY.js} +1 -1
- package/web/app/immutable/chunks/{VBUrUMy_.js → Cw1gOOP4.js} +1 -1
- package/web/app/immutable/chunks/{CUFD0_NB.js → CzVv3uRF.js} +1 -1
- package/web/app/immutable/chunks/{DBavb7qJ.js → CzeYC5kK.js} +1 -1
- package/web/app/immutable/chunks/{CqbBHiiS.js → D1IlJCd0.js} +1 -1
- package/web/app/immutable/chunks/{N6q6QTTx.js → D54_bMKf.js} +1 -1
- package/web/app/immutable/chunks/{BIXM_U1Z.js → D5_2GYC0.js} +1 -1
- package/web/app/immutable/chunks/{DfRs59bc.js → DAjW_Z-R.js} +1 -1
- package/web/app/immutable/chunks/{C5BrZ9Uc.js → DBGO1w9a.js} +1 -1
- package/web/app/immutable/chunks/{DkpprR-E.js → DBdfwYFa.js} +1 -1
- package/web/app/immutable/chunks/{KVl6LsXf.js → DCv8NaxM.js} +1 -1
- package/web/app/immutable/chunks/{8M4qD2wt.js → DE5Vt-mk.js} +1 -1
- package/web/app/immutable/chunks/{DRPtDW2A.js → DELLe_1a.js} +1 -1
- package/web/app/immutable/chunks/{Cfeu2Jlr.js → DGW6wXEq.js} +1 -1
- package/web/app/immutable/chunks/{BLBkfdhM.js → DIceyoUA.js} +1 -1
- package/web/app/immutable/chunks/{BNg9ANty.js → DJ00LNUR.js} +1 -1
- package/web/app/immutable/chunks/DJ_9F2bm.js +1 -0
- package/web/app/immutable/chunks/{BCKk6VLR.js → DKolS8Ht.js} +1 -1
- package/web/app/immutable/chunks/{CNsCQ6no.js → DMaQDnJk.js} +1 -1
- package/web/app/immutable/chunks/{CZugVkfN.js → DMnHL_j_.js} +1 -1
- package/web/app/immutable/chunks/{8tKgHmPk.js → DNKZQCox.js} +1 -1
- package/web/app/immutable/chunks/{DVpL0nyD.js → DNyxd11M.js} +1 -1
- package/web/app/immutable/chunks/{BNkOj7Iq.js → DU4GH855.js} +1 -1
- package/web/app/immutable/chunks/{BwlSugdR.js → DVnNWj1L.js} +1 -1
- package/web/app/immutable/chunks/{V4P2F4m3.js → DWUInPKR.js} +1 -1
- package/web/app/immutable/chunks/{B8b1g0xo.js → DYywvoax.js} +1 -1
- package/web/app/immutable/chunks/{bzpGnhNm.js → DZCBh97_.js} +1 -1
- package/web/app/immutable/chunks/{B4cRl4XZ.js → DZKVhZfO.js} +1 -1
- package/web/app/immutable/chunks/{DNzn6PzZ.js → DZwXyTtM.js} +1 -1
- package/web/app/immutable/chunks/{fzsNMINk.js → D_Ou_6lS.js} +1 -1
- package/web/app/immutable/chunks/{CebKpXnw.js → DaqPl4Tz.js} +1 -1
- package/web/app/immutable/chunks/{CyAayV8v.js → Dax20l9D.js} +2 -2
- package/web/app/immutable/chunks/{B5hMYT01.js → Dcbdz0Jw.js} +1 -1
- package/web/app/immutable/chunks/{pViJ0C09.js → DdV_6_CH.js} +1 -1
- package/web/app/immutable/chunks/{DNu-EOlZ.js → DeBsmEqU.js} +1 -1
- package/web/app/immutable/chunks/{DGnZRFrD.js → DeI8FMuz.js} +1 -1
- package/web/app/immutable/chunks/{Bxl01mZe.js → DediWp9-.js} +1 -1
- package/web/app/immutable/chunks/{BJTOTozZ.js → Denyu19x.js} +1 -1
- package/web/app/immutable/chunks/{BmZ0oFC-.js → DgBCXQ71.js} +1 -1
- package/web/app/immutable/chunks/{E8EFUfsc.js → DhGPSsBf.js} +1 -1
- package/web/app/immutable/chunks/{Bu2F6uGB.js → Dj_FVUHS.js} +1 -1
- package/web/app/immutable/chunks/{BPC4bZ2e.js → DkibMP99.js} +1 -1
- package/web/app/immutable/chunks/{Bcwj2Z7c.js → Dl3AQcJn.js} +1 -1
- package/web/app/immutable/chunks/{BkjJpsAb.js → DmJbtm9p.js} +2 -2
- package/web/app/immutable/chunks/{gybWrTHf.js → DmUU4JxK.js} +1 -1
- package/web/app/immutable/chunks/{DpwvNWlF.js → Dma9ms7u.js} +1 -1
- package/web/app/immutable/chunks/{Bkg2jzs8.js → Dmf4WObG.js} +1 -1
- package/web/app/immutable/chunks/{58UGOK_x.js → DnCf3QiL.js} +1 -1
- package/web/app/immutable/chunks/{EOrMcKth.js → DoOAeI0m.js} +1 -1
- package/web/app/immutable/chunks/{AFSjjw3j.js → Do_TqlrK.js} +1 -1
- package/web/app/immutable/chunks/{CIWCsQ8M.js → DrHxWi1S.js} +1 -1
- package/web/app/immutable/chunks/{BYPBR4fh.js → DrNVHvhK.js} +1 -1
- package/web/app/immutable/chunks/{BghIZW1D.js → Drgj5uDM.js} +41 -41
- package/web/app/immutable/chunks/{CnpqP3W5.js → DsHbB0Gk.js} +1 -1
- package/web/app/immutable/chunks/{DlgeVS0W.js → DsrgAjSN.js} +1 -1
- package/web/app/immutable/chunks/{CIQ2KSkd.js → DtagNJGy.js} +1 -1
- package/web/app/immutable/chunks/{hjPR6Rnc.js → DuInbvT4.js} +1 -1
- package/web/app/immutable/chunks/{DLf4jaE4.js → DvqgRsDd.js} +1 -1
- package/web/app/immutable/chunks/{DFcDTHE7.js → DvrTNX0e.js} +1 -1
- package/web/app/immutable/chunks/{DBntrybU.js → DyVKK3zU.js} +1 -1
- package/web/app/immutable/chunks/{B2Q9zOdQ.js → Dzu7FPMr.js} +1 -1
- package/web/app/immutable/chunks/{1jD1K4t9.js → EzIyeu9q.js} +1 -1
- package/web/app/immutable/chunks/{BuBWlA2n.js → IISaQsK0.js} +1 -1
- package/web/app/immutable/chunks/IJYL54f1.js +1 -0
- package/web/app/immutable/chunks/{D7rRJFzn.js → Jf6CJclx.js} +1 -1
- package/web/app/immutable/chunks/{BpOsjl4B.js → KG68UpwU.js} +1 -1
- package/web/app/immutable/chunks/{DzxV-zrJ.js → M8sdbvOT.js} +1 -1
- package/web/app/immutable/chunks/{Cv92lPPx.js → Mjh5v3L0.js} +1 -1
- package/web/app/immutable/chunks/{C3u5H0Sx.js → NDnZ2f46.js} +1 -1
- package/web/app/immutable/chunks/{_wdKNOb8.js → NPItrD9R.js} +1 -1
- package/web/app/immutable/chunks/{CKQ8NUgf.js → Pq3i4zFA.js} +1 -1
- package/web/app/immutable/chunks/{DwO2fxa6.js → Q-IbWJI_.js} +1 -1
- package/web/app/immutable/chunks/{D3C_wxG-.js → SNezQIpP.js} +1 -1
- package/web/app/immutable/chunks/{Posh1PTV.js → T1WqHZLZ.js} +1 -1
- package/web/app/immutable/chunks/{Bb1UDU6X.js → T995SloE.js} +1 -1
- package/web/app/immutable/chunks/{BcK8h34a.js → UMA3RT0s.js} +1 -1
- package/web/app/immutable/chunks/{D_0pJDZv.js → UakvtOgc.js} +1 -1
- package/web/app/immutable/chunks/{CVj7bpe9.js → Vx0IIPew.js} +1 -1
- package/web/app/immutable/chunks/{CaAuKVV3.js → bDcdMMyl.js} +1 -1
- package/web/app/immutable/chunks/{DDXtES5I.js → eEZIbdzf.js} +1 -1
- package/web/app/immutable/chunks/{C0fkUg5D.js → ggRICgWE.js} +1 -1
- package/web/app/immutable/chunks/{CCZ7kcPP.js → hOR9B4V4.js} +1 -1
- package/web/app/immutable/chunks/{CsBt-DEV.js → i9DVPIlR.js} +1 -1
- package/web/app/immutable/chunks/{CahmCdEz.js → k6s8dGrA.js} +1 -1
- package/web/app/immutable/chunks/{B-g-NIPK.js → knnjLtf9.js} +1 -1
- package/web/app/immutable/chunks/{DHZp-IFS.js → mNkJFQiA.js} +1 -1
- package/web/app/immutable/chunks/{D8sxBEHk.js → mkPaye9m.js} +1 -1
- package/web/app/immutable/chunks/{DgdBkeOv.js → nz1YTpIq.js} +1 -1
- package/web/app/immutable/chunks/{CuGpCjd7.js → oqxFFnht.js} +1 -1
- package/web/app/immutable/chunks/{kbiSNU8S.js → p8msS16l.js} +1 -1
- package/web/app/immutable/chunks/{Cqdkb92f.js → qwx0AE4b.js} +1 -1
- package/web/app/immutable/chunks/{lgAZgfoh.js → tkZmaR4M.js} +4 -4
- package/web/app/immutable/chunks/{CilxFmmt.js → tzy2FJ3p.js} +1 -1
- package/web/app/immutable/chunks/{7L5DlLPB.js → vt-D6r-U.js} +1 -1
- package/web/app/immutable/chunks/{Irb_xhXc.js → w0VuoJIl.js} +1 -1
- package/web/app/immutable/chunks/{BlvFC0m2.js → w7xvX9oI.js} +1 -1
- package/web/app/immutable/chunks/{BhglH0qV.js → y8su61xq.js} +2 -2
- package/web/app/immutable/chunks/{DzZaDWGS.js → yQ0Z1VHW.js} +1 -1
- package/web/app/immutable/chunks/{QaGc_6xV.js → ymVYL-2H.js} +3 -3
- package/web/app/immutable/chunks/{uV-IGUNy.js → zl8SSmZq.js} +1 -1
- package/web/app/immutable/entry/{app.Chckz9N7.js → app.BgfLNpAH.js} +2 -2
- package/web/app/immutable/entry/start.DFg06W-g.js +1 -0
- package/web/app/immutable/nodes/{0.DV4OxTlt.js → 0.B3w9utn7.js} +1 -1
- package/web/app/immutable/nodes/{1.Ck6qIYNd.js → 1.DaxXfawW.js} +1 -1
- package/web/app/immutable/nodes/{10.BJGM7dzF.js → 10.Ut2WO8-5.js} +1 -1
- package/web/app/immutable/nodes/{12.C6vEm_M7.js → 12.CEAVKYuu.js} +1 -1
- package/web/app/immutable/nodes/{13.DPA662Yd.js → 13.CJ1HRZcd.js} +1 -1
- package/web/app/immutable/nodes/{14.vxfsp_3g.js → 14.BS_itk_o.js} +1 -1
- package/web/app/immutable/nodes/{15.Byubc7Em.js → 15.CZGq0vsg.js} +1 -1
- package/web/app/immutable/nodes/{16.CrYjJL43.js → 16.DXjz2v3H.js} +2 -2
- package/web/app/immutable/nodes/{2.F1jEoAFf.js → 2.CYzMuwKR.js} +4 -4
- package/web/app/immutable/nodes/{3.CTi33PwH.js → 3.63ZtoTSA.js} +1 -1
- package/web/app/immutable/nodes/{4.CEVSI3tX.js → 4.DDS6oK5o.js} +1 -1
- package/web/app/immutable/nodes/{5.Cwr-dRRa.js → 5.DsTfq2mA.js} +1 -1
- package/web/app/immutable/nodes/6.BH8FJ3Wf.js +1 -0
- package/web/app/immutable/nodes/{7.BTCmHFrX.js → 7.DW27zT40.js} +1 -1
- package/web/app/immutable/nodes/{8.Ccr1GUq8.js → 8.B4CNA7De.js} +4 -4
- package/web/app/immutable/nodes/{9.DtRI4gIT.js → 9.Nt9iZ731.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/BCAXQH9B.js +0 -227
- package/web/app/immutable/chunks/BxSRgl_K.js +0 -1
- package/web/app/immutable/chunks/CE7Mossj.js +0 -1
- package/web/app/immutable/chunks/CJj6zr8B.js +0 -5
- package/web/app/immutable/chunks/W-gkWrYK.js +0 -1
- package/web/app/immutable/entry/start.BEWBWLRT.js +0 -1
- package/web/app/immutable/nodes/6.CirgPdsp.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aF as ue,K as fe,O as he,aI as de,L as ge,aG as ye,a as _,M as Kt,aE as xe,d as pe,a8 as me,aR as Gt,aa as be,w as ve,r as Se,k as Ie,j as Me,y as ke}from"./pb4lGxfr.js";import{c3 as yt,g as v}from"./CSSOAZoU.js";var qt=1e-10;function it(t,n){const s=Wt(t),e=s.filter(l=>Ut(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=vt(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const x={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],k=Math.atan2(a.x-p.x,a.y-p.y),z=Math.atan2(f.x-p.x,f.y-p.y);let T=z-k;T<0&&(T+=2*Math.PI);const w=z-T/2;let g=K(x,{x:p.x+p.radius*Math.sin(w),y:p.y+p.radius*Math.cos(w)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=at(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(K(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-qt,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}v(it,"intersectionArea");function Ut(t,n){return n.every(s=>K(t,s)<s.radius+qt)}v(Ut,"containedInCircles");function Wt(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=bt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}v(Wt,"getIntersectionPoints");function at(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}v(at,"circleArea");function K(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}v(K,"distance");function dt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return at(t,e)+at(n,i)}v(dt,"circleOverlap");function bt(t,n){const s=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}v(bt,"circleCircleIntersection");function vt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}v(vt,"getCenter");function Ht(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,x=t(a);if(x*r>=0&&(n=a),Math.abs(f)<o||x===0)return a}return n+f}v(Ht,"bisect");function lt(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}v(lt,"zeros");function xt(t,n){return lt(t).map(()=>lt(n))}v(xt,"zerosM");function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}v(tt,"dot");function ct(t){return Math.sqrt(tt(t,t))}v(ct,"norm2");function ut(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}v(ut,"scale");function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}v(Z,"weightedSum");function St(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,x=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let S=0;S<b;++S){const c=n.slice();c[S]=c[S]?c[S]*i:o,p[S+1]=c,p[S+1].fx=t(c),p[S+1].id=S+1}function k(S){for(let c=0;c<S.length;c++)p[b][c]=S[c];p[b].fx=S.fx}v(k,"updateSimplex");const z=v((S,c)=>S.fx-c.fx,"sortOrder"),T=n.slice(),w=n.slice(),g=n.slice(),m=n.slice();for(let S=0;S<e;++S){if(p.sort(z),s.history){const y=p.map(d=>{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});y.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:y})}h=0;for(let y=0;y<b;++y)h=Math.max(h,Math.abs(p[0][y]-p[1][y]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let y=0;y<b;++y){T[y]=0;for(let d=0;d<b;++d)T[y]+=p[d][y];T[y]/=b}const c=p[b];if(Z(w,1+f,T,-f,c),w.fx=t(w),w.fx<p[0].fx)Z(m,1+u,T,-u,c),m.fx=t(m),m.fx<w.fx?k(m):k(w);else if(w.fx>=p[b-1].fx){let y=!1;if(w.fx>c.fx?(Z(g,1+a,T,-a,c),g.fx=t(g),g.fx<c.fx?k(g):y=!0):(Z(g,1-a*f,T,a*f,c),g.fx=t(g),g.fx<w.fx?k(g):y=!0),y){if(x>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-x,p[0],x,p[d]),p[d].fx=t(p[d])}}else k(w)}return p.sort(z),{fx:p[0].fx,x:p[0]}}v(St,"nelderMead");function Yt(t,n,s,e,i,o,r){const l=s.fx,f=tt(s.fxprime,n);let u=l,a=l,x=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,k,z){for(let T=0;T<16;++T)if(i=(p+k)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||u>=z)k=i;else{if(Math.abs(x)<=-r*f)return i;x*(k-p)>=0&&(k=p),p=i,z=u}return 0}v(b,"zoom");for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(x)<=-r*f)return i;if(x>=0)return b(i,h,u);a=u,h=i,i*=2}return i}v(Yt,"wolfeLineSearch");function Xt(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ut(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=Yt(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ut(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const x=tt(e.fxprime,e.fxprime),h=Math.max(0,tt(o,i.fxprime)/x);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ct(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}v(Xt,"conjugateGradient");function It(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||te,e=n.lossFunction||et,i=Jt(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=St(a=>{const x={};for(let h=0;h<r.length;++h){const b=r[h];x[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(x,i)},l,n).x;for(let a=0;a<r.length;++a){const x=r[a];o[x].x=u[2*a],o[x].y=u[2*a+1]}return o}v(It,"venn");var Zt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Zt?Math.abs(t-n):Ht(e=>dt(t,n,e)-s,0,t+n)}v(ft,"distanceFromIntersectArea");function Jt(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(v(i,"toKey"),s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let x=u+1;x<f.sets.length;x++){const h=String(f.sets[x]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}v(Jt,"addMissingAreas");function Qt(t,n,s){const e=xt(n.length,n.length),i=xt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(f,u,o.size);e[r][l]=e[l][r]=a;let x=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?x=1:o.size<=1e-10&&(x=-1),i[r][l]=i[l][r]=x}),{distances:e,constraints:i}}v(Qt,"getDistanceMatrices");function $t(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],x=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),k=b-x*x;h>0&&p<=x||h<0&&p>=x||(i+=2*k*k,n[2*o]+=4*k*(r-u),n[2*o+1]+=4*k*(l-a),n[2*f]+=4*k*(u-r),n[2*f+1]+=4*k*(a-l))}}return i}v($t,"constrainedMDSGradient");function te(t,n={}){let s=ne(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ee(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}v(te,"bestInitialLayout");function ee(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=Qt(t,e,i);const l=ct(o.map(ct))/o.length;o=o.map(h=>h.map(b=>b/l));const f=v((h,b)=>$t(h,b,o,r),"obj");let u=null;for(let h=0;h<s;++h){const b=lt(o.length*2).map(Math.random),p=Xt(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,x={};for(let h=0;h<e.length;++h){const b=e[h];x[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ut(h.x,l);return x}v(ee,"constrainedMDSLayout");function ne(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const x of t)if(x.sets.length===1){const h=x.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:x.size,radius:Math.sqrt(x.size/Math.PI)},i[h]=[]}t=t.filter(x=>x.sets.length===2);for(const x of t){let h=x.weight!=null?x.weight:1;const b=x.sets[0],p=x.sets[1];x.size+Zt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:x.size,weight:h}),i[p].push({set:b,size:x.size,weight:h})}const o=[];Object.keys(i).forEach(x=>{let h=0;for(let b=0;b<i[x].length;++b)h+=i[x][b].size*i[x][b].weight;o.push({set:x,size:h})});function r(x,h){return h.size-x.size}v(r,"sortOrder"),o.sort(r);const l={};function f(x){return x.set in l}v(f,"isPositioned");function u(x,h){e[h].x=x.x,e[h].y=x.y,l[h]=!0}v(u,"positionSet"),u({x:0,y:0},o[0].set);for(let x=1;x<o.length;++x){const h=o[x].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const k=[];for(var a=0;a<b.length;++a){const w=e[b[a].set],g=ft(p.radius,w.radius,b[a].size);k.push({x:w.x+g,y:w.y}),k.push({x:w.x-g,y:w.y}),k.push({y:w.y+g,x:w.x}),k.push({y:w.y-g,x:w.x});for(let m=a+1;m<b.length;++m){const S=e[b[m].set],c=ft(p.radius,S.radius,b[m].size),y=bt({x:w.x,y:w.y,radius:g},{x:S.x,y:S.y,radius:c});k.push(...y)}}let z=1e50,T=k[0];for(const w of k){e[h].x=w.x,e[h].y=w.y;const g=s(e,t);g<z&&(z=g,T=w)}u(T,h)}return e}v(ne,"greedyLayout");function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=dt(r.radius,l.radius,K(r,l))}else i=it(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}v(et,"lossFunction");function Mt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=dt(l.radius,f.radius,K(l,f))}else i=it(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}v(Mt,"logRatioLossFunction");function se(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&K(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}v(se,"orientateCircles");function ie(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}v(n,"find");function s(i,o){const r=n(i),l=n(o);r.parent=l}v(s,"union");for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;K(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}v(ie,"disjointCluster");function ht(t){const n=v(s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}},"minMax");return{xRange:n("x"),yRange:n("y")}}v(ht,"getBoundingBox");function kt(t,n,s){n==null&&(n=Math.PI/2);let e=Tt(t).map(u=>Object.assign({},u));const i=ie(e);for(const u of i){se(u,n,s);const a=ht(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,x){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const k=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;k<0&&(b+=k)}if(x)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const k=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;k<0&&(p+=k)}for(const k of u)k.x+=b,k.y+=p,e.push(k)}v(l,"addCluster");let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=ht(e);return _t(e)}v(kt,"normalizeSolution");function wt(t,n,s,e,i){const o=Tt(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=ht(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),x=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return _t(o.map(b=>({radius:a*b.radius,x:e+x+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}v(wt,"scaleSolution");function _t(t){const n={};for(const s of t)n[s.setid]=s;return n}v(_t,"toObjectNotation");function Tt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}v(Tt,"fromObjectNotation");function oe(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,x=null,h=null,b=!1,p=null,k=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,z={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=v(function(y){if(y in z)return z[y];var d=z[y]=T[w];return w+=1,w>=T.length&&(w=0),d},"colours"),m=It,S=et;function c(y){let d=y.datum();const D=new Set;d.forEach(M=>{M.size==0&&M.sets.length==1&&D.add(M.sets[0])}),d=d.filter(M=>!M.sets.some(F=>D.has(F)));let I={},O={};if(d.length>0){let M=m(d,{lossFunction:S,distinct:b});l&&(M=kt(M,r,h)),I=wt(M,s,e,i,f),O=zt(I,d,k)}const U={};d.forEach(M=>{M.label&&(U[M.sets]=M.label)});function B(M){if(M.sets in U)return U[M.sets];if(M.sets.length==1)return""+M.sets[0]}v(B,"label"),y.selectAll("svg").data([I]).enter().append("svg");const P=y.select("svg");n?P.attr("viewBox",`0 0 ${s} ${e}`):P.attr("width",s).attr("height",e);const R={};let E=!1;P.selectAll(".venn-area path").each(function(M){const F=this.getAttribute("d");M.sets.length==1&&F&&!b&&(E=!0,R[M.sets[0]]=le(F))});function C(M){return F=>{const Y=M.sets.map(nt=>{let X=R[nt],Q=I[nt];return X||(X={x:s/2,y:e/2,radius:1}),Q||(Q={x:s/2,y:e/2,radius:1}),{x:X.x*(1-F)+Q.x*F,y:X.y*(1-F)+Q.y*F,radius:X.radius*(1-F)+Q.radius*F}});return pt(Y,p)}}v(C,"pathTween");const W=P.selectAll(".venn-area").data(d,M=>M.sets),V=W.enter().append("g").attr("class",M=>`venn-area venn-${M.sets.length==1?"circle":"intersection"}${M.colour||M.color?" venn-coloured":""}`).attr("data-venn-sets",M=>M.sets.join("_")),G=V.append("path"),j=V.append("text").attr("class","label").text(M=>B(M)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(G.style("fill-opacity","0").filter(M=>M.sets.length==1).style("fill",M=>M.colour?M.colour:M.color?M.color:g(M.sets)).style("fill-opacity",".25"),j.style("fill",M=>M.colour||M.color?"#FFF":t.textFill?t.textFill:M.sets.length==1?g(M.sets):"#444"));function q(M){return typeof M.transition=="function"?M.transition("venn").duration(o):M}v(q,"asTransition");let A=y;E&&typeof A.transition=="function"?(A=q(y),A.selectAll("path").attrTween("d",C)):A.selectAll("path").attr("d",M=>pt(M.sets.map(F=>I[F])),p);const N=A.selectAll("text").filter(M=>M.sets in O).text(M=>B(M)).attr("x",M=>Math.floor(O[M.sets].x)).attr("y",M=>Math.floor(O[M.sets].y));u&&(E?"on"in N?N.on("end",ot(I,B)):N.each("end",ot(I,B)):N.each(ot(I,B)));const L=q(W.exit()).remove();typeof W.transition=="function"&&L.selectAll("path").attrTween("d",C);const J=L.selectAll("text").attr("x",s/2).attr("y",e/2);return x!==null&&(j.style("font-size","0px"),N.style("font-size",x),J.style("font-size","0px")),{circles:I,textCentres:O,nodes:W,enter:V,update:A,exit:L}}return v(c,"chart"),c.wrap=function(y){return arguments.length?(u=y,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(y){return arguments.length?(s=y,c):s},c.height=function(y){return arguments.length?(e=y,c):e},c.padding=function(y){return arguments.length?(i=y,c):i},c.distinct=function(y){return arguments.length?(b=y,c):b},c.colours=function(y){return arguments.length?(g=y,c):g},c.colors=function(y){return arguments.length?(g=y,c):g},c.fontSize=function(y){return arguments.length?(x=y,c):x},c.round=function(y){return arguments.length?(p=y,c):p},c.duration=function(y){return arguments.length?(o=y,c):o},c.layoutFunction=function(y){return arguments.length?(m=y,c):m},c.normalize=function(y){return arguments.length?(l=y,c):l},c.scaleToFit=function(y){return arguments.length?(f=y,c):f},c.styled=function(y){return arguments.length?(a=y,c):a},c.orientation=function(y){return arguments.length?(r=y,c):r},c.orientationOrder=function(y){return arguments.length?(h=y,c):h},c.lossFunction=function(y){return arguments.length?(S=y==="default"?et:y==="logRatio"?Mt:y,c):S},c}v(oe,"VennDiagram");function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],x=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}v(p,"append");let k=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");k.textContent=g,g.length>f&&k.getComputedTextLength()>i&&(a.pop(),k.textContent=a.join(" "),a=[u],k=p(u),x++)}const z=.35-x*h/2,T=e.getAttribute("x"),w=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${z+m*h}em`)})}}v(ot,"wrapText");function rt(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-K(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=K(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}v(rt,"circleMargin");function Et(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=rt(e[0],t,n);for(let a=1;a<e.length;++a){const x=rt(e[a],t,n);x>=o&&(i=e[a],o=x)}const r=St(a=>-1*rt({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(K(l,a)>a.radius){f=!1;break}for(const a of n)if(K(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return it(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Et(t,[]):vt(u.arcs.map(a=>a.p1))}v(Et,"computeTextCentre");function re(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=K(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}v(re,"getOverlappingCircles");function zt(t,n,s){const e={},i=re(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const x=Et(u,a,s);e[r]=x,x.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}v(zt,"computeTextCentres");function ae(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{aF as ue,K as fe,O as he,aI as de,L as ge,aG as ye,a as _,M as Kt,aE as xe,d as pe,a8 as me,aR as Gt,aa as be,w as ve,r as Se,k as Ie,j as Me,y as ke}from"./CnWtv34Y.js";import{c3 as yt,g as v}from"./BQY3g8uE.js";var qt=1e-10;function it(t,n){const s=Wt(t),e=s.filter(l=>Ut(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=vt(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const x={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],k=Math.atan2(a.x-p.x,a.y-p.y),z=Math.atan2(f.x-p.x,f.y-p.y);let T=z-k;T<0&&(T+=2*Math.PI);const w=z-T/2;let g=K(x,{x:p.x+p.radius*Math.sin(w),y:p.y+p.radius*Math.cos(w)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=at(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(K(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-qt,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}v(it,"intersectionArea");function Ut(t,n){return n.every(s=>K(t,s)<s.radius+qt)}v(Ut,"containedInCircles");function Wt(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=bt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}v(Wt,"getIntersectionPoints");function at(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}v(at,"circleArea");function K(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}v(K,"distance");function dt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return at(t,e)+at(n,i)}v(dt,"circleOverlap");function bt(t,n){const s=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}v(bt,"circleCircleIntersection");function vt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}v(vt,"getCenter");function Ht(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,x=t(a);if(x*r>=0&&(n=a),Math.abs(f)<o||x===0)return a}return n+f}v(Ht,"bisect");function lt(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}v(lt,"zeros");function xt(t,n){return lt(t).map(()=>lt(n))}v(xt,"zerosM");function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}v(tt,"dot");function ct(t){return Math.sqrt(tt(t,t))}v(ct,"norm2");function ut(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}v(ut,"scale");function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}v(Z,"weightedSum");function St(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,x=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let S=0;S<b;++S){const c=n.slice();c[S]=c[S]?c[S]*i:o,p[S+1]=c,p[S+1].fx=t(c),p[S+1].id=S+1}function k(S){for(let c=0;c<S.length;c++)p[b][c]=S[c];p[b].fx=S.fx}v(k,"updateSimplex");const z=v((S,c)=>S.fx-c.fx,"sortOrder"),T=n.slice(),w=n.slice(),g=n.slice(),m=n.slice();for(let S=0;S<e;++S){if(p.sort(z),s.history){const y=p.map(d=>{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});y.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:y})}h=0;for(let y=0;y<b;++y)h=Math.max(h,Math.abs(p[0][y]-p[1][y]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let y=0;y<b;++y){T[y]=0;for(let d=0;d<b;++d)T[y]+=p[d][y];T[y]/=b}const c=p[b];if(Z(w,1+f,T,-f,c),w.fx=t(w),w.fx<p[0].fx)Z(m,1+u,T,-u,c),m.fx=t(m),m.fx<w.fx?k(m):k(w);else if(w.fx>=p[b-1].fx){let y=!1;if(w.fx>c.fx?(Z(g,1+a,T,-a,c),g.fx=t(g),g.fx<c.fx?k(g):y=!0):(Z(g,1-a*f,T,a*f,c),g.fx=t(g),g.fx<w.fx?k(g):y=!0),y){if(x>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-x,p[0],x,p[d]),p[d].fx=t(p[d])}}else k(w)}return p.sort(z),{fx:p[0].fx,x:p[0]}}v(St,"nelderMead");function Yt(t,n,s,e,i,o,r){const l=s.fx,f=tt(s.fxprime,n);let u=l,a=l,x=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,k,z){for(let T=0;T<16;++T)if(i=(p+k)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||u>=z)k=i;else{if(Math.abs(x)<=-r*f)return i;x*(k-p)>=0&&(k=p),p=i,z=u}return 0}v(b,"zoom");for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(x)<=-r*f)return i;if(x>=0)return b(i,h,u);a=u,h=i,i*=2}return i}v(Yt,"wolfeLineSearch");function Xt(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ut(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=Yt(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ut(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const x=tt(e.fxprime,e.fxprime),h=Math.max(0,tt(o,i.fxprime)/x);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ct(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}v(Xt,"conjugateGradient");function It(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||te,e=n.lossFunction||et,i=Jt(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=St(a=>{const x={};for(let h=0;h<r.length;++h){const b=r[h];x[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(x,i)},l,n).x;for(let a=0;a<r.length;++a){const x=r[a];o[x].x=u[2*a],o[x].y=u[2*a+1]}return o}v(It,"venn");var Zt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Zt?Math.abs(t-n):Ht(e=>dt(t,n,e)-s,0,t+n)}v(ft,"distanceFromIntersectArea");function Jt(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(v(i,"toKey"),s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let x=u+1;x<f.sets.length;x++){const h=String(f.sets[x]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}v(Jt,"addMissingAreas");function Qt(t,n,s){const e=xt(n.length,n.length),i=xt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(f,u,o.size);e[r][l]=e[l][r]=a;let x=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?x=1:o.size<=1e-10&&(x=-1),i[r][l]=i[l][r]=x}),{distances:e,constraints:i}}v(Qt,"getDistanceMatrices");function $t(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],x=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),k=b-x*x;h>0&&p<=x||h<0&&p>=x||(i+=2*k*k,n[2*o]+=4*k*(r-u),n[2*o+1]+=4*k*(l-a),n[2*f]+=4*k*(u-r),n[2*f+1]+=4*k*(a-l))}}return i}v($t,"constrainedMDSGradient");function te(t,n={}){let s=ne(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ee(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}v(te,"bestInitialLayout");function ee(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=Qt(t,e,i);const l=ct(o.map(ct))/o.length;o=o.map(h=>h.map(b=>b/l));const f=v((h,b)=>$t(h,b,o,r),"obj");let u=null;for(let h=0;h<s;++h){const b=lt(o.length*2).map(Math.random),p=Xt(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,x={};for(let h=0;h<e.length;++h){const b=e[h];x[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ut(h.x,l);return x}v(ee,"constrainedMDSLayout");function ne(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const x of t)if(x.sets.length===1){const h=x.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:x.size,radius:Math.sqrt(x.size/Math.PI)},i[h]=[]}t=t.filter(x=>x.sets.length===2);for(const x of t){let h=x.weight!=null?x.weight:1;const b=x.sets[0],p=x.sets[1];x.size+Zt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:x.size,weight:h}),i[p].push({set:b,size:x.size,weight:h})}const o=[];Object.keys(i).forEach(x=>{let h=0;for(let b=0;b<i[x].length;++b)h+=i[x][b].size*i[x][b].weight;o.push({set:x,size:h})});function r(x,h){return h.size-x.size}v(r,"sortOrder"),o.sort(r);const l={};function f(x){return x.set in l}v(f,"isPositioned");function u(x,h){e[h].x=x.x,e[h].y=x.y,l[h]=!0}v(u,"positionSet"),u({x:0,y:0},o[0].set);for(let x=1;x<o.length;++x){const h=o[x].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const k=[];for(var a=0;a<b.length;++a){const w=e[b[a].set],g=ft(p.radius,w.radius,b[a].size);k.push({x:w.x+g,y:w.y}),k.push({x:w.x-g,y:w.y}),k.push({y:w.y+g,x:w.x}),k.push({y:w.y-g,x:w.x});for(let m=a+1;m<b.length;++m){const S=e[b[m].set],c=ft(p.radius,S.radius,b[m].size),y=bt({x:w.x,y:w.y,radius:g},{x:S.x,y:S.y,radius:c});k.push(...y)}}let z=1e50,T=k[0];for(const w of k){e[h].x=w.x,e[h].y=w.y;const g=s(e,t);g<z&&(z=g,T=w)}u(T,h)}return e}v(ne,"greedyLayout");function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=dt(r.radius,l.radius,K(r,l))}else i=it(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}v(et,"lossFunction");function Mt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=dt(l.radius,f.radius,K(l,f))}else i=it(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}v(Mt,"logRatioLossFunction");function se(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&K(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}v(se,"orientateCircles");function ie(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}v(n,"find");function s(i,o){const r=n(i),l=n(o);r.parent=l}v(s,"union");for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;K(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}v(ie,"disjointCluster");function ht(t){const n=v(s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}},"minMax");return{xRange:n("x"),yRange:n("y")}}v(ht,"getBoundingBox");function kt(t,n,s){n==null&&(n=Math.PI/2);let e=Tt(t).map(u=>Object.assign({},u));const i=ie(e);for(const u of i){se(u,n,s);const a=ht(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,x){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const k=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;k<0&&(b+=k)}if(x)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const k=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;k<0&&(p+=k)}for(const k of u)k.x+=b,k.y+=p,e.push(k)}v(l,"addCluster");let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=ht(e);return _t(e)}v(kt,"normalizeSolution");function wt(t,n,s,e,i){const o=Tt(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=ht(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),x=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return _t(o.map(b=>({radius:a*b.radius,x:e+x+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}v(wt,"scaleSolution");function _t(t){const n={};for(const s of t)n[s.setid]=s;return n}v(_t,"toObjectNotation");function Tt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}v(Tt,"fromObjectNotation");function oe(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,x=null,h=null,b=!1,p=null,k=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,z={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=v(function(y){if(y in z)return z[y];var d=z[y]=T[w];return w+=1,w>=T.length&&(w=0),d},"colours"),m=It,S=et;function c(y){let d=y.datum();const D=new Set;d.forEach(M=>{M.size==0&&M.sets.length==1&&D.add(M.sets[0])}),d=d.filter(M=>!M.sets.some(F=>D.has(F)));let I={},O={};if(d.length>0){let M=m(d,{lossFunction:S,distinct:b});l&&(M=kt(M,r,h)),I=wt(M,s,e,i,f),O=zt(I,d,k)}const U={};d.forEach(M=>{M.label&&(U[M.sets]=M.label)});function B(M){if(M.sets in U)return U[M.sets];if(M.sets.length==1)return""+M.sets[0]}v(B,"label"),y.selectAll("svg").data([I]).enter().append("svg");const P=y.select("svg");n?P.attr("viewBox",`0 0 ${s} ${e}`):P.attr("width",s).attr("height",e);const R={};let E=!1;P.selectAll(".venn-area path").each(function(M){const F=this.getAttribute("d");M.sets.length==1&&F&&!b&&(E=!0,R[M.sets[0]]=le(F))});function C(M){return F=>{const Y=M.sets.map(nt=>{let X=R[nt],Q=I[nt];return X||(X={x:s/2,y:e/2,radius:1}),Q||(Q={x:s/2,y:e/2,radius:1}),{x:X.x*(1-F)+Q.x*F,y:X.y*(1-F)+Q.y*F,radius:X.radius*(1-F)+Q.radius*F}});return pt(Y,p)}}v(C,"pathTween");const W=P.selectAll(".venn-area").data(d,M=>M.sets),V=W.enter().append("g").attr("class",M=>`venn-area venn-${M.sets.length==1?"circle":"intersection"}${M.colour||M.color?" venn-coloured":""}`).attr("data-venn-sets",M=>M.sets.join("_")),G=V.append("path"),j=V.append("text").attr("class","label").text(M=>B(M)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(G.style("fill-opacity","0").filter(M=>M.sets.length==1).style("fill",M=>M.colour?M.colour:M.color?M.color:g(M.sets)).style("fill-opacity",".25"),j.style("fill",M=>M.colour||M.color?"#FFF":t.textFill?t.textFill:M.sets.length==1?g(M.sets):"#444"));function q(M){return typeof M.transition=="function"?M.transition("venn").duration(o):M}v(q,"asTransition");let A=y;E&&typeof A.transition=="function"?(A=q(y),A.selectAll("path").attrTween("d",C)):A.selectAll("path").attr("d",M=>pt(M.sets.map(F=>I[F])),p);const N=A.selectAll("text").filter(M=>M.sets in O).text(M=>B(M)).attr("x",M=>Math.floor(O[M.sets].x)).attr("y",M=>Math.floor(O[M.sets].y));u&&(E?"on"in N?N.on("end",ot(I,B)):N.each("end",ot(I,B)):N.each(ot(I,B)));const L=q(W.exit()).remove();typeof W.transition=="function"&&L.selectAll("path").attrTween("d",C);const J=L.selectAll("text").attr("x",s/2).attr("y",e/2);return x!==null&&(j.style("font-size","0px"),N.style("font-size",x),J.style("font-size","0px")),{circles:I,textCentres:O,nodes:W,enter:V,update:A,exit:L}}return v(c,"chart"),c.wrap=function(y){return arguments.length?(u=y,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(y){return arguments.length?(s=y,c):s},c.height=function(y){return arguments.length?(e=y,c):e},c.padding=function(y){return arguments.length?(i=y,c):i},c.distinct=function(y){return arguments.length?(b=y,c):b},c.colours=function(y){return arguments.length?(g=y,c):g},c.colors=function(y){return arguments.length?(g=y,c):g},c.fontSize=function(y){return arguments.length?(x=y,c):x},c.round=function(y){return arguments.length?(p=y,c):p},c.duration=function(y){return arguments.length?(o=y,c):o},c.layoutFunction=function(y){return arguments.length?(m=y,c):m},c.normalize=function(y){return arguments.length?(l=y,c):l},c.scaleToFit=function(y){return arguments.length?(f=y,c):f},c.styled=function(y){return arguments.length?(a=y,c):a},c.orientation=function(y){return arguments.length?(r=y,c):r},c.orientationOrder=function(y){return arguments.length?(h=y,c):h},c.lossFunction=function(y){return arguments.length?(S=y==="default"?et:y==="logRatio"?Mt:y,c):S},c}v(oe,"VennDiagram");function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],x=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}v(p,"append");let k=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");k.textContent=g,g.length>f&&k.getComputedTextLength()>i&&(a.pop(),k.textContent=a.join(" "),a=[u],k=p(u),x++)}const z=.35-x*h/2,T=e.getAttribute("x"),w=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${z+m*h}em`)})}}v(ot,"wrapText");function rt(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-K(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=K(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}v(rt,"circleMargin");function Et(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=rt(e[0],t,n);for(let a=1;a<e.length;++a){const x=rt(e[a],t,n);x>=o&&(i=e[a],o=x)}const r=St(a=>-1*rt({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(K(l,a)>a.radius){f=!1;break}for(const a of n)if(K(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return it(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Et(t,[]):vt(u.arcs.map(a=>a.p1))}v(Et,"computeTextCentre");function re(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=K(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}v(re,"getOverlappingCircles");function zt(t,n,s){const e={},i=re(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const x=Et(u,a,s);e[r]=x,x.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}v(zt,"computeTextCentres");function ae(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Ze,bq as h,a_ as D,by as Qe,b as Ye,bs as ot,bo as k,bu as ze}from"./yZ5s7S5S.js";import{bo as nt,bs as $e,a7 as V,ay as y,aD as e,bS as X,W as c,a5 as Ie,bA as Pe,bH as j,bl as _e,b_ as oe,bO as de,bn as et,bf as je,bV as Me,aA as v,c9 as w,aB as H,be as st,b$ as it,bj as lt,cd as dt,ca as Le,bk as ct}from"./B8o4lNgr.js";import{i as G}from"./Da6QaYq0.js";import{Hb as Ue,mm as ut,ty as pt}from"./WOicJa2k.js";import{aZ as ft}from"./DBQ6-GLb.js";import{ck as ht}from"./D24Lh2xV.js";import{c as vt}from"./ChTqQfQN.js";import{i as Ve,t as Xe}from"./H2jLkRRS.js";import{v as gt}from"./G0_EiVNo.js";import{d as _t}from"./B0Z-1lwJ.js";import{F as Se,at as mt,au as bt,cL as He,aU as Je,bb as kt,al as wt,ak as yt,cI as qe}from"./ah7LAYm4.js";import{n as K,w as At}from"./3cdteGtc.js";import{h as Ft,s as Re,a as Ne,k as Te,d as Wt}from"./D46WSk8U.js";import{s as xt}from"./Cb1eroFO.js";import{f as Ct,ai as It,aX as Pt}from"./CyAayV8v.js";import"./BIqUw3gi.js";import{c as Z}from"./CVjN4vxe.js";import{a as Dt,r as Mt}from"./hjPR6Rnc.js";import{M as Et,t as Be}from"./CoKvDYIY.js";import{o as Ge,r as Ot,q as St,R as Rt,p as Nt,n as Tt,j as Bt,l as zt}from"./9ZGNcJrk.js";var jt=H('<img alt="" class="size-4"/>'),Lt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Ut=H("<span> </span>"),Vt=H('<span data-menu-action-detail=""> </span>'),Xt=H('<span aria-hidden="true"><!></span>'),Ke=H("<!> <!> <!>",1),Ht=H('<div class="my-1 h-px bg-border" role="separator"></div>'),De=H("<!> <!>",1),Jt=H('<!> <p class="type-caption px-2 py-1 text-muted-foreground" data-menu-action-note=""> </p>',1),qt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Gt=H('<p class="type-caption px-2 py-1 text-muted-foreground" data-menu-action-note=""> </p>'),Kt=H('<div class="pl-4"><!> <!></div>'),Zt=H('<span class="sr-only"> </span>');function me(be,d){const ke=nt();if(new.target)return Ze({component:me,...be});$e(d,!0);const xe=(p,r=je)=>{var E=V(),O=y(E);{var L=W=>{const C=w(()=>Dt(r().editor));var U=V(),m=y(U);{var f=s=>{var i=jt();oe(()=>Re(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=V(),b=y(i);Z(b,()=>e(C),(N,ae)=>{ae(N,{size:16})}),c(s,i)},R=s=>{{let i=w(()=>Mt(r().editor.category));Se(s,{get icon(){return e(i)},size:16})}};D(m,s=>{r().editor.iconBase64?s(f):e(C)?s(o,1):s(R,-1)})}c(W,U)},S=W=>{var C=V(),U=y(C);xt(U,()=>r().iconSnippet),c(W,C)},q=W=>{{let C=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Se(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(C)}})}};D(O,W=>{r().editor?W(L):r().iconSnippet?W(S,1):r().icon&&W(q,2)})}c(p,E)},ne=(p,r=je)=>{var E=Ke(),O=y(E);{var L=m=>{var f=Lt(),o=Ie(f),R=_e(o,!0);Ne(o,(b,N)=>Be?.(b,N),()=>r().label);var s=X(o,2),i=_e(s,!0);Pe(f),oe(()=>{de(R,r().label),de(i,r().disabledReason)}),c(m,f)},S=m=>{var f=Ut(),o=_e(f,!0);Ne(f,(R,s)=>Be?.(R,s),()=>r().label),oe(()=>{Te(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};D(O,m=>{r().disabledReason?m(L):m(S,-1)})}var q=X(O,2);{var W=m=>{var f=Vt(),o=_e(f,!0);Ne(f,(R,s)=>Be?.(R,s),()=>r().detail),oe(()=>{Te(f,1,`ml-4 min-w-0 truncate ${r().detailTone==="danger"?"text-danger":"text-muted-foreground"}`),de(o,r().detail)}),c(m,f)};D(q,m=>{r().detail&&m(W)})}var C=X(q,2);{var U=m=>{var f=Xt(),o=Ie(f);It(o,{children:(R,s)=>{st();var i=it();oe(b=>de(i,b),[()=>Pt(r().shortcut)]),c(R,i)},$$slots:{default:!0}}),Pe(f),oe(()=>Te(f,1,Wt(M()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};D(C,m=>{r().shortcut&&m(U)})}c(p,E)};let we=h(d,"actions",7),M=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Me(null);function Q(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return M()},set menu(p){M(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Qe,$on:(p,r)=>Ye(d,p,r)},se=V(),ie=y(se);return Ft(ie,17,we,p=>p.id,(p,r)=>{const E=i=>{xe(i,()=>e(r))},O=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),L=w(()=>e(r).disabled||e(r).disabledReason!==void 0),S=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Ke(),W=y(q);{var C=i=>{var b=V(),N=y(b);{var ae=a=>{var n=V(),g=y(n);Z(g,()=>Ge,(x,P)=>{P(x,{})}),c(a,n)},ue=a=>{var n=Ht();c(a,n)};D(N,a=>{M()?a(ae):a(ue,-1)})}c(i,b)};D(W,i=>{e(r).dividerBefore&&i(C)})}var U=X(W,2);{var m=i=>{var b=V(),N=y(b);{var ae=g=>{var x=V(),P=y(x);Z(P,()=>Nt,(I,T)=>{T(I,{children:(B,Y)=>{var $=De(),pe=y($);{let te=w(()=>e(O)?E:void 0);Z(pe,()=>Ot,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=X(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Z(ee,()=>St,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=De(),l=y(t);{var _=re=>{var Ae=De(),Fe=y(Ae);{let We=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Z(Fe,()=>Rt,(ge,Oe)=>{Oe(ge,{get value(){return e(We)},get"aria-label"(){return e(r).label},children:(tt,Yt)=>{{let rt=w(()=>e(r).submenu.filter(at=>at.checked!==void 0));me(tt,{get actions(){return e(rt)},selection:"single",get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var Ce=X(Fe,2);{let We=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(Ce,{get actions(){return e(We)},get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}})};D(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=X(l,2);{var Ee=re=>{var Ae=Jt(),Fe=y(Ae);Z(Fe,()=>Ge,(ge,Oe)=>{Oe(ge,{})});var Ce=X(Fe,2),We=_e(Ce,!0);oe(()=>{Re(Ce,"id",`${ke}-${e(r).id}-note`),de(We,e(r).note)}),c(re,Ae)};D(le,re=>{e(r).note&&re(Ee)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,x)},ue=g=>{var x=V(),P=y(x);{let I=w(()=>e(O)?E:void 0);Z(P,()=>Tt,(T,B)=>{B(T,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,x)},a=g=>{var x=V(),P=y(x);{let I=w(()=>e(O)?E:void 0);Z(P,()=>Bt,(T,B)=>{B(T,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,x)},n=g=>{var x=V(),P=y(x);{let I=w(()=>e(O)?E:void 0),T=w(()=>e(r).variant==="destructive");Z(P,()=>zt,(B,Y)=>{Y(B,{get leading(){return e(I)},get destructive(){return e(T)},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,x)};D(N,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=De(),N=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);Ct(N,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?j(F,e(F)===e(r).id?null:e(r).id,!0):Q(e(r)),children:(g,x)=>{var P=qt(),I=y(P),T=Ie(I);xe(T,()=>e(r)),Pe(I);var B=X(I,2);ne(B,()=>e(r));var Y=X(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?mt:bt);Se(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=V(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Z(fe,()=>Et,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};D(Y,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=X(N,2);{var ue=a=>{var n=Kt(),g=Ie(n);me(g,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}});var x=X(g,2);{var P=I=>{var T=Gt(),B=_e(T,!0);oe(()=>de(B,e(r).note)),c(I,T)};D(x,I=>{e(r).note&&I(P)})}Pe(n),c(a,n)};D(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};D(U,i=>{M()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var R=X(U,2);{var s=i=>{var b=Zt(),N=_e(b,!0);oe(()=>{Re(b,"id",e(S)),de(N,e(r).disabledReason)}),c(i,b)};D(R,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),et(ce)}function Qt(be,d){if(new.target)return Ze({component:Qt,...be});$e(d,!0);const ke=()=>ze(N,"$installedEditors$",ne),xe=()=>ze(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=ot();let M=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Q=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),E=h(d,"showArchiveOption",7,!1),O=h(d,"showPathCopy",7,!0),L=h(d,"showFileNameCopy",7,!1),S=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),C=h(d,"isWorkspaceRoot",7,!1),U=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=vt("WorkspaceActionsMenu");let R=!1;lt(()=>{R=!0});function s(){R||p()?.()}const i=gt("externalEditors"),b=dt(A());Le(()=>{b.set(A())});const N=ft(b),ae=w(ke),ue=ht(b);let a=Me(""),n=Me(""),g=Me(!1);ct(()=>{Ue.dispatch(ut())}),Le(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");C()?j(a,le,!0):Ve(u())?j(a,u().replace(/\\/g,"/"),!0):j(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),j(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else j(a,u()),j(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else j(a,u()),j(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{j(a,u()),j(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(j(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function x(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!C()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Ue.dispatch(pt(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function T(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await x();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Y(){if(e(a))try{await navigator.clipboard.writeText(Xe(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ve(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(Xe(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Q()&&(Q()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){j(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),At({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),_t("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Ee){o.error("[WorkspaceActionsMenu] Failed to restore file",Ee),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{j(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];S()&&(i&&xe()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:He,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{T(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:He,onClick:()=>{B()}}]}),O()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:Je,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Y()}}),O()&&!C()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:Je,disabled:!u(),onClick:()=>{$()}}),L()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:kt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(U())),E()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?wt:yt,dividerBefore:t.length>0,onClick:fe}),r()&&Q()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:qe,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:qe,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return M()},set layout(t="list"){M(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Q()},set onDelete(t=void 0){Q(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return E()},set showArchiveOption(t=!1){E(t),v()},get showPathCopy(){return O()},set showPathCopy(t=!0){O(t),v()},get showFileNameCopy(){return L()},set showFileNameCopy(t=!1){L(t),v()},get showFileActions(){return S()},set showFileActions(t=!0){S(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return C()},set isWorkspaceRoot(t=!1){C(t),v()},get additionalActions(){return U()},set additionalActions(t=[]){U(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Qe,$on:(t,l)=>Ye(d,t,l)};{let t=w(()=>M()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=et(ve);return we(),ye}export{Qt as default};
|
|
1
|
+
import{t as Ze,bq as h,a_ as D,by as Qe,b as Ye,bs as ot,bo as k,bu as ze}from"./yZ5s7S5S.js";import{bo as nt,bs as $e,a7 as V,ay as y,aD as e,bS as X,W as c,a5 as Ie,bA as Pe,bH as j,bl as _e,b_ as oe,bO as de,bn as et,bf as je,bV as Me,aA as v,c9 as w,aB as H,be as st,b$ as it,bj as lt,cd as dt,ca as Le,bk as ct}from"./B8o4lNgr.js";import{i as G}from"./Da6QaYq0.js";import{Hb as Ue,mm as ut,ty as pt}from"./WOicJa2k.js";import{aZ as ft}from"./ClOUpVZZ.js";import{ck as ht}from"./-1vWYJiy.js";import{c as vt}from"./ChTqQfQN.js";import{i as Ve,t as Xe}from"./H2jLkRRS.js";import{v as gt}from"./G0_EiVNo.js";import{d as _t}from"./B0Z-1lwJ.js";import{F as Se,at as mt,au as bt,cL as He,aU as Je,bb as kt,al as wt,ak as yt,cI as qe}from"./ah7LAYm4.js";import{n as K,w as At}from"./BeRTGLrw.js";import{h as Ft,s as Re,a as Ne,k as Te,d as Wt}from"./D46WSk8U.js";import{s as xt}from"./Cb1eroFO.js";import{f as Ct,ai as It,aX as Pt}from"./Dax20l9D.js";import"./BIqUw3gi.js";import{c as Z}from"./CVjN4vxe.js";import{a as Dt,r as Mt}from"./DuInbvT4.js";import{M as Et,t as Be}from"./6hOEL6g0.js";import{o as Ge,r as Ot,q as St,R as Rt,p as Nt,n as Tt,j as Bt,l as zt}from"./BvUM18CV.js";var jt=H('<img alt="" class="size-4"/>'),Lt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Ut=H("<span> </span>"),Vt=H('<span data-menu-action-detail=""> </span>'),Xt=H('<span aria-hidden="true"><!></span>'),Ke=H("<!> <!> <!>",1),Ht=H('<div class="my-1 h-px bg-border" role="separator"></div>'),De=H("<!> <!>",1),Jt=H('<!> <p class="type-caption px-2 py-1 text-muted-foreground" data-menu-action-note=""> </p>',1),qt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Gt=H('<p class="type-caption px-2 py-1 text-muted-foreground" data-menu-action-note=""> </p>'),Kt=H('<div class="pl-4"><!> <!></div>'),Zt=H('<span class="sr-only"> </span>');function me(be,d){const ke=nt();if(new.target)return Ze({component:me,...be});$e(d,!0);const xe=(p,r=je)=>{var E=V(),O=y(E);{var L=W=>{const C=w(()=>Dt(r().editor));var U=V(),m=y(U);{var f=s=>{var i=jt();oe(()=>Re(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=V(),b=y(i);Z(b,()=>e(C),(N,ae)=>{ae(N,{size:16})}),c(s,i)},R=s=>{{let i=w(()=>Mt(r().editor.category));Se(s,{get icon(){return e(i)},size:16})}};D(m,s=>{r().editor.iconBase64?s(f):e(C)?s(o,1):s(R,-1)})}c(W,U)},S=W=>{var C=V(),U=y(C);xt(U,()=>r().iconSnippet),c(W,C)},q=W=>{{let C=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Se(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(C)}})}};D(O,W=>{r().editor?W(L):r().iconSnippet?W(S,1):r().icon&&W(q,2)})}c(p,E)},ne=(p,r=je)=>{var E=Ke(),O=y(E);{var L=m=>{var f=Lt(),o=Ie(f),R=_e(o,!0);Ne(o,(b,N)=>Be?.(b,N),()=>r().label);var s=X(o,2),i=_e(s,!0);Pe(f),oe(()=>{de(R,r().label),de(i,r().disabledReason)}),c(m,f)},S=m=>{var f=Ut(),o=_e(f,!0);Ne(f,(R,s)=>Be?.(R,s),()=>r().label),oe(()=>{Te(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};D(O,m=>{r().disabledReason?m(L):m(S,-1)})}var q=X(O,2);{var W=m=>{var f=Vt(),o=_e(f,!0);Ne(f,(R,s)=>Be?.(R,s),()=>r().detail),oe(()=>{Te(f,1,`ml-4 min-w-0 truncate ${r().detailTone==="danger"?"text-danger":"text-muted-foreground"}`),de(o,r().detail)}),c(m,f)};D(q,m=>{r().detail&&m(W)})}var C=X(q,2);{var U=m=>{var f=Xt(),o=Ie(f);It(o,{children:(R,s)=>{st();var i=it();oe(b=>de(i,b),[()=>Pt(r().shortcut)]),c(R,i)},$$slots:{default:!0}}),Pe(f),oe(()=>Te(f,1,Wt(M()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};D(C,m=>{r().shortcut&&m(U)})}c(p,E)};let we=h(d,"actions",7),M=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Me(null);function Q(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return M()},set menu(p){M(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Qe,$on:(p,r)=>Ye(d,p,r)},se=V(),ie=y(se);return Ft(ie,17,we,p=>p.id,(p,r)=>{const E=i=>{xe(i,()=>e(r))},O=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),L=w(()=>e(r).disabled||e(r).disabledReason!==void 0),S=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Ke(),W=y(q);{var C=i=>{var b=V(),N=y(b);{var ae=a=>{var n=V(),g=y(n);Z(g,()=>Ge,(x,P)=>{P(x,{})}),c(a,n)},ue=a=>{var n=Ht();c(a,n)};D(N,a=>{M()?a(ae):a(ue,-1)})}c(i,b)};D(W,i=>{e(r).dividerBefore&&i(C)})}var U=X(W,2);{var m=i=>{var b=V(),N=y(b);{var ae=g=>{var x=V(),P=y(x);Z(P,()=>Nt,(I,T)=>{T(I,{children:(B,Y)=>{var $=De(),pe=y($);{let te=w(()=>e(O)?E:void 0);Z(pe,()=>Ot,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=X(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Z(ee,()=>St,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=De(),l=y(t);{var _=re=>{var Ae=De(),Fe=y(Ae);{let We=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Z(Fe,()=>Rt,(ge,Oe)=>{Oe(ge,{get value(){return e(We)},get"aria-label"(){return e(r).label},children:(tt,Yt)=>{{let rt=w(()=>e(r).submenu.filter(at=>at.checked!==void 0));me(tt,{get actions(){return e(rt)},selection:"single",get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var Ce=X(Fe,2);{let We=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(Ce,{get actions(){return e(We)},get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}})};D(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=X(l,2);{var Ee=re=>{var Ae=Jt(),Fe=y(Ae);Z(Fe,()=>Ge,(ge,Oe)=>{Oe(ge,{})});var Ce=X(Fe,2),We=_e(Ce,!0);oe(()=>{Re(Ce,"id",`${ke}-${e(r).id}-note`),de(We,e(r).note)}),c(re,Ae)};D(le,re=>{e(r).note&&re(Ee)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,x)},ue=g=>{var x=V(),P=y(x);{let I=w(()=>e(O)?E:void 0);Z(P,()=>Tt,(T,B)=>{B(T,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,x)},a=g=>{var x=V(),P=y(x);{let I=w(()=>e(O)?E:void 0);Z(P,()=>Bt,(T,B)=>{B(T,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,x)},n=g=>{var x=V(),P=y(x);{let I=w(()=>e(O)?E:void 0),T=w(()=>e(r).variant==="destructive");Z(P,()=>zt,(B,Y)=>{Y(B,{get leading(){return e(I)},get destructive(){return e(T)},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,x)};D(N,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=De(),N=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);Ct(N,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(L)},get"aria-describedby"(){return e(S)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?j(F,e(F)===e(r).id?null:e(r).id,!0):Q(e(r)),children:(g,x)=>{var P=qt(),I=y(P),T=Ie(I);xe(T,()=>e(r)),Pe(I);var B=X(I,2);ne(B,()=>e(r));var Y=X(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?mt:bt);Se(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=V(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Z(fe,()=>Et,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};D(Y,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=X(N,2);{var ue=a=>{var n=Kt(),g=Ie(n);me(g,{get actions(){return e(r).submenu},get menu(){return M()},get iconWeight(){return J()},get onClose(){return u()}});var x=X(g,2);{var P=I=>{var T=Gt(),B=_e(T,!0);oe(()=>de(B,e(r).note)),c(I,T)};D(x,I=>{e(r).note&&I(P)})}Pe(n),c(a,n)};D(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};D(U,i=>{M()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var R=X(U,2);{var s=i=>{var b=Zt(),N=_e(b,!0);oe(()=>{Re(b,"id",e(S)),de(N,e(r).disabledReason)}),c(i,b)};D(R,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),et(ce)}function Qt(be,d){if(new.target)return Ze({component:Qt,...be});$e(d,!0);const ke=()=>ze(N,"$installedEditors$",ne),xe=()=>ze(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=ot();let M=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Q=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),E=h(d,"showArchiveOption",7,!1),O=h(d,"showPathCopy",7,!0),L=h(d,"showFileNameCopy",7,!1),S=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),C=h(d,"isWorkspaceRoot",7,!1),U=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=vt("WorkspaceActionsMenu");let R=!1;lt(()=>{R=!0});function s(){R||p()?.()}const i=gt("externalEditors"),b=dt(A());Le(()=>{b.set(A())});const N=ft(b),ae=w(ke),ue=ht(b);let a=Me(""),n=Me(""),g=Me(!1);ct(()=>{Ue.dispatch(ut())}),Le(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");C()?j(a,le,!0):Ve(u())?j(a,u().replace(/\\/g,"/"),!0):j(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),j(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else j(a,u()),j(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else j(a,u()),j(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{j(a,u()),j(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(j(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function x(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!C()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Ue.dispatch(pt(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function T(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await x();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Y(){if(e(a))try{await navigator.clipboard.writeText(Xe(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ve(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(Xe(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Q()&&(Q()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){j(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),At({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),_t("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Ee){o.error("[WorkspaceActionsMenu] Failed to restore file",Ee),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{j(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];S()&&(i&&xe()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:He,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{T(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:He,onClick:()=>{B()}}]}),O()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:Je,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Y()}}),O()&&!C()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:Je,disabled:!u(),onClick:()=>{$()}}),L()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:kt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(U())),E()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?wt:yt,dividerBefore:t.length>0,onClick:fe}),r()&&Q()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:qe,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:qe,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return M()},set layout(t="list"){M(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Q()},set onDelete(t=void 0){Q(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return E()},set showArchiveOption(t=!1){E(t),v()},get showPathCopy(){return O()},set showPathCopy(t=!0){O(t),v()},get showFileNameCopy(){return L()},set showFileNameCopy(t=!1){L(t),v()},get showFileActions(){return S()},set showFileActions(t=!0){S(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return C()},set isWorkspaceRoot(t=!1){C(t),v()},get additionalActions(){return U()},set additionalActions(t=[]){U(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Qe,$on:(t,l)=>Ye(d,t,l)};{let t=w(()=>M()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=et(ve);return we(),ye}export{Qt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as s}from"./B8o4lNgr.js";import{d as r}from"./
|
|
1
|
+
import{ao as s}from"./B8o4lNgr.js";import{d as r}from"./B9G1J12P.js";const t=()=>{const e=r;return{page:{subscribe:e.page.subscribe},navigating:{subscribe:e.navigating.subscribe},updated:e.updated}},c={subscribe(e){return(s?o("page"):t().page).subscribe(e)}};function o(e){try{return t()[e]}catch{throw new Error(`Cannot subscribe to '${e}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server`)}}export{c as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as c,M as gt,a8 as Ct,aa as Wt,w as Pt,N as ft,ad as T,aE as Bt,an as Vt,aK as yt,_ as Ft,o as zt,k as Ot}from"./
|
|
1
|
+
import{a as c,M as gt,a8 as Ct,aa as Wt,w as Pt,N as ft,ad as T,aE as Bt,an as Vt,aK as yt,_ as Ft,o as zt,k as Ot}from"./CnWtv34Y.js";import{g as k,c3 as Z}from"./BQY3g8uE.js";import{d as ct}from"./BWjmxT5D.js";var nt=(function(){var e=c(function(v,s,d,l){for(d=d||{},l=v.length;l--;d[v[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],o=[1,16],a=[1,19],f=[1,20],g={trace:c(k(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:c(k(function(s,d,l,p,x,u,E){var _=u.length-1;switch(x){case 1:return u[_-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[_-1].push(u[_]),this.$=u[_-1];break;case 7:case 8:this.$=u[_];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[_].substr(6)),this.$=u[_].substr(6);break;case 12:this.$=u[_].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[_].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[_].substr(8)),this.$=u[_].substr(8);break;case 18:p.addTask(u[_],0,""),this.$=u[_];break;case 19:p.addEvent(u[_].substr(2)),this.$=u[_];break}},"anonymous"),"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:o,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:o,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:c(k(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),"parseError"),parse:c(k(function(s){var d=this,l=[0],p=[],x=[null],u=[],E=this.table,_="",H=0,C=0,P=2,G=1,M=u.slice.call(arguments,1),S=Object.create(this.lexer),L={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(L.yy[F]=this.yy[F]);S.setInput(s,L.yy),L.yy.lexer=S,L.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var z=S.yylloc;u.push(z);var X=S.options&&S.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(R){l.length=l.length-2*R,x.length=x.length-R,u.length=u.length-R}k(N,"popStack"),c(N,"popStack");function b(){var R;return R=p.pop()||S.lex()||G,typeof R!="number"&&(R instanceof Array&&(p=R,R=p.pop()),R=d.symbols_[R]||R),R}k(b,"lex"),c(b,"lex");for(var w,I,$,B,W={},D,V,j,q;;){if(I=l[l.length-1],this.defaultActions[I]?$=this.defaultActions[I]:((w===null||typeof w>"u")&&(w=b()),$=E[I]&&E[I][w]),typeof $>"u"||!$.length||!$[0]){var et="";q=[];for(D in E[I])this.terminals_[D]&&D>P&&q.push("'"+this.terminals_[D]+"'");S.showPosition?et="Parse error on line "+(H+1)+`:
|
|
2
2
|
`+S.showPosition()+`
|
|
3
3
|
Expecting `+q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":et="Parse error on line "+(H+1)+": Unexpected "+(w==G?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(et,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:z,expected:q})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+w);switch($[0]){case 1:l.push(w),x.push(S.yytext),u.push(S.yylloc),l.push($[1]),w=null,C=S.yyleng,_=S.yytext,H=S.yylineno,z=S.yylloc;break;case 2:if(V=this.productions_[$[1]][1],W.$=x[x.length-V],W._$={first_line:u[u.length-(V||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(V||1)].first_column,last_column:u[u.length-1].last_column},X&&(W._$.range=[u[u.length-(V||1)].range[0],u[u.length-1].range[1]]),B=this.performAction.apply(W,[_,C,H,L.yy,$[1],x,u].concat(M)),typeof B<"u")return B;V&&(l=l.slice(0,-1*V*2),x=x.slice(0,-1*V),u=u.slice(0,-1*V)),l.push(this.productions_[$[1]][0]),x.push(W.$),u.push(W._$),j=E[l[l.length-2]][l[l.length-1]],l.push(j);break;case 3:return!0}}return!0},"parse"),"parse")},m=(function(){var v={EOF:1,parseError:c(k(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),"parseError"),setInput:c(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var d=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m,ch as x,aO as O,G as k,bC as p,l as A,ab as Y,a1 as E,ac as T,cw as _,ca as H,aF as D,b7 as J,aU as z,b6 as X,bU as C,b4 as F,b5 as U,bT as W}from"./
|
|
1
|
+
import{f as m,ch as x,aO as O,G as k,bC as p,l as A,ab as Y,a1 as E,ac as T,cw as _,ca as H,aF as D,b7 as J,aU as z,b6 as X,bU as C,b4 as F,b5 as U,bT as W}from"./BQY3g8uE.js";import{l as j}from"./Pq3i4zFA.js";var R=m((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),P=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),q=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),K=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Q=m((t,e,r,d,a)=>{const f=[],h=new Set;if(r.forEach(({start:i,end:o})=>{i!==d&&h.add(i),o!==d&&h.add(o)}),h.forEach(i=>{const o=t.node(i);typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)}),f.length===0&&r.forEach(({edge:i})=>{(i.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)})}),f.length===0)return P(a);const c=f.reduce((i,o)=>({x:i.x+o.x/f.length,y:i.y+o.y/f.length}),{x:0,y:0}),l=c.x-e.x,s=c.y-e.y;return Math.abs(l)>Math.abs(s)?l>0?"right":"left":Math.abs(s)>0?s>0?"bottom":"top":P(a)},"getSelfLoopSide"),V=m((t,e="top",r=0,d=0)=>{const a=t.x,f=t.y-r,h=t.width/2,c=t.height/2,l=Math.max(36,Math.min(100,t.width*.8)),s=R(Math.max(d,t.width*.35),36,l),i=R(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const o=f+c;return[{x:a-s/2,y:o},{x:a-s/2,y:o+i},{x:a+s/2,y:o+i},{x:a+s/2,y:o}]}case"right":{const o=a+h;return[{x:o,y:f-s/2},{x:o+i,y:f-s/2},{x:o+i,y:f+s/2},{x:o,y:f+s/2}]}case"left":{const o=a-h;return[{x:o,y:f-s/2},{x:o-i,y:f-s/2},{x:o-i,y:f+s/2},{x:o,y:f+s/2}]}case"top":default:{const o=f-c;return[{x:a-s/2,y:o},{x:a-s/2,y:o-i},{x:a+s/2,y:o-i},{x:a+s/2,y:o}]}}},"getSelfLoopPoints"),Z=m((t,e,r="top",d=0,a={})=>{const h=t.x,c=t.y-d,l=a.width??0,s=a.height??0;switch(r){case"bottom":return{x:h,y:Math.max(...e.map(i=>i.y))+s/2+4};case"right":return{x:Math.max(...e.map(i=>i.x))+l/2+4,y:c};case"left":return{x:Math.min(...e.map(i=>i.x))-l/2-4,y:c};case"top":default:return{x:h,y:Math.min(...e.map(i=>i.y))-s/2-4}}},"getSelfLoopLabelPosition"),B=m((t,e=0,{mergeSelfLoops:r=!0}={})=>{const d=new Map,a=[],f=t.graph()?.rankdir;return t.edges().forEach(h=>{const c=t.edge(h);if(r&&c.selfLoop){const l=c.selfLoop.id;d.has(l)||d.set(l,[]),d.get(l).push({edge:c,start:h.v,end:h.w})}else a.push({edge:c,start:h.v,end:h.w})}),d.forEach(h=>{if(h.length!==3){h.forEach(u=>a.push(u));return}h.sort((u,w)=>u.edge.selfLoop.order-w.edge.selfLoop.order);const[c,l,s]=h,i=c.edge.originalEdge??l.edge.originalEdge??s.edge.originalEdge??l.edge,o=t.node(i.start);if(!o){h.forEach(u=>a.push(u));return}const n={width:l.edge.width,height:l.edge.height},L=Q(t,o,h,i.start,f),b=V(o,L,e,n.width??0),y=Z(o,b,L,e,n),g={...l.edge,...i,id:i.id,points:b,start:i.start,end:i.end,x:y.x,y:y.y,width:n.width,height:n.height,labelStyle:l.edge.labelStyle,fromCluster:c.edge.fromCluster??l.edge.fromCluster??s.edge.fromCluster,toCluster:c.edge.toCluster??l.edge.toCluster??s.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),I=m(async({element:t,graph:e,diagramType:r,id:d,parentCluster:a,siteConfig:f})=>{const h=e.graph().rankdir;p.trace("Dir in recursive render - dir:",h);const{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o}=T(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const n=q(r);await Promise.all(e.nodes().map(async function(y){const g=e.node(y);if(a!==void 0){const u=JSON.parse(JSON.stringify(a.clusterData));p.trace(`Setting data for parent cluster XXX
|
|
2
2
|
Node.id = `,y,`
|
|
3
3
|
data=`,u.height,`
|
|
4
4
|
Parent cluster`,a.height),e.setNode(a.id,u),e.parent(y)||(p.trace("Setting parent",y,a.id),e.setParent(y,a.id,u))}if(p.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),g?.clusterNode){p.info("Cluster identified XBX",y,g.width,e.node(y));const{ranksep:u,nodesep:w}=e.graph();g.graph.setGraph({...g.graph.graph(),ranksep:u+25,nodesep:w});const S=await oe({element:i,graph:g.graph,diagramType:r,id:d,parentCluster:e.node(y),siteConfig:f}),N=S.elem;_(g,N),g.diff=S.diff||0,p.info("New compound node after recursive render XAX",y,"width",g.width,"height",g.height),H(N,g)}else e.children(y).length>0?(p.trace("Cluster - the non recursive path XBX",y,g.id,g,g.width,"Graph:",e),p.trace(D(g.id,e)),E.set(g.id,{id:D(g.id,e),node:g})):(p.trace("Node - the non recursive path XAX",y,i,e.node(y),h),await J(i,e.node(y),{config:f,dir:h}))})),await m(async()=>{const y=e.edges().map(async function(g){const u=e.edge(g.v,g.w,g.name);if(p.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),p.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(e.edge(g))),p.info("Fix",E,"ids:",g.v,g.w,"Translating: ",E.get(g.v),E.get(g.w)),n&&u.selfLoop){if(u.selfLoop.order!==1)return;const w={...u.originalEdge,...u,id:u.selfLoop.id,startLabelLeft:u.originalEdge?.startLabelLeft??u.startLabelLeft,startLabelRight:u.originalEdge?.startLabelRight??u.startLabelRight,endLabelLeft:u.originalEdge?.endLabelLeft??u.endLabelLeft,endLabelRight:u.originalEdge?.endLabelRight??u.endLabelRight};await X(s,w),u.width=w.width,u.height=w.height,u.labelStyle=w.labelStyle;return}await X(s,u)});await Promise.all(y)},"processEdges")();const{subGraphTitleTotalMargin:b}=z(f);return{elem:o,graph:e,groups:{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o},diagramType:r,id:d,mergeSelfLoops:n,subGraphTitleTotalMargin:b}},"measureDagreGraph"),M=m(t=>{p.info("############################################# XXX"),p.info("### Layout ### XXX"),p.info("############################################# XXX"),j(t)},"runDagreGraphLayout"),$=m((t,e,r)=>{const d=t.node(e);if(!d)return;const a={...d};return d?.clusterNode?a.y=(d.y??0)+r:t.children(e).length>0?a.height=(d.height??0)+r:a.y=(d.y??0)+r/2,a},"normalizeDagreNode"),v=m((t,e)=>{K.forEach(r=>{e[r]!==void 0&&(t[r]=e[r])})},"applyDagreNodeLayout"),ee=m((t,e,r,d)=>({...t,start:t.start??e,end:t.end??r,points:(t.points??[]).map(a=>({...a,y:typeof a.y=="number"?a.y+d:a.y}))}),"normalizeDagreEdge"),te=m((t,e)=>{const{graph:r,mergeSelfLoops:d,subGraphTitleTotalMargin:a=0}=e,f=new Map(t.nodes.map(c=>[c.id,c]));x(r).forEach(c=>{const l=$(r,c,a);if(!l)return;v(r.node(c),l);const s=f.get(c);s&&v(s,l)});const h=a/2;return t.edges=B(r,h,{mergeSelfLoops:d}).map(({edge:c,start:l,end:s})=>ee(c,l,s,h)),t},"applyDagreLayoutResult"),re=m(async({elem:t,graph:e,groups:{clusters:r,edgePaths:d},diagramType:a,id:f,mergeSelfLoops:h,subGraphTitleTotalMargin:c})=>{let l=0;await Promise.all(x(e).map(async function(o){const n=e.node(o);if(p.info("Position XBX => "+o+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=c,p.info("A tainted cluster node XBX1",o,n.id,n.width,n.height,n.x,n.y,e.parent(o)),E.get(n.id).node=n,C(n);else if(e.children(o).length>0){p.info("A pure cluster node XBX1",o,n.id,n.x,n.y,n.width,n.height,e.parent(o)),n.height+=c,e.node(n.parentId);const L=n?.padding/2||0,b=n?.labelBBox?.height||0,y=b-L||0;p.debug("OffsetY",y,"labelHeight",b,"halfPadding",L),await F(r,n),E.get(n.id).node=n}else{const L=e.node(n.parentId);n.y+=c/2,p.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",L,L?.offsetY,n),C(n)}}));const s=c/2;return B(e,s,{mergeSelfLoops:h}).forEach(function({edge:o,start:n,end:L}){p.info("Edge "+n+" -> "+L+": "+JSON.stringify(o),o),o.points.forEach(u=>u.y+=s);const b=e.node(n),y=e.node(L),g=U(d,o,E,a,b,y,f);W(o,g)}),e.nodes().forEach(function(o){const n=e.node(o);p.info(o,n.type,n.diff),n.isGroup&&(l=n.diff)}),p.warn("Returning from recursive render XAX",t,l),{elem:t,diff:l}},"paintDagreLayoutCore"),oe=m(async t=>{const e=await I(t);return M(e.graph),await re(e)},"renderDagreSubgraph"),G=m(t=>{const e=new k({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.nodeSpacing||t.config?.flowchart?.nodeSpacing,ranksep:t.config?.rankSpacing||t.rankSpacing||t.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach(r=>{e.setNode(r.id,{...r}),r.parentId&&e.setParent(r.id,r.parentId)}),p.debug("Edges:",t.edges),t.edges.forEach(r=>{if(r.start===r.end){const d=r.start,a=d+"---"+d+"---1",f=d+"---"+d+"---2",h=e.node(d);e.setNode(a,{domId:a,id:a,parentId:h.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(a,h.parentId),e.setNode(f,{domId:f,id:f,parentId:h.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(f,h.parentId);const c=structuredClone(r),l=structuredClone(r),s=structuredClone(r),i=structuredClone(r);l.originalEdge=c,l.selfLoop={id:c.id,order:0},s.originalEdge=c,s.selfLoop={id:c.id,order:1},i.originalEdge=c,i.selfLoop={id:c.id,order:2},l.label="",l.arrowTypeEnd="none",l.endLabelLeft="",l.endLabelRight="",l.startLabelLeft="",l.id=d+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=d+"-cyclic-special-mid",i.label="",i.startLabelRight="",i.startLabelLeft="",i.arrowTypeStart="none",h.isGroup&&(l.fromCluster=d,i.toCluster=d),i.id=d+"-cyclic-special-2",i.arrowTypeStart="none",e.setEdge(d,a,l,d+"-cyclic-special-0"),e.setEdge(a,f,s,d+"-cyclic-special-1"),e.setEdge(f,d,i,d+"-cyclic-special-2")}else e.setEdge(r.start,r.end,{...r},r.id)}),A(e),{graph:e}},"prepareLayoutForDagre"),ae=m(async(t,{element:e,preparedLayout:r})=>{const d=r??G(t),a=O(),f=await I({element:e,graph:d.graph,diagramType:t.type,id:t.diagramId,parentCluster:void 0,siteConfig:a});return d.measuredLayout=f,f},"measureDagreLayout"),ne=m((t,e)=>{const r=e.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return M(r.graph),te(t,r),r},"runDagreLayoutCore"),se=m((t,{measure:e})=>x(e.graph).map(r=>e.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),ie=m((t,e,{measure:r})=>t?r.graph.node(t):void 0,"getDagreEdgeNode"),ce=Y({prepareLayout:G,measureLayout:ae,runLayoutCore:ne,paintOptions:{clusterDb:E,getNodes:se,getEdgeNode:ie,skipNode:m((t,{measure:e})=>!e.graph.hasNode(t.id),"skipNode"),isCluster:m((t,{measure:e})=>e.graph.hasNode(t.id)&&(e.graph.children(t.id)??[]).length>0,"isCluster")}});export{te as applyDagreLayoutResult,B as getEdgesToRender,ae as measureDagreLayout,G as prepareLayoutForDagre,ce as render,ne as runDagreLayoutCore};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
var be=Object.defineProperty;var ve=(e,t,r)=>t in e?be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>ve(e,typeof t!="symbol"?t+"":t,r);import{a as Se,i as _e}from"./Da6QaYq0.js";import{c as H}from"./ChTqQfQN.js";import{i as D}from"./DvUv7DbT.js";import{bo as n,_ as ye}from"./yZ5s7S5S.js";import{Hb as a,n2 as S,n1 as m,lx as we,x8 as M,x9 as L,x6 as ke,x7 as Ee,qG as W,wV as J,D as Ce,uf as Y,c as Me,GZ as Re,a8 as Ae,b_ as Pe,bZ as Te,cc as Ie,cb as De,n4 as k}from"./WOicJa2k.js";import{cs as Oe,bt as xe,c5 as Fe,ck as Le,c7 as Ue,cH as Ne,cL as Ve,cB as X,aw as He,bP as We,cI as qe}from"
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CBYPZH-W.js","/app/immutable/chunks/BeRTGLrw.js","/app/immutable/chunks/yZ5s7S5S.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/D46WSk8U.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/Dax20l9D.js","/app/immutable/chunks/Cb1eroFO.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/CVjN4vxe.js","/app/immutable/chunks/G0_EiVNo.js","/app/immutable/chunks/DQT9c-_R.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Dfbagr79.js","/app/immutable/chunks/BIqUw3gi.js","/app/immutable/chunks/WOicJa2k.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/ah7LAYm4.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.BeL_JB6L.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var be=Object.defineProperty;var ve=(e,t,r)=>t in e?be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>ve(e,typeof t!="symbol"?t+"":t,r);import{a as Se,i as _e}from"./Da6QaYq0.js";import{c as H}from"./ChTqQfQN.js";import{i as D}from"./DvUv7DbT.js";import{bo as n,_ as ye}from"./yZ5s7S5S.js";import{Hb as a,n2 as S,n1 as m,lx as we,x8 as M,x9 as L,x6 as ke,x7 as Ee,qG as W,wV as J,D as Ce,uf as Y,c as Me,GZ as Re,a8 as Ae,b_ as Pe,bZ as Te,cc as Ie,cb as De,n4 as k}from"./WOicJa2k.js";import{cs as Oe,bt as xe,c5 as Fe,ck as Le,c7 as Ue,cH as Ne,cL as Ve,cB as X,aw as He,bP as We,cI as qe}from"./-1vWYJiy.js";import{n as Be}from"./y8su61xq.js";import{al as je,F as ee,j as Ge,G as ze,bw as Ke,c as Ye,am as $e,bh as q,$ as Qe,aC as Ze,q as te,K as Je,ah as Xe,bm as et,J as tt,H as rt,I as st,bk as it}from"./tzy2FJ3p.js";import{q as nt,u as re}from"./C3YfsJGu.js";const O=H("Clipboard");async function Gr(e){let t;if(Se())try{const r=await _e("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,O.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw O.error("Browser clipboard write failed",r,{electronError:t}),r}throw O.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const at=a.createSelector(e=>e.githubAuth.mutationRequestId),ot=a.createSelector(e=>e.githubAuth.callbacksCancelled),ct=a.createSelector(e=>e.githubAuth.isDisconnecting),se=a.createSelector(e=>e.githubAuth.isAuthenticated),lt=a.createSelector(e=>e.githubAuth.statusSettled===!0),dt=a.createSelector(e=>e.githubAuth.requiresDaemonAuth),ut=a.createSelector(e=>e.githubAuth.user),pt=a.createSelector(e=>e.githubAuth.isAuthenticating),ft=a.createSelector(e=>e.githubAuth.deviceFlow),ht=a.createSelector(e=>e.githubAuth.error),zr=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:ot,selectGitHubAuthDeviceFlow:ft,selectGitHubAuthError:ht,selectGitHubAuthIsAuthenticated:se,selectGitHubAuthIsAuthenticating:pt,selectGitHubAuthIsDisconnecting:ct,selectGitHubAuthMutationRequestId:at,selectGitHubAuthRequiresDaemonAuth:dt,selectGitHubAuthStatusSettled:lt,selectGitHubAuthUser:ut},Symbol.toStringTag,{value:"Module"})),gt=H("WorkspaceValidation");async function Kr(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_repoPathRequired_error(),suggestion:n.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return mt(s)?vt(s):St(s,t,r)}function mt(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function bt(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const c=o[2].replace(/\.git$/,"");return c?{owner:o[1],repo:c}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function vt(e){return bt(e)?{valid:!0,warning:n.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:n.workspace_validation_invalidGithubUrl_error(),suggestion:n.workspace_validation_invalidGithubUrl_suggestion()}}async function St(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:n.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:n.workspace_validation_pathNotAbsolute_error(),suggestion:n.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await D("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const c=s.data;return c.exists?c.isDirectory?c.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c}:c.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c,warning:n.workspace_validation_insideParentRepo_warning({path:c.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:c}:t?c.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:n.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:c,warning:n.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:n.workspace_repoSelector_notGitRepository_label(),directoryStatus:c}:{valid:!1,error:n.workspace_validation_notDirectory_error(),suggestion:n.workspace_validation_notDirectory_suggestion(),directoryStatus:c}:t?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExist_suggestion(),directoryStatus:c}}if(!(await D("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExistLegacy_suggestion()};const o=await D("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?n.workspace_repoSelector_notGitRepository_label():n.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:n.workspace_validation_nonGitInit_warning()}}catch(s){if(gt.warn("Could not validate path existence",s),!t)return{valid:!1,error:n.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Yr(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchPrefixInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:n.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:n.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:n.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function $r(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Qr(e){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchNameInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:n.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:n.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchNameLock_error()}:{valid:!0}}function Zr(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:n.workspace_validation_promptTooLong_error(),suggestion:n.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Jr(e){const t=e.toLowerCase();return t.includes("maxbuffer")?n.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?n.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?n.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?n.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?n.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?n.workspace_gitError_cloneAuth():n.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?n.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?n.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_readPermission():e:t.includes("permission denied")?n.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?n.workspace_gitError_notFound():t.includes("already exists")?n.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?n.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:n.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?n.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?n.workspace_gitError_diskSpace():e}const v=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return n.specialists_builtin_prReviewer_name()},get description(){return n.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:`# Role
|
|
3
3
|
You are a PR review specialist conducting a code review for a pull request.
|
|
4
4
|
|
|
5
5
|
# Objectives
|
|
@@ -419,4 +419,4 @@ Show referenced workspaces as live fenced \`workspace\` blocks with one returned
|
|
|
419
419
|
|
|
420
420
|
For cross-workspace agents, use attributed send for one-way requests, ask when an answer is requested, and waitFor for completion watches. After ask or waitFor, end the turn; do not poll or treat interim messages as completion. On the completion wake, read the specified agent's conversation once and relay its last assistant message with a nonempty message ID. Link that reply as [Workspace Title](intent://local/{workspaceId}/agent/{agentId}/message/{messageId}), taking all IDs and the title from the conversation read, never the outgoing request or a user message. This exact-message source link is the exception to workspace cards. Omit the link if no assistant message ID exists; report missing or failed results honestly.
|
|
421
421
|
|
|
422
|
-
Keep ordinary recommendations to supported features ready for users. Discuss an experiment honestly and label its status only when explicitly asked or when the user is developing or testing it.`,roleReminder:"You are the built-in Assistant. Help with app tasks using ws.app.* and current app guidance. Keep changes reviewable through proposal or confirmation cards, with cards last. Show workspaces as live cards; never use a workspace ID slug as a label. Use the discovered canonical route including its hash fragment. End the turn after registering an agent completion watch; on completion, link the returned assistant reply using its exact message ID."}],ie=new Set(["pr-reviewer"]),Xr="developer";function es(e){return v.find(t=>t.id===e)}function u(e){return e??""}function _t(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>u(i.provider)===u(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&u(i.reasoningEffort)===u(s[o].reasoningEffort))}function $(e,t,r){if(e.source!=="user"||!r?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const s=t.find(i=>i.id===e.id)??v.find(i=>i.id===e.id);return s?u(e.name)===u(s.name)&&u(e.description)===u(s.description)&&u(e.behaviorPrompt)===u(s.defaultBehaviorPrompt)&&u(e.roleReminder)===u(s.roleReminder)&&u(e.reasoningEffort)===u(s.reasoningEffort)&&_t(e.modelOptions,s.modelOptions):!1}const ts=a.createSelector(e=>e.specialists.bundledSpecialists),yt=a.createSelector(e=>e.specialists.fileSpecialists),rs=a.createSelector(e=>S(yt.select(e))),ss=a.createSelector(e=>e.specialists.userOverrides);a.createSelector(e=>e.specialists.overridesLoaded);const is=a.createSelector(e=>e.specialists.customSpecialistsLoaded),ns=a.createSelector(e=>e.specialists.fileSpecialistsLoaded),as=a.createSelector(e=>e.specialists.bundledSpecialistsLoaded),os=a.createSelector(e=>e.specialists.specialistsFolderPath),cs=a.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});a.createSelector(e=>e.specialists.providerModelOverrides);const x=a.createSelector((e,t)=>!(ie.has(t)&&!se.select(e)));function wt(e,t){return t?e:e.filter(r=>!ie.has(r.id))}function kt(e,t){return wt(e,t).filter(r=>!r.hidden)}function ls(e,t){return kt(e,t).filter(r=>r.role!=="internal")}const b=a.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=S(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const l of r)!i.has(l.id)&&x.select(e,l.id)&&(i.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!i.has(l.id)&&x.select(e,l.id)&&(i.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of v)!i.has(l.id)&&x.select(e,l.id)&&(i.add(l.id),o.push(l));const c=new Map;for(const l of v)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,f)=>{const _=c.has(l.id),I=c.has(f.id);return _&&I?(c.get(l.id)??0)-(c.get(f.id)??0):_&&!I?-1:!_&&I?1:l.name.localeCompare(f.name)}),o}),ds=a.createSelector(e=>{const t=b.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...v.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),Et=a.createSelector((e,t)=>{const r=m(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&S(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=v.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),us=a.createSelector((e,t)=>Et.select(e,t)?.name??null),ps=a.createSelector((e,t,r)=>{const i=b.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),fs=a.createSelector((e,t,r)=>b.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),hs=a.createSelector((e,t,r)=>b.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),gs=a.createSelector((e,t,r)=>{const i=b.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function R(e,t){return t.some(r=>r.id===e)||v.some(r=>r.id===e)}const ms=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&R(t,e.specialists.bundledSpecialists)}return R(t,e.specialists.bundledSpecialists)}),bs=a.createSelector((e,t,r)=>r?!!B.select(e,t,r):!!m(e.specialists.fileSpecialists,t)),vs=a.createSelector((e,t,r)=>{if(r){const o=B.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:R(t,e.specialists.bundledSpecialists)&&!$(o,e.specialists.bundledSpecialists)}if(!R(t,e.specialists.bundledSpecialists))return!1;const i=m(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!$(i,e.specialists.bundledSpecialists)}),B=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return m(e.specialists.fileSpecialists,t)}),Ss=a.createSelector((e,t,r)=>{const s=B.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),_s=a.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=m(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),ys=a.createSelector((e,t,r)=>{if(r){const i=b.select(e,r).find(l=>l.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Oe.select(e,o,r);const c=xe.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=m(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:Ct.select(e,t)}),Ct=a.createSelector((e,t)=>{const s=b.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:je.select(e)?ee.select(e):""}),ws=a.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?S(r):[]}),ks=a.createSelector((e,t)=>e.specialists.creationByContext?.[t]??we),Es=a.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),Mt=["idle","exited"];function Rt(e){return e===void 0||!Mt.includes(e)}function Cs(e){return e.status==="restarting"?"restarting":Rt(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function At(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const Ms=a.createSelector(e=>e.voiceSettings.isLoading),Rs=a.createSelector(e=>e.voiceSettings.available),As=a.createSelector(e=>e.voiceSettings.provider),Ps=a.createSelector(e=>e.voiceSettings.engine),Ts=a.createSelector(e=>e.voiceSettings.osEngineAvailable),Is=a.createSelector(e=>e.voiceSettings.keyConfigured),Ds=a.createSelector(e=>e.voiceSettings.vocabulary),Os=a.createSelector(e=>e.voiceSettings.openaiModel),xs=a.createSelector(e=>e.voiceSettings.language),Fs=a.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),Ls=a.createSelector(e=>e.voiceSettings.inputDeviceId),Us=a.createSelector(e=>e.voiceSettings.inputDevices),Ns=a.createSelector(e=>e.voiceSettings.busyProvider),Vs=a.createSelector(e=>e.voiceSettings.error),Hs=a.createSelector(e=>Fe.select(e)?"unavailable":At(e.voiceSettings)),U="intent.voice.inputDevice";let N;function Pt(){if(N!==void 0)return N;try{const e=localStorage.getItem(U);return typeof e=="string"&&e!==""?e:null}catch{return null}}function Ws(e){N=e;try{e===null?localStorage.removeItem(U):localStorage.setItem(U,e)}catch{}}let A=null;function qs(e){A=e}function Bs(){const e=A;return A=null,e}function Tt(){A=null}const It=300,Dt=300;class Ot{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??It,this.doublePressWindowMs=t.doublePressWindowMs??Dt,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let P=null;function js(e){P=e}function Gs(){const e=P;return P=null,e}function xt(){P=null}const Ft=12e4,Lt=["audio/webm;codecs=opus","audio/webm"];function zs(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Ut(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Nt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Lt.find(e=>MediaRecorder.isTypeSupported(e))}class Vt{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Ft,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Ut(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Nt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Ht=300;function Wt(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const qt={stopReason:"manual",autoSend:!1};let p=null,g=null,y=0,E=null;const T=new Ot({onRecordStart:()=>{E&&Bt(E)},onRecordStop:e=>{ne(E,e)}});function Ks(){return p!==null}function Ys(){return p}function $s(e){E=e,y+=1,y===1&&T.keyDown()}function Qs(e){E=e,y!==0&&(y-=1,y===0&&T.keyUp())}function Bt(e){if(p!==null)return;xt(),Tt();const t=new Vt({deviceId:Pt(),onFinished:r=>{p===t&&(p=null);const s=g??{stopReason:"auto-stop",autoSend:!1},i=g!==null;if(g=null,e.dispatch(M()),i||T.reset(),r.durationMs<Ht){s.autoSend&&e.dispatch(L());return}e.dispatch(ke({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{p===t&&(p=null),g=null,e.dispatch(M()),e.showHint(Wt(r)?n.hardwareConsole_ptt_micDenied_message():n.hardwareConsole_ptt_recordingFailed_message())}});p=t,e.dispatch(Ee()),t.start().then(r=>{if(r!=="recording"&&(p===t&&(p=null),r==="discarded")){const s=g?.autoSend===!0;g=null,e.dispatch(M()),s&&e.dispatch(L())}})}function ne(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(L());return}g=t,r.stop()}function Zs(){ne(null,qt)}function Js(e){T.reset(),y=0,g=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(M()))}const jt=H("HardwareConsoleVoiceSetupToast"),Gt="hardware-console-voice-setup";let F=null;function zt(){return F||(F=ye(()=>import("./s1gAk8mT.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url).then(e=>e.notify)),F}function Kt(){Be("/settings?tab=connections#voice").catch(e=>{jt.error("Failed to open voice settings from setup toast",e)})}function Yt(){return{label:n.hardwareConsole_voice_openSettings_label(),onClick:()=>Kt()}}function Xs(){zt().then(e=>{e.error(n.hardwareConsole_voice_noKey_error(),{id:Gt,action:Yt()})})}const ei=a.createSelector(e=>e.externalEditors.selectedAction),$t=a.createSelector(e=>e.externalEditors.editors),Qt=a.createSelector(e=>{const t=S($t.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),i=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...i,...t.filter(({id:c})=>!o.has(c))]}),ti=a.createSelector(e=>e.externalEditors.editorOrder??[]),ri=a.createSelector(e=>e.externalEditors.loading),si=a.createSelector(e=>e.externalEditors.lastFetched),Zt=a.createSelector(e=>e.externalEditors.hiddenEditorIds),ii=a.createSelector((e,t)=>{if(!(t?Le.select(e,t):Ue.select(e)))return[];const s=Zt.select(e);return Qt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function Jt(e){return e.catalogProfiles.some(t=>typeof t.remoteCompatible=="boolean")||e.defaultRemoteIncompatibility||e.profileDefaults.some(t=>typeof t.remoteCompatible=="boolean")?"supported":e.catalogProfiles.length>0?"unsupported":e.profilesLoadStatus==="idle"?"unknown":"unsupported"}function ni(e,t,r){if(W(e)){const s=t.find(i=>i.providerRef===e);return s?.remoteCompatible!==!1?null:s.remoteIncompatibility??{reason:"unknown",keys:[]}}return r?.[e]??null}function ai(e,t){return e.reason==="account-folder"?n.chat_modelPicker_remoteAccountFolder_description({backend:t}):n.chat_modelPicker_remoteIncompatible_description()}const Xt=1440*60*1e3;function oi(e,t){if(!e?.capabilities)return"missing";const r=e.observedAt?Date.parse(e.observedAt):Number.NaN;return Number.isFinite(r)&&t-r>Xt?"stale":"fresh"}const ci=new Set(["cli-missing","prerequisite-missing"]),er=new Set(["signed-out","auth-failed"]);function tr(e){return er.has(e)}function li(e,t){if(W(t))return!1;const r=J(t),s=e?.capabilities?.providers.find(i=>i.id===r);return!!s&&tr(s.status)}const rr=a.createSelector(e=>nt.select(e)&&re.select(e)&&e.remoteMachines?.supported===!0&&e.cloudMachines?.supported===!0),di=a.createSelector(e=>e.cloudMachines?.entries===!0);function ae(e){return Object.values(e.cloudMachines?.providers??{}).sort((t,r)=>t.configuredAt.localeCompare(r.configuredAt)||t.name.localeCompare(r.name))}const ui=a.createSelector(ae),pi=a.createSelector(e=>Object.values(e.cloudMachines?.machines??{}).sort((t,r)=>(t.cloud?.startedAt??"").localeCompare(r.cloud?.startedAt??""))),fi=a.createSelector(e=>e.cloudMachines?.readAt??{}),hi=a.createSelector(e=>e.cloudMachines?.pending??{}),gi=a.createSelector(e=>e.cloudMachines?.failures??{}),mi=a.createSelector(e=>e.cloudMachines?.validated??null);function j(e){if(!rr.select(e))return null;const t=ae(e);if(t.length===0)return null;const r=e.cloudMachines?.entries===!0;return t.map(s=>({cloudMachineId:s.id,label:r&&(t.length>1||s.name.trim().toLowerCase()!=="e2b")?n.cloudMachines_startOn_entry_label({name:s.name}):n.cloudMachines_startOn_label(),unavailableReason:s.state==="key-rejected"?n.cloudMachines_state_keyRejected_label():null}))}function sr(e,t,r=e.cloudMachines?.providers[Ce]??null){if(!t)return null;const s=r,i=J(t);if(s&&s.agentProviders.length>0&&!s.agentProviders.includes(i))return n.cloudMachines_startOn_providerMissing();const o=e.providerSettings?.profiles;if(W(t)){const l=o?S(o.items).find(f=>f.providerRef===t):void 0;return l?l.remoteCompatible===!1?n.cloudMachines_startOn_needsProfile():l.env.some(f=>f.kind==="set")?null:n.cloudMachines_startOn_needsProfile():null}const c=o?.defaults?.[i];return c?c.remoteCompatible===!1?n.cloudMachines_startOn_needsProfile():c.env.some(l=>l.kind==="set")?null:n.cloudMachines_startOn_needsProfile():o?.loadStatus==="success"?n.cloudMachines_startOn_needsProfile():null}const ir={macos:"macOS",linux:"Linux",windows:"Windows"},nr={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function w(e,t){const r=[e&&(ir[e]??e),t&&(nr[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function ar(e){return e?.placement?.target==="remote"||e?.placement?.target==="e2b"}const or=new Set(["running","paused","resuming","pausing","stopping"]);function cr(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&or.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function bi(e,t){if(!e||!ar(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(e.placement?.target==="e2b")return{nodeId:r,name:e.nodeName?.trim()||"E2B",platform:w(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:cr(e,s)}};const i=w(e.placement?.os,e.placement?.arch)??w(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||n.remoteAgent_location_unknownMachine(),platform:i,state:o}}function vi(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||n.remoteAgent_location_unknownMachine(),platform:w(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function oe(e){switch(e){case"starting":return n.cloudMachines_agent_starting();case"running":return n.cloudMachines_agent_running();case"paused":return n.cloudMachines_agent_paused();case"resuming":return n.cloudMachines_agent_resuming();case"pausing":return n.cloudMachines_agent_pausing();case"stopping":return n.cloudMachines_agent_stopping();default:return null}}function Si(e){const t=oe(e.cloud?.state);return t?n.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function _i(e){if(e.cloud){const r=oe(e.cloud.state),s=n.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?n.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?n.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):n.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return n.remoteAgent_location_tooltipWithState({location:t,state:n.remoteMachines_state_unreachable_label()});case"revoked":return n.remoteAgent_location_tooltipWithState({location:t,state:n.remoteMachines_state_revoked_label()});default:return t}}function yi(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function ce(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function lr(e,t){const r=e.detail??"",s=ce(r),i=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(i&&s?.data.reason==="prepared-checkout")return{updateRequired:i,message:n.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=Y(s?.data),c=o??(e.code?Y({code:e.code}):null);return c?{updateRequired:i,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:i,message:s?.message||r}}function wi(e){if(e?.placement?.target!=="e2b"||!e.placementError||e.status!==Me.Error)return null;const t=lr(e.placementError,"");return t.cloud?t:null}const dr=["attachments-too-large-for-machine:","node-prompt-too-large:"],ur="remote-agent-unsupported:";function Q(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function ki(e){const t=ce(e)?.message??e;for(const s of dr){const i=t.indexOf(s);if(i<0)continue;const o=t.slice(i+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?n.remoteAgent_attachmentsTooLargeSized_error({size:Q(Number(c[1])),limit:Q(Number(c[2]))}):o?n.remoteAgent_attachmentsTooLarge_error({detail:o}):n.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(ur);return r>=0&&/attachment/i.test(t.slice(r))?n.remoteAgent_attachmentsUnsupported_error():null}const C="",V="cloud:";function le(e){return`${V}${e}`}function de(e){return e?.startsWith(V)&&e.slice(V.length)||null}function pr(e,t){return e?.find(r=>le(r.cloudMachineId)===t&&r.unavailableReason===null)}const fr=new Set(["connected","disconnected"]);function hr(e){switch(e){case"unreachable":return n.remoteMachines_state_unreachable_label();case"revoked":return n.remoteMachines_state_revoked_label();case"update-required":return n.remoteMachines_state_updateRequired_label();default:return}}function G(e){return fr.has(e.state)}function gr({backendLabel:e,backendPlatform:t,machines:r,cloud:s}){const i=[{id:C,label:e,platform:w(t?.os,t?.arch),disabled:!1},...r.map(o=>{const c=w(o.platform?.os,o.platform?.arch);return G(o)?{id:o.id,label:o.name,platform:c,disabled:!1}:{id:o.id,label:o.name,platform:c,disabled:!0,reason:hr(o.state)}})];for(const o of s??[])i.push({id:le(o.cloudMachineId),label:o.label,platform:null,kind:"cloud",disabled:o.unavailableReason!==null,...o.unavailableReason?{reason:o.unavailableReason}:{hint:n.cloudMachines_startOn_hint()}});return i}function mr({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(G)||(s??[]).some(i=>i.unavailableReason===null))}function br(e,t,r){if(!e)return C;if(de(e))return pr(r,e)?e:C;const s=t.find(i=>i.id===e);return s&&G(s)?s.id:C}function Ei(e,{cloudEntries:t=!1}={}){const r=de(e);return r?t?{target:"e2b",checkout:"isolated",cloudMachineId:r}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Ci({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),i=e.find(c=>c.key===t),o=i?s(i):[];if(r){const c=Re(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(i&&o.length>0)return{providerId:i.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}const vr=a.createSelector(e=>re.select(e)&&e.remoteMachines?.supported===!0),z=a.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Mi=a.createSelector(e=>e.remoteMachines.localFingerprint),Ri=a.createSelector(e=>e.remoteMachines.pending),Ai=a.createSelector(e=>e.remoteMachines.failures),Pi=a.createSelector(e=>e.remoteMachines.executorBackends??[]),Sr=a.createSelector((e,t)=>{if(t===Ae)return n.layout_daemonStatus_localConnection_label();const r=m(e.connections.connections,t);return r?Ge(r):t}),_r=a.createSelector(e=>Sr.select(e,e.connections.windowBackendId)),Ti=a.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Ii=a.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return Jt({catalogProfiles:Ve.select(e,t),defaultRemoteIncompatibility:Ne.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),Di=a.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),ue=a.createSelector(e=>mr({remoteMachinesVisible:vr.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:z.select(e),cloud:j(e)}));function yr(e){const t=m(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const Oi=a.createSelector(e=>ue.select(e)?gr({backendLabel:_r.select(e),backendPlatform:yr(e),machines:z.select(e),cloud:j(e)}):[]),xi=a.createSelector((e,t,r)=>ue.select(e)?br(t,z.select(e),pe(e,r)):C);function pe(e,t){const r=j(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(i=>{if(i.unavailableReason)return i;const o=sr(e,t,s[i.cloudMachineId]??null);return o?{...i,unavailableReason:o}:i})}const Fi=a.createSelector((e,t)=>pe(e,t));function Li(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let wr=0;function kr(e,t){const r=++wr;return a.dispatch(Te(e,t,r)),r}function Ui(e,t,r){a.dispatch(Pe(e,t,r))}async function fe(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await a.dispatch(Ie({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:X.select(a.state)},{...s,intent:s?.intent??kr(e,t)}))).status==="success"}finally{a.dispatch(De(i,o))}}async function Ni(e,t,r,s,i){return fe(e,t,{kind:"effort",effort:r,previous:s},i)}async function Vi(e,t,r,s,i){return fe(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const Er=a.createSelector((e,t)=>S(e.agentModel.mutations).filter(r=>r.consumerId===t)),Hi=a.createSelector((e,t)=>Er.select(e,t).some(r=>r.status==="pending")),Wi=a.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=He.select(e,t),o=ze.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=Ke(c),f=l?Ye(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:l,identity:JSON.stringify([f,i]),connection:X.select(e),canWrite:!!s&&s.workspaceId===r&&!We.select(e,r)}});function Cr(e,t,r=!1){return e!=="auggie"||t===!0||r}const qi=a.createSelector(e=>$e.select(e)?null:q.select(e)),Mr=a.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),h=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Bi=a.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),ji=a.createSelector((e,t)=>!!h.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===Mr.select(e)),he=a.createSelector((e,t)=>t?h.select(e,t)?.catalog.providers??[]:qe.select(e)),ge=a.createSelector((e,t)=>{if(!t)return ee.select(e);const r=h.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),K=a.createSelector((e,t)=>{if(!t)return Qe.select(e);const r=h.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),me=a.createSelector((e,t)=>{if(!t)return Ze.select(e);const r=K.select(e,t),s=ge.select(e,t),i=h.select(e,t)?.readiness??{};return he.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available&&(o.id!=="antigravity"||te(o.id,i[o.id]?.authenticated))).map(o=>o.id)}),Gi=a.createSelector((e,t)=>{const r=K.select(e,t),s=t?h.select(e,t)?.readiness??{}:q.select(e);return he.select(e,t).filter(i=>Cr(i.id,s[i.id]?.available,r[i.id]===!0)).map(i=>i.id)}),zi=a.createSelector((e,t)=>t?me.select(e,t):Je.select(e)),Ki=a.createSelector((e,t)=>b.select(e,t)),Yi=a.createSelector((e,t)=>t?!!h.select(e,t):Xe.select(e)),$i=a.createSelector((e,t)=>{if(!t)return et.select(e);const r=h.select(e,t)?.settings??[],s=ge.select(e,t),i=r.find(l=>l.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),Qi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):tt.select(e)),Zi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):rt.select(e)),Ji=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):st.select(e)),Xi=a.createSelector((e,t,r)=>{if(!r)return it.select(e,t);const s=K.select(e,r),i=h.select(e,r);return me.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&te(o,i?.readiness[o]?.authenticated))}),en=a.createSelector((e,t)=>t?h.select(e,t)?.readiness??{}:q.select(e)),Rr={},tn=a.createSelector(e=>e.providerSettings?.profiles?.status??Rr),rn=a.createSelector(e=>e.directoryPicker.listing),sn=a.createSelector(e=>e.directoryPicker.loading),nn=a.createSelector(e=>e.directoryPicker.error),an=a.createSelector(e=>e.directoryPicker.pathError),on=a.createSelector(e=>e.directoryPicker.createError),Z={},Ar=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),cn=a.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),ln=a.createSelector(e=>e.mcpSettings.loading),dn=a.createSelector(e=>e.mcpSettings.error),un=a.createSelector(e=>e.mcpSettings.mutationError??null),pn=a.createSelector(e=>e.mcpSettings.enabled),Pr=a.createSelector(e=>e.mcpSettings.disabledServers),Tr=a.createSelector(e=>e.mcpSettings.statusMap),Ir=a.createSelector(e=>e.mcpSettings.toolsMap),Dr=a.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,k(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),Or=a.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??Z:Z),fn=a.createSelector((e,t)=>Object.keys(Or.select(e,t))),hn=a.createSelector(e=>{const t=Ar.select(e),r=Tr.select(e),s=Ir.select(e),i=Pr.select(e),o=Dr.select(e);return t.map(c=>{const l=k(c)in i,f=s[k(c)]||[];let _=r[k(c)]||"disconnected";return l&&(_="disabled"),{...c,disabled:l,status:_,tools:f,toolCount:f.length,errorMessage:o[k(c)]}})});a.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const gn=a.createSelector(e=>e.mcpSettings.lastImportedCount),mn=a.createSelector(e=>e.mcpSettings.advancedSaveStatus),bn=a.createSelector(e=>e.mcpSettings.advancedSaveError),vn=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],xr=[{path:"agentFeatures.backgroundHooks",label:()=>n.settings_agentFeatures_backgroundHooks_label(),description:()=>n.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>n.settings_agentFeatures_hostExec_label(),description:()=>n.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>n.settings_agentFeatures_scripts_label(),description:()=>n.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>n.settings_agentFeatures_terminalAccess_label(),description:()=>n.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>n.settings_agentFeatures_browserAutomation_label(),description:()=>n.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>n.settings_agentFeatures_desktopControl_label(),description:()=>n.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>n.settings_agentFeatures_richChatBlocks_label(),description:()=>n.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>n.settings_agentFeatures_structuredQuestions_label(),description:()=>n.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>n.settings_agentFeatures_secretRequests_label(),description:()=>n.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>n.settings_agentFeatures_attentionRequests_label(),description:()=>n.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>n.settings_agentFeatures_stateSnapshot_label(),description:()=>n.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>n.settings_agentFeatures_prMonitor_label(),description:()=>n.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>n.settings_agentFeatures_taskGraph_label(),description:()=>n.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>n.settings_agentFeatures_peerAgents_label(),description:()=>n.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>n.settings_agentFeatures_mcpTools_label(),description:()=>n.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],Sn=Object.fromEntries(xr.map(e=>[e.path,e.defaultValue]));export{Ws as $,Cr as A,Ks as B,Li as C,Xr as D,$ as E,xr as F,ie as G,li as H,zs as I,Pt as J,vi as K,Ci as L,ci as M,w as N,oi as O,kr as P,bt as Q,lr as R,v as S,Vi as T,Ui as U,ki as V,ni as W,ai as X,At as Y,br as Z,$r as _,Sn as a,ms as a$,Hi as a0,Er as a1,Wi as a2,ts as a3,as as a4,ui as a5,di as a6,gi as a7,rr as a8,hi as a9,an as aA,ti as aB,gs as aC,ys as aD,ps as aE,xi as aF,Hs as aG,Pi as aH,fs as aI,hs as aJ,rs as aK,ns as aL,B as aM,ot as aN,ft as aO,ht as aP,se as aQ,pt as aR,ct as aS,at as aT,dt as aU,ut as aV,vs as aW,Zt as aX,Qt as aY,ii as aZ,ri as a_,fi as aa,pi as ab,mi as ac,Sr as ad,zi as ae,ge as af,K as ag,Gi as ah,me as ai,he as aj,Zi as ak,Ji as al,Qi as am,Xi as an,en as ao,Yi as ap,$i as aq,Ki as ar,_r as as,is as at,Di as au,cs as av,on as aw,nn as ax,rn as ay,sn as az,vn as b,de as b$,bs as b0,si as b1,Mi as b2,bn as b3,mn as b4,Pr as b5,pn as b6,dn as b7,Dr as b8,gn as b9,Oi as bA,ue as bB,ss as bC,Ns as bD,Ps as bE,Ls as bF,Us as bG,Is as bH,xs as bI,Os as bJ,Ts as bK,As as bL,Rs as bM,Vs as bN,Ms as bO,Ds as bP,Fs as bQ,h as bR,Mr as bS,ji as bT,Bi as bU,fn as bV,cn as bW,qs as bX,js as bY,Xs as bZ,le as b_,ln as ba,un as bb,Ar as bc,hn as bd,Tr as be,Ir as bf,ei as bg,ds as bh,tn as bi,Ti as bj,Ai as bk,Ri as bl,z as bm,vr as bn,Ii as bo,qi as bp,Et as bq,ks as br,Es as bs,_s as bt,ws as bu,us as bv,Ss as bw,b as bx,os as by,Fi as bz,C as c,Bt as c0,Zs as c1,Qr as c2,Yr as c3,Zr as c4,Kr as c5,Yt as c6,Gr as c7,wi as d,Si as e,bi as f,_i as g,yi as h,Ni as i,Js as j,Tt as k,xt as l,Bs as m,Gs as n,ls as o,kt as p,wt as q,Ys as r,Jr as s,Cs as t,es as u,zr as v,$s as w,Qs as x,Ei as y,Rt as z};
|
|
422
|
+
Keep ordinary recommendations to supported features ready for users. Discuss an experiment honestly and label its status only when explicitly asked or when the user is developing or testing it.`,roleReminder:"You are the built-in Assistant. Help with app tasks using ws.app.* and current app guidance. Keep changes reviewable through proposal or confirmation cards, with cards last. Show workspaces as live cards; never use a workspace ID slug as a label. Use the discovered canonical route including its hash fragment. End the turn after registering an agent completion watch; on completion, link the returned assistant reply using its exact message ID."}],ie=new Set(["pr-reviewer"]),Xr="developer";function es(e){return v.find(t=>t.id===e)}function u(e){return e??""}function _t(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>u(i.provider)===u(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&u(i.reasoningEffort)===u(s[o].reasoningEffort))}function $(e,t,r){if(e.source!=="user"||!r?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const s=t.find(i=>i.id===e.id)??v.find(i=>i.id===e.id);return s?u(e.name)===u(s.name)&&u(e.description)===u(s.description)&&u(e.behaviorPrompt)===u(s.defaultBehaviorPrompt)&&u(e.roleReminder)===u(s.roleReminder)&&u(e.reasoningEffort)===u(s.reasoningEffort)&&_t(e.modelOptions,s.modelOptions):!1}const ts=a.createSelector(e=>e.specialists.bundledSpecialists),yt=a.createSelector(e=>e.specialists.fileSpecialists),rs=a.createSelector(e=>S(yt.select(e))),ss=a.createSelector(e=>e.specialists.userOverrides);a.createSelector(e=>e.specialists.overridesLoaded);const is=a.createSelector(e=>e.specialists.customSpecialistsLoaded),ns=a.createSelector(e=>e.specialists.fileSpecialistsLoaded),as=a.createSelector(e=>e.specialists.bundledSpecialistsLoaded),os=a.createSelector(e=>e.specialists.specialistsFolderPath),cs=a.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});a.createSelector(e=>e.specialists.providerModelOverrides);const x=a.createSelector((e,t)=>!(ie.has(t)&&!se.select(e)));function wt(e,t){return t?e:e.filter(r=>!ie.has(r.id))}function kt(e,t){return wt(e,t).filter(r=>!r.hidden)}function ls(e,t){return kt(e,t).filter(r=>r.role!=="internal")}const b=a.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=S(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const l of r)!i.has(l.id)&&x.select(e,l.id)&&(i.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!i.has(l.id)&&x.select(e,l.id)&&(i.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of v)!i.has(l.id)&&x.select(e,l.id)&&(i.add(l.id),o.push(l));const c=new Map;for(const l of v)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,f)=>{const _=c.has(l.id),I=c.has(f.id);return _&&I?(c.get(l.id)??0)-(c.get(f.id)??0):_&&!I?-1:!_&&I?1:l.name.localeCompare(f.name)}),o}),ds=a.createSelector(e=>{const t=b.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...v.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),Et=a.createSelector((e,t)=>{const r=m(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&S(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=v.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),us=a.createSelector((e,t)=>Et.select(e,t)?.name??null),ps=a.createSelector((e,t,r)=>{const i=b.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),fs=a.createSelector((e,t,r)=>b.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),hs=a.createSelector((e,t,r)=>b.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),gs=a.createSelector((e,t,r)=>{const i=b.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function R(e,t){return t.some(r=>r.id===e)||v.some(r=>r.id===e)}const ms=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&R(t,e.specialists.bundledSpecialists)}return R(t,e.specialists.bundledSpecialists)}),bs=a.createSelector((e,t,r)=>r?!!B.select(e,t,r):!!m(e.specialists.fileSpecialists,t)),vs=a.createSelector((e,t,r)=>{if(r){const o=B.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:R(t,e.specialists.bundledSpecialists)&&!$(o,e.specialists.bundledSpecialists)}if(!R(t,e.specialists.bundledSpecialists))return!1;const i=m(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!$(i,e.specialists.bundledSpecialists)}),B=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return m(e.specialists.fileSpecialists,t)}),Ss=a.createSelector((e,t,r)=>{const s=B.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),_s=a.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=m(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),ys=a.createSelector((e,t,r)=>{if(r){const i=b.select(e,r).find(l=>l.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Oe.select(e,o,r);const c=xe.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=m(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:Ct.select(e,t)}),Ct=a.createSelector((e,t)=>{const s=b.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:je.select(e)?ee.select(e):""}),ws=a.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?S(r):[]}),ks=a.createSelector((e,t)=>e.specialists.creationByContext?.[t]??we),Es=a.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),Mt=["idle","exited"];function Rt(e){return e===void 0||!Mt.includes(e)}function Cs(e){return e.status==="restarting"?"restarting":Rt(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function At(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const Ms=a.createSelector(e=>e.voiceSettings.isLoading),Rs=a.createSelector(e=>e.voiceSettings.available),As=a.createSelector(e=>e.voiceSettings.provider),Ps=a.createSelector(e=>e.voiceSettings.engine),Ts=a.createSelector(e=>e.voiceSettings.osEngineAvailable),Is=a.createSelector(e=>e.voiceSettings.keyConfigured),Ds=a.createSelector(e=>e.voiceSettings.vocabulary),Os=a.createSelector(e=>e.voiceSettings.openaiModel),xs=a.createSelector(e=>e.voiceSettings.language),Fs=a.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),Ls=a.createSelector(e=>e.voiceSettings.inputDeviceId),Us=a.createSelector(e=>e.voiceSettings.inputDevices),Ns=a.createSelector(e=>e.voiceSettings.busyProvider),Vs=a.createSelector(e=>e.voiceSettings.error),Hs=a.createSelector(e=>Fe.select(e)?"unavailable":At(e.voiceSettings)),U="intent.voice.inputDevice";let N;function Pt(){if(N!==void 0)return N;try{const e=localStorage.getItem(U);return typeof e=="string"&&e!==""?e:null}catch{return null}}function Ws(e){N=e;try{e===null?localStorage.removeItem(U):localStorage.setItem(U,e)}catch{}}let A=null;function qs(e){A=e}function Bs(){const e=A;return A=null,e}function Tt(){A=null}const It=300,Dt=300;class Ot{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??It,this.doublePressWindowMs=t.doublePressWindowMs??Dt,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let P=null;function js(e){P=e}function Gs(){const e=P;return P=null,e}function xt(){P=null}const Ft=12e4,Lt=["audio/webm;codecs=opus","audio/webm"];function zs(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Ut(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Nt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Lt.find(e=>MediaRecorder.isTypeSupported(e))}class Vt{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Ft,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Ut(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Nt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Ht=300;function Wt(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const qt={stopReason:"manual",autoSend:!1};let p=null,g=null,y=0,E=null;const T=new Ot({onRecordStart:()=>{E&&Bt(E)},onRecordStop:e=>{ne(E,e)}});function Ks(){return p!==null}function Ys(){return p}function $s(e){E=e,y+=1,y===1&&T.keyDown()}function Qs(e){E=e,y!==0&&(y-=1,y===0&&T.keyUp())}function Bt(e){if(p!==null)return;xt(),Tt();const t=new Vt({deviceId:Pt(),onFinished:r=>{p===t&&(p=null);const s=g??{stopReason:"auto-stop",autoSend:!1},i=g!==null;if(g=null,e.dispatch(M()),i||T.reset(),r.durationMs<Ht){s.autoSend&&e.dispatch(L());return}e.dispatch(ke({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{p===t&&(p=null),g=null,e.dispatch(M()),e.showHint(Wt(r)?n.hardwareConsole_ptt_micDenied_message():n.hardwareConsole_ptt_recordingFailed_message())}});p=t,e.dispatch(Ee()),t.start().then(r=>{if(r!=="recording"&&(p===t&&(p=null),r==="discarded")){const s=g?.autoSend===!0;g=null,e.dispatch(M()),s&&e.dispatch(L())}})}function ne(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(L());return}g=t,r.stop()}function Zs(){ne(null,qt)}function Js(e){T.reset(),y=0,g=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(M()))}const jt=H("HardwareConsoleVoiceSetupToast"),Gt="hardware-console-voice-setup";let F=null;function zt(){return F||(F=ye(()=>import("./CBYPZH-W.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url).then(e=>e.notify)),F}function Kt(){Be("/settings?tab=connections#voice").catch(e=>{jt.error("Failed to open voice settings from setup toast",e)})}function Yt(){return{label:n.hardwareConsole_voice_openSettings_label(),onClick:()=>Kt()}}function Xs(){zt().then(e=>{e.error(n.hardwareConsole_voice_noKey_error(),{id:Gt,action:Yt()})})}const ei=a.createSelector(e=>e.externalEditors.selectedAction),$t=a.createSelector(e=>e.externalEditors.editors),Qt=a.createSelector(e=>{const t=S($t.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),i=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...i,...t.filter(({id:c})=>!o.has(c))]}),ti=a.createSelector(e=>e.externalEditors.editorOrder??[]),ri=a.createSelector(e=>e.externalEditors.loading),si=a.createSelector(e=>e.externalEditors.lastFetched),Zt=a.createSelector(e=>e.externalEditors.hiddenEditorIds),ii=a.createSelector((e,t)=>{if(!(t?Le.select(e,t):Ue.select(e)))return[];const s=Zt.select(e);return Qt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function Jt(e){return e.catalogProfiles.some(t=>typeof t.remoteCompatible=="boolean")||e.defaultRemoteIncompatibility||e.profileDefaults.some(t=>typeof t.remoteCompatible=="boolean")?"supported":e.catalogProfiles.length>0?"unsupported":e.profilesLoadStatus==="idle"?"unknown":"unsupported"}function ni(e,t,r){if(W(e)){const s=t.find(i=>i.providerRef===e);return s?.remoteCompatible!==!1?null:s.remoteIncompatibility??{reason:"unknown",keys:[]}}return r?.[e]??null}function ai(e,t){return e.reason==="account-folder"?n.chat_modelPicker_remoteAccountFolder_description({backend:t}):n.chat_modelPicker_remoteIncompatible_description()}const Xt=1440*60*1e3;function oi(e,t){if(!e?.capabilities)return"missing";const r=e.observedAt?Date.parse(e.observedAt):Number.NaN;return Number.isFinite(r)&&t-r>Xt?"stale":"fresh"}const ci=new Set(["cli-missing","prerequisite-missing"]),er=new Set(["signed-out","auth-failed"]);function tr(e){return er.has(e)}function li(e,t){if(W(t))return!1;const r=J(t),s=e?.capabilities?.providers.find(i=>i.id===r);return!!s&&tr(s.status)}const rr=a.createSelector(e=>nt.select(e)&&re.select(e)&&e.remoteMachines?.supported===!0&&e.cloudMachines?.supported===!0),di=a.createSelector(e=>e.cloudMachines?.entries===!0);function ae(e){return Object.values(e.cloudMachines?.providers??{}).sort((t,r)=>t.configuredAt.localeCompare(r.configuredAt)||t.name.localeCompare(r.name))}const ui=a.createSelector(ae),pi=a.createSelector(e=>Object.values(e.cloudMachines?.machines??{}).sort((t,r)=>(t.cloud?.startedAt??"").localeCompare(r.cloud?.startedAt??""))),fi=a.createSelector(e=>e.cloudMachines?.readAt??{}),hi=a.createSelector(e=>e.cloudMachines?.pending??{}),gi=a.createSelector(e=>e.cloudMachines?.failures??{}),mi=a.createSelector(e=>e.cloudMachines?.validated??null);function j(e){if(!rr.select(e))return null;const t=ae(e);if(t.length===0)return null;const r=e.cloudMachines?.entries===!0;return t.map(s=>({cloudMachineId:s.id,label:r&&(t.length>1||s.name.trim().toLowerCase()!=="e2b")?n.cloudMachines_startOn_entry_label({name:s.name}):n.cloudMachines_startOn_label(),unavailableReason:s.state==="key-rejected"?n.cloudMachines_state_keyRejected_label():null}))}function sr(e,t,r=e.cloudMachines?.providers[Ce]??null){if(!t)return null;const s=r,i=J(t);if(s&&s.agentProviders.length>0&&!s.agentProviders.includes(i))return n.cloudMachines_startOn_providerMissing();const o=e.providerSettings?.profiles;if(W(t)){const l=o?S(o.items).find(f=>f.providerRef===t):void 0;return l?l.remoteCompatible===!1?n.cloudMachines_startOn_needsProfile():l.env.some(f=>f.kind==="set")?null:n.cloudMachines_startOn_needsProfile():null}const c=o?.defaults?.[i];return c?c.remoteCompatible===!1?n.cloudMachines_startOn_needsProfile():c.env.some(l=>l.kind==="set")?null:n.cloudMachines_startOn_needsProfile():o?.loadStatus==="success"?n.cloudMachines_startOn_needsProfile():null}const ir={macos:"macOS",linux:"Linux",windows:"Windows"},nr={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function w(e,t){const r=[e&&(ir[e]??e),t&&(nr[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function ar(e){return e?.placement?.target==="remote"||e?.placement?.target==="e2b"}const or=new Set(["running","paused","resuming","pausing","stopping"]);function cr(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&or.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function bi(e,t){if(!e||!ar(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(e.placement?.target==="e2b")return{nodeId:r,name:e.nodeName?.trim()||"E2B",platform:w(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:cr(e,s)}};const i=w(e.placement?.os,e.placement?.arch)??w(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||n.remoteAgent_location_unknownMachine(),platform:i,state:o}}function vi(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||n.remoteAgent_location_unknownMachine(),platform:w(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function oe(e){switch(e){case"starting":return n.cloudMachines_agent_starting();case"running":return n.cloudMachines_agent_running();case"paused":return n.cloudMachines_agent_paused();case"resuming":return n.cloudMachines_agent_resuming();case"pausing":return n.cloudMachines_agent_pausing();case"stopping":return n.cloudMachines_agent_stopping();default:return null}}function Si(e){const t=oe(e.cloud?.state);return t?n.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function _i(e){if(e.cloud){const r=oe(e.cloud.state),s=n.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?n.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?n.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):n.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return n.remoteAgent_location_tooltipWithState({location:t,state:n.remoteMachines_state_unreachable_label()});case"revoked":return n.remoteAgent_location_tooltipWithState({location:t,state:n.remoteMachines_state_revoked_label()});default:return t}}function yi(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function ce(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function lr(e,t){const r=e.detail??"",s=ce(r),i=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(i&&s?.data.reason==="prepared-checkout")return{updateRequired:i,message:n.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=Y(s?.data),c=o??(e.code?Y({code:e.code}):null);return c?{updateRequired:i,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:i,message:s?.message||r}}function wi(e){if(e?.placement?.target!=="e2b"||!e.placementError||e.status!==Me.Error)return null;const t=lr(e.placementError,"");return t.cloud?t:null}const dr=["attachments-too-large-for-machine:","node-prompt-too-large:"],ur="remote-agent-unsupported:";function Q(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function ki(e){const t=ce(e)?.message??e;for(const s of dr){const i=t.indexOf(s);if(i<0)continue;const o=t.slice(i+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?n.remoteAgent_attachmentsTooLargeSized_error({size:Q(Number(c[1])),limit:Q(Number(c[2]))}):o?n.remoteAgent_attachmentsTooLarge_error({detail:o}):n.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(ur);return r>=0&&/attachment/i.test(t.slice(r))?n.remoteAgent_attachmentsUnsupported_error():null}const C="",V="cloud:";function le(e){return`${V}${e}`}function de(e){return e?.startsWith(V)&&e.slice(V.length)||null}function pr(e,t){return e?.find(r=>le(r.cloudMachineId)===t&&r.unavailableReason===null)}const fr=new Set(["connected","disconnected"]);function hr(e){switch(e){case"unreachable":return n.remoteMachines_state_unreachable_label();case"revoked":return n.remoteMachines_state_revoked_label();case"update-required":return n.remoteMachines_state_updateRequired_label();default:return}}function G(e){return fr.has(e.state)}function gr({backendLabel:e,backendPlatform:t,machines:r,cloud:s}){const i=[{id:C,label:e,platform:w(t?.os,t?.arch),disabled:!1},...r.map(o=>{const c=w(o.platform?.os,o.platform?.arch);return G(o)?{id:o.id,label:o.name,platform:c,disabled:!1}:{id:o.id,label:o.name,platform:c,disabled:!0,reason:hr(o.state)}})];for(const o of s??[])i.push({id:le(o.cloudMachineId),label:o.label,platform:null,kind:"cloud",disabled:o.unavailableReason!==null,...o.unavailableReason?{reason:o.unavailableReason}:{hint:n.cloudMachines_startOn_hint()}});return i}function mr({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(G)||(s??[]).some(i=>i.unavailableReason===null))}function br(e,t,r){if(!e)return C;if(de(e))return pr(r,e)?e:C;const s=t.find(i=>i.id===e);return s&&G(s)?s.id:C}function Ei(e,{cloudEntries:t=!1}={}){const r=de(e);return r?t?{target:"e2b",checkout:"isolated",cloudMachineId:r}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Ci({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),i=e.find(c=>c.key===t),o=i?s(i):[];if(r){const c=Re(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(i&&o.length>0)return{providerId:i.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}const vr=a.createSelector(e=>re.select(e)&&e.remoteMachines?.supported===!0),z=a.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Mi=a.createSelector(e=>e.remoteMachines.localFingerprint),Ri=a.createSelector(e=>e.remoteMachines.pending),Ai=a.createSelector(e=>e.remoteMachines.failures),Pi=a.createSelector(e=>e.remoteMachines.executorBackends??[]),Sr=a.createSelector((e,t)=>{if(t===Ae)return n.layout_daemonStatus_localConnection_label();const r=m(e.connections.connections,t);return r?Ge(r):t}),_r=a.createSelector(e=>Sr.select(e,e.connections.windowBackendId)),Ti=a.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Ii=a.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return Jt({catalogProfiles:Ve.select(e,t),defaultRemoteIncompatibility:Ne.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),Di=a.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),ue=a.createSelector(e=>mr({remoteMachinesVisible:vr.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:z.select(e),cloud:j(e)}));function yr(e){const t=m(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const Oi=a.createSelector(e=>ue.select(e)?gr({backendLabel:_r.select(e),backendPlatform:yr(e),machines:z.select(e),cloud:j(e)}):[]),xi=a.createSelector((e,t,r)=>ue.select(e)?br(t,z.select(e),pe(e,r)):C);function pe(e,t){const r=j(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(i=>{if(i.unavailableReason)return i;const o=sr(e,t,s[i.cloudMachineId]??null);return o?{...i,unavailableReason:o}:i})}const Fi=a.createSelector((e,t)=>pe(e,t));function Li(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let wr=0;function kr(e,t){const r=++wr;return a.dispatch(Te(e,t,r)),r}function Ui(e,t,r){a.dispatch(Pe(e,t,r))}async function fe(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await a.dispatch(Ie({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:X.select(a.state)},{...s,intent:s?.intent??kr(e,t)}))).status==="success"}finally{a.dispatch(De(i,o))}}async function Ni(e,t,r,s,i){return fe(e,t,{kind:"effort",effort:r,previous:s},i)}async function Vi(e,t,r,s,i){return fe(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const Er=a.createSelector((e,t)=>S(e.agentModel.mutations).filter(r=>r.consumerId===t)),Hi=a.createSelector((e,t)=>Er.select(e,t).some(r=>r.status==="pending")),Wi=a.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=He.select(e,t),o=ze.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=Ke(c),f=l?Ye(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:l,identity:JSON.stringify([f,i]),connection:X.select(e),canWrite:!!s&&s.workspaceId===r&&!We.select(e,r)}});function Cr(e,t,r=!1){return e!=="auggie"||t===!0||r}const qi=a.createSelector(e=>$e.select(e)?null:q.select(e)),Mr=a.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),h=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Bi=a.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),ji=a.createSelector((e,t)=>!!h.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===Mr.select(e)),he=a.createSelector((e,t)=>t?h.select(e,t)?.catalog.providers??[]:qe.select(e)),ge=a.createSelector((e,t)=>{if(!t)return ee.select(e);const r=h.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),K=a.createSelector((e,t)=>{if(!t)return Qe.select(e);const r=h.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),me=a.createSelector((e,t)=>{if(!t)return Ze.select(e);const r=K.select(e,t),s=ge.select(e,t),i=h.select(e,t)?.readiness??{};return he.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available&&(o.id!=="antigravity"||te(o.id,i[o.id]?.authenticated))).map(o=>o.id)}),Gi=a.createSelector((e,t)=>{const r=K.select(e,t),s=t?h.select(e,t)?.readiness??{}:q.select(e);return he.select(e,t).filter(i=>Cr(i.id,s[i.id]?.available,r[i.id]===!0)).map(i=>i.id)}),zi=a.createSelector((e,t)=>t?me.select(e,t):Je.select(e)),Ki=a.createSelector((e,t)=>b.select(e,t)),Yi=a.createSelector((e,t)=>t?!!h.select(e,t):Xe.select(e)),$i=a.createSelector((e,t)=>{if(!t)return et.select(e);const r=h.select(e,t)?.settings??[],s=ge.select(e,t),i=r.find(l=>l.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),Qi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):tt.select(e)),Zi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):rt.select(e)),Ji=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):st.select(e)),Xi=a.createSelector((e,t,r)=>{if(!r)return it.select(e,t);const s=K.select(e,r),i=h.select(e,r);return me.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&te(o,i?.readiness[o]?.authenticated))}),en=a.createSelector((e,t)=>t?h.select(e,t)?.readiness??{}:q.select(e)),Rr={},tn=a.createSelector(e=>e.providerSettings?.profiles?.status??Rr),rn=a.createSelector(e=>e.directoryPicker.listing),sn=a.createSelector(e=>e.directoryPicker.loading),nn=a.createSelector(e=>e.directoryPicker.error),an=a.createSelector(e=>e.directoryPicker.pathError),on=a.createSelector(e=>e.directoryPicker.createError),Z={},Ar=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),cn=a.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),ln=a.createSelector(e=>e.mcpSettings.loading),dn=a.createSelector(e=>e.mcpSettings.error),un=a.createSelector(e=>e.mcpSettings.mutationError??null),pn=a.createSelector(e=>e.mcpSettings.enabled),Pr=a.createSelector(e=>e.mcpSettings.disabledServers),Tr=a.createSelector(e=>e.mcpSettings.statusMap),Ir=a.createSelector(e=>e.mcpSettings.toolsMap),Dr=a.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,k(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),Or=a.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??Z:Z),fn=a.createSelector((e,t)=>Object.keys(Or.select(e,t))),hn=a.createSelector(e=>{const t=Ar.select(e),r=Tr.select(e),s=Ir.select(e),i=Pr.select(e),o=Dr.select(e);return t.map(c=>{const l=k(c)in i,f=s[k(c)]||[];let _=r[k(c)]||"disconnected";return l&&(_="disabled"),{...c,disabled:l,status:_,tools:f,toolCount:f.length,errorMessage:o[k(c)]}})});a.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const gn=a.createSelector(e=>e.mcpSettings.lastImportedCount),mn=a.createSelector(e=>e.mcpSettings.advancedSaveStatus),bn=a.createSelector(e=>e.mcpSettings.advancedSaveError),vn=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],xr=[{path:"agentFeatures.backgroundHooks",label:()=>n.settings_agentFeatures_backgroundHooks_label(),description:()=>n.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>n.settings_agentFeatures_hostExec_label(),description:()=>n.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>n.settings_agentFeatures_scripts_label(),description:()=>n.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>n.settings_agentFeatures_terminalAccess_label(),description:()=>n.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>n.settings_agentFeatures_browserAutomation_label(),description:()=>n.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>n.settings_agentFeatures_desktopControl_label(),description:()=>n.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>n.settings_agentFeatures_richChatBlocks_label(),description:()=>n.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>n.settings_agentFeatures_structuredQuestions_label(),description:()=>n.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>n.settings_agentFeatures_secretRequests_label(),description:()=>n.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>n.settings_agentFeatures_attentionRequests_label(),description:()=>n.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>n.settings_agentFeatures_stateSnapshot_label(),description:()=>n.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>n.settings_agentFeatures_prMonitor_label(),description:()=>n.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>n.settings_agentFeatures_taskGraph_label(),description:()=>n.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>n.settings_agentFeatures_peerAgents_label(),description:()=>n.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>n.settings_agentFeatures_mcpTools_label(),description:()=>n.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],Sn=Object.fromEntries(xr.map(e=>[e.path,e.defaultValue]));export{Ws as $,Cr as A,Ks as B,Li as C,Xr as D,$ as E,xr as F,ie as G,li as H,zs as I,Pt as J,vi as K,Ci as L,ci as M,w as N,oi as O,kr as P,bt as Q,lr as R,v as S,Vi as T,Ui as U,ki as V,ni as W,ai as X,At as Y,br as Z,$r as _,Sn as a,ms as a$,Hi as a0,Er as a1,Wi as a2,ts as a3,as as a4,ui as a5,di as a6,gi as a7,rr as a8,hi as a9,an as aA,ti as aB,gs as aC,ys as aD,ps as aE,xi as aF,Hs as aG,Pi as aH,fs as aI,hs as aJ,rs as aK,ns as aL,B as aM,ot as aN,ft as aO,ht as aP,se as aQ,pt as aR,ct as aS,at as aT,dt as aU,ut as aV,vs as aW,Zt as aX,Qt as aY,ii as aZ,ri as a_,fi as aa,pi as ab,mi as ac,Sr as ad,zi as ae,ge as af,K as ag,Gi as ah,me as ai,he as aj,Zi as ak,Ji as al,Qi as am,Xi as an,en as ao,Yi as ap,$i as aq,Ki as ar,_r as as,is as at,Di as au,cs as av,on as aw,nn as ax,rn as ay,sn as az,vn as b,de as b$,bs as b0,si as b1,Mi as b2,bn as b3,mn as b4,Pr as b5,pn as b6,dn as b7,Dr as b8,gn as b9,Oi as bA,ue as bB,ss as bC,Ns as bD,Ps as bE,Ls as bF,Us as bG,Is as bH,xs as bI,Os as bJ,Ts as bK,As as bL,Rs as bM,Vs as bN,Ms as bO,Ds as bP,Fs as bQ,h as bR,Mr as bS,ji as bT,Bi as bU,fn as bV,cn as bW,qs as bX,js as bY,Xs as bZ,le as b_,ln as ba,un as bb,Ar as bc,hn as bd,Tr as be,Ir as bf,ei as bg,ds as bh,tn as bi,Ti as bj,Ai as bk,Ri as bl,z as bm,vr as bn,Ii as bo,qi as bp,Et as bq,ks as br,Es as bs,_s as bt,ws as bu,us as bv,Ss as bw,b as bx,os as by,Fi as bz,C as c,Bt as c0,Zs as c1,Qr as c2,Yr as c3,Zr as c4,Kr as c5,Yt as c6,Gr as c7,wi as d,Si as e,bi as f,_i as g,yi as h,Ni as i,Js as j,Tt as k,xt as l,Bs as m,Gs as n,ls as o,kt as p,wt as q,Ys as r,Jr as s,Cs as t,es as u,zr as v,$s as w,Qs as x,Ei as y,Rt as z};
|