@intent-hq/web 2.286.0 → 2.286.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/intent-web.mjs +11 -2
- package/package.json +1 -1
- package/web/app/immutable/assets/0.B2ssLqMh.css +1 -0
- package/web/app/immutable/chunks/{Dtkr3IzA.js → -C2IRcJ4.js} +1 -1
- package/web/app/immutable/chunks/{DI0TMqPc.js → -bBOxk3W.js} +1 -1
- package/web/app/immutable/chunks/{7af0JAJg.js → -f5HsMRH.js} +1 -1
- package/web/app/immutable/chunks/{BPTrqAAS.js → -lPRd7v2.js} +1 -1
- package/web/app/immutable/chunks/{C1KS3a3w.js → 2jTJ7ui5.js} +1 -1
- package/web/app/immutable/chunks/{Dh5f48wP.js → 2qd-rLGS.js} +1 -1
- package/web/app/immutable/chunks/{DjctxIWk.js → 5KQTpdV3.js} +1 -1
- package/web/app/immutable/chunks/{OXZoGb0R.js → 7yhhL_Kv.js} +2 -2
- package/web/app/immutable/chunks/{CSJZS0lA.js → 8GVegoKX.js} +1 -1
- package/web/app/immutable/chunks/{C9AXCraB.js → 8RNmk_9I.js} +6 -6
- package/web/app/immutable/chunks/{D2B7k8JK.js → 8wBQgcHV.js} +1 -1
- package/web/app/immutable/chunks/{C8rZ--zU.js → 9N2fNktT.js} +1 -1
- package/web/app/immutable/chunks/{C1cHuYQR.js → 9s3D9jIu.js} +1 -1
- package/web/app/immutable/chunks/{DvxGhfNP.js → A1I58Dap.js} +1 -1
- package/web/app/immutable/chunks/{CmGMJu5O.js → B-RiR-3W.js} +1 -1
- package/web/app/immutable/chunks/{DAr_Dvla.js → B1W2g1fL.js} +1 -1
- package/web/app/immutable/chunks/{BqwrnPhf.js → B1pmGVIx.js} +1 -1
- package/web/app/immutable/chunks/{B6gQoWXg.js → B2fuxI_8.js} +1 -1
- package/web/app/immutable/chunks/{B7DKu6qV.js → B2xxVCZM.js} +1 -1
- package/web/app/immutable/chunks/{56xQ7UwB.js → B3kscBFg.js} +6 -6
- package/web/app/immutable/chunks/{BiD1HX8_.js → B5Gxq3jJ.js} +1 -1
- package/web/app/immutable/chunks/{CkrCogn1.js → BCJ6mCcP.js} +1 -1
- package/web/app/immutable/chunks/{C-WAMDJQ.js → BCK268oV.js} +1 -1
- package/web/app/immutable/chunks/{CJmb8k0H.js → BCyLWzW8.js} +1 -1
- package/web/app/immutable/chunks/{dYWp2umn.js → BIH7Omo4.js} +4 -4
- package/web/app/immutable/chunks/{BG0oLquu.js → BILk4fAN.js} +1 -1
- package/web/app/immutable/chunks/{mi0eelXX.js → BMTtG9zH.js} +1 -1
- package/web/app/immutable/chunks/{JbMhibU_.js → BORtTc-e.js} +1 -1
- package/web/app/immutable/chunks/{CDJ_ELzg.js → BPovTGvM.js} +1 -1
- package/web/app/immutable/chunks/{Bs4HUfJo.js → BPsVnNyd.js} +1 -1
- package/web/app/immutable/chunks/{_rq_6KIb.js → BSa8UQqG.js} +1 -1
- package/web/app/immutable/chunks/{B8m1QbYL.js → BU4UpNXO.js} +1 -1
- package/web/app/immutable/chunks/{BzagSfa0.js → BXidsM5y.js} +1 -1
- package/web/app/immutable/chunks/{_oQK0i74.js → BYX5z7iO.js} +1 -1
- package/web/app/immutable/chunks/{BGZJQhsJ.js → BZtjF7Ie.js} +1 -1
- package/web/app/immutable/chunks/{CdJ_TYfc.js → BaaGaTiz.js} +1 -1
- package/web/app/immutable/chunks/{D5JRqy6x.js → BbRTv7cq.js} +1 -1
- package/web/app/immutable/chunks/{BGjb8Qjk.js → BdXOFJeo.js} +1 -1
- package/web/app/immutable/chunks/{DCH75OV4.js → BgghSBWo.js} +1 -1
- package/web/app/immutable/chunks/{BQDw3Pte.js → BisYAzdD.js} +1 -1
- package/web/app/immutable/chunks/{Ri4koGu7.js → BkXluBMH.js} +1 -1
- package/web/app/immutable/chunks/{BJHEhKgU.js → Bmg84LND.js} +1 -1
- package/web/app/immutable/chunks/Bo4gq_23.js +4 -0
- package/web/app/immutable/chunks/{kpFOTYnh.js → BofkdNap.js} +2 -2
- package/web/app/immutable/chunks/{BTNf3wFt.js → BqJTmha5.js} +3 -3
- package/web/app/immutable/chunks/{DBF6GPx0.js → BqR317mE.js} +1 -1
- package/web/app/immutable/chunks/{B8dBdB7e.js → BsMjnrdy.js} +1 -1
- package/web/app/immutable/chunks/{Mzah6e0Y.js → Btt3OR2y.js} +1 -1
- package/web/app/immutable/chunks/{DKV7MzlU.js → BuknD9D8.js} +1 -1
- package/web/app/immutable/chunks/{PZFTHLU3.js → Bzy14_Y3.js} +1 -1
- package/web/app/immutable/chunks/{CcUy0MZb.js → BzzEl9C8.js} +1 -1
- package/web/app/immutable/chunks/{DsBaaPlG.js → C--dVDXo.js} +1 -1
- package/web/app/immutable/chunks/{D-pCMoMn.js → C60Ik0Qb.js} +4 -4
- package/web/app/immutable/chunks/{BQ3bMc6Z.js → C627-01N.js} +1 -1
- package/web/app/immutable/chunks/{D6KefGE1.js → C6GT9iuD.js} +1 -1
- package/web/app/immutable/chunks/{gJj2ll-C.js → C6ldMp_G.js} +1 -1
- package/web/app/immutable/chunks/{DiC8oKjq.js → C8COLGeG.js} +1 -1
- package/web/app/immutable/chunks/{CVj2l_--.js → CAuyDtSk.js} +1 -1
- package/web/app/immutable/chunks/{CoiRuxwo.js → CB_Kofwn.js} +1 -1
- package/web/app/immutable/chunks/{DEKYlpc6.js → CCWZuPTG.js} +1 -1
- package/web/app/immutable/chunks/{DruGfJeI.js → CD2a7NWW.js} +1 -1
- package/web/app/immutable/chunks/{DtOFraMI.js → CEByQsO_.js} +1 -1
- package/web/app/immutable/chunks/{fomUVS1s.js → CED7K7pn.js} +1 -1
- package/web/app/immutable/chunks/{BJLvjFp2.js → CFgi_DMD.js} +1 -1
- package/web/app/immutable/chunks/{BFsOXNGt.js → CGmXQTqt.js} +1 -1
- package/web/app/immutable/chunks/CJdFRWjw.js +3 -0
- package/web/app/immutable/chunks/{DXB5HblX.js → CKNNEoUh.js} +1 -1
- package/web/app/immutable/chunks/{DfJuueNN.js → CKwby1z3.js} +1 -1
- package/web/app/immutable/chunks/{DytO0GHe.js → CNr93ccj.js} +1 -1
- package/web/app/immutable/chunks/{DmBGSw9-.js → COemOf_j.js} +1 -1
- package/web/app/immutable/chunks/{Dyliunfi.js → COnjpG4O.js} +1 -1
- package/web/app/immutable/chunks/{DzQq420D.js → COsML5DR.js} +3 -3
- package/web/app/immutable/chunks/{DXJWuR1_.js → CPGCgkWj.js} +1 -1
- package/web/app/immutable/chunks/{NDbFoi5z.js → CPtB0jUS.js} +1 -1
- package/web/app/immutable/chunks/{CwM2Qhat.js → CQAMVzSj.js} +1 -1
- package/web/app/immutable/chunks/{Bn3u1qCw.js → CSggmaYx.js} +1 -1
- package/web/app/immutable/chunks/{L12CYOVO.js → CVH0m_ri.js} +1 -1
- package/web/app/immutable/chunks/{Dr_LoEnL.js → CW-LHLDp.js} +7 -7
- package/web/app/immutable/chunks/{DY68UZFm.js → CXSuJ2ZK.js} +1 -1
- package/web/app/immutable/chunks/{C9qFBNQj.js → CY2SJz5g.js} +1 -1
- package/web/app/immutable/chunks/{C-mk0nP2.js → CZtxOtGv.js} +1 -1
- package/web/app/immutable/chunks/{dbkedfAT.js → CZvzT-U0.js} +1 -1
- package/web/app/immutable/chunks/{BQjY0tdo.js → CaADSFdg.js} +1 -1
- package/web/app/immutable/chunks/{CgJ50q_P.js → CaWaQ99W.js} +3 -3
- package/web/app/immutable/chunks/{C02RZikS.js → CaypYiAV.js} +1 -1
- package/web/app/immutable/chunks/{CjxObJZi.js → CbFEmy2D.js} +2 -2
- package/web/app/immutable/chunks/{BVS_SYYU.js → CclcGP3X.js} +1 -1
- package/web/app/immutable/chunks/{CIm4PPkq.js → CgJW_HcZ.js} +1 -1
- package/web/app/immutable/chunks/Ch6rVsLf.js +8 -0
- package/web/app/immutable/chunks/{xVOajdtP.js → Cip0e418.js} +1 -1
- package/web/app/immutable/chunks/{Buurk15r.js → Ciz44nC1.js} +1 -1
- package/web/app/immutable/chunks/{CB3GX1yA.js → CjokggNJ.js} +1 -1
- package/web/app/immutable/chunks/{CdWs5u7R.js → CjpXXX_J.js} +1 -1
- package/web/app/immutable/chunks/{BCUnwbyv.js → CmKUsKaf.js} +1 -1
- package/web/app/immutable/chunks/{ntY1kBD_.js → CmYElrEr.js} +1 -1
- package/web/app/immutable/chunks/{DwQIcgBv.js → CmjmDPGO.js} +1 -1
- package/web/app/immutable/chunks/{BNC8-4cK.js → CtuQQgf2.js} +2 -2
- package/web/app/immutable/chunks/{DAbHF0T4.js → Cvr-8bX_.js} +1 -1
- package/web/app/immutable/chunks/{DhGf56sV.js → CwcHW8S6.js} +1 -1
- package/web/app/immutable/chunks/{D6COgTM-.js → CxtuGanp.js} +1 -1
- package/web/app/immutable/chunks/{DEdfIv3e.js → CyIz5Rp5.js} +1 -1
- package/web/app/immutable/chunks/{BXR-y2IP.js → CySbf6TD.js} +1 -1
- package/web/app/immutable/chunks/{Cs20ySp7.js → Cz0pfiI3.js} +1 -1
- package/web/app/immutable/chunks/{BqCv-GxN.js → D5QJ-2vz.js} +1 -1
- package/web/app/immutable/chunks/{B_W5YLJO.js → D6VZoi9m.js} +1 -1
- package/web/app/immutable/chunks/{Dlo6-weE.js → D9KFPzLd.js} +2 -2
- package/web/app/immutable/chunks/{COt9Pvf4.js → D9f7U_gJ.js} +1 -1
- package/web/app/immutable/chunks/{CCFQ-Alr.js → DCIaHRk5.js} +1 -1
- package/web/app/immutable/chunks/{Bzkdeh8y.js → DDD7SYSD.js} +1 -1
- package/web/app/immutable/chunks/{CaHgiqe9.js → DEjCmBII.js} +1 -1
- package/web/app/immutable/chunks/{d89Xcl43.js → DEo5oMHN.js} +1 -1
- package/web/app/immutable/chunks/{BeMvzl_f.js → DGG8qQva.js} +1 -1
- package/web/app/immutable/chunks/{GpCuPOMi.js → DJHSMHzO.js} +1 -1
- package/web/app/immutable/chunks/{uw1PkdUT.js → DN8s5MPu.js} +1 -1
- package/web/app/immutable/chunks/{C7RFabs2.js → DNv7jzNl.js} +1 -1
- package/web/app/immutable/chunks/{BNK82DII.js → DOB0mTS8.js} +2 -2
- package/web/app/immutable/chunks/{BMncCJZO.js → DP7FYu47.js} +1 -1
- package/web/app/immutable/chunks/{B7DCx2hz.js → DU1XmBqY.js} +1 -1
- package/web/app/immutable/chunks/{DaZZAAu8.js → DVAcX8po.js} +1 -1
- package/web/app/immutable/chunks/{Co0ihRW6.js → DVGkNFGJ.js} +1 -1
- package/web/app/immutable/chunks/{XM04eAeD.js → DXXGL7Ej.js} +1 -1
- package/web/app/immutable/chunks/{CcpIKHPS.js → DY42fpE9.js} +1 -1
- package/web/app/immutable/chunks/{DrSSXu2F.js → DaXLi7kw.js} +1 -1
- package/web/app/immutable/chunks/{CqjtslkE.js → Db85r7-o.js} +1 -1
- package/web/app/immutable/chunks/{B41oTkHx.js → Dd8Oh65P.js} +1 -1
- package/web/app/immutable/chunks/{eL1b8zaP.js → Ddh0rE8O.js} +1 -1
- package/web/app/immutable/chunks/{B0cCp_Aa.js → DekSqFjl.js} +1 -1
- package/web/app/immutable/chunks/{C0pxlxBi.js → DfBQRVUY.js} +1 -1
- package/web/app/immutable/chunks/{BkLUmk09.js → Dfex6H6B.js} +1 -1
- package/web/app/immutable/chunks/{C8o2LGLL.js → Dh_7SQPV.js} +1 -1
- package/web/app/immutable/chunks/{De1JVdD9.js → DhbLviZQ.js} +1 -1
- package/web/app/immutable/chunks/{CtkAP08J.js → DixA-W0V.js} +1 -1
- package/web/app/immutable/chunks/{BOIMw4Zi.js → DjrSmzCc.js} +1 -1
- package/web/app/immutable/chunks/{DkqK0dDf.js → DkEnUmDM.js} +1 -1
- package/web/app/immutable/chunks/{BhyIRQr5.js → Dko-Flac.js} +1 -1
- package/web/app/immutable/chunks/{GLnb0LyE.js → DnC7pGbF.js} +1 -1
- package/web/app/immutable/chunks/{D_cySYsU.js → DntMfhqH.js} +4 -4
- package/web/app/immutable/chunks/{DcGdAMCM.js → DoVZd79N.js} +1 -1
- package/web/app/immutable/chunks/{DSQ3vRlg.js → DpNOuMqA.js} +1 -1
- package/web/app/immutable/chunks/{DbIMjJXa.js → DqRQRrwd.js} +1 -1
- package/web/app/immutable/chunks/{DeZfFoGy.js → Dt2W2Job.js} +1 -1
- package/web/app/immutable/chunks/{DYsBpJwe.js → DvExSeJx.js} +6 -6
- package/web/app/immutable/chunks/{BpmH_LJw.js → DzFUmVmc.js} +1 -1
- package/web/app/immutable/chunks/{nueT549f.js → DzYj9I01.js} +1 -1
- package/web/app/immutable/chunks/{HlPO1bnj.js → Eor-CiZM.js} +1 -1
- package/web/app/immutable/chunks/{B2TUPPiF.js → FpRDS6GR.js} +1 -1
- package/web/app/immutable/chunks/{CKgR37uW.js → GKyoWP3c.js} +1 -1
- package/web/app/immutable/chunks/{3Z97DIlM.js → GVi-o-HG.js} +1 -1
- package/web/app/immutable/chunks/{BWrcajCX.js → IJO_5iR4.js} +1 -1
- package/web/app/immutable/chunks/{nAVCqI07.js → IhfTHHOz.js} +1 -1
- package/web/app/immutable/chunks/{CdFYk_1W.js → Jrnc38lr.js} +1 -1
- package/web/app/immutable/chunks/{CvV52h5m.js → JvqNZ4n7.js} +1 -1
- package/web/app/immutable/chunks/{DJkPn6Gx.js → KClCJGZO.js} +1 -1
- package/web/app/immutable/chunks/{DzBZYbxf.js → MZfXqgXX.js} +1 -1
- package/web/app/immutable/chunks/{DVTHNszZ.js → N_1l7hXH.js} +1 -1
- package/web/app/immutable/chunks/{DN_2OUdP.js → OZGRjDvq.js} +1 -1
- package/web/app/immutable/chunks/{DUzPnyGA.js → R8dYtUzD.js} +1 -1
- package/web/app/immutable/chunks/{D_dLrI0U.js → R8eRTNnP.js} +1 -1
- package/web/app/immutable/chunks/{C0G0PX0u.js → R9TZ8GIl.js} +1 -1
- package/web/app/immutable/chunks/{C8ErG3Ti.js → Shvd3y-7.js} +1 -1
- package/web/app/immutable/chunks/{l-Mx-Ot5.js → SpvqHVer.js} +1 -1
- package/web/app/immutable/chunks/{k7Ld4LMq.js → Tbr6p59b.js} +1 -1
- package/web/app/immutable/chunks/{CaIUs75U.js → XXA_973X.js} +1 -1
- package/web/app/immutable/chunks/{B_6wEGEf.js → YE41SUlf.js} +1 -1
- package/web/app/immutable/chunks/{5CUEdg-r.js → Z1DZJfze.js} +1 -1
- package/web/app/immutable/chunks/{ISHdJQIS.js → ZD-F4NvX.js} +1 -1
- package/web/app/immutable/chunks/{CdI01xQ-.js → ZDypNe47.js} +1 -1
- package/web/app/immutable/chunks/{CT4vZdRl.js → _EZnucM4.js} +1 -1
- package/web/app/immutable/chunks/{BpfenzkQ.js → dOrUcrda.js} +1 -1
- package/web/app/immutable/chunks/{BcTp6STH.js → iQlEdXPk.js} +1 -1
- package/web/app/immutable/chunks/{lewsHE8q.js → jUTK_aDz.js} +1 -1
- package/web/app/immutable/chunks/{Qm-8Rnhn.js → jWQiaOEh.js} +1 -1
- package/web/app/immutable/chunks/{CnIHDDU4.js → mIgIf34G.js} +1 -1
- package/web/app/immutable/chunks/{HldT4ikO.js → nHFvNMoD.js} +1 -1
- package/web/app/immutable/chunks/{B0SI3LHQ.js → nUiGI9_j.js} +1 -1
- package/web/app/immutable/chunks/{DnOJJY51.js → rcY8Jah2.js} +1 -1
- package/web/app/immutable/chunks/{BMdDrmtC.js → tDd-6B2L.js} +1 -1
- package/web/app/immutable/chunks/{BwTELta_.js → uuDLpQqj.js} +1 -1
- package/web/app/immutable/chunks/{CcV3kPLR.js → wcwUUENo.js} +1 -1
- package/web/app/immutable/chunks/{nwovZHdj.js → xx12n3Gb.js} +1 -1
- package/web/app/immutable/chunks/{Bicndtmn.js → zCdOCSz2.js} +1 -1
- package/web/app/immutable/chunks/zh3oQLeX.js +1 -0
- package/web/app/immutable/entry/{app.1uhZRRjp.js → app.VJdWRZXW.js} +2 -2
- package/web/app/immutable/entry/start.CgJpRFs5.js +1 -0
- package/web/app/immutable/nodes/{0.DLt-CtDX.js → 0.znaZSkGz.js} +1 -1
- package/web/app/immutable/nodes/{1.BPvEDLUK.js → 1.QD_AYG75.js} +1 -1
- package/web/app/immutable/nodes/{10.B5xDYK4a.js → 10.gF8-cogW.js} +1 -1
- package/web/app/immutable/nodes/{14.BQTbKD3r.js → 14.Dg2AgOXG.js} +1 -1
- package/web/app/immutable/nodes/{16.pwQIYuiW.js → 16.DwkJcrpd.js} +2 -2
- package/web/app/immutable/nodes/{2.C-FkYY8y.js → 2.BtT3yj0F.js} +3 -3
- package/web/app/immutable/nodes/{3.BDZTjYux.js → 3.CvwCGNZG.js} +1 -1
- package/web/app/immutable/nodes/{4.yZhJP9E2.js → 4.DkczoMth.js} +1 -1
- package/web/app/immutable/nodes/{5.DGLDlDY1.js → 5.BCyXLcum.js} +1 -1
- package/web/app/immutable/nodes/{6.CsH42tzX.js → 6.BpqkaXHY.js} +1 -1
- package/web/app/immutable/nodes/{7.mSAj_Ru-.js → 7.qMlWyBnC.js} +1 -1
- package/web/app/immutable/nodes/{8.bwqgMCZl.js → 8.Bq5rrqJa.js} +11 -11
- package/web/app/immutable/nodes/{9.CPziyhjK.js → 9.CA3t47dE.js} +1 -1
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +8 -8
- package/web/index.html +10 -10
- package/web/app/immutable/assets/0.Racpq4cy.css +0 -1
- package/web/app/immutable/chunks/Chf_Fl2B.js +0 -4
- package/web/app/immutable/chunks/Div3O1DS.js +0 -8
- package/web/app/immutable/chunks/Dtgjfsuk.js +0 -1
- package/web/app/immutable/chunks/TQpilk5Q.js +0 -3
- package/web/app/immutable/entry/start.CKsznvSy.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as s}from"./
|
|
1
|
+
import{f as s}from"./8RNmk_9I.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as Kt,c6 as Wt,aK as Ht,aP as Yt,c9 as Xt,aL as Zt,c7 as Jt,f as w,aN as wt,c4 as Qt,c3 as ot,v as $t,bk as te,by as ee,as as ne,a6 as se,a0 as ie,$ as oe,ax as re}from"./C9AXCraB.js";const It=(t,n)=>Kt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(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 y={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]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});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+=lt(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(q(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-_t,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}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(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 lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(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}]}function Et(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}function ce(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,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(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,y=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 v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const C=d.slice();return C.fx=d.fx,C.id=d.id,C});x.sort((d,C)=>d.id-C.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(J(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)J(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)J(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(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(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);J(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(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}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(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=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(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 y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),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}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(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=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(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],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(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}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[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)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(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=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(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=xt(l.radius,f.radius,q(l,f))}else i=st(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}function me(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&&q(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}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}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;q(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())}function dt(t){const n=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}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(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,y){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 M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}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=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(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),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Ot(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const C=new Set;d.forEach(I=>{I.size==0&&I.sets.length==1&&C.add(I.sets[0])}),d=d.filter(I=>!I.sets.some(F=>C.has(F)));let k={},D={};if(d.length>0){let I=m(d,{lossFunction:v,distinct:b});l&&(I=Dt(I,r,h)),k=Nt(I,s,e,i,f),D=Lt(k,d,M)}const U={};d.forEach(I=>{I.label&&(U[I.sets]=I.label)});function V(I){if(I.sets in U)return U[I.sets];if(I.sets.length==1)return""+I.sets[0]}x.selectAll("svg").data([k]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let T=!1;O.selectAll(".venn-area path").each(function(I){const F=this.getAttribute("d");I.sets.length==1&&F&&!b&&(T=!0,R[I.sets[0]]=Me(F))});function A(I){return F=>{const H=I.sets.map(et=>{let Y=R[et],Z=k[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,I=>I.sets),P=G.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(I=>V(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),L.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function W(I){return typeof I.transition=="function"?I.transition("venn").duration(o):I}let z=x;T&&typeof z.transition=="function"?(z=W(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",I=>St(I.sets.map(F=>k[F])),p);const N=z.selectAll("text").filter(I=>I.sets in D).text(I=>V(I)).attr("x",I=>Math.floor(D[I.sets].x)).attr("y",I=>Math.floor(D[I.sets].y));u&&(T?"on"in N?N.on("end",rt(k,V)):N.each("end",rt(k,V)):N.each(rt(k,V)));const j=W(G.exit()).remove();typeof G.transition=="function"&&j.selectAll("path").attrTween("d",A);const X=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:D,nodes:G,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Ct:x,c):v},c}function rt(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],y=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}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(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=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({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(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(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 st(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?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function ke(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=q(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}function Lt(t,n,s){const e={},i=ke(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 y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{k as Kt,c6 as Wt,aK as Ht,aP as Yt,c9 as Xt,aL as Zt,c7 as Jt,f as w,aN as wt,c4 as Qt,c3 as ot,v as $t,bk as te,by as ee,as as ne,a6 as se,a0 as ie,$ as oe,ax as re}from"./8RNmk_9I.js";const It=(t,n)=>Kt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(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 y={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]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});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+=lt(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(q(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-_t,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}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(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 lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(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}]}function Et(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}function ce(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,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(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,y=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 v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const C=d.slice();return C.fx=d.fx,C.id=d.id,C});x.sort((d,C)=>d.id-C.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(J(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)J(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)J(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(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(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);J(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(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}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(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=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(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 y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),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}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(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=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(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],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(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}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[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)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(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=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(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=xt(l.radius,f.radius,q(l,f))}else i=st(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}function me(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&&q(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}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}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;q(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())}function dt(t){const n=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}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(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,y){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 M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}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=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(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),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Ot(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const C=new Set;d.forEach(I=>{I.size==0&&I.sets.length==1&&C.add(I.sets[0])}),d=d.filter(I=>!I.sets.some(F=>C.has(F)));let k={},D={};if(d.length>0){let I=m(d,{lossFunction:v,distinct:b});l&&(I=Dt(I,r,h)),k=Nt(I,s,e,i,f),D=Lt(k,d,M)}const U={};d.forEach(I=>{I.label&&(U[I.sets]=I.label)});function V(I){if(I.sets in U)return U[I.sets];if(I.sets.length==1)return""+I.sets[0]}x.selectAll("svg").data([k]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let T=!1;O.selectAll(".venn-area path").each(function(I){const F=this.getAttribute("d");I.sets.length==1&&F&&!b&&(T=!0,R[I.sets[0]]=Me(F))});function A(I){return F=>{const H=I.sets.map(et=>{let Y=R[et],Z=k[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,I=>I.sets),P=G.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(I=>V(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),L.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function W(I){return typeof I.transition=="function"?I.transition("venn").duration(o):I}let z=x;T&&typeof z.transition=="function"?(z=W(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",I=>St(I.sets.map(F=>k[F])),p);const N=z.selectAll("text").filter(I=>I.sets in D).text(I=>V(I)).attr("x",I=>Math.floor(D[I.sets].x)).attr("y",I=>Math.floor(D[I.sets].y));u&&(T?"on"in N?N.on("end",rt(k,V)):N.each("end",rt(k,V)):N.each(rt(k,V)));const j=W(G.exit()).remove();typeof G.transition=="function"&&j.selectAll("path").attrTween("d",A);const X=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:D,nodes:G,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Ct:x,c):v},c}function rt(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],y=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}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(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=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({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(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(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 st(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?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function ke(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=q(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}function Lt(t,n,s){const e={},i=ke(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 y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function Ie(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,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BONnxsQv.js","/app/immutable/chunks/CJvhopKt.js","/app/immutable/chunks/COCO5InB.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/Crs9I2MT.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/C5Xi5eLp.js","/app/immutable/chunks/Dck4Okga.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/oALOmsvi.js","/app/immutable/chunks/Cdhgfy6h.js","/app/immutable/chunks/BY3Ptqbg.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Bqoyy9yx.js","/app/immutable/chunks/BlJs0v1V.js","/app/immutable/chunks/BjFoJgFv.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/BDq7EC2K.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.CaX-6yIe.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
var ne=Object.defineProperty;var ae=(e,t,r)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>ae(e,typeof t!="symbol"?t+"":t,r);import{a as oe,i as ce}from"./DJu_D7ND.js";import{c as V}from"./ChTqQfQN.js";import{i as D}from"./Dx5-Ovf5.js";import{bo as a,_ as le}from"./COCO5InB.js";import{G2 as n,mv as _,mu as m,l0 as de,w9 as R,wa as L,w7 as ue,w8 as pe,q1 as K,vW as fe,FQ as he,a2 as ge,bR as me,bQ as be,c3 as ve,c2 as Se,mx as w}from"./BjFoJgFv.js";import{cr as ye,bs as _e,c4 as we,cj as ke,c6 as Ee,cG as Re,cK as Ce,cA as Q,av as Ae,bO as Me,cH as Pe}from"./DUT4V6mb.js";import{n as Te}from"./
|
|
2
|
+
var ne=Object.defineProperty;var ae=(e,t,r)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>ae(e,typeof t!="symbol"?t+"":t,r);import{a as oe,i as ce}from"./DJu_D7ND.js";import{c as V}from"./ChTqQfQN.js";import{i as D}from"./Dx5-Ovf5.js";import{bo as a,_ as le}from"./COCO5InB.js";import{G2 as n,mv as _,mu as m,l0 as de,w9 as R,wa as L,w7 as ue,w8 as pe,q1 as K,vW as fe,FQ as he,a2 as ge,bR as me,bQ as be,c3 as ve,c2 as Se,mx as w}from"./BjFoJgFv.js";import{cr as ye,bs as _e,c4 as we,cj as ke,c6 as Ee,cG as Re,cK as Ce,cA as Q,av as Ae,bO as Me,cH as Pe}from"./DUT4V6mb.js";import{n as Te}from"./7yhhL_Kv.js";import{ak as Ie,F as Y,j as De,G as xe,bv as Fe,c as Oe,al as Le,bg as H,_ as Ue,aB as Ne,q as $,K as Ve,ag as He,bl as We,J as qe,H as Be,I as je,bj as Ge}from"./BUVaYTVI.js";import{r as ze}from"./CaQ_vubD.js";const x=V("Clipboard");async function Er(e){let t;if(oe())try{const r=await ce("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,x.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 x.error("Browser clipboard write failed",r,{electronError:t}),r}throw x.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const Ke=n.createSelector(e=>e.githubAuth.mutationRequestId),Qe=n.createSelector(e=>e.githubAuth.callbacksCancelled),Ye=n.createSelector(e=>e.githubAuth.isDisconnecting),Z=n.createSelector(e=>e.githubAuth.isAuthenticated),$e=n.createSelector(e=>e.githubAuth.statusSettled===!0),Ze=n.createSelector(e=>e.githubAuth.requiresDaemonAuth),Je=n.createSelector(e=>e.githubAuth.user),Xe=n.createSelector(e=>e.githubAuth.isAuthenticating),et=n.createSelector(e=>e.githubAuth.deviceFlow),tt=n.createSelector(e=>e.githubAuth.error),Rr=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:Qe,selectGitHubAuthDeviceFlow:et,selectGitHubAuthError:tt,selectGitHubAuthIsAuthenticated:Z,selectGitHubAuthIsAuthenticating:Xe,selectGitHubAuthIsDisconnecting:Ye,selectGitHubAuthMutationRequestId:Ke,selectGitHubAuthRequiresDaemonAuth:Ze,selectGitHubAuthStatusSettled:$e,selectGitHubAuthUser:Je},Symbol.toStringTag,{value:"Module"})),rt=V("WorkspaceValidation");async function Cr(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_repoPathRequired_error(),suggestion:a.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return st(s)?nt(s):at(s,t,r)}function st(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 it(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 l=o[2].replace(/\.git$/,"");return l?{owner:o[1],repo:l}: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 nt(e){return it(e)?{valid:!0,warning:a.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:a.workspace_validation_invalidGithubUrl_error(),suggestion:a.workspace_validation_invalidGithubUrl_suggestion()}}async function at(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:a.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:a.workspace_validation_pathNotAbsolute_error(),suggestion:a.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 l=s.data;return l.exists?l.isDirectory?l.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l}:l.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l,warning:a.workspace_validation_insideParentRepo_warning({path:l.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:l}:t?l.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:a.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:l,warning:a.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:a.workspace_repoSelector_notGitRepository_label(),directoryStatus:l}:{valid:!1,error:a.workspace_validation_notDirectory_error(),suggestion:a.workspace_validation_notDirectory_suggestion(),directoryStatus:l}:t?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExist_suggestion(),directoryStatus:l}}if(!(await D("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExistLegacy_suggestion()};const o=await D("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?a.workspace_repoSelector_notGitRepository_label():a.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:a.workspace_validation_nonGitInit_warning()}}catch(s){if(rt.warn("Could not validate path existence",s),!t)return{valid:!1,error:a.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Ar(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchPrefixInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:a.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:a.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:a.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Mr(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 Pr(e){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchNameInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:a.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:a.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchNameLock_error()}:{valid:!0}}function Tr(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:a.workspace_validation_promptTooLong_error(),suggestion:a.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Ir(e){const t=e.toLowerCase();return t.includes("maxbuffer")?a.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?a.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?a.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?a.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?a.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?a.workspace_gitError_cloneAuth():a.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?a.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?a.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_readPermission():e:t.includes("permission denied")?a.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?a.workspace_gitError_notFound():t.includes("already exists")?a.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?a.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:a.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?a.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?a.workspace_gitError_diskSpace():e}const v=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return a.specialists_builtin_prReviewer_name()},get description(){return a.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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as h}from"./
|
|
1
|
+
import{I as h}from"./BzzEl9C8.js";import{c as v}from"./ChTqQfQN.js";import{bs as d}from"./C5Xi5eLp.js";const g=v("AttachmentImageUrl");function y(t,n){const r=n.split("/").filter(e=>e.length>0).map(e=>encodeURIComponent(e)).join("/");return`workspace-file://${t}/${r}`}const u=new Map,a=new Map;let f=0,m=!1;function p(){m||(m=!0,d(()=>{f+=1,u.clear(),a.clear()}))}function A(t,n){u.delete(`${t}/${n}`)}function F(t,n,r){p();let e=!1,i=!1,o=!1;async function l(){if(!e){if(i){o=!0;return}i=!0;try{const c=await $(t,n);e||r(c)}finally{i=!1,o&&(o=!1,l())}}}const s=d(()=>{l()});return l(),{imageFailed(){e||(A(t,n),r(null))},dispose(){e=!0,s()}}}function $(t,n){p();const r=f,e=`${t}/${n}`,i=u.get(e);if(i)return Promise.resolve(i);const o=a.get(e);if(o)return o;const l=(async()=>{try{const s=await h({attachmentId:n,workspaceId:t});if(r!==f)return null;if(!s.exists)return g.warn("Attachment file missing on disk",{attachmentId:n}),null;const c=y(t,s.path);return u.set(e,c),c}catch(s){return g.warn("Failed to resolve attachment image",{attachmentId:n,error:s}),null}finally{r===f&&a.delete(e)}})();return a.set(e,l),l}export{A as e,F as o,$ as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,a as t,s as r,S as s}from"./
|
|
1
|
+
import{b as a,a as t,s as r,S as s}from"./OZGRjDvq.js";import{f as i}from"./8RNmk_9I.js";var l={parser:r,get db(){return new s(2)},renderer:t,styles:a,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{bo as m,t as Ht,bq as y,a_ as M,by as jt,b as Wt,br as df,bu as Ft,bs as ca,bt as ni,b7 as Wi,ba as uf,bl as ff,bb as pf,bm as gf,a$ as vf,b9 as mf,b8 as hf,b2 as bf,bf as yf,bg as _f,bk as xf,be as wf,bn as kf,b0 as If,b4 as Sf,bi as Cf,bh as Ef,b6 as Pf,b5 as Af,b3 as Tf,bd as Rf,bc as Lf,bj as Nf,b1 as Mf,_ as Of}from"./COCO5InB.js";import{bI as Df,bj as fs,aG as Bf,bs as Ut,aD as e,a5 as S,bS as v,bA as w,W as d,bn as qt,c9 as u,aA as _,a7 as kt,ay as ze,be as sr,b$ as Lt,aC as ya,bl as R,b_ as k,bO as x,aB as I,bo as ps,ca as Ct,bH as N,bV as we,br as Ur,bk as gs,c0 as Zn,ai as Aa,cd as Ns,aw as wn,a as Ff,aj as Ar,c7 as zf,c6 as Ui,c5 as Ln,bf as Ms,bz as Rc}from"./B8o4lNgr.js";import{B as Os,I as Hf,x as jf}from"./Cdhgfy6h.js";import{c as Wf,s as oe,a as Nn,l as Mn,f as kn,d as cr,k as mt,I as vs,h as Tt,i as Rr,o as Uf,j as qf,g as Vf,n as Kf}from"./Crs9I2MT.js";import{s as dn}from"./Dck4Okga.js";import{c as Xr}from"./oALOmsvi.js";import{H as Lo,t as lr,n as Gf,i as qi,u as Vi}from"./Bqoyy9yx.js";import{b as gr}from"./D2g8BuR1.js";import{h as Lc,bs as Jf,cH as Yf,dz as Xf,dk as Zf,av as Qf,cr as $f,a1 as ep,cN as tp,dj as ns,aA as Gs,c0 as rp,H as np,c as ap,$ as Ki,cT as sp,bQ as op,L as ip,dg as lp,V as cp,dq as dp,ae as up,f as fp,t as pp}from"./DUT4V6mb.js";import{c as gp}from"./D-62MVd3.js";import{n as ra,w as vp,C as Nc,M as mp,R as hp}from"./CJvhopKt.js";import{f as yt,ap as ja,ai as bp,am as No,bb as yp}from"./C5Xi5eLp.js";import{ai as _p,a7 as Gi,X as xp,at as wp,aM as kp,I as Ip,R as Sp,an as Cp,ab as Ep,Y as Pp,b as Ji,q as Ap,n as Tp,aS as Rp,m as Lp,aU as Mo,A as Yi,aa as Np,aT as Mp,ak as Mc,L as Oc,a3 as Op,a2 as Xi,J as Zi}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Bo4gq_23.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/COCO5InB.js","/app/immutable/chunks/Dck4Okga.js","/app/immutable/chunks/-fWJi05-.js","/app/immutable/chunks/Bqoyy9yx.js","/app/immutable/chunks/Crs9I2MT.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/C5Xi5eLp.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/oALOmsvi.js","/app/immutable/chunks/Cdhgfy6h.js","/app/immutable/chunks/BY3Ptqbg.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CjVTzfqV.js","/app/immutable/chunks/BqRJyrRC.js","/app/immutable/chunks/BjFoJgFv.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/bjkNeafo.js","/app/immutable/chunks/1jz3AJ7K.js","/app/immutable/chunks/BDq7EC2K.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/B7mAnbbv.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/assets/observe-overflow.D4mrl2M9.css","/app/immutable/chunks/BUVaYTVI.js","/app/immutable/chunks/B6LKhrY2.js","/app/immutable/chunks/C563feV7.js","/app/immutable/chunks/DUT4V6mb.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CaQ_vubD.js","/app/immutable/chunks/BlJs0v1V.js","/app/immutable/assets/connection-label.UE5obH5A.css","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/chunks/FY5ry3XL.js","/app/immutable/chunks/hMX_6Iel.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/BONnxsQv.js","/app/immutable/chunks/CJvhopKt.js","/app/immutable/assets/notify.CaX-6yIe.css","/app/immutable/chunks/3QmaYnff.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/CZtxOtGv.js","/app/immutable/chunks/DJu_D7ND.js","/app/immutable/chunks/Dx5-Ovf5.js","/app/immutable/chunks/7yhhL_Kv.js","/app/immutable/chunks/Bmg84LND.js","/app/immutable/chunks/DvExSeJx.js","/app/immutable/chunks/9s3D9jIu.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/iQlEdXPk.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bo as m,t as Ht,bq as y,a_ as M,by as jt,b as Wt,br as df,bu as Ft,bs as ca,bt as ni,b7 as Wi,ba as uf,bl as ff,bb as pf,bm as gf,a$ as vf,b9 as mf,b8 as hf,b2 as bf,bf as yf,bg as _f,bk as xf,be as wf,bn as kf,b0 as If,b4 as Sf,bi as Cf,bh as Ef,b6 as Pf,b5 as Af,b3 as Tf,bd as Rf,bc as Lf,bj as Nf,b1 as Mf,_ as Of}from"./COCO5InB.js";import{bI as Df,bj as fs,aG as Bf,bs as Ut,aD as e,a5 as S,bS as v,bA as w,W as d,bn as qt,c9 as u,aA as _,a7 as kt,ay as ze,be as sr,b$ as Lt,aC as ya,bl as R,b_ as k,bO as x,aB as I,bo as ps,ca as Ct,bH as N,bV as we,br as Ur,bk as gs,c0 as Zn,ai as Aa,cd as Ns,aw as wn,a as Ff,aj as Ar,c7 as zf,c6 as Ui,c5 as Ln,bf as Ms,bz as Rc}from"./B8o4lNgr.js";import{B as Os,I as Hf,x as jf}from"./Cdhgfy6h.js";import{c as Wf,s as oe,a as Nn,l as Mn,f as kn,d as cr,k as mt,I as vs,h as Tt,i as Rr,o as Uf,j as qf,g as Vf,n as Kf}from"./Crs9I2MT.js";import{s as dn}from"./Dck4Okga.js";import{c as Xr}from"./oALOmsvi.js";import{H as Lo,t as lr,n as Gf,i as qi,u as Vi}from"./Bqoyy9yx.js";import{b as gr}from"./D2g8BuR1.js";import{h as Lc,bs as Jf,cH as Yf,dz as Xf,dk as Zf,av as Qf,cr as $f,a1 as ep,cN as tp,dj as ns,aA as Gs,c0 as rp,H as np,c as ap,$ as Ki,cT as sp,bQ as op,L as ip,dg as lp,V as cp,dq as dp,ae as up,f as fp,t as pp}from"./DUT4V6mb.js";import{c as gp}from"./D-62MVd3.js";import{n as ra,w as vp,C as Nc,M as mp,R as hp}from"./CJvhopKt.js";import{f as yt,ap as ja,ai as bp,am as No,bb as yp}from"./C5Xi5eLp.js";import{ai as _p,a7 as Gi,X as xp,at as wp,aM as kp,I as Ip,R as Sp,an as Cp,ab as Ep,Y as Pp,b as Ji,q as Ap,n as Tp,aS as Rp,m as Lp,aU as Mo,A as Yi,aa as Np,aT as Mp,ak as Mc,L as Oc,a3 as Op,a2 as Xi,J as Zi}from"./C60Ik0Qb.js";import{cU as Dp,F as Et,be as Oo,bH as Bp,an as Fp,aO as zp,cE as Hp,bi as ai,bx as jp,aE as Dc,aJ as si,cT as Ds,aa as Do,ci as Wp,c8 as Up,cd as oi,cz as Bc,bo as qp,e as Vp,bX as Qi,c4 as Kp,cg as Gp,cP as Fc,bR as $i,b5 as po,bb as $a,aD as Jp,ay as Bo,at as zc,b9 as Hc,by as Yp,B as Xp,br as Zp,a6 as jc,cc as Qp,ak as Wc,cG as Uc,cC as el,ar as qc,aI as tl,a1 as $p,cq as eg,cN as tg,bK as Vc,bk as rg,c0 as rl,am as Kc,ax as ng,a8 as ag,a7 as sg}from"./BDq7EC2K.js";import{c as Gc}from"./ChTqQfQN.js";import{h as og}from"./BlJs0v1V.js";import{G2 as Mt,bG as ig,r2 as lg,GP as cg,GU as dg,g as Jc,FQ as ug,mt as Yc,mI as Xc,mH as Zc,mm as Js,oU as ii,vW as fg,tf as Es,sA as Fo,th as pg,ma as Qc,G7 as gg,rA as vg,nv as $c,pU as li,kW as nl,a0 as al,pv as mg,pr as hg,pw as bg,pn as yg,pt as _g,t5 as xg,yq as ed,yu as td,mJ as sl,b9 as zo,Ez as wg,FM as kg,mD as Ig,u2 as Sg,u3 as Cg,u1 as ol,zm as Xn,ck as rd,c8 as Eg,cY as Pg,d3 as Ag,yA as Tg}from"./BjFoJgFv.js";import{k as nd,f as il,O as ll,M as Rg,J as Lg,E as Ng,r as Mg,q as Og,R as Dg,Q as ad,N as Ho,e as as,a2 as cl,i as Bg}from"./Bo4gq_23.js";import{bi as Fg,bp as zg,h as Hg,t as jg,bs as Wg,U as Ug,W as qg,Y as Vg}from"./BUVaYTVI.js";import{i as Kg,h as Gg,p as jo,bO as Jg,E as Yg,bN as Xg,bK as Zg,au as dl,bM as Qg,bl as Wo,aE as $g,n as ev,b5 as tv,s as rv}from"./CZtxOtGv.js";import{a0 as nv,ah as ws,ag as av,au as ul,aC as sv,af as ov,B as iv,i as lv,C as Ps,cz as cv,aP as fl,cE as dv,ac as uv,a4 as fv,r as pv,p as gv,az as vv,cH as mv,cq as hv,cj as bv,ca as yv,bD as _v}from"./BzzEl9C8.js";import{s as xv,j as wv,i as kv,I as Ua,c as pl}from"./CjVTzfqV.js";import"./BqRJyrRC.js";import"./B7mAnbbv.js";import{I as ci,P as Iv,s as Sv,k as Cv,G as Ev,o as Pv,l as Av,M as Tv,H as Rv,w as za,a as Lv,K as Nv,n as Mv,R as Ov}from"./bjkNeafo.js";import{t as ss,m as Dv,O as Bv,M as Fv,S as ha}from"./1jz3AJ7K.js";import{C as Uo}from"./ykvYWYIa.js";import{J as zv,L as Hv,K as jv,u as di,w as Wv,v as Ys,G as Uv,A as gl,e as os,d as ba,I as vl,c as qv,f as Vv,g as ml,i as Kv,b as Gv,o as sd,j as Jv,O as Yv,x as Xv,k as od,S as Zv,N as Qv,q as hl,p as $v,n as bl,z as em,s as tm}from"./XXA_973X.js";import{aK as rm,aS as nm,aI as am,aO as sm,a6 as Va,aY as yl,aE as om,aL as im,aR as ui,aM as fi,V as go,an as lm,W as cm,aU as dm,aD as um,aN as fm,aQ as pm,a$ as gm,aZ as vm,av as id,p as mm,n as hm,aP as bm,Z as ym,z as _m}from"./COsML5DR.js";import{s as qo}from"./CKwby1z3.js";import{M as xm}from"./CpWqDujk.js";import{o as _l,a as xl,T as vo,b as wm}from"./BofkdNap.js";import{ad as km,a4 as Im,J as Sm,E as Cm,ag as Em}from"./D62E6eA-.js";import{D as is}from"./C627-01N.js";import"./DROi8p_h.js";import{C as na}from"./BCyLWzW8.js";import{M as Pm}from"./8RNmk_9I.js";import{g as pi}from"./-fWJi05-.js";import{f as wl}from"./Bmg84LND.js";import{c as As}from"./Ck11Hn8r.js";import{handleIntentLink as Am}from"./DOB0mTS8.js";import{s as Tm,a as Rm,f as Lm,d as Nm,r as Mm,h as Om,w as es,g as Dm,W as Bm,H as Fm,c as zm,M as ld}from"./DntMfhqH.js";import{e as Hm,q as jm}from"./B6LKhrY2.js";import{showAssistantContent as Wm}from"./CbFEmy2D.js";import{o as Bs,c as Um,n as qm}from"./iQlEdXPk.js";import{p as Vm}from"./BZtjF7Ie.js";import{m as Km}from"./DY0zw3Os.js";import{h as ks}from"./DoLFtAtL.js";import{i as cd}from"./DJu_D7ND.js";import{b as Gm,f as Jm,h as Ym,j as Xm}from"./C563feV7.js";import{T as mo}from"./_cwefpRI.js";import{i as Zm,r as kl}from"./CgJW_HcZ.js";import{a as Qm}from"./3QmaYnff.js";import{a as $m}from"./BJzHxIyr.js";import{p as eh}from"./CyIz5Rp5.js";const th="intent:inline-visual-draft";function WI(r,t){const n=t.title.replace(/\s+/g," ").trim(),a=JSON.stringify({inputs:t.inputs,results:t.results},null,2),s=(a.match(/`+/g)??[]).reduce((l,c)=>Math.max(l,c.length),0),o="`".repeat(Math.max(3,s+1));return`${r}${r?`
|
|
3
3
|
|
|
4
4
|
`:""}${n}
|
|
5
5
|
|
|
@@ -257,7 +257,7 @@ ${r.content}`:a.content=r.content,a):r.old_text!==void 0&&r.new_text!==void 0?(a
|
|
|
257
257
|
`,u1=["background","foreground","card","card-foreground","primary","primary-ink","primary-foreground","secondary","secondary-foreground","muted","muted-foreground","border","input","ring","danger","danger-background","info","info-foreground","success","success-foreground","warning","warning-foreground","font-ui","font-code","text-body-size","text-body-line-height","text-body-weight","text-body-tracking","radius-small","radius-medium","radius-large","app-background","sidebar","sidebar-accent","agent-avatar-surface-active","agent-avatar-foreground","diagram-host-surface","diagram-canvas","diagram-label-surface","diagram-node-surface","diagram-node-hover-surface","diagram-node-outline","diagram-node-title","diagram-metadata","diagram-group-outline","diagram-connector","diagram-connector-hover","diagram-connector-muted","diagram-connector-inactive","diagram-connector-danger","diagram-connector-success","diagram-connector-warning","diagram-connector-active","diagram-accent","diagram-accent-foreground","diagram-node-radius","diagram-group-radius","diagram-connector-width","text-caption-size","text-caption-line-height","text-caption-weight","text-caption-tracking","text-body-strong-size","text-body-strong-line-height","text-body-strong-weight","text-body-strong-tracking","space-1","space-2","space-3","space-4","space-5","space-6","space-7","control-height-compact","control-height-small","control-height-medium","control-height-large","radius-full","spring-fast","spring-fast-exit","spring-fast-ease","spring-moderate","spring-moderate-exit","spring-moderate-ease","spring-slow","spring-slow-exit","spring-slow-ease","spring-exit-ease","motion-fast","motion-standard","motion-slow","ease-standard","ease-emphasized-out","motion-reduced"],Po=96,fc=2e4,f1=480,gu=512,p1=["default-src 'none'","script-src 'unsafe-inline'","style-src 'unsafe-inline'","img-src data:","connect-src 'none'","font-src data:","media-src 'none'","object-src 'none'","frame-src 'none'","child-src 'none'","worker-src 'none'","manifest-src 'none'","base-uri 'none'","form-action 'none'"].join("; ");function g1(r,t,n,a,s,o){const l=new MessageChannel,c=MessagePort.prototype.postMessage.bind(l.port1);window.parent.postMessage({channel:r,type:"scroll-port"},"*",[l.port2]);const f=(C,F={})=>{window.parent.postMessage({channel:r,type:C,...F},"*")};let i=s?.state??null,p=null,g=!1;Object.defineProperty(window,"intentVisual",{configurable:!1,writable:!1,value:Object.freeze({get state(){return i},publish(C){try{if(!o(C))return!1;const F=JSON.parse(JSON.stringify(C));return i=F.state,p=F,g||(g=!0,requestAnimationFrame(()=>{g=!1,p&&f("snapshot",{snapshot:p}),p=null})),!0}catch{return!1}}})});let L=!1,b=-1,h=innerHeight,A=Number.NaN,T=0,H=0;const B=()=>{if(L=!1,!document.body)return;let C=Math.ceil(Math.max(document.body.scrollHeight,document.body.getBoundingClientRect().height));const F=innerHeight,K=C-F;if(F>h+1&&K>1&&Math.abs(K-A)<=1?T+=1:(F!==h||K<=1)&&(T=0),h=F,A=K,!H&&T>=3){H=Math.max(a,F);const X="Page height follows the frame (vh units or height: 100%); frame height held.";console.warn(X),f("layout",{message:X})}H&&(C=Math.min(C,H)),C!==b&&(b=C,f("resize",{height:C}))},O=()=>{L||(L=!0,requestAnimationFrame(B))},D=C=>{if(!C||typeof C.dark!="boolean"||!C.variables)return;const F=document.documentElement;F.classList.toggle("dark",C.dark),F.style.colorScheme=C.dark?"dark":"light";const K=C.variables["--inline-html-root-font-size"];"--inline-html-root-font-size"in t.variables&&typeof K=="string"&&K.length<512&&F.style.setProperty("--inline-html-root-font-size",K);for(const X of Object.keys(t.variables)){if(X==="--inline-html-root-font-size")continue;const de=C.variables[X];typeof de=="string"&&de.length<512&&F.style.setProperty(X,de)}O()};window.addEventListener("message",C=>{C.source!==window.parent||!C.data||C.data.channel!==r||C.data.type==="theme"&&D(C.data.theme)});const U=C=>{if(C.defaultPrevented||!C.isTrusted||C.ctrlKey||C.metaKey||C.shiftKey||!C.deltaY||Math.abs(C.deltaX)>Math.abs(C.deltaY))return;const F=de=>{const Pe=getComputedStyle(de);if(de!==document.scrollingElement&&!/^(auto|scroll|overlay)$/.test(Pe.overflowY)||/^(hidden|clip)$/.test(Pe.overflowY))return!1;const ue=de.scrollHeight-de.clientHeight;return ue>1&&(C.deltaY<0?de.scrollTop>1:de.scrollTop<ue-1)};if(C.composedPath().some(de=>de instanceof Element&&F(de))||document.scrollingElement&&F(document.scrollingElement))return;const K=C.deltaMode===WheelEvent.DOM_DELTA_LINE?parseFloat(getComputedStyle(document.body).lineHeight)||16:C.deltaMode===WheelEvent.DOM_DELTA_PAGE?innerHeight:1,X=Math.max(-n,Math.min(n,C.deltaY*K));Number.isFinite(X)&&(C.preventDefault(),c({deltaY:X}))};window.addEventListener("wheel",()=>{window.removeEventListener("wheel",U),window.addEventListener("wheel",U,{passive:!1})},{capture:!0,passive:!1}),window.addEventListener("error",C=>{C.message&&f("error",{message:C.message.slice(0,300)})}),window.addEventListener("unhandledrejection",C=>{const F=C.reason;f("error",{message:String(F instanceof Error?F.message:F).slice(0,300)})}),window.addEventListener("click",C=>{const F=C.target instanceof Element?C.target.closest("a, area"):null;if(!F)return;(F.getAttribute("href")??F.getAttribute("xlink:href"))?.startsWith("#")||C.preventDefault()},!0),window.addEventListener("submit",C=>C.preventDefault(),!0),D(t),window.addEventListener("DOMContentLoaded",()=>{new ResizeObserver(O).observe(document.body),new MutationObserver(O).observe(document.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),window.addEventListener("resize",O),document.addEventListener("load",O,!0),document.fonts.ready.then(O),f("ready"),O()},{once:!0})}function v1(r,t,n,a,s){const o=document.createElement("iframe");o.setAttribute("sandbox","allow-scripts"),o.setAttribute("referrerpolicy","no-referrer"),o.title=n,o.style.cssText="display:block;width:100%;height:100%;border:0;";let l;const c=f=>{const i=f.data?.deltaY;typeof i=="number"&&Number.isFinite(i)&&i!==0&&Math.abs(i)<=a&&window.parent.postMessage({channel:r,type:"wheel",deltaY:i},"*")};window.addEventListener("message",f=>{const i=f.data;if(!(!i||typeof i!="object"||i.channel!==r)){if(f.source===window.parent&&i.type==="theme"){o.contentWindow?.postMessage({channel:r,type:"theme",theme:i.theme},"*");return}if(!(f.source!==o.contentWindow||f.origin!=="null")){if(i.type==="scroll-port"&&!l&&f.ports.length===1){l=f.ports[0],l.onmessage=c;return}i.type==="resize"&&typeof i.height=="number"&&Number.isFinite(i.height)&&i.height>=0?window.parent.postMessage({channel:r,type:"resize",height:i.height},"*"):i.type==="ready"?window.parent.postMessage({channel:r,type:"ready"},"*"):(i.type==="error"||i.type==="layout")&&typeof i.message=="string"?window.parent.postMessage({channel:r,type:i.type,message:i.message.slice(0,300)},"*"):i.type==="snapshot"&&s(i.snapshot)&&window.parent.postMessage({channel:r,type:"snapshot",snapshot:i.snapshot},"*")}}}),window.addEventListener("DOMContentLoaded",()=>{o.srcdoc=t,document.body.append(o)},{once:!0})}function m1(r,t,n,a,s,o,l,c){const f=document.implementation.createHTMLDocument(""),i=f.createElement("template");i.innerHTML=n,f.body.append(i.content);const p=X=>{X.querySelectorAll("meta, base, link, iframe, frame, frameset, object, embed").forEach(de=>de.remove()),X.querySelectorAll("template").forEach(de=>p(de.content)),X.querySelectorAll("a, area").forEach(de=>{for(const Pe of["href","xlink:href"])de.getAttribute(Pe)?.startsWith("#")||de.removeAttribute(Pe);de.removeAttribute("target"),de.removeAttribute("ping"),de.removeAttribute("download")})};p(f);const g=X=>JSON.stringify(X).replace(/</g,"\\u003c"),L=f.createElement("meta");L.httpEquiv="Content-Security-Policy",L.content=r.csp;const b=f.createElement("meta");b.setAttribute("charset","utf-8");const h=f.createElement("style"),A=/^data:[\w.+/-]+;base64,[A-Za-z0-9+/=]+$/.test(c)?`@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900;
|
|
258
258
|
font-display: swap; src: url('${c}') format('woff2'); }`:"";h.textContent=`${A}${r.styles}`;const T=f.createElement("script"),H=g([a,s,r.maxScrollDelta,r.lockHeight,t(l)?l:null]);T.textContent=`(${r.bridge})(...${H}, (${r.validate}));`,f.head.prepend(L,b,h,T);const B=`<!doctype html>${f.documentElement.outerHTML}`,O=document.implementation.createHTMLDocument(""),D=O.createElement("meta");D.httpEquiv="Content-Security-Policy",D.content=r.csp.replace("frame-src 'none'","frame-src about:");const U=O.createElement("meta");U.setAttribute("charset","utf-8");const C=O.createElement("style");C.textContent="html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }";const F=O.createElement("script"),K=g([a,B,o,r.maxScrollDelta]);return F.textContent=`(${r.shell})(...${K}, (${r.validate}));`,O.head.prepend(D,U,C,F),`<!doctype html>${O.documentElement.outerHTML}`}const h1=()=>({csp:p1,styles:d1,maxScrollDelta:gu,lockHeight:f1,bridge:g1.toString(),shell:v1.toString(),validate:li.toString()});function b1(r,t,n,a,s=null,o=""){return m1(h1(),li,r,t,n,a,s,o)}function pc(r){const t=getComputedStyle(r);return{dark:document.documentElement.classList.contains("dark"),variables:{...Object.fromEntries(u1.map(n=>[`--${n}`,t.getPropertyValue(`--${n}`).trim()])),"--inline-html-root-font-size":getComputedStyle(document.documentElement).fontSize}}}function y1(r,t,n,a,s=null){return b1(r,t,n,a,s,c1)}var _1=I('<p class="type-caption m-0 break-words px-4 pb-2 text-muted-foreground"> </p>'),x1=I('<div class="type-body flex items-center justify-between gap-3 px-4 py-2" role="status"><span class="text-danger"> </span> <!></div> <!>',1),w1=I('<p class="sr-only" role="status"> </p>'),k1=I('<p class="type-body m-0 px-4 py-3 text-muted-foreground" role="status"> </p>'),I1=I('<div class="type-body px-4 py-2 text-danger" role="status"><p class="m-0"> </p> <p class="type-code m-0 break-words"> </p></div>'),S1=I('<iframe sandbox="allow-scripts" referrerpolicy="no-referrer"></iframe>'),C1=I('<div class="space-y-4 p-4" aria-hidden="true"><div class="space-y-2"><!> <!></div> <!> <div class="flex items-center gap-4"><!> <!> <!></div></div>'),E1=I('<span class="type-caption ml-auto text-muted-foreground" role="status"> </span>'),P1=I('<p class="type-caption m-0 break-words px-4 pb-2 text-muted-foreground" role="status"> <!></p>'),A1=I('<th class="min-w-40 px-2 pb-3 align-top font-normal"><!> <div class="mt-1 flex gap-1"><!> <!></div></th>'),T1=I('<td class="max-w-56 px-2 py-2 align-top break-words tabular-nums"> </td>'),R1=I('<tr><th class="max-w-48 py-2 pr-4 align-top font-normal break-words text-muted-foreground"> </th><!></tr>'),L1=I('<div class="overflow-x-auto px-4 pb-4" data-inline-visual-comparison=""><table class="type-body w-full border-separate border-spacing-0 text-left"><thead><tr><th class="min-w-28 pr-4 pb-3 font-normal text-muted-foreground"> </th><th class="min-w-32 px-2 pb-3 align-top font-medium"> </th><!></tr></thead><tbody></tbody></table></div>'),N1=I('<div class="flex flex-wrap items-center gap-1 px-4 py-2" data-inline-visual-actions=""><!> <!> <!> <!> <!></div> <!> <!>',1),M1=I('<div data-inline-html="" class="my-3 min-w-0 overflow-hidden rounded-lg bg-background text-foreground"><div class="flex min-w-0 items-center justify-end gap-1 p-1"><!> <!></div> <!> <!> <div class="relative min-w-0"><!> <!></div> <!></div>');function vu(r,t){if(new.target)return Ht({component:vu,...r});Ut(t,!0);const n=720;let a=y(t,"source",7),s=y(t,"isStreaming",7,!1),o=y(t,"isComplete",7,!0),l=y(t,"record",7),c=y(t,"storageStatus",7,"ready"),f=y(t,"onRecordChange",7),i=y(t,"onUseConfiguration",7),p=y(t,"onExport",7),g=y(t,"onRetry",7),L=y(t,"storageError",7),b=y(t,"exportStatus",7),h=y(t,"exportPath",7),A=y(t,"exportError",7),T,H=we(void 0),B=we(!1),O=we(!1),D=we(0),U=we(""),C=we(""),F=we(!1),K=we(""),X=we(Ur(Po)),de=we(n),Pe=we(""),ue=we(nl()),Z=we(void 0),ge,Me=we(void 0),G=we(!1);const fe=u(()=>l()??e(ue)),$=u(()=>c()!=="loading"&&(c()!=="error"||!!e(fe).current)),Ae=u(()=>!s()&&o()&&!!a().trim()&&e($)),Se=u(()=>Math.min(fc,Math.max(Po,e(X)))),Ie=u(()=>s()||c()==="loading"?"loading":o()?a().trim()?e(K)?"error":e(F)?"ready":"loading":"empty":"incomplete"),Ye=u(()=>s()||c()==="loading"||e(Ae)&&!e(F)&&!e(K));function Xe(ee){const ke={...ee,current:e(Z)??ee.current};N(ue,ke),f()?.(ke)}function $e(){const ee=e(Z);!ee||e(fe).scenarios.length>=al||(Xe({...e(fe),scenarios:[...e(fe).scenarios,{id:crypto.randomUUID(),name:xf({number:Vi(e(fe).scenarios.length+1)}),snapshot:structuredClone(ee)}]}),N(G,!0))}function te(ee,ke){const at=ke.trim().slice(0,120);at&&Xe({...e(fe),scenarios:e(fe).scenarios.map(et=>et.id===ee?{...et,name:at}:et)})}function Q(ee){const ke=structuredClone(ee);N(Z,ke),N(Me,ke),Xe({...e(fe),current:ke}),N(D,e(D)+1)}function tt(ee){return typeof ee=="number"?Vi(ee):typeof ee=="string"?ee:JSON.stringify(ee)}function J(){!e(H)?.contentWindow||!e(C)||e(H).contentWindow.postMessage({channel:e(C),type:"theme",theme:pc(T)},"*")}function V(ee){let ke=T.parentElement;for(;ke;){const at=getComputedStyle(ke),et=ke.scrollHeight-ke.clientHeight;if(/^(auto|scroll|overlay)$/.test(at.overflowY)&&et>1){if(ee<0?ke.scrollTop>0:ke.scrollTop<et){ke.dispatchEvent(new WheelEvent("wheel",{deltaY:ee,bubbles:!0})),ke.scrollTop+=ee;return}if(/^(contain|none)$/.test(at.overscrollBehaviorY))return}ke=ke.parentElement}window.scrollBy({top:ee,behavior:"instant"})}Ct(()=>{if(!e(B))return;const ee=a(),ke=e(Ae);e(D),Ln(()=>{ge!==ee&&(N(ue,nl()),N(Z,void 0),N(G,!1),N(Me,void 0),ge=ee),N(F,!1),N(K,""),N(Pe,""),N(X,Po,!0),N(C,crypto.randomUUID(),!0),N(U,ke?y1(ee,e(C),pc(T),Wi(),e(Me)??e(Z)??e(fe).current):"",!0),N(Me,void 0)})}),gs(()=>{N(B,!0);const ee=gt=>{if(gt.source!==e(H)?.contentWindow||gt.origin!=="null")return;const He=gt.data;if(!(!He||typeof He!="object"||He.channel!==e(C)))if(He.type==="resize"&&typeof He.height=="number"&&Number.isFinite(He.height)&&He.height>=0)N(X,Math.min(fc,Math.ceil(He.height)),!0);else if(He.type==="ready")N(F,!0),J();else if(He.type==="error"&&typeof He.message=="string")N(K,He.message.slice(0,300),!0);else if(He.type==="layout"&&typeof He.message=="string")N(Pe,He.message.slice(0,300),!0);else if(He.type==="snapshot"&&e(Ae)&&li(He.snapshot)){const ht=He.snapshot;N(Z,ht),Xe({...e(fe),current:ht})}else He.type==="wheel"&&e(F)&&e(Ae)&&!e(O)&&!e(Ye)&&typeof He.deltaY=="number"&&Number.isFinite(He.deltaY)&&He.deltaY!==0&&Math.abs(He.deltaY)<=gu&&V(He.deltaY)},ke=()=>{N(de,Math.min(n,Math.max(160,Math.floor(window.innerHeight*.8))),!0)},at=new MutationObserver(J);at.observe(document.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]});const et=window.matchMedia("(prefers-color-scheme: dark)");return et.addEventListener("change",J),window.addEventListener("message",ee),window.addEventListener("resize",ke),ke(),()=>{at.disconnect(),et.removeEventListener("change",J),window.removeEventListener("message",ee),window.removeEventListener("resize",ke)}});var q={get source(){return a()},set source(ee){a(ee),_()},get isStreaming(){return s()},set isStreaming(ee=!1){s(ee),_()},get isComplete(){return o()},set isComplete(ee=!0){o(ee),_()},get record(){return l()},set record(ee){l(ee),_()},get storageStatus(){return c()},set storageStatus(ee="ready"){c(ee),_()},get onRecordChange(){return f()},set onRecordChange(ee){f(ee),_()},get onUseConfiguration(){return i()},set onUseConfiguration(ee){i(ee),_()},get onExport(){return p()},set onExport(ee){p(ee),_()},get onRetry(){return g()},set onRetry(ee){g(ee),_()},get storageError(){return L()},set storageError(ee){L(ee),_()},get exportStatus(){return b()},set exportStatus(ee){b(ee),_()},get exportPath(){return h()},set exportPath(ee){h(ee),_()},get exportError(){return A()},set exportError(ee){A(ee),_()},$set:jt,$on:(ee,ke)=>Wt(t,ee,ke)},ce=M1(),_e=S(ce),Y=S(_e);yt(Y,{variant:"ghost",size:"sm",get active(){return e(O)},get"aria-pressed"(){return e(O)},onclick:()=>{N(O,!e(O))},children:(ee,ke)=>{sr();var at=Lt();k(et=>x(at,et),[()=>e(O)?uf():ff()]),d(ee,at)},$$slots:{default:!0}});var he=v(Y,2);{let ee=u(()=>!e(Ae));yt(he,{variant:"ghost",size:"sm",get disabled(){return e(ee)},onclick:()=>{N(D,e(D)+1)},children:(ke,at)=>{sr();var et=Lt();k(gt=>x(et,gt),[()=>pf()]),d(ke,et)},$$slots:{default:!0}})}w(_e);var Le=v(_e,2);{var je=ee=>{var ke=x1(),at=ze(ke),et=S(at),gt=R(et,!0),He=v(et,2);{var ht=ft=>{yt(ft,{variant:"ghost",size:"sm",get onclick(){return g()},children:(Pt,At)=>{sr();var Zt=Lt();k(xt=>x(Zt,xt),[()=>wf()]),d(Pt,Zt)},$$slots:{default:!0}})};M(He,ft=>{g()&&ft(ht)})}w(at);var ot=v(at,2);{var vt=ft=>{var Pt=_1(),At=R(Pt,!0);k(()=>x(At,L())),d(ft,Pt)};M(ot,ft=>{L()&&ft(vt)})}k(ft=>x(gt,ft),[()=>gf()]),d(ee,ke)};M(Le,ee=>{c()==="error"&&ee(je)})}var st=v(Le,2);{var z=ee=>{var ke=w1(),at=R(ke,!0);k(et=>x(at,et),[()=>s()?vf():mf()]),d(ee,ke)},ie=ee=>{var ke=k1(),at=R(ke,!0);k(et=>x(at,et),[()=>o()?bf():hf()]),d(ee,ke)},Te=ee=>{var ke=I1(),at=S(ke),et=R(at,!0),gt=v(at,2),He=R(gt,!0);w(ke),k(ht=>{x(et,ht),x(He,e(K))},[()=>yf()]),d(ee,ke)};M(st,ee=>{e(Ye)?ee(z):e(Ae)?e(K)&&ee(Te,2):ee(ie,1)})}var Ge=v(st,2),ve=S(Ge);{var P=ee=>{var ke=S1();let at,et;gr(ke,gt=>N(H,gt),()=>e(H)),k(gt=>{oe(ke,"title",gt),oe(ke,"srcdoc",e(U)),at=mt(ke,1,"block w-full border-0 svelte-1kkow1d",null,at,{"preview-hidden":e(O)||e(Ye)}),oe(ke,"aria-hidden",e(O)||e(Ye)),et=Mn(ke,"",et,{height:`${e(Se)}px`})},[()=>Wi()]),d(ee,ke)};M(ve,ee=>{e(Ae)&&e(U)&&ee(P)})}var j=v(ve,2);{var me=ee=>{na(ee,{get code(){return a()},language:"html",noBorder:!0,noMargin:!0,get maxHeight(){return e(de)}})},qe=ee=>{var ke=C1(),at=S(ke),et=S(at);za(et,{class:"h-4 w-32 max-w-1/2"});var gt=v(et,2);za(gt,{class:"h-3 w-2/3"}),w(at);var He=v(at,2);za(He,{class:"aspect-video max-h-60 w-full rounded-lg"});var ht=v(He,2),ot=S(ht);za(ot,{class:"h-3 w-16"});var vt=v(ot,2);za(vt,{class:"h-2 min-w-0 flex-1"});var ft=v(vt,2);za(ft,{class:"h-3 w-10"}),w(ht),w(ke),d(ee,ke)};M(j,ee=>{e(O)?ee(me):e(Ye)&&ee(qe,1)})}w(Ge);var Ce=v(Ge,2);{var Ve=ee=>{var ke=N1(),at=ze(ke),et=S(at);{var gt=St=>{{let Gt=u(()=>!e(F)||!!e(K));yt(St,{size:"sm",get disabled(){return e(Gt)},onclick:()=>e(Z)&&i()(e(Z)),children:(Ot,pe)=>{sr();var re=Lt();k(Ue=>x(re,Ue),[()=>kf()]),d(Ot,re)},$$slots:{default:!0}})}};M(et,St=>{i()&&St(gt)})}var He=v(et,2);{let St=u(()=>!e(F)||!!e(K)||e(fe).scenarios.length>=al);yt(He,{variant:"ghost",size:"sm",get disabled(){return e(St)},onclick:$e,children:(Gt,Ot)=>{sr();var pe=Lt();k(re=>x(pe,re),[()=>_f()]),d(Gt,pe)},$$slots:{default:!0}})}var ht=v(He,2);{var ot=St=>{yt(St,{variant:"ghost",size:"sm",get active(){return e(G)},get"aria-expanded"(){return e(G)},onclick:()=>N(G,!e(G)),children:(Gt,Ot)=>{sr();var pe=Lt();k(re=>x(pe,re),[()=>If()]),d(Gt,pe)},$$slots:{default:!0}})};M(ht,St=>{e(fe).scenarios.length&&St(ot)})}var vt=v(ht,2);{var ft=St=>{{let Gt=u(()=>!e(F)||b()==="saving");yt(St,{variant:"ghost",size:"sm",get disabled(){return e(Gt)},onclick:()=>p()({...e(fe),current:e(Z)??null}),children:(Ot,pe)=>{sr();var re=Lt();k(Ue=>x(re,Ue),[()=>Sf()]),d(Ot,re)},$$slots:{default:!0}})}};M(vt,St=>{p()&&St(ft)})}var Pt=v(vt,2);{var At=St=>{var Gt=E1(),Ot=R(Gt,!0);k(pe=>x(Ot,pe),[()=>c()==="saving"?Cf():c()==="ready"?Ef():""]),d(St,Gt)};M(Pt,St=>{f()&&St(At)})}w(at);var Zt=v(at,2);{var xt=St=>{var Gt=P1(),Ot=S(Gt),pe=v(Ot);{var re=Ue=>{var rt=Lt();k(()=>x(rt,A())),d(Ue,rt)};M(pe,Ue=>{b()==="error"&&A()&&Ue(re)})}w(Gt),k(Ue=>x(Ot,`${Ue??""} `),[()=>b()==="saving"?Pf():b()==="saved"?Af({path:h()??""}):Tf()]),d(St,Gt)};M(Zt,St=>{b()&&St(xt)})}var zt=v(Zt,2);{var er=St=>{var Gt=L1(),Ot=S(Gt),pe=S(Ot),re=S(pe),Ue=S(re),rt=R(Ue,!0),lt=v(Ue),Oe=R(lt,!0),se=v(lt);Tt(se,17,()=>e(fe).scenarios,ae=>ae.id,(ae,be)=>{var xe=A1(),Be=S(xe);{let De=u(()=>Nf());Ua(Be,{get value(){return e(be).name},get"aria-label"(){return e(De)},maxlength:120,onblur:Fe=>{Fe.currentTarget.value.trim()||(Fe.currentTarget.value=e(be).name),te(e(be).id,Fe.currentTarget.value)},onkeydown:Fe=>{Fe.key==="Enter"&&Fe.currentTarget.blur(),Fe.key==="Escape"&&(Fe.currentTarget.value=e(be).name,Fe.currentTarget.blur())}})}var Re=v(Be,2),Ze=S(Re);yt(Ze,{variant:"ghost",size:"sm",onclick:()=>Q(e(be).snapshot),children:(De,Fe)=>{sr();var We=Lt();k(Qe=>x(We,Qe),[()=>Rf()]),d(De,We)},$$slots:{default:!0}});var Je=v(Ze,2);yt(Je,{variant:"ghost",size:"sm",onclick:()=>Xe({...e(fe),scenarios:e(fe).scenarios.filter(De=>De.id!==e(be).id)}),children:(De,Fe)=>{sr();var We=Lt();k(Qe=>x(We,Qe),[()=>Lf()]),d(De,We)},$$slots:{default:!0}}),w(Re),w(xe),d(ae,xe)}),w(re),w(pe);var le=v(pe);Tt(le,20,()=>["inputs","results"],Rr,(ae,be)=>{const xe=u(()=>be),Be=u(()=>Array.from(new Set([...Object.keys(e(Z)[e(xe)]),...e(fe).scenarios.flatMap(Je=>Object.keys(Je.snapshot[e(xe)]))])));var Re=kt(),Ze=ze(Re);Tt(Ze,16,()=>e(Be),Je=>Je,(Je,De)=>{var Fe=R1(),We=S(Fe),Qe=R(We,!0),ut=v(We);Tt(ut,17,()=>[e(Z),...e(fe).scenarios.map(ct=>ct.snapshot)],Rr,(ct,dt)=>{var wt=T1(),bt=R(wt,!0);k(Rt=>x(bt,Rt),[()=>Object.hasOwn(e(dt)[e(xe)],De)?tt(e(dt)[e(xe)][De]):"—"]),d(ct,wt)}),w(Fe),k(()=>x(Qe,De)),d(Je,Fe)}),d(ae,Re)}),w(le),w(Ot),w(Gt),k(ae=>{x(rt,e(Z).title),x(Oe,ae)},[()=>Mf()]),d(St,Gt)};M(zt,St=>{e(G)&&e(fe).scenarios.length&&St(er)})}d(ee,ke)};M(Ce,ee=>{e(Z)&&e(Ae)&&ee(Ve)})}return w(ce),gr(ce,ee=>T=ee,()=>T),k(()=>{oe(ce,"data-inline-html-status",e(Ie)),oe(ce,"data-inline-html-layout",e(Pe)?"viewport-locked":void 0),oe(ce,"aria-busy",e(Ye))}),d(r,ce),qt(q)}var O1=I('<div class="w-full min-w-0"><!></div>');function D1(r,t){if(new.target)return Ht({component:D1,...r});Ut(t,!0);const n=()=>Ft(e(b),"$agent$",s),a=()=>Ft(e(H),"$entry$",s),[s,o]=ca();let l=y(t,"block",7),c=y(t,"role",7),f=y(t,"workspaceId",7),i=y(t,"agentId",7),p=y(t,"messageId",7),g=y(t,"contentBlockKey",7,""),L=we(void 0);const b=u(()=>Gs(i()??"")),h=u(()=>c()==="assistant"&&f()&&i()&&p()&&l().metadata?.fenceClosed&&!l().metadata?.isStreaming&&n()&&!$c(n())?{workspaceId:f(),agentId:i(),messageId:p(),blockKey:JSON.stringify([g(),l().metadata?.fenceStart??0]),source:l().content}:void 0),A=u(()=>!!(f()&&i()&&p()&&l().metadata?.fenceClosed&&!n())),T=u(()=>e(h)?_g(e(h)):""),H=u(()=>am(e(T)));Ct(()=>{e(h)&&Mt.dispatch(mg(e(h)))});function B(X){!f()||!i()||n()?.retiredAt||e(L)?.dispatchEvent(new CustomEvent(th,{bubbles:!0,detail:{workspaceId:f(),agentId:i(),snapshot:X}}))}var O={get block(){return l()},set block(X){l(X),_()},get role(){return c()},set role(X){c(X),_()},get workspaceId(){return f()},set workspaceId(X){f(X),_()},get agentId(){return i()},set agentId(X){i(X),_()},get messageId(){return p()},set messageId(X){p(X),_()},get contentBlockKey(){return g()},set contentBlockKey(X=""){g(X),_()},$set:jt,$on:(X,de)=>Wt(t,X,de)},D=kt(),U=ze(D);{var C=X=>{var de=O1(),Pe=S(de);{let ue=u(()=>l().metadata?.isStreaming??!1),Z=u(()=>l().metadata?.fenceClosed??!1),ge=u(()=>a()?.record),Me=u(()=>e(h)?a()?.status??"loading":e(A)?"loading":"ready"),G=u(()=>a()?.error),fe=u(()=>e(h)?$e=>Mt.dispatch(yg(e(T),$e)):void 0),$=u(()=>f()&&i()&&n()&&!n().retiredAt?B:void 0),Ae=u(()=>e(h)?()=>Mt.dispatch(bg(e(T))):void 0),Se=u(()=>e(h)?$e=>Mt.dispatch(hg(e(T),crypto.randomUUID(),$e)):void 0),Ie=u(()=>a()?.export?.status),Ye=u(()=>a()?.export?.path),Xe=u(()=>a()?.export?.error);vu(Pe,{get source(){return l().content},get isStreaming(){return e(ue)},get isComplete(){return e(Z)},get record(){return e(ge)},get storageStatus(){return e(Me)},get storageError(){return e(G)},get onRecordChange(){return e(fe)},get onUseConfiguration(){return e($)},get onRetry(){return e(Ae)},get onExport(){return e(Se)},get exportStatus(){return e(Ie)},get exportPath(){return e(Ye)},get exportError(){return e(Xe)}})}w(de),gr(de,ue=>N(L,ue),()=>e(L)),d(X,de)},F=X=>{na(X,{get code(){return l().content},language:"html"})};M(U,X=>{c()==="assistant"?X(C):X(F,-1)})}d(r,D);var K=qt(O);return o(),K}var B1=I('<div class="digest-card flex items-start gap-2.5 py-5 px-6 my-4 shadow-xs text-base leading-normal border border-border"> </div>');function F1(r,t){if(new.target)return Ht({component:F1,...r});Ut(t,!0);let n=y(t,"digest",7);var a={get digest(){return n()},set digest(l){n(l),_()},$set:jt,$on:(l,c)=>Wt(t,l,c)},s=B1(),o=R(s,!0);return k(()=>x(o,n())),d(r,s),qt(a)}var z1=I('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-500/15 text-blue-600 dark:text-blue-400"> </span>'),H1=I('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-muted text-muted-foreground"> </span>'),j1=I('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-primary/10 text-primary/80"> </span>'),W1=I('<div class="flex items-start gap-3 px-4 py-2.5"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 flex-wrap"><span class="text-sm font-semibold text-foreground"> </span> <!> <!></div> <div class="mt-0.5 text-xs font-mono text-muted-foreground truncate"> </div></div></div>'),U1=I('<div class="detected-scripts-card my-3 rounded-lg border border-border bg-muted/30 overflow-hidden"><div class="flex items-center gap-2 px-4 py-2.5 border-b border-border bg-muted/40"><!> <span class="text-sm font-semibold text-foreground"> </span></div> <div class="divide-y divide-border"></div> <div class="px-4 py-2 border-t border-border bg-muted/20"><span class="text-xs text-muted-foreground"> </span></div></div>');function q1(r,t){if(new.target)return Ht({component:q1,...r});Ut(t,!0);let n=y(t,"scripts",7);var a={get scripts(){return n()},set scripts(b){n(b),_()},$set:jt,$on:(b,h)=>Wt(t,b,h)},s=U1(),o=S(s),l=S(o);Et(l,{get icon(){return Fc},size:"sm",class:"text-primary-ink/70"});var c=v(l,2),f=R(c,!0);w(o);var i=v(o,2);Tt(i,21,n,b=>b.name+b.command,(b,h)=>{var A=W1(),T=S(A),H=S(T),B=S(H),O=R(B,!0),D=v(B,2);{var U=Pe=>{var ue=z1(),Z=R(ue,!0);k(ge=>x(Z,ge),[()=>m.chat_detectedScripts_service_badge()]),d(Pe,ue)},C=Pe=>{var ue=H1(),Z=R(ue,!0);k(ge=>x(Z,ge),[()=>m.chat_detectedScripts_command_badge()]),d(Pe,ue)};M(D,Pe=>{e(h).mode==="service"?Pe(U):Pe(C,-1)})}var F=v(D,2);{var K=Pe=>{var ue=j1(),Z=R(ue,!0);k(()=>x(Z,e(h).category)),d(Pe,ue)};M(F,Pe=>{e(h).category&&e(h).category!=="other"&&Pe(K)})}w(H);var X=v(H,2),de=R(X,!0);w(T),w(A),k(()=>{x(O,e(h).name),x(de,e(h).command)}),d(b,A)}),w(i);var p=v(i,2),g=S(p),L=R(g,!0);return w(p),w(s),k((b,h)=>{x(f,b),x(L,h)},[()=>m.chat_detectedScripts_title(),()=>n().length===1?m.chat_detectedScripts_count_one({count:lr(n().length)}):m.chat_detectedScripts_count_many({count:lr(n().length)})]),d(r,s),qt(a)}function V1(r,t){if(new.target)return Ht({component:V1,...r});Ut(t,!0);let n=y(t,"diff",7),a=y(t,"filePath",7),s=y(t,"language",7),o=y(t,"onApply",7),l=y(t,"onReject",7);function c(){o()?.(),ra.success(m.chat_diffViewer_applied_toast())}function f(){l()?.(),ra.info(m.chat_diffViewer_rejected_toast())}const i=u(()=>{const g=[];return o()&&g.push({label:m.chat_diffViewer_apply_label(),variant:"success",onClick:c}),l()&&g.push({label:m.chat_diffViewer_reject_label(),variant:"danger",onClick:f}),g});var p={get diff(){return n()},set diff(g){n(g),_()},get filePath(){return a()},set filePath(g){a(g),_()},get language(){return s()},set language(g){s(g),_()},get onApply(){return o()},set onApply(g){o(g),_()},get onReject(){return l()},set onReject(g){l(g),_()},$set:jt,$on:(g,L)=>Wt(t,g,L)};{let g=u(()=>a()||m.chat_diffViewer_suggestedChanges_fallback());is(r,{get patch(){return n()},get fileName(){return e(g)},get language(){return s()},get actions(){return e(i)},collapsible:!0,initialCollapsed:!1,maxHeight:"500px"})}return qt(p)}var K1=ya('<circle fill="none" style="transition: stroke-dasharray 0.3s ease-out"></circle>'),gc=ya("<circle></circle>"),G1=ya('<svg class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 fill-background" viewBox="0 0 8 6"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.69471 1.69471C7.87687 1.50611 7.97766 1.25351 7.97539 0.991311C7.97311 0.729114 7.86794 0.478302 7.68253 0.292894C7.49712 0.107485 7.24631 0.00231622 6.98411 3.78025e-05C6.72192 -0.00224062 6.46931 0.0985542 6.28071 0.280712L2.98771 3.57371L1.69471 2.28071C1.50611 2.09855 1.25351 1.99776 0.991311 2.00004C0.729114 2.00232 0.478302 2.10749 0.292894 2.29289C0.107485 2.4783 0.00231622 2.72911 3.78025e-05 2.99131C-0.00224062 3.25351 0.0985542 3.50611 0.280712 3.69471L2.28071 5.69471C2.46824 5.88218 2.72255 5.9875 2.98771 5.9875C3.25288 5.9875 3.50718 5.88218 3.69471 5.69471L7.69471 1.69471Z"></path></svg>'),J1=I('<div class="relative"><svg fill="none" xmlns="http://www.w3.org/2000/svg"><circle fill="none"></circle><!></svg> <!></div>');function Ls(r,t){if(new.target)return Ht({component:Ls,...r});Ut(t,!0);let n=y(t,"phase",7),a=y(t,"progress",7,0),s=y(t,"size",7,16),o=y(t,"class",7,""),l=u(()=>s()/2),c=u(()=>e(l)),f=u(()=>e(l)),i=u(()=>s()*.12),p=u(()=>e(l)-e(i)/2),g=u(()=>e(l)*.35),L=u(()=>2*Math.PI*e(g)),b=u(()=>Math.max(0,Math.min(1,a()))*e(L));const h={planning:"#99999999",building:"#54B1F3",reviewing:"#6D7FF5",shipped:"var(--color-foreground)"};let A=u(()=>h[n()]||"currentColor");var T={get phase(){return n()},set phase(ue){n(ue),_()},get progress(){return a()},set progress(ue=0){a(ue),_()},get size(){return s()},set size(ue=16){s(ue),_()},get class(){return o()},set class(ue=""){o(ue),_()},$set:jt,$on:(ue,Z)=>Wt(t,ue,Z)},H=J1(),B=S(H),O=S(B),D=v(O);{var U=ue=>{},C=ue=>{var Z=K1();k(()=>{oe(Z,"cx",e(c)),oe(Z,"cy",e(f)),oe(Z,"r",e(g)*.8),oe(Z,"stroke",e(A)),oe(Z,"stroke-width",e(g)*1.5),oe(Z,"stroke-dasharray",`${e(b)??""} ${e(L)??""}`),oe(Z,"stroke-dashoffset",e(L)*.25),oe(Z,"transform",`rotate(-90 ${e(c)??""} ${e(f)??""})`)}),d(ue,Z)},F=ue=>{var Z=gc();k(()=>{oe(Z,"cx",e(c)),oe(Z,"cy",e(f)),oe(Z,"r",e(p)*.6),oe(Z,"fill",e(A))}),d(ue,Z)},K=ue=>{var Z=gc();k(()=>{oe(Z,"cx",e(c)),oe(Z,"cy",e(f)),oe(Z,"r",e(p)),oe(Z,"fill",e(A))}),d(ue,Z)};M(D,ue=>{n()==="planning"?ue(U):n()==="building"?ue(C,1):n()==="reviewing"?ue(F,2):n()==="shipped"&&ue(K,3)})}w(B);var X=v(B,2);{var de=ue=>{},Pe=ue=>{var Z=G1();k(()=>oe(Z,"width",s()*.5)),d(ue,Z)};M(X,ue=>{n()==="reviewing"?ue(de):n()==="shipped"&&ue(Pe,1)})}return w(H),k(()=>{oe(B,"width",s()),oe(B,"height",s()),oe(B,"viewBox",`0 0 ${s()??""} ${s()??""}`),mt(B,0,cr(o())),oe(O,"cx",e(c)),oe(O,"cy",e(f)),oe(O,"r",e(p)),oe(O,"stroke",e(A)),oe(O,"stroke-width",e(i))}),d(r,H),qt(T)}var vc=I('<span class="flex items-center gap-1"><span class="size-1.5 rounded-full"></span> </span>'),Y1=I('<span class="flex items-center gap-1"><span class="size-1.5 rounded-full bg-border"></span> </span>'),mc=I('<span class="text-ui text-subtle truncate"> </span>'),hc=I('<div class="flex items-center gap-1 mt-0.5"><!> <!></div>'),bc=I('<div class="flex items-start gap-2"><div class="shrink-0 mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="text-xs leading-snug truncate"> </div> <!></div></div>'),X1=I('<div class="flex items-center gap-2"><div class="shrink-0"><!></div> <span class="text-ui text-subtle truncate line-through"> </span></div>'),Z1=I('<span class="text-ui text-subtle pl-4"> </span>'),Q1=I('<div class="flex flex-col gap-0.5 pt-1 border-t border-border"><!> <!></div>'),$1=I('<div class="text-ui text-subtle"> </div>'),e0=I("<!> <!> <!> <!>",1),t0=I('<div class="flex flex-col py-2 px-3 gap-2 max-h-80 overflow-y-auto"><div class="flex items-center justify-between gap-3"><span class="text-xs font-semibold text-foreground"> </span> <div class="flex items-center gap-3 text-ui text-subtle"><!> <!> <!></div></div> <!></div>'),r0=I('<div class="rounded-[0.5px]"></div>');function mu(r,t){if(new.target)return Ht({component:mu,...r});Ut(t,!0);let n=y(t,"stats",7),a=y(t,"tasks",23,()=>[]),s=y(t,"maxBars",7,20),o=y(t,"barWidth",7,"1px"),l=y(t,"barHeight",7,"16px"),c=y(t,"gap",7,"1px"),f=y(t,"class",7);const i={completed:"#22c55e",inProgress:"#4F7BF7",notStarted:"var(--border)"};let p=u(()=>{const{completed:D,inProgress:U,notStarted:C,total:F}=n();if(F===0)return[];const K=[...Array(D).fill("completed"),...Array(U).fill("inProgress"),...Array(Math.max(0,C)).fill("notStarted")];return K.length<=s()?K:K.slice(K.length-s())}),g=u(()=>a().filter(D=>D.status==="complete")),L=u(()=>a().filter(D=>D.status==="in_progress"||D.status==="review_required")),b=u(()=>a().filter(D=>D.status!=="complete"&&D.status!=="in_progress"&&D.status!=="review_required"&&D.status!=="cancelled")),h=u(()=>a().filter(D=>D.status==="cancelled")),A=u(()=>a().length>0);var T={get stats(){return n()},set stats(D){n(D),_()},get tasks(){return a()},set tasks(D=[]){a(D),_()},get maxBars(){return s()},set maxBars(D=20){s(D),_()},get barWidth(){return o()},set barWidth(D="1px"){o(D),_()},get barHeight(){return l()},set barHeight(D="16px"){l(D),_()},get gap(){return c()},set gap(D="1px"){c(D),_()},get class(){return f()},set class(D){f(D),_()},$set:jt,$on:(D,U)=>Wt(t,D,U)},H=kt(),B=ze(H);{var O=D=>{No(D,{side:"top",align:"start",sideOffset:6,contentClass:"max-w-xs p-0",delayDuration:200,disableHoverableContent:!1,content:C=>{var F=t0(),K=S(F),X=S(K),de=R(X,!0),Pe=v(X,2),ue=S(Pe);{var Z=Se=>{var Ie=vc(),Ye=S(Ie);Mn(Ye,"",{},{"background-color":"#22c55e"});var Xe=v(Ye);w(Ie),k(()=>x(Xe,` ${n().completed??""}`)),d(Se,Ie)};M(ue,Se=>{n().completed>0&&Se(Z)})}var ge=v(ue,2);{var Me=Se=>{var Ie=vc(),Ye=S(Ie);Mn(Ye,"",{},{"background-color":"#4F7BF7"});var Xe=v(Ye);w(Ie),k(()=>x(Xe,` ${n().inProgress??""}`)),d(Se,Ie)};M(ge,Se=>{n().inProgress>0&&Se(Me)})}var G=v(ge,2);{var fe=Se=>{var Ie=Y1(),Ye=v(S(Ie));w(Ie),k(()=>x(Ye,` ${n().notStarted??""}`)),d(Se,Ie)};M(G,Se=>{n().notStarted>0&&Se(fe)})}w(Pe),w(K);var $=v(K,2);{var Ae=Se=>{var Ie=e0(),Ye=ze(Ie);Tt(Ye,17,()=>e(L),Rr,(J,V)=>{var q=bc(),ce=S(q),_e=S(ce);vo(_e,{get status(){return e(V).status},size:14}),w(ce);var Y=v(ce,2),he=S(Y),Le=R(he,!0),je=v(he,2);{var st=z=>{var ie=hc(),Te=S(ie);{let P=u(()=>e(V).agentState||"idle");Yi(Te,{get agentId(){return e(V).agentId},get state(){return e(P)},size:12,get specialist(){return e(V).agentSpecialist}})}var Ge=v(Te,2);{var ve=P=>{var j=mc(),me=R(j,!0);k(()=>x(me,e(V).agentName)),d(P,j)};M(Ge,P=>{e(V).agentName&&P(ve)})}w(ie),d(z,ie)};M(je,z=>{e(V).agentId&&z(st)})}w(Y),w(q),k(()=>x(Le,e(V).title)),d(J,q)});var Xe=v(Ye,2);Tt(Xe,17,()=>e(b),Rr,(J,V)=>{var q=bc(),ce=S(q),_e=S(ce);vo(_e,{get status(){return e(V).status},size:14}),w(ce);var Y=v(ce,2),he=S(Y),Le=R(he,!0),je=v(he,2);{var st=z=>{var ie=hc(),Te=S(ie);{let P=u(()=>e(V).agentState||"idle");Yi(Te,{get agentId(){return e(V).agentId},get state(){return e(P)},size:12,get specialist(){return e(V).agentSpecialist}})}var Ge=v(Te,2);{var ve=P=>{var j=mc(),me=R(j,!0);k(()=>x(me,e(V).agentName)),d(P,j)};M(Ge,P=>{e(V).agentName&&P(ve)})}w(ie),d(z,ie)};M(je,z=>{e(V).agentId&&z(st)})}w(Y),w(q),k(()=>x(Le,e(V).title)),d(J,q)});var $e=v(Xe,2);{var te=J=>{var V=Q1(),q=S(V);Tt(q,17,()=>e(g).slice(0,3),Rr,(Y,he)=>{var Le=X1(),je=S(Le),st=S(je);vo(st,{status:"complete",size:12}),w(je);var z=v(je,2),ie=R(z,!0);w(Le),k(()=>x(ie,e(he).title)),d(Y,Le)});var ce=v(q,2);{var _e=Y=>{var he=Z1(),Le=R(he,!0);k(je=>x(Le,je),[()=>m.workspace_taskProgressBar_moreCompleted_label({count:lr(e(g).length-3)})]),d(Y,he)};M(ce,Y=>{e(g).length>3&&Y(_e)})}w(V),d(J,V)};M($e,J=>{e(g).length>0&&J(te)})}var Q=v($e,2);{var tt=J=>{var V=$1(),q=R(V,!0);k(ce=>x(q,ce),[()=>m.workspace_taskProgressBar_cancelled_label({count:lr(e(h).length)})]),d(J,V)};M(Q,J=>{e(h).length>0&&J(tt)})}d(Se,Ie)};M($,Se=>{e(A)&&Se(Ae)})}w(F),k(Se=>x(de,Se),[()=>m.workspace_taskProgressBar_tasksRatio_label({completed:lr(n().completed),total:lr(n().total)})]),d(C,F)},children:(C,F)=>{{let K=u(()=>kn("flex h-auto min-w-0 shrink items-end justify-start cursor-default rounded-none border-0",f())),X=u(()=>`gap: ${c()}`),de=u(()=>m.workspace_taskProgressBar_tasksRatio_label({completed:lr(n().completed),total:lr(n().total)}));yt(C,{variant:"plain",type:"button",wrapContent:!1,get class(){return e(K)},get style(){return e(X)},get"aria-label"(){return e(de)},"data-task-progress-trigger":!0,children:(Pe,ue)=>{var Z=kt(),ge=ze(Z);Tt(ge,17,()=>e(p),Rr,(Me,G)=>{var fe=r0();let $;k(()=>$=Mn(fe,"",$,{width:o(),height:l(),"background-color":i[e(G)]})),d(Me,fe)}),d(Pe,Z)},$$slots:{default:!0}})}},$$slots:{content:!0,default:!0}})};M(B,D=>{n().total>0&&D(O)})}return d(r,H),qt(T)}function wi(r,t){if(new.target)return Ht({component:wi,...r});Ut(t,!0);let n=y(t,"items",7),a=y(t,"ariaLabel",7),s=y(t,"open",15,!1),o=y(t,"orientation",7,"vertical"),l=y(t,"selection",7),c=y(t,"class",7,"");const f=u(()=>Mp(n(),l(),a()));var i={get items(){return n()},set items(p){n(p),_()},get ariaLabel(){return a()},set ariaLabel(p){a(p),_()},get open(){return s()},set open(p=!1){s(p),_()},get orientation(){return o()},set orientation(p="vertical"){o(p),_()},get selection(){return l()},set selection(p){l(p),_()},get class(){return c()},set class(p=""){c(p),_()},$set:jt,$on:(p,g)=>Wt(t,p,g)};return Lv(r,{get actions(){return e(f)},align:"end",get ariaLabel(){return a()},onAction:g=>Np(n(),g)?.onClick(),get open(){return s()},set open(g){s(g)},trigger:(g,L)=>{let b=()=>(L?.()).props;yt(g,ni(b,{variant:"plain",size:"icon-compact",iconOnly:!0,type:"button",get class(){return c()},get"aria-label"(){return a()},onclick:h=>{h.stopPropagation(),b().onclick?.(h)},oncontextmenu:h=>{h.preventDefault(),h.stopPropagation()},children:(h,A)=>{Nv(h,{get orientation(){return o()},class:"size-3.5"})},$$slots:{default:!0}}))},$$slots:{trigger:!0}}),qt(i)}var n0=I('<span class="contents"><!></span>'),a0=I("<!> <!>",1);function hu(r,t){if(new.target)return Ht({component:hu,...r});Ut(t,!0);let n=y(t,"workspaceId",7),a=y(t,"slot",7);const s=u(()=>og(a()));let o=we(null);Ct(()=>{e(o)&&e(o).workspaceId!==n()&&N(o,null)});function l(h){const A=Mc(h);A&&N(o,{...A,workspaceId:n()},!0)}function c(h){h.preventDefault(),h.stopPropagation();const A=h.currentTarget.getBoundingClientRect();N(o,{x:A.left,y:A.bottom+2,returnFocus:h.currentTarget,workspaceId:n()},!0)}function f(){N(o,null)}var i={get workspaceId(){return n()},set workspaceId(h){n(h),_()},get slot(){return a()},set slot(h){a(h),_()},$set:jt,$on:(h,A)=>Wt(t,h,A)},p=a0(),g=ze(p);{let h=u(()=>m.workspace_microKeyBadge_ariaLabel({number:lr(a()+1)})),A=u(()=>m.workspace_microKeyBadge_tooltip({number:lr(a()+1)})),T=u(()=>e(o)!==null);yt(g,{variant:"ghost",size:"icon",type:"button",class:"micro-key-slot-badge size-4 min-w-0 shrink-0 cursor-pointer rounded-[3px] p-0 a11y-ignore",get"aria-label"(){return e(h)},get title(){return e(A)},onclick:c,oncontextmenu:l,onkeydown:l,"aria-haspopup":"menu",get"aria-expanded"(){return e(T)},children:(H,B)=>{var O=n0(),D=S(O);mp(D,{get slot(){return a()},get class(){return`transition-colors ${e(s)??""}`}}),w(O),d(H,O)},$$slots:{default:!0}})}var L=v(g,2);{var b=h=>{{let A=u(()=>e(o)?.x??0),T=u(()=>e(o)?.y??0),H=u(()=>e(o)?.returnFocus),B=u(()=>m.workspace_card_assignMicroKey_label()),O=u(()=>Lm(n(),f));Oc(h,{get x(){return e(A)},get y(){return e(T)},get returnFocus(){return e(H)},selection:"single",get ariaLabel(){return e(B)},get items(){return e(O)},onClickOutside:f})}};M(L,h=>{e(o)&&h(b)})}return d(r,p),qt(i)}var s0=I('<span class="flex size-4 shrink-0 items-center justify-center"><!></span>'),o0=I('<span data-workspace-card-pin-indicator="" aria-hidden="true"><!></span> <span class="sr-only"> </span>',1),i0=I('<span class="type-caption shrink-0 rounded-sm bg-muted-foreground/10 px-1.5 font-normal text-muted-foreground" data-workspace-card-trailing-label=""> </span>'),l0=I('<span data-workspace-card-pr-item=""><!></span>'),c0=I('<span class="flex shrink-0 items-center" data-workspace-card-pr-list=""><!></span>'),d0=I('<span data-workspace-card-time=""><!></span>'),u0=I('<span aria-hidden="true"><!></span>'),f0=I("<div><!> <!> <!> <!></div>"),p0=I('<div data-workspace-card-hover-surface=""><!></div>'),g0=I('<div role="group" data-workspace-card-row=""><!> <div class="relative z-10 flex shrink-0 items-center gap-1.5"><!> <!> <span class="sr-only"> </span></div> <div class="relative z-10 flex min-w-0 flex-1 items-center gap-2"><span class="flex min-w-0 flex-1 items-center gap-1" data-workspace-card-title-group=""><span dir="ltr" data-workspace-card-title=""><span class="wc-title-text svelte-1ct56pd"> </span></span> <!></span> <!> <!> <!></div> <!></div> <!> <!>',1),v0=I('<div class="relative z-10 flex shrink-0 items-center"><!></div>'),m0=I('<div><!> <!> <span class="font-medium truncate"> </span> <span class="shrink-0 text-muted-foreground">·</span> <span class="truncate text-xs text-muted-foreground"> </span> <!></div>'),h0=I('<div class="text-sm font-semibold truncate"> </div>'),yc=I('<span class="truncate"> </span>'),b0=I('<span class="text-muted-foreground">·</span>'),y0=I('<div class="flex items-center gap-1 truncate text-xs text-muted-foreground"><!> <!> <!></div>'),_0=I('<div><!> <!> <div class="flex items-center gap-2 text-xs"><!> <span class="truncate text-muted-foreground"> </span> <span> </span></div> <!></div>'),x0=I('<div class="flex items-center gap-2"><!> <span class="text-ui shrink-0 tabular-nums text-muted-foreground"> </span></div>'),w0=I('<div class="flex items-center justify-between text-ui"><span class="text-muted-foreground"> </span> <span class="tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span></div>'),k0=I('<div class="flex items-center justify-between text-ui"><span class="text-muted-foreground"> </span></div>'),I0=I('<div class="flex items-center text-ui"><span> </span></div>'),S0=I('<div class="flex flex-col gap-1 px-3 pb-2.5"><!> <!> <!> <!></div>'),C0=I('<div class="relative z-10 flex items-center gap-1.5 px-2 pb-2"><!></div>'),E0=I('<div class="relative z-10 flex items-center gap-1.5 px-2 pb-2"><!> <!></div>'),P0=I('<div role="group"><!> <div class="flex items-start gap-2.5 px-3 pt-3 pb-2"><!> <div class="flex-1 min-w-0"><div class="text-sm font-medium"> </div> <div class="mt-0.5 line-clamp-2 text-xs leading-snug text-muted-foreground"> </div></div></div> <!> <!></div>');function bu(r,t){if(new.target)return Ht({component:bu,...r});Ut(t,!0);const n=()=>Ft(Xe,"$prMonitors$",l),a=()=>Ft($e,"$microConnected$",l),s=()=>Ft(Q,"$hidesOwnerActions$",l),o=()=>Ft(te,"$workspaceKeySlot$",l),[l,c]=ca();let f=y(t,"workspace",7),i=y(t,"phase",7),p=y(t,"stats",7),g=y(t,"variant",7,"compact"),L=y(t,"showTime",7,!0),b=y(t,"isRunning",7,!1),h=y(t,"isUnread",7,!1),A=y(t,"isWaiting",7),T=y(t,"isPinned",7,!1),H=y(t,"streamingAgentIds",23,()=>[]),B=y(t,"hasSpec",7,!1),O=y(t,"isAgentRunning",7,!1),D=y(t,"agentDigest",7),U=y(t,"trailingLabel",7),C=y(t,"title",7),F=y(t,"repoName",7),K=y(t,"branch",7),X=y(t,"onClick",7),de=y(t,"onAction",7),Pe=y(t,"onTogglePin",7),ue=y(t,"onMarkAsRead",7),Z=y(t,"onOpenInNewWindow",7),ge=y(t,"onHover",7),Me=y(t,"highlighted",7,!1),G=y(t,"selected",7,!1),fe=y(t,"highlightId",7),$=y(t,"suppressHover",7,!1),Ae=y(t,"isolateHoverReveal",7,!1),Se=y(t,"class",7),Ie=y(t,"actions",7);const Ye=Ns("");Ct(()=>{Ye.set(f()?.id??"")});const Xe=sp(Ye),$e=Km(),te=Wg(Ye),Q=op(Ye),tt=u(()=>Mm(f()??{})),J=u(()=>Om(e(tt)));let V=u(()=>f()?Vm.url.pathname===`/workspace/${f().id}`:!1),q=u(()=>f()?`workspace-hover-card-${f().id}`:void 0),ce=we(!1),_e=we(null),Y=we(null);Ct(()=>{if(!e(Y))return;const ne=ks(e(Y),{id:fe()});return()=>ne.destroy()});let he=we(null),Le=we(null),je=we(null),st=we(0),z=we(0),ie=u(()=>e(st)+(e(z)>0?e(z)+4:0));function Te(){const ne=e(he),pt=e(je);N(st,ne?Math.max(0,ne.scrollWidth-ne.clientWidth):0,!0),N(z,ne&&pt&&pt.getClientRects().length>0?Math.max(0,ne.getBoundingClientRect().right-pt.getBoundingClientRect().left):0,!0)}Ct(()=>{const ne=e(he),pt=e(Le),Dt=e(je);if(!ne||!pt||(Te(),typeof ResizeObserver>"u"))return;const mr=new ResizeObserver(Te);return mr.observe(ne),mr.observe(pt),Dt&&mr.observe(Dt),()=>mr.disconnect()});let Ge=null,ve=null,P=!1,j=!1,me=!1,qe=!1,Ce=!1,Ve=!1,ee=we(!1),ke=!1,at=null,et=we(null),gt=null,He;function ht(){Ge!==null&&(clearTimeout(Ge),Ge=null)}function ot(){ve!==null&&(clearTimeout(ve),ve=null),gt?.(),gt=null}function vt(){ot(),N(ee,!0),N(ce,!0),!Ce&&(Ce=!0,es.notifyOpened())}function ft(){ot(),clearTimeout(He),N(ee,!1),N(ce,!1),j=!1,qe=!1,Ce&&(Ce=!1,es.notifyClosed())}function Pt(){return P||j||me||qe}function At(){if(!e(ce)){ft();return}ot(),ve=setTimeout(()=>{ve=null,Pt()||ft()},Bm),gt=es.deferClose(ft)}function Zt(){j=!0,ot()}function xt(){j=!1,!me&&!qe&&At()}function zt(){qe=!0,clearTimeout(He),ot()}function er(ne){const pt=ne.relatedTarget instanceof Node?ne.relatedTarget:null;if(pt&&le()?.contains(pt)||(qe=!1,pt&&e(_e)?.contains(pt)))return;if(pt){!P&&!j&&ft();return}const Dt=ne.target;clearTimeout(He),He=setTimeout(()=>{const mr=document.activeElement,yr=le()?.contains(mr)||e(_e)?.contains(mr);mr&&mr!==Dt&&yr||!P&&!j&&ft()},0)}function St(){at!==null&&clearTimeout(at),ke=!0,at=setTimeout(()=>{ke=!1,at=null},0)}function Gt(ne){const pt=ne.target,Dt=le();pt instanceof Node&&Dt?.contains(pt)||ne.type==="scroll"&&e(_e)&&pt instanceof Node&&!pt.contains(e(_e))||(ne.type==="pointerdown"&&St(),ht(),ft())}Ct(()=>{if(e(ee))return window.addEventListener("pointerdown",Gt,!0),window.addEventListener("scroll",Gt,!0),()=>{window.removeEventListener("pointerdown",Gt,!0),window.removeEventListener("scroll",Gt,!0)}});function Ot(ne){if(ne.key!=="Escape")return;const pt=ne.target;pt instanceof Node&&le()?.contains(pt)||(ne.preventDefault(),ne.stopPropagation(),Ve=me,ht(),ft())}Ct(()=>{if(e(ce))return window.addEventListener("keydown",Ot,!0),()=>window.removeEventListener("keydown",Ot,!0)});const pe=u(()=>f()?lp.select(Mt.state,f().id):null),re=u(()=>e(pe)?e(pe):f()?.activePullRequest?f().activePullRequest:!f()?.prStatus||f().prNumber==null?null:{id:`legacy-pr-${f().prNumber}`,number:f().prNumber,url:f().prUrl??"",title:m.workspace_hoverCard_pullRequest_label(),status:f().prStatus,createdAt:f().updatedAt,updatedAt:f().updatedAt}),Ue=u(()=>ip(f())),rt=u(()=>{if(!f()||e(Ue))return[];const ne=f(),pt=ne.repositoryOwner&&ne.repositoryName?`${ne.repositoryOwner}/${ne.repositoryName}`:void 0;return Op({workspacePRs:ne.pullRequests,activePR:e(re),monitors:n(),workspaceRepo:pt,buildPrUrl:(Dt,mr)=>gv(Dt,ne.repositoryOwner,ne.repositoryName,mr),getDisplayTitle:Dt=>Dt.title})}),lt=u(()=>e(rt)[0]);function Oe(ne){const pt=ne.resource?.repository.provider==="gitlab"?`${ne.repo} !${ne.number}`:ne.repo?m.workspace_card_prBadge_repoLine_tooltip({repo:ne.repo,number:ne.number}):m.workspace_card_prBadge_label({number:` #${ne.number}`});return[cp(pt,ne),ne.title,ne.details].filter(Boolean).join(`
|
|
259
259
|
`)}function se(ne){ne.key==="Enter"&&X()?.(ne)}function le(){return e(q)?document.getElementById(e(q)):null}function ae(){return Array.from(le()?.querySelectorAll("button:not(:disabled), a[href]")??[])}function be(){const ne=e(_e)?.querySelector("[data-workspace-card-trigger]"),pt=le();if(!ne||!pt)return null;const Dt=Array.from(document.querySelectorAll('button:not(:disabled), a[href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])')).filter(yr=>yr.tabIndex>=0&&!pt.contains(yr)),mr=Dt.indexOf(ne);return mr>=0?Dt[mr+1]:null}function xe(ne){Ve=!!e(_e)?.contains(ne),ft(),ne.focus({preventScroll:!0})}function Be(){const ne=e(_e)?.querySelector("[data-workspace-card-trigger]");ne&&xe(ne)}async function Re(ne){if(ne.key==="Escape"&&e(ce)){ne.preventDefault(),ne.stopPropagation(),ft();return}ne.key!=="ArrowDown"||$()||!f()||(ne.preventDefault(),ne.stopPropagation(),N(ee,!0),N(ce,!0),await Zn(),ae()[0]?.focus({preventScroll:!0}))}function Ze(ne){const pt=ae(),Dt=ne.key==="Tab"&&ne.shiftKey&&ne.currentTarget===pt[0],yr=ne.key==="Tab"&&!ne.shiftKey&&ne.currentTarget===pt.at(-1)?be():null;ne.key!=="Escape"&&!Dt&&!yr||(ne.preventDefault(),ne.stopPropagation(),yr?xe(yr):Be())}function Je(){P=!0,ot(),es.settleDeferredCloses(),Te(),ge()?.(),f()&&!$()&&!me&&(ht(),N(ee,!0),Ge=setTimeout(()=>{Ge=null,vt()},es.currentOpenDelay))}function De(){P=!1,ht(),!me&&!qe&&At()}function Fe(){me=!0,ht(),ot(),!Ve&&(ke||f()&&!$()&&(N(ee,!0),N(ce,!0)))}function We(ne){const pt=ne.relatedTarget instanceof Node?ne.relatedTarget:null;pt&&e(_e)?.contains(pt)||(Ve=!1,me=!1,!(pt&&le()?.contains(pt))&&!P&&!j&&ft())}Ct(()=>{$()&&(ht(),ot(),ft())});let Qe=we(null),ut=we(!1),ct;Ct(()=>{const ne=f()?.id;ct!==ne&&(ct=ne,N(ut,!1)),e(Qe)&&e(Qe).workspaceId!==f()?.id&&wt()});function dt(ne){if(!f())return;const pt=Mc(ne);if(pt){if(N(ut,!1),bt().length===0){N(Qe,null);return}N(Qe,{...pt,returnFocus:ne.target instanceof HTMLElement?ne.target.closest("button")??e(_e)?.querySelector("button")??null:null,workspaceId:f().id},!0)}}function wt(){N(Qe,null),N(ut,!1)}Ct(()=>{e(ut)&&N(Qe,null)}),fs(()=>{ht(),ot(),at!==null&&(clearTimeout(at),at=null),ft()});function bt(){if(!f())return[];const ne=[];return Z()&&ne.push({id:"open-new-window",label:m.workspace_card_openNewWindow_label(),icon:jc,onClick:()=>{Z()?.(),wt()}}),ne.push(...Dm(f().id,{connected:a(),onClose:wt})),s()||(e(Ue)||ne.push({id:"transfer",label:m.workspace_card_transfer_label(),icon:Qp,onClick:()=>{Mt.dispatch(xg({workspaceId:f().id,workspaceTitle:f().title})),wt()}}),ne.push({id:"archive",label:m.workspace_card_archive_label(),icon:Wc,onClick:()=>{Mt.dispatch(ed(f().id)),wt()}}),ne.push({id:"delete",label:m.workspace_card_deleteSpace_label(),icon:Uc,destructive:!0,onClick:()=>{Mt.dispatch(td(f().id)),wt()}})),ne}let Rt=u(()=>O()&&D()?D():i()?.subtitle??""),Jt=u(()=>p()&&p().tasks.total>0?p().tasks.completed/p().tasks.total:0),tr=u(()=>!!p()&&(p().tasks.total>0||p().files.changed>0||p().commits.total>0||p().pr.hasOpen||p().pr.hasMerged)),Yt=u(()=>e(Ue)?void 0:K()),Fr=u(()=>!p()||e(Ue)?"":p().pr.hasMerged?m.workspace_card_prMerged_label({number:p().pr.number??""}):p().pr.hasOpen?m.workspace_card_prOpen_label({number:p().pr.number?`#${p().pr.number}`:""}):""),Zr=u(()=>i()?.phase==="planning"?O()?{primary:{label:m.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:m.workspace_card_pause_label(),action:"pause"}}:B()||(p()?.tasks.total??0)>0?{primary:{label:m.workspace_card_approveStart_label(),action:"approve"},secondary:{label:m.workspace_card_viewSpec_label(),action:"view-spec"}}:{primary:{label:m.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:m.workspace_card_viewSpec_label(),action:"view-spec"}}:i()?.phase==="building"?{primary:{label:m.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:m.workspace_card_pause_label(),action:"pause"}}:i()?.phase==="reviewing"?{primary:{label:m.workspace_card_createPr_label(),action:"create-pr"},secondary:{label:m.workspace_card_showChanges_label(),action:"show-changes"}}:{primary:{label:m.workspace_card_archive_label(),action:"archive"},secondary:{label:m.workspace_card_showChanges_label(),action:"show-changes"}});const un={planning:"bg-muted/20 text-muted-foreground",building:"bg-info/15 text-info",reviewing:"bg-primary/15 text-primary",shipped:"bg-foreground/10 text-foreground"};var In={get workspace(){return f()},set workspace(ne){f(ne),_()},get phase(){return i()},set phase(ne){i(ne),_()},get stats(){return p()},set stats(ne){p(ne),_()},get variant(){return g()},set variant(ne="compact"){g(ne),_()},get showTime(){return L()},set showTime(ne=!0){L(ne),_()},get isRunning(){return b()},set isRunning(ne=!1){b(ne),_()},get isUnread(){return h()},set isUnread(ne=!1){h(ne),_()},get isWaiting(){return A()},set isWaiting(ne){A(ne),_()},get isPinned(){return T()},set isPinned(ne=!1){T(ne),_()},get streamingAgentIds(){return H()},set streamingAgentIds(ne=[]){H(ne),_()},get hasSpec(){return B()},set hasSpec(ne=!1){B(ne),_()},get isAgentRunning(){return O()},set isAgentRunning(ne=!1){O(ne),_()},get agentDigest(){return D()},set agentDigest(ne){D(ne),_()},get trailingLabel(){return U()},set trailingLabel(ne){U(ne),_()},get title(){return C()},set title(ne){C(ne),_()},get repoName(){return F()},set repoName(ne){F(ne),_()},get branch(){return K()},set branch(ne){K(ne),_()},get onClick(){return X()},set onClick(ne){X(ne),_()},get onAction(){return de()},set onAction(ne){de(ne),_()},get onTogglePin(){return Pe()},set onTogglePin(ne){Pe(ne),_()},get onMarkAsRead(){return ue()},set onMarkAsRead(ne){ue(ne),_()},get onOpenInNewWindow(){return Z()},set onOpenInNewWindow(ne){Z(ne),_()},get onHover(){return ge()},set onHover(ne){ge(ne),_()},get highlighted(){return Me()},set highlighted(ne=!1){Me(ne),_()},get selected(){return G()},set selected(ne=!1){G(ne),_()},get highlightId(){return fe()},set highlightId(ne){fe(ne),_()},get suppressHover(){return $()},set suppressHover(ne=!1){$(ne),_()},get isolateHoverReveal(){return Ae()},set isolateHoverReveal(ne=!1){Ae(ne),_()},get class(){return Se()},set class(ne){Se(ne),_()},get actions(){return Ie()},set actions(ne){Ie(ne),_()},$set:jt,$on:(ne,pt)=>Wt(t,ne,pt)},nn=kt(),Un=ze(nn);{var hn=ne=>{var pt=g0(),Dt=ze(pt);let mr;var yr=S(Dt);{let Ee=u(()=>f().title||m.workspace_links_untitled_label()),nt=u(()=>`workspace-status-state-${f().id}${T()?` workspace-pinned-state-${f().id}`:""}${e(ce)?` ${e(q)}`:""}`),Qt=u(()=>e(V)?"page":void 0);yt(yr,{variant:"plain",class:"absolute inset-0 z-0 h-auto w-auto rounded-md focus-visible:border-transparent focus-visible:bg-background/50 focus-visible:ring-0",get"aria-label"(){return e(Ee)},get"aria-describedby"(){return e(nt)},get"aria-current"(){return e(Qt)},"data-workspace-card-trigger":!0,onkeydown:Re,onclick:Nt=>{Nt.stopPropagation(),X()?.(Nt)}})}var bn=v(yr,2),Nr=S(bn);{var Sn=Ee=>{var nt=s0(),Qt=S(nt);{var Nt=rr=>{hu(rr,{get workspaceId(){return f().id},get slot(){return o()}})};M(Qt,rr=>{o()!==null&&rr(Nt)})}w(nt),d(Ee,nt)};M(Nr,Ee=>{a()&&Ee(Sn)})}var qn=v(Nr,2);No(qn,{get content(){return e(J).tooltip},side:"bottom",sideOffset:4,children:(Ee,nt)=>{Nm(Ee,{get status(){return e(tt)},size:14,decorative:!0,class:"justify-start"})},$$slots:{default:!0}});var $n=v(qn,2),ea=R($n,!0);w(bn);var qr=v(bn,2),yn=S(qr),or=S(yn),an=S(or),Vn=R(an,!0);gr(an,Ee=>N(Le,Ee),()=>e(Le)),w(or),gr(or,Ee=>N(he,Ee),()=>e(he));var _r=v(or,2);{var Tr=Ee=>{var nt=o0(),Qt=ze(nt),Nt=S(Qt);Et(Nt,{get icon(){return el},size:"xs"}),w(Qt);var rr=v(Qt,2),Sr=R(rr,!0);k(Cn=>{mt(Qt,1,`wc-pin-indicator inline-flex shrink-0 items-center text-muted-foreground transition-opacity
|
|
260
|
-
${Pe()?Me()?"opacity-0":$()?"":Ae()?"group-hover/wc:opacity-0 group-focus-within/wc:opacity-0":"group-hover:opacity-0 group-focus-within:opacity-0":""}`,"svelte-1ct56pd"),oe(rr,"id",`workspace-pinned-state-${f().id??""}`),x(Sr,Cn)},[()=>m.layout_activeCard_pinned_header()]),d(Ee,nt)};M(_r,Ee=>{T()&&Ee(Tr)})}w(yn);var sn=v(yn,2);{var sa=Ee=>{var nt=i0(),Qt=R(nt,!0);k(()=>x(Qt,U())),d(Ee,nt)};M(sn,Ee=>{U()&&Ee(sa)})}var Qr=v(sn,2);{var Vr=Ee=>{const nt=u(()=>e(lt));var Qt=c0(),Nt=S(Qt);{let rr=u(()=>Oe(e(nt)));No(Nt,{get content(){return e(rr)},side:"bottom",sideOffset:4,children:(Sr,Cn)=>{var Kn=kt(),_n=ze(Kn);{var xr=Hr=>{{let wr=u(()=>Oe(e(nt)));yt(Hr,{variant:"plain",size:"icon-compact",iconOnly:!0,get class(){return`size-5 shrink-0 rounded-sm ${e(nt).foregroundClass??""}`},get"aria-label"(){return e(wr)},"data-workspace-card-pr-item":!0,get"data-pr-identity"(){return e(nt).identity},get"data-pr-status"(){return e(nt).status},onclick:on=>{on.stopPropagation();const jr=f().id;Of(async()=>{const{handleLink:$r}=await import("./
|
|
260
|
+
${Pe()?Me()?"opacity-0":$()?"":Ae()?"group-hover/wc:opacity-0 group-focus-within/wc:opacity-0":"group-hover:opacity-0 group-focus-within:opacity-0":""}`,"svelte-1ct56pd"),oe(rr,"id",`workspace-pinned-state-${f().id??""}`),x(Sr,Cn)},[()=>m.layout_activeCard_pinned_header()]),d(Ee,nt)};M(_r,Ee=>{T()&&Ee(Tr)})}w(yn);var sn=v(yn,2);{var sa=Ee=>{var nt=i0(),Qt=R(nt,!0);k(()=>x(Qt,U())),d(Ee,nt)};M(sn,Ee=>{U()&&Ee(sa)})}var Qr=v(sn,2);{var Vr=Ee=>{const nt=u(()=>e(lt));var Qt=c0(),Nt=S(Qt);{let rr=u(()=>Oe(e(nt)));No(Nt,{get content(){return e(rr)},side:"bottom",sideOffset:4,children:(Sr,Cn)=>{var Kn=kt(),_n=ze(Kn);{var xr=Hr=>{{let wr=u(()=>Oe(e(nt)));yt(Hr,{variant:"plain",size:"icon-compact",iconOnly:!0,get class(){return`size-5 shrink-0 rounded-sm ${e(nt).foregroundClass??""}`},get"aria-label"(){return e(wr)},"data-workspace-card-pr-item":!0,get"data-pr-identity"(){return e(nt).identity},get"data-pr-status"(){return e(nt).status},onclick:on=>{on.stopPropagation();const jr=f().id;Of(async()=>{const{handleLink:$r}=await import("./Bo4gq_23.js").then(Gn=>Gn.V);return{handleLink:$r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55]),import.meta.url).then(({handleLink:$r})=>$r(e(nt).url,{workspaceId:jr,event:on}))},children:(on,jr)=>{Et(on,{get icon(){return e(nt).statusIcon},size:14})},$$slots:{default:!0}})}},zr=Hr=>{var wr=l0(),on=S(wr);Et(on,{get icon(){return e(nt).statusIcon},size:14}),w(wr),k(jr=>{mt(wr,1,`inline-flex size-5 shrink-0 items-center justify-center rounded-sm ${e(nt).foregroundClass??""}`,"svelte-1ct56pd"),oe(wr,"aria-label",jr),oe(wr,"data-pr-identity",e(nt).identity),oe(wr,"data-pr-status",e(nt).status)},[()=>Oe(e(nt))]),d(Hr,wr)};M(_n,Hr=>{e(nt).url?Hr(xr):Hr(zr,-1)})}d(Sr,Kn)},$$slots:{default:!0}})}w(Qt),k(rr=>oe(Qt,"aria-label",rr),[()=>e(nt).resource?.repository.provider==="gitlab"?m.workspace_hoverCard_mergeRequest_label():m.workspace_hoverCard_pullRequest_label()]),d(Ee,Qt)};M(Qr,Ee=>{e(lt)&&Ee(Vr)})}var Cr=v(Qr,2);{var On=Ee=>{var nt=d0(),Qt=S(nt);{var Nt=Sr=>{{let Cn=u(()=>sl(f()));hp(Sr,{get date(){return e(Cn)},class:"type-caption whitespace-nowrap tabular-nums text-muted-foreground",compact:!0})}},rr=u(()=>sl(f())>0);M(Qt,Sr=>{e(rr)&&Sr(Nt)})}w(nt),k(()=>mt(nt,1,`wc-secondary shrink-0 ${Ie()||Pe()||h()&&ue()?Me()?"opacity-0":$()?"":Ae()?"group-hover/wc:opacity-0 group-hover/message:opacity-0":"group-hover:opacity-0 group-hover/message:opacity-0":""}`,"svelte-1ct56pd")),d(Ee,nt)};M(Cr,Ee=>{L()&&Ee(On)})}w(qr);var pa=v(qr,2);{var _a=Ee=>{var nt=f0(),Qt=S(nt);{var Nt=xr=>{{let zr=u(()=>T()?"text-primary-ink":"text-muted-foreground"),Hr=u(()=>T()?m.workspace_card_unpin_ariaLabel():m.workspace_card_pin_ariaLabel()),wr=u(()=>T()?m.workspace_card_unpin_tooltip():m.workspace_card_pin_tooltip());yt(xr,{variant:"plain",size:"icon-xs",iconOnly:!0,get class(){return`transition-all hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0
|
|
261
261
|
${e(zr)??""}`},onclick:on=>{on.stopPropagation(),Pe()?.(on)},get"aria-label"(){return e(Hr)},get title(){return e(wr)},children:(on,jr)=>{var $r=u0(),Gn=S($r);Et(Gn,{get icon(){return el},size:"xs"}),w($r),d(on,$r)},$$slots:{default:!0}})}};M(Qt,xr=>{Pe()&&xr(Nt)})}var rr=v(Qt,2);{var Sr=xr=>{{let zr=u(()=>m.workspace_card_markAsRead_label()),Hr=u(()=>m.workspace_card_markAsRead_label());yt(xr,{variant:"plain",size:"icon-xs",iconOnly:!0,class:"text-muted-foreground hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0",onclick:wr=>{wr.stopPropagation(),ue()?.(wr)},get"aria-label"(){return e(zr)},get title(){return e(Hr)},children:(wr,on)=>{Et(wr,{get icon(){return qc},size:"xs"})},$$slots:{default:!0}})}};M(rr,xr=>{h()&&ue()&&xr(Sr)})}var Cn=v(rr,2);dn(Cn,()=>Ie()??Ms);var Kn=v(Cn,2);{var _n=xr=>{{let zr=u(bt),Hr=u(()=>m.workspace_progressCard_actions_ariaLabel());wi(xr,{get items(){return e(zr)},get ariaLabel(){return e(Hr)},class:"flex size-5 cursor-pointer items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:outline-none",get open(){return e(ut)},set open(wr){N(ut,wr,!0)}})}};M(Kn,xr=>{Z()&&xr(_n)})}w(nt),gr(nt,xr=>N(je,xr),()=>e(je)),k(()=>mt(nt,1,`wc-actions absolute right-1 top-1/2 z-20 flex -translate-y-1/2 items-center gap-0.5 rounded-md bg-accent/95 px-0.5 focus-within:opacity-100
|
|
262
262
|
${Ae()?"group-focus-within/wc:opacity-100":"group-focus-within:opacity-100"}
|
|
263
263
|
${Me()?"opacity-100":$()?"opacity-0":Ae()?"opacity-0 group-hover/wc:opacity-100":"opacity-0 group-hover:opacity-100"}`,"svelte-1ct56pd")),d(Ee,nt)};M(pa,Ee=>{(Ie()||Z()||Pe()||h()&&ue())&&Ee(_a)})}w(Dt),gr(Dt,Ee=>N(_e,Ee),()=>e(_e)),Nn(Dt,(Ee,nt)=>ks?.(Ee,nt),()=>({id:fe()}));var Er=v(Dt,2);{var Mr=Ee=>{Fm(Ee,{get id(){return e(q)},get anchor(){return`--workspace-list-${f().id??""}`},position:"right",get anchorElement(){return e(_e)},class:"w-auto overflow-visible! rounded-lg border-0! bg-background! shadow-none!",onmouseenter:Zt,onmouseleave:xt,onfocusin:zt,onfocusout:er,children:(nt,Qt)=>{var Nt=p0(),rr=S(Nt);zm(rr,{get workspace(){return f()},get activeAgentIds(){return H()},onkeydown:Ze}),w(Nt),gr(Nt,Sr=>N(et,Sr),()=>e(et)),wn("pointerenter",Nt,Zt),wn("pointerleave",Nt,xt),Ar("focusin",Nt,zt),Ar("focusout",Nt,er),d(nt,Nt)},$$slots:{default:!0}})};M(Er,Ee=>{e(ce)&&!$()&&Ee(Mr)})}var W=v(Er,2);{var Ne=Ee=>{const nt=u(bt);var Qt=kt(),Nt=ze(Qt);{var rr=Sr=>{{let Cn=u(()=>e(Qe)?.x??0),Kn=u(()=>e(Qe)?.y??0),_n=u(()=>e(Qe)?.returnFocus),xr=u(()=>m.workspace_progressCard_actions_ariaLabel());Oc(Sr,{get x(){return e(Cn)},get y(){return e(Kn)},get returnFocus(){return e(_n)},get ariaLabel(){return e(xr)},get items(){return e(nt)},onClickOutside:wt})}};M(Nt,Sr=>{e(nt).length>0&&Sr(rr)})}d(Ee,Qt)};M(W,Ee=>{e(Qe)&&Ee(Ne)})}k((Ee,nt,Qt)=>{mt(Dt,1,Ee,"svelte-1ct56pd"),oe(Dt,"data-pinned",T()),oe(Dt,"data-highlight-id",fe()),mr=Mn(Dt,"",mr,{"anchor-name":`--workspace-list-${f().id??""}`}),oe($n,"id",`workspace-status-state-${f().id??""}`),x(ea,e(J).accessibleName),mt(or,1,`wc-title type-body min-w-0 truncate font-normal!
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as ht,bq as g,bo as m,a_ as p,by as bt,b as xt}from"./COCO5InB.js";import{bs as yt,a7 as kt,ay as Q,W as u,bn as At,aA as h,a5 as F,bS as f,bl as S,bA as W,aD as e,b_ as D,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as Ct}from"./B8o4lNgr.js";import{I as It,h as Bt}from"./Crs9I2MT.js";import{H as Pt,C as zt}from"./Bqoyy9yx.js";import{f as M}from"./C5Xi5eLp.js";import"./Dck4Okga.js";import{F as rt,c5 as Rt,cg as St,ar as Wt}from"./BDq7EC2K.js";import{e as Dt}from"./
|
|
1
|
+
import{t as ht,bq as g,bo as m,a_ as p,by as bt,b as xt}from"./COCO5InB.js";import{bs as yt,a7 as kt,ay as Q,W as u,bn as At,aA as h,a5 as F,bS as f,bl as S,bA as W,aD as e,b_ as D,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as Ct}from"./B8o4lNgr.js";import{I as It,h as Bt}from"./Crs9I2MT.js";import{H as Pt,C as zt}from"./Bqoyy9yx.js";import{f as M}from"./C5Xi5eLp.js";import"./Dck4Okga.js";import{F as rt,c5 as Rt,cg as St,ar as Wt}from"./BDq7EC2K.js";import{e as Dt}from"./Bo4gq_23.js";import{D as Ht}from"./C627-01N.js";import{G2 as Lt,sA as $t}from"./BjFoJgFv.js";import{g as Nt}from"./BofkdNap.js";var qt=k('<span class="type-caption shrink-0 font-medium text-success"> </span>'),Ft=k('<!> <span class="type-body flex-1 truncate text-left font-medium text-foreground"> </span> <span class="type-caption shrink-0 tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span> <!>',1),Mt=k("<!> ",1),Ot=k('<div class="mb-2 flex gap-1"></div>'),Vt=k('<div class="border-t border-border p-2"><!> <!></div>'),jt=k('<div class="ws-block-widget type-body my-2 overflow-hidden rounded-md border border-border bg-card text-foreground shadow-(--elevation-raised)"><div class="flex min-h-9 items-center gap-2 px-3 py-1.5"><!> <!> <!></div> <!></div>'),Et=k('<div class="ws-block-widget type-caption my-2 text-muted-foreground"> </div>');function Gt(U,n){if(new.target)return ht({component:Gt,...U});yt(n,!0);let A=g(n,"patches",7),O=g(n,"label",23,()=>m.ui_patchBlock_label()),V=g(n,"lastApply",7),w=g(n,"linkedAgentId",7),H=g(n,"workspaceId",7),P=g(n,"applying",7,!1),L=g(n,"onApply",7),$=g(n,"onRevert",7),j=at(!1),E=at(0),z=y(()=>A()?.[e(E)]),G=y(()=>V()?.status==="success");function st(t){const o=t.split(`
|
|
2
2
|
`);let v=0,b=0;for(const C of o)C.startsWith("+")&&!C.startsWith("+++")?v++:C.startsWith("-")&&!C.startsWith("---")&&b++;return{addCount:v,removeCount:b}}let X=y(()=>e(z)?st(e(z).diff):{addCount:0,removeCount:0}),T=y(()=>P()?{label:m.ui_patchBlock_applying_label(),icon:null}:e(G)?{label:m.ui_patchBlock_revert_label(),icon:St}:{label:m.ui_patchBlock_apply_label(),icon:Wt}),nt=y(()=>!!(L()||$()));function ot(){et(j,!e(j))}function lt(){e(G)?$()?.():L()?.()}var it={get patches(){return A()},set patches(t){A(t),h()},get label(){return O()},set label(t=m.ui_patchBlock_label()){O(t),h()},get lastApply(){return V()},set lastApply(t){V(t),h()},get linkedAgentId(){return w()},set linkedAgentId(t){w(t),h()},get workspaceId(){return H()},set workspaceId(t){H(t),h()},get applying(){return P()},set applying(t=!1){P(t),h()},get onApply(){return L()},set onApply(t){L(t),h()},get onRevert(){return $()},set onRevert(t){$(t),h()},$set:bt,$on:(t,o)=>xt(n,t,o)},Y=kt(),ct=Q(Y);{var dt=t=>{var o=jt(),v=F(o),b=F(v);{var C=a=>{{let c=y(()=>m.ui_patchBlock_viewAgent_tooltip());M(a,{variant:"plain",size:"icon-compact",iconOnly:!0,class:"size-4! shrink-0 rounded-sm! transition-opacity hover:opacity-80",onclick:l=>{H()&&Lt.dispatch($t(H(),{agentId:w(),...Nt(l)}))},get title(){return e(c)},children:(l,_)=>{Dt(l,{get agentId(){return w()},variant:"compact"})},$$slots:{default:!0}})}};p(b,a=>{w()&&a(C)})}var Z=f(b,2);M(Z,{variant:"plain",size:"compact",class:"h-auto! min-w-0 flex-1 shrink items-center justify-start gap-2 px-0! py-0! text-muted-foreground transition-colors hover:text-foreground",truncateLabel:!1,labelClass:"flex min-w-0 flex-1 items-center gap-2",onclick:ot,children:(a,c)=>{var l=Ft(),_=Q(l);{var I=i=>{rt(i,{get icon(){return Rt},size:10,class:"text-muted-foreground"})};p(_,i=>{w()||i(I)})}var B=f(_,2),s=S(B,!0),d=f(B,2),r=F(d),R=S(r),N=f(r,2),J=S(N);W(d);var K=f(d,2);{var tt=i=>{var q=qt(),gt=S(q,!0);D(mt=>x(gt,mt),[()=>m.ui_patchBlock_applied_label()]),u(i,q)};p(K,i=>{e(G)&&i(tt)})}D(()=>{x(s,O()),x(R,`+${e(X).addCount??""}`),x(J,`-${e(X).removeCount??""}`)}),u(a,l)},$$slots:{default:!0}});var ut=f(Z,2);{var ft=a=>{M(a,{variant:"ghost-light",size:"sm",class:"type-caption shrink-0",onclick:lt,get disabled(){return P()},children:(c,l)=>{var _=Mt(),I=Q(_);{var B=r=>{It(r,{size:12})},s=r=>{rt(r,{get icon(){return e(T).icon},size:"xs"})};p(I,r=>{P()?r(B):e(T).icon&&r(s,1)})}var d=f(I);D(()=>x(d,` ${e(T).label??""}`)),u(c,_)},$$slots:{default:!0}})};p(ut,a=>{e(nt)&&a(ft)})}W(v);var vt=f(v,2);{var _t=a=>{var c=Vt(),l=F(c);{var _=s=>{var d=Ot();Bt(d,23,A,(r,R)=>`patch-${R}-${r.filePath}`,(r,R,N)=>{{let J=y(()=>e(N)===e(E)?"default":"ghost-light");M(r,{get variant(){return e(J)},size:"sm",class:"type-caption",onclick:()=>et(E,e(N),!0),children:(K,tt)=>{wt();var i=Ct();D(q=>x(i,q),[()=>e(R).filePath.split("/").pop()]),u(K,i)},$$slots:{default:!0}})}}),W(d),u(s,d)};p(l,s=>{A().length>1&&s(_)})}var I=f(l,2);{var B=s=>{Ht(s,{get patch(){return e(z).diff},get fileName(){return e(z).filePath},showHeader:!0,showStats:!0,showLineNumbers:!0,maxHeight:"300px",collapsible:!1,class:"overflow-hidden rounded-sm border border-border"})};p(I,s=>{e(z)&&s(B)})}W(c),Pt(3,c,()=>zt,()=>({tier:"moderate"})),u(a,c)};p(vt,a=>{e(j)&&a(_t)})}W(o),u(t,o)},pt=t=>{var o=Et(),v=S(o,!0);D(b=>x(v,b),[()=>m.ui_patchBlock_invalid_error()]),u(t,o)};p(ct,t=>{A()?.length?t(dt):t(pt,-1)})}return u(U,Y),At(it)}export{Gt as P};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/B6pRjnl0.js","/app/immutable/chunks/CJvhopKt.js","/app/immutable/chunks/COCO5InB.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/Crs9I2MT.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/C5Xi5eLp.js","/app/immutable/chunks/Dck4Okga.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/oALOmsvi.js","/app/immutable/chunks/Cdhgfy6h.js","/app/immutable/chunks/BY3Ptqbg.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Bqoyy9yx.js","/app/immutable/chunks/BlJs0v1V.js","/app/immutable/chunks/BjFoJgFv.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/BDq7EC2K.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.CaX-6yIe.css","/app/immutable/chunks/
|
|
2
|
-
import{bo as b,_ as x}from"./COCO5InB.js";import{g as f,G2 as a,d6 as P,Ez as S,wu as N,CM as R,tp as q,pi as H,s_ as W,HZ as U}from"./BjFoJgFv.js";import{w as I}from"./D62E6eA-.js";import{ba as j}from"./C5Xi5eLp.js";import{parseIntentLink as V}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/B6pRjnl0.js","/app/immutable/chunks/CJvhopKt.js","/app/immutable/chunks/COCO5InB.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/Crs9I2MT.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/C5Xi5eLp.js","/app/immutable/chunks/Dck4Okga.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/oALOmsvi.js","/app/immutable/chunks/Cdhgfy6h.js","/app/immutable/chunks/BY3Ptqbg.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Bqoyy9yx.js","/app/immutable/chunks/BlJs0v1V.js","/app/immutable/chunks/BjFoJgFv.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/BDq7EC2K.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.CaX-6yIe.css","/app/immutable/chunks/Jrnc38lr.js","/app/immutable/chunks/C563feV7.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/D62E6eA-.js","/app/immutable/chunks/Dx5-Ovf5.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DUT4V6mb.js","/app/immutable/chunks/CaQ_vubD.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/7yhhL_Kv.js","/app/immutable/chunks/iQlEdXPk.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bo as b,_ as x}from"./COCO5InB.js";import{g as f,G2 as a,d6 as P,Ez as S,wu as N,CM as R,tp as q,pi as H,s_ as W,HZ as U}from"./BjFoJgFv.js";import{w as I}from"./D62E6eA-.js";import{ba as j}from"./C5Xi5eLp.js";import{parseIntentLink as V}from"./DOB0mTS8.js";import{n as y}from"./CJvhopKt.js";import"./B8o4lNgr.js";import"./Crs9I2MT.js";import"./Dck4Okga.js";import"./ChTqQfQN.js";import"./BlJs0v1V.js";import{H as B,q as C,G as L}from"./B6LKhrY2.js";import{dj as D}from"./DUT4V6mb.js";import{o as M,n as z}from"./Cx4f7t9d.js";const p="assistant-content",G=a.createSelector(r=>{const e=M.select(r),s=z.select(r),t=e.find(i=>i.agentId===s)??e.find(i=>i.isActive)??e.find(i=>i.messageCount>0)??e[0];return P(t?.agentId??null)}),O=new Map;function $(r,e=!1){const s=O.get(r)??{explicit:0,background:0},t={explicit:s.explicit+(e?0:1),background:s.background+(e?1:0)};return O.set(r,t),e?t:{explicit:t.explicit}}function m(r,e){const s=O.get(r);return s!==void 0&&e.explicit===s.explicit&&(e.background===void 0||e.background===s.background)}async function K(r){a.dispatch(q(r)),L.select(a.state,r).restoreStatus==="pending"&&await new Promise(e=>{const s=L.withStore(a)(r).subscribe(t=>{t.restoreStatus!=="pending"&&(e(),queueMicrotask(()=>s()))})})}function h(r,e,s){const t=L.select(a.state,s);if(!t.panels[p]||Object.keys(t.panels).some(i=>i!==p)){const i=t.panels[p],d=Object.values(t.panels).flatMap(n=>n.tabs.filter(o=>o.type!=="agent"||o.workspaceId!==f)),c=d.some(n=>n.id===i?.activeTabId)?i?.activeTabId??null:d.at(-1)?.id??null;a.dispatch(H(s,{root:{type:"panel",panelId:p},panels:{[p]:{id:p,tabs:d,activeTabId:c}},focusedPanelId:t.focusedPanelId===p?p:null,hiddenTabs:C.select(a.state,s)}))}a.dispatch(W(s,r,p,void 0,!0,void 0,!1,e.background||e.preserveFocus,void 0,e.background))}async function ue(r,e={}){try{return await Z(r,e)}catch(s){return y.error(b.ui_linkHandler_notFound_title(),{description:s instanceof Error?s.message:String(s)}),!0}}async function Z(r,e){const s=/^intent:\/\/local\/([^/?#]+)\/agent\/([^/?#]+)$/.exec(r),t=r.startsWith("intent://")?V(r):null,i=t?.valid&&t.type==="workspace"?[r,t.resourceId]:/^\/workspace\/([^/?#]+)\/?$/.exec(r),d=/^https?:\/\//.test(r)&&!j(r);if(!i&&!s&&!d&&!(t?.valid&&["file","message","note","task"].includes(t.type))||i&&[f,"new"].includes(i[1]))return!1;const c=M.select(a.state),n=e.agentId?P(e.agentId):e.background?c.length===1?P(c[0].agentId):null:e.layoutId??G.select(a.state);if(!n)return!0;const o=$(n,e.background);if(await K(n),!m(n,o))return!0;if(i){const u=i[1],g=await I.workspaces.get(u);return m(n,o)?g?(a.dispatch(S(g)),h({type:"workspace",title:g.title,workspaceId:u,closable:!0},e,n),!0):(y.error(b.workspace_loader_notFound_title()),!0):!0}if(s)return T(s[1],s[2],e,n,o);if(d){const{resolveBrowserLinkForOpen:u}=await x(async()=>{const{resolveBrowserLinkForOpen:v}=await import("./B6pRjnl0.js").then(k=>k.b);return{resolveBrowserLinkForOpen:v}},__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),g=await u(r);return m(n,o)&&h({type:"browser",title:new URL(r).hostname,browserUrl:g.url,browserRequestedUrl:g.requestedUrl,workspaceId:f,closable:!0},e,n),!0}if(!t?.valid)return!1;const _=t.workspaceId??f;if(t.type==="file"){const u=await I.workspaces.get(_);return m(n,o)?u?(a.dispatch(S(u)),h({type:"file",title:t.resourceId.split("/").at(-1)??t.resourceId,filePath:t.resourceId,workspaceId:_,closable:!0,data:{line:t.line,filePathIsLiteral:!0}},e,n),!0):(y.error(b.workspace_loader_notFound_title()),!0):!0}if(t.type==="message"&&t.agentId)return T(_,t.agentId,e,n,o,t.resourceId);if(t.type!=="note"&&t.type!=="task")return!1;const l=t.workspaceId??f,[w,A]=await Promise.all([a.dispatch(N(l,t.resourceId)),Promise.resolve(D.select(a.state,l)??I.workspaces.get(l)).catch(()=>null)]);if(!m(n,o))return!0;if(!w||String(w.workspaceId)!==l)return y.error(b.ui_linkHandler_notFound_title(),{description:b.ui_linkHandler_noteNotFound_error({noteId:t.resourceId,workspaceId:l})}),!0;A&&String(A.id)===l&&a.dispatch(S(A));const E=Object.entries(B.select(a.state)).some(([u,g])=>{const v=k=>k.type==="note"&&k.noteId===String(w.id)&&(k.workspaceId??u)===l;return Object.values(g.panels).some(k=>k.tabs.some(v))||C.select(a.state,u).some(v)}),F=a.state.transientUi.byWorkspaceId[l]?.noteViewModeByNoteId[String(w.id)];return!E&&(!e.background||F===void 0)&&a.dispatch(R(l,String(w.id),"editor")),h({type:"note",title:w.title,noteId:String(w.id),workspaceId:l,closable:!0},e,n),!0}async function T(r,e,s,t,i,d){const c=await I.agents.get(e,r===f?void 0:r);r===f&&c&&(r=String(c.workspaceId));const n=r===f?null:await I.workspaces.get(r);if(!m(t,i))return!0;if(!n&&r!==f||!c||String(c.workspaceId)!==r)return y.error(b.ui_linkHandler_notFound_title()),!0;if(n&&a.dispatch(S(n)),a.dispatch(U(c)),h({type:"agent",title:c.name??e,agentId:e,workspaceId:r,closable:!0},s,t),d&&!s.background){const{openMessage:o}=await x(async()=>{const{openMessage:_}=await import("./Jrnc38lr.js");return{openMessage:_}},__vite__mapDeps([25,26,18,3,17,19,20,13,5,8,2,11,27,28,7,4,6,9,10,12,14,29,30,31,22,32,15,33,34,35]),import.meta.url);o({workspaceId:r,agentId:e,messageId:d,contentAlreadyOpen:!0})}return!0}export{p as ASSISTANT_CONTENT_PANEL_ID,G as selectAssistantPanelLayoutId,ue as showAssistantContent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o}from"./
|
|
1
|
+
import{p as o}from"./Ddh0rE8O.js";import{a as e,ad as s,aE as i,r as g}from"./CW-LHLDp.js";var d={parse:e(async r=>{const a=await o("info",r);s.debug(a)},"parse")},p={version:"11.17.0"},v=e(()=>p.version,"getVersion"),m={getVersion:v},c=e((r,a,n)=>{s.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=i(a);g(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),f={draw:c},_={parser:d,db:m,renderer:f};export{_ as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G2 as d,q1 as b,FQ as S}from"./BjFoJgFv.js";import{F as A,aX as _}from"./BUVaYTVI.js";import{bs as k}from"./DUT4V6mb.js";import{bl as y,bh as w}from"./
|
|
1
|
+
import{G2 as d,q1 as b,FQ as S}from"./BjFoJgFv.js";import{F as A,aX as _}from"./BUVaYTVI.js";import{bs as k}from"./DUT4V6mb.js";import{bl as y,bh as w}from"./CZtxOtGv.js";import{bo as n}from"./COCO5InB.js";import{t as P}from"./Bqoyy9yx.js";const G=d.createSelector(e=>e.backgroundAgentSettings.defaultModel),L=d.createSelector(e=>e.backgroundAgentSettings.typeOverrides),z=d.createSelector((e,t)=>!!(e.backgroundAgentSettings.typeOverrides[t]||e.backgroundAgentSettings.typeReasoningEffortOverrides[t])),F=d.createSelector(e=>e.backgroundAgentSettings.defaultReasoningEffort),W=d.createSelector(e=>e.backgroundAgentSettings.typeReasoningEffortOverrides),j=d.createSelector(e=>e.backgroundAgentSettings);function r(e){return{category:"settings",...e}}const f=[{id:"new-workspace",tab:"",label:"New workspace",route:"/workspace/new",category:"navigation",description:"Create-workspace flow."},r({id:"utility-default-model",tab:"providers",hashAliases:["utility-default-model","default-model","quickActions.defaultModel","backgroundAgents.defaultModel"],scrollSelector:"#utility-default-model",highlightSelector:'[data-highlight-id="utility-default-model"]',label:"Settings: Default model",route:"/settings?tab=providers#utility-default-model",description:"Default AI behavior model selection."}),r({id:"global-instructions",tab:"agent-behavior",hashAliases:["global-instructions","agents","specialists","all-agents"],scrollSelector:"#global-instructions",highlightSelector:'[data-highlight-id="global-instructions"]',label:"Settings: Agent Behavior",route:"/settings?tab=agent-behavior#global-instructions",description:"Global agent instructions and defaults."}),r({id:"create-specialist",tab:"specialists",hashAliases:["create-specialist"],scrollSelector:"#create-specialist",highlightSelector:'[data-highlight-id="create-specialist"]',label:"Settings: Create specialist",route:"/settings?tab=specialists&view=create-specialist#create-specialist",description:"Create-specialist entry point."}),r({id:"providers",tab:"providers",hashAliases:["providers"],scrollSelector:"#providers",highlightSelector:'[data-highlight-id="providers"]',label:"Settings: AI coding CLIs",route:"/settings?tab=providers#providers",description:"Provider/account selector settings."}),r({id:"integrations",tab:"connections",hashAliases:["integrations"],scrollSelector:"#integrations",highlightSelector:'[data-highlight-id="integrations"]',label:"Settings: Connections",route:"/settings?tab=connections#integrations",description:"Connected integrations settings."}),r({id:"devices",tab:"devices",hashAliases:["devices","machines"],scrollSelector:"#devices",highlightSelector:"#devices",label:"Settings: Machines",route:"/settings?tab=devices#devices",description:"Saved remote machine settings."}),r({id:"mobile",tab:"mobile",hashAliases:["mobile"],scrollSelector:"#mobile",highlightSelector:'[data-highlight-id="mobile"]',label:"Settings: Mobile",route:"/settings?tab=mobile#mobile",description:"Remote access and Intent Mobile pairing."}),r({id:"guest-sessions",tab:"collaboration",hashAliases:["collaboration","guest-sessions","sharing"],scrollSelector:"#collaboration",highlightSelector:"#collaboration",label:"Settings: Collaboration",route:"/settings?tab=collaboration#collaboration",description:"Host membership, workspace guests and joined hosts."}),r({id:"websocket-api",tab:"mobile",hashAliases:["websocket-api","remote-access"],scrollSelector:"#websocket-api",highlightSelector:'[data-highlight-id="websocket-api"]',label:"Settings: Remote Access",route:"/settings?tab=mobile#websocket-api",description:"Remote access (WebSocket API) settings."}),...[["voice","Voice Dictation","Voice dictation settings.","input"],["keyboard-shortcuts","Keyboard Shortcuts","Keyboard shortcuts reference.","input"],["mcp-servers","MCP Servers","MCP server configuration.","connections"],["git-workspace","Git & Workspace","Git and workspace defaults.","setup"],["git","Git","Git defaults.","setup"],["shell","Shell","Shell and CLI optimization settings.","setup"],["workspace","Workspace","Workspace defaults.","setup"],["cli-optimization","CLI Optimization","RTK/CLI optimization settings.","setup"],["workspace-api","Tool Output & Retention","Tool output size and retention settings.","advanced"],["notifications","Notifications","Notification preferences.","app-behavior"],["updates","Updates","Application update preferences.","app-behavior"],["open-in","Open In","External editor/app launch preferences.","app-behavior"],["github-link-action","GitHub Links","GitHub issue and pull request link behavior.","app-behavior"],["agent-features","Agent Features","Agent feature settings.","agent-behavior"],["font-style","Font style","Font style settings.","display"],["language","Language","Application language settings.","display"],["agent-backend","Agent Backend","Agent backend settings.","advanced"],["connection","Connection","Daemon connection details.","advanced"],["hardware","Hardware","Hardware integration settings.","advanced"],["developer","Developer","Development-only settings.","advanced"]].map(([e,t,i,a])=>r({id:e,tab:a,hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=${a}#${e}`,description:i})),r({id:"appearance",tab:"display",hashAliases:["appearance","theme"],scrollSelector:"#theme",highlightSelector:'[data-highlight-id="appearance"]',label:"Settings: Appearance",route:"/settings?tab=display#theme",description:"Theme mode controls."}),...[["color-theme","Color theme","Color theme selection."],["note-font","Notes font","Notes/spec font style."],["agent-chat-font","Agent chat font","Agent chat font style."],["code-font","Code font","Code editor and diff font."]].map(([e,t,i])=>r({id:e,tab:"display",hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=display#${e}`,description:i})),r({id:"general",tab:"advanced",hashAliases:["general","reset"],scrollSelector:"#reset",highlightSelector:'[data-highlight-id="general"]',label:"Settings: Advanced",route:"/settings?tab=advanced#reset",description:"Advanced settings and reset controls."}),{id:"workspace-card",tab:"",hashAliases:["workspace-card"],highlightSelector:'[data-highlight-id^="workspace-"]',label:"Workspace card",category:"workspace",description:"A workspace card on workspace list surfaces.",dynamic:!0,idPattern:"workspace-{workspaceId}"},{id:"specialist-entry",tab:"specialists",highlightSelector:'[data-highlight-id^="specialist-"]',label:"Specialist entry",route:"/settings?tab=specialists&specialist={specialistId}#specialist-{specialistId}",category:"specialist",description:"A specific specialist row in settings.",dynamic:!0,idPattern:"specialist-{specialistId}"}];function m(e){const t=e.indexOf("#"),i=t>=0?e.slice(t+1):e;return decodeURIComponent(i.replace(/^#/,"")).trim()}function I(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function M(e,t){if(!t.match(/\{[^}]+\}/g)?.length)return e===t;const a=t.split(/\{[^}]+\}/g).map(I).join("[^/]+");return new RegExp(`^${a}$`).test(e)}function R(e){const t=m(e);if(!t)return;const i=f.find(o=>o.id===t||o.hashAliases?.includes(t));if(i)return i;const a=f.find(o=>o.route&&o.dynamic&&o.idPattern&&M(t,o.idPattern));return a?{...a,id:t}:void 0}function T(e){try{return new URL(e,"app://intent").pathname||"/"}catch{const t=e.indexOf("?"),i=e.indexOf("#");let a=e.length;return t>=0&&(a=Math.min(a,t)),i>=0&&(a=Math.min(a,i)),e.slice(0,a)||"/"}}const E=new Set(f.flatMap(e=>e.route?[T(e.route)]:[])),C=[/^\/workspace\/[^/]+$/,/^\/agent\/[^/]+$/];function q(e){if(typeof e!="string")return!1;const t=e.trim();if(!t)return!1;if(t.startsWith("intent://"))return!0;let i,a;try{const o=new URL(t,"app://intent");if(o.protocol!=="app:")return!1;i=o.pathname||"/",a=m(o.hash)}catch{return!1}return E.has(i)?a?!!R(a):!0:C.some(o=>o.test(i))}const O=d.createSelector(e=>{const t=new Map,i=(s,c)=>{const g=t.get(s)??new Set;g.add(c),t.set(s,g)},a=k.select(e),o=A.select(e),h=_.select(e)[o];h&&o&&i(o,n.settings_providers_inUseDefaultModel_label({model:h})),b(o)&&!h&&i(o,n.settings_providers_inUseDefaultProvider_label());const u=e.backgroundAgentSettings?.providerId;u&&b(u)&&i(u,n.settings_providers_inUseQuickActions_label());for(const s of y.select(e)){const c=w.select(e,s.id),g=s.source?{project:n.settings_providers_pinSourceProject_label(),user:n.settings_providers_pinSourceUser_label(),bundled:n.settings_providers_pinSourceBundled_label(),builtin:n.settings_providers_pinSourceBuiltin_label(),"electron-store":n.settings_providers_pinSourceLegacy_label()}[s.source]:void 0,p=l=>g&&c?n.settings_providers_inUseSourcePath_label({reason:l,source:g,path:c}):g?n.settings_providers_inUseSource_label({reason:l,source:g}):c?n.settings_providers_inUsePath_label({reason:l,path:c}):l;if(s.codingAgent&&i(s.codingAgent,p(n.settings_providers_inUseSpecialistAgent_label({name:s.name}))),s.modelOptions?.forEach((l,v)=>{l.provider&&b(l.provider)&&i(l.provider,p(n.settings_providers_inUseSpecialistModelOption_label({name:s.name,position:P(v+1)})))}),s.defaultModel)if(s.defaultModel.includes(":")){const l=S(s.defaultModel).providerId??a;i(l,p(n.settings_providers_inUseSpecialistModel_label({name:s.name,model:s.defaultModel})))}else s.codingAgent||i(a,p(n.settings_providers_inUseSpecialistModel_label({name:s.name,model:s.defaultModel})))}return Object.fromEntries([...t].map(([s,c])=>[s,[...c].join(`
|
|
2
2
|
`)]))});d.createSelector((e,t)=>O.select(e)[t]??null);const U=[{id:"dracula",label:"Dracula"},{id:"nord",label:"Nord"},{id:"rose-pine",label:"Rosé Pine"},{id:"tokyo-night",label:"Tokyo Night"},{id:"solarized",label:"Solarized"},{id:"github",label:"GitHub"},{id:"high-contrast",label:"High Contrast"}],K=U.map(({id:e})=>e);export{K as T,U as a,F as b,j as c,L as d,W as e,z as f,O as g,q as i,R as r,G as s};
|