@intent-hq/web 2.362.0 → 2.362.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{jd2Q-_wb.js → 0Go2CbyU.js} +1 -1
- package/web/app/immutable/chunks/{DF45Lcog.js → 1nRBQ8GP.js} +1 -1
- package/web/app/immutable/chunks/{BMwhw1Uq.js → 23XOeMSz.js} +1 -1
- package/web/app/immutable/chunks/{zyhN-MWp.js → 2YXwswD5.js} +1 -1
- package/web/app/immutable/chunks/{D0klBhhG.js → 2hni5UX1.js} +1 -1
- package/web/app/immutable/chunks/{BomJfUuH.js → 4iYH6029.js} +1 -1
- package/web/app/immutable/chunks/{CeVJyslc.js → 55cMcX02.js} +1 -1
- package/web/app/immutable/chunks/{DiqO4Muj.js → 6b8eTysf.js} +1 -1
- package/web/app/immutable/chunks/{DrYNp4pq.js → 6zG0ROGL.js} +1 -1
- package/web/app/immutable/chunks/{Dg1sjsED.js → 8VBKAONs.js} +2 -2
- package/web/app/immutable/chunks/{DrRkoSeq.js → AWaLRNq4.js} +1 -1
- package/web/app/immutable/chunks/{DDVZx1NH.js → B-DzvqX1.js} +1 -1
- package/web/app/immutable/chunks/{u9TRZTyq.js → B1nPoFt8.js} +1 -1
- package/web/app/immutable/chunks/{BILh4U9K.js → B1rImF8u.js} +1 -1
- package/web/app/immutable/chunks/{vVxVtKpW.js → B2U6zHXn.js} +1 -1
- package/web/app/immutable/chunks/{1gFj_z6C.js → B2y4Ey03.js} +1 -1
- package/web/app/immutable/chunks/{ByAb1cmM.js → B3jM95Fp.js} +1 -1
- package/web/app/immutable/chunks/{42eDZto7.js → B3sqRIS9.js} +1 -1
- package/web/app/immutable/chunks/{C8YPd-6H.js → B43yoCDN.js} +1 -1
- package/web/app/immutable/chunks/{B8XPpKv7.js → B5nay5Hl.js} +3 -3
- package/web/app/immutable/chunks/{iQseBcjp.js → B6XV-wYf.js} +1 -1
- package/web/app/immutable/chunks/{B6ovWwJ_.js → B6lDfWDz.js} +1 -1
- package/web/app/immutable/chunks/{nIMiMGnC.js → B6qAtTdf.js} +1 -1
- package/web/app/immutable/chunks/{Bept5Hnm.js → B7ZiQt9B.js} +1 -1
- package/web/app/immutable/chunks/{CvAmKg2X.js → B7he-vwJ.js} +1 -1
- package/web/app/immutable/chunks/{BW6IwFyw.js → BAS5Ei9a.js} +4 -4
- package/web/app/immutable/chunks/{CY5L4aNw.js → BBXi6eZS.js} +1 -1
- package/web/app/immutable/chunks/{DnUPJZ7Y.js → BBeX3tt3.js} +1 -1
- package/web/app/immutable/chunks/{BA1Q6PPR.js → BFNGEzf6.js} +1 -1
- package/web/app/immutable/chunks/{D3YyaVry.js → BIBmWYIa.js} +1 -1
- package/web/app/immutable/chunks/{D9wnkmBu.js → BIQ9eVuf.js} +1 -1
- package/web/app/immutable/chunks/{BWcEoYRV.js → BKSdTbM0.js} +1 -1
- package/web/app/immutable/chunks/{DK8BxGVr.js → BKW-24eH.js} +1 -1
- package/web/app/immutable/chunks/{B2tn4QvC.js → BMXpCN2Z.js} +1 -1
- package/web/app/immutable/chunks/BNq3scG4.js +4 -0
- package/web/app/immutable/chunks/{DQ21wdjk.js → BPWzrv4n.js} +1 -1
- package/web/app/immutable/chunks/{VfrZWr4H.js → BPu2GADH.js} +1 -1
- package/web/app/immutable/chunks/{CRKBkpOe.js → BQi1vxhj.js} +1 -1
- package/web/app/immutable/chunks/{i9nNzXN1.js → BR6IlpMz.js} +1 -1
- package/web/app/immutable/chunks/{DpinIuVV.js → BRPvhipI.js} +2 -2
- package/web/app/immutable/chunks/{DwVWq9Mg.js → BSiWAL4B.js} +1 -1
- package/web/app/immutable/chunks/{BfYNlt8G.js → BTPstSq4.js} +1 -1
- package/web/app/immutable/chunks/{CEJtWBth.js → BULwUgGm.js} +1 -1
- package/web/app/immutable/chunks/{Dc2OgodD.js → BUNb3q2A.js} +1 -1
- package/web/app/immutable/chunks/{T-q_OSSy.js → BU_WdKEZ.js} +1 -1
- package/web/app/immutable/chunks/{Cd0j3msa.js → BUansWOB.js} +1 -1
- package/web/app/immutable/chunks/{qdH_r52r.js → BV4hVkqh.js} +1 -1
- package/web/app/immutable/chunks/{C_DRWbBT.js → BWxyJyKV.js} +1 -1
- package/web/app/immutable/chunks/{D4rtf9eK.js → BZMuFhDq.js} +2 -2
- package/web/app/immutable/chunks/{C2jMmBZH.js → BZaxCCc-.js} +3 -3
- package/web/app/immutable/chunks/{DhHBMk2S.js → B_Qscghg.js} +4 -4
- package/web/app/immutable/chunks/{CTuEdhIK.js → BbNaXeCx.js} +1 -1
- package/web/app/immutable/chunks/{DEz0iQL-.js → Bctp9lP7.js} +1 -1
- package/web/app/immutable/chunks/{BHi5IZAX.js → Bd3N9n0H.js} +1 -1
- package/web/app/immutable/chunks/{BIeyZqbO.js → Be0mmWcA.js} +6 -6
- package/web/app/immutable/chunks/{BLN77Nun.js → BeQ5cBZr.js} +1 -1
- package/web/app/immutable/chunks/{D-HbS-OO.js → BedgIvkT.js} +1 -1
- package/web/app/immutable/chunks/{CGq1dL3z.js → Bei3Ber-.js} +1 -1
- package/web/app/immutable/chunks/{AlKC0Ocb.js → Bg85AeOE.js} +1 -1
- package/web/app/immutable/chunks/{ButwRe61.js → BgO8l4RL.js} +1 -1
- package/web/app/immutable/chunks/{C5gI3OmS.js → Bh9XFM6t.js} +1 -1
- package/web/app/immutable/chunks/{Do-7hUG3.js → Bhsd_vBR.js} +1 -1
- package/web/app/immutable/chunks/{B64Wa5S6.js → Bi_5p9qD.js} +1 -1
- package/web/app/immutable/chunks/{BJBg5aea.js → BjhYYm97.js} +1 -1
- package/web/app/immutable/chunks/{Moy2Fnv7.js → BlbxSj1X.js} +1 -1
- package/web/app/immutable/chunks/{B_F2KAss.js → BluA3DZF.js} +1 -1
- package/web/app/immutable/chunks/{BRRZ-rdF.js → BluWIyqL.js} +1 -1
- package/web/app/immutable/chunks/{ConZf1Xc.js → BmH3z8uN.js} +1 -1
- package/web/app/immutable/chunks/{DGgxtq4s.js → Bo-zVBuZ.js} +1 -1
- package/web/app/immutable/chunks/{fBGaFk7o.js → Bpl_qBuR.js} +3 -3
- package/web/app/immutable/chunks/{Bbp04L_p.js → Bq9n6Tla.js} +1 -1
- package/web/app/immutable/chunks/{CLD_-K5U.js → BqGa1t8L.js} +1 -1
- package/web/app/immutable/chunks/{CHVebKY7.js → BqzT4O7L.js} +3 -3
- package/web/app/immutable/chunks/{BxEYTNET.js → Br53KhNC.js} +1 -1
- package/web/app/immutable/chunks/{alfd90bM.js → BrfrzpId.js} +1 -1
- package/web/app/immutable/chunks/{BhKKK-kE.js → BszkqKbM.js} +1 -1
- package/web/app/immutable/chunks/{BGAw0soA.js → BtoR1PxE.js} +1 -1
- package/web/app/immutable/chunks/{ryY3ARJp.js → Bu1TNEzu.js} +1 -1
- package/web/app/immutable/chunks/{BkJlUIRT.js → BuWwi-OB.js} +1 -1
- package/web/app/immutable/chunks/{Cm_3RFg5.js → BvEWkly-.js} +1 -1
- package/web/app/immutable/chunks/{C_xs3Po8.js → BwV7CRGN.js} +1 -1
- package/web/app/immutable/chunks/{Dv_zibKv.js → BwsZanfL.js} +1 -1
- package/web/app/immutable/chunks/{PgqRte-r.js → Bxs2oudl.js} +1 -1
- package/web/app/immutable/chunks/{BWX_OVAE.js → ByTn8oHf.js} +1 -1
- package/web/app/immutable/chunks/{DJQwKIJU.js → BykIeP0g.js} +1 -1
- package/web/app/immutable/chunks/{Di3oOarF.js → Bz3tuC8r.js} +2 -2
- package/web/app/immutable/chunks/{U10EozJE.js → BzQ3ATRh.js} +2 -2
- package/web/app/immutable/chunks/{BK_ocHH_.js → C-Reftw2.js} +1 -1
- package/web/app/immutable/chunks/{EAmw13pe.js → C-hb5nbb.js} +1 -1
- package/web/app/immutable/chunks/{D24Cy14e.js → C0RmcaXo.js} +1 -1
- package/web/app/immutable/chunks/{CokgYiLR.js → C1T-qy7I.js} +1 -1
- package/web/app/immutable/chunks/{BghGxAUO.js → C1o3spBY.js} +1 -1
- package/web/app/immutable/chunks/C2wAzMR4.js +176 -0
- package/web/app/immutable/chunks/{DHuPiSx5.js → C3UeOegI.js} +1 -1
- package/web/app/immutable/chunks/{DYBIQz8Q.js → C4GIXttQ.js} +1 -1
- package/web/app/immutable/chunks/{n_DC9aJx.js → C4_rKMDp.js} +13 -13
- package/web/app/immutable/chunks/{DA_NmGws.js → C4ndhNfG.js} +1 -1
- package/web/app/immutable/chunks/{DABONrQm.js → C4pyVvwk.js} +1 -1
- package/web/app/immutable/chunks/{CVAjc0yi.js → C6NQnjdC.js} +1 -1
- package/web/app/immutable/chunks/{D19QUWJk.js → C6XOSM-4.js} +1 -1
- package/web/app/immutable/chunks/{CGAW_CqO.js → C6pmzcFd.js} +1 -1
- package/web/app/immutable/chunks/{CLEN2qBh.js → C6sQTdfe.js} +1 -1
- package/web/app/immutable/chunks/{BV6tz7in.js → C6vubJsO.js} +1 -1
- package/web/app/immutable/chunks/{DNbGju-D.js → C7XLe6Fq.js} +1 -1
- package/web/app/immutable/chunks/{2f17jIS_.js → C8b1hAiZ.js} +1 -1
- package/web/app/immutable/chunks/{_yja1RDN.js → C9YJ2_w0.js} +1 -1
- package/web/app/immutable/chunks/{DBzwbLy-.js → C9nffMna.js} +1 -1
- package/web/app/immutable/chunks/{C1rlyspR.js → CAEXUpGf.js} +1 -1
- package/web/app/immutable/chunks/{elqYuZ6s.js → CAqlFYYX.js} +1 -1
- package/web/app/immutable/chunks/{jCb2rWV2.js → CBgqNyOn.js} +1 -1
- package/web/app/immutable/chunks/{B7D3Z-Y4.js → CCBDeIiF.js} +1 -1
- package/web/app/immutable/chunks/{C79wLg62.js → CCDDqQJs.js} +1 -1
- package/web/app/immutable/chunks/{DP4Ph7EA.js → CCm0OKl5.js} +1 -1
- package/web/app/immutable/chunks/CDNiWmce.js +1 -0
- package/web/app/immutable/chunks/{7QQiv-wr.js → CDSuKhpz.js} +1 -1
- package/web/app/immutable/chunks/{BUG9TrVX.js → CE2LFl-Z.js} +1 -1
- package/web/app/immutable/chunks/CE9WteXp.js +1 -0
- package/web/app/immutable/chunks/{Q1GArL_y.js → CFidbeSw.js} +1 -1
- package/web/app/immutable/chunks/{Dw_UfDsA.js → CFtRsKmm.js} +1 -1
- package/web/app/immutable/chunks/{DLLVCgsV.js → CGDxdR4I.js} +1 -1
- package/web/app/immutable/chunks/{DDy_8zbA.js → CH6-PW8d.js} +1 -1
- package/web/app/immutable/chunks/{XHWmx2fo.js → CI4L9sp8.js} +1 -1
- package/web/app/immutable/chunks/{DV6XB2ci.js → CJ9TjlSl.js} +1 -1
- package/web/app/immutable/chunks/{Vm4nXzsi.js → CJAHD8Av.js} +1 -1
- package/web/app/immutable/chunks/{CC7j966i.js → CKwXUgM5.js} +1 -1
- package/web/app/immutable/chunks/{nXQJ8vXX.js → CLDOuGzT.js} +1 -1
- package/web/app/immutable/chunks/{DR2SVCXR.js → CLG5hs6R.js} +1 -1
- package/web/app/immutable/chunks/{C8i00JgJ.js → CMQcQe3J.js} +1 -1
- package/web/app/immutable/chunks/{Be7gn9X-.js → CMmAwBL2.js} +1 -1
- package/web/app/immutable/chunks/{BG3WACU1.js → CORIYKie.js} +1 -1
- package/web/app/immutable/chunks/{Bff_Rbbv.js → CQ0hCG0n.js} +1 -1
- package/web/app/immutable/chunks/{D2jeSuJo.js → CQ2XnxCv.js} +1 -1
- package/web/app/immutable/chunks/{_1FSfiRe.js → CQBcB58U.js} +1 -1
- package/web/app/immutable/chunks/{CiSSCgqR.js → CQocjKjX.js} +1 -1
- package/web/app/immutable/chunks/{CC7Uzavp.js → CR6eaDMw.js} +1 -1
- package/web/app/immutable/chunks/{flRZVSKn.js → CRLV4RHy.js} +1 -1
- package/web/app/immutable/chunks/{8DKB8YcU.js → CTcdcUyj.js} +1 -1
- package/web/app/immutable/chunks/{CXq2AoEa.js → CThSE8LQ.js} +1 -1
- package/web/app/immutable/chunks/{CZlp_xaa.js → CXEzZ2hR.js} +1 -1
- package/web/app/immutable/chunks/{Dkq3_GD2.js → CXfsvSt9.js} +1 -1
- package/web/app/immutable/chunks/{DcS7tCp_.js → CYKcOC1a.js} +1 -1
- package/web/app/immutable/chunks/{CZScRu8r.js → CYP3WRBZ.js} +1 -1
- package/web/app/immutable/chunks/{DbF4GEUt.js → CZLC2BGb.js} +1 -1
- package/web/app/immutable/chunks/{D7W8zNV0.js → Ca-5qIPO.js} +1 -1
- package/web/app/immutable/chunks/{_5QQ1P8H.js → CaD-rr4v.js} +1 -1
- package/web/app/immutable/chunks/{BVZHN8O1.js → CcNWV5oe.js} +1 -1
- package/web/app/immutable/chunks/{DOB06fXT.js → CfsrLxYu.js} +1 -1
- package/web/app/immutable/chunks/CgZG1QkR.js +1 -0
- package/web/app/immutable/chunks/{DI85QvsH.js → Ch4PqakC.js} +1 -1
- package/web/app/immutable/chunks/{BZvzMoRv.js → ChXvhbof.js} +1 -1
- package/web/app/immutable/chunks/{B-7yIMT_.js → ChpnaSsg.js} +1 -1
- package/web/app/immutable/chunks/CiTaZNiG.js +1 -0
- package/web/app/immutable/chunks/{DzsS0_p_.js → CjuG-F5E.js} +1 -1
- package/web/app/immutable/chunks/{DG5HQEoF.js → Ck9E0Ysi.js} +1 -1
- package/web/app/immutable/chunks/{4uhoMHE_.js → Ckre-sgD.js} +1 -1
- package/web/app/immutable/chunks/{CL7qDIdV.js → ClEAI4g1.js} +3 -3
- package/web/app/immutable/chunks/{Cqru5LxS.js → ClI6BjKq.js} +1 -1
- package/web/app/immutable/chunks/{CJeXodn0.js → CmUp-Sqv.js} +1 -1
- package/web/app/immutable/chunks/{C0iYgKNx.js → Cng0L1r4.js} +1 -1
- package/web/app/immutable/chunks/{BvgeBoe1.js → Cp1SIa9c.js} +1 -1
- package/web/app/immutable/chunks/{nPXXKIa-.js → CpUG4uWd.js} +1 -1
- package/web/app/immutable/chunks/{DNmf6q32.js → CqSZC6ch.js} +1 -1
- package/web/app/immutable/chunks/{zB1IXbXb.js → CrgKt6cz.js} +1 -1
- package/web/app/immutable/chunks/{D1BBZ1Su.js → CsC9zelV.js} +1 -1
- package/web/app/immutable/chunks/{EAy3xyVJ.js → CvQjTi4D.js} +2 -2
- package/web/app/immutable/chunks/{CuNeyUoC.js → CyRyIWdG.js} +1 -1
- package/web/app/immutable/chunks/{CvFqJ3aj.js → Cyk2Y411.js} +1 -1
- package/web/app/immutable/chunks/{D01RaHSK.js → D-qx9bcE.js} +1 -1
- package/web/app/immutable/chunks/{ByTueQZz.js → D1tVMvmo.js} +1 -1
- package/web/app/immutable/chunks/{CVBzfNwe.js → D2NUq8UU.js} +1 -1
- package/web/app/immutable/chunks/{DmEF8CQK.js → D2c3A473.js} +1 -1
- package/web/app/immutable/chunks/{CUYJI5X_.js → D31UPrBJ.js} +1 -1
- package/web/app/immutable/chunks/{DVGWHR1H.js → D4nLWqqO.js} +1 -1
- package/web/app/immutable/chunks/{1MVyJ09_.js → D67FZ5Lv.js} +1 -1
- package/web/app/immutable/chunks/{BkDiy3qO.js → D7WbMK4o.js} +1 -1
- package/web/app/immutable/chunks/{CgeqCnG6.js → D7niCCgo.js} +1 -1
- package/web/app/immutable/chunks/{CsQLAzr5.js → D9yIi5KK.js} +1 -1
- package/web/app/immutable/chunks/{D7sOTjCO.js → DA9Mdvxh.js} +1 -1
- package/web/app/immutable/chunks/{DSYQunl3.js → DAw72DZa.js} +1 -1
- package/web/app/immutable/chunks/{BNH_hD0i.js → DC8uF3lu.js} +1 -1
- package/web/app/immutable/chunks/{Zq02JorO.js → DD5eVBJb.js} +1 -1
- package/web/app/immutable/chunks/{CGPTsmEd.js → DDXthoba.js} +1 -1
- package/web/app/immutable/chunks/{CJSinxIK.js → DDaa7h_m.js} +1 -1
- package/web/app/immutable/chunks/{CdNWk-Bu.js → DEHoDrdd.js} +1 -1
- package/web/app/immutable/chunks/{Bo32wczA.js → DFNql_nS.js} +1 -1
- package/web/app/immutable/chunks/{kQoy32cr.js → DFYNZGf0.js} +1 -1
- package/web/app/immutable/chunks/{T940uwQN.js → DHffIWwt.js} +3 -3
- package/web/app/immutable/chunks/{vbGVPT6S.js → DHgdHC6B.js} +1 -1
- package/web/app/immutable/chunks/{C1a72gDa.js → DIKaua7R.js} +1 -1
- package/web/app/immutable/chunks/{DXJvf4ja.js → DIuXteuM.js} +1 -1
- package/web/app/immutable/chunks/{DQloJDQl.js → DJWDj1lZ.js} +1 -1
- package/web/app/immutable/chunks/{-Yzk2rdh.js → DJcIRc5D.js} +1 -1
- package/web/app/immutable/chunks/{NuBvLfzz.js → DK7i7mSH.js} +1 -1
- package/web/app/immutable/chunks/{DywT6cR_.js → DMSGpXyL.js} +2 -2
- package/web/app/immutable/chunks/{CIjzTMjk.js → DOaNjGx3.js} +1 -1
- package/web/app/immutable/chunks/{plzucQew.js → DP1vd71f.js} +1 -1
- package/web/app/immutable/chunks/{BsQjFYUU.js → DQmIdOy5.js} +1 -1
- package/web/app/immutable/chunks/{BNXO9e-K.js → DUa7Jvhz.js} +2 -2
- package/web/app/immutable/chunks/{CdYki3Ne.js → DUaHJCzY.js} +1 -1
- package/web/app/immutable/chunks/{CrG8QfjF.js → DUzPWaFA.js} +1 -1
- package/web/app/immutable/chunks/{D8hpao6N.js → DVxqmkFy.js} +1 -1
- package/web/app/immutable/chunks/{CaFfZGOK.js → DWEDgLOm.js} +1 -1
- package/web/app/immutable/chunks/{DfIwRMMx.js → DWbtFEwH.js} +1 -1
- package/web/app/immutable/chunks/{epeXa5Nl.js → DYaRWcpg.js} +1 -1
- package/web/app/immutable/chunks/{DdQ2Ee-5.js → DZSVN5v8.js} +1 -1
- package/web/app/immutable/chunks/{ClcIbYyp.js → DZtCGZgy.js} +1 -1
- package/web/app/immutable/chunks/{yYJfu2JX.js → DaNGy3D8.js} +1 -1
- package/web/app/immutable/chunks/{CUPNFNnH.js → DcR44gq9.js} +1 -1
- package/web/app/immutable/chunks/{CBM6AzvV.js → DgNEPBVe.js} +1 -1
- package/web/app/immutable/chunks/{Cc_mAvF5.js → Dh1ev8RB.js} +1 -1
- package/web/app/immutable/chunks/{vojGrKrS.js → DizljkHL.js} +1 -1
- package/web/app/immutable/chunks/{COBWKiGh.js → DjY1surq.js} +1 -1
- package/web/app/immutable/chunks/{D-37OIYf.js → DjeFU-Mu.js} +1 -1
- package/web/app/immutable/chunks/{BVZsZXmm.js → Dk5qPA5a.js} +1 -1
- package/web/app/immutable/chunks/{DSQMj_om.js → Dkw1IBph.js} +1 -1
- package/web/app/immutable/chunks/{wsJnb2w5.js → DnDBa5Or.js} +4 -4
- package/web/app/immutable/chunks/{D8JHIZfM.js → Dqi9bJNf.js} +1 -1
- package/web/app/immutable/chunks/{CrrPK0Iv.js → DrLx8OXO.js} +1 -1
- package/web/app/immutable/chunks/{Jbhi_cxP.js → DrSdReTn.js} +1 -1
- package/web/app/immutable/chunks/{Db_IhgBX.js → DrhiSb3J.js} +3 -3
- package/web/app/immutable/chunks/{D-QSPFPS.js → Dtxuz85W.js} +1 -1
- package/web/app/immutable/chunks/{D4ILfrQP.js → Du4MGCS4.js} +2 -2
- package/web/app/immutable/chunks/{BpOFfIvt.js → Du7ytJ4P.js} +1 -1
- package/web/app/immutable/chunks/{CbmUPEyZ.js → DuJdf9UG.js} +1 -1
- package/web/app/immutable/chunks/{CqDJmhHZ.js → DuOIvAqY.js} +2 -2
- package/web/app/immutable/chunks/{D73fvKXP.js → Dv3pGERg.js} +1 -1
- package/web/app/immutable/chunks/{DkPeQV3c.js → DvIus6kU.js} +1 -1
- package/web/app/immutable/chunks/{DwzYDj81.js → DwhPYiCJ.js} +1 -1
- package/web/app/immutable/chunks/{By1IjcbO.js → Dx9DzOqr.js} +1 -1
- package/web/app/immutable/chunks/{KkoOm1V0.js → DxFZ9gq2.js} +1 -1
- package/web/app/immutable/chunks/{C0-eX4eQ.js → DxM_2tEs.js} +1 -1
- package/web/app/immutable/chunks/{CBRPyq3u.js → Dx_cihQo.js} +3 -3
- package/web/app/immutable/chunks/{C8LXsE7b.js → DxgNlamv.js} +1 -1
- package/web/app/immutable/chunks/{LSzEWm4Q.js → DyYAxHE8.js} +1 -1
- package/web/app/immutable/chunks/{3RdDKrNK.js → DzCzYdRR.js} +1 -1
- package/web/app/immutable/chunks/{BVZ3OidP.js → EENIG6sq.js} +1 -1
- package/web/app/immutable/chunks/{B5jBKY1h.js → ETRy7Ggy.js} +1 -1
- package/web/app/immutable/chunks/{CeXu7r8X.js → F4cRH-lc.js} +1 -1
- package/web/app/immutable/chunks/{DMAUyJ2P.js → FkFkR8K2.js} +1 -1
- package/web/app/immutable/chunks/{NOaXnPaj.js → G87kWWA0.js} +2 -2
- package/web/app/immutable/chunks/{BCaye4Uu.js → HRcGzcZS.js} +1 -1
- package/web/app/immutable/chunks/{CrgZFb5y.js → IfYdwdBR.js} +1 -1
- package/web/app/immutable/chunks/{N6kzLiXM.js → J04upo63.js} +1 -1
- package/web/app/immutable/chunks/{DLxYdmRB.js → J1LWsTd9.js} +1 -1
- package/web/app/immutable/chunks/{Bult6xm-.js → JAWGj4Yi.js} +2 -2
- package/web/app/immutable/chunks/{g9ZlPi9F.js → Jf_R-Aac.js} +2 -2
- package/web/app/immutable/chunks/{CE6pj9s3.js → KYr22_OD.js} +1 -1
- package/web/app/immutable/chunks/{oxDrPxDU.js → KilK2UOM.js} +1 -1
- package/web/app/immutable/chunks/{DtvdPXC0.js → LwSSBtxX.js} +1 -1
- package/web/app/immutable/chunks/{BV1K6wKe.js → M2GCPKoA.js} +1 -1
- package/web/app/immutable/chunks/{ByQw5PSS.js → O-SiHQ6R.js} +1 -1
- package/web/app/immutable/chunks/{CoaHiAox.js → Or_TQbr1.js} +1 -1
- package/web/app/immutable/chunks/{D9tcLZ_Y.js → Qb3uerTr.js} +1 -1
- package/web/app/immutable/chunks/{BgyYCiyL.js → Qizor3xZ.js} +1 -1
- package/web/app/immutable/chunks/{CpbmyPj0.js → Qm-MZg2p.js} +1 -1
- package/web/app/immutable/chunks/{zgekXgkJ.js → QnpVdYT5.js} +1 -1
- package/web/app/immutable/chunks/{D2-mq7g4.js → R19W582_.js} +1 -1
- package/web/app/immutable/chunks/{DyCS2A-K.js → RGmB-SjS.js} +1 -1
- package/web/app/immutable/chunks/{BNZHgKSk.js → UWQdg-A2.js} +1 -1
- package/web/app/immutable/chunks/{nK5lgmDU.js → UfUfpfpL.js} +1 -1
- package/web/app/immutable/chunks/{N7qvIOuv.js → W_r4iRxt.js} +1 -1
- package/web/app/immutable/chunks/{0FRtEAk_.js → WvbffGVg.js} +1 -1
- package/web/app/immutable/chunks/{BrQE9aYr.js → Xu7DniMQ.js} +1 -1
- package/web/app/immutable/chunks/{CSRsy1MH.js → XvnVMArq.js} +1 -1
- package/web/app/immutable/chunks/{CIW89ENH.js → ZTWlL5zM.js} +1 -1
- package/web/app/immutable/chunks/{BDq2t_9P.js → _3XbzhXe.js} +1 -1
- package/web/app/immutable/chunks/{Bkg1yy3c.js → aa7X5cNm.js} +1 -1
- package/web/app/immutable/chunks/{Bzd2CMX7.js → awTIGLLj.js} +1 -1
- package/web/app/immutable/chunks/{DM4O8kyl.js → bP8UGzws.js} +1 -1
- package/web/app/immutable/chunks/{CvBqgDaO.js → c4H2cXzd.js} +1 -1
- package/web/app/immutable/chunks/{CPnsz9Hs.js → cH4zbEq8.js} +1 -1
- package/web/app/immutable/chunks/{BChgcxXb.js → cn1R3ng9.js} +3 -3
- package/web/app/immutable/chunks/{DOpB1zPF.js → dDu7RcXM.js} +1 -1
- package/web/app/immutable/chunks/{zAJ7GuqN.js → dVG3dMki.js} +1 -1
- package/web/app/immutable/chunks/{zGpo4Blc.js → dZVNnMZs.js} +3 -3
- package/web/app/immutable/chunks/{9M4Pl7xy.js → dqo-Nkop.js} +1 -1
- package/web/app/immutable/chunks/{CdZoWikL.js → gHustHEr.js} +1 -1
- package/web/app/immutable/chunks/{DlKmdKxb.js → jLuOcx2N.js} +1 -1
- package/web/app/immutable/chunks/{D6iZo_ET.js → jhvKFO58.js} +1 -1
- package/web/app/immutable/chunks/{DCbtEZw8.js → l-VTMc_p.js} +1 -1
- package/web/app/immutable/chunks/{ByW7bxEK.js → qD_x_a7m.js} +1 -1
- package/web/app/immutable/chunks/{BNJBQg5K.js → sYvdi7eG.js} +1 -1
- package/web/app/immutable/chunks/{BQDjmnIn.js → stD6q5ZD.js} +1 -1
- package/web/app/immutable/chunks/{DiCNp-8B.js → u_sm9GBc.js} +1 -1
- package/web/app/immutable/chunks/{DiuuSzCC.js → vf6pveFy.js} +1 -1
- package/web/app/immutable/chunks/{CIu-y8lY.js → wAO5YQrd.js} +1 -1
- package/web/app/immutable/chunks/{hwmpZCuz.js → xQ1tvRyj.js} +1 -1
- package/web/app/immutable/chunks/{wM5E_fWg.js → xnUCUXHt.js} +1 -1
- package/web/app/immutable/chunks/{PtztmcML.js → yQ7GpLm3.js} +1 -1
- package/web/app/immutable/chunks/{1Kd2V6Ma.js → yVGqQrjf.js} +1 -1
- package/web/app/immutable/chunks/{LYm3QdT8.js → yyRLwoJz.js} +1 -1
- package/web/app/immutable/chunks/{DAg74Tfa.js → zHH7Kw4o.js} +1 -1
- package/web/app/immutable/entry/{app.D2bTUfu9.js → app.CMLUt8-K.js} +3 -3
- package/web/app/immutable/entry/start.D1qRxQ8x.js +1 -0
- package/web/app/immutable/nodes/{0.CPawR9BC.js → 0.BYH6vQW3.js} +1 -1
- package/web/app/immutable/nodes/{1.BlDqJU7r.js → 1.BAkbiSMg.js} +1 -1
- package/web/app/immutable/nodes/{10.BAMGMKNX.js → 10.DqnjBdnF.js} +5 -5
- package/web/app/immutable/nodes/{11.-7mABFeH.js → 11.mfKuarNN.js} +1 -1
- package/web/app/immutable/nodes/{12.CjcrqPFZ.js → 12.B8dwNd6E.js} +1 -1
- package/web/app/immutable/nodes/{13.Bc2gRY3E.js → 13.5M8H2X4b.js} +1 -1
- package/web/app/immutable/nodes/{14.W7UKKBbJ.js → 14.BzYka-40.js} +3 -3
- package/web/app/immutable/nodes/15.BcZNrBDb.js +3 -0
- package/web/app/immutable/nodes/{16.nAu8Tcun.js → 16.BZoPxych.js} +1 -1
- package/web/app/immutable/nodes/{17.BmHoggX-.js → 17.Cqw6uBts.js} +1 -1
- package/web/app/immutable/nodes/{18.CDqK9mtR.js → 18.Bhk-SJCV.js} +1 -1
- package/web/app/immutable/nodes/{19.BLC2e5Ym.js → 19.CKvaRxuS.js} +2 -2
- package/web/app/immutable/nodes/{2.CclojtZK.js → 2.BQJHslkB.js} +4 -4
- package/web/app/immutable/nodes/{20.DR7-1biV.js → 20.Dwc7t9AX.js} +1 -1
- package/web/app/immutable/nodes/{3.9s7e_J-v.js → 3.BLUctLcc.js} +1 -1
- package/web/app/immutable/nodes/{4.B6oC0aEI.js → 4.7Oh8cVZj.js} +1 -1
- package/web/app/immutable/nodes/{5.BhdMAH02.js → 5.C8XFrbrE.js} +1 -1
- package/web/app/immutable/nodes/{6.cb_yhLRO.js → 6.BfVTL0z7.js} +1 -1
- package/web/app/immutable/nodes/{7.CW5VpJ10.js → 7.B5PW7bVT.js} +1 -1
- package/web/app/immutable/nodes/{8.BCzBaaLq.js → 8.gpXKsW1b.js} +1 -1
- package/web/app/immutable/nodes/{9.CUYXVSxZ.js → 9.Do91vdif.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +49 -49
- package/web/index.html +18 -18
- package/web/app/immutable/chunks/B0MfNWkm.js +0 -1
- package/web/app/immutable/chunks/BfX15qhw.js +0 -1
- package/web/app/immutable/chunks/C1QwTBKK.js +0 -176
- package/web/app/immutable/chunks/CBVyphqp.js +0 -1
- package/web/app/immutable/chunks/DDSNlYGe.js +0 -4
- package/web/app/immutable/chunks/Or0TMIv9.js +0 -1
- package/web/app/immutable/entry/start.BjNeM0go.js +0 -1
- package/web/app/immutable/nodes/15.B7EMAryy.js +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{l as c}from"./
|
|
1
|
+
import{l as c}from"./B5nay5Hl.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],a={close:">",id:"angle",open:"<"},r={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:`
|
|
2
2
|
\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:`
|
|
3
3
|
\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function _(t,n){const i=`_${t.id}_${n.id}`,e=u=>u.replace(/__id__/g,i),o=u=>{const m=u.source.replace(/__id__/g,i);return new RegExp(m,u.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=_(a,t),i=_(r,t),e=_(F,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}const b={conf:l(a),language:_(a,k)},x={conf:l(r),language:_(r,k)},$={conf:l(a),language:_(a,p)},E={conf:l(r),language:_(r,p)},B={conf:g(),language:A(k)},D={conf:g(),language:A(p)};export{$ as TagAngleInterpolationBracket,b as TagAngleInterpolationDollar,D as TagAutoInterpolationBracket,B as TagAutoInterpolationDollar,E as TagBracketInterpolationBracket,x as TagBracketInterpolationDollar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./CJxGDkBm.js";import{p as De}from"./D7W8zNV0.js";import"./DLxYdmRB.js";import{j as Oe,k as we,c as We,l as ke}from"./i9nNzXN1.js";import{s as qe}from"./DcS7tCp_.js";import{i as _e}from"./l31NdHrN.js";function Ze(t,i={}){const l=(i.axis??"y")==="y"?"height":"width",o=parseFloat(getComputedStyle(t)[l]);if(!Number.isFinite(o))return{duration:0};const v=i.duration??160,y=v<=80?"fast":v<=160?"moderate":"slow";return Oe(t,{axis:i.axis,tier:y},{direction:"in"})}function $e(){return qe.get("enableComponentTransitions")}const Ae={request(){},settle(){}},O=new WeakMap,He=2,ze=2e3,re=2,Pe=1e3,Ve=3e3;function et(t,i){let l=i.enabled??!0,o=i.follow,v=i.onFollowChange,y=i.onScrollStateChange,T=i.threshold??100,w=!1,h=null,u=null,m=null,x=null,d=null,b=null,M=null,F=null,S=0,R=null,g=!1,$=null;const L=new Set,W=new Map,P=new WeakSet,k=new Map,A=document.createElement("div");A.dataset.followBottomAnchor="",A.setAttribute("aria-hidden","true"),A.style.cssText=`height:1px;${i.layoutNeutralBottomAnchor?"margin-top:-1px;":""}overflow-anchor:auto;pointer-events:none;flex:0 0 auto;`;function G(e){e===A||k.has(e)||(k.set(e,e.style.overflowAnchor),e.style.overflowAnchor="none")}function V(e){const n=k.get(e);n!==void 0&&(e.style.overflowAnchor=n,k.delete(e))}function I(e){if(e)for(const r of t.children)r instanceof HTMLElement&&G(r);else for(const r of k.keys())V(r);const n=e?"auto":"none";A.style.overflowAnchor!==n&&(A.style.overflowAnchor=n),e?(A.parentElement!==t||A.nextSibling)&&t.append(A):A.remove()}function H(){I(o)}function C(){A.remove();for(const e of k.keys())V(e)}function Y(e){P.add(e),x?.observe(e)}function j(){d!==null&&cancelAnimationFrame(d),F!==null&&cancelAnimationFrame(F),d=null,F=null,S=0,R=null}function c(){return Math.max(0,t.scrollHeight-t.clientHeight)}function D(){return $??=getComputedStyle(t).overflowAnchor!=="none",$}function q(){const e=c(),n=t.scrollTop,r=h??void 0;h={maximum:e,scrollTop:n};const f={maximum:e,scrollTop:n,previous:r};return p.observe(f),f}function U(e=q()){return e.scrollTop!==e.maximum&&(t.scrollTop=e.maximum),h={maximum:e.maximum,scrollTop:e.maximum},{maximum:e.maximum,scrollTop:e.maximum}}function N(e=q()){const n=Math.max(0,e.maximum-e.scrollTop),r=n<=T;u?.distanceFromBottom===n&&u.isAtBottom===r&&u.isFollowing===o||(u={distanceFromBottom:n,isAtBottom:r,isFollowing:o},y?.({distanceFromBottom:n,isAtBottom:r,isFollowing:o}))}function _(e,n=!0){if(p.cancel(),!l){o=e;return}const r=o!==e;r&&(o=e,I(e)),r&&n&&v?.(e),e||j(),N()}function ee(e,n=!0){if(!L.delete(e))return;const r=(W.get(e.element)??1)-1;r>0?W.set(e.element,r):(W.delete(e.element),P.has(e.element)||x?.unobserve?.(e.element)),S=0,n&&X()}function te(e=!0){if(L.size===0)return;const n=performance.now();for(const r of L)(!t.contains(r.element)||n>=r.expiresAt)&&ee(r,e)}function oe(){if(d=null,g||!l||!o)return;if(te(!1),L.size>0){d=requestAnimationFrame(oe);return}const e=U(),{maximum:n}=e;N(e),n===R?S+=1:(S=0,R=n),S<He&&(d=requestAnimationFrame(oe))}function X(){g||!l||!o||d!==null||(d=requestAnimationFrame(oe))}function z(e=!0){if(g||!l||!o)return;const n=U(),{maximum:r}=n;N(n),S=0,R=r,e&&X()}function ne(){M===null&&(M=requestAnimationFrame(()=>{M=null,!(g||!l)&&N()}))}function Te(){if(F=null,g||!l)return;let e=q();const n=e.scrollTop!==e.maximum;e=U(e),(n||e.maximum!==R||L.size>0)&&(S=0,R=e.maximum,X()),N(e)}function Fe(){if(!(g||!l)){if(o){if(d!==null||F!==null)return;F=requestAnimationFrame(Te);return}ne()}}function Se(){if(!(g||!l)){if(o){z(F===null);return}ne()}}const K={followAndScroll(){_(!0),z()},isFollowing:()=>o,isNativeScrollAnchoringActive:()=>!o&&getComputedStyle(t).overflowAnchor!=="none",hasActiveMutation:()=>o?(te(),L.size>0):!1,beforeMutation(e,n){if(g||!l||!o)return Ae;const r={element:e,expiresAt:performance.now()+(n.maxHoldMs??ze)};L.add(r);const f=W.get(e)??0;return W.set(e,f+1),f===0&&!P.has(e)&&x?.observe(e),S=0,X(),{request(){!L.has(r)||g||(D()?X():z())},settle(){if(!(g||!L.has(r))){if(D()){ee(r);return}ee(r,!1),z()}}}}};function Le(){let e=null,n=null,r=null,f;function Q(s){return!e||s&&e.wheel!==s?!1:!e.wheel?.defaultPrevented&&performance.now()<e.expiresAt}function Me(s,a){if(s.maximum-s.scrollTop<=re)return!0;const B=s.previous;return a&&B!==void 0&&B.maximum<s.maximum&&B.maximum-s.scrollTop<=re}function Z(s,a){return Me(s,a)?(K.followAndScroll(),!0):!1}function ge(s){const a=q();return Q(s)&&Z(a,!0)}function Re(s){f=s,r===null&&(r=requestAnimationFrame(()=>{r=null;const a=f;f=void 0,!(g||!l||!Q(a))&&(ge(a)||N())}))}function Ne(s,a){const B=Math.max(0,a.maximum-a.scrollTop);if(a.maximum!==s.maximum)return s.maximum=a.maximum,s.distance=B,s.movedTowardBottom=!1,!1;const ve=B-s.distance;return s.distance=B,ve>0?(s.movedTowardBottom=!1,_(!1),!0):ve===0?!1:(s.movedTowardBottom=!0,Z(a,!1))}function Ce(s){if(o||!e)return!1;const a=s.previous;return a&&s.scrollTop<a.scrollTop?(e=null,!1):(!a||s.scrollTop>a.scrollTop)&&Q()&&Z(s,!0)}return{isDragging:()=>n!==null,start(s,a){const B=s==="touch"?Ve:Pe;e={wheel:a,expiresAt:performance.now()+B}},grab(s){if(e=null,!s){n=null;return}const a=c();n={maximum:a,distance:Math.max(0,a-t.scrollTop),movedTowardBottom:!1}},move(s){return n?Ne(n,s):Ce(s)},land(s,a){if(s==="frame"){Re(a);return}if(s==="scrollend"){Q()&&ge(),e=null;return}if(!n)return;const{movedTowardBottom:B}=n;n=null,B&&Z(q(),!1)||N()},observe(s){const a=s.previous;e&&a!==void 0&&s.maximum<a.maximum&&s.maximum-s.scrollTop<=re&&(e=null)},cancel(){e=null},requestBottom(){K.followAndScroll()},reset(){e=null,n=null,f=void 0,r!==null&&cancelAnimationFrame(r),r=null}}}const p=Le();function ie(e){e.deltaY<0?_(!1):e.deltaY>0&&(p.start("wheel",e),p.land("frame",e))}function le(e){e.target===t?p.land("scrollend"):p.cancel()}let se=0;function ae(e){p.cancel(),w=!1,se=e.touches[0]?.clientY??0}function ue(e){const n=e.touches[0]?.clientY??0,r=se-n;w=r>0,r<0&&_(!1)}function ce(){w&&p.start("touch"),p.land("frame")}function fe(e){if(p.cancel(),["ArrowUp","PageUp","Home"].includes(e.key))_(!1);else if(["ArrowDown","PageDown","End"].includes(e.key)){if(e.target instanceof Element&&_e(e.target))return;if(e.key==="End"){p.requestBottom();return}p.start("keyboard"),p.land("frame")}}function Be(e){if(e.button!==0||e.target!==t)return!1;const n=Math.max(0,t.offsetWidth-t.clientWidth);if(n===0)return!1;const r=t.getBoundingClientRect(),f=t.offsetWidth>0?n*(r.width/t.offsetWidth):n;return getComputedStyle(t).direction==="rtl"?e.clientX<=r.left+f:e.clientX>=r.right-f}function me(){const e=p.isDragging();if(!e&&o&&d!==null)return;let n=q();p.move(n)||(o&&!e&&(n=U(n)),N(n))}function de(e){p.grab(Be(e))}function J(){p.land("release")}function Ee(){if(!m){m=new MutationObserver(e=>{let n=!1;for(const r of e)if(r.type==="childList"){for(const f of r.removedNodes)n=!0,f instanceof HTMLElement&&V(f);for(const f of r.addedNodes)f instanceof HTMLElement&&f!==A&&x&&(Y(f),o&&f.parentElement===t&&G(f))}n&&te(),I(o),Fe()}),m.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),x=new ResizeObserver(Se),Y(t);for(const e of t.children)e instanceof HTMLElement&&e!==A&&Y(e)}}function be(){m?.disconnect(),m=null,x?.disconnect(),x=null}function pe(e=!1){if(!l||g)return;if(O.set(t,K),t.addEventListener("scroll",me,{passive:!0}),t.addEventListener("scrollend",le,{passive:!0,capture:!0}),t.addEventListener("wheel",ie,{passive:!0}),t.addEventListener("touchstart",ae,{passive:!0}),t.addEventListener("touchmove",ue,{passive:!0}),t.addEventListener("touchend",ce,{passive:!0}),t.addEventListener("keydown",fe),t.addEventListener("pointerdown",de,{passive:!0}),window.addEventListener("pointerup",J,{passive:!0}),window.addEventListener("pointercancel",J,{passive:!0}),H(),Ee(),e){b=requestAnimationFrame(()=>{b=null,!(g||!l)&&(D(),o?z():N())});return}D();let n=q();o&&(n=U(n),R=n.maximum),N(n)}function he(){p.reset(),w=!1,h=null,L.clear(),W.clear(),j(),b!==null&&cancelAnimationFrame(b),b=null,M!==null&&cancelAnimationFrame(M),M=null,u=null,$=null,O.get(t)===K&&O.delete(t),be(),C(),t.removeEventListener("scroll",me),t.removeEventListener("scrollend",le,!0),t.removeEventListener("wheel",ie),t.removeEventListener("touchstart",ae),t.removeEventListener("touchmove",ue),t.removeEventListener("touchend",ce),t.removeEventListener("keydown",fe),t.removeEventListener("pointerdown",de),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",J)}return pe(!0),{update(e){v=e.onFollowChange,y=e.onScrollStateChange,T=e.threshold??100;const n=e.enabled??!0;if(l!==n&&(n||he(),l=n,l)){o=e.follow,pe(!0);return}l?e.follow&&!o?(_(!0,!1),z()):!e.follow&&o?_(!1,!1):b===null&&ne():o=e.follow},destroy(){g=!0,he()}}}function tt(t){return O.get(t)?.isFollowing()??!1}function ot(t){return O.get(t)?.isNativeScrollAnchoringActive()??!1}function nt(t){return O.get(t)?.hasActiveMutation()??!1}function xe(t,i={}){let l=t;for(;l;){const o=O.get(l);if(o)return o.beforeMutation(t,i);l=l.parentElement}return Ae}function Ie(t){const{scrollTop:i,scrollHeight:l,clientHeight:o}=t;return l-i-o}function Ye(t,i=100){return Ie(t)<=i}function Ue(t,i=!1){t.scrollTo({top:t.scrollHeight,behavior:i?"smooth":"auto"})}function rt(t){const i=O.get(t);if(i){i.followAndScroll();return}Ue(t)}function it(t,i,l=150,o){const v=t();if(!v)return;const y=v.scrollTop,T=performance.now();function w(u){return 1-Math.pow(1-u,3)}function h(u){const m=t();if(!m)return;const x=u-T,d=Math.min(x/l,1),b=typeof i=="function"?i(m):i;m.scrollTop=y+(b-y)*w(d),d<1?requestAnimationFrame(h):o?.(m)}requestAnimationFrame(h)}function lt(t,i="[data-message-id], [data-lazy-turn-key]"){const l=t.scrollTop,o=t.getBoundingClientRect(),v=Ye(t,100);if(v&&O.get(t)?.isFollowing()!==!1)return{element:null,offsetFromViewport:0,scrollTop:l,isNearBottom:v};const y=t.querySelectorAll(i);let T=null,w=0,h;for(const u of y){const m=u.getBoundingClientRect();if(m.top>=o.bottom)break;if(m.top>=o.top){T||(T=u,w=m.top-o.top);const x=u.getAttribute("data-message-id");if(x){h={id:x,offsetFromViewport:m.top-o.top};break}}}return{element:T,offsetFromViewport:w,scrollTop:l,isNearBottom:v,...h?{message:h}:{}}}function ye(t,i){if(i.message){const l=t.querySelector(`[data-message-id="${CSS.escape(i.message.id)}"]`);if(l)return{element:l,offsetFromViewport:i.message.offsetFromViewport}}return i.element?.isConnected?{element:i.element,offsetFromViewport:i.offsetFromViewport}:null}function st(t,i){return ye(t,i)!==null}function at(t,i){const l=ye(t,i);if(l){const{element:o,offsetFromViewport:v}=l,y=t.getBoundingClientRect(),h=o.getBoundingClientRect().top-y.top-v;Math.abs(h)>5&&(t.scrollTop+=h)}}function E(t,i){const l=Number.parseFloat(String(t[i]));return Number.isFinite(l)?l:0}function ut(t,i={},l={}){const o=t,y={maxHoldMs:we[i.tier??"moderate"].settleMs*2+500};let T=xe(o,y);const w=()=>{T?.settle(),T=null},h=()=>{T??=xe(o,y)};if(!$e()||De())return w(),{duration:0};const u=getComputedStyle(o),m=i.axis??"y",x=o.getBoundingClientRect(),d=m==="y"?E(u,"height")||x.height:E(u,"width")||x.width;if(!Number.isFinite(d)||d<=0)return w(),{duration:0};const b=E(u,"opacity")||1,M=i.tier??"moderate",F=we[M],S=l.direction==="out",R=typeof u.getPropertyValue=="function"?S?We(o,{tier:M}):ke(o,{tier:M}):{duration:S?F.exit.duration:F.settleMs,easing:F.exit.easing},g=R.duration??(S?F.exit.duration:F.settleMs),$=i.y??-4,L=E(u,"paddingTop"),W=E(u,"paddingBottom"),P=E(u,"marginTop"),k=E(u,"marginBottom"),A=E(u,"paddingLeft"),G=E(u,"paddingRight"),V=E(u,"marginLeft"),I=E(u,"marginRight");let H=null,C=l.direction==="out"?"outro":l.direction==="in"?"intro":"idle";const Y=(c,D)=>{o.style.overflow="hidden",m==="y"?(o.style.height=`${c*d}px`,o.style.paddingTop=`${c*L}px`,o.style.paddingBottom=`${c*W}px`,o.style.marginTop=`${c*P}px`,o.style.marginBottom=`${c*k}px`):(o.style.width=`${c*d}px`,o.style.paddingLeft=`${c*A}px`,o.style.paddingRight=`${c*G}px`,o.style.marginLeft=`${c*V}px`,o.style.marginRight=`${c*I}px`),o.style.opacity=`${c*b}`,o.style.transform=m==="y"?`translateY(${$*D}px)`:`translateX(${$*D}px)`},j=()=>{o.style.overflow="",o.style.height="",o.style.width="",o.style.paddingTop="",o.style.paddingBottom="",o.style.marginTop="",o.style.marginBottom="",o.style.paddingLeft="",o.style.paddingRight="",o.style.marginLeft="",o.style.marginRight="",o.style.opacity="",o.style.transform=""};return{duration:g,easing:R.easing,tick:(c,D)=>{if(l.direction==="both"&&(H===null?c<1&&(C="outro"):c<H?(h(),C="outro"):c>H&&(h(),C="intro")),H=c,c===1&&C!=="outro"){j(),w(),C="idle";return}Y(c,D),T?.request(),c===0&&C==="outro"&&(w(),C="idle")}}}export{it as a,$e as b,xe as c,st as d,lt as e,et as f,rt as g,nt as h,tt as i,ot as j,Ze as k,Ue as l,at as r,ut as s};
|
|
1
|
+
import"./CJxGDkBm.js";import{p as De}from"./Ca-5qIPO.js";import"./J1LWsTd9.js";import{j as Oe,k as we,c as We,l as ke}from"./BR6IlpMz.js";import{s as qe}from"./CYKcOC1a.js";import{i as _e}from"./l31NdHrN.js";function Ze(t,i={}){const l=(i.axis??"y")==="y"?"height":"width",o=parseFloat(getComputedStyle(t)[l]);if(!Number.isFinite(o))return{duration:0};const v=i.duration??160,y=v<=80?"fast":v<=160?"moderate":"slow";return Oe(t,{axis:i.axis,tier:y},{direction:"in"})}function $e(){return qe.get("enableComponentTransitions")}const Ae={request(){},settle(){}},O=new WeakMap,He=2,ze=2e3,re=2,Pe=1e3,Ve=3e3;function et(t,i){let l=i.enabled??!0,o=i.follow,v=i.onFollowChange,y=i.onScrollStateChange,T=i.threshold??100,w=!1,h=null,u=null,m=null,x=null,d=null,b=null,M=null,F=null,S=0,R=null,g=!1,$=null;const L=new Set,W=new Map,P=new WeakSet,k=new Map,A=document.createElement("div");A.dataset.followBottomAnchor="",A.setAttribute("aria-hidden","true"),A.style.cssText=`height:1px;${i.layoutNeutralBottomAnchor?"margin-top:-1px;":""}overflow-anchor:auto;pointer-events:none;flex:0 0 auto;`;function G(e){e===A||k.has(e)||(k.set(e,e.style.overflowAnchor),e.style.overflowAnchor="none")}function V(e){const n=k.get(e);n!==void 0&&(e.style.overflowAnchor=n,k.delete(e))}function I(e){if(e)for(const r of t.children)r instanceof HTMLElement&&G(r);else for(const r of k.keys())V(r);const n=e?"auto":"none";A.style.overflowAnchor!==n&&(A.style.overflowAnchor=n),e?(A.parentElement!==t||A.nextSibling)&&t.append(A):A.remove()}function H(){I(o)}function C(){A.remove();for(const e of k.keys())V(e)}function Y(e){P.add(e),x?.observe(e)}function j(){d!==null&&cancelAnimationFrame(d),F!==null&&cancelAnimationFrame(F),d=null,F=null,S=0,R=null}function c(){return Math.max(0,t.scrollHeight-t.clientHeight)}function D(){return $??=getComputedStyle(t).overflowAnchor!=="none",$}function q(){const e=c(),n=t.scrollTop,r=h??void 0;h={maximum:e,scrollTop:n};const f={maximum:e,scrollTop:n,previous:r};return p.observe(f),f}function U(e=q()){return e.scrollTop!==e.maximum&&(t.scrollTop=e.maximum),h={maximum:e.maximum,scrollTop:e.maximum},{maximum:e.maximum,scrollTop:e.maximum}}function N(e=q()){const n=Math.max(0,e.maximum-e.scrollTop),r=n<=T;u?.distanceFromBottom===n&&u.isAtBottom===r&&u.isFollowing===o||(u={distanceFromBottom:n,isAtBottom:r,isFollowing:o},y?.({distanceFromBottom:n,isAtBottom:r,isFollowing:o}))}function _(e,n=!0){if(p.cancel(),!l){o=e;return}const r=o!==e;r&&(o=e,I(e)),r&&n&&v?.(e),e||j(),N()}function ee(e,n=!0){if(!L.delete(e))return;const r=(W.get(e.element)??1)-1;r>0?W.set(e.element,r):(W.delete(e.element),P.has(e.element)||x?.unobserve?.(e.element)),S=0,n&&X()}function te(e=!0){if(L.size===0)return;const n=performance.now();for(const r of L)(!t.contains(r.element)||n>=r.expiresAt)&&ee(r,e)}function oe(){if(d=null,g||!l||!o)return;if(te(!1),L.size>0){d=requestAnimationFrame(oe);return}const e=U(),{maximum:n}=e;N(e),n===R?S+=1:(S=0,R=n),S<He&&(d=requestAnimationFrame(oe))}function X(){g||!l||!o||d!==null||(d=requestAnimationFrame(oe))}function z(e=!0){if(g||!l||!o)return;const n=U(),{maximum:r}=n;N(n),S=0,R=r,e&&X()}function ne(){M===null&&(M=requestAnimationFrame(()=>{M=null,!(g||!l)&&N()}))}function Te(){if(F=null,g||!l)return;let e=q();const n=e.scrollTop!==e.maximum;e=U(e),(n||e.maximum!==R||L.size>0)&&(S=0,R=e.maximum,X()),N(e)}function Fe(){if(!(g||!l)){if(o){if(d!==null||F!==null)return;F=requestAnimationFrame(Te);return}ne()}}function Se(){if(!(g||!l)){if(o){z(F===null);return}ne()}}const K={followAndScroll(){_(!0),z()},isFollowing:()=>o,isNativeScrollAnchoringActive:()=>!o&&getComputedStyle(t).overflowAnchor!=="none",hasActiveMutation:()=>o?(te(),L.size>0):!1,beforeMutation(e,n){if(g||!l||!o)return Ae;const r={element:e,expiresAt:performance.now()+(n.maxHoldMs??ze)};L.add(r);const f=W.get(e)??0;return W.set(e,f+1),f===0&&!P.has(e)&&x?.observe(e),S=0,X(),{request(){!L.has(r)||g||(D()?X():z())},settle(){if(!(g||!L.has(r))){if(D()){ee(r);return}ee(r,!1),z()}}}}};function Le(){let e=null,n=null,r=null,f;function Q(s){return!e||s&&e.wheel!==s?!1:!e.wheel?.defaultPrevented&&performance.now()<e.expiresAt}function Me(s,a){if(s.maximum-s.scrollTop<=re)return!0;const B=s.previous;return a&&B!==void 0&&B.maximum<s.maximum&&B.maximum-s.scrollTop<=re}function Z(s,a){return Me(s,a)?(K.followAndScroll(),!0):!1}function ge(s){const a=q();return Q(s)&&Z(a,!0)}function Re(s){f=s,r===null&&(r=requestAnimationFrame(()=>{r=null;const a=f;f=void 0,!(g||!l||!Q(a))&&(ge(a)||N())}))}function Ne(s,a){const B=Math.max(0,a.maximum-a.scrollTop);if(a.maximum!==s.maximum)return s.maximum=a.maximum,s.distance=B,s.movedTowardBottom=!1,!1;const ve=B-s.distance;return s.distance=B,ve>0?(s.movedTowardBottom=!1,_(!1),!0):ve===0?!1:(s.movedTowardBottom=!0,Z(a,!1))}function Ce(s){if(o||!e)return!1;const a=s.previous;return a&&s.scrollTop<a.scrollTop?(e=null,!1):(!a||s.scrollTop>a.scrollTop)&&Q()&&Z(s,!0)}return{isDragging:()=>n!==null,start(s,a){const B=s==="touch"?Ve:Pe;e={wheel:a,expiresAt:performance.now()+B}},grab(s){if(e=null,!s){n=null;return}const a=c();n={maximum:a,distance:Math.max(0,a-t.scrollTop),movedTowardBottom:!1}},move(s){return n?Ne(n,s):Ce(s)},land(s,a){if(s==="frame"){Re(a);return}if(s==="scrollend"){Q()&&ge(),e=null;return}if(!n)return;const{movedTowardBottom:B}=n;n=null,B&&Z(q(),!1)||N()},observe(s){const a=s.previous;e&&a!==void 0&&s.maximum<a.maximum&&s.maximum-s.scrollTop<=re&&(e=null)},cancel(){e=null},requestBottom(){K.followAndScroll()},reset(){e=null,n=null,f=void 0,r!==null&&cancelAnimationFrame(r),r=null}}}const p=Le();function ie(e){e.deltaY<0?_(!1):e.deltaY>0&&(p.start("wheel",e),p.land("frame",e))}function le(e){e.target===t?p.land("scrollend"):p.cancel()}let se=0;function ae(e){p.cancel(),w=!1,se=e.touches[0]?.clientY??0}function ue(e){const n=e.touches[0]?.clientY??0,r=se-n;w=r>0,r<0&&_(!1)}function ce(){w&&p.start("touch"),p.land("frame")}function fe(e){if(p.cancel(),["ArrowUp","PageUp","Home"].includes(e.key))_(!1);else if(["ArrowDown","PageDown","End"].includes(e.key)){if(e.target instanceof Element&&_e(e.target))return;if(e.key==="End"){p.requestBottom();return}p.start("keyboard"),p.land("frame")}}function Be(e){if(e.button!==0||e.target!==t)return!1;const n=Math.max(0,t.offsetWidth-t.clientWidth);if(n===0)return!1;const r=t.getBoundingClientRect(),f=t.offsetWidth>0?n*(r.width/t.offsetWidth):n;return getComputedStyle(t).direction==="rtl"?e.clientX<=r.left+f:e.clientX>=r.right-f}function me(){const e=p.isDragging();if(!e&&o&&d!==null)return;let n=q();p.move(n)||(o&&!e&&(n=U(n)),N(n))}function de(e){p.grab(Be(e))}function J(){p.land("release")}function Ee(){if(!m){m=new MutationObserver(e=>{let n=!1;for(const r of e)if(r.type==="childList"){for(const f of r.removedNodes)n=!0,f instanceof HTMLElement&&V(f);for(const f of r.addedNodes)f instanceof HTMLElement&&f!==A&&x&&(Y(f),o&&f.parentElement===t&&G(f))}n&&te(),I(o),Fe()}),m.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),x=new ResizeObserver(Se),Y(t);for(const e of t.children)e instanceof HTMLElement&&e!==A&&Y(e)}}function be(){m?.disconnect(),m=null,x?.disconnect(),x=null}function pe(e=!1){if(!l||g)return;if(O.set(t,K),t.addEventListener("scroll",me,{passive:!0}),t.addEventListener("scrollend",le,{passive:!0,capture:!0}),t.addEventListener("wheel",ie,{passive:!0}),t.addEventListener("touchstart",ae,{passive:!0}),t.addEventListener("touchmove",ue,{passive:!0}),t.addEventListener("touchend",ce,{passive:!0}),t.addEventListener("keydown",fe),t.addEventListener("pointerdown",de,{passive:!0}),window.addEventListener("pointerup",J,{passive:!0}),window.addEventListener("pointercancel",J,{passive:!0}),H(),Ee(),e){b=requestAnimationFrame(()=>{b=null,!(g||!l)&&(D(),o?z():N())});return}D();let n=q();o&&(n=U(n),R=n.maximum),N(n)}function he(){p.reset(),w=!1,h=null,L.clear(),W.clear(),j(),b!==null&&cancelAnimationFrame(b),b=null,M!==null&&cancelAnimationFrame(M),M=null,u=null,$=null,O.get(t)===K&&O.delete(t),be(),C(),t.removeEventListener("scroll",me),t.removeEventListener("scrollend",le,!0),t.removeEventListener("wheel",ie),t.removeEventListener("touchstart",ae),t.removeEventListener("touchmove",ue),t.removeEventListener("touchend",ce),t.removeEventListener("keydown",fe),t.removeEventListener("pointerdown",de),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",J)}return pe(!0),{update(e){v=e.onFollowChange,y=e.onScrollStateChange,T=e.threshold??100;const n=e.enabled??!0;if(l!==n&&(n||he(),l=n,l)){o=e.follow,pe(!0);return}l?e.follow&&!o?(_(!0,!1),z()):!e.follow&&o?_(!1,!1):b===null&&ne():o=e.follow},destroy(){g=!0,he()}}}function tt(t){return O.get(t)?.isFollowing()??!1}function ot(t){return O.get(t)?.isNativeScrollAnchoringActive()??!1}function nt(t){return O.get(t)?.hasActiveMutation()??!1}function xe(t,i={}){let l=t;for(;l;){const o=O.get(l);if(o)return o.beforeMutation(t,i);l=l.parentElement}return Ae}function Ie(t){const{scrollTop:i,scrollHeight:l,clientHeight:o}=t;return l-i-o}function Ye(t,i=100){return Ie(t)<=i}function Ue(t,i=!1){t.scrollTo({top:t.scrollHeight,behavior:i?"smooth":"auto"})}function rt(t){const i=O.get(t);if(i){i.followAndScroll();return}Ue(t)}function it(t,i,l=150,o){const v=t();if(!v)return;const y=v.scrollTop,T=performance.now();function w(u){return 1-Math.pow(1-u,3)}function h(u){const m=t();if(!m)return;const x=u-T,d=Math.min(x/l,1),b=typeof i=="function"?i(m):i;m.scrollTop=y+(b-y)*w(d),d<1?requestAnimationFrame(h):o?.(m)}requestAnimationFrame(h)}function lt(t,i="[data-message-id], [data-lazy-turn-key]"){const l=t.scrollTop,o=t.getBoundingClientRect(),v=Ye(t,100);if(v&&O.get(t)?.isFollowing()!==!1)return{element:null,offsetFromViewport:0,scrollTop:l,isNearBottom:v};const y=t.querySelectorAll(i);let T=null,w=0,h;for(const u of y){const m=u.getBoundingClientRect();if(m.top>=o.bottom)break;if(m.top>=o.top){T||(T=u,w=m.top-o.top);const x=u.getAttribute("data-message-id");if(x){h={id:x,offsetFromViewport:m.top-o.top};break}}}return{element:T,offsetFromViewport:w,scrollTop:l,isNearBottom:v,...h?{message:h}:{}}}function ye(t,i){if(i.message){const l=t.querySelector(`[data-message-id="${CSS.escape(i.message.id)}"]`);if(l)return{element:l,offsetFromViewport:i.message.offsetFromViewport}}return i.element?.isConnected?{element:i.element,offsetFromViewport:i.offsetFromViewport}:null}function st(t,i){return ye(t,i)!==null}function at(t,i){const l=ye(t,i);if(l){const{element:o,offsetFromViewport:v}=l,y=t.getBoundingClientRect(),h=o.getBoundingClientRect().top-y.top-v;Math.abs(h)>5&&(t.scrollTop+=h)}}function E(t,i){const l=Number.parseFloat(String(t[i]));return Number.isFinite(l)?l:0}function ut(t,i={},l={}){const o=t,y={maxHoldMs:we[i.tier??"moderate"].settleMs*2+500};let T=xe(o,y);const w=()=>{T?.settle(),T=null},h=()=>{T??=xe(o,y)};if(!$e()||De())return w(),{duration:0};const u=getComputedStyle(o),m=i.axis??"y",x=o.getBoundingClientRect(),d=m==="y"?E(u,"height")||x.height:E(u,"width")||x.width;if(!Number.isFinite(d)||d<=0)return w(),{duration:0};const b=E(u,"opacity")||1,M=i.tier??"moderate",F=we[M],S=l.direction==="out",R=typeof u.getPropertyValue=="function"?S?We(o,{tier:M}):ke(o,{tier:M}):{duration:S?F.exit.duration:F.settleMs,easing:F.exit.easing},g=R.duration??(S?F.exit.duration:F.settleMs),$=i.y??-4,L=E(u,"paddingTop"),W=E(u,"paddingBottom"),P=E(u,"marginTop"),k=E(u,"marginBottom"),A=E(u,"paddingLeft"),G=E(u,"paddingRight"),V=E(u,"marginLeft"),I=E(u,"marginRight");let H=null,C=l.direction==="out"?"outro":l.direction==="in"?"intro":"idle";const Y=(c,D)=>{o.style.overflow="hidden",m==="y"?(o.style.height=`${c*d}px`,o.style.paddingTop=`${c*L}px`,o.style.paddingBottom=`${c*W}px`,o.style.marginTop=`${c*P}px`,o.style.marginBottom=`${c*k}px`):(o.style.width=`${c*d}px`,o.style.paddingLeft=`${c*A}px`,o.style.paddingRight=`${c*G}px`,o.style.marginLeft=`${c*V}px`,o.style.marginRight=`${c*I}px`),o.style.opacity=`${c*b}`,o.style.transform=m==="y"?`translateY(${$*D}px)`:`translateX(${$*D}px)`},j=()=>{o.style.overflow="",o.style.height="",o.style.width="",o.style.paddingTop="",o.style.paddingBottom="",o.style.marginTop="",o.style.marginBottom="",o.style.paddingLeft="",o.style.paddingRight="",o.style.marginLeft="",o.style.marginRight="",o.style.opacity="",o.style.transform=""};return{duration:g,easing:R.easing,tick:(c,D)=>{if(l.direction==="both"&&(H===null?c<1&&(C="outro"):c<H?(h(),C="outro"):c>H&&(h(),C="intro")),H=c,c===1&&C!=="outro"){j(),w(),C="idle";return}Y(c,D),T?.request(),c===0&&C==="outro"&&(w(),C="idle")}}}export{it as a,$e as b,xe as c,st as d,lt as e,et as f,rt as g,nt as h,tt as i,ot as j,Ze as k,Ue as l,at as r,ut as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as c}from"./
|
|
1
|
+
import{_ as c}from"./CDNiWmce.js";import{g as m,R as M,C as E,E as _,K as S,a as T,M as P,b as $,P as I,e as R,f as C,T as A,U as z,r as j,h as D,k as O,l as i,i as V,m as w,j as u,J as f,c as k,d as h,S as b,t as p}from"./B5nay5Hl.js";import{l as t}from"./ChTqQfQN.js";const W=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:E,Emitter:_,KeyCode:S,KeyMod:T,MarkerSeverity:P,MarkerTag:$,Position:I,Range:M,Selection:R,SelectionDirection:C,Token:A,Uri:z,css:j,editor:m,html:D,json:O,languages:i,lsp:V,typescript:w},Symbol.toStringTag,{value:"Module"}));let y=!1,g=null,v=!1,r=null;async function B(){if(!(typeof window>"u")&&!v)try{const[o,s,a,d,l]=await Promise.all([c(()=>import("./DvZ3DwdW.js"),[],import.meta.url),c(()=>import("./Cpgzc53H.js"),[],import.meta.url),c(()=>import("./CG-QPs-0.js"),[],import.meta.url),c(()=>import("./BluJBxCM.js"),[],import.meta.url),c(()=>import("./BW7ZDjCt.js"),[],import.meta.url)]);r={editor:o,json:s,css:a,html:d,ts:l},self.MonacoEnvironment={getWorker(n,e){if(!r)return t.error("[Monaco] Workers not loaded yet"),{postMessage:()=>{},terminate:()=>{}};try{return e==="json"?new r.json.default:e==="css"||e==="scss"||e==="less"?new r.css.default:e==="html"||e==="handlebars"||e==="razor"?new r.html.default:e==="typescript"||e==="javascript"?new r.ts.default:new r.editor.default}catch(x){return t.error("[Monaco] Failed to create worker for",e,x),{postMessage:()=>{},terminate:()=>{}}}},globalAPI:!1},v=!0,t.info("[Monaco] Workers configured successfully (lazy loaded)")}catch(o){throw t.error("[Monaco] Failed to configure Monaco workers",{error:o}),o}}async function J(){return y?Promise.resolve():g||(g=new Promise((o,s)=>{let a=0;const d=100,l=()=>{a++;try{if(W&&m&&i&&m.createModel&&typeof m.createModel=="function")m.createModel("test","plaintext").dispose(),y=!0,t.info("[Monaco] Monaco Editor initialized successfully"),o();else if(a>=d){const n=new Error("[Monaco] Monaco Editor failed to initialize after 5 seconds");t.error(n.message),s(n)}else setTimeout(l,50)}catch(n){a>=d?(t.error("[Monaco] Monaco Editor initialization error:",n),s(n)):setTimeout(l,50)}};l()}),g)}async function U(){try{if(await J(),!w){t.warn("[Monaco] TypeScript language service not available yet");return}u&&(u.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),u.setCompilerOptions({target:b.ES2020,allowNonTsExtensions:!0,moduleResolution:h.NodeJs,module:k.CommonJS,noEmit:!0,esModuleInterop:!0,jsx:f.React,reactNamespace:"React",allowJs:!0,typeRoots:["node_modules/@types"]}),u.setEagerModelSync(!0)),p&&(p.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),p.setCompilerOptions({target:b.ES2020,allowNonTsExtensions:!0,moduleResolution:h.NodeJs,module:k.CommonJS,noEmit:!0,esModuleInterop:!0,jsx:f.React,reactNamespace:"React",allowJs:!0,typeRoots:["node_modules/@types"]}),p.setEagerModelSync(!0)),L()}catch(o){t.warn("[Monaco] Error configuring Monaco languages:",o)}}function L(){i.getLanguages().some(s=>s.id==="svelte")||(i.register({id:"svelte",extensions:[".svelte"],aliases:["Svelte","svelte"],mimetypes:["text/x-svelte"]}),i.setLanguageConfiguration("svelte",{comments:{lineComment:"//",blockComment:["<!--","-->"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"<!--",close:"-->",notIn:["comment","string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*<!--\s*#region\b.*-->/,end:/^\s*<!--\s*#endregion\b.*-->/}},wordPattern:/(-?\d*\.\d\w*)|([^`~!@#%^&*()\-=+[{\]}\\|;:'",.<>/?\s]+)/g,indentationRules:{increaseIndentPattern:/<(?!(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)\b)[a-zA-Z][^/>]*>|{[^}]*$/,decreaseIndentPattern:/^\s*(<\/|}<)/}}),i.setMonarchTokensProvider("svelte",{defaultToken:"",tokenPostfix:".svelte",svelteKeywords:["#if","/if",":else",":else if","#each","/each","#await","/await",":then",":catch","#key","/key","#snippet","/snippet","@render","@html","@debug","@const"],keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","interface","let","new","null","return","set","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of","as","type"],runes:["$state","$derived","$effect","$props","$bindable","$inspect","$host"],tagNames:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@","..."],symbols:/[=><!~?:&|+\-*\/^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/(<)(script)(\s+)(lang)(=)("ts"|'ts')/,["delimiter.html","tag.html","","attribute.name.html","delimiter.html","attribute.value.html"]],[/<script/,{token:"tag.html",next:"@script"}],[/<style/,{token:"tag.html",next:"@style"}],[/{#/,{token:"keyword.svelte",next:"@svelteBlock"}],[/{:/,{token:"keyword.svelte",next:"@svelteBlock"}],[/{\//,{token:"keyword.svelte",next:"@svelteBlock"}],[/{@/,{token:"keyword.svelte",next:"@svelteExpression"}],[/{/,{token:"delimiter.bracket",next:"@svelteExpression"}],[/<!--/,{token:"comment.html",next:"@htmlComment"}],[/(<)(\w+)/,["delimiter.html",{token:"tag.html",next:"@tag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@tag"}]],[/[^<{]+/,"text.html"]],script:[[/<\/script>/,{token:"tag.html",next:"@pop"}],{include:"@typescript"}],style:[[/<\/style>/,{token:"tag.html",next:"@pop"}],[/./,"source.css"]],tag:[[/\s+/,""],[/(\w+)(=)/,["attribute.name.html",{token:"delimiter.html",next:"@attributeValue"}]],[/\w+/,"attribute.name.html"],[/on:\w+/,"attribute.name.event.svelte"],[/bind:\w+/,"attribute.name.binding.svelte"],[/class:\w+/,"attribute.name.class.svelte"],[/use:\w+/,"attribute.name.action.svelte"],[/transition:\w+/,"attribute.name.transition.svelte"],[/in:\w+/,"attribute.name.transition.svelte"],[/out:\w+/,"attribute.name.transition.svelte"],[/animate:\w+/,"attribute.name.animation.svelte"],[/\/>/,{token:"delimiter.html",next:"@pop"}],[/>/,{token:"delimiter.html",next:"@pop"}]],attributeValue:[[/"[^"]*"/,{token:"attribute.value.html",next:"@pop"}],[/'[^']*'/,{token:"attribute.value.html",next:"@pop"}],[/{/,{token:"delimiter.bracket",next:"@svelteExpressionInAttr"}],[/\w+/,{token:"attribute.value.html",next:"@pop"}]],svelteBlock:[[/}/,{token:"keyword.svelte",next:"@pop"}],[/\b(if|else|each|await|then|catch|key|snippet|as)\b/,"keyword.control.svelte"],{include:"@typescript"}],svelteExpression:[[/}/,{token:"delimiter.bracket",next:"@pop"}],[/@(html|debug|const|render)/,"keyword.svelte"],{include:"@typescript"}],svelteExpressionInAttr:[[/}/,{token:"delimiter.bracket",next:"@pop"}],{include:"@typescript"}],htmlComment:[[/-->/,{token:"comment.html",next:"@pop"}],[/./,"comment.html"]],typescript:[[/\$(?:state|derived|effect|props|bindable|inspect|host)\b/,"variable.language.svelte"],[/\/\/.*$/,"comment"],[/\/\*/,{token:"comment",next:"@tsComment"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@tsDoubleString"],[/'/,"string","@tsSingleString"],[/`/,"string","@tsTemplateString"],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/\b(break|case|catch|class|continue|const|constructor|debugger|default|delete|do|else|export|extends|false|finally|for|from|function|get|if|import|in|instanceof|interface|let|new|null|return|set|static|super|switch|this|throw|true|try|typeof|undefined|var|void|while|with|yield|async|await|of|as|type)\b/,"keyword"],[/[a-zA-Z_$][\w$]*/,"identifier"],[/@symbols/,"operator"],[/[{}()[\]]/,"delimiter.bracket"],[/[;,.]/,"delimiter"]],tsComment:[[/\*\//,{token:"comment",next:"@pop"}],[/./,"comment"]],tsDoubleString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],tsSingleString:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],tsTemplateString:[[/\$\{/,{token:"delimiter.bracket",next:"@tsTemplateStringExpression"}],[/[^`$]+/,"string"],[/`/,"string","@pop"]],tsTemplateStringExpression:[[/}/,{token:"delimiter.bracket",next:"@pop"}],{include:"@typescript"}]}}),t.info("[Monaco] Svelte language registered"))}export{B as configureMonacoWorkers,J as ensureMonacoInitialized,U as initializeMonaco,W as monaco};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
var Et=Object.defineProperty;var Dt=(e,t,n)=>t in e?Et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pe=(e,t,n)=>Dt(e,typeof t!="symbol"?t+"":t,n);import{I_ as A,i as be,nL as R,wa as Rt,C2 as Ge,wc as xt,Df as Je,cE as Pt,cF as Bt,nM as Ye,ny as Ot,e as ke,fM as $t,l_ as Lt,cM as Ut}from"./ByW7bxEK.js";import{J as Nt,Z as Ht,dS as Be,cR as pe,dD as Ft,aw as Kt,bc as Qe,I as Wt,e3 as jt}from"./D8JHIZfM.js";import{e as qt,b as ae,F as Vt,y as re,_ as ve,G as zt,C as Gt,W as Xe,v as Jt,u as Yt,M as Qt}from"./C8i00JgJ.js";import{D as Oe,a as Xt,d as Zt}from"./CQcEqK4G.js";import{l as en,o as tn,g as Ze,r as nn,m as an,D as rn}from"./BK_ocHH_.js";import{e as sn}from"./CMYgSHYB.js";import{z as et,N as on}from"./C1C8P18t.js";import{f as cn}from"./BVZHN8O1.js";import{bm as b,_ as fe}from"./BfX15qhw.js";import{aa as tt,aB as se,J as he,a as nt,n as at,cS as rt,e as st,aI as it,M as ln,ac as dn,aV as $e,d as le,C as un,cT as mn,U as pn,a6 as fn,aJ as hn,b_ as gn}from"./DcS7tCp_.js";import{W as yn,L as wn,w as bn,R as kn,M as vn,h as _n}from"./Dg1sjsED.js";import{l as q,i as Sn,n as Mn}from"./Dkq3_GD2.js";import{x as An,J as In,ai as Tn,ar as Cn}from"./CBRPyq3u.js";import{a as Le,b as En,g as Dn}from"./DypB-Dwi.js";import{m as Rn}from"./ButwRe61.js";import{C as xn}from"./B5aYN90J.js";import{i as Pn}from"./BxEYTNET.js";import{o as $,e as Bn,l as V,s as C,n as ce,b as On,d as $n,c as Ln}from"./CIyUrgF0.js";const Dr=A.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),Rr=A.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),xr=A.createSelector(e=>{const t=[];for(const s of Object.values(e.panelLayout.byWorkspaceId))for(const i of Object.values(s.panels))for(const o of i.tabs)o.type==="agent"&&o.agentId&&t.push(o.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),a=new Set(e.agentSessions.agentIdsByWorkspace[be]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(s=>a.has(s)),dividerSessionAgentIds:n,openAgentTabIds:t}});function Pr(e,t){if(e)return e.model}function Un({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function Br({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a=0}){return!(e?Nt(e):!1)&&!Un({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a})}function Or(e){return Ht(e.messageMetadata)}function Nn(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function $r(e){return Nn({...e,createdAt:Date.parse(e.queuedAt)})}const Hn=8*1024*1024,Fn=3*1024*1024;function Kn(e){return Math.ceil(Math.max(0,e)/3)*4}function Wn(e){const t=e.promptBase64Bytes;return e.mimeType==="image/jpeg"&&Number.isSafeInteger(e.size)&&e.size>0&&e.size<=Fn&&typeof t=="number"&&t===Kn(e.size)?t:null}async function ot(e,t,n,a,r=()=>{}){const s=()=>{if(!a())throw new Error("media-send-retired")};if(s(),r("overlay-render"),!n.exportMedia)throw new Error("media-export-unavailable");const i=en(e.source,e.saved);if(i.length>1e4)throw new Error("media-animation-layer-limit");const o=[];for(const c of i)s(),o.push({...c,png:await tn(e.source,e.saved,c.atMs)});s(),r("export");const l=await n.exportMedia({outputVersion:qt,jobId:t,media:e,layers:o});if(s(),!l.ok)throw new Error(["media-export-failed",l.error].filter(Boolean).join(":"));return{jobId:t,value:l.value}}const _e={CLIPBOARD_WRITE:"dock-media:clipboard-write",CLIPBOARD_READ:"dock-media:clipboard-read",MENU:"dock-media:menu"};function Ue(e,t){return Math.max(0,(e.pausedAt??t)-e.startedAt-(e.pausedMs??0))}function ge(e,t){if(!t?.startsWith(".intent/attachments/"))return;const n=t.split("/").map(encodeURIComponent).join("/"),a=tt(`intent://local/file/${n}`,e);return a?.kind==="video"?a.url:void 0}function jn(e){const t=e.video==="full"?b.dock_captureEditor_videoFull_label():b.dock_captureEditor_videoHighlights_label(),n=e.voice==="audio"?b.dock_captureEditor_voiceAudio_label():e.voice==="transcript"?b.dock_captureEditor_voiceTranscript_label():b.dock_captureEditor_voiceOff_summary();return`${t} · ${n}`}function qn(e,t,n,a){if(a?.error==="permission")return a.kind==="pick"?"accessibility":"screen";if(e==="permission"||t==="permission")return"screen";if(n?.startsWith("microphone-permission"))return"microphone";if(n?.startsWith("speech-permission"))return"speech"}const j=cn;function Lr(e){const{view:t,items:n,local:a,labels:r,copy:s}=e,i=t.speech.error??t.speech.capability?.reason??null,o=qn(t.captureError,t.clips.find(g=>g.status==="failed"&&g.error==="permission")?.error??null,i,t.annotationIssue),l=t.annotationIssue?.error==="unavailable"?s?.annotationUnavailable:void 0,c=t.annotationIssue,d=t.captureError==="permission",u=c?.error==="permission"&&c.kind!=="pick",h=c?.error==="permission"&&c.kind==="pick",p=i?.startsWith("speech-permission")?"speech":i?.startsWith("microphone-permission")||i==="permission"?"microphone":void 0,m={},y={},f=(g,D,U)=>{m[g]=D,U&&(y[g]=U)};s&&(d&&(f("capture",s.permission,"screen"),t.recording||f("record",s.permission,"screen")),u&&!t.annotating&&f("annotate",s.permission,"screen"),h&&(f("pick",s.accessibilityPermission,"accessibility"),t.tool==="pick"&&!t.annotating&&f("annotate",s.accessibilityPermission,"accessibility")),p&&!t.dictation&&f("mic",(i&&r.speechError?.(i))??s.speechPermission,p));const k=g=>{const D=y[g];D&&e.actions.onOpenSettings(D)},v=new Set(t.evidenceOwnedItemIds),I=t.clips.find(g=>g.status==="recording"),S=t.clips.length>=ae.clips,_=t.capabilities,B=t.speech.available,E=new Set(t.clips.filter(g=>g.status==="recording"||g.status==="placing"||!!g.media).flatMap(g=>g.captureHistory?.map(D=>D.image.id)??[])),P=[...t.tiles.filter(({image:g,marks:D})=>!!g.media||g.source!=="annotate"||!E.has(g.id)||D.some(({mark:U})=>!U.clipId)).map(({image:g,marks:D})=>({kind:"image",id:g.contextItemId,url:a.previews[g.id]??"",markCount:D.length,owner:"evidence",...a.previews[g.id]?{}:{status:"placing"}})),...t.clips.filter(g=>!g.discarding).map(g=>({kind:"clip",id:g.contextItemId??g.id,duration:j(g.status==="recording"?Ue(g,a.now):g.durationMs),recording:g.status==="recording",...g.media?.saved?{summary:jn(g.media.saved)}:{},...g.status==="ready"&&ge(e.workspaceId,g.path)?{url:ge(e.workspaceId,g.path)}:{},owner:"evidence",...g.status==="placing"?{status:"placing"}:{},...g.status==="failed"?{status:"failed",...g.error==="limit"?{error:b.dock_composer_clipTooLarge_error()}:{}}:{}})),...n.filter(g=>!v.has(g.id)).map(g=>({...g.imageData&&g.imageMimeType?{kind:"image",id:g.id,url:`data:${g.imageMimeType};base64,${g.imageData}`,markCount:0,file:{name:g.label,imageData:g.imageData,imageMimeType:g.imageMimeType}}:{kind:"file",id:g.id,name:g.label},owner:"attachment",...g.placementStatus==="placing"?{status:"placing"}:{},...g.placementStatus==="failed"?{status:"failed",error:g.placementError}:{}}))];return{mediaStatus:t.recording?{kind:"recording",label:r.recording}:t.annotating?{kind:"annotating",label:r.annotating}:void 0,...o?{settingsPane:o}:{},...l?{annotationNotice:l}:{},labels:r,attachments:P,...s?{placeholder:t.dictation?"":s.idle}:{},state:{captureRevision:t.captureAccepted,capturePending:t.capturePending,captureDisabled:!_.capture||t.captureDisabled,...t.captureDisabled?{captureTooltip:r.captureLimit}:{},captureMode:t.evidence?.annotation?"fullscreen":t.captureMode,captureModesAvailable:!!_.captureModes&&!t.evidence?.annotation,annotationActive:t.annotating,tool:t.tool,toolUsed:t.toolUsed,annotationDisabled:!_.annotate,recording:t.recording&&!I?.discarding,recordingDisabled:!!I?.discarding||!t.recording&&(!_.record||S),...S&&!t.recording?{recordingTooltip:r.clipLimit}:{},recordingTime:j(I?Ue(I,a.now):0),dictating:!!t.dictation,dictationPending:t.speech.pending||t.dictation?.status==="transcribing",dictationDisabled:!B&&!t.dictation&&!m.mic,...t.speech.error&&r.speechError?{dictationTooltip:r.speechError(t.speech.error)}:{},dictationTime:t.dictation?j(a.now-t.dictation.startedAt):j(0),inputLevels:t.speech.levels,...Object.keys(m).length?{alerts:m}:{}},...e.actions,...t.fileAttachmentsEnabled===!1?{onEdit:void 0}:{},onAlert:k,beforeSubmit:e.beforeSubmit}}const Se=()=>globalThis.electronAPI,Vn=["image/png","image/jpeg","image/webp"],Ne=e=>Vn.includes(e??"")?e:null;function He(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a+=1)n[a]=t.charCodeAt(a);return n}async function Ur(e,t){const{view:n,items:a,previews:r}=t,s=n.tiles.find(({image:c})=>c.id===e||c.contextItemId===e);if(s){const c=a.find(p=>p.id===s.image.contextItemId),d=s.image.media;if(s.image.mediaError)return null;if(d?.saved){if(!t.createSavedPreviewUrl||!t.revokeUrl)return null;const p={...d,saved:d.saved},m=await t.createSavedPreviewUrl(t.workspaceId,p);try{const y=await t.fetchBytes(m),f=p.saved.crop;return{kind:"image",name:c?.label||"screenshot.png",mimeType:"image/png",bytes:y,intent:{pixels:{mimeType:"image/png",width:Math.max(1,Math.round(f?.w??p.source.width)),height:Math.max(1,Math.round(f?.h??p.source.height)),displayScale:s.image.displayScale,capturedAt:s.image.capturedAt},raw:y,marks:[]}}}finally{t.revokeUrl(m)}}const u=Ne(c?.imageMimeType),h=r[s.image.id];return!c?.imageData||!u||!h?null:{kind:"image",name:c.label||"screenshot.png",mimeType:"image/png",bytes:await t.fetchBytes(h),intent:{pixels:{mimeType:u,width:s.image.width,height:s.image.height,displayScale:s.image.displayScale,capturedAt:s.image.capturedAt,...s.image.hash?{hash:s.image.hash}:{}},raw:He(c.imageData),marks:s.marks.map(({mark:p})=>({tool:p.tool,geometry:p.geometry,bounds:p.bounds,element:p.element}))}}}const i=n.clips.find(c=>c.id===e||c.contextItemId===e);if(i){const c=i.status==="ready"?ge(t.workspaceId,i.path):null;if(!c)return null;const d=a.find(h=>h.id===i.contextItemId),u=await t.fetchBytes(c);if(!Gn(u))throw new Error("Not a recording file");return{kind:"clip",name:d?.label||`recording-${i.id.slice(0,8)}.mp4`,mimeType:d?.attachmentMimeType||"video/mp4",bytes:u,durationMs:i.durationMs,hasMicAudio:i.hasMicAudio}}const o=a.find(c=>c.id===e),l=Ne(o?.imageMimeType);return o?.imageData&&l?{kind:"image",name:o.label||"image",mimeType:l,bytes:He(o.imageData)}:null}async function zn(e){const t=await fetch(e);if(!t.ok)throw new Error(`Media request failed (${t.status})`);const n=new Uint8Array(await t.arrayBuffer()),a=Number(t.headers.get("content-length")??Number.NaN);if(n.byteLength===0||Number.isFinite(a)&&a!==n.byteLength)throw new Error("Media response was incomplete");return n}function Gn(e){return e.byteLength>8&&String.fromCharCode(...e.subarray(4,8))==="ftyp"}async function Nr(e){try{return(await Se()?.invoke(_e.CLIPBOARD_WRITE,e))?.ok===!0}catch{return!1}}async function Jn(){try{return await Se()?.invoke(_e.CLIPBOARD_READ,{})??null}catch{return null}}async function Hr(e){try{const t=await Se()?.invoke(_e.MENU,{canCut:e});return t?.action==="copy"||t?.action==="cut"?t.action:null}catch{return null}}const Fe=new WeakSet;async function Yn(e,t){const[n]=e;if(e.length!==1||!n||n.size!==t.size)return!1;try{const a=await crypto.subtle.digest("SHA-256",await n.arrayBuffer());return Array.from(new Uint8Array(a),s=>s.toString(16).padStart(2,"0")).join("")===t.sha256}catch{return!1}}function Fr(e,{onIntentMedia:t,isCurrent:n,read:a=Jn}){const r=e.clipboardData;if(Fe.has(e)||!r||r.files.length===0)return!1;const s=e.target,i=Array.from(r.files),o=r.types.filter(l=>l!=="Files").map(l=>[l,r.getData(l)]);return e.preventDefault(),e.stopImmediatePropagation(),a().catch(()=>null).then(async l=>{if(!n())return;if(l&&await Yn(i,l)){n()&&t(l);return}if(!n()||!(s instanceof Node)||!s.isConnected)return;const c=new DataTransfer;for(const u of i)c.items.add(u);for(const[u,h]of o)c.setData(u,h);const d=new ClipboardEvent("paste",{clipboardData:c,bubbles:!0,cancelable:!0});Fe.add(d),s.dispatchEvent(d)}),!0}function Qn(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}function Xn(e){let t="";for(let a=0;a<e.length;a+=32768)t+=String.fromCharCode(...e.subarray(a,a+32768));return btoa(t)}function ct(e){let t=0;return e.endsWith("==")?t=2:e.endsWith("=")&&(t=1),Math.floor(e.length*3/4)-t}async function Zn(e){const t=await crypto.subtle.digest("SHA-256",e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}const lt={placeAttachment:it,beginAttachmentUpload:st,sendAttachmentUploadChunk:rt,commitAttachmentUpload:at,abortAttachmentUpload:nt,getAttachmentInfo:he,mintIdempotencyKey:se};async function Me(e,t,n,a=lt){const{idempotencyKey:r}=n,s={...r!==void 0?{idempotencyKey:r}:{},...n.rawScreenshot!==void 0?{rawScreenshot:n.rawScreenshot}:{}},i=async m=>mn(m,r)?$e(e,r,a.getAttachmentInfo):void 0;if(ct(n.data)<=ln)try{return await a.placeAttachment(e,t,{data:n.data,mimeType:n.mimeType,...s})}catch(m){const y=await i(m);if(y)return y;throw m}const o=Qn(n.data),l=await Zn(o);let c,d;try{({uploadId:c,maxChunkBytes:d}=await a.beginAttachmentUpload(e,t,o.byteLength,l,{mimeType:n.mimeType,...s}))}catch(m){if(r!==void 0&&dn(m)){const y=await $e(e,r,a.getAttachmentInfo);if(y)return y}throw m}const u=Math.min(pn,d),h=Math.ceil(o.byteLength/u);let p=!1;try{for(let m=0;m<h;m++){const y=o.subarray(m*u,(m+1)*u);await a.sendAttachmentUploadChunk(c,m,Xn(y),e)}return p=!0,await a.commitAttachmentUpload(c,e)}catch(m){const y=p?await i(m):void 0;if(y)return y;throw await a.abortAttachmentUpload(c,e).catch(()=>{}),m}}function ea(e,t){return fn(e,`image-${Date.now()}-${t+1}`)}class Ae extends Error{constructor(n,a){super(n);Pe(this,"retryBlocks");this.name="ImagePlacementError",this.retryBlocks=a}}function ta(e,t){return e instanceof Ae?e.retryBlocks:t}async function na(e,t,n=lt,a=()=>!0){const r=l=>(...c)=>(le(a),l(...c));n={placeAttachment:r(n.placeAttachment),beginAttachmentUpload:r(n.beginAttachmentUpload),sendAttachmentUploadChunk:r(n.sendAttachmentUploadChunk),commitAttachmentUpload:r(n.commitAttachmentUpload),abortAttachmentUpload:r(n.abortAttachmentUpload),getAttachmentInfo:r(n.getAttachmentInfo),mintIdempotencyKey:r(n.mintIdempotencyKey)};const s=[],i=[],o=[];for(let l=0;l<t.length;l++){le(a);const c=t[l];if("attachmentId"in c&&c.attachmentId){const p={type:"image",attachmentId:c.attachmentId,...c.mimeType?{mimeType:c.mimeType}:{}};s.push(p),i.push(p);continue}const d=c,u=d.placementFileName??ea(d.mimeType,l),h=n.mintIdempotencyKey(d.placementIdempotencyKey);try{const p=await Me(e,u,{data:d.data,mimeType:d.mimeType,...h!==void 0?{idempotencyKey:h}:{}},n),m={type:"image",attachmentId:p.attachmentId,...p.mimeType??d.mimeType?{mimeType:p.mimeType??d.mimeType}:{}};s.push(m),i.push(m)}catch(p){const m=un(p);o.push(m?`${u} (${m})`:u),i.push(h!==void 0?{...d,placementIdempotencyKey:h,placementFileName:u}:d)}}if(o.length>0)throw new Ae(b.chat_imagePlacement_failed_error({names:o.join(", ")}),i);return le(a),s}const Kr=Object.freeze(Object.defineProperty({__proto__:null,ImagePlacementError:Ae,base64DecodedBytes:ct,imageRetryBlocks:ta,placeImageAttachment:Me,toImageReferenceBlocks:na},Symbol.toStringTag,{value:"Module"}));function dt(){try{return yn()}catch{return null}}function aa(){return{backendId:A.state.connections.windowBackendId??null,generation:A.state.daemonHealth.connectionGeneration,transport:dt()}}class Ie extends Error{constructor(){super("dock-evidence-backend-changed")}}function N(e,t){return async(...n)=>{e();const a=await t(...n);return e(),a}}const H={current:e=>dt()===e.transport&&A.state.daemonHealth.connectionGeneration===e.generation&&(A.state.connections.windowBackendId??null)===e.backendId,capabilities:()=>wn(),placeImage:(e,t,n,a)=>Me(e,t,n,{placeAttachment:N(a,it),beginAttachmentUpload:N(a,st),sendAttachmentUploadChunk:N(a,rt),commitAttachmentUpload:N(a,at),abortAttachmentUpload:N(a,nt),getAttachmentInfo:N(a,he),mintIdempotencyKey:se}),lookup:(e,t)=>he({workspaceId:e,idempotencyKey:t}),mintKey:se};function G(e){return H.current(e)}function ra(e,t){const n=A.state.dockConversation;return{generation:n.generation,authority:n.authority,clearRevision:R(n.drafts,Vt(e,t))?.clearRevision??0,binding:aa()}}function Wr(e,t,n){const a=ra(e,t);return a.generation===n.generation&&a.authority===n.authority&&a.clearRevision===n.clearRevision&&G(n.binding)}function ut(e,t){return()=>{if(!e.current(t))throw new Ie}}const mt=Object.freeze({rawRetention:!1,chiefAttachments:!1});function jr(e){return e!==mt}const de=new Map;function pt(e,t=H){const n=`${e.backendId}:${e.generation}`;let a=de.get(n);if(!a){const r=ut(t,e);a=(async()=>{r();const i=await t.capabilities();r();const o=i?.server?.capabilities;if(!o||typeof o!="object")throw new Error("unobserved");return{rawRetention:o.rawScreenshotRetention===1,chiefAttachments:o.chiefAttachments===1}})().catch(()=>(de.delete(n),mt)),de.set(n,a)}return a}class Z extends Error{constructor(t){super(`dock-raw-retention-contract:${t}`),this.reason=t}}function ft(e){const{rpcCode:t,code:n}=e??{};return t===-32602||n==="INVALID_PARAMS"}function sa(e){const t=String(e?.message??"");return ft(e)&&(t.includes("rawScreenshotExpired:")||/expired at .*not renewable/i.test(t))}function ia(e,t,n){const a=e.rawScreenshot;if(!a||a.compositeAttachmentId!==t)return null;const r=Date.parse(a.expiresAt);return Number.isFinite(r)?a.expired||r<=n?"expired":{attachmentId:e.attachmentId,expiresAt:a.expiresAt}:null}function Ke(e){return{ok:!0,path:e.path,fileName:e.fileName,size:e.size,attachmentId:e.attachmentId,...e.mimeType?{mimeType:e.mimeType}:{},uploadedAt:e.uploadedAt,replayed:!0,...e.rawScreenshot?{rawScreenshot:e.rawScreenshot}:{}}}class oa extends Error{constructor(t,n){super("dock-evidence-placement-failed"),this.imageId=t,this.failure=n}}const We=e=>e.split("/")[1]?.replace("jpeg","jpg")||"png";async function ca(e){const t=e.api??H,n=e.now??Date.now,a=ut(t,e.binding);a();const r=await pt(e.binding,t);a();const s=r.rawRetention&&(e.workspaceId!==be||r.chiefAttachments),i=[];for(const o of e.images){const l=e.records[o.image.id];let c=l&&l.signature===o.signature&&l.workspaceId===e.workspaceId&&l.backendId===e.binding.backendId?l:{imageId:o.image.id,signature:o.signature,workspaceId:e.workspaceId,backendId:e.binding.backendId,compositeKey:null,rawKey:null,composite:null,raw:null,rawSettled:!1};const d=u=>{c=u,e.onRecord(u)};try{if(!c.composite){const h=c.compositeKey,p=t.mintKey(h??void 0)??null;p!==c.compositeKey&&d({...c,compositeKey:p});let m;h&&p===h&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a()),m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${o.image.id.slice(0,8)}.${We(o.composite.mimeType)}`,{data:o.composite.base64,mimeType:o.composite.mimeType,...p?{idempotencyKey:p}:{}},a),a()),d({...c,composite:{attachmentId:m.attachmentId,mimeType:m.mimeType??o.composite.mimeType}})}const u=c.composite.attachmentId;if(s&&o.raw&&!c.raw&&!c.rawSettled){const h=c.rawKey,p=t.mintKey(h??void 0);if(p){p!==c.rawKey&&d({...c,rawKey:p});let m;h&&p===h&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a());try{m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${o.image.id.slice(0,8)}-original.${We(o.raw.mimeType)}`,{data:o.raw.base64,mimeType:o.raw.mimeType,idempotencyKey:p,rawScreenshot:{compositeAttachmentId:u}},a),a());const y=ia(m,u,n());if(y==="expired")d({...c,rawSettled:!0});else if(y)d({...c,raw:y});else throw new Z("echo")}catch(y){if(sa(y))d({...c,rawSettled:!0});else throw y instanceof Z?y:ft(y)?new Z("refused"):y}}else throw new Z("unkeyed")}}catch(u){throw u instanceof Ie?u:new oa(o.image.id,u)}i.push(c)}return i}async function qr(e,t,n,a){const r=()=>{if(!H.current(a))throw new Ie};r();const s=await H.placeImage(e,t,{...n,idempotencyKey:H.mintKey()},r);return r(),s}const la=new Set(["invalid-saved-edit","media-send-retired","transcript-unavailable","transcript-pending","invalid-edit","stale-source","legacy-baked-marks","timing-unavailable","audio-unavailable","media-source-unavailable","media-export-unavailable","media-animation-layer-limit","media-export-failed","legacy-original-unavailable","capture-render-unavailable","capture-blur-unavailable","stale-source-pixels","not-a-screenshot","not-admitted","unavailable","dock-evidence-missing-pixels","draft-restore-failed","image-budget-exceeded"]),da=new Set(["unavailable","permission","failed","busy","cancelled","limit"]);class O extends Error{constructor(t,n){super(n),this.stage=t,this.code=n,this.name="DockSendError"}}function ie(e){const t=e instanceof Error?e.message:typeof e=="string"?e:"";if(t.length>64)return"unclassified";const[n,...a]=t.split(":");return!la.has(n)||a.length>2?"unclassified":n!=="media-export-failed"?a.length?"unclassified":n:[n,...a.map(r=>da.has(r)?r:"other")].join(":")}function Vr(e,t){return e instanceof O?{stage:e.stage,code:ie(e.code)}:{stage:t,code:ie(e)}}function F(e){if(!e||e.source.kind!=="recording")return!1;const t=e.source,n=e.saved??re(t,t.capturedMarks??[],e.transcript);if(n.video!=="full"||n.voice!=="audio"||n.crop||n.blurRegions.length||n.blurStrokes?.length)return!1;const a=ve(n,t,e.transcript);return t.visuals==="clean"?!a.errors.length&&!a.muted&&n.cuts.length===0&&!n.marks.some(r=>r.included)&&a.marks.length===0&&a.transcript===null&&a.kept.length===1&&a.kept[0].startMs===0&&a.kept[0].endMs===t.durationMs&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs===t.durationMs:!a.errors.length&&!a.muted&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs>=t.durationMs}async function ua(e,t,n,a,r,s){const i={images:{},files:[],frames:[],framePromptBytes:[],metadata:[]};let o="validate";try{const l=()=>{if(!r()||!G(n))throw new Error("media-send-retired")};for(const c of[...t.images,...t.clips]){if(o="validate",s?.stage(o),c.mediaError)throw new Error("invalid-saved-edit");if(!c.media||F(c.media))continue;l();const d=structuredClone(c.media),u=d.source;let h=d.saved??re(u,u.capturedMarks??[],d.transcript),p=crypto.randomUUID();try{if(u.kind==="recording"&&h.voice==="transcript"&&d.transcript?.status!=="ready"){if(o="transcribe",s?.stage(o),!a?.transcribeMedia)throw new Error("transcript-unavailable");const f=await a.transcribeMedia({jobId:p,media:d});if(l(),!f.ok)throw new Error("transcript-unavailable");d.transcript=f.value,d.saved||(h=re(u,u.capturedMarks??[],d.transcript))}o="plan",s?.stage(o);const m=ve(h,u,d.transcript);if(m.errors.length)throw new Error(m.errors[0]);const y={id:c.id,kind:u.kind,video:h.video,voice:h.voice,transcript:m.transcript,batches:u.batches,marks:m.marks.map(({n:f,mark:k,frameAtMs:v})=>({n:f,id:k.id,at_ms:v,kind:k.kind,label:k.label,note:k.note,context:k.context,geometry:k.geometry}))};if(u.kind==="screenshot"){o="screenshot-source",s?.stage(o);const f=u.path.split("/").map(encodeURIComponent).join("/"),k=tt(`intent://local/file/${f}`,e);if(!k||k.kind!=="image")throw new Error("media-source-unavailable");const v=await zn(k.url);l();const I={base64:Ze(v.buffer.slice(v.byteOffset,v.byteOffset+v.byteLength)),mimeType:/\.jpe?g$/i.test(u.path)?"image/jpeg":/\.webp$/i.test(u.path)?"image/webp":"image/png"};o="screenshot-render",s?.stage(o),i.images[c.id]=await nn(u,h,I),l()}else{if(!m.clips.length){y.video_attachment_id=null,y.frames=[],y.kept_ms=[],i.metadata.push(y);continue}const f={...d,saved:h};let k=await a?.takePreparedRecording?.(f);if(k&&(p=k.jobId),l(),!k){if(!a)throw new Error("media-export-unavailable");k=await ot(f,p,a,()=>r()&&G(n),S=>{o=S,s?.stage(S),S==="export"&&s?.exportAttempt(p)})}p=k.jobId,o="placement",s?.stage(o);const v=[k.value.video,...k.value.frames],I=[];for(let S=0;S<v.length;S++){l();const _=v[S],B=`capture-${c.id.slice(0,12)}-${S}.${S===0?"mp4":_.mimeType==="image/jpeg"?"jpg":"png"}`,E=await hn(e,B,{sourcePath:_.sourcePath,mimeType:_.mimeType,idempotencyKey:se()},void 0,void 0,()=>r()&&G(n));l(),S===0?i.files.push({type:"file",attachmentId:E.attachmentId,fileName:B,mimeType:E.mimeType??_.mimeType,size:E.size}):(i.frames.push({type:"image",attachmentId:E.attachmentId,mimeType:_.mimeType==="image/jpeg"?"image/jpeg":"image/png"}),i.framePromptBytes.push(Wn(_))),I.push(E.attachmentId)}y.video_attachment_id=I[0],y.frames=k.value.frames.map((S,_)=>({mark_id:S.markId,attachment_id:I[_+1]})),y.kept_ms=m.clips}i.metadata.push(y)}finally{s?.stage("release"),await a?.releaseMediaJob?.(p).catch(()=>{})}}return i}catch(l){throw l instanceof O?l:new O(o,ie(l))}}const ue=1568,ma=.85;async function pa(e,t){const n=Math.round(e.length*3/4/1024),a=await fa(e,t),{width:r,height:s}=a,i=r>ue||s>ue;let o=r,l=s;if(i){const f=ue/Math.max(r,s);o=Math.round(r*f),l=Math.round(s*f)}const c=new OffscreenCanvas(o,l),d=c.getContext("2d");if(!d)throw new Error("Failed to get 2D canvas context for image resize");d.drawImage(a,0,0,o,l);let u=t;ha(d,o,l)||(u="image/jpeg");const h=await c.convertToBlob({type:u,quality:u==="image/jpeg"?ma:void 0}),p=h.type||u,m=await ga(h),y=Math.round(m.length*3/4/1024);return console.debug(`[image-resize] ${r}×${s} → ${o}×${l} | ${t} → ${p} | ${n} KB → ${y} KB`),{base64:m,mimeType:p}}async function fa(e,t){const n=atob(e),a=new Uint8Array(n.length);for(let s=0;s<n.length;s++)a[s]=n.charCodeAt(s);const r=new Blob([a],{type:t});return createImageBitmap(r)}function ha(e,t,n){const r=e.getImageData(0,0,t,n).data;for(let s=3;s<r.length;s+=4)if(r[s]<255)return!0;return!1}async function ga(e){const t=await e.arrayBuffer(),n=new Uint8Array(t);let a="";for(let r=0;r<n.length;r++)a+=String.fromCharCode(n[r]);return btoa(a)}const T={...Oe,badge:Oe.badgeRadius*2};function ya(e,t,n=1,a=0){const r=Math.max(1,e.displayScale)*n,s=[],i=o=>o*n;for(const{n:o,mark:l}of t){const c=l.geometry;if(c.kind==="rect")s.push({kind:"rect",x:i(c.x),y:i(c.y),w:i(c.w),h:i(c.h),width:T.stroke*r});else if(c.kind==="path")s.push({kind:"path",points:c.points.map(m=>({x:i(m.x),y:i(m.y)})),width:T.pen*r});else{const m={x:i(c.from.x),y:i(c.from.y)},y={x:i(c.to.x),y:i(c.to.y)};s.push({kind:"arrow",from:m,to:y,head:_a(m,y,T.arrowHead*r),width:T.stroke*r})}if(!T.showNumbers)continue;const d=Math.max(a,T.badge/2*r),u=i(l.bounds.x+l.bounds.w),h=i(l.bounds.y),p=Zt({x:i(l.bounds.x),y:h,w:u-i(l.bounds.x),h:i(l.bounds.h)},{x:0,y:0,w:i(e.width),h:i(e.height)},r,d);s.push({kind:"badge",...p,radius:d,label:String(o),font:d*T.badgeTextScale})}return s}function wa(e,t){"letterSpacing"in e&&(e.letterSpacing="0px"),"wordSpacing"in e&&(e.wordSpacing="0px");const n=(a,r,s)=>{e.strokeStyle=T.halo,e.lineWidth=a+T.haloWidth*r,s(),e.strokeStyle=T.accent,e.lineWidth=a,s()};e.strokeStyle=T.accent,e.lineCap="round",e.lineJoin="round";for(const a of t)if(a.kind==="rect")n(a.width,a.width/T.stroke,()=>e.strokeRect(a.x,a.y,a.w,a.h));else if(a.kind==="path"||a.kind==="arrow"){e.lineWidth=a.width,e.beginPath();const r=a.kind==="path"?a.points:[a.from,a.to];a.kind==="arrow"&&r.forEach((i,o)=>o?e.lineTo(i.x,i.y):e.moveTo(i.x,i.y)),a.kind==="arrow"&&(e.moveTo(a.head.left.x,a.head.left.y),e.lineTo(a.to.x,a.to.y),e.lineTo(a.head.right.x,a.head.right.y));const s=a.kind==="path"?new Path2D(Xt(a.points)):null;n(a.width,a.width/(a.kind==="path"?T.pen:T.stroke),()=>s?e.stroke(s):e.stroke())}else e.fillStyle=T.paper,e.beginPath(),e.arc(a.x,a.y,a.radius,0,Math.PI*2),e.closePath(),e.fill(),e.strokeStyle=T.accent,e.lineWidth=T.badgeOutline*a.radius/T.badgeRadius,e.stroke(),e.fillStyle=T.ink,e.font=`600 ${a.font}px ${T.badgeFontFamily}`,e.textAlign="center",e.textBaseline="middle",e.fillText(a.label,a.x,a.y)}async function ba(e,t){const n=Uint8Array.from(atob(e),a=>a.charCodeAt(0));return createImageBitmap(new Blob([n],{type:t}))}async function ka(e){const t=await e.convertToBlob({type:"image/png"});return Ze(await t.arrayBuffer())}async function ht(e,t,n,a,r=0){await an();const s=await ba(e.base64,e.mimeType);try{const i=Math.min(1,a/Math.max(t.width,t.height)),o=new OffscreenCanvas(Math.max(1,Math.round(t.width*i)),Math.max(1,Math.round(t.height*i))),l=o.getContext("2d");if(!l)throw new Error("dock-evidence-canvas-unavailable");return l.drawImage(s,0,0,o.width,o.height),wa(l,ya(t,n,i,r)),o}finally{s.close()}}async function va(e,t,n){const a=await ht(e,t,n,Math.max(t.width,t.height));return pa(await ka(a),"image/png")}async function zr(e,t,n,a=384){const r=await ht(e,t,n,a,a/32);return URL.createObjectURL(await r.convertToBlob({type:"image/png"}))}function _a(e,t,n=T.arrowHead){const a=Math.atan2(t.y-e.y,t.x-e.x),r=T.arrowSpread;return{left:{x:t.x-n*Math.cos(a-r),y:t.y-n*Math.sin(a-r)},right:{x:t.x-n*Math.cos(a+r),y:t.y-n*Math.sin(a+r)}}}function Gr(e,t){const n=zt(t??void 0),a=new Set(t?.clips.filter(r=>!!r.media&&!F(r.media)).map(r=>r.contextItemId));return e.filter(r=>!n.has(r.id)&&!a.has(r.id))}async function Jr({workspaceId:e,agentId:t,evidence:n,clickedItems:a,sendItems:r,clickedPayload:s,binding:i,service:o,current:l,onRecord:c,timing:d}){const u=()=>{if(!l()||!G(i))throw new O("validate","media-send-retired")};if(u(),n?.images.some(w=>w.mediaError)||n?.clips.some(w=>w.mediaError))throw new O("validate","invalid-saved-edit");const h=w=>!!w.media&&!F(w.media),p=n?{workspaceId:e,agentId:t,appUrl:`intent://local/workspace/${encodeURIComponent(e)}`,clipAttachmentIds:Object.fromEntries(n.clips.map(w=>[w.id,a.find(M=>M.id===w.contextItemId)?.attachmentId??null]))}:null;for(const w of n?.clips??[]){if(!w.media||!F(w.media))continue;const M=a.find(Q=>Q.id===w.contextItemId);if(!M||M.attachmentId!==w.media.source.attachmentId||M.path!==w.media.source.path||M.placementStatus!==void 0&&M.placementStatus!=="placed")throw new O("validate","legacy-original-unavailable")}const m=n?await ua(e,n,i,o,l,d):{images:{},files:[],frames:[],framePromptBytes:[],metadata:[]},y=new Set(n?.clips.filter(w=>h(w)||!!w.media&&F(w.media)).map(w=>w.id)),f=new Set(n?.clips.filter(w=>y.has(w.id)).flatMap(w=>(w.captureHistory??[]).map(M=>M.image.id))),k=(n?.images??[]).filter(w=>w.source!=="annotate"||!!w.media||!f.has(w.id)||n.marks.some(M=>M.imageId===w.id&&!(M.clipId&&y.has(M.clipId))));d?.stage("burn");let v=[];try{v=n?await Sa({...n,images:k},a,m.images):[]}catch(w){throw new O("burn",ie(w))}if(m.framePromptBytes.reduce((w,M)=>w+(M??0),0)>Hn)throw new O("validate","image-budget-exceeded");const S=new Set(n?.images.filter(w=>w.media).map(w=>w.id)),_=n?{...n,images:k.map(w=>m.images[w.id]?{...w,width:m.images[w.id].width,height:m.images[w.id].height}:w),clips:n.clips.filter(w=>!h(w)),marks:n.marks.filter(w=>!S.has(w.imageId)&&!n.clips.some(M=>h(M)&&M.id===w.clipId))}:null;u();const B=m.metadata.some(w=>typeof w.transcript=="string"&&w.transcript.trim());if(!s.text.trim()&&!r.length&&!s.workspaceContextStr?.trim()&&!v.length&&!m.files.length&&!m.frames.length&&!s.imageBlocks?.length&&!s.fileBlocks?.length&&!B)return null;let E=v,P=null;d?.stage("placement");const xe=n?await pt(i):null;if(u(),n&&(e!==be||xe?.chiefAttachments)){const w=await ca({workspaceId:e,binding:i,images:k.map((M,Q)=>{const X=a.find(Ct=>Ct.id===M.contextItemId);return{image:M,signature:Gt(n,M.id),composite:{base64:v[Q].data,mimeType:v[Q].mimeType},raw:!M.media&&X?.imageData&&X.imageMimeType?{base64:X.imageData,mimeType:X.imageMimeType}:null}}),records:n?.placements??{},onRecord:c});u(),E=w.map(M=>({type:"image",attachmentId:M.composite.attachmentId,mimeType:M.composite.mimeType})),P=Object.fromEntries(w.map(M=>[M.imageId,{attachmentId:M.composite.attachmentId,raw:M.raw}]))}const g=new Map(n?Xe(n).map(({n:w,mark:M})=>[M.id,w]):[]),D=p&&P?{...p,imageAttachments:P,markNumbers:g}:p&&{...p,markNumbers:g},U=n&&D?{...s,imageBlocks:[...E,...m.frames,...s.imageBlocks??[]],fileBlocks:[...s.fileBlocks??[],...m.files],workspaceContextStr:[Yt(_,D),m.metadata.length?`[Edited capture outputs]
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DZtCGZgy.js","/app/immutable/chunks/Bctp9lP7.js","/app/immutable/chunks/C1C8P18t.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CDNiWmce.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/DEHoDrdd.js","/app/immutable/chunks/J1LWsTd9.js","/app/immutable/chunks/CThSE8LQ.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BUNb3q2A.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/Ca-5qIPO.js","/app/immutable/chunks/8VBKAONs.js","/app/immutable/chunks/Qm-MZg2p.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DrLx8OXO.js","/app/immutable/chunks/CXEzZ2hR.js","/app/immutable/chunks/CXfsvSt9.js","/app/immutable/chunks/CORIYKie.js","/app/immutable/chunks/qD_x_a7m.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CMQcQe3J.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/DcR44gq9.js","/app/immutable/chunks/BR6IlpMz.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/Dqi9bJNf.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CfsrLxYu.js","/app/immutable/chunks/CMYgSHYB.js","/app/immutable/chunks/7CZay1T4.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BZMuFhDq.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/BgO8l4RL.js","/app/immutable/chunks/CYP3WRBZ.js","/app/immutable/chunks/M2GCPKoA.js","/app/immutable/chunks/CDSuKhpz.js","/app/immutable/chunks/DvIus6kU.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/l-VTMc_p.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/BjtmfdLK.js","/app/immutable/chunks/D9yIi5KK.js","/app/immutable/chunks/CTiRYanT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Et=Object.defineProperty;var Dt=(e,t,n)=>t in e?Et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pe=(e,t,n)=>Dt(e,typeof t!="symbol"?t+"":t,n);import{I_ as A,i as be,nL as R,wa as Rt,C2 as Ge,wc as xt,Df as Je,cE as Pt,cF as Bt,nM as Ye,ny as Ot,e as ke,fM as $t,l_ as Lt,cM as Ut}from"./qD_x_a7m.js";import{J as Nt,Z as Ht,dS as Be,cR as pe,dD as Ft,aw as Kt,bc as Qe,I as Wt,e3 as jt}from"./Dqi9bJNf.js";import{e as qt,b as ae,F as Vt,y as re,_ as ve,G as zt,C as Gt,W as Xe,v as Jt,u as Yt,M as Qt}from"./CMQcQe3J.js";import{D as Oe,a as Xt,d as Zt}from"./CQcEqK4G.js";import{l as en,o as tn,g as Ze,r as nn,m as an,D as rn}from"./C-Reftw2.js";import{e as sn}from"./CMYgSHYB.js";import{z as et,N as on}from"./C1C8P18t.js";import{f as cn}from"./CcNWV5oe.js";import{bm as b,_ as fe}from"./CDNiWmce.js";import{aa as tt,aB as se,J as he,a as nt,n as at,cS as rt,e as st,aI as it,M as ln,ac as dn,aV as $e,d as le,C as un,cT as mn,U as pn,a6 as fn,aJ as hn,b_ as gn}from"./CYKcOC1a.js";import{W as yn,L as wn,w as bn,R as kn,M as vn,h as _n}from"./8VBKAONs.js";import{l as q,i as Sn,n as Mn}from"./CXfsvSt9.js";import{x as An,J as In,ai as Tn,ar as Cn}from"./Dx_cihQo.js";import{a as Le,b as En,g as Dn}from"./DypB-Dwi.js";import{m as Rn}from"./BgO8l4RL.js";import{C as xn}from"./B5aYN90J.js";import{i as Pn}from"./Br53KhNC.js";import{o as $,e as Bn,l as V,s as C,n as ce,b as On,d as $n,c as Ln}from"./CIyUrgF0.js";const Dr=A.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),Rr=A.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),xr=A.createSelector(e=>{const t=[];for(const s of Object.values(e.panelLayout.byWorkspaceId))for(const i of Object.values(s.panels))for(const o of i.tabs)o.type==="agent"&&o.agentId&&t.push(o.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),a=new Set(e.agentSessions.agentIdsByWorkspace[be]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(s=>a.has(s)),dividerSessionAgentIds:n,openAgentTabIds:t}});function Pr(e,t){if(e)return e.model}function Un({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function Br({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a=0}){return!(e?Nt(e):!1)&&!Un({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a})}function Or(e){return Ht(e.messageMetadata)}function Nn(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function $r(e){return Nn({...e,createdAt:Date.parse(e.queuedAt)})}const Hn=8*1024*1024,Fn=3*1024*1024;function Kn(e){return Math.ceil(Math.max(0,e)/3)*4}function Wn(e){const t=e.promptBase64Bytes;return e.mimeType==="image/jpeg"&&Number.isSafeInteger(e.size)&&e.size>0&&e.size<=Fn&&typeof t=="number"&&t===Kn(e.size)?t:null}async function ot(e,t,n,a,r=()=>{}){const s=()=>{if(!a())throw new Error("media-send-retired")};if(s(),r("overlay-render"),!n.exportMedia)throw new Error("media-export-unavailable");const i=en(e.source,e.saved);if(i.length>1e4)throw new Error("media-animation-layer-limit");const o=[];for(const c of i)s(),o.push({...c,png:await tn(e.source,e.saved,c.atMs)});s(),r("export");const l=await n.exportMedia({outputVersion:qt,jobId:t,media:e,layers:o});if(s(),!l.ok)throw new Error(["media-export-failed",l.error].filter(Boolean).join(":"));return{jobId:t,value:l.value}}const _e={CLIPBOARD_WRITE:"dock-media:clipboard-write",CLIPBOARD_READ:"dock-media:clipboard-read",MENU:"dock-media:menu"};function Ue(e,t){return Math.max(0,(e.pausedAt??t)-e.startedAt-(e.pausedMs??0))}function ge(e,t){if(!t?.startsWith(".intent/attachments/"))return;const n=t.split("/").map(encodeURIComponent).join("/"),a=tt(`intent://local/file/${n}`,e);return a?.kind==="video"?a.url:void 0}function jn(e){const t=e.video==="full"?b.dock_captureEditor_videoFull_label():b.dock_captureEditor_videoHighlights_label(),n=e.voice==="audio"?b.dock_captureEditor_voiceAudio_label():e.voice==="transcript"?b.dock_captureEditor_voiceTranscript_label():b.dock_captureEditor_voiceOff_summary();return`${t} · ${n}`}function qn(e,t,n,a){if(a?.error==="permission")return a.kind==="pick"?"accessibility":"screen";if(e==="permission"||t==="permission")return"screen";if(n?.startsWith("microphone-permission"))return"microphone";if(n?.startsWith("speech-permission"))return"speech"}const j=cn;function Lr(e){const{view:t,items:n,local:a,labels:r,copy:s}=e,i=t.speech.error??t.speech.capability?.reason??null,o=qn(t.captureError,t.clips.find(g=>g.status==="failed"&&g.error==="permission")?.error??null,i,t.annotationIssue),l=t.annotationIssue?.error==="unavailable"?s?.annotationUnavailable:void 0,c=t.annotationIssue,d=t.captureError==="permission",u=c?.error==="permission"&&c.kind!=="pick",h=c?.error==="permission"&&c.kind==="pick",p=i?.startsWith("speech-permission")?"speech":i?.startsWith("microphone-permission")||i==="permission"?"microphone":void 0,m={},y={},f=(g,D,U)=>{m[g]=D,U&&(y[g]=U)};s&&(d&&(f("capture",s.permission,"screen"),t.recording||f("record",s.permission,"screen")),u&&!t.annotating&&f("annotate",s.permission,"screen"),h&&(f("pick",s.accessibilityPermission,"accessibility"),t.tool==="pick"&&!t.annotating&&f("annotate",s.accessibilityPermission,"accessibility")),p&&!t.dictation&&f("mic",(i&&r.speechError?.(i))??s.speechPermission,p));const k=g=>{const D=y[g];D&&e.actions.onOpenSettings(D)},v=new Set(t.evidenceOwnedItemIds),I=t.clips.find(g=>g.status==="recording"),S=t.clips.length>=ae.clips,_=t.capabilities,B=t.speech.available,E=new Set(t.clips.filter(g=>g.status==="recording"||g.status==="placing"||!!g.media).flatMap(g=>g.captureHistory?.map(D=>D.image.id)??[])),P=[...t.tiles.filter(({image:g,marks:D})=>!!g.media||g.source!=="annotate"||!E.has(g.id)||D.some(({mark:U})=>!U.clipId)).map(({image:g,marks:D})=>({kind:"image",id:g.contextItemId,url:a.previews[g.id]??"",markCount:D.length,owner:"evidence",...a.previews[g.id]?{}:{status:"placing"}})),...t.clips.filter(g=>!g.discarding).map(g=>({kind:"clip",id:g.contextItemId??g.id,duration:j(g.status==="recording"?Ue(g,a.now):g.durationMs),recording:g.status==="recording",...g.media?.saved?{summary:jn(g.media.saved)}:{},...g.status==="ready"&&ge(e.workspaceId,g.path)?{url:ge(e.workspaceId,g.path)}:{},owner:"evidence",...g.status==="placing"?{status:"placing"}:{},...g.status==="failed"?{status:"failed",...g.error==="limit"?{error:b.dock_composer_clipTooLarge_error()}:{}}:{}})),...n.filter(g=>!v.has(g.id)).map(g=>({...g.imageData&&g.imageMimeType?{kind:"image",id:g.id,url:`data:${g.imageMimeType};base64,${g.imageData}`,markCount:0,file:{name:g.label,imageData:g.imageData,imageMimeType:g.imageMimeType}}:{kind:"file",id:g.id,name:g.label},owner:"attachment",...g.placementStatus==="placing"?{status:"placing"}:{},...g.placementStatus==="failed"?{status:"failed",error:g.placementError}:{}}))];return{mediaStatus:t.recording?{kind:"recording",label:r.recording}:t.annotating?{kind:"annotating",label:r.annotating}:void 0,...o?{settingsPane:o}:{},...l?{annotationNotice:l}:{},labels:r,attachments:P,...s?{placeholder:t.dictation?"":s.idle}:{},state:{captureRevision:t.captureAccepted,capturePending:t.capturePending,captureDisabled:!_.capture||t.captureDisabled,...t.captureDisabled?{captureTooltip:r.captureLimit}:{},captureMode:t.evidence?.annotation?"fullscreen":t.captureMode,captureModesAvailable:!!_.captureModes&&!t.evidence?.annotation,annotationActive:t.annotating,tool:t.tool,toolUsed:t.toolUsed,annotationDisabled:!_.annotate,recording:t.recording&&!I?.discarding,recordingDisabled:!!I?.discarding||!t.recording&&(!_.record||S),...S&&!t.recording?{recordingTooltip:r.clipLimit}:{},recordingTime:j(I?Ue(I,a.now):0),dictating:!!t.dictation,dictationPending:t.speech.pending||t.dictation?.status==="transcribing",dictationDisabled:!B&&!t.dictation&&!m.mic,...t.speech.error&&r.speechError?{dictationTooltip:r.speechError(t.speech.error)}:{},dictationTime:t.dictation?j(a.now-t.dictation.startedAt):j(0),inputLevels:t.speech.levels,...Object.keys(m).length?{alerts:m}:{}},...e.actions,...t.fileAttachmentsEnabled===!1?{onEdit:void 0}:{},onAlert:k,beforeSubmit:e.beforeSubmit}}const Se=()=>globalThis.electronAPI,Vn=["image/png","image/jpeg","image/webp"],Ne=e=>Vn.includes(e??"")?e:null;function He(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a+=1)n[a]=t.charCodeAt(a);return n}async function Ur(e,t){const{view:n,items:a,previews:r}=t,s=n.tiles.find(({image:c})=>c.id===e||c.contextItemId===e);if(s){const c=a.find(p=>p.id===s.image.contextItemId),d=s.image.media;if(s.image.mediaError)return null;if(d?.saved){if(!t.createSavedPreviewUrl||!t.revokeUrl)return null;const p={...d,saved:d.saved},m=await t.createSavedPreviewUrl(t.workspaceId,p);try{const y=await t.fetchBytes(m),f=p.saved.crop;return{kind:"image",name:c?.label||"screenshot.png",mimeType:"image/png",bytes:y,intent:{pixels:{mimeType:"image/png",width:Math.max(1,Math.round(f?.w??p.source.width)),height:Math.max(1,Math.round(f?.h??p.source.height)),displayScale:s.image.displayScale,capturedAt:s.image.capturedAt},raw:y,marks:[]}}}finally{t.revokeUrl(m)}}const u=Ne(c?.imageMimeType),h=r[s.image.id];return!c?.imageData||!u||!h?null:{kind:"image",name:c.label||"screenshot.png",mimeType:"image/png",bytes:await t.fetchBytes(h),intent:{pixels:{mimeType:u,width:s.image.width,height:s.image.height,displayScale:s.image.displayScale,capturedAt:s.image.capturedAt,...s.image.hash?{hash:s.image.hash}:{}},raw:He(c.imageData),marks:s.marks.map(({mark:p})=>({tool:p.tool,geometry:p.geometry,bounds:p.bounds,element:p.element}))}}}const i=n.clips.find(c=>c.id===e||c.contextItemId===e);if(i){const c=i.status==="ready"?ge(t.workspaceId,i.path):null;if(!c)return null;const d=a.find(h=>h.id===i.contextItemId),u=await t.fetchBytes(c);if(!Gn(u))throw new Error("Not a recording file");return{kind:"clip",name:d?.label||`recording-${i.id.slice(0,8)}.mp4`,mimeType:d?.attachmentMimeType||"video/mp4",bytes:u,durationMs:i.durationMs,hasMicAudio:i.hasMicAudio}}const o=a.find(c=>c.id===e),l=Ne(o?.imageMimeType);return o?.imageData&&l?{kind:"image",name:o.label||"image",mimeType:l,bytes:He(o.imageData)}:null}async function zn(e){const t=await fetch(e);if(!t.ok)throw new Error(`Media request failed (${t.status})`);const n=new Uint8Array(await t.arrayBuffer()),a=Number(t.headers.get("content-length")??Number.NaN);if(n.byteLength===0||Number.isFinite(a)&&a!==n.byteLength)throw new Error("Media response was incomplete");return n}function Gn(e){return e.byteLength>8&&String.fromCharCode(...e.subarray(4,8))==="ftyp"}async function Nr(e){try{return(await Se()?.invoke(_e.CLIPBOARD_WRITE,e))?.ok===!0}catch{return!1}}async function Jn(){try{return await Se()?.invoke(_e.CLIPBOARD_READ,{})??null}catch{return null}}async function Hr(e){try{const t=await Se()?.invoke(_e.MENU,{canCut:e});return t?.action==="copy"||t?.action==="cut"?t.action:null}catch{return null}}const Fe=new WeakSet;async function Yn(e,t){const[n]=e;if(e.length!==1||!n||n.size!==t.size)return!1;try{const a=await crypto.subtle.digest("SHA-256",await n.arrayBuffer());return Array.from(new Uint8Array(a),s=>s.toString(16).padStart(2,"0")).join("")===t.sha256}catch{return!1}}function Fr(e,{onIntentMedia:t,isCurrent:n,read:a=Jn}){const r=e.clipboardData;if(Fe.has(e)||!r||r.files.length===0)return!1;const s=e.target,i=Array.from(r.files),o=r.types.filter(l=>l!=="Files").map(l=>[l,r.getData(l)]);return e.preventDefault(),e.stopImmediatePropagation(),a().catch(()=>null).then(async l=>{if(!n())return;if(l&&await Yn(i,l)){n()&&t(l);return}if(!n()||!(s instanceof Node)||!s.isConnected)return;const c=new DataTransfer;for(const u of i)c.items.add(u);for(const[u,h]of o)c.setData(u,h);const d=new ClipboardEvent("paste",{clipboardData:c,bubbles:!0,cancelable:!0});Fe.add(d),s.dispatchEvent(d)}),!0}function Qn(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}function Xn(e){let t="";for(let a=0;a<e.length;a+=32768)t+=String.fromCharCode(...e.subarray(a,a+32768));return btoa(t)}function ct(e){let t=0;return e.endsWith("==")?t=2:e.endsWith("=")&&(t=1),Math.floor(e.length*3/4)-t}async function Zn(e){const t=await crypto.subtle.digest("SHA-256",e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}const lt={placeAttachment:it,beginAttachmentUpload:st,sendAttachmentUploadChunk:rt,commitAttachmentUpload:at,abortAttachmentUpload:nt,getAttachmentInfo:he,mintIdempotencyKey:se};async function Me(e,t,n,a=lt){const{idempotencyKey:r}=n,s={...r!==void 0?{idempotencyKey:r}:{},...n.rawScreenshot!==void 0?{rawScreenshot:n.rawScreenshot}:{}},i=async m=>mn(m,r)?$e(e,r,a.getAttachmentInfo):void 0;if(ct(n.data)<=ln)try{return await a.placeAttachment(e,t,{data:n.data,mimeType:n.mimeType,...s})}catch(m){const y=await i(m);if(y)return y;throw m}const o=Qn(n.data),l=await Zn(o);let c,d;try{({uploadId:c,maxChunkBytes:d}=await a.beginAttachmentUpload(e,t,o.byteLength,l,{mimeType:n.mimeType,...s}))}catch(m){if(r!==void 0&&dn(m)){const y=await $e(e,r,a.getAttachmentInfo);if(y)return y}throw m}const u=Math.min(pn,d),h=Math.ceil(o.byteLength/u);let p=!1;try{for(let m=0;m<h;m++){const y=o.subarray(m*u,(m+1)*u);await a.sendAttachmentUploadChunk(c,m,Xn(y),e)}return p=!0,await a.commitAttachmentUpload(c,e)}catch(m){const y=p?await i(m):void 0;if(y)return y;throw await a.abortAttachmentUpload(c,e).catch(()=>{}),m}}function ea(e,t){return fn(e,`image-${Date.now()}-${t+1}`)}class Ae extends Error{constructor(n,a){super(n);Pe(this,"retryBlocks");this.name="ImagePlacementError",this.retryBlocks=a}}function ta(e,t){return e instanceof Ae?e.retryBlocks:t}async function na(e,t,n=lt,a=()=>!0){const r=l=>(...c)=>(le(a),l(...c));n={placeAttachment:r(n.placeAttachment),beginAttachmentUpload:r(n.beginAttachmentUpload),sendAttachmentUploadChunk:r(n.sendAttachmentUploadChunk),commitAttachmentUpload:r(n.commitAttachmentUpload),abortAttachmentUpload:r(n.abortAttachmentUpload),getAttachmentInfo:r(n.getAttachmentInfo),mintIdempotencyKey:r(n.mintIdempotencyKey)};const s=[],i=[],o=[];for(let l=0;l<t.length;l++){le(a);const c=t[l];if("attachmentId"in c&&c.attachmentId){const p={type:"image",attachmentId:c.attachmentId,...c.mimeType?{mimeType:c.mimeType}:{}};s.push(p),i.push(p);continue}const d=c,u=d.placementFileName??ea(d.mimeType,l),h=n.mintIdempotencyKey(d.placementIdempotencyKey);try{const p=await Me(e,u,{data:d.data,mimeType:d.mimeType,...h!==void 0?{idempotencyKey:h}:{}},n),m={type:"image",attachmentId:p.attachmentId,...p.mimeType??d.mimeType?{mimeType:p.mimeType??d.mimeType}:{}};s.push(m),i.push(m)}catch(p){const m=un(p);o.push(m?`${u} (${m})`:u),i.push(h!==void 0?{...d,placementIdempotencyKey:h,placementFileName:u}:d)}}if(o.length>0)throw new Ae(b.chat_imagePlacement_failed_error({names:o.join(", ")}),i);return le(a),s}const Kr=Object.freeze(Object.defineProperty({__proto__:null,ImagePlacementError:Ae,base64DecodedBytes:ct,imageRetryBlocks:ta,placeImageAttachment:Me,toImageReferenceBlocks:na},Symbol.toStringTag,{value:"Module"}));function dt(){try{return yn()}catch{return null}}function aa(){return{backendId:A.state.connections.windowBackendId??null,generation:A.state.daemonHealth.connectionGeneration,transport:dt()}}class Ie extends Error{constructor(){super("dock-evidence-backend-changed")}}function N(e,t){return async(...n)=>{e();const a=await t(...n);return e(),a}}const H={current:e=>dt()===e.transport&&A.state.daemonHealth.connectionGeneration===e.generation&&(A.state.connections.windowBackendId??null)===e.backendId,capabilities:()=>wn(),placeImage:(e,t,n,a)=>Me(e,t,n,{placeAttachment:N(a,it),beginAttachmentUpload:N(a,st),sendAttachmentUploadChunk:N(a,rt),commitAttachmentUpload:N(a,at),abortAttachmentUpload:N(a,nt),getAttachmentInfo:N(a,he),mintIdempotencyKey:se}),lookup:(e,t)=>he({workspaceId:e,idempotencyKey:t}),mintKey:se};function G(e){return H.current(e)}function ra(e,t){const n=A.state.dockConversation;return{generation:n.generation,authority:n.authority,clearRevision:R(n.drafts,Vt(e,t))?.clearRevision??0,binding:aa()}}function Wr(e,t,n){const a=ra(e,t);return a.generation===n.generation&&a.authority===n.authority&&a.clearRevision===n.clearRevision&&G(n.binding)}function ut(e,t){return()=>{if(!e.current(t))throw new Ie}}const mt=Object.freeze({rawRetention:!1,chiefAttachments:!1});function jr(e){return e!==mt}const de=new Map;function pt(e,t=H){const n=`${e.backendId}:${e.generation}`;let a=de.get(n);if(!a){const r=ut(t,e);a=(async()=>{r();const i=await t.capabilities();r();const o=i?.server?.capabilities;if(!o||typeof o!="object")throw new Error("unobserved");return{rawRetention:o.rawScreenshotRetention===1,chiefAttachments:o.chiefAttachments===1}})().catch(()=>(de.delete(n),mt)),de.set(n,a)}return a}class Z extends Error{constructor(t){super(`dock-raw-retention-contract:${t}`),this.reason=t}}function ft(e){const{rpcCode:t,code:n}=e??{};return t===-32602||n==="INVALID_PARAMS"}function sa(e){const t=String(e?.message??"");return ft(e)&&(t.includes("rawScreenshotExpired:")||/expired at .*not renewable/i.test(t))}function ia(e,t,n){const a=e.rawScreenshot;if(!a||a.compositeAttachmentId!==t)return null;const r=Date.parse(a.expiresAt);return Number.isFinite(r)?a.expired||r<=n?"expired":{attachmentId:e.attachmentId,expiresAt:a.expiresAt}:null}function Ke(e){return{ok:!0,path:e.path,fileName:e.fileName,size:e.size,attachmentId:e.attachmentId,...e.mimeType?{mimeType:e.mimeType}:{},uploadedAt:e.uploadedAt,replayed:!0,...e.rawScreenshot?{rawScreenshot:e.rawScreenshot}:{}}}class oa extends Error{constructor(t,n){super("dock-evidence-placement-failed"),this.imageId=t,this.failure=n}}const We=e=>e.split("/")[1]?.replace("jpeg","jpg")||"png";async function ca(e){const t=e.api??H,n=e.now??Date.now,a=ut(t,e.binding);a();const r=await pt(e.binding,t);a();const s=r.rawRetention&&(e.workspaceId!==be||r.chiefAttachments),i=[];for(const o of e.images){const l=e.records[o.image.id];let c=l&&l.signature===o.signature&&l.workspaceId===e.workspaceId&&l.backendId===e.binding.backendId?l:{imageId:o.image.id,signature:o.signature,workspaceId:e.workspaceId,backendId:e.binding.backendId,compositeKey:null,rawKey:null,composite:null,raw:null,rawSettled:!1};const d=u=>{c=u,e.onRecord(u)};try{if(!c.composite){const h=c.compositeKey,p=t.mintKey(h??void 0)??null;p!==c.compositeKey&&d({...c,compositeKey:p});let m;h&&p===h&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a()),m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${o.image.id.slice(0,8)}.${We(o.composite.mimeType)}`,{data:o.composite.base64,mimeType:o.composite.mimeType,...p?{idempotencyKey:p}:{}},a),a()),d({...c,composite:{attachmentId:m.attachmentId,mimeType:m.mimeType??o.composite.mimeType}})}const u=c.composite.attachmentId;if(s&&o.raw&&!c.raw&&!c.rawSettled){const h=c.rawKey,p=t.mintKey(h??void 0);if(p){p!==c.rawKey&&d({...c,rawKey:p});let m;h&&p===h&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a());try{m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${o.image.id.slice(0,8)}-original.${We(o.raw.mimeType)}`,{data:o.raw.base64,mimeType:o.raw.mimeType,idempotencyKey:p,rawScreenshot:{compositeAttachmentId:u}},a),a());const y=ia(m,u,n());if(y==="expired")d({...c,rawSettled:!0});else if(y)d({...c,raw:y});else throw new Z("echo")}catch(y){if(sa(y))d({...c,rawSettled:!0});else throw y instanceof Z?y:ft(y)?new Z("refused"):y}}else throw new Z("unkeyed")}}catch(u){throw u instanceof Ie?u:new oa(o.image.id,u)}i.push(c)}return i}async function qr(e,t,n,a){const r=()=>{if(!H.current(a))throw new Ie};r();const s=await H.placeImage(e,t,{...n,idempotencyKey:H.mintKey()},r);return r(),s}const la=new Set(["invalid-saved-edit","media-send-retired","transcript-unavailable","transcript-pending","invalid-edit","stale-source","legacy-baked-marks","timing-unavailable","audio-unavailable","media-source-unavailable","media-export-unavailable","media-animation-layer-limit","media-export-failed","legacy-original-unavailable","capture-render-unavailable","capture-blur-unavailable","stale-source-pixels","not-a-screenshot","not-admitted","unavailable","dock-evidence-missing-pixels","draft-restore-failed","image-budget-exceeded"]),da=new Set(["unavailable","permission","failed","busy","cancelled","limit"]);class O extends Error{constructor(t,n){super(n),this.stage=t,this.code=n,this.name="DockSendError"}}function ie(e){const t=e instanceof Error?e.message:typeof e=="string"?e:"";if(t.length>64)return"unclassified";const[n,...a]=t.split(":");return!la.has(n)||a.length>2?"unclassified":n!=="media-export-failed"?a.length?"unclassified":n:[n,...a.map(r=>da.has(r)?r:"other")].join(":")}function Vr(e,t){return e instanceof O?{stage:e.stage,code:ie(e.code)}:{stage:t,code:ie(e)}}function F(e){if(!e||e.source.kind!=="recording")return!1;const t=e.source,n=e.saved??re(t,t.capturedMarks??[],e.transcript);if(n.video!=="full"||n.voice!=="audio"||n.crop||n.blurRegions.length||n.blurStrokes?.length)return!1;const a=ve(n,t,e.transcript);return t.visuals==="clean"?!a.errors.length&&!a.muted&&n.cuts.length===0&&!n.marks.some(r=>r.included)&&a.marks.length===0&&a.transcript===null&&a.kept.length===1&&a.kept[0].startMs===0&&a.kept[0].endMs===t.durationMs&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs===t.durationMs:!a.errors.length&&!a.muted&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs>=t.durationMs}async function ua(e,t,n,a,r,s){const i={images:{},files:[],frames:[],framePromptBytes:[],metadata:[]};let o="validate";try{const l=()=>{if(!r()||!G(n))throw new Error("media-send-retired")};for(const c of[...t.images,...t.clips]){if(o="validate",s?.stage(o),c.mediaError)throw new Error("invalid-saved-edit");if(!c.media||F(c.media))continue;l();const d=structuredClone(c.media),u=d.source;let h=d.saved??re(u,u.capturedMarks??[],d.transcript),p=crypto.randomUUID();try{if(u.kind==="recording"&&h.voice==="transcript"&&d.transcript?.status!=="ready"){if(o="transcribe",s?.stage(o),!a?.transcribeMedia)throw new Error("transcript-unavailable");const f=await a.transcribeMedia({jobId:p,media:d});if(l(),!f.ok)throw new Error("transcript-unavailable");d.transcript=f.value,d.saved||(h=re(u,u.capturedMarks??[],d.transcript))}o="plan",s?.stage(o);const m=ve(h,u,d.transcript);if(m.errors.length)throw new Error(m.errors[0]);const y={id:c.id,kind:u.kind,video:h.video,voice:h.voice,transcript:m.transcript,batches:u.batches,marks:m.marks.map(({n:f,mark:k,frameAtMs:v})=>({n:f,id:k.id,at_ms:v,kind:k.kind,label:k.label,note:k.note,context:k.context,geometry:k.geometry}))};if(u.kind==="screenshot"){o="screenshot-source",s?.stage(o);const f=u.path.split("/").map(encodeURIComponent).join("/"),k=tt(`intent://local/file/${f}`,e);if(!k||k.kind!=="image")throw new Error("media-source-unavailable");const v=await zn(k.url);l();const I={base64:Ze(v.buffer.slice(v.byteOffset,v.byteOffset+v.byteLength)),mimeType:/\.jpe?g$/i.test(u.path)?"image/jpeg":/\.webp$/i.test(u.path)?"image/webp":"image/png"};o="screenshot-render",s?.stage(o),i.images[c.id]=await nn(u,h,I),l()}else{if(!m.clips.length){y.video_attachment_id=null,y.frames=[],y.kept_ms=[],i.metadata.push(y);continue}const f={...d,saved:h};let k=await a?.takePreparedRecording?.(f);if(k&&(p=k.jobId),l(),!k){if(!a)throw new Error("media-export-unavailable");k=await ot(f,p,a,()=>r()&&G(n),S=>{o=S,s?.stage(S),S==="export"&&s?.exportAttempt(p)})}p=k.jobId,o="placement",s?.stage(o);const v=[k.value.video,...k.value.frames],I=[];for(let S=0;S<v.length;S++){l();const _=v[S],B=`capture-${c.id.slice(0,12)}-${S}.${S===0?"mp4":_.mimeType==="image/jpeg"?"jpg":"png"}`,E=await hn(e,B,{sourcePath:_.sourcePath,mimeType:_.mimeType,idempotencyKey:se()},void 0,void 0,()=>r()&&G(n));l(),S===0?i.files.push({type:"file",attachmentId:E.attachmentId,fileName:B,mimeType:E.mimeType??_.mimeType,size:E.size}):(i.frames.push({type:"image",attachmentId:E.attachmentId,mimeType:_.mimeType==="image/jpeg"?"image/jpeg":"image/png"}),i.framePromptBytes.push(Wn(_))),I.push(E.attachmentId)}y.video_attachment_id=I[0],y.frames=k.value.frames.map((S,_)=>({mark_id:S.markId,attachment_id:I[_+1]})),y.kept_ms=m.clips}i.metadata.push(y)}finally{s?.stage("release"),await a?.releaseMediaJob?.(p).catch(()=>{})}}return i}catch(l){throw l instanceof O?l:new O(o,ie(l))}}const ue=1568,ma=.85;async function pa(e,t){const n=Math.round(e.length*3/4/1024),a=await fa(e,t),{width:r,height:s}=a,i=r>ue||s>ue;let o=r,l=s;if(i){const f=ue/Math.max(r,s);o=Math.round(r*f),l=Math.round(s*f)}const c=new OffscreenCanvas(o,l),d=c.getContext("2d");if(!d)throw new Error("Failed to get 2D canvas context for image resize");d.drawImage(a,0,0,o,l);let u=t;ha(d,o,l)||(u="image/jpeg");const h=await c.convertToBlob({type:u,quality:u==="image/jpeg"?ma:void 0}),p=h.type||u,m=await ga(h),y=Math.round(m.length*3/4/1024);return console.debug(`[image-resize] ${r}×${s} → ${o}×${l} | ${t} → ${p} | ${n} KB → ${y} KB`),{base64:m,mimeType:p}}async function fa(e,t){const n=atob(e),a=new Uint8Array(n.length);for(let s=0;s<n.length;s++)a[s]=n.charCodeAt(s);const r=new Blob([a],{type:t});return createImageBitmap(r)}function ha(e,t,n){const r=e.getImageData(0,0,t,n).data;for(let s=3;s<r.length;s+=4)if(r[s]<255)return!0;return!1}async function ga(e){const t=await e.arrayBuffer(),n=new Uint8Array(t);let a="";for(let r=0;r<n.length;r++)a+=String.fromCharCode(n[r]);return btoa(a)}const T={...Oe,badge:Oe.badgeRadius*2};function ya(e,t,n=1,a=0){const r=Math.max(1,e.displayScale)*n,s=[],i=o=>o*n;for(const{n:o,mark:l}of t){const c=l.geometry;if(c.kind==="rect")s.push({kind:"rect",x:i(c.x),y:i(c.y),w:i(c.w),h:i(c.h),width:T.stroke*r});else if(c.kind==="path")s.push({kind:"path",points:c.points.map(m=>({x:i(m.x),y:i(m.y)})),width:T.pen*r});else{const m={x:i(c.from.x),y:i(c.from.y)},y={x:i(c.to.x),y:i(c.to.y)};s.push({kind:"arrow",from:m,to:y,head:_a(m,y,T.arrowHead*r),width:T.stroke*r})}if(!T.showNumbers)continue;const d=Math.max(a,T.badge/2*r),u=i(l.bounds.x+l.bounds.w),h=i(l.bounds.y),p=Zt({x:i(l.bounds.x),y:h,w:u-i(l.bounds.x),h:i(l.bounds.h)},{x:0,y:0,w:i(e.width),h:i(e.height)},r,d);s.push({kind:"badge",...p,radius:d,label:String(o),font:d*T.badgeTextScale})}return s}function wa(e,t){"letterSpacing"in e&&(e.letterSpacing="0px"),"wordSpacing"in e&&(e.wordSpacing="0px");const n=(a,r,s)=>{e.strokeStyle=T.halo,e.lineWidth=a+T.haloWidth*r,s(),e.strokeStyle=T.accent,e.lineWidth=a,s()};e.strokeStyle=T.accent,e.lineCap="round",e.lineJoin="round";for(const a of t)if(a.kind==="rect")n(a.width,a.width/T.stroke,()=>e.strokeRect(a.x,a.y,a.w,a.h));else if(a.kind==="path"||a.kind==="arrow"){e.lineWidth=a.width,e.beginPath();const r=a.kind==="path"?a.points:[a.from,a.to];a.kind==="arrow"&&r.forEach((i,o)=>o?e.lineTo(i.x,i.y):e.moveTo(i.x,i.y)),a.kind==="arrow"&&(e.moveTo(a.head.left.x,a.head.left.y),e.lineTo(a.to.x,a.to.y),e.lineTo(a.head.right.x,a.head.right.y));const s=a.kind==="path"?new Path2D(Xt(a.points)):null;n(a.width,a.width/(a.kind==="path"?T.pen:T.stroke),()=>s?e.stroke(s):e.stroke())}else e.fillStyle=T.paper,e.beginPath(),e.arc(a.x,a.y,a.radius,0,Math.PI*2),e.closePath(),e.fill(),e.strokeStyle=T.accent,e.lineWidth=T.badgeOutline*a.radius/T.badgeRadius,e.stroke(),e.fillStyle=T.ink,e.font=`600 ${a.font}px ${T.badgeFontFamily}`,e.textAlign="center",e.textBaseline="middle",e.fillText(a.label,a.x,a.y)}async function ba(e,t){const n=Uint8Array.from(atob(e),a=>a.charCodeAt(0));return createImageBitmap(new Blob([n],{type:t}))}async function ka(e){const t=await e.convertToBlob({type:"image/png"});return Ze(await t.arrayBuffer())}async function ht(e,t,n,a,r=0){await an();const s=await ba(e.base64,e.mimeType);try{const i=Math.min(1,a/Math.max(t.width,t.height)),o=new OffscreenCanvas(Math.max(1,Math.round(t.width*i)),Math.max(1,Math.round(t.height*i))),l=o.getContext("2d");if(!l)throw new Error("dock-evidence-canvas-unavailable");return l.drawImage(s,0,0,o.width,o.height),wa(l,ya(t,n,i,r)),o}finally{s.close()}}async function va(e,t,n){const a=await ht(e,t,n,Math.max(t.width,t.height));return pa(await ka(a),"image/png")}async function zr(e,t,n,a=384){const r=await ht(e,t,n,a,a/32);return URL.createObjectURL(await r.convertToBlob({type:"image/png"}))}function _a(e,t,n=T.arrowHead){const a=Math.atan2(t.y-e.y,t.x-e.x),r=T.arrowSpread;return{left:{x:t.x-n*Math.cos(a-r),y:t.y-n*Math.sin(a-r)},right:{x:t.x-n*Math.cos(a+r),y:t.y-n*Math.sin(a+r)}}}function Gr(e,t){const n=zt(t??void 0),a=new Set(t?.clips.filter(r=>!!r.media&&!F(r.media)).map(r=>r.contextItemId));return e.filter(r=>!n.has(r.id)&&!a.has(r.id))}async function Jr({workspaceId:e,agentId:t,evidence:n,clickedItems:a,sendItems:r,clickedPayload:s,binding:i,service:o,current:l,onRecord:c,timing:d}){const u=()=>{if(!l()||!G(i))throw new O("validate","media-send-retired")};if(u(),n?.images.some(w=>w.mediaError)||n?.clips.some(w=>w.mediaError))throw new O("validate","invalid-saved-edit");const h=w=>!!w.media&&!F(w.media),p=n?{workspaceId:e,agentId:t,appUrl:`intent://local/workspace/${encodeURIComponent(e)}`,clipAttachmentIds:Object.fromEntries(n.clips.map(w=>[w.id,a.find(M=>M.id===w.contextItemId)?.attachmentId??null]))}:null;for(const w of n?.clips??[]){if(!w.media||!F(w.media))continue;const M=a.find(Q=>Q.id===w.contextItemId);if(!M||M.attachmentId!==w.media.source.attachmentId||M.path!==w.media.source.path||M.placementStatus!==void 0&&M.placementStatus!=="placed")throw new O("validate","legacy-original-unavailable")}const m=n?await ua(e,n,i,o,l,d):{images:{},files:[],frames:[],framePromptBytes:[],metadata:[]},y=new Set(n?.clips.filter(w=>h(w)||!!w.media&&F(w.media)).map(w=>w.id)),f=new Set(n?.clips.filter(w=>y.has(w.id)).flatMap(w=>(w.captureHistory??[]).map(M=>M.image.id))),k=(n?.images??[]).filter(w=>w.source!=="annotate"||!!w.media||!f.has(w.id)||n.marks.some(M=>M.imageId===w.id&&!(M.clipId&&y.has(M.clipId))));d?.stage("burn");let v=[];try{v=n?await Sa({...n,images:k},a,m.images):[]}catch(w){throw new O("burn",ie(w))}if(m.framePromptBytes.reduce((w,M)=>w+(M??0),0)>Hn)throw new O("validate","image-budget-exceeded");const S=new Set(n?.images.filter(w=>w.media).map(w=>w.id)),_=n?{...n,images:k.map(w=>m.images[w.id]?{...w,width:m.images[w.id].width,height:m.images[w.id].height}:w),clips:n.clips.filter(w=>!h(w)),marks:n.marks.filter(w=>!S.has(w.imageId)&&!n.clips.some(M=>h(M)&&M.id===w.clipId))}:null;u();const B=m.metadata.some(w=>typeof w.transcript=="string"&&w.transcript.trim());if(!s.text.trim()&&!r.length&&!s.workspaceContextStr?.trim()&&!v.length&&!m.files.length&&!m.frames.length&&!s.imageBlocks?.length&&!s.fileBlocks?.length&&!B)return null;let E=v,P=null;d?.stage("placement");const xe=n?await pt(i):null;if(u(),n&&(e!==be||xe?.chiefAttachments)){const w=await ca({workspaceId:e,binding:i,images:k.map((M,Q)=>{const X=a.find(Ct=>Ct.id===M.contextItemId);return{image:M,signature:Gt(n,M.id),composite:{base64:v[Q].data,mimeType:v[Q].mimeType},raw:!M.media&&X?.imageData&&X.imageMimeType?{base64:X.imageData,mimeType:X.imageMimeType}:null}}),records:n?.placements??{},onRecord:c});u(),E=w.map(M=>({type:"image",attachmentId:M.composite.attachmentId,mimeType:M.composite.mimeType})),P=Object.fromEntries(w.map(M=>[M.imageId,{attachmentId:M.composite.attachmentId,raw:M.raw}]))}const g=new Map(n?Xe(n).map(({n:w,mark:M})=>[M.id,w]):[]),D=p&&P?{...p,imageAttachments:P,markNumbers:g}:p&&{...p,markNumbers:g},U=n&&D?{...s,imageBlocks:[...E,...m.frames,...s.imageBlocks??[]],fileBlocks:[...s.fileBlocks??[],...m.files],workspaceContextStr:[Yt(_,D),m.metadata.length?`[Edited capture outputs]
|
|
3
3
|
${JSON.stringify(m.metadata)}`:"",s.workspaceContextStr].filter(Boolean).join(`
|
|
4
4
|
|
|
5
5
|
`),messageMetadata:{...s.messageMetadata,...Jt(_,D),edited_captures:m.metadata}}:s;return u(),U}async function Sa(e,t,n={}){const a=Xe(e);return Promise.all(e.images.map(async r=>{if(n[r.id])return{type:"image",...n[r.id]};const s=t.find(o=>o.id===r.contextItemId);if(!s?.imageData||!s.imageMimeType)throw new Error("dock-evidence-missing-pixels");const i=await va({base64:s.imageData,mimeType:s.imageMimeType},r,a.filter(({mark:o})=>o.imageId===r.id));return{type:"image",data:i.base64,mimeType:i.mimeType}}))}function Ma(){return et()}function Yr(e){const{clip:t}=e;if(t.status!=="ready"||!t.path)return null;const n=e.marks.filter(s=>s.clipId===t.id&&typeof s.clipMs=="number").sort((s,i)=>s.clipMs-i.clipMs).map(s=>({id:s.id,tool:s.tool,atMs:s.clipMs,...s.element?.name?{label:s.element.name.slice(0,200)}:{}})),a=Qt(e.evidence??void 0,t.id),r=a?t.media:void 0;return{kind:"recording",workspaceId:e.workspaceId,agentId:e.agentId,attachmentId:a?.attachmentId??t.id,sourceRevision:a?`${a.id}:${a.revision}`:t.path,attachmentPath:t.path,title:"",durationMs:t.durationMs,marks:n,provenance:a?{...a.audio==="unknown"?{}:{hasMicAudio:a.audio==="available"},visuals:a.visuals}:{hasMicAudio:t.hasMicAudio,visuals:n.length>0?"baked-marks":"clean"},...a&&r?{source:a,saved:r.saved??null,transcript:r.transcript??null}:{}}}async function Qr(e){if(!Ma())return{ok:!1,error:"unavailable"};try{return await sn().invoke(rn.OPEN,e)??{ok:!1,error:"unavailable"}}catch{return{ok:!1,error:"transport"}}}function Xr(e){let t=null,n=null;const a=o=>e.releaseMediaJob?.(o).catch(()=>{});function r(){const o=t;t=null,!(!o||o.taken||o.stopped)&&(o.stopped=!0,clearTimeout(o.timer),a(o.id))}function s(o,l,c){if(t?.key===o||n===o||(r(),n=null,!e.adoptMediaJob||!e.exportMedia||!c()||F(l)))return;const d=structuredClone(l),u=d.saved??re(d.source,d.source.capturedMarks??[],d.transcript),h=ve(u,d.source,d.transcript);if(d.source.kind!=="recording"||d.source.visuals!=="clean"||h.errors.length||!h.clips.length||u.voice==="transcript"&&d.transcript?.status!=="ready")return;const p={...d,saved:u},m=crypto.randomUUID(),y={key:o,mediaKey:JSON.stringify(p),id:m,current:c,taken:!1,stopped:!1,settled:!1,failed:!1,timer:setTimeout(()=>{t===y&&(n=o,r())},3e4),result:Promise.resolve({error:new Error("not-started")})};t=y,y.result=ot(p,m,e,()=>!y.stopped&&y.current()).then(async f=>y.stopped||!y.current()?(await a(m),{error:new Error("media-send-retired")}):{value:f},async f=>(y.failed=!0,t===y&&(n=o),await a(m),{error:f})).finally(()=>{y.settled=!0})}async function i(o,l,c){const d=t;if(!d||d.key!==o||d.mediaKey!==JSON.stringify(l)||d.stopped||d.taken||!c())return null;if(d.failed&&d.settled)return r(),null;d.taken=!0,d.current=c,clearTimeout(d.timer),t=null;const u=await d.result;if("error"in u)throw u.error;try{if(!c())throw new Error("media-send-retired");const h=await e.adoptMediaJob?.(d.id);if(!c())throw new Error("media-send-retired");return!h?.ok||!h.value?(await a(d.id),null):u.value}catch(h){throw await a(d.id),h}}return{warm:s,take:i,cancel:r}}function Zr(e={}){const t=a=>on(a,typeof e=="function"?e():e),n=a=>bn(t(a));return{actionHints:{get capture(){return{label:b.dock_composer_screenshotAction_label(),shortcut:t("dock.capture")}},get record(){return{label:b.ui_shortcuts_dockRecord_label(),shortcut:t("dock.record")}},get dictate(){return{label:b.dock_shortcut_dictate_label()}}},get capture(){return b.dock_composer_capture_tooltip({shortcut:n("dock.capture")})},captureMode:{get window(){return b.dock_composer_captureWindow_tooltip({shortcut:n("dock.capture")})},get region(){return b.dock_composer_captureRegion_tooltip({shortcut:n("dock.capture")})}},captureModes:{fullscreen:b.dock_composer_captureFullscreen_label(),window:b.dock_composer_captureWindow_label(),region:b.dock_composer_captureRegion_label()},captureOptions:b.dock_composer_captureModes_ariaLabel(),captureLimit:b.dock_composer_captureLimit_tooltip(),clipLimit:b.dock_composer_clipLimit_tooltip({limit:q(ae.clips)}),get record(){return b.dock_composer_record_tooltip({shortcut:n("dock.record")})},stopRecording:b.dock_composer_stopRecording_tooltip(),annotationTools:b.annotation_toolbar_ariaLabel(),annotateCurrent:a=>b.dock_composer_annotate_ariaLabel({tool:a}),tools:{pick:b.dock_composer_pick_label(),box:b.dock_composer_box_label(),pen:b.dock_composer_pen_label(),arrow:b.annotation_arrow_label()},get dictate(){return b.dock_shortcut_dictate_label()},stopDictating:b.dock_composer_stopDictating_tooltip(),annotating:b.dock_composer_annotating_status(),recording:b.dock_composer_recording_status(),markUp:b.dock_composer_markUp_label(),remove:b.chat_contextChip_remove_label(),play:b.dock_composer_play_label(),edit:b.dock_composer_edit_label(),done:b.dock_composer_done_label(),attachments:b.context_attachments_title_label(),retry:b.chat_shared_retry_label(),attachmentPending:b.dock_composer_attachmentPending_status(),attachmentFailed:b.dock_composer_attachmentFailed_error(),image:a=>b.dock_composer_image_ariaLabel({n:q(a)}),clip:a=>b.dock_composer_clip_ariaLabel({duration:a}),recordingReference:(a,r)=>r?b.dock_composer_recordingEnd_chip({n:q(a)}):b.dock_composer_recordingStart_chip({n:q(a)}),speechError:a=>a.includes("permission")?b.dock_composer_speechPermission_error():["unsupported-platform","helper-missing","recognizer-unavailable","locale-unsupported","assets-unavailable","unavailable"].includes(a)?b.dock_composer_speechUnavailable_error():b.dock_composer_speechFailed_error()}}function es(e,t){return{enabled:e,limit:ae.files,excludedIds:t,unavailableMessage:b.dock_composer_filesUnavailable_error(),limitMessage:b.dock_composer_fileLimit_error({limit:q(ae.files)})}}function Aa(e){try{return new URL(e.pageUrl).hostname||e.pageUrl}catch{return e.pageUrl}}function ts(e,t){return e.targetAgentId===t}function ns(e){const t=e.element,n=e.viewport,a=Aa(e),r=t?`<${t.tagName.toLowerCase()}> · ${a}`:e.title||a,s=["<browser-element-capture>",`Page URL: ${e.pageUrl}`,`Page title: ${e.title}`,...t?[`DOM path: ${t.domPath}`,`CSS selector: ${t.selector}`,`Text snippet: ${t.textSnippet}`,...t.sourceRef?[`Source ref: ${t.sourceRef}`]:[],...n?[`Viewport: ${n.width}×${n.height}`]:[],`Element bounds: ${t.rect.width}×${t.rect.height} at (${t.rect.x}, ${t.rect.y})`]:[],"</browser-element-capture>"].join(`
|
|
@@ -8,5 +8,5 @@ ${JSON.stringify(m.metadata)}`:"",s.workspaceContextStr].filter(Boolean).join(`
|
|
|
8
8
|
\`\`\`
|
|
9
9
|
${i}
|
|
10
10
|
\`\`\`]`)}return Ia(a.join(`
|
|
11
|
-
`),e)}function as(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const a=n(),{imageBlocks:r,fileBlocks:s}=Ta(a.contextItems);return{fields:{contextItems:a.contextItems,workspaceContextStr:Ca(a.contextItems,a.checkedPanels,a.checkedSelections),noteIds:a.noteIds,...r.length>0?{imageBlocks:r}:{},...s.length>0?{fileBlocks:s}:{},...a.pickedMentions?{messageMetadata:a.pickedMentions}:{}},hasAttachments:r.length>0||s.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}const Ea="chat-read:",K=new Map,ye=new Set;function rs(e,t){let n=K.get(e);n||(n=new Set,K.set(e,n)),n.add(t)}function ss(e,t){const n=K.get(e);if(!(!n||!n.delete(t))&&n.size===0){K.delete(e);for(const a of[...ye])a(e)}}function is(e){return ye.add(e),()=>ye.delete(e)}function os(e){return K.has(e)}function cs(e){const t=K.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Ea))return!0;return!1}function Da(e,t,n){const a=e.state.pendingSubmissions.byAgentId[t.agentId];if(!a||!Ge(a.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(xt(t,r));const s=e.state.pendingSubmissions.byAgentId[t.agentId];return s&&R(s.submissions,r.id)?r:null}function Ra(e,t,n,a,r){const s=Be.select(e.state,n),i=pe.select(e.state)?.principal.id,o=Le(e.state);if(!s||!i||!o)return null;const l=An(t,n),c={agentId:t,workspaceId:n,principalId:i,participation:s,authority:o,owner:l.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},d=()=>l.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&Be.select(e.state,n)===s&&pe.select(e.state)?.principal.id===i&&Le(e.state)===o;if(!d())return null;e.dispatch(Rt(c,a,Ft.select(e.state,n)));const u=Da(e,c,r);return u?{scope:c,submission:u,isCurrent:()=>{const h=e.state.pendingSubmissions.byAgentId[t];return d()&&!!h&&Ge(h.scope,c)&&(!!R(h.operations,u.id)||!!R(h.submissions,u.id))}}:null}function we(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const a=n.userAppMessageId??In();return Ra(e,t,n.wsId,pe.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:a,destination:!n.forceSubmit&&Kt.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function xa(e,t,n){const a=we(e,t,n);return a?(e.dispatch(Je(t,{...n,userAppMessageId:a.submission.appMessageId,submission:{scope:a.scope,id:a.submission.id}})),!0):!1}async function Pa(e,t,n,a){const r=n.submission;if(!r)return"legacy";const s=r.reference,i=()=>s.scope.agentId===e&&s.scope.workspaceId===t&&Qe.select(A.state,e)===n?gn.select(A.state,s.scope):void 0,o=i();if(!o)return null;if(!o.supported)return"legacy";const l={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:a??n.options?.model};if(r.outcome==="rejected"){const p=R(o.tombstones,s.id);return R(o.submissions,s.id)||p&&p.reason!=="rejected"?null:we(A,e,l)}if(r.outcome==="accepted")return we(A,e,l);await Promise.all([Tn(e,t).catch(()=>{}),Cn(e,t).catch(()=>{})]);const c=i();if(!c||R(c.submissions,s.id)?.status!=="uncertain")return null;const{notify:d}=await fe(async()=>{const{notify:p}=await import("./ClcIbYyp.js").then(m=>m.u);return{notify:p}},__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]),import.meta.url);if(i()!==c)return null;let u=!1;const h=()=>{u=!0};return d.warning(b.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${s.id}`,duration:Number.POSITIVE_INFINITY,action:{label:b.agent_chatSend_resend_label(),onClick:()=>{if(u)return;u=!0;const p=i();!p||p.generation!==c.generation||p.submissions!==c.submissions||p.observationVersion!==c.observationVersion||R(p.submissions,s.id)?.status!=="uncertain"||xa(A,e,l)}},cancel:{label:b.chat_richInput_cancel_label(),onClick:h},onDismiss:h}),null}async function ls(e,t,n){const a=Qe.select(A.state,e),r=a?.submission?await Pa(e,t,a,n):"legacy";if(r){if(r==="legacy"){await A.dispatch(n===void 0?Pt(e,t):Bt(e,t,n));return}!r.isCurrent()||!a||A.dispatch(Je(e,{wsId:t,text:a.text,imageBlocks:a.options?.imageBlocks,fileBlocks:a.options?.fileBlocks,noteIds:a.options?.noteIds,messageMetadata:a.options?.messageMetadata,model:n??a.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const ds=A.createSelector((e,t)=>{const n=R(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:Ye(n.saves),shared:n.restore?e.chatDrafts.shared[JSON.stringify([n.restore.workspaceId,n.restore.agentId])]:void 0}:void 0});function Ba(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==ke.Deleted&&!t.notificationsMuted&&$t(t)==="topLevel"}function Oa(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!Rn(e.metadata,t)?t:null}function $a(e){return e.status===ke.Error&&!Wt(jt(e))}function us(e,t){return t.filter(n=>Ba(e,n)).flatMap(n=>{const a=Ot(n),r=Oa(n),s=n.status===ke.Error;if(!a&&!r&&!s)return[];const i=a?.timestamp??(s?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:a?.kind??(s?"failed":"question"),reason:a?.reason,timestamp:i&&Number.isFinite(Date.parse(i))?i:void 0,questionMessageId:r,canRetry:$a(n)}]})}function ms(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function ps(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function Te(e){const t=kn(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),a=t.repo.toLowerCase();return{owner:n,repo:a,number:t.number,id:`${n}/${a}#${t.number}`,url:`https://github.com/${n}/${a}/pull/${t.number}`}}function fs(e,t,n,a){const r=e.filter(s=>a?a.includes(s.id):n?s.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(i=>i.owner?.toLowerCase()===s.repositoryOwner?.toLowerCase()&&i.name.toLowerCase()===s.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(s=>[...(s.pullRequests??[]).map(i=>i.url),s.activePullRequest?.url,s.prUrl]).flatMap(s=>{const i=s?Te(s):null;return i?[[i.id,{owner:i.owner,repo:i.repo,number:i.number}]]:[]})).values()].sort((s,i)=>`${s.owner}/${s.repo}#${s.number}`.localeCompare(`${i.owner}/${i.repo}#${i.number}`))}function hs(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const gs=A.createSelector(e=>e.homeIntegrations),ys=A.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,a)=>(a.updatedAt??"").localeCompare(n.updatedAt??""))}}),gt=A.createSelector(e=>Ye(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:Te(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),ws=A.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?Te(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return gt.select(e).find(a=>a.url===n)??null}),bs=A.createSelector(e=>gt.select(e).map(t=>t.url));let ee=null;function ks(e){return ee=e,()=>{ee===e&&(ee=null)}}function vs(){return ee}function _s(e){return[...e.groups.length>0?e.groups.filter(n=>n.expanded).flatMap(n=>n.items):e.workspaces,...e.asideExpanded?e.aside:[]].map(n=>n.id)}function Ss(e,t,n){if(e.length===0)return null;const a=t===null?-1:e.indexOf(t);return a===-1?e[0]:e[a+(n==="clockwise"?1:-1)]??null}let te=null;function Ms(e){return te=e,()=>{te===e&&(te=null)}}function As(){return te}function Is(e){return Mn(e)}function La(e){return Sn(e)}function Ua(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function me(e){if(e.length===0)return[];const t=[];let n=null;for(const a of e){const r=a.timestamp?typeof a.timestamp=="string"?new Date(a.timestamp):a.timestamp:new Date;(!n||!Ua(n.date,r))&&(n={date:r,label:La(r),messages:[]},t.push(n)),n.messages.push(a)}return t}function Ts(e){const t=new Map;return e.map(({date:n})=>{const a=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(a)??0;return t.set(a,r+1),r===0?a:`${a}#${r}`})}function Cs(e,t){const n=new Map;let a=t?null:void 0;for(const r of e.groups)for(const s of r.messages)a!==void 0&&n.set(s.id,a),s.role==="user"&&!Pn(s)&&(a=s);return n}function Na(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function je(e,t){const n=new Map;return e.map(a=>{const r=`${t}-${Na(a.date)}`,s=(n.get(r)??0)+1;return n.set(r,s),{...a,groupKey:s===1?r:`${r}-${s}`}})}function Ha(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(s=>s.id)),a=new Set(t.map(s=>s.appMessageId).filter(s=>typeof s=="string"&&s.length>0)),r=e.filter(s=>!n.has(s.id)&&!(typeof s.appMessageId=="string"&&s.appMessageId.length>0&&a.has(s.appMessageId)));return r.length===e.length?e:r}function Es(e,t,n){return e=Ha(e,t),e.length===0?{groups:me(t),detached:!1,hiddenTail:[]}:n?{groups:je(me(e),"h"),detached:!0,hiddenTail:t}:{groups:je(me([...e,...t]),"d"),detached:!1,hiddenTail:[]}}function Ds(e){const{scrollTop:t,threshold:n,fetching:a,exhausted:r,historyCount:s,tailCount:i,tailTruncated:o,totalMessages:l,spacerAbove:c=0}=e;return t>n+c||a||r?!1:s>0||o||l>i+s}const Rs=300;function xs(e){const{fetching:t,chainEvaluationPending:n,visible:a,hideArmed:r}=e;return t||n?a&&!r?"none":"show":a&&!r?"arm-hide":"none"}const qe=24,Fa=320;function Ce(e){return Number.isFinite(e)?Math.min(Fa,Math.max(qe,e)):qe}const Ka=.2,Wa=.12;function ja(e,t,n=Ka){const a=Ce(t);return e===null||!Number.isFinite(e)?a:e+n*(a-e)}function Ps(e,t){const n=Ce(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function Bs(e){const{totalMessages:t,residentCount:n,exhausted:a,residentContentHeight:r,currentSpacerHeight:s,viewportHeight:i}=e;let o=e.rowHeightEma;n>0&&r>0&&(o=ja(o,r/n));const l=e.unloadedRows??t-n,d=a||t<=0||n<=0||l<=0||o===null?0:Math.round(l*o),u=Math.abs(d-s);return u===0?{spacerHeight:s,rowHeightEma:o,applied:!1,scrollTopDelta:0}:d===0||s===0||u>s*Wa||i>0&&u>i?{spacerHeight:d,rowHeightEma:o,applied:!0,scrollTopDelta:d-s}:{spacerHeight:s,rowHeightEma:o,applied:!1,scrollTopDelta:0}}const qa=xn,Va=2;function Os(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:a,pageSize:r=qa,nearPages:s=Va}=e;if(n<=0||t>=n)return"serial";const i=Ce(a??Number.NaN);return(n-Math.max(0,t))/i>s*r?"seek":"serial"}const yt=200,za=1;function $s(e,t,n=yt){const a=t.timestamp-n;return[...e.filter(r=>r.timestamp>=a),t]}function Ls(e){const{samples:t,viewportHeight:n,windowMs:a=yt,viewportFactor:r=za}=e;if(n<=0||t.length<2)return"gentle";const s=t[t.length-1].timestamp-a,i=t.filter(l=>l.timestamp>=s);if(i.length<2)return"gentle";let o=0;for(let l=1;l<i.length;l+=1)o+=Math.abs(i[l].scrollTop-i[l-1].scrollTop);return o>n*r?"rapid":"gentle"}function Us(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:a}=e;if(a<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(a-1,Math.max(0,Math.floor(r*a)))}function Ns(e){const{totalMessages:t,residentCount:n,exhausted:a,startOrdinalEstimate:r,detachedFromTail:s}=e,i=Math.max(0,t-n);if(!s)return{above:a?0:i,below:0};const o=Math.max(0,e.hiddenTailCount??0);if(a)return{above:0,below:i+o};if(r!==null){const c=Math.min(i,Math.max(0,Math.round(r)));return{above:c,below:i-c+o}}const l=Math.min(i,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:i-l,below:l+o}}function Hs(e){const{exhausted:t,historyCount:n,tailCount:a,tailTruncated:r,totalMessages:s}=e;return t?!0:n>0?!1:!r&&s<=a}const Ga="intent.drafts.sync",Ja="intent.drafts.changed",Ya=$({id:C(),type:C(),label:C(),description:C().optional(),content:C().optional(),path:C().optional(),imageData:C().optional(),imageMimeType:C().optional(),attachmentId:C().optional(),attachmentMimeType:C().optional(),attachmentSize:ce().optional(),sourcePath:C().optional(),placementStatus:V("failed").optional(),screen:Bn().optional()}),wt=$({text:C(),attachments:On(Ya)}),z={provenance:C().min(1),workspaceId:C().min(1),agentId:C().min(1)},ne={lifetime:C(),revision:ce().int().nonnegative()};$n("kind",[$({...z,kind:V("read")}),$({...z,...ne,kind:V("edit"),origin:C().min(1),sequence:ce().int().positive(),snapshot:wt}),$({...z,...ne,kind:V("flush")}),$({...z,...ne,kind:V("clear"),origin:C().min(1)})]);const bt=$({...z,...ne,origin:C(),sequence:ce().int().nonnegative(),snapshot:wt}),Qa=$({accepted:Ln(),draft:bt});function Xa(e,t,n=t){const a=new Map,r=new Set,s=crypto.randomUUID();let i=0,o=!1;const l=()=>{const f=t();if(o||!f)throw new Error("draft-authority-unavailable");return f},c=()=>{const f=n();if(!f||o)throw new Error("draft-authority-unavailable");return()=>{if(o||n()!==f)throw new Error("draft-authority-changed")}},d=(f,k,v)=>{const I=JSON.stringify([f,k,v]);let S=a.get(I);return S||(S={dirty:0},a.set(I,S)),S},u=(f,k)=>{if(o||f.provenance!==t())return;const v=d(f.provenance,f.workspaceId,f.agentId);if(!(v.value?.lifetime===f.lifetime&&v.value.revision>f.revision)&&(v.value=f,k&&v.dirty===0))for(const I of r)I(f)},h=e.subscribe(f=>{const k=bt.safeParse(f);k.success&&u(k.data,!0)}),p=async(f,k)=>{k();const v=Qa.parse(await e.request(f));if(k(),f.provenance!==l()||v.draft.provenance!==f.provenance)throw new Error("draft-authority-changed");if(!v.accepted)throw u(v.draft,!1),new Error("draft-changed-in-another-editor");return v.draft},m=async(f,k)=>{const v=l(),I=c(),S=d(v,f,k);S.tail&&await S.tail;const _=await p({kind:"read",provenance:v,workspaceId:f,agentId:k},I);return u(_,!1),_},y=(f,k,v)=>{const I=l(),S=c(),_=d(I,f,k),B=_.tail??(_.value?Promise.resolve(_.value):p({kind:"read",provenance:I,workspaceId:f,agentId:k},S));_.dirty+=1;const E=B.then(P=>p(v(P),S));return _.tail=E,E.then(P=>{_.dirty-=1,_.tail===E&&(_.tail=void 0),u(P,!0)},()=>{_.dirty-=1,_.tail===E&&(_.tail=void 0)}),E};return{authority:()=>o?null:n(),read:m,async edit(f,k,v,I){const S=++i;return y(k,v,_=>({kind:"edit",provenance:_.provenance,workspaceId:k,agentId:v,lifetime:_.lifetime,revision:_.revision,origin:f,sequence:S,snapshot:I}))},async flush(f,k){const v=l(),I=c(),S=d(v,f,k),_=await(S.tail??(S.value?Promise.resolve(S.value):m(f,k)));await p({kind:"flush",provenance:v,workspaceId:f,agentId:k,lifetime:_.lifetime,revision:_.revision},I)},async clear(f,k){await y(f,k,v=>({kind:"clear",provenance:v.provenance,workspaceId:f,agentId:k,lifetime:v.lifetime,revision:v.revision,origin:s}))},subscribe(f){return r.add(f),()=>{r.delete(f)}},dispose(){o=!0,h(),r.clear(),a.clear()}}}let L=null;async function Fs(e,t,n,a,r){const s=L;if(!s)throw new Error("draft-shared-transport-unavailable");const i=()=>{if(L!==s||s.authority()!==r)throw new Error("draft-authority-changed")};i(),await s.edit(e,t,n,a),i(),await s.flush(t,n),i()}async function Ks(e,t){await Promise.resolve(),L&&await L.flush(e,t)}function Ws(){if(!et())return null;const e=Xa({request:n=>_n(Ga,n),subscribe:n=>vn(a=>{a.method===Ja&&n(a.params)})},()=>En(A.state),()=>Dn(A.state));L=e;const t=e.dispose;return e.dispose=()=>{L===e&&(L=null),t()},e}const kt=new Map;function vt(e,t){return`${e}\0${t}`}function js(e,t){return kt.get(vt(e,t))}function qs(e,t,n){kt.set(vt(e,t),n)}const Vs=A.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.userMessageIndexes,n):void 0}),zs=A.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.retryAgents,n):void 0});function Za(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const s=e/1e3,i=s.toFixed(1);return i.endsWith(".0")?`${Math.round(s)}s`:`${i}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),a=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${a}m ${r}s`:`${a}m ${r}s`}function Gs(e){return Za(Math.max(1e3,Math.round(e/1e3)*1e3))}const er=new Set(["launch","init","session-create","session-load","prompt"]),tr=new Set(["tool-call","tool-waiting"]);function nr(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function Js(e){return e&&er.has(e)?"pulse":e&&tr.has(e)?"twist":"bloom"}const _t="stalled";function Ys(e,t){const n=nr(e);return!n||n.phase!==_t||typeof t=="number"&&t>n.timestamp?null:n}function Qs(e){let t=null;for(const n of e)n.phase!==_t&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const Ve={get title(){return b.chat_streamingStatus_sessionCorrupted_title()},get message(){return b.chat_streamingStatus_sessionCorrupted_message()}},ar=/^session\/[a-z_]+(?: failed)?:\s*/i;function rr(e){const n=(e.split(`
|
|
12
|
-
`).map(a=>a.trim()).find(Boolean)??"").replace(ar,"");return n.charAt(0).toUpperCase()+n.slice(1)}function Xs(e,t){return e?t===!0?{corrupted:!0,title:Ve.title,message:Ve.message,detail:e}:{corrupted:!1,title:b.chat_streamingStatus_responseFailed_label(),message:rr(e),detail:null}:null}const Zs=A.createSelector((e,t)=>R(e.questionUi.consumers,t)),sr=3e4,J=new Map;function ei(e,t){const n=J.get(e);n&&clearTimeout(n.timer);const a=setTimeout(()=>J.delete(e),sr);J.set(e,{value:t,timer:a})}function ti(e){const t=J.get(e);if(t)return clearTimeout(t.timer),J.delete(e),t.value}const St=A.createSelector((e,t,n)=>e.agentWorkers?.byKey[Ut(t,n)]??Lt),ir=A.createSelector((e,t,n)=>{const a=St.select(e,t,n);return a.status==="unsupported"?[]:(a.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),ni=A.createSelector((e,t,n)=>{const a=St.select(e,t,n);return a.status==="failed"?!0:a.status!=="ready"||!a.snapshot?!1:a.snapshot.truncated?!0:a.snapshot.support.status!=="supported"&&ir.select(e,t,n).length>0}),or=1e3,Mt={requireViewedAndFocused:!0,requireAssistantTail:!0},Y=new Map,x=new Map;let W=null;function Ee(e){(e===void 0||W===e)&&(W=null)}const cr=200;function lr(e,t){if(x.delete(e),x.set(e,t),x.size>cr){const n=x.keys().next().value;n!==void 0&&x.delete(n)}}function At(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function ai(e){return At(e)?.id??null}function ri(e){De(e,{requireViewedAndFocused:!0})}function si(e){De(e,{requireViewedAndFocused:!1})}function ii(e){Ee(),De(e,Mt)}function oi(e){W===e&&(Y.has(e)||(W=null,Re(e,Mt)))}function ci(e){for(const t of e)typeof t!="string"||t.length===0||(It(t),Ee(t),Re(t,{requireViewedAndFocused:!1}))}function It(e){const t=Y.get(e);t&&(clearTimeout(t.timer),Y.delete(e))}function De(e,t){It(e),Ee(e);const n=setTimeout(()=>{Y.delete(e),Re(e,t)},or);Y.set(e,{timer:n,gates:t})}let ze=null;function dr(){return ze??=Promise.all([fe(()=>import("./
|
|
11
|
+
`),e)}function as(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const a=n(),{imageBlocks:r,fileBlocks:s}=Ta(a.contextItems);return{fields:{contextItems:a.contextItems,workspaceContextStr:Ca(a.contextItems,a.checkedPanels,a.checkedSelections),noteIds:a.noteIds,...r.length>0?{imageBlocks:r}:{},...s.length>0?{fileBlocks:s}:{},...a.pickedMentions?{messageMetadata:a.pickedMentions}:{}},hasAttachments:r.length>0||s.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}const Ea="chat-read:",K=new Map,ye=new Set;function rs(e,t){let n=K.get(e);n||(n=new Set,K.set(e,n)),n.add(t)}function ss(e,t){const n=K.get(e);if(!(!n||!n.delete(t))&&n.size===0){K.delete(e);for(const a of[...ye])a(e)}}function is(e){return ye.add(e),()=>ye.delete(e)}function os(e){return K.has(e)}function cs(e){const t=K.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Ea))return!0;return!1}function Da(e,t,n){const a=e.state.pendingSubmissions.byAgentId[t.agentId];if(!a||!Ge(a.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(xt(t,r));const s=e.state.pendingSubmissions.byAgentId[t.agentId];return s&&R(s.submissions,r.id)?r:null}function Ra(e,t,n,a,r){const s=Be.select(e.state,n),i=pe.select(e.state)?.principal.id,o=Le(e.state);if(!s||!i||!o)return null;const l=An(t,n),c={agentId:t,workspaceId:n,principalId:i,participation:s,authority:o,owner:l.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},d=()=>l.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&Be.select(e.state,n)===s&&pe.select(e.state)?.principal.id===i&&Le(e.state)===o;if(!d())return null;e.dispatch(Rt(c,a,Ft.select(e.state,n)));const u=Da(e,c,r);return u?{scope:c,submission:u,isCurrent:()=>{const h=e.state.pendingSubmissions.byAgentId[t];return d()&&!!h&&Ge(h.scope,c)&&(!!R(h.operations,u.id)||!!R(h.submissions,u.id))}}:null}function we(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const a=n.userAppMessageId??In();return Ra(e,t,n.wsId,pe.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:a,destination:!n.forceSubmit&&Kt.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function xa(e,t,n){const a=we(e,t,n);return a?(e.dispatch(Je(t,{...n,userAppMessageId:a.submission.appMessageId,submission:{scope:a.scope,id:a.submission.id}})),!0):!1}async function Pa(e,t,n,a){const r=n.submission;if(!r)return"legacy";const s=r.reference,i=()=>s.scope.agentId===e&&s.scope.workspaceId===t&&Qe.select(A.state,e)===n?gn.select(A.state,s.scope):void 0,o=i();if(!o)return null;if(!o.supported)return"legacy";const l={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:a??n.options?.model};if(r.outcome==="rejected"){const p=R(o.tombstones,s.id);return R(o.submissions,s.id)||p&&p.reason!=="rejected"?null:we(A,e,l)}if(r.outcome==="accepted")return we(A,e,l);await Promise.all([Tn(e,t).catch(()=>{}),Cn(e,t).catch(()=>{})]);const c=i();if(!c||R(c.submissions,s.id)?.status!=="uncertain")return null;const{notify:d}=await fe(async()=>{const{notify:p}=await import("./DZtCGZgy.js").then(m=>m.u);return{notify:p}},__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]),import.meta.url);if(i()!==c)return null;let u=!1;const h=()=>{u=!0};return d.warning(b.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${s.id}`,duration:Number.POSITIVE_INFINITY,action:{label:b.agent_chatSend_resend_label(),onClick:()=>{if(u)return;u=!0;const p=i();!p||p.generation!==c.generation||p.submissions!==c.submissions||p.observationVersion!==c.observationVersion||R(p.submissions,s.id)?.status!=="uncertain"||xa(A,e,l)}},cancel:{label:b.chat_richInput_cancel_label(),onClick:h},onDismiss:h}),null}async function ls(e,t,n){const a=Qe.select(A.state,e),r=a?.submission?await Pa(e,t,a,n):"legacy";if(r){if(r==="legacy"){await A.dispatch(n===void 0?Pt(e,t):Bt(e,t,n));return}!r.isCurrent()||!a||A.dispatch(Je(e,{wsId:t,text:a.text,imageBlocks:a.options?.imageBlocks,fileBlocks:a.options?.fileBlocks,noteIds:a.options?.noteIds,messageMetadata:a.options?.messageMetadata,model:n??a.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const ds=A.createSelector((e,t)=>{const n=R(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:Ye(n.saves),shared:n.restore?e.chatDrafts.shared[JSON.stringify([n.restore.workspaceId,n.restore.agentId])]:void 0}:void 0});function Ba(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==ke.Deleted&&!t.notificationsMuted&&$t(t)==="topLevel"}function Oa(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!Rn(e.metadata,t)?t:null}function $a(e){return e.status===ke.Error&&!Wt(jt(e))}function us(e,t){return t.filter(n=>Ba(e,n)).flatMap(n=>{const a=Ot(n),r=Oa(n),s=n.status===ke.Error;if(!a&&!r&&!s)return[];const i=a?.timestamp??(s?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:a?.kind??(s?"failed":"question"),reason:a?.reason,timestamp:i&&Number.isFinite(Date.parse(i))?i:void 0,questionMessageId:r,canRetry:$a(n)}]})}function ms(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function ps(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function Te(e){const t=kn(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),a=t.repo.toLowerCase();return{owner:n,repo:a,number:t.number,id:`${n}/${a}#${t.number}`,url:`https://github.com/${n}/${a}/pull/${t.number}`}}function fs(e,t,n,a){const r=e.filter(s=>a?a.includes(s.id):n?s.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(i=>i.owner?.toLowerCase()===s.repositoryOwner?.toLowerCase()&&i.name.toLowerCase()===s.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(s=>[...(s.pullRequests??[]).map(i=>i.url),s.activePullRequest?.url,s.prUrl]).flatMap(s=>{const i=s?Te(s):null;return i?[[i.id,{owner:i.owner,repo:i.repo,number:i.number}]]:[]})).values()].sort((s,i)=>`${s.owner}/${s.repo}#${s.number}`.localeCompare(`${i.owner}/${i.repo}#${i.number}`))}function hs(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const gs=A.createSelector(e=>e.homeIntegrations),ys=A.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,a)=>(a.updatedAt??"").localeCompare(n.updatedAt??""))}}),gt=A.createSelector(e=>Ye(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:Te(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),ws=A.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?Te(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return gt.select(e).find(a=>a.url===n)??null}),bs=A.createSelector(e=>gt.select(e).map(t=>t.url));let ee=null;function ks(e){return ee=e,()=>{ee===e&&(ee=null)}}function vs(){return ee}function _s(e){return[...e.groups.length>0?e.groups.filter(n=>n.expanded).flatMap(n=>n.items):e.workspaces,...e.asideExpanded?e.aside:[]].map(n=>n.id)}function Ss(e,t,n){if(e.length===0)return null;const a=t===null?-1:e.indexOf(t);return a===-1?e[0]:e[a+(n==="clockwise"?1:-1)]??null}let te=null;function Ms(e){return te=e,()=>{te===e&&(te=null)}}function As(){return te}function Is(e){return Mn(e)}function La(e){return Sn(e)}function Ua(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function me(e){if(e.length===0)return[];const t=[];let n=null;for(const a of e){const r=a.timestamp?typeof a.timestamp=="string"?new Date(a.timestamp):a.timestamp:new Date;(!n||!Ua(n.date,r))&&(n={date:r,label:La(r),messages:[]},t.push(n)),n.messages.push(a)}return t}function Ts(e){const t=new Map;return e.map(({date:n})=>{const a=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(a)??0;return t.set(a,r+1),r===0?a:`${a}#${r}`})}function Cs(e,t){const n=new Map;let a=t?null:void 0;for(const r of e.groups)for(const s of r.messages)a!==void 0&&n.set(s.id,a),s.role==="user"&&!Pn(s)&&(a=s);return n}function Na(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function je(e,t){const n=new Map;return e.map(a=>{const r=`${t}-${Na(a.date)}`,s=(n.get(r)??0)+1;return n.set(r,s),{...a,groupKey:s===1?r:`${r}-${s}`}})}function Ha(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(s=>s.id)),a=new Set(t.map(s=>s.appMessageId).filter(s=>typeof s=="string"&&s.length>0)),r=e.filter(s=>!n.has(s.id)&&!(typeof s.appMessageId=="string"&&s.appMessageId.length>0&&a.has(s.appMessageId)));return r.length===e.length?e:r}function Es(e,t,n){return e=Ha(e,t),e.length===0?{groups:me(t),detached:!1,hiddenTail:[]}:n?{groups:je(me(e),"h"),detached:!0,hiddenTail:t}:{groups:je(me([...e,...t]),"d"),detached:!1,hiddenTail:[]}}function Ds(e){const{scrollTop:t,threshold:n,fetching:a,exhausted:r,historyCount:s,tailCount:i,tailTruncated:o,totalMessages:l,spacerAbove:c=0}=e;return t>n+c||a||r?!1:s>0||o||l>i+s}const Rs=300;function xs(e){const{fetching:t,chainEvaluationPending:n,visible:a,hideArmed:r}=e;return t||n?a&&!r?"none":"show":a&&!r?"arm-hide":"none"}const qe=24,Fa=320;function Ce(e){return Number.isFinite(e)?Math.min(Fa,Math.max(qe,e)):qe}const Ka=.2,Wa=.12;function ja(e,t,n=Ka){const a=Ce(t);return e===null||!Number.isFinite(e)?a:e+n*(a-e)}function Ps(e,t){const n=Ce(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function Bs(e){const{totalMessages:t,residentCount:n,exhausted:a,residentContentHeight:r,currentSpacerHeight:s,viewportHeight:i}=e;let o=e.rowHeightEma;n>0&&r>0&&(o=ja(o,r/n));const l=e.unloadedRows??t-n,d=a||t<=0||n<=0||l<=0||o===null?0:Math.round(l*o),u=Math.abs(d-s);return u===0?{spacerHeight:s,rowHeightEma:o,applied:!1,scrollTopDelta:0}:d===0||s===0||u>s*Wa||i>0&&u>i?{spacerHeight:d,rowHeightEma:o,applied:!0,scrollTopDelta:d-s}:{spacerHeight:s,rowHeightEma:o,applied:!1,scrollTopDelta:0}}const qa=xn,Va=2;function Os(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:a,pageSize:r=qa,nearPages:s=Va}=e;if(n<=0||t>=n)return"serial";const i=Ce(a??Number.NaN);return(n-Math.max(0,t))/i>s*r?"seek":"serial"}const yt=200,za=1;function $s(e,t,n=yt){const a=t.timestamp-n;return[...e.filter(r=>r.timestamp>=a),t]}function Ls(e){const{samples:t,viewportHeight:n,windowMs:a=yt,viewportFactor:r=za}=e;if(n<=0||t.length<2)return"gentle";const s=t[t.length-1].timestamp-a,i=t.filter(l=>l.timestamp>=s);if(i.length<2)return"gentle";let o=0;for(let l=1;l<i.length;l+=1)o+=Math.abs(i[l].scrollTop-i[l-1].scrollTop);return o>n*r?"rapid":"gentle"}function Us(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:a}=e;if(a<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(a-1,Math.max(0,Math.floor(r*a)))}function Ns(e){const{totalMessages:t,residentCount:n,exhausted:a,startOrdinalEstimate:r,detachedFromTail:s}=e,i=Math.max(0,t-n);if(!s)return{above:a?0:i,below:0};const o=Math.max(0,e.hiddenTailCount??0);if(a)return{above:0,below:i+o};if(r!==null){const c=Math.min(i,Math.max(0,Math.round(r)));return{above:c,below:i-c+o}}const l=Math.min(i,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:i-l,below:l+o}}function Hs(e){const{exhausted:t,historyCount:n,tailCount:a,tailTruncated:r,totalMessages:s}=e;return t?!0:n>0?!1:!r&&s<=a}const Ga="intent.drafts.sync",Ja="intent.drafts.changed",Ya=$({id:C(),type:C(),label:C(),description:C().optional(),content:C().optional(),path:C().optional(),imageData:C().optional(),imageMimeType:C().optional(),attachmentId:C().optional(),attachmentMimeType:C().optional(),attachmentSize:ce().optional(),sourcePath:C().optional(),placementStatus:V("failed").optional(),screen:Bn().optional()}),wt=$({text:C(),attachments:On(Ya)}),z={provenance:C().min(1),workspaceId:C().min(1),agentId:C().min(1)},ne={lifetime:C(),revision:ce().int().nonnegative()};$n("kind",[$({...z,kind:V("read")}),$({...z,...ne,kind:V("edit"),origin:C().min(1),sequence:ce().int().positive(),snapshot:wt}),$({...z,...ne,kind:V("flush")}),$({...z,...ne,kind:V("clear"),origin:C().min(1)})]);const bt=$({...z,...ne,origin:C(),sequence:ce().int().nonnegative(),snapshot:wt}),Qa=$({accepted:Ln(),draft:bt});function Xa(e,t,n=t){const a=new Map,r=new Set,s=crypto.randomUUID();let i=0,o=!1;const l=()=>{const f=t();if(o||!f)throw new Error("draft-authority-unavailable");return f},c=()=>{const f=n();if(!f||o)throw new Error("draft-authority-unavailable");return()=>{if(o||n()!==f)throw new Error("draft-authority-changed")}},d=(f,k,v)=>{const I=JSON.stringify([f,k,v]);let S=a.get(I);return S||(S={dirty:0},a.set(I,S)),S},u=(f,k)=>{if(o||f.provenance!==t())return;const v=d(f.provenance,f.workspaceId,f.agentId);if(!(v.value?.lifetime===f.lifetime&&v.value.revision>f.revision)&&(v.value=f,k&&v.dirty===0))for(const I of r)I(f)},h=e.subscribe(f=>{const k=bt.safeParse(f);k.success&&u(k.data,!0)}),p=async(f,k)=>{k();const v=Qa.parse(await e.request(f));if(k(),f.provenance!==l()||v.draft.provenance!==f.provenance)throw new Error("draft-authority-changed");if(!v.accepted)throw u(v.draft,!1),new Error("draft-changed-in-another-editor");return v.draft},m=async(f,k)=>{const v=l(),I=c(),S=d(v,f,k);S.tail&&await S.tail;const _=await p({kind:"read",provenance:v,workspaceId:f,agentId:k},I);return u(_,!1),_},y=(f,k,v)=>{const I=l(),S=c(),_=d(I,f,k),B=_.tail??(_.value?Promise.resolve(_.value):p({kind:"read",provenance:I,workspaceId:f,agentId:k},S));_.dirty+=1;const E=B.then(P=>p(v(P),S));return _.tail=E,E.then(P=>{_.dirty-=1,_.tail===E&&(_.tail=void 0),u(P,!0)},()=>{_.dirty-=1,_.tail===E&&(_.tail=void 0)}),E};return{authority:()=>o?null:n(),read:m,async edit(f,k,v,I){const S=++i;return y(k,v,_=>({kind:"edit",provenance:_.provenance,workspaceId:k,agentId:v,lifetime:_.lifetime,revision:_.revision,origin:f,sequence:S,snapshot:I}))},async flush(f,k){const v=l(),I=c(),S=d(v,f,k),_=await(S.tail??(S.value?Promise.resolve(S.value):m(f,k)));await p({kind:"flush",provenance:v,workspaceId:f,agentId:k,lifetime:_.lifetime,revision:_.revision},I)},async clear(f,k){await y(f,k,v=>({kind:"clear",provenance:v.provenance,workspaceId:f,agentId:k,lifetime:v.lifetime,revision:v.revision,origin:s}))},subscribe(f){return r.add(f),()=>{r.delete(f)}},dispose(){o=!0,h(),r.clear(),a.clear()}}}let L=null;async function Fs(e,t,n,a,r){const s=L;if(!s)throw new Error("draft-shared-transport-unavailable");const i=()=>{if(L!==s||s.authority()!==r)throw new Error("draft-authority-changed")};i(),await s.edit(e,t,n,a),i(),await s.flush(t,n),i()}async function Ks(e,t){await Promise.resolve(),L&&await L.flush(e,t)}function Ws(){if(!et())return null;const e=Xa({request:n=>_n(Ga,n),subscribe:n=>vn(a=>{a.method===Ja&&n(a.params)})},()=>En(A.state),()=>Dn(A.state));L=e;const t=e.dispose;return e.dispose=()=>{L===e&&(L=null),t()},e}const kt=new Map;function vt(e,t){return`${e}\0${t}`}function js(e,t){return kt.get(vt(e,t))}function qs(e,t,n){kt.set(vt(e,t),n)}const Vs=A.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.userMessageIndexes,n):void 0}),zs=A.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.retryAgents,n):void 0});function Za(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const s=e/1e3,i=s.toFixed(1);return i.endsWith(".0")?`${Math.round(s)}s`:`${i}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),a=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${a}m ${r}s`:`${a}m ${r}s`}function Gs(e){return Za(Math.max(1e3,Math.round(e/1e3)*1e3))}const er=new Set(["launch","init","session-create","session-load","prompt"]),tr=new Set(["tool-call","tool-waiting"]);function nr(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function Js(e){return e&&er.has(e)?"pulse":e&&tr.has(e)?"twist":"bloom"}const _t="stalled";function Ys(e,t){const n=nr(e);return!n||n.phase!==_t||typeof t=="number"&&t>n.timestamp?null:n}function Qs(e){let t=null;for(const n of e)n.phase!==_t&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const Ve={get title(){return b.chat_streamingStatus_sessionCorrupted_title()},get message(){return b.chat_streamingStatus_sessionCorrupted_message()}},ar=/^session\/[a-z_]+(?: failed)?:\s*/i;function rr(e){const n=(e.split(`
|
|
12
|
+
`).map(a=>a.trim()).find(Boolean)??"").replace(ar,"");return n.charAt(0).toUpperCase()+n.slice(1)}function Xs(e,t){return e?t===!0?{corrupted:!0,title:Ve.title,message:Ve.message,detail:e}:{corrupted:!1,title:b.chat_streamingStatus_responseFailed_label(),message:rr(e),detail:null}:null}const Zs=A.createSelector((e,t)=>R(e.questionUi.consumers,t)),sr=3e4,J=new Map;function ei(e,t){const n=J.get(e);n&&clearTimeout(n.timer);const a=setTimeout(()=>J.delete(e),sr);J.set(e,{value:t,timer:a})}function ti(e){const t=J.get(e);if(t)return clearTimeout(t.timer),J.delete(e),t.value}const St=A.createSelector((e,t,n)=>e.agentWorkers?.byKey[Ut(t,n)]??Lt),ir=A.createSelector((e,t,n)=>{const a=St.select(e,t,n);return a.status==="unsupported"?[]:(a.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),ni=A.createSelector((e,t,n)=>{const a=St.select(e,t,n);return a.status==="failed"?!0:a.status!=="ready"||!a.snapshot?!1:a.snapshot.truncated?!0:a.snapshot.support.status!=="supported"&&ir.select(e,t,n).length>0}),or=1e3,Mt={requireViewedAndFocused:!0,requireAssistantTail:!0},Y=new Map,x=new Map;let W=null;function Ee(e){(e===void 0||W===e)&&(W=null)}const cr=200;function lr(e,t){if(x.delete(e),x.set(e,t),x.size>cr){const n=x.keys().next().value;n!==void 0&&x.delete(n)}}function At(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function ai(e){return At(e)?.id??null}function ri(e){De(e,{requireViewedAndFocused:!0})}function si(e){De(e,{requireViewedAndFocused:!1})}function ii(e){Ee(),De(e,Mt)}function oi(e){W===e&&(Y.has(e)||(W=null,Re(e,Mt)))}function ci(e){for(const t of e)typeof t!="string"||t.length===0||(It(t),Ee(t),Re(t,{requireViewedAndFocused:!1}))}function It(e){const t=Y.get(e);t&&(clearTimeout(t.timer),Y.delete(e))}function De(e,t){It(e),Ee(e);const n=setTimeout(()=>{Y.delete(e),Re(e,t)},or);Y.set(e,{timer:n,gates:t})}let ze=null;function dr(){return ze??=Promise.all([fe(()=>import("./l-VTMc_p.js"),__vite__mapDeps([46,21,22,5,23,24,3,8,4,25,15,2,47,48]),import.meta.url),fe(()=>import("./D9yIi5KK.js").then(e=>e.o),__vite__mapDeps([49,45,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,37,36,50,33,42]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),ze}async function Re(e,t){let n=null;try{const{appStore:a,appClient:r}=await dr(),s=a.state;if(t.requireViewedAndFocused&&(s.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const i=s.agentSessions?.byAgentId[e];if(!i)return;const o=typeof i.workspaceId=="string"?i.workspaceId:"";if(o.length===0)return;if(t.requireAssistantTail&&s.chatState?.byAgentId[e]?.initialHistoryPending){W=e;return}const l=At(i.messages??[]);if(!l){t.requireAssistantTail&&(W=e);return}if(t.requireAssistantTail&&l.role!=="assistant")return;const c=l.id;if(x.get(e)===c)return;lr(e,c),n=c,!(await r.agents.markSeen({workspaceId:o,agentId:e,messageId:c})).success&&x.get(e)===n&&x.delete(e)}catch{n!==null&&x.get(e)===n&&x.delete(e)}}const oe=new Map;function Tt(e,t){return`${e}\0${t}`}function li(e,t){return oe.get(Tt(e,t))}function di(e,t,n){oe.set(Tt(e,t),n)}function ui(e){if(e.length===0)return;const t=new Set(e);for(const n of[...oe.keys()]){const a=n.slice(n.indexOf("\0")+1);t.has(a)&&oe.delete(n)}}export{_s as $,Ur as A,Yr as B,Vr as C,O as D,Ha as E,Gr as F,Ta as G,Ea as H,zn as I,Ks as J,Gs as K,Is as L,or as M,Ys as N,Rs as O,li as P,js as Q,yt as R,As as S,us as T,vs as U,qe as V,ms as W,Qs as X,Js as Y,os as Z,cs as _,rs as a,Kr as a0,ta as a1,Cs as a2,Fr as a3,Hs as a4,G as a5,jr as a6,Wr as a7,Or as a8,Us as a9,St as aA,ni as aB,ds as aC,Rr as aD,xr as aE,Dr as aF,gs as aG,ws as aH,ys as aI,bs as aJ,gt as aK,Zs as aL,zs as aM,Vs as aN,di as aO,qs as aP,Ds as aQ,Hr as aR,hs as aS,Ns as aT,ei as aU,Ss as aV,xa as aW,ti as aX,na as aY,Nr as aZ,ci as aa,oi as ab,ri as ac,si as ad,ii as ae,ai as af,xs as ag,is as ah,Qr as ai,Nn as aj,Fs as ak,qr as al,as as am,Jr as an,Pa as ao,pt as ap,$r as aq,Ms as ar,Bs as as,ks as at,ss as au,Ee as av,ls as aw,Pr as ax,Ps as ay,ir as az,we as b,$s as c,ts as d,ns as e,Ts as f,Lr as g,Ca as h,Br as i,ra as j,aa as k,Ls as l,Os as m,ui as n,fs as o,Es as p,es as q,Zr as r,zr as s,Ws as t,Xr as u,Xs as v,ps as w,Ma as x,ge as y,jn as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aG as r}from"./CJxGDkBm.js";import{bl as e}from"./
|
|
1
|
+
import{aG as r}from"./CJxGDkBm.js";import{bl as e}from"./qD_x_a7m.js";const n=Symbol("workspace-route-context");function s(t){return t&&t!=="new"?e(t):null}function u(t,o){return t?.startsWith("/workspace/")?s(o):null}function p(){try{return r(n)}catch{return}}export{n as W,s as a,p as g,u as w};
|