@intent-hq/web 2.321.0 → 2.321.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/{Cz8iOYm8.js → -OAW1EMW.js} +1 -1
- package/web/app/immutable/chunks/{CDsY8gY8.js → -WHIysNv.js} +1 -1
- package/web/app/immutable/chunks/{BZyfa8QR.js → 1hja73nv.js} +1 -1
- package/web/app/immutable/chunks/{CvBuWqyP.js → 595JSfYJ.js} +4 -4
- package/web/app/immutable/chunks/{DZtstCLQ.js → 9ZBkr0Qf.js} +1 -1
- package/web/app/immutable/chunks/{DwsRDnkS.js → B-obUB2z.js} +4 -4
- package/web/app/immutable/chunks/{vzGm0J_h.js → B0SbPsRb.js} +1 -1
- package/web/app/immutable/chunks/{O0CxvO89.js → B1Ss_ZJB.js} +1 -1
- package/web/app/immutable/chunks/{Dritbi2C.js → B21V7_mT.js} +1 -1
- package/web/app/immutable/chunks/{D6dCvfQe.js → B3X_dqJy.js} +1 -1
- package/web/app/immutable/chunks/{DwNzQjT_.js → B5plHk_3.js} +1 -1
- package/web/app/immutable/chunks/{-x_SoK5J.js → B6l2HPmZ.js} +1 -1
- package/web/app/immutable/chunks/{CPKLysog.js → B7Ka_0Oj.js} +1 -1
- package/web/app/immutable/chunks/{Cqay3Iio.js → B8EyUhsU.js} +1 -1
- package/web/app/immutable/chunks/{BflC9e-C.js → B8lRKrSj.js} +1 -1
- package/web/app/immutable/chunks/{C0mBOV7w.js → B8z7D92E.js} +1 -1
- package/web/app/immutable/chunks/{BM51eWC-.js → B9_x-PiX.js} +1 -1
- package/web/app/immutable/chunks/{w6mFE4SD.js → BA_dLJoi.js} +1 -1
- package/web/app/immutable/chunks/{Ced26xBL.js → BBFIIkt3.js} +1 -1
- package/web/app/immutable/chunks/{CZEWv-Gf.js → BC2qBoqJ.js} +1 -1
- package/web/app/immutable/chunks/{BBeErNG6.js → BCXXXhph.js} +1 -1
- package/web/app/immutable/chunks/{CulY8r4s.js → BGDIUFls.js} +1 -1
- package/web/app/immutable/chunks/{Bgw4M5Hc.js → BIyU-DJK.js} +1 -1
- package/web/app/immutable/chunks/{BtTBXjdJ.js → BJevbZ6b.js} +1 -1
- package/web/app/immutable/chunks/{D2zJp5fS.js → BKGDTzxi.js} +4 -4
- package/web/app/immutable/chunks/{PUalo3UE.js → BKjTzecb.js} +1 -1
- package/web/app/immutable/chunks/BLK9_MXJ.js +1 -0
- package/web/app/immutable/chunks/{C6-BVYMv.js → BLPUk2wE.js} +1 -1
- package/web/app/immutable/chunks/{DjqPgoUP.js → BMeK3RDc.js} +1 -1
- package/web/app/immutable/chunks/{BwICfRz9.js → BOCB_5Mq.js} +1 -1
- package/web/app/immutable/chunks/{DMRQ6CDd.js → BOIp2sA8.js} +2 -2
- package/web/app/immutable/chunks/{4iRc0E9v.js → BOXp2u2v.js} +1 -1
- package/web/app/immutable/chunks/{CYOvUFvY.js → BQSDfUdM.js} +1 -1
- package/web/app/immutable/chunks/{CVrH3Neh.js → BTFetavf.js} +1 -1
- package/web/app/immutable/chunks/{BtWwzwrf.js → BUJszVQU.js} +1 -1
- package/web/app/immutable/chunks/{BeqbwVaJ.js → BUgNMnQK.js} +1 -1
- package/web/app/immutable/chunks/{CAgY0H5Q.js → BVu_zw0i.js} +1 -1
- package/web/app/immutable/chunks/{CmAVmm3T.js → BW92tDoj.js} +1 -1
- package/web/app/immutable/chunks/{5QXDo1_h.js → BaY77ElS.js} +1 -1
- package/web/app/immutable/chunks/{DnfX8iZ_.js → BepfjQky.js} +1 -1
- package/web/app/immutable/chunks/{DPoarPZL.js → BfDD9-8-.js} +1 -1
- package/web/app/immutable/chunks/{DJKXcaw9.js → BfLoMdoJ.js} +1 -1
- package/web/app/immutable/chunks/{C3lgqjB4.js → BhLhuxzO.js} +1 -1
- package/web/app/immutable/chunks/{CY9IKMQG.js → BhQoULkp.js} +1 -1
- package/web/app/immutable/chunks/{BD8I8FK1.js → BhptSt_t.js} +1 -1
- package/web/app/immutable/chunks/{C804xHCz.js → BnfqUxHy.js} +1 -1
- package/web/app/immutable/chunks/{CCsRc7xx.js → BoRJGEYY.js} +1 -1
- package/web/app/immutable/chunks/{CoUfnBeR.js → BqY6zXt8.js} +1 -1
- package/web/app/immutable/chunks/{DlZzAKZ2.js → Bswi_ddk.js} +1 -1
- package/web/app/immutable/chunks/{DZAWjsA4.js → BuSLaAvw.js} +1 -1
- package/web/app/immutable/chunks/{BziQ6zwo.js → Bv8X8HVG.js} +1 -1
- package/web/app/immutable/chunks/{CHRkLzGl.js → BxYEiUJG.js} +1 -1
- package/web/app/immutable/chunks/{BDgfVkJh.js → BxwVL-Fm.js} +1 -1
- package/web/app/immutable/chunks/{DNNMwmDG.js → By6RneNn.js} +1 -1
- package/web/app/immutable/chunks/{jvHJQ-Xz.js → ByHaUdGf.js} +1 -1
- package/web/app/immutable/chunks/{Cb3FWEmc.js → ByrMuSC8.js} +1 -1
- package/web/app/immutable/chunks/{DXySew1R.js → Bz3RpCLK.js} +1 -1
- package/web/app/immutable/chunks/{Du7yAEgM.js → BzxV99e1.js} +1 -1
- package/web/app/immutable/chunks/{CLmrIbfi.js → C-Bae4WT.js} +1 -1
- package/web/app/immutable/chunks/{DuMlpvYZ.js → C49MHRWB.js} +1 -1
- package/web/app/immutable/chunks/{DFyBaL9d.js → C4v4cxss.js} +1 -1
- package/web/app/immutable/chunks/{Ab2YxsyL.js → C7ROHbZN.js} +1 -1
- package/web/app/immutable/chunks/{DDdLPEvL.js → C8PJPEyt.js} +1 -1
- package/web/app/immutable/chunks/{Bcc7Bzbg.js → C8j9JMqo.js} +1 -1
- package/web/app/immutable/chunks/{z3QVK190.js → C9X3oeee.js} +2 -2
- package/web/app/immutable/chunks/{DOzF5uE-.js → CAlQoToi.js} +1 -1
- package/web/app/immutable/chunks/{DYhpST_X.js → CAqQ6ocO.js} +1 -1
- package/web/app/immutable/chunks/{Bi4OiJD3.js → CBB0H9gy.js} +1 -1
- package/web/app/immutable/chunks/{0Orrh1Id.js → CBt1geRx.js} +1 -1
- package/web/app/immutable/chunks/{C7JWgw8J.js → CCFv83XE.js} +3 -3
- package/web/app/immutable/chunks/{0x0gscua.js → CEifkBBF.js} +1 -1
- package/web/app/immutable/chunks/{CdVKa6AF.js → CF05BHVg.js} +1 -1
- package/web/app/immutable/chunks/{csuWDYc9.js → CFUuuOCk.js} +1 -1
- package/web/app/immutable/chunks/{DYfBNrOV.js → CFpa0qKK.js} +1 -1
- package/web/app/immutable/chunks/{C76-jvlr.js → CKVMwQIU.js} +1 -1
- package/web/app/immutable/chunks/{BcpqnYRX.js → CKwUXTNV.js} +1 -1
- package/web/app/immutable/chunks/{BWHu0fap.js → CNfmWkr2.js} +1 -1
- package/web/app/immutable/chunks/{ByKL05wN.js → COHcJhIZ.js} +1 -1
- package/web/app/immutable/chunks/{Cwv7iryQ.js → CPTVx1j_.js} +1 -1
- package/web/app/immutable/chunks/{B1WyTcs2.js → CQR2-ULA.js} +1 -1
- package/web/app/immutable/chunks/{CvegPRPp.js → CRIiIVFe.js} +1 -1
- package/web/app/immutable/chunks/{DRpDjwRs.js → CRVLGDX1.js} +1 -1
- package/web/app/immutable/chunks/{CIh8Ybhq.js → CShmL-bJ.js} +1 -1
- package/web/app/immutable/chunks/{CGIf2jXM.js → CVXLAap3.js} +1 -1
- package/web/app/immutable/chunks/{aLZSbque.js → CVpyP8V1.js} +1 -1
- package/web/app/immutable/chunks/{CEj75uMJ.js → CVxxrZlU.js} +1 -1
- package/web/app/immutable/chunks/{B-WefpDP.js → CZHW0zTR.js} +1 -1
- package/web/app/immutable/chunks/{Bknqawxe.js → C_J-ZvyS.js} +1 -1
- package/web/app/immutable/chunks/{Bok30zBH.js → C_etBYrd.js} +1 -1
- package/web/app/immutable/chunks/{BOrghaSd.js → Ccao0BPS.js} +2 -2
- package/web/app/immutable/chunks/{D7q-DSVP.js → Cd2nCrGL.js} +1 -1
- package/web/app/immutable/chunks/{7fl6VDRo.js → Cg1Q3Vce.js} +1 -1
- package/web/app/immutable/chunks/{UEd-gngc.js → Cg1YDdPt.js} +1 -1
- package/web/app/immutable/chunks/{nR16njgN.js → CgTaoYRE.js} +1 -1
- package/web/app/immutable/chunks/{I0eHZGMz.js → CgX-NR2x.js} +1 -1
- package/web/app/immutable/chunks/{CxZuxrAL.js → CgYFLqPV.js} +1 -1
- package/web/app/immutable/chunks/{CchM71Qw.js → ChoOa3ue.js} +1 -1
- package/web/app/immutable/chunks/{DlBxdhh5.js → ChwJR7tq.js} +2 -2
- package/web/app/immutable/chunks/{DS2Q5gr9.js → CjMMRJKO.js} +1 -1
- package/web/app/immutable/chunks/{CqGkRJXi.js → Cjt2NmNL.js} +1 -1
- package/web/app/immutable/chunks/{BMH4mbSd.js → CkCvlKVo.js} +2 -2
- package/web/app/immutable/chunks/{CXIZuwd7.js → CkFyNl9C.js} +1 -1
- package/web/app/immutable/chunks/{CdGIN-T1.js → CkO5mH9l.js} +3 -3
- package/web/app/immutable/chunks/{Bmmshx2M.js → CkVv_2uN.js} +1 -1
- package/web/app/immutable/chunks/{DDnwQoVq.js → CksqvVEv.js} +1 -1
- package/web/app/immutable/chunks/{C-RJDuZ9.js → ClKXAKis.js} +1 -1
- package/web/app/immutable/chunks/{5MGYaOe_.js → CmdmUBjO.js} +1 -1
- package/web/app/immutable/chunks/{Cbqk5Mud.js → Cn3sgfe9.js} +1 -1
- package/web/app/immutable/chunks/{Ob5NWDgS.js → CnGmyG1N.js} +1 -1
- package/web/app/immutable/chunks/{BC1v75_H.js → Cnv2xfJ5.js} +1 -1
- package/web/app/immutable/chunks/{C5aeZ3Yo.js → CpHf2NNU.js} +2 -2
- package/web/app/immutable/chunks/{QjpXu0Du.js → CpqBzFAh.js} +1 -1
- package/web/app/immutable/chunks/{Dix9BiYu.js → Cs29mItj.js} +1 -1
- package/web/app/immutable/chunks/{o5rEX9Xy.js → CtlvWnL2.js} +1 -1
- package/web/app/immutable/chunks/{CVjlpAWj.js → CukTrqVi.js} +3 -3
- package/web/app/immutable/chunks/{B6DUgu-2.js → CvEJT2Bp.js} +1 -1
- package/web/app/immutable/chunks/{BGFrQA7m.js → CwCU1Sl2.js} +1 -1
- package/web/app/immutable/chunks/{CM7Hb3PZ.js → Cx6BBijv.js} +1 -1
- package/web/app/immutable/chunks/{Cja4W1Zb.js → CxFIgZQh.js} +4 -4
- package/web/app/immutable/chunks/{ubLEbEcV.js → CxH_XgDD.js} +1 -1
- package/web/app/immutable/chunks/{DhtKWu39.js → CyDNFzzR.js} +1 -1
- package/web/app/immutable/chunks/{BEQ_aNVt.js → CzJkcVDg.js} +2 -2
- package/web/app/immutable/chunks/{CKO4faLg.js → D0t3600U.js} +1 -1
- package/web/app/immutable/chunks/{Bc-CUZMV.js → D2cK1lQ1.js} +1 -1
- package/web/app/immutable/chunks/{B0FYEeEw.js → D4GiefG7.js} +1 -1
- package/web/app/immutable/chunks/{DR4i54x0.js → D58l9gbk.js} +1 -1
- package/web/app/immutable/chunks/{8biy-UQv.js → D7DC5szJ.js} +1 -1
- package/web/app/immutable/chunks/{CKwPlZ66.js → D7G7K7c-.js} +1 -1
- package/web/app/immutable/chunks/{BX-dt_Uh.js → D7Ooq-cX.js} +1 -1
- package/web/app/immutable/chunks/{hxIWaKu8.js → D7T2_Y9j.js} +1 -1
- package/web/app/immutable/chunks/{NeHKo0ZG.js → D7gneRCc.js} +1 -1
- package/web/app/immutable/chunks/{Cts399i7.js → D8UKP7YR.js} +1 -1
- package/web/app/immutable/chunks/{tGqA6xQ9.js → DA-H5C8Y.js} +1 -1
- package/web/app/immutable/chunks/{CS7dHtKw.js → DA6yyw4t.js} +1 -1
- package/web/app/immutable/chunks/{k4eU_FWk.js → DCK0Naee.js} +1 -1
- package/web/app/immutable/chunks/{DsRLPs6I.js → DDQNWelJ.js} +3 -3
- package/web/app/immutable/chunks/{Byv2GcxJ.js → DEG0t0e4.js} +2 -2
- package/web/app/immutable/chunks/{DMvfzQWM.js → DFNIzPXh.js} +1 -1
- package/web/app/immutable/chunks/{C3AKbypo.js → DG59horb.js} +6 -6
- package/web/app/immutable/chunks/{CTlGDL05.js → DGwsJJPM.js} +1 -1
- package/web/app/immutable/chunks/{Dgqdx3pd.js → DHDWM67z.js} +1 -1
- package/web/app/immutable/chunks/{BkR5Qiti.js → DI5kEG-f.js} +1 -1
- package/web/app/immutable/chunks/{CGVJO4eq.js → DILsnJHr.js} +1 -1
- package/web/app/immutable/chunks/{XV0T3w4n.js → DJ4kCFeu.js} +1 -1
- package/web/app/immutable/chunks/{B9MBednq.js → DK60Gbnz.js} +1 -1
- package/web/app/immutable/chunks/{BG-UHIO1.js → DLL1CDAX.js} +1 -1
- package/web/app/immutable/chunks/{D84A4J8d.js → DN-zwgZs.js} +1 -1
- package/web/app/immutable/chunks/{dmSYAakE.js → DNmwPq0o.js} +1 -1
- package/web/app/immutable/chunks/{C11XjPnf.js → DPbHVaEp.js} +3 -3
- package/web/app/immutable/chunks/{BGiTQR4x.js → DPu6l1xr.js} +1 -1
- package/web/app/immutable/chunks/{CztKENY4.js → DQ5722kb.js} +1 -1
- package/web/app/immutable/chunks/{C-neqscP.js → DQJIFwfN.js} +1 -1
- package/web/app/immutable/chunks/{Bo4s1kgI.js → DSAz0okZ.js} +1 -1
- package/web/app/immutable/chunks/{B0pgN3Jj.js → DSK0s2id.js} +1 -1
- package/web/app/immutable/chunks/{p5gLe3PS.js → DSemZQdl.js} +1 -1
- package/web/app/immutable/chunks/{Dd0rdLMI.js → DWE0HeOH.js} +1 -1
- package/web/app/immutable/chunks/DXQjqgTI.js +2 -0
- package/web/app/immutable/chunks/{C8zzua9V.js → DXUSKOBi.js} +1 -1
- package/web/app/immutable/chunks/{BS5yagDq.js → Db4tMHqD.js} +1 -1
- package/web/app/immutable/chunks/{JfyBNQs2.js → DbEloQVd.js} +1 -1
- package/web/app/immutable/chunks/{uyOfKmty.js → DbSExeuK.js} +3 -3
- package/web/app/immutable/chunks/DdyXhBml.js +1 -0
- package/web/app/immutable/chunks/{DSdY0J1g.js → DeAs3CrV.js} +1 -1
- package/web/app/immutable/chunks/{Dd7A9glX.js → DfmFIVGk.js} +1 -1
- package/web/app/immutable/chunks/{BXean12D.js → DgH1Kxzo.js} +1 -1
- package/web/app/immutable/chunks/{C_Vz3LCC.js → DhupuNdm.js} +1 -1
- package/web/app/immutable/chunks/{CCnP87Jb.js → DjlgzWYz.js} +1 -1
- package/web/app/immutable/chunks/{QGE3iD8D.js → Djo4jLAK.js} +1 -1
- package/web/app/immutable/chunks/{CHM5tGJ6.js → DknRplPn.js} +1 -1
- package/web/app/immutable/chunks/{D_HysCp7.js → Dkqghfib.js} +1 -1
- package/web/app/immutable/chunks/{B5nbjbRb.js → Dl9O9El0.js} +1 -1
- package/web/app/immutable/chunks/{BwYRCP9e.js → DlVuwwPm.js} +1 -1
- package/web/app/immutable/chunks/{jMKjj8ae.js → Do2QraPX.js} +1 -1
- package/web/app/immutable/chunks/{CxQ0SCX2.js → Dpt5qRH-.js} +1 -1
- package/web/app/immutable/chunks/{DI4wCe7O.js → DqoSmmzJ.js} +1 -1
- package/web/app/immutable/chunks/{CGBBhq8k.js → DrLFKkMN.js} +1 -1
- package/web/app/immutable/chunks/{gCXIPBa3.js → DrV9FRnq.js} +1 -1
- package/web/app/immutable/chunks/DtA2OOMb.js +1 -0
- package/web/app/immutable/chunks/{DyVNmy1r.js → Dw8vhMX8.js} +1 -1
- package/web/app/immutable/chunks/{pnKMO5U0.js → Dx4FwkUV.js} +12 -12
- package/web/app/immutable/chunks/{BLhWzQz2.js → Dy273g_c.js} +1 -1
- package/web/app/immutable/chunks/{Ci959ZOg.js → DyAwtID_.js} +1 -1
- package/web/app/immutable/chunks/{QSR6vsk4.js → HjZp7lPh.js} +1 -1
- package/web/app/immutable/chunks/IVwolD3l.js +1 -0
- package/web/app/immutable/chunks/{CBxbaIvA.js → J2Ik-qgk.js} +1 -1
- package/web/app/immutable/chunks/{BdWpSBC4.js → Jyvn4VFV.js} +2 -2
- package/web/app/immutable/chunks/{vUGF5JqJ.js → KbX4WJa3.js} +1 -1
- package/web/app/immutable/chunks/{BsB3ty-n.js → LJbiiLoF.js} +1 -1
- package/web/app/immutable/chunks/{8OpKoiOO.js → M2KsQzCE.js} +1 -1
- package/web/app/immutable/chunks/{CEFpGNTq.js → P5ksjIJq.js} +1 -1
- package/web/app/immutable/chunks/{BBZiE97y.js → QH2SEUTS.js} +1 -1
- package/web/app/immutable/chunks/{YO4PhogQ.js → Qo3qzRgV.js} +1 -1
- package/web/app/immutable/chunks/{6cxhz2FS.js → R4RwwAIT.js} +1 -1
- package/web/app/immutable/chunks/{D4e2w8TP.js → R6TUWaQq.js} +1 -1
- package/web/app/immutable/chunks/{reR1kPlm.js → R7JNw0Kj.js} +1 -1
- package/web/app/immutable/chunks/{45y_L1a9.js → R7cFQfJw.js} +1 -1
- package/web/app/immutable/chunks/{XF_IbTR1.js → ShyOFQId.js} +3 -3
- package/web/app/immutable/chunks/{B2yYgkwz.js → UJOJMGUV.js} +1 -1
- package/web/app/immutable/chunks/{VEkj47bo.js → UrKpUjsc.js} +1 -1
- package/web/app/immutable/chunks/{CN70DRE5.js → W3fvY0y9.js} +1 -1
- package/web/app/immutable/chunks/{DNFHGDC9.js → Yemr8tAr.js} +1 -1
- package/web/app/immutable/chunks/{Cq6ekj5I.js → Z9C8BZgq.js} +1 -1
- package/web/app/immutable/chunks/{D2iCI9dn.js → ZXnl98NQ.js} +1 -1
- package/web/app/immutable/chunks/{nLw8YrmA.js → ZZRQ9A5E.js} +1 -1
- package/web/app/immutable/chunks/{VeIqG7dc.js → _tiHrnhs.js} +1 -1
- package/web/app/immutable/chunks/{D5lr7eae.js → bsuDfMJ7.js} +1 -1
- package/web/app/immutable/chunks/{CsqvO7xN.js → cSE4WxMO.js} +1 -1
- package/web/app/immutable/chunks/{CHZAzCO9.js → cb3YK4cU.js} +2 -2
- package/web/app/immutable/chunks/{BMc6OzJ-.js → fR46xO2d.js} +1 -1
- package/web/app/immutable/chunks/{0TFOtiMK.js → hbDKUMfp.js} +1 -1
- package/web/app/immutable/chunks/{BXPwex0u.js → hiomoPR0.js} +1 -1
- package/web/app/immutable/chunks/{BbCn81lZ.js → jG9ZxBG9.js} +1 -1
- package/web/app/immutable/chunks/{D26IPp5S.js → kJEAqQBZ.js} +1 -1
- package/web/app/immutable/chunks/{DFcwI6Rh.js → kYECwxqW.js} +1 -1
- package/web/app/immutable/chunks/{B0FM877X.js → knj_j9t3.js} +1 -1
- package/web/app/immutable/chunks/{C8xPpxcv.js → oeKvwm9n.js} +1 -1
- package/web/app/immutable/chunks/rVUl07zm.js +1 -0
- package/web/app/immutable/chunks/{BvkV35-O.js → s0WtN5GJ.js} +1 -1
- package/web/app/immutable/chunks/{Ctggj9Y1.js → tF6DpP53.js} +1 -1
- package/web/app/immutable/chunks/{Bm_1OUSw.js → vZMKGyZD.js} +1 -1
- package/web/app/immutable/chunks/{CG9qWr93.js → wCe59Qn_.js} +3 -3
- package/web/app/immutable/chunks/{BMvbnoDk.js → wL4DOyzk.js} +1 -1
- package/web/app/immutable/chunks/{C0VXEpDj.js → waagD0cO.js} +1 -1
- package/web/app/immutable/chunks/{B7BTR3Z_.js → wsChBzD5.js} +1 -1
- package/web/app/immutable/chunks/{C06rhFz-.js → xXOd43YN.js} +1 -1
- package/web/app/immutable/chunks/{BOaNSc_1.js → y427XYTC.js} +1 -1
- package/web/app/immutable/chunks/{B0JWnOsx.js → yDAFOpKJ.js} +1 -1
- package/web/app/immutable/chunks/{BPp7FHiR.js → yYa77Hy1.js} +1 -1
- package/web/app/immutable/entry/{app.PHHlgSoZ.js → app.C4lGM6VF.js} +3 -3
- package/web/app/immutable/entry/start.Dm-EgTQN.js +1 -0
- package/web/app/immutable/nodes/{0.D7bJjS_y.js → 0.qAsdYGwF.js} +1 -1
- package/web/app/immutable/nodes/{1.B3gH8FG5.js → 1.xPfapkeR.js} +1 -1
- package/web/app/immutable/nodes/{10.NQcSgQgq.js → 10.B15mzUUg.js} +1 -1
- package/web/app/immutable/nodes/{11.Drfz7PRj.js → 11.DQfonRjI.js} +1 -1
- package/web/app/immutable/nodes/{12.gXokqM9g.js → 12.BhFeMS2H.js} +1 -1
- package/web/app/immutable/nodes/{13.DFxxGy6Y.js → 13.BhRY0bGm.js} +3 -3
- package/web/app/immutable/nodes/{14.7T2ChNl_.js → 14.a47lQm__.js} +1 -1
- package/web/app/immutable/nodes/{15.CgEeXtgJ.js → 15.ByMIoKJb.js} +1 -1
- package/web/app/immutable/nodes/{16.CWrHY2VB.js → 16.BZyTPRIV.js} +2 -2
- package/web/app/immutable/nodes/{2.DQ6QcB9c.js → 2.C4xwnwcF.js} +4 -4
- package/web/app/immutable/nodes/{3.Fjkgohv2.js → 3.Bp1zelve.js} +1 -1
- package/web/app/immutable/nodes/{4.D1BNF_ep.js → 4.CVUqia69.js} +1 -1
- package/web/app/immutable/nodes/{5.C5OySrRk.js → 5.CeZEr5fx.js} +1 -1
- package/web/app/immutable/nodes/{6.BrxG9qCf.js → 6.D4BurFfy.js} +1 -1
- package/web/app/immutable/nodes/{7.CvdabbdY.js → 7.B6cTk0vB.js} +1 -1
- package/web/app/immutable/nodes/{8.BSQtFfFS.js → 8.orOAWU1G.js} +8 -8
- package/web/app/immutable/nodes/{9.D6DS9Z9f.js → 9.CgJhFQrz.js} +5 -5
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +46 -46
- package/web/index.html +18 -18
- package/web/app/immutable/chunks/B2c_0_UD.js +0 -2
- package/web/app/immutable/chunks/CCaX_DIa.js +0 -1
- package/web/app/immutable/chunks/CRyHSgI1.js +0 -1
- package/web/app/immutable/chunks/CmYXfe7_.js +0 -1
- package/web/app/immutable/chunks/eK7OULll.js +0 -1
- package/web/app/immutable/chunks/uLB4Kp9c.js +0 -1
- package/web/app/immutable/entry/start.Cltn4m6a.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./
|
|
1
|
+
import{l as e}from"./DPbHVaEp.js";const t={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},s={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{t as conf,s as language};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var il=Object.defineProperty;var ll=(r,t,n)=>t in r?il(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var _n=(r,t,n)=>ll(r,typeof t!="symbol"?t+"":t,n);import{t as bt,bq as m,bo as f,a_ as z,by as wt,b as xt,bs as Dn,bu as lr,bt as dl,br as aa}from"./
|
|
1
|
+
var il=Object.defineProperty;var ll=(r,t,n)=>t in r?il(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var _n=(r,t,n)=>ll(r,typeof t!="symbol"?t+"":t,n);import{t as bt,bq as m,bo as f,a_ as z,by as wt,b as xt,bs as Dn,bu as lr,bt as dl,br as aa}from"./BLK9_MXJ.js";import{bs as kt,a5 as D,bA as E,bS as P,bl as oe,ay as we,aD as e,b_ as F,bO as J,W as g,c9 as s,bn as It,bV as fe,bH as H,aA as p,be as xr,b$ as Vr,aB as A,bj as On,c0 as In,c6 as cl,bo as xa,br as Xr,ca as tr,bf as ir,a7 as Et,am as Pn,ax as Rn,bk as za,ai as sa,aj as jr,aw as Ha,bz as Ko,cb as Ja,c5 as Sa,aC as _r,cd as eo,bv as ul}from"./DYhIMPy1.js";import{k as Ne,s as re,a as un,j as Ya,l as oa,h as Br,d as gt,f as Zt,i as Wn,I as fl,c as ia,p as gl,o as ml,S as pl,C as vl}from"./9ZBkr0Qf.js";import{H as Xt,j as hl,s as Go,p as qs,y as _l,u as yl,t as Pr,g as Kn,c as ra,E as Is,A as os,D as Ua,S as bl}from"./CFpa0qKK.js";import{b as fn}from"./BaIAhI85.js";import{bT as Qo,j as Na,a5 as Ss,ak as ja,F as wl,at as Ea,aM as xl,aP as to}from"./waagD0cO.js";import{t as Gn,r as kl,P as Il}from"./C_etBYrd.js";import{F as Vt,cF as Ds,at as Zo,aX as Xo,aI as Sl,c5 as Al,a3 as Tl,a5 as Va,aL as Cl,cI as Ml,cH as Pl,a2 as es,av as Bs,ai as Rl,br as Nl,aQ as El,aV as Ll,bG as $l,an as Ol,cx as ql,aB as ro,be as kn,aN as no,bY as is,aG as Aa,cR as Dl,c7 as Bl,bl as Fl,b as Wl,ck as zl,af as Hl,b8 as ls,cm as la,cA as Ul,c$ as Fs,X as Jo,a as jl}from"./yDAFOpKJ.js";import{c1 as La,aB as ba,cN as Yo,cP as qn,bS as ts,i as Vl,cG as ei,cM as rs,cL as ti,cJ as ri,f as Tn,a9 as Kl,aa as Gl,aw as Ql,r as Zl,J as Xl,V as ao,u as ni,dK as Jl,as as Yl,j as ed,t as ds,m as td,N as rd,n as nd,p as ai,q as si,a5 as ad,R as sd,Q as od,$ as id,k as ld,cQ as dd,a3 as cd,C as ud,w as fd,U as so}from"./ClKXAKis.js";import{HR as lt,on as gd,sE as $a,nc as oo,us as oi,uu as ii,r1 as md,xo as Ka,R as pd,tK as li,n7 as di,bi as Oa,xp as vd,pP as hd,sh as _d,ul as ci,n5 as yd,mc as bd,g as wd,xR as xd,xO as kd,xQ as Id}from"./DSAz0okZ.js";import{f as pt,am as Ws,bt as Sd,bx as cs,bL as Ad}from"./CukTrqVi.js";import{a2 as Td,x as us,a0 as Cd,O as fs,V as Md,_ as Pd,j as Rd,o as da,M as ea,p as Nd,F as Ed,u as Ld,s as $d,L as gs,J as Od,y as qd,K as Dd,Z as ma,Q as Ta,N as io,m as lo,E as Bd,c as ms,B as co,z as Fd,v as uo,H as pa,P as Wd,G as zd,i as Hd,R as Ud,T as jd,A as Vd,g as Kd,b as Gd,D as Qd,f as Zd,e as Xd,a as Jd,C as Yd,h as ec,U as ui,a3 as tc,t as rc,k as nc,d as fo}from"./CkO5mH9l.js";import{i as ac,e as sc}from"./D7gneRCc.js";import{g as ps}from"./BvFAWM27.js";import{M as ca,C as Ca}from"./CxFIgZQh.js";import{C as go}from"./BaY77ElS.js";import"./B9_x-PiX.js";import{P as oc}from"./bsuDfMJ7.js";import"./CtlvWnL2.js";import{c as fi}from"./ChTqQfQN.js";import{s as Cn}from"./DSemZQdl.js";import{S as ic}from"./BQSDfUdM.js";import{D as mo,M as lc}from"./B-obUB2z.js";import{b as dc,s as Un,c as Ga}from"./BhQoULkp.js";import{O as qa,y as vs,E as hs,B as _s,N as cc,m as uc,l as fc,d as Qa,C as po,f as gc,e as mc,g as pc}from"./BJevbZ6b.js";import{j as gi,g as vc,s as vo}from"./CAlQoToi.js";import{f as hc}from"./BJzHxIyr.js";import{c as an}from"./DtA2OOMb.js";import{A as _c,B as yc,c as bc}from"./BA_dLJoi.js";import{o as ys,n as bs,v as ho,h as wc}from"./BOIp2sA8.js";import"./Do2QraPX.js";import{aV as $n,z as xc}from"./CVpyP8V1.js";import"./CyDNFzzR.js";import{R as As,C as ns,n as kc,i as Ic,h as Sc,j as _o,P as Ac}from"./B6l2HPmZ.js";import"./DNmwPq0o.js";import{a_ as Sr,A as Da,ak as mi,o as pi,e as Tc,I as Cc,R as Mc,as as Pc,b as Rc,$ as Nc}from"./BKGDTzxi.js";import{Z as yo,J as ha,s as vi,k as Ec}from"./Jyvn4VFV.js";import{B as Lc}from"./CjMMRJKO.js";import{r as $c,e as Oc,o as qc}from"./B5plHk_3.js";import{o as hi}from"./Ccao0BPS.js";import{g as zs}from"./BfLoMdoJ.js";import{a as Dc,M as Bc}from"./DJ4kCFeu.js";import{c as ua}from"./kYECwxqW.js";import{A as Fc}from"./CShmL-bJ.js";import{f as Wc,d as zc}from"./C_J-ZvyS.js";import{I as Hc,t as Uc,B as jc,r as bo,A as Vc,n as Kc}from"./DbSExeuK.js";import{b as Gc}from"./BhptSt_t.js";import{F as Qc}from"./Cs29mItj.js";import{S as Zc}from"./s0WtN5GJ.js";import{u as Xc,a as Jc,c as wo,S as Yc}from"./DfxQWSVU.js";import{T as Ts}from"./tF6DpP53.js";import{a as eu}from"./CkVv_2uN.js";import{b as xo}from"./p7znhYIU.js";import{a6 as tu}from"./B21V7_mT.js";import{c as ru}from"./DG59horb.js";function nu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:n,scriptId:a,runId:i,monitorId:o,workspaceId:d,reason:c}=t;if(typeof n!="string"||typeof a!="string"||!a||typeof i!="string"||!i||typeof o!="string"||!o||typeof d!="string"||!d||c!=="finished"&&c!=="ttl-expired"&&c!=="output-match"&&c!=="line-count")return null;const y=t.trigger;return{scriptName:n,scriptId:a,runId:i,monitorId:o,workspaceId:d,reason:c,...c==="output-match"&&typeof y?.matchedLine=="string"?{matchedLine:y.matchedLine}:{}}}function au(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function su(r,t,n,a=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const i=r.messageMetadata?.fromPrincipalId??r.author?.principalId,o=Hc(r)&&r.author?.principalId!==null&&i===t;return{edit:o,remove:o||t===n||a,sendNow:(o||a)&&!_i(r)}}function fa(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function _i(r){return au(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function ko(r,t=Date.now()){const n=r.messageMetadata,a=n?.fromPrincipalId,i=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof a=="string"&&a.length>0),o=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!o&&!i&&!_i(r)}const Ch="pl-3.5! pr-2!";var ou=A("<!> ",1),iu=A('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function yi(r,t){if(new.target)return bt({component:yi,...r});kt(t,!0);let n=m(t,"name",7),a=m(t,"description",7),i=m(t,"content",7),o=m(t,"onUseScript",7),d=fe(!1);function c(){navigator.clipboard.writeText(i()),H(d,!0),setTimeout(()=>{H(d,!1)},2e3)}function y(){o()?.({name:n(),description:a(),content:i()})}var _={get name(){return n()},set name(V){n(V),p()},get description(){return a()},set description(V){a(V),p()},get content(){return i()},set content(V){i(V),p()},get onUseScript(){return o()},set onUseScript(V){o(V),p()},$set:wt,$on:(V,ne)=>xt(t,V,ne)},b=iu(),I=D(b),M=D(I),Z=D(M),w=D(Z);Vt(w,{get icon(){return Ds},size:"sm"}),E(Z);var L=P(Z,2),Q=oe(L,!0);E(M);var j=P(M,2),R=D(j);pt(R,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(V,ne)=>{var pe=ou(),be=we(pe);{let qe=s(()=>e(d)?Zo:Xo);Vt(be,{get icon(){return e(qe)},class:"mr-1"})}var ge=P(be);F(qe=>J(ge,` ${qe??""}`),[()=>e(d)?f.chat_shared_copied_label():f.chat_shared_copy_label()]),g(V,pe)},$$slots:{default:!0}});var N=P(R,2);{var x=V=>{pt(V,{variant:"ghost-light",size:"sm",onclick:y,class:"h-7 px-2",children:(ne,pe)=>{xr();var be=Vr();F(ge=>J(be,ge),[()=>f.chat_setupScriptCard_useScript_label()]),g(ne,be)},$$slots:{default:!0}})};z(N,V=>{o()&&V(x)})}E(j),E(I);var ee=P(I,2),S=oe(ee,!0),T=P(ee,2),Me=oe(T,!0);return E(b),F(()=>{J(Q,n()),J(S,a()),J(Me,i())}),g(r,b),It(_)}const hr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class lu{constructor(){_n(this,"buffer","");_n(this,"currentToolName",null);_n(this,"currentToolId",null);_n(this,"lastToolId",null);_n(this,"currentToolParams",[]);_n(this,"currentToolResultContent",[]);_n(this,"inToolResult",!1);_n(this,"inCodeBlock",!1);_n(this,"codeBlockLanguage","");_n(this,"codeBlockContent","");_n(this,"characterBuffer","");_n(this,"inCharacterMode",!1);_n(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const i=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(_=>_.startsWith("❌")||_.startsWith("Error:")),y=this.currentToolResultContent.map(_=>_.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
|
|
2
2
|
`);i.push({type:"tool_result",content:y,metadata:{toolId:this.currentToolId,isError:c}}),this.lastToolId=this.currentToolId,this.currentToolId=null,this.inToolResult=!1,this.currentToolResultContent=[]}const o=t.indexOf("🤖"),d=t.substring(o+2);if(this.inCharacterMode=!0,this.characterBuffer="",d&&d.trim()&&d!==`
|
|
3
3
|
`){const c=d.replace(/^\n/,"");c&&(this.characterBuffer=c)}return i}if(this.inCharacterMode){if(t.trim()===""&&this.characterBuffer==="")return[];if(t.includes(`
|
|
4
4
|
`)&&this.characterBuffer.length>0){const i=t.substring(0,t.indexOf(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g_ as C,gG as G,I3 as E,IQ as z,sR as B,tM as F,zx as D,zy as $,I1 as H,I2 as N,zz as Q}from"./
|
|
1
|
+
import{g_ as C,gG as G,I3 as E,IQ as z,sR as B,tM as F,zx as D,zy as $,I1 as H,I2 as N,zz as Q}from"./DSAz0okZ.js";import{Q as f,o as V,C as K,e as U,l as y,p as j,u as q,v as J}from"./DgH1Kxzo.js";import{g as M}from"./C_J-ZvyS.js";import{bo as l}from"./BLK9_MXJ.js";import{b5 as X,a9 as g}from"./CukTrqVi.js";import{z as Y}from"./Cs29mItj.js";import{g as Z}from"./BOCB_5Mq.js";function S(e,t){const a=f.select(e.state),n=y.select(e.state);if(!n)return null;const c=a.indexOf(n),s=c+(t==="left"?-1:1),r=a[s];return c<0||!r?null:(e.dispatch(B(n,r,t==="left"?"before":"after")),n)}function A(e){const t=y.select(e);return t&&f.select(e).includes(t)?t:null}function w(e,t,a){const n=A(e.state),c=n?`/workspace/${n}`:M(e.state);return t!==c&&a(c),n}function ee(e,t,a,n){return e.dispatch(C(t)),w(e,a,n),t}function I(e,t){const n=t.match(/^\/workspace\/([^/]+)/)?.[1];return n?n==="new"?null:n:null}function v(e,t,a,n){if(a==="/")return O(e,t==="next"?0:"last",a,n);e.dispatch(t==="next"?H():N());const c=y.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return a!==s&&n(s),c}function te(e,t,a){const n=I(e,t);return n?ee(e,n,t,a):null}function ae(e,t,a){const n=I(e,t);if(!n)return null;const c=V.select(e.state,n);if(!c)return null;const s=c.tabs.find(T=>T.id===c.activeTabId),r=c.tabs.length===0&&c.activeTabId===null,m=K.select(e.state,n)>1&&(r||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!m)return null;const h=a??Z(n)?.availableCanvasWidth??void 0;return e.dispatch(G(n,void 0,h)),s?.id??c.id}function ne(e,t){const a=e.state.panelLayout.byWorkspaceId[t];return!a||a.restoreStatus==="pending"?!1:U.select(e.state,t).length===0}function oe(e,t,a){A(e.state)||e.dispatch(E(0)),w(e,t,a)}function x(e,t,{navigate:a,closeWindow:n}){return n?(n(),"window"):(w(e,t,a),null)}function ce(e,t,a){const n=I(e,t);return n?ae(e,t,a.availableCanvasWidth)!==null?"panel":ne(e,n)?(e.dispatch(C(n)),f.select(e.state).length>0?(oe(e,t,a.navigate),"workspace"):x(e,t,a)??"workspace"):null:f.select(e.state).length>0?null:x(e,t,a)}function se(e,t,a){return e.dispatch(Q()),w(e,t,a)}function le(e,t,a){const n=t.match(/^\/workspace\/([^/]+)/),c=n&&n[1]!=="new"?n[1]:null,s=q.select(e.state),r=c?J.select(e.state,c):null;return c&&r&&(!s||r.closedAt>=s.closedAt)?r.kind==="column"?(e.dispatch(D(c)),"column"):(e.dispatch($(c)),r.kind):s?(se(e,t,a),"workspace"):null}function re(e,t){const a=t.match(/^\/workspace\/([^/]+)/),n=a&&a[1]!=="new"?a[1]:null;if(!n)return null;const c=F(n);return e.dispatch(c),j.select(e.state,n)}function O(e,t,a,n){const c=f.select(e.state),s=t==="last"?c.length-1:t;return s<0||s>=c.length?null:(e.dispatch(E(s)),w(e,a,n))}function we({isMac:e,register:t,store:a,getCurrentPath:n,navigate:c,openNewWorkspace:s,onCreateAgent:r,onCreateNote:m,onCreateTerminal:h,onCreateBrowser:T,onWorkspaceTabMoved:W,closeWindow:L,resolveBinding:k}){const p=e?{meta:!0}:{ctrl:!0},P=X("TOGGLE_SIDEBAR",e),b=o=>()=>o(n()),R=o=>()=>{const u=n().match(/^\/workspace\/([^/]+)/);u?.[1]&&u[1]!=="new"&&o(u[1])},i=o=>k?{binding:()=>k(o)}:{};t({...i("global.new-space"),...p,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),t({...i("panel.toggle-sidebar"),...P,global:!0,description:g.TOGGLE_SIDEBAR.label,action:()=>a.dispatch(z())}),t({...i("navigation.new-tab"),...p,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:b(o=>re(a,o))});for(const[o,u,_,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),r],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),m],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),h],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),T]])d&&t({...i(o),...p,key:u,alt:!0,global:!0,allowInTerminal:!0,description:_,action:R(d)});t({...i("navigation.close-tab"),...p,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:b(o=>ce(a,o,{navigate:c,closeWindow:L}))}),t({...i("navigation.close-space-tab"),...p,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:b(o=>te(a,o,c))}),t({...i("navigation.reopen-tab"),...p,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:b(o=>le(a,o,c))}),t({...i("navigation.move-space-tab-left"),...p,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:g.MOVE_SPACE_TAB_LEFT.label,action:()=>{const o=S(a,"left");o&&W?.({workspaceId:o,position:f.select(a.state).indexOf(o)+1})}}),t({...i("navigation.move-space-tab-right"),...p,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:g.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const o=S(a,"right");o&&W?.({workspaceId:o,position:f.select(a.state).indexOf(o)+1})}});for(const[o,u]of[["next",!1],["previous",!0]]){t({...i(o==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:u,global:!0,description:o==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:b(d=>v(a,o,d,c))});const _=o==="next"?"global.next-space-alt":"global.previous-space-alt";t({...i(_),...p,key:o==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!k||!Y(_,d,k,e),description:o==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:b(d=>v(a,o,d,c))})}for(let o=1;o<=9;o++)t({...k?{binding:()=>k("navigation.go-to-tab").replace(/([1-8])-9$/,String(o))}:{},...p,key:String(o),global:!0,description:o===1?l.home_navigation_description():o===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:o}),action:b(u=>o===1?c("/"):O(a,o===9?"last":o-2,u,c))})}export{ce as c,we as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as W}from"./
|
|
1
|
+
import{I as W}from"./BVu_zw0i.js";import{p as X}from"./DI5kEG-f.js";import{b0 as z,a_ as G,aZ as Y,Y as P,U as F,V as Z,b as g,q as N,ay as A,aX as q,B as U,W as E,r as j,aV as J,a0 as K,O as Q,aO as ee}from"./B-obUB2z.js";import{p as te}from"./BuSLaAvw.js";var L=/[─━│┃└┗├┣]/,D=/[└┗├┣]/,ne=/[─━]/,V=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,$=/^\s*%%/,re=" ";function _(n){return n.some(t=>L.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=D.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
|
|
2
2
|
`),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p<t.length;p++){const c=t[p];c.trim()===""||$.test(c)||T.test(c)||V.test(c)||s.push(c.replace(/\t/g," "))}if(!_(s))return{text:n,lineMap:e};const i=M(s),o=[];let a=0;for(let p=0;p<=r;p++)o.push(t[p]),a++,e.set(a,p+1);for(let p=r+1;p<t.length;p++){const c=t[p],d=c.trim(),h=p+1;if(d===""){o.push(c),a++,e.set(a,h);continue}if($.test(c)){o.push(c),a++,e.set(a,h);continue}if(T.test(c)){o.push(c),a++,e.set(a,h);continue}if(V.test(c))continue;const l=c.replace(/\t/g," "),w=D.exec(l);if(w?.index!==void 0){const f=w.index,m=Math.round(f/i)+1;let u=f+1;for(;u<l.length&&ne.test(l[u]);)u++;for(;u<l.length&&l[u]===" ";)u++;const v=l.slice(u).trimEnd();if(!v)throw new Error(`Line ${h}: Empty node — expected a filename or directory name after the box-drawing prefix`);const O=re.repeat(m);o.push(O+v),a++,e.set(a,h)}else{if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;if(L.test(l))o.push(c),a++,e.set(a,h);else{if(/^\s+/.test(l))throw new Error(`Line ${h}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);o.push(c),a++,e.set(a,h)}}}return{text:o.join(`
|
|
3
3
|
`),lineMap:e}}g(R,"preprocessBoxDrawing");var x=new W(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ie=g(()=>{x.reset(),j()},"clear"),oe=g(()=>x.records.stack[0],"getRoot"),se=g(()=>x.records.cnt,"getCount"),ae=Q.treeView,ce=g(()=>N(ae,E().treeView),"getConfig"),le=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),de={clear:ie,addNode:le,getRoot:oe,getCount:se,getConfig:ce,getAccTitle:Z,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:z},I=de,he=g(n=>{X(n,I);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?J(c,E()):void 0;I.addNode(e,r,i,o,p,d)}},"populate"),pe={parse:g(async n=>{const{text:t,lineMap:e}=R(n);try{const r=await te("treeView",t);A.debug(r),he(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=S(r.message,e)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function H(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}g(H,"detectIcon");function C(n,t){return n.includes(":")?n:n in b.icons||!t?`${b.prefix}:${n}`:`${t}:${n}`}g(C,"qualifyIcon");function B(n,t){if(n.icon!=="none"){if(n.icon)return C(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=H(n.name,t);if(e==="none")return;if(e)return C(e,t.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}g(B,"getNodeIcon");ee([{name:b.prefix,icons:b}]);var y=14,ge=4,fe=16,ue=g(async(n,t)=>{const e=[],r=g(i=>{const o=B(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await K(i,{height:y,width:y})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=y+ge,c=B(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:w}=h.node().getBBox(),f=l+s.paddingY*2,m=n+s.paddingX+(d?p:0);h.attr("x",m),h.attr("y",t+f/2);const u=m+w,v=w+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:v,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),k=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),me=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,w)=>{const f=w*(l.rowIndent+l.paddingX),m=we(f,s,h,d,l,r);o.push(m);const{height:u,width:v}=h.BBox;k(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+v),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(m=>{p(m,h+1)});const{x:l,y:w,height:f}=d.BBox;if(d.children.length){const{y:m,height:u}=d.children[d.children.length-1].BBox;k(n,l+e.paddingX,w+f,l+e.paddingX,m+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+fe;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),xe=g(async(n,t,e,r)=>{A.debug(`Rendering treeView diagram
|
|
4
4
|
`+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=q(t),p=a.append("g");p.attr("class","tree-view");const c=await ue(i,o),{totalHeight:d,totalWidth:h}=me(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),U(a,d,h,o.useMaxWidth)},"draw"),ve={draw:xe},be=ve,Ie={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ce=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=N(Ie,n);return`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as O}from"./
|
|
1
|
+
import{d as O}from"./CFpa0qKK.js";function b(a,{from:t,to:r},p={}){var{delay:u=0,duration:n=i=>Math.sqrt(i)*120,easing:y=O}=p,s=getComputedStyle(a),d=s.transform==="none"?"":s.transform,[h,v]=s.transformOrigin.split(" ").map(parseFloat);h/=a.clientWidth,v/=a.clientHeight;var c=W(a),f=a.clientWidth/r.width/c,g=a.clientHeight/r.height/c,x=t.left+t.width*h,m=t.top+t.height*v,w=r.left+r.width*h,S=r.top+r.height*v,l=(x-w)*f,o=(m-S)*g,$=t.width/r.width,z=t.height/r.height;return{delay:u,duration:typeof n=="function"?n(Math.sqrt(l*l+o*o)):n,easing:y,css:(i,e)=>{var C=e*l,q=e*o,H=i+e*$,M=i+e*z;return`transform: ${d} translate(${C}px, ${q}px) scale(${H}, ${M});`}}}function W(a){if("currentCSSZoom"in a)return a.currentCSSZoom;for(var t=a,r=1;t!==null;)r*=+getComputedStyle(t).zoom,t=t.parentElement;return r}export{b as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as Ke,bq as k,a_ as H,bo as Se,by as Ue,b as Ve,q as ur,n as vr,r as gr,o as fr,p as hr,s as mr,bu as ht,bs as pr,f as _r,l as xr,g as br,e as wr,d as kr,m as yr,j as $r,i as Cr,h as Sr,k as Nr}from"./
|
|
1
|
+
import{t as Ke,bq as k,a_ as H,bo as Se,by as Ue,b as Ve,q as ur,n as vr,r as gr,o as fr,p as hr,s as mr,bu as ht,bs as pr,f as _r,l as xr,g as br,e as wr,d as kr,m as yr,j as $r,i as Cr,h as Sr,k as Nr}from"./BLK9_MXJ.js";import{bs as Je,ca as Ze,aD as e,ay as be,a5 as o,bH as L,bS as n,a7 as Pt,W as i,be as st,b$ as et,b_ as M,bO as S,bA as s,bl as O,bn as qe,bV as we,aA as y,c9 as _,aB as x,br as mt}from"./DYhIMPy1.js";import{nm as Rr,HR as ct,mt as Dt,eh as Mr,eB as Pr,eC as Lr}from"./DSAz0okZ.js";import{H as Te,C as Oe,y as Ir,h as at}from"./CFpa0qKK.js";import{dm as Ar,bd as Er}from"./ClKXAKis.js";import{ab as jt}from"./wCe59Qn_.js";import{I as it,k as He,h as Ge,i as Lt,s as Hr}from"./9ZBkr0Qf.js";import{f as xe}from"./CukTrqVi.js";import"./DSemZQdl.js";import{F as fe,a1 as zr,cM as Tr,av as ot,aw as pt,b_ as Wr,aT as Dr,bK as jr,bE as Fr,b7 as Br,cR as Gr,ci as Or,b4 as Ct,cW as Rt,cm as _t,bm as Kr,cA as Ur,at as Vr}from"./yDAFOpKJ.js";import{f as Jr}from"./Dx4FwkUV.js";import{N as Ft,B as qr}from"./Jyvn4VFV.js";import{H as Bt}from"./CoZ28bOB.js";import{I as Vt}from"./CAlQoToi.js";import"./Do2QraPX.js";import{M as Mt}from"./CxFIgZQh.js";import{w as St}from"./BA_dLJoi.js";const Qr=[/^diff --git /,/^index\s/,/^---\s/,/^\+\+\+\s/,/^\/];function Yr($){const r=[];if(!$)return r;const d=$.split(`
|
|
2
2
|
`);let m=null,b=0,u=0;const D=P=>{const h=P.match(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),J=h?parseInt(h[1],10):0,K=h&&h[2]?parseInt(h[2],10):null,pe=h?parseInt(h[3],10):0,q=h&&h[4]?parseInt(h[4],10):null;m={header:P,oldStart:J,oldLines:K,newStart:pe,newLines:q,lines:[]},r.push(m),b=J,u=pe};for(const P of d){if(P.startsWith("@@")){D(P);continue}if(!m)continue;const h=m;P.startsWith("+")?h.lines.push({type:"addition",content:P.slice(1),oldNum:null,newNum:u++,raw:P}):P.startsWith("-")?h.lines.push({type:"deletion",content:P.slice(1),oldNum:b++,newNum:null,raw:P}):P.startsWith(" ")?h.lines.push({type:"context",content:P.slice(1),oldNum:b++,newNum:u++,raw:P}):Qr.some(J=>J.test(P))||P.trim()===""&&h.lines.push({type:"context",content:"",oldNum:b++,newNum:u++,raw:P})}return r}var Xr=x('<div><!> <!> <!></div> <p class="text-ui text-subtle mt-1"> </p>',1);function Jt($,r){if(new.target)return Ke({component:Jt,...$});Je(r,!0);let d=k(r,"lineNumber",7,0),m=k(r,"fileName",7,""),b=k(r,"onSend",7),u=k(r,"onClose",7),D=k(r,"isSending",7,!1),P=k(r,"class",7,""),h=we(""),J=we(null);Ze(()=>{e(J)&&e(J).focus()});function K(){!e(h).trim()||D()||(b()?.(e(h).trim(),d(),m()),L(h,""))}function pe(I){I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),K()),I.key==="Escape"&&u()?.()}var q={get lineNumber(){return d()},set lineNumber(I=0){d(I),y()},get fileName(){return m()},set fileName(I=""){m(I),y()},get onSend(){return b()},set onSend(I){b(I),y()},get onClose(){return u()},set onClose(I){u(I),y()},get isSending(){return D()},set isSending(I=!1){D(I),y()},get class(){return P()},set class(I=""){P(I),y()},$set:Ue,$on:(I,he)=>Ve(r,I,he)},w=Xr(),z=be(w),de=o(z);{let I=_(()=>Se.codeReview_inlineComment_askLine_placeholder());Vt(de,{onkeydown:pe,get placeholder(){return e(I)},get disabled(){return D()},class:"flex-1 h-8 rounded-md border border-border bg-background px-3 text-sm placeholder:text-muted-foreground disabled:opacity-50",get ref(){return e(J)},set ref(he){L(J,he,!0)},get value(){return e(h)},set value(he){L(h,he,!0)}})}var ce=n(de,2);{let I=_(()=>!e(h).trim()||D());xe(ce,{type:"button",variant:"primary",onclick:K,get disabled(){return e(I)},class:"h-8 w-8 p-0",children:(he,Ne)=>{var _e=Pt(),C=be(_e);{var E=me=>{it(me,{size:14})},Ie=me=>{fe(me,{get icon(){return zr},class:"h-3.5 w-3.5"})};H(C,me=>{D()?me(E):me(Ie,-1)})}i(he,_e)},$$slots:{default:!0}})}var ae=n(ce,2);xe(ae,{type:"button",variant:"ghost",onclick:()=>u()?.(),class:"h-8 px-2 text-xs text-muted-foreground hover:text-foreground transition-colors",children:(I,he)=>{st();var Ne=et();M(_e=>S(Ne,_e),[()=>Se.codeReview_inlineComment_cancel_label()]),i(I,Ne)},$$slots:{default:!0}}),s(z);var te=n(z,2),ke=O(te,!0);return M(I=>{He(z,1,`walkthrough-inline-comment flex items-center gap-2 ${P()??""}`),S(ke,I)},[()=>Se.codeReview_inlineComment_inputHint_label()]),i($,w),qe(q)}var Zr=x('<div class="text-xs text-slate-400 dark:text-slate-500 mt-1"> </div>'),en=x('<span class="font-medium"> </span> <!>',1),tn=x('<div class="flex items-start gap-3 py-2"><div><!></div> <div class="flex-1 min-w-0"><div class="text-sm leading-relaxed text-slate-700 dark:text-slate-300"><!></div></div></div>'),rn=x('<div class="px-4 pb-3 divide-y divide-border"></div>'),nn=x('<div class="border-t border-border"><!> <!></div>'),an=x('<div class="flex items-center gap-2 px-4 py-2 text-xs text-slate-500 dark:text-slate-400 border-t border-border"><!> <span> </span></div>'),sn=x('<div class="flex items-center gap-2"><!> <!> <!></div> <p class="text-ui text-slate-400 dark:text-slate-500 mt-1"> </p>',1),on=x("<!> <span> </span>",1),ln=x('<div><div class="flex items-start gap-3 px-4 py-3"><div class="shrink-0 mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="text-sm text-slate-800 dark:text-slate-200 leading-relaxed"><!></div> <!></div> <!></div> <!> <!> <div class="border-t border-border px-4 py-2"><!></div></div>');function qt($,r){if(new.target)return Ke({component:qt,...$});Je(r,!0);let d=k(r,"annotation",7),m=k(r,"lineNumber",7),b=k(r,"fileName",7),u=k(r,"messages",23,()=>[]),D=k(r,"onSendMessage",7),P=k(r,"onClose",7),h=k(r,"isSending",7,!1),J=k(r,"isAgentResponding",7,!1),K=k(r,"timestamp",7),pe=k(r,"class",7,""),q=we(""),w=we(!1),z=we(!1),de=we(null);Ze(()=>{e(w)&&e(de)&&e(de).focus()});function ce(){!e(q).trim()||h()||(D()?.(e(q).trim(),m(),b()),L(q,""))}function ae(a){a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),ce()),a.key==="Escape"&&(e(q)?L(q,""):L(w,!1))}function te(a){switch(a){case"highlight":return Br;case"context":return Fr;case"explanation":default:return jr}}function ke(a){switch(a){case"highlight":return"text-orange-500";case"context":return"text-blue-500";case"explanation":default:return"text-warning-ink"}}function I(a){return a?Ir(a):""}const he=_(()=>u().length>0);var Ne={get annotation(){return d()},set annotation(a){d(a),y()},get lineNumber(){return m()},set lineNumber(a){m(a),y()},get fileName(){return b()},set fileName(a){b(a),y()},get messages(){return u()},set messages(a=[]){u(a),y()},get onSendMessage(){return D()},set onSendMessage(a){D(a),y()},get onClose(){return P()},set onClose(a){P(a),y()},get isSending(){return h()},set isSending(a=!1){h(a),y()},get isAgentResponding(){return J()},set isAgentResponding(a=!1){J(a),y()},get timestamp(){return K()},set timestamp(a){K(a),y()},get class(){return pe()},set class(a=""){pe(a),y()},$set:Ue,$on:(a,W)=>Ve(r,a,W)},_e=ln(),C=o(_e),E=o(C),Ie=o(E);{let a=_(()=>te(d().type)),W=_(()=>ke(d().type));fe(Ie,{get icon(){return e(a)},get class(){return`h-4 w-4 ${e(W)??""}`}})}s(E);var me=n(E,2),v=o(me),R=o(v);Mt(R,{get content(){return d().message},className:"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0"}),s(v);var A=n(v,2);{var X=a=>{var W=Zr(),Z=O(W,!0);M(ee=>S(Z,ee),[()=>I(K())]),i(a,W)};H(A,a=>{K()&&a(X)})}s(me);var ie=n(me,2);{var $e=a=>{{let W=_(()=>Se.codeReview_commentThread_dismiss_tooltip());xe(a,{type:"button",variant:"ghost",size:"icon-compact",iconOnly:!0,get onclick(){return P()},class:"shrink-0 text-slate-400 hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300 transition-colors",get title(){return e(W)},children:(Z,ee)=>{fe(Z,{get icon(){return Tr}})},$$slots:{default:!0}})}};H(ie,a=>{P()&&a($e)})}s(C);var Ce=n(C,2);{var ye=a=>{var W=nn(),Z=o(W);xe(Z,{type:"button",variant:"ghost",onclick:()=>L(z,!e(z)),class:"w-full flex items-center justify-between px-4 py-2 text-sm text-slate-600 dark:text-slate-400 hover:bg-slate-50 dark:hover:bg-slate-800/50 transition-colors",children:(Q,se)=>{var Y=en(),c=be(Y),p=O(c,!0),B=n(c,2);{let ue=_(()=>e(z)?ot:pt);fe(B,{get icon(){return e(ue)},class:"h-3 w-3"})}M(ue=>S(p,ue),[()=>Se.codeReview_commentThread_suggestedChanges_label()]),i(Q,Y)},$$slots:{default:!0}});var ee=n(Z,2);{var re=Q=>{var se=rn();Ge(se,21,u,Y=>Y.id,(Y,c)=>{var p=tn(),B=o(p),ue=o(B);{let g=_(()=>e(c).type==="user"?Gr:Or),N=_(()=>e(c).type==="user"?"text-blue-600 dark:text-blue-400":"text-purple-600 dark:text-purple-400");fe(ue,{get icon(){return e(g)},get class(){return`h-2.5 w-2.5 ${e(N)??""}`}})}s(B);var Re=n(B,2),t=o(Re),l=o(t);Mt(l,{get content(){return e(c).content},className:"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0"}),s(t),s(Re),s(p),M(()=>He(B,1,`shrink-0 flex h-5 w-5 items-center justify-center rounded-full ${e(c).type==="user"?"bg-blue-100 dark:bg-blue-900/50":"bg-purple-100 dark:bg-purple-900/50"}`)),Te(3,p,()=>at,()=>({axis:"y",distance:4,tier:"moderate"})),i(Y,p)}),s(se),Te(3,se,()=>Oe,()=>({tier:"moderate"})),i(Q,se)};H(ee,Q=>{e(z)&&Q(re)})}s(W),i(a,W)};H(Ce,a=>{e(he)&&a(ye)})}var U=n(Ce,2);{var j=a=>{var W=an(),Z=o(W);it(Z,{size:12});var ee=n(Z,2),re=O(ee,!0);s(W),M(Q=>S(re,Q),[()=>Se.codeReview_commentThread_agentResponding_label()]),i(a,W)};H(U,a=>{J()&&a(j)})}var f=n(U,2),T=o(f);{var F=a=>{var W=sn(),Z=be(W),ee=o(Z);{let c=_(()=>Se.codeReview_commentThread_followUp_placeholder());Vt(ee,{onkeydown:ae,get placeholder(){return e(c)},get disabled(){return h()},class:"flex-1 h-8 rounded-md border border-border bg-white dark:bg-slate-800 px-3 text-sm placeholder:text-slate-400 disabled:opacity-50",get ref(){return e(de)},set ref(p){L(de,p,!0)},get value(){return e(q)},set value(p){L(q,p,!0)}})}var re=n(ee,2);{let c=_(()=>!e(q).trim()||h());xe(re,{type:"button",variant:"primary",onclick:ce,get disabled(){return e(c)},class:"h-8 w-8 p-0",children:(p,B)=>{var ue=Pt(),Re=be(ue);{var t=g=>{it(g,{size:14})},l=g=>{fe(g,{get icon(){return Wr},class:"h-3 w-3"})};H(Re,g=>{h()?g(t):g(l,-1)})}i(p,ue)},$$slots:{default:!0}})}var Q=n(re,2);xe(Q,{type:"button",variant:"ghost",onclick:()=>{L(w,!1),L(q,"")},class:"h-8 px-2 text-xs text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200 transition-colors",children:(c,p)=>{st();var B=et();M(ue=>S(B,ue),[()=>Se.codeReview_commentThread_cancel_label()]),i(c,B)},$$slots:{default:!0}}),s(Z);var se=n(Z,2),Y=O(se,!0);M(c=>S(Y,c),[()=>Se.codeReview_commentThread_inputHint_label()]),Te(3,Z,()=>Oe,()=>({tier:"fast"})),i(a,W)},le=a=>{xe(a,{type:"button",variant:"ghost",onclick:()=>L(w,!0),class:"flex items-center gap-1.5 text-xs text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 transition-colors",children:(W,Z)=>{var ee=on(),re=be(ee);fe(re,{get icon(){return Dr},class:"h-3 w-3"});var Q=n(re,2),se=O(Q,!0);M(Y=>S(se,Y),[()=>Se.codeReview_commentThread_askQuestion_label()]),i(W,ee)},$$slots:{default:!0}})};H(T,a=>{e(w)?a(F):a(le,-1)})}return s(f),s(_e),M(()=>He(_e,1,`walkthrough-comment-thread relative flex w-full flex-col bg-white shadow-sm dark:bg-slate-900 ${pe()??""}`)),Te(3,_e,()=>Oe,()=>({tier:"moderate"})),i($,_e),qe(Ne)}var dn=x('<span class="text-emerald-600 dark:text-emerald-400 font-medium"> </span>'),cn=x('<!> <svg class="h-4 w-4 text-ghost shrink-0" viewBox="0 0 16 16" fill="currentColor"><path d="M3.5 1.5A1.5 1.5 0 0 1 5 0h6a1.5 1.5 0 0 1 1.5 1.5v12A1.5 1.5 0 0 1 11 15H5a1.5 1.5 0 0 1-1.5-1.5v-12zm2 0v12h6v-12H5.5z"></path></svg> <div class="flex items-baseline gap-2 flex-1 min-w-0"><span class="text-sm font-medium text-foreground truncate"> </span> <span class="text-xs text-subtle truncate hidden sm:inline"> </span></div> <div class="flex items-center gap-1 text-xs shrink-0"><!></div>',1),un=x('<div class="px-4 pb-3 -mt-1"><p class="text-sm text-subtle"> </p></div>'),vn=x('<div><div><span class="w-12 px-2 text-right text-ui text-subtle tabular-nums"> </span></div> <span> </span> <pre class="flex-1 px-1 whitespace-pre overflow-hidden text-ellipsis"><code class="hljs"></code></pre></div>'),gn=x('<div class="border-t border-border"><div class="font-mono text-xs leading-relaxed text-muted-foreground"><!> <!></div></div>'),fn=x('<span class="text-subtle">·</span> <!>',1),hn=x('<div class="flex items-center justify-end gap-2 px-3 py-1.5 bg-muted/20 border-b border-border text-xs"><!> <!></div>'),Gt=x("<!> <span> </span> <!>",1),mn=x('<div class="ml-20"><!></div>'),pn=x('<div class="ml-20 border-l-2 border-primary-ink/50 bg-muted/20"><div class="p-3"><!></div></div>'),_n=x('<div><div><span class="w-10 px-2 text-right text-ui text-subtle tabular-nums"> </span> <span class="w-10 px-2 text-right text-ui text-subtle tabular-nums"> </span></div> <span> </span> <div class="flex-1 flex items-center min-w-0 pr-2"><pre class="flex-1 px-1 whitespace-pre overflow-x-auto"><code class="hljs"></code></pre> <!></div></div> <!> <!> <!>',1),xn=x("<!> <!>",1),bn=x('<div class="relative"><!> <div class="overflow-x-auto"><div class="font-mono text-xs leading-relaxed min-w-full"></div></div></div>'),wn=x('<div><div class="flex flex-col border-b border-border"><!> <!></div> <!> <!></div>');function It($,r){if(new.target)return Ke({component:It,...$});Je(r,!0);let d=k(r,"fileName",7),m=k(r,"patch",7),b=k(r,"annotations",23,()=>[]),u=k(r,"initialCollapsed",7,!1),D=k(r,"contextLines",7,3),P=k(r,"onSendMessage",7),h=k(r,"isSending",7,!1),J=k(r,"additions",7,0),K=k(r,"deletions",7,0),pe=k(r,"fileDescription",7,""),q=k(r,"class",7,"");const w=_(()=>Yr(m())),z=_(()=>Rr(d())),de=_(()=>{const t=new Map;return!e(z)||e(z)==="text"||e(z)==="plaintext"||!Bt.getLanguage(e(z))||e(w).forEach(l=>{const g=[];if(l.lines.forEach(N=>{const G=N.content||"",V=`${N.oldNum}-${N.newNum}`;g.push({content:G,key:V})}),g.length!==0)try{const N=g.map(ne=>ne.content).join(`
|
|
3
3
|
`),V=Bt.highlight(N,{language:e(z)}).value.split(`
|
|
4
4
|
`);g.forEach((ne,oe)=>{oe<V.length&&t.set(ne.key,V[oe])})}catch(N){console.warn("Failed to highlight hunk:",N)}}),t});let ce=we(mt(u())),ae=we(mt(new Set)),te=we(null);const ke=_(()=>{const t=new Map;for(const l of b()){const g=t.get(l.line)||[];g.push(l),t.set(l.line,g)}return t}),I=_(()=>new Set(b().map(t=>t.line)));function he(t){if(t.type==="deletion")return[];const l=t.newNum;return l==null?[]:e(ke).get(l)||[]}function Ne(t,l,g){if(g.type==="addition"||g.type==="deletion")return!0;const N=g.newNum??g.oldNum;if(N!==null&&e(I).has(N))return!0;const G=e(w)[t];if(!G)return!1;for(let V=Math.max(0,l-D());V<=Math.min(G.lines.length-1,l+D());V++){const ne=G.lines[V];if(ne.type==="addition"||ne.type==="deletion")return!0;const oe=ne.newNum??ne.oldNum;if(oe!==null&&e(I).has(oe))return!0}for(const V of e(ae)){const[ne,oe,ve]=V.split("-").map(Number);if(ne===t&&l>=oe&&l<=ve)return!0}return!1}function _e(t){const l=e(w)[t];if(!l)return[];const g=[];let N=null;for(let G=0;G<l.lines.length;G++){const V=Ne(t,G,l.lines[G]);!V&&N===null?N=G:V&&N!==null&&(g.push({startIndex:N,endIndex:G-1,count:G-N}),N=null)}return N!==null&&g.push({startIndex:N,endIndex:l.lines.length-1,count:l.lines.length-N}),g}function C(t,l,g){const N=`${t}-${l}-${g}`;e(ae).add(N),L(ae,new Set(e(ae)),!0)}function E(){for(let t=0;t<e(w).length;t++){const l=e(w)[t];C(t,0,l.lines.length-1)}}function Ie(){L(ae,new Set,!0)}function me(t){const l=`${t.oldNum}-${t.newNum}`,g=e(de).get(l);return g!==void 0?g:v(t.content||"")}function v(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function R(t){switch(t.type){case"addition":return"bg-emerald-500/5 dark:bg-emerald-500/10";case"deletion":return"bg-red-500/5 dark:bg-red-500/10";default:return""}}function A(t){switch(t.type){case"addition":return"text-emerald-600 dark:text-emerald-400 font-medium";case"deletion":return"text-red-600 dark:text-red-400 font-medium";default:return"text-transparent"}}function X(t){switch(t.type){case"addition":return"+";case"deletion":return"-";default:return" "}}function ie(t){switch(t.type){case"addition":return"bg-emerald-500/10 dark:bg-emerald-500/15";case"deletion":return"bg-red-500/10 dark:bg-red-500/15";default:return"bg-muted/30"}}function $e(){L(ce,!e(ce))}function Ce(t){L(te,t,!0)}function ye(){L(te,null)}function U(t,l,g){P()?.(t,l,g),L(te,null)}const j=_(()=>()=>{const t=d().split("/");return t[t.length-1]}),f=_(()=>()=>{const t=d().split("/");return t.length<=1?"":t.slice(0,-1).join("/")}),T=_(()=>{for(let t=0;t<e(w).length;t++)if(_e(t).length>0)return!0;return!1}),F=_(()=>{const l=[];for(let g=0;g<e(w).length&&l.length<3;g++){const N=e(w)[g];for(let G=0;G<N.lines.length&&l.length<3;G++){const V=N.lines[G];(V.type==="addition"||V.type==="deletion")&&l.push({line:V,hunkIndex:g,lineIndex:G})}}return l}),le=_(()=>{let t=0;for(const l of e(w))for(const g of l.lines)(g.type==="addition"||g.type==="deletion")&&t++;return t});let a=we(mt(new Map));function W(t){return`${t.file}:${t.line}:${t.type}`}function Z(t){return e(a).get(W(t))||[]}var ee={get fileName(){return d()},set fileName(t){d(t),y()},get patch(){return m()},set patch(t){m(t),y()},get annotations(){return b()},set annotations(t=[]){b(t),y()},get initialCollapsed(){return u()},set initialCollapsed(t=!1){u(t),y()},get contextLines(){return D()},set contextLines(t=3){D(t),y()},get onSendMessage(){return P()},set onSendMessage(t){P(t),y()},get isSending(){return h()},set isSending(t=!1){h(t),y()},get additions(){return J()},set additions(t=0){J(t),y()},get deletions(){return K()},set deletions(t=0){K(t),y()},get fileDescription(){return pe()},set fileDescription(t=""){pe(t),y()},get class(){return q()},set class(t=""){q(t),y()},$set:Ue,$on:(t,l)=>Ve(r,t,l)},re=wn(),Q=o(re),se=o(Q);xe(se,{type:"button",variant:"ghost",class:"w-full flex items-center gap-2 px-4 py-3 hover:bg-muted/30 transition-colors text-left group",onclick:$e,children:(t,l)=>{var g=cn(),N=be(g);{let Le=_(()=>e(ce)?pt:ot);fe(N,{get icon(){return e(Le)},class:"h-3 w-3 text-ghost shrink-0"})}var G=n(N,4),V=o(G),ne=O(V,!0),oe=n(V,2),ve=O(oe,!0);s(G);var Me=n(G,2),Ae=o(Me);{var We=Le=>{var Ee=dn(),Fe=O(Ee);M(()=>S(Fe,`+${J()+K()}`)),i(Le,Ee)};H(Ae,Le=>{(J()>0||K()>0)&&Le(We)})}s(Me),M((Le,Ee)=>{S(ne,Le),S(ve,Ee)},[()=>e(j)(),()=>e(f)()]),i(t,g)},$$slots:{default:!0}});var Y=n(se,2);{var c=t=>{var l=un(),g=o(l),N=O(g,!0);s(l),M(()=>S(N,pe())),i(t,l)};H(Y,t=>{pe()&&t(c)})}s(Q);var p=n(Q,2);{var B=t=>{var l=gn(),g=o(l),N=o(g);Ge(N,17,()=>e(F),({line:ne,hunkIndex:oe,lineIndex:ve})=>`preview-${oe}-${ve}`,(ne,oe)=>{let ve=()=>e(oe).line;var Me=vn(),Ae=o(Me),We=o(Ae),Le=O(We,!0);s(Ae);var Ee=n(Ae,2),Fe=O(Ee,!0),De=n(Ee,2),ge=o(De);Ft(ge,()=>me(ve()),!0),s(ge),s(De),s(Me),M((Qe,Ye,Xe,tt)=>{He(Me,1,`flex ${Qe??""}`),He(Ae,1,`w-12 shrink-0 flex select-none ${Ye??""} border-r border-border`),S(Le,ve().newNum??ve().oldNum??""),He(Ee,1,`w-5 shrink-0 text-center select-none ${Xe??""}`),S(Fe,tt)},[()=>R(ve()),()=>ie(ve()),()=>A(ve()),()=>X(ve())]),i(ne,Me)});var G=n(N,2);{var V=ne=>{xe(ne,{type:"button",variant:"ghost",class:"w-full py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors text-center",onclick:$e,children:(oe,ve)=>{st();var Me=et();M(Ae=>S(Me,Ae),[()=>Se.codeReview_fileDiff_moreLines_label({count:e(le)-e(F).length})]),i(oe,Me)},$$slots:{default:!0}})};H(G,ne=>{e(le)>e(F).length&&ne(V)})}s(g),s(l),Te(3,l,()=>Oe,()=>({tier:"moderate"})),i(t,l)};H(p,t=>{e(ce)&&e(F).length>0&&t(B)})}var ue=n(p,2);{var Re=t=>{var l=bn(),g=o(l);{var N=ne=>{var oe=hn(),ve=o(oe);xe(ve,{type:"button",variant:"ghost",class:"text-muted-foreground hover:text-foreground transition-colors",onclick:E,children:(We,Le)=>{st();var Ee=et();M(Fe=>S(Ee,Fe),[()=>Se.codeReview_fileDiff_expandAll_label()]),i(We,Ee)},$$slots:{default:!0}});var Me=n(ve,2);{var Ae=We=>{var Le=fn(),Ee=n(be(Le),2);xe(Ee,{type:"button",variant:"ghost",class:"text-muted-foreground hover:text-foreground transition-colors",onclick:Ie,children:(Fe,De)=>{st();var ge=et();M(Qe=>S(ge,Qe),[()=>Se.codeReview_fileDiff_collapse_label()]),i(Fe,ge)},$$slots:{default:!0}}),i(We,Le)};H(Me,We=>{e(ae).size>0&&We(Ae)})}s(oe),i(ne,oe)};H(g,ne=>{e(T)&&ne(N)})}var G=n(g,2),V=o(G);Ge(V,21,()=>e(w),Lt,(ne,oe,ve)=>{const Me=_(()=>_e(ve)),Ae=_(()=>e(Me).find(De=>De.startIndex===0));var We=xn(),Le=be(We);{var Ee=De=>{xe(De,{type:"button",variant:"ghost",class:"w-full flex items-center justify-center gap-2 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors border-b border-border",onclick:()=>C(ve,e(Ae).startIndex,e(Ae).endIndex),children:(ge,Qe)=>{var Ye=Gt(),Xe=be(Ye);fe(Xe,{get icon(){return ot},class:"h-2.5 w-2.5"});var tt=n(Xe,2),xt=O(tt,!0),rt=n(tt,2);fe(rt,{get icon(){return ot},class:"h-2.5 w-2.5"}),M(ut=>S(xt,ut),[()=>Se.codeReview_fileDiff_showHidden_label({count:e(Ae).count})]),i(ge,Ye)},$$slots:{default:!0}})};H(Le,De=>{e(Ae)&&De(Ee)})}var Fe=n(Le,2);Ge(Fe,19,()=>e(oe).lines,(De,ge)=>`${ve}-${ge}`,(De,ge,Qe)=>{const Ye=_(()=>`${e(ge).oldNum}-${e(ge).newNum}`),Xe=_(()=>he(e(ge))),tt=_(()=>e(te)===e(Ye)),xt=_(()=>Ne(ve,e(Qe),e(ge))),rt=_(()=>e(Me).find(lt=>lt.startIndex===e(Qe)+1));var ut=Pt(),er=be(ut);{var tr=lt=>{var At=_n(),vt=be(At),gt=o(vt),Et=o(gt),rr=O(Et,!0),nr=n(Et,2),ar=O(nr,!0);s(gt);var bt=n(gt,2),sr=O(bt,!0),Ht=n(bt,2),wt=o(Ht),zt=o(wt);Ft(zt,()=>me(e(ge)),!0),s(zt),s(wt);var or=n(wt,2);{var ir=Pe=>{{let ze=_(()=>Se.codeReview_fileDiff_askLine_tooltip());xe(Pe,{type:"button",variant:"ghost",size:"icon-compact",iconOnly:!0,class:"size-5 opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-primary-ink transition-all shrink-0",onclick:()=>Ce(e(Ye)),get title(){return e(ze)},children:(je,Be)=>{fe(je,{get icon(){return Ct}})},$$slots:{default:!0}})}};H(or,Pe=>{P()&&Pe(ir)})}s(Ht),s(vt);var Tt=n(vt,2);Ge(Tt,19,()=>e(Xe),(Pe,ze)=>`${Pe.line}-${ze}`,(Pe,ze)=>{var je=mn(),Be=o(je);{let nt=_(()=>e(ge).newNum??e(ge).oldNum??0),ft=_(()=>Z(e(ze)));qt(Be,{get annotation(){return e(ze)},get lineNumber(){return e(nt)},get fileName(){return d()},get messages(){return e(ft)},onSendMessage:(kt,yt,$t)=>U(kt,yt,$t),get isSending(){return h()}})}s(je),Te(3,je,()=>Oe,()=>({tier:"moderate"})),i(Pe,je)});var Wt=n(Tt,2);{var lr=Pe=>{var ze=pn(),je=o(ze),Be=o(je);{let nt=_(()=>e(ge).newNum??e(ge).oldNum??0);Jt(Be,{get lineNumber(){return e(nt)},get fileName(){return d()},onSend:U,onClose:ye,get isSending(){return h()}})}s(je),s(ze),i(Pe,ze)};H(Wt,Pe=>{e(tt)&&e(Xe).length===0&&Pe(lr)})}var dr=n(Wt,2);{var cr=Pe=>{xe(Pe,{type:"button",variant:"ghost",class:"w-full flex items-center justify-center gap-2 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors border-y border-border bg-muted/10",onclick:()=>C(ve,e(rt).startIndex,e(rt).endIndex),children:(ze,je)=>{var Be=Gt(),nt=be(Be);fe(nt,{get icon(){return Ct},class:"h-2.5 w-2.5"});var ft=n(nt,2),kt=O(ft,!0),yt=n(ft,2);fe(yt,{get icon(){return Ct},class:"h-2.5 w-2.5"}),M($t=>S(kt,$t),[()=>Se.codeReview_fileDiff_showHidden_label({count:e(rt).count})]),i(ze,Be)},$$slots:{default:!0}})};H(dr,Pe=>{e(rt)&&Pe(cr)})}M((Pe,ze,je,Be)=>{He(vt,1,`group flex ${Pe??""} hover:bg-accent/30 transition-colors`),He(gt,1,`w-20 shrink-0 flex select-none ${ze??""} border-r border-border`),S(rr,e(ge).oldNum??""),S(ar,e(ge).newNum??""),He(bt,1,`w-5 shrink-0 text-center select-none ${je??""}`),S(sr,Be)},[()=>R(e(ge)),()=>ie(e(ge)),()=>A(e(ge)),()=>X(e(ge))]),i(lt,At)};H(er,lt=>{e(xt)&<(tr)})}i(De,ut)}),i(ne,We)}),s(V),s(G),s(l),Te(3,l,()=>Oe,()=>({tier:"moderate"})),i(t,l)};H(ue,t=>{e(ce)||t(Re)})}return s(re),M(()=>He(re,1,`walkthrough-file-diff overflow-hidden bg-card ${q()??""}`)),i($,re),qe(ee)}var kn=x('<div class="flex items-start gap-3"><div class="shrink-0 mt-0.5"><svg viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M2 6a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1H8a3 3 0 00-3 3v1.5a1.5 1.5 0 01-3 0V6z" clip-rule="evenodd"></path><path d="M6 12a2 2 0 012-2h8a2 2 0 012 2v2a2 2 0 01-2 2H2h2a2 2 0 002-2v-2z"></path></svg></div> <div class="flex-1 min-w-0"><h4 class="text-sm font-medium text-foreground line-clamp-2"> </h4> <p class="text-xs text-subtle mt-1 line-clamp-2"> </p> <div class="flex items-center gap-1 mt-2 text-xs text-subtle"><svg class="h-3.5 w-3.5" viewBox="0 0 16 16" fill="currentColor"><path d="M3.5 1.5A1.5 1.5 0 0 1 5 0h6a1.5 1.5 0 0 1 1.5 1.5v12A1.5 1.5 0 0 1 11 15H5a1.5 1.5 0 0 1-1.5-1.5v-12z"></path></svg> <span> </span></div></div></div>'),yn=x('<div><div class="mb-4"><h3 class="text-sm font-medium text-subtle"> </h3></div> <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3"></div></div>');function Qt($,r){if(new.target)return Ke({component:Qt,...$});Je(r,!0);let d=k(r,"categories",7),m=k(r,"onCategoryClick",7),b=k(r,"class",7,"");function u(w){const z=["bg-blue-500/10 border-blue-500/30 hover:border-blue-500/50","bg-purple-500/10 border-purple-500/30 hover:border-purple-500/50","bg-emerald-500/10 border-emerald-500/30 hover:border-emerald-500/50","bg-warning/10 border-warning/30 hover:border-warning/30","bg-rose-500/10 border-rose-500/30 hover:border-rose-500/50","bg-cyan-500/10 border-cyan-500/30 hover:border-cyan-500/50"];return z[w%z.length]}function D(w){const z=["text-blue-500","text-purple-500","text-emerald-500","text-warning-ink","text-rose-500","text-cyan-500"];return z[w%z.length]}var P={get categories(){return d()},set categories(w){d(w),y()},get onCategoryClick(){return m()},set onCategoryClick(w){m(w),y()},get class(){return b()},set class(w=""){b(w),y()},$set:Ue,$on:(w,z)=>Ve(r,w,z)},h=yn(),J=o(h),K=o(J),pe=O(K,!0);s(J);var q=n(J,2);return Ge(q,21,d,Lt,(w,z,de)=>{{let ce=_(()=>u(de));xe(w,{type:"button",variant:"ghost",get class(){return`text-left p-4 rounded-lg border transition-all duration-spring-moderate ease-spring-moderate motion-reduce:transition-none ${e(ce)??""}`},onclick:()=>m()?.(de),children:(ae,te)=>{var ke=kn(),I=o(ke),he=O(I),Ne=n(I,2),_e=o(Ne),C=O(_e,!0),E=n(_e,2),Ie=O(E,!0),me=n(E,2),v=n(o(me),2),R=O(v,!0);s(me),s(Ne),s(ke),M((A,X)=>{He(he,0,`h-5 w-5 ${A??""}`),S(C,e(z).title),S(Ie,e(z).description),S(R,X)},[()=>D(de),()=>e(z).files.length===1?Se.codeReview_categoriesGrid_fileCount_one({count:e(z).files.length}):Se.codeReview_categoriesGrid_fileCount_many({count:e(z).files.length})]),i(ae,ke)},$$slots:{default:!0}})}}),s(q),s(h),M(w=>{He(h,1,`walkthrough-categories-grid ${b()??""}`),S(pe,w)},[()=>Se.codeReview_categoriesGrid_whatChanged_title()]),i($,h),qe(P)}var $n=x('<div class="w-0.5 flex-1 bg-border min-h-5"></div>'),Cn=x('<p class="text-sm text-subtle mt-2"> </p>'),Sn=x('<div class="rounded-lg border border-border bg-card p-4"><div class="flex items-center gap-2"><svg class="h-4 w-4 text-ghost" viewBox="0 0 16 16" fill="currentColor"><path d="M3.5 1.5A1.5 1.5 0 0 1 5 0h6a1.5 1.5 0 0 1 1.5 1.5v12A1.5 1.5 0 0 1 11 15H5a1.5 1.5 0 0 1-1.5-1.5v-12z"></path></svg> <span class="text-sm font-medium text-foreground"> </span></div> <!></div>'),Nn=x('<div class="flex gap-4"><div class="relative flex flex-col items-center w-3"><div></div> <div class="absolute top-4 w-2 h-2 rounded-full bg-muted-foreground/30 ring-2 ring-background"></div></div> <div class="flex-1 min-w-0 pb-4"><!></div></div>'),Rn=x('<div><div class="flex items-start gap-4 mb-4"><div class="relative flex flex-col items-center"><div></div> <!></div> <div class="flex-1 min-w-0 -mt-0.5"><h3 class="text-base font-semibold text-foreground"> </h3> <p class="text-sm text-subtle mt-1"> </p></div></div> <div class="relative"></div></div>');function Yt($,r){if(new.target)return Ke({component:Yt,...$});Je(r,!0);let d=k(r,"category",7),m=k(r,"categoryIndex",7),b=k(r,"filePatchMap",7),u=k(r,"isLast",7,!1),D=k(r,"onSendMessage",7),P=k(r,"isSending",7,!1),h=k(r,"class",7,"");function J(C){const E=["bg-blue-500","bg-purple-500","bg-emerald-500","bg-warning","bg-rose-500","bg-cyan-500"];return E[C%E.length]}const K=_(()=>d().files.map(C=>{const E=b().get(C.path);return{...C,patch:E?.patch,additions:E?.additions??0,deletions:E?.deletions??0}}));var pe={get category(){return d()},set category(C){d(C),y()},get categoryIndex(){return m()},set categoryIndex(C){m(C),y()},get filePatchMap(){return b()},set filePatchMap(C){b(C),y()},get isLast(){return u()},set isLast(C=!1){u(C),y()},get onSendMessage(){return D()},set onSendMessage(C){D(C),y()},get isSending(){return P()},set isSending(C=!1){P(C),y()},get class(){return h()},set class(C=""){h(C),y()},$set:Ue,$on:(C,E)=>Ve(r,C,E)},q=Rn(),w=o(q),z=o(w),de=o(z),ce=n(de,2);{var ae=C=>{var E=$n();i(C,E)};H(ce,C=>{(!u()||e(K).length>0)&&C(ae)})}s(z);var te=n(z,2),ke=o(te),I=O(ke,!0),he=n(ke,2),Ne=O(he,!0);s(te),s(w);var _e=n(w,2);return Ge(_e,23,()=>e(K),(C,E)=>`${m()}-${E}`,(C,E,Ie)=>{var me=Nn(),v=o(me),R=o(v);st(2),s(v);var A=n(v,2),X=o(A);{var ie=Ce=>{It(Ce,{get fileName(){return e(E).path},get patch(){return e(E).patch},get annotations(){return e(E).annotations},get additions(){return e(E).additions},get deletions(){return e(E).deletions},get fileDescription(){return e(E).summary},get onSendMessage(){return D()},get isSending(){return P()},class:"rounded-lg border border-border overflow-hidden"})},$e=Ce=>{var ye=Sn(),U=o(ye),j=n(o(U),2),f=O(j,!0);s(U);var T=n(U,2);{var F=le=>{var a=Cn(),W=O(a,!0);M(()=>S(W,e(E).summary)),i(le,a)};H(T,le=>{e(E).summary&&le(F)})}s(ye),M(()=>S(f,e(E).path)),i(Ce,ye)};H(X,Ce=>{e(E).patch?Ce(ie):Ce($e,-1)})}s(A),s(me),M(()=>He(R,1,`w-0.5 flex-1 bg-border ${e(Ie)===e(K).length-1&&u()?"h-1/2":""}`)),i(C,me)}),s(_e),s(q),M(C=>{He(q,1,`walkthrough-category-section ${h()??""}`),Hr(q,"id",`category-${m()??""}`),He(de,1,`w-3 h-3 rounded-full ${C??""} ring-4 ring-background shrink-0`),S(I,d().title),S(Ne,d().description)},[()=>J(m())]),i($,q),qe(pe)}var Mn=x('<!> <!> <span class="text-sm font-medium"> </span> <!>',1),Pn=x('<div class="flex items-center gap-2 text-sm text-subtle py-2"><!> <span> </span></div>'),Ot=x("<!> ",1),Ln=x('<div class="rounded-lg bg-danger-background/10 border border-danger/20 p-4"><p class="text-sm text-danger"> </p> <!></div>'),In=x('<h2 class="text-lg font-semibold text-foreground"> </h2>'),An=x('<p class="text-sm text-subtle italic"> </p>'),Kt=x("<div><!></div>"),En=x('<div class="space-y-8 pt-4"></div>'),Hn=x('<!> <!> <span class="text-sm font-medium text-subtle"> </span>',1),zn=x('<div class="space-y-3 pt-2"></div>'),Tn=x('<div class="pt-4 border-t border-border"><!> <!></div>'),Wn=x('<div class="flex justify-end pt-2"><!></div>'),Dn=x('<div class="space-y-6"><!> <!> <!> <!> <!> <!></div>'),jn=x('<div class="px-4 pb-4"><!> <!> <!></div>'),Fn=x('<div class="border-t border-border"><!> <!></div>');function Xt($,r){if(new.target)return Ke({component:Xt,...$});Je(r,!0);let d=k(r,"walkthrough",7),m=k(r,"status",7),b=k(r,"workspaceId",7),u=k(r,"error",7,""),D=k(r,"workspacePath",7),P=k(r,"changes",23,()=>[]),h=k(r,"onSendMessage",7),J=k(r,"isSending",7,!1),K=k(r,"onRegenerate",7),pe=k(r,"showCategoriesGrid",7,!0);const q=_(()=>m()==="running"),w=_(()=>m()==="complete"),z=_(()=>!!u());let de=we(!0),ce=we(!1),ae=we(mt(new Map));const te=_(()=>{if(d()?.categories&&d().categories.length>0)return d().categories;if(d()?.annotations&&d().annotations.length>0){const v=new Map;for(const R of d().annotations){const A=v.get(R.file)||[];A.push(R),v.set(R.file,A)}return[{title:d().title,description:d().overview,files:Array.from(v.entries()).map(([R,A])=>({path:R,annotations:A.sort((X,ie)=>X.line-ie.line)}))}]}return[]}),ke=_(()=>{if(!d()?.annotations)return new Map;const v=new Map;for(const R of d().annotations){const A=v.get(R.file)||[];A.push(R),v.set(R.file,A)}for(const[R,A]of v)v.set(R,A.sort((X,ie)=>X.line-ie.line));return v}),I=_(()=>{const v=new Set;for(const R of e(te))for(const A of R.files)v.add(A.path);for(const R of e(ke).keys())v.add(R);return v}),he=_(()=>P().filter(v=>!e(I).has(v.relativePath)));Ze(()=>{if(!d()||!D())return;const v=new Set([...e(I),...e(he).map(R=>R.relativePath)]);for(const R of v)e(ae).has(R)||Jr(b(),!0,R).then(A=>{if(A&&A.oldContent!==void 0&&A.newContent!==void 0){const X=Ne(R,A.oldContent,A.newContent);if(X){const ie=P().find($e=>$e.relativePath===R);e(ae).set(R,{patch:X,additions:ie?.stats?.additions??0,deletions:ie?.stats?.deletions??0}),L(ae,new Map(e(ae)),!0)}}}).catch(A=>{console.warn(`Failed to load diff for ${R}:`,A)})});function Ne(v,R,A){const X=R.split(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{bo as x}from"./eK7OULll.js";function m(e){const n=e.replace(/^#/,"");let r,o,a;if(n.length===3||n.length===4)r=parseInt(n[0]+n[0],16)/255,o=parseInt(n[1]+n[1],16)/255,a=parseInt(n[2]+n[2],16)/255;else if(n.length===6||n.length===8)r=parseInt(n.slice(0,2),16)/255,o=parseInt(n.slice(2,4),16)/255,a=parseInt(n.slice(4,6),16)/255;else return"0 0% 0%";const t=Math.max(r,o,a),s=Math.min(r,o,a),c=(t+s)/2;let u=0,g=0;if(t!==s){const p=t-s;switch(g=c>.5?p/(2-t-s):p/(t+s),t){case r:u=((o-a)/p+(o<a?6:0))/6;break;case o:u=((a-r)/p+2)/6;break;case a:u=((r-o)/p+4)/6;break}}const f=Math.round(u*360),d=Math.round(g*100),l=Math.round(c*100);return`${f} ${d}% ${l}%`}function N(e){const n=e.replace(/^#/,"");let r,o,a;if(n.length>=6)r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),a=parseInt(n.slice(4,6),16);else if(n.length>=3)r=parseInt(n[0]+n[0],16),o=parseInt(n[1]+n[1],16),a=parseInt(n[2]+n[2],16);else return!0;return(.299*r+.587*o+.114*a)/255<.5}const X=[["editor.background","--background"],["editor.foreground","--foreground"],["sideBar.background","--sidebar"],["sideBar.foreground","--sidebar-foreground"],["sideBar.border","--sidebar-border"],["editorWidget.background","--card"],["editorWidget.foreground","--card-foreground"],["dropdown.background","--popover"],["dropdown.foreground","--popover-foreground"],["focusBorder","--ring"],["input.background","--input"],["panel.border","--border"],["editorGroup.border","--border"],["button.background","--primary"],["button.foreground","--primary-foreground"],["list.activeSelectionBackground","--secondary"],["list.activeSelectionForeground","--secondary-foreground"],["errorForeground","--danger"],["inputValidation.errorBackground","--danger-background"]];function B(e){const n=e.replace(/^#/,"");return n.length>=6?[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]:n.length>=3?[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)]:[0,0,0]}function M(e,n,r){const o=a=>Math.max(0,Math.min(255,Math.round(a)));return`#${o(e).toString(16).padStart(2,"0")}${o(n).toString(16).padStart(2,"0")}${o(r).toString(16).padStart(2,"0")}`}function G(e,n,r){const[o,a,t]=[e,n,r].map(s=>{const c=s/255;return c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4)});return .2126*o+.7152*a+.0722*t}function k(e,n){const r=G(...e),o=G(...n),a=Math.max(r,o),t=Math.min(r,o);return(a+.05)/(t+.05)}function F(e){const n=e.match(/^([\d.]+)\s+([\d.]+)%\s+([\d.]+)%$/);if(!n)return[0,0,0];const r=Number(n[1]),o=Number(n[2])/100,a=Number(n[3])/100,t=(1-Math.abs(2*a-1))*o,s=t*(1-Math.abs(r/60%2-1)),c=a-t/2;return(r<60?[t,s,0]:r<120?[s,t,0]:r<180?[0,t,s]:r<240?[0,s,t]:r<300?[s,0,t]:[t,0,s]).map(g=>Math.round((g+c)*255))}function V(e,n,r){const o=F(e),t=F(n).map((s,c)=>s*(1-r)+o[c]*r);return m(M(...t))}function H(e,n){const r=F(e),o=F(n);if(k(r,o)>=4.55)return e;const a=[0,0,0],t=[255,255,255],s=k(a,o)>k(t,o)?a:t;for(let c=1;c<=20;c++){const u=c/20,g=r.map((f,d)=>f*(1-u)+s[d]*u);if(k(g,o)>=4.55)return m(M(...g))}return m(M(...s))}function _(e,n){const r=F(e),o=n.map(F),a=f=>Math.min(...o.map(d=>k(f,d))),t=4.55;if(a(r)>=t)return e;const s=e.match(/^([\d.]+)\s+([\d.]+)%\s+([\d.]+)%$/);if(!s)return e;const c=Number(s[1]);let u,g={value:e,ratio:a(r),distance:0};for(let f=0;f<=100;f++)for(let d=0;d<=100;d++){const l=`${c} ${f}% ${d}%`,p=F(l),b=a(p),i=p.reduce((R,I,A)=>R+(I-r[A])**2,0);b>=t?(!u||i<u.distance)&&(u={value:l,distance:i}):(b>g.ratio||b===g.ratio&&i<g.distance)&&(g={value:l,ratio:b,distance:i})}return u?.value??g.value}function K({fgHex:e,bgHexes:n,descriptionHex:r}){const o=B(e),a=n.map(B);let t;if(r)t=B(r);else{const[f,d,l]=a[0];t=[o[0]*.6+f*.4,o[1]*.6+d*.4,o[2]*.6+l*.4]}const s=4.5,c=20,u=f=>a.every(d=>k(f,d)>=s),g=[...t];for(let f=0;f<c&&!u(t);f++){const d=(f+1)/c;t=[g[0]*(1-d)+o[0]*d,g[1]*(1-d)+o[1]*d,g[2]*(1-d)+o[2]*d]}return m(M(...t))}function Y(e,n,r){const o=B(e),a=B(n),t=G(...o),s=G(...a),c=1.12;if((Math.max(t,s)+.05)/(Math.min(t,s)+.05)>=c)return m(e);const f=t>s||t===s&&!r?[255,255,255]:[0,0,0],d=20;let l=[...o];for(let p=1;p<=d;p++){const b=p/d;l=[o[0]*(1-b)+f[0]*b,o[1]*(1-b)+f[1]*b,o[2]*(1-b)+f[2]*b];const i=G(...l);if((Math.max(i,s)+.05)/(Math.min(i,s)+.05)>=c)break}return m(M(...l))}function O(e){const n=B(e),r=N(e)?[255,255,255]:[0,0,0],o=1.2,a=20;let t=[...n];for(let s=1;s<=a;s++){const c=s/a;if(t=[n[0]*(1-c)+r[0]*c,n[1]*(1-c)+r[1]*c,n[2]*(1-c)+r[2]*c],k(t,n)>=o)break}return m(M(...t))}function $(e,n,r){const o=B(e),a=n.map(B),t=3.1,s=d=>Math.min(...a.map(l=>k(d,l)));if(s(o)>=t)return m(e);const u=r?[255,255,255]:[0,0,0],g=20;let f=[...o];for(let d=1;d<=g;d++){const l=d/g;if(f=[o[0]*(1-l)+u[0]*l,o[1]*(1-l)+u[1]*l,o[2]*(1-l)+u[2]*l],s(f)>=t)break}return m(M(...f))}function j(e){const n=e["editor.background"];if(!n)return null;const r=e.focusBorder??e["button.background"]??e["badge.background"];if(!r)return null;const o=B(n),a=B(r),t=N(n),s=t?.12:.08,c=[o[0]*(1-s)+a[0]*s,o[1]*(1-s)+a[1]*s,o[2]*(1-s)+a[2]*s],u=B(e["editor.foreground"]??(t?"#ffffff":"#000000"));let g=[...a];const f=4.5,d=20,l=b=>k(b,o)>=f&&k(b,c)>=3,p=[...g];for(let b=0;b<d&&!l(g);b++){const i=(b+1)/d;g=[p[0]*(1-i)+u[0]*i,p[1]*(1-i)+u[1]*i,p[2]*(1-i)+u[2]*i]}return{accent:m(M(...c)),accentForeground:m(M(...g))}}function q(e,n){const r={};for(const[i,R]of X){if(r[R])continue;const I=e[i];I&&(r[R]=m(I))}const o=j(e);o&&(r["--accent"]=o.accent,r["--accent-foreground"]=o.accentForeground);const a=e["editor.foreground"],t=e["editor.background"];if(a&&t){const i=[t];e["sideBar.background"]&&i.push(e["sideBar.background"]),e["editorWidget.background"]&&i.push(e["editorWidget.background"]),r["--muted-foreground"]=K({fgHex:a,bgHexes:i,descriptionHex:e.descriptionForeground});const R=e["tab.inactiveBackground"]??e["sideBar.background"]??t,I=N(t);r["--muted"]=Y(R,t,I);const A=[t,e["editorWidget.background"],e["dropdown.background"],e["sideBar.background"]].filter(S=>!!S),P=e["panel.border"]??e["editorGroup.border"],D=e["input.border"]??e["input.background"]??P??t;r["--input"]=$(D,A,I);const W=e.focusBorder??e["button.background"]??P??t;r["--ring"]=$(W,A,I);const y=B(a),w=B(t);{const S=[y[0]*.6+w[0]*.4,y[1]*.6+w[1]*.4,y[2]*.6+w[2]*.4];let C=[...S];const L=4.5,T=20;for(let v=0;v<T&&!(k(C,w)>=L);v++){const h=(v+1)/T;C=[S[0]*(1-h)+y[0]*h,S[1]*(1-h)+y[1]*h,S[2]*(1-h)+y[2]*h]}r["--text-subtle"]=m(M(...C))}{const S=[w[0]*.65+y[0]*.35,w[1]*.65+y[1]*.35,w[2]*.65+y[2]*.35];let C=[...S];const L=2,T=15;for(let v=0;v<T&&!(k(C,w)>=L);v++){const h=(v+1)/T;C=[S[0]*(1-h)+y[0]*h,S[1]*(1-h)+y[1]*h,S[2]*(1-h)+y[2]*h]}r["--text-ghost"]=m(M(...C))}}else e.descriptionForeground&&(r["--muted-foreground"]=m(e.descriptionForeground));t&&(r["--border"]??=O(t),r["--sidebar-border"]??=O(e["sideBar.background"]??t));const s=n?{background:"#1f1f24",foreground:"#f7f7f7",primary:"#009966",primaryForeground:"#171717",secondary:"#1c1c1c",secondaryForeground:"#f7f7f7",muted:"#121217",mutedForeground:"#b8b5c2",accent:"#182c25",accentForeground:"#7de3bd",danger:"#f38b8b",dangerBackground:"#361010",border:"#4d4a52",input:"#121217",ring:"#6eddb4",info:"#72d2fa",infoForeground:"#171717",success:"#22c55e",successForeground:"#171717",warning:"#facc15",warningForeground:"#171717",sidebar:"#0d0d10",sidebarForeground:"#f7f7f7",sidebarAccent:"#242424",sidebarBorder:"#4d4a52"}:{background:"#ffffff",foreground:"#171717",primary:"#007a4d",primaryForeground:"#ffffff",secondary:"#f5f5f5",secondaryForeground:"#171717",muted:"#e8e8e8",mutedForeground:"#474747",accent:"#e7f3ee",accentForeground:"#00663f",danger:"#930b0b",dangerBackground:"#fde7e7",border:"#d9d9d9",input:"#e6e6e6",ring:"#006ac2",info:"#006ac2",infoForeground:"#ffffff",success:"#117a37",successForeground:"#ffffff",warning:"#dc9400",warningForeground:"#171717",sidebar:"#f7f7f8",sidebarForeground:"#171717",sidebarAccent:"#e8e8e8",sidebarBorder:"#d9d9d9"},c=i=>m(s[i]);r["--background"]??=c("background"),r["--foreground"]??=c("foreground"),r["--card"]??=r["--background"],r["--card-foreground"]??=r["--foreground"],r["--popover"]??=r["--card"],r["--popover-foreground"]??=r["--card-foreground"],r["--primary"]??=c("primary"),r["--primary-foreground"]??=c("primaryForeground"),r["--secondary"]??=c("secondary"),r["--secondary-foreground"]??=c("secondaryForeground"),r["--muted"]??=c("muted"),r["--muted-foreground"]??=c("mutedForeground"),r["--accent"]??=c("accent"),r["--accent-foreground"]??=c("accentForeground"),r["--danger"]??=c("danger"),r["--danger-background"]??=c("dangerBackground"),r["--border"]??=c("border"),r["--input"]??=c("input"),r["--ring"]??=c("ring"),r["--info"]=m(e["editorInfo.foreground"]??s.info),r["--info-foreground"]=c("infoForeground"),r["--success"]=m(e["testing.iconPassed"]??e["gitDecoration.addedResourceForeground"]??s.success),r["--success-foreground"]=c("successForeground"),r["--warning"]=m(e["editorWarning.foreground"]??s.warning),r["--warning-foreground"]=c("warningForeground"),r["--sidebar"]??=c("sidebar"),r["--sidebar-foreground"]??=c("sidebarForeground"),r["--sidebar-accent"]=r["--secondary"]??c("sidebarAccent"),r["--sidebar-accent-foreground"]=r["--sidebar-foreground"],r["--sidebar-border"]??=c("sidebarBorder");const u=[["--foreground","--background"],["--card-foreground","--card"],["--popover-foreground","--popover"],["--primary-foreground","--primary"],["--secondary-foreground","--secondary"],["--accent-foreground","--accent"],["--muted-foreground","--muted"],["--info-foreground","--info"],["--success-foreground","--success"],["--warning-foreground","--warning"],["--sidebar-foreground","--sidebar"],["--sidebar-accent-foreground","--sidebar-accent"]];for(const[i,R]of u)r[i]=H(r[i],r[R]);const g=["--danger-background","--background","--card","--popover","--muted","--sidebar"],f=r["--danger"];r["--danger"]=_(f,g.map(i=>r[i]));const d=F(r["--danger"]);g.every(i=>k(d,F(r[i]))>=4.55)||(r["--danger-background"]=r["--background"],r["--danger"]=_(f,g.map(i=>r[i]))),r["--primary-ink"]=_(r["--primary"],[r["--background"],r["--card"]]);const p=r["--warning"],b=[r["--background"],r["--card"]];return r["--warning-ink"]=_(p,[...b,...b.map(i=>V(p,i,.1))]),r}const z=[["terminal.background","background"],["terminal.foreground","foreground"],["terminal.selectionBackground","selectionBackground"],["terminal.selectionForeground","selectionForeground"],["terminalCursor.foreground","cursor"],["terminalCursor.background","cursorAccent"],["terminal.ansiBlack","black"],["terminal.ansiRed","red"],["terminal.ansiGreen","green"],["terminal.ansiYellow","yellow"],["terminal.ansiBlue","blue"],["terminal.ansiMagenta","magenta"],["terminal.ansiCyan","cyan"],["terminal.ansiWhite","white"],["terminal.ansiBrightBlack","brightBlack"],["terminal.ansiBrightRed","brightRed"],["terminal.ansiBrightGreen","brightGreen"],["terminal.ansiBrightYellow","brightYellow"],["terminal.ansiBrightBlue","brightBlue"],["terminal.ansiBrightMagenta","brightMagenta"],["terminal.ansiBrightCyan","brightCyan"],["terminal.ansiBrightWhite","brightWhite"]];function Q(e){const n={};for(const[r,o]of z){const a=e[r];a&&(n[o]=a)}return n}function E(e){return e.replace(/^#/,"")}function U(e,n){const r=n?"vs-dark":"vs",o=[];if(e.tokenColors)for(const t of e.tokenColors){const s=Array.isArray(t.scope)?t.scope:t.scope?[t.scope]:[""];for(const c of s){const u={token:c};t.settings.foreground&&(u.foreground=E(t.settings.foreground)),t.settings.background&&(u.background=E(t.settings.background)),t.settings.fontStyle&&(u.fontStyle=t.settings.fontStyle),o.push(u)}}const a={};if(e.colors)for(const[t,s]of Object.entries(e.colors))a[t]=s;return{base:r,inherit:!0,rules:o,colors:a}}function J(e){let n="",r=0,o=!1;for(;r<e.length;){const a=e[r];if(o){if(a==="\\"){n+=a+(e[r+1]??""),r+=2;continue}a==='"'&&(o=!1),n+=a,r++;continue}if(a==='"'){o=!0,n+=a,r++;continue}if(a==="/"&&e[r+1]==="/"){for(r+=2;r<e.length&&e[r]!==`
|
|
1
|
+
import{bo as x}from"./BLK9_MXJ.js";function m(e){const n=e.replace(/^#/,"");let r,o,a;if(n.length===3||n.length===4)r=parseInt(n[0]+n[0],16)/255,o=parseInt(n[1]+n[1],16)/255,a=parseInt(n[2]+n[2],16)/255;else if(n.length===6||n.length===8)r=parseInt(n.slice(0,2),16)/255,o=parseInt(n.slice(2,4),16)/255,a=parseInt(n.slice(4,6),16)/255;else return"0 0% 0%";const t=Math.max(r,o,a),s=Math.min(r,o,a),c=(t+s)/2;let u=0,g=0;if(t!==s){const p=t-s;switch(g=c>.5?p/(2-t-s):p/(t+s),t){case r:u=((o-a)/p+(o<a?6:0))/6;break;case o:u=((a-r)/p+2)/6;break;case a:u=((r-o)/p+4)/6;break}}const f=Math.round(u*360),d=Math.round(g*100),l=Math.round(c*100);return`${f} ${d}% ${l}%`}function N(e){const n=e.replace(/^#/,"");let r,o,a;if(n.length>=6)r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),a=parseInt(n.slice(4,6),16);else if(n.length>=3)r=parseInt(n[0]+n[0],16),o=parseInt(n[1]+n[1],16),a=parseInt(n[2]+n[2],16);else return!0;return(.299*r+.587*o+.114*a)/255<.5}const X=[["editor.background","--background"],["editor.foreground","--foreground"],["sideBar.background","--sidebar"],["sideBar.foreground","--sidebar-foreground"],["sideBar.border","--sidebar-border"],["editorWidget.background","--card"],["editorWidget.foreground","--card-foreground"],["dropdown.background","--popover"],["dropdown.foreground","--popover-foreground"],["focusBorder","--ring"],["input.background","--input"],["panel.border","--border"],["editorGroup.border","--border"],["button.background","--primary"],["button.foreground","--primary-foreground"],["list.activeSelectionBackground","--secondary"],["list.activeSelectionForeground","--secondary-foreground"],["errorForeground","--danger"],["inputValidation.errorBackground","--danger-background"]];function B(e){const n=e.replace(/^#/,"");return n.length>=6?[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]:n.length>=3?[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)]:[0,0,0]}function M(e,n,r){const o=a=>Math.max(0,Math.min(255,Math.round(a)));return`#${o(e).toString(16).padStart(2,"0")}${o(n).toString(16).padStart(2,"0")}${o(r).toString(16).padStart(2,"0")}`}function G(e,n,r){const[o,a,t]=[e,n,r].map(s=>{const c=s/255;return c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4)});return .2126*o+.7152*a+.0722*t}function k(e,n){const r=G(...e),o=G(...n),a=Math.max(r,o),t=Math.min(r,o);return(a+.05)/(t+.05)}function F(e){const n=e.match(/^([\d.]+)\s+([\d.]+)%\s+([\d.]+)%$/);if(!n)return[0,0,0];const r=Number(n[1]),o=Number(n[2])/100,a=Number(n[3])/100,t=(1-Math.abs(2*a-1))*o,s=t*(1-Math.abs(r/60%2-1)),c=a-t/2;return(r<60?[t,s,0]:r<120?[s,t,0]:r<180?[0,t,s]:r<240?[0,s,t]:r<300?[s,0,t]:[t,0,s]).map(g=>Math.round((g+c)*255))}function V(e,n,r){const o=F(e),t=F(n).map((s,c)=>s*(1-r)+o[c]*r);return m(M(...t))}function H(e,n){const r=F(e),o=F(n);if(k(r,o)>=4.55)return e;const a=[0,0,0],t=[255,255,255],s=k(a,o)>k(t,o)?a:t;for(let c=1;c<=20;c++){const u=c/20,g=r.map((f,d)=>f*(1-u)+s[d]*u);if(k(g,o)>=4.55)return m(M(...g))}return m(M(...s))}function _(e,n){const r=F(e),o=n.map(F),a=f=>Math.min(...o.map(d=>k(f,d))),t=4.55;if(a(r)>=t)return e;const s=e.match(/^([\d.]+)\s+([\d.]+)%\s+([\d.]+)%$/);if(!s)return e;const c=Number(s[1]);let u,g={value:e,ratio:a(r),distance:0};for(let f=0;f<=100;f++)for(let d=0;d<=100;d++){const l=`${c} ${f}% ${d}%`,p=F(l),b=a(p),i=p.reduce((R,I,A)=>R+(I-r[A])**2,0);b>=t?(!u||i<u.distance)&&(u={value:l,distance:i}):(b>g.ratio||b===g.ratio&&i<g.distance)&&(g={value:l,ratio:b,distance:i})}return u?.value??g.value}function K({fgHex:e,bgHexes:n,descriptionHex:r}){const o=B(e),a=n.map(B);let t;if(r)t=B(r);else{const[f,d,l]=a[0];t=[o[0]*.6+f*.4,o[1]*.6+d*.4,o[2]*.6+l*.4]}const s=4.5,c=20,u=f=>a.every(d=>k(f,d)>=s),g=[...t];for(let f=0;f<c&&!u(t);f++){const d=(f+1)/c;t=[g[0]*(1-d)+o[0]*d,g[1]*(1-d)+o[1]*d,g[2]*(1-d)+o[2]*d]}return m(M(...t))}function Y(e,n,r){const o=B(e),a=B(n),t=G(...o),s=G(...a),c=1.12;if((Math.max(t,s)+.05)/(Math.min(t,s)+.05)>=c)return m(e);const f=t>s||t===s&&!r?[255,255,255]:[0,0,0],d=20;let l=[...o];for(let p=1;p<=d;p++){const b=p/d;l=[o[0]*(1-b)+f[0]*b,o[1]*(1-b)+f[1]*b,o[2]*(1-b)+f[2]*b];const i=G(...l);if((Math.max(i,s)+.05)/(Math.min(i,s)+.05)>=c)break}return m(M(...l))}function O(e){const n=B(e),r=N(e)?[255,255,255]:[0,0,0],o=1.2,a=20;let t=[...n];for(let s=1;s<=a;s++){const c=s/a;if(t=[n[0]*(1-c)+r[0]*c,n[1]*(1-c)+r[1]*c,n[2]*(1-c)+r[2]*c],k(t,n)>=o)break}return m(M(...t))}function $(e,n,r){const o=B(e),a=n.map(B),t=3.1,s=d=>Math.min(...a.map(l=>k(d,l)));if(s(o)>=t)return m(e);const u=r?[255,255,255]:[0,0,0],g=20;let f=[...o];for(let d=1;d<=g;d++){const l=d/g;if(f=[o[0]*(1-l)+u[0]*l,o[1]*(1-l)+u[1]*l,o[2]*(1-l)+u[2]*l],s(f)>=t)break}return m(M(...f))}function j(e){const n=e["editor.background"];if(!n)return null;const r=e.focusBorder??e["button.background"]??e["badge.background"];if(!r)return null;const o=B(n),a=B(r),t=N(n),s=t?.12:.08,c=[o[0]*(1-s)+a[0]*s,o[1]*(1-s)+a[1]*s,o[2]*(1-s)+a[2]*s],u=B(e["editor.foreground"]??(t?"#ffffff":"#000000"));let g=[...a];const f=4.5,d=20,l=b=>k(b,o)>=f&&k(b,c)>=3,p=[...g];for(let b=0;b<d&&!l(g);b++){const i=(b+1)/d;g=[p[0]*(1-i)+u[0]*i,p[1]*(1-i)+u[1]*i,p[2]*(1-i)+u[2]*i]}return{accent:m(M(...c)),accentForeground:m(M(...g))}}function q(e,n){const r={};for(const[i,R]of X){if(r[R])continue;const I=e[i];I&&(r[R]=m(I))}const o=j(e);o&&(r["--accent"]=o.accent,r["--accent-foreground"]=o.accentForeground);const a=e["editor.foreground"],t=e["editor.background"];if(a&&t){const i=[t];e["sideBar.background"]&&i.push(e["sideBar.background"]),e["editorWidget.background"]&&i.push(e["editorWidget.background"]),r["--muted-foreground"]=K({fgHex:a,bgHexes:i,descriptionHex:e.descriptionForeground});const R=e["tab.inactiveBackground"]??e["sideBar.background"]??t,I=N(t);r["--muted"]=Y(R,t,I);const A=[t,e["editorWidget.background"],e["dropdown.background"],e["sideBar.background"]].filter(S=>!!S),P=e["panel.border"]??e["editorGroup.border"],D=e["input.border"]??e["input.background"]??P??t;r["--input"]=$(D,A,I);const W=e.focusBorder??e["button.background"]??P??t;r["--ring"]=$(W,A,I);const y=B(a),w=B(t);{const S=[y[0]*.6+w[0]*.4,y[1]*.6+w[1]*.4,y[2]*.6+w[2]*.4];let C=[...S];const L=4.5,T=20;for(let v=0;v<T&&!(k(C,w)>=L);v++){const h=(v+1)/T;C=[S[0]*(1-h)+y[0]*h,S[1]*(1-h)+y[1]*h,S[2]*(1-h)+y[2]*h]}r["--text-subtle"]=m(M(...C))}{const S=[w[0]*.65+y[0]*.35,w[1]*.65+y[1]*.35,w[2]*.65+y[2]*.35];let C=[...S];const L=2,T=15;for(let v=0;v<T&&!(k(C,w)>=L);v++){const h=(v+1)/T;C=[S[0]*(1-h)+y[0]*h,S[1]*(1-h)+y[1]*h,S[2]*(1-h)+y[2]*h]}r["--text-ghost"]=m(M(...C))}}else e.descriptionForeground&&(r["--muted-foreground"]=m(e.descriptionForeground));t&&(r["--border"]??=O(t),r["--sidebar-border"]??=O(e["sideBar.background"]??t));const s=n?{background:"#1f1f24",foreground:"#f7f7f7",primary:"#009966",primaryForeground:"#171717",secondary:"#1c1c1c",secondaryForeground:"#f7f7f7",muted:"#121217",mutedForeground:"#b8b5c2",accent:"#182c25",accentForeground:"#7de3bd",danger:"#f38b8b",dangerBackground:"#361010",border:"#4d4a52",input:"#121217",ring:"#6eddb4",info:"#72d2fa",infoForeground:"#171717",success:"#22c55e",successForeground:"#171717",warning:"#facc15",warningForeground:"#171717",sidebar:"#0d0d10",sidebarForeground:"#f7f7f7",sidebarAccent:"#242424",sidebarBorder:"#4d4a52"}:{background:"#ffffff",foreground:"#171717",primary:"#007a4d",primaryForeground:"#ffffff",secondary:"#f5f5f5",secondaryForeground:"#171717",muted:"#e8e8e8",mutedForeground:"#474747",accent:"#e7f3ee",accentForeground:"#00663f",danger:"#930b0b",dangerBackground:"#fde7e7",border:"#d9d9d9",input:"#e6e6e6",ring:"#006ac2",info:"#006ac2",infoForeground:"#ffffff",success:"#117a37",successForeground:"#ffffff",warning:"#dc9400",warningForeground:"#171717",sidebar:"#f7f7f8",sidebarForeground:"#171717",sidebarAccent:"#e8e8e8",sidebarBorder:"#d9d9d9"},c=i=>m(s[i]);r["--background"]??=c("background"),r["--foreground"]??=c("foreground"),r["--card"]??=r["--background"],r["--card-foreground"]??=r["--foreground"],r["--popover"]??=r["--card"],r["--popover-foreground"]??=r["--card-foreground"],r["--primary"]??=c("primary"),r["--primary-foreground"]??=c("primaryForeground"),r["--secondary"]??=c("secondary"),r["--secondary-foreground"]??=c("secondaryForeground"),r["--muted"]??=c("muted"),r["--muted-foreground"]??=c("mutedForeground"),r["--accent"]??=c("accent"),r["--accent-foreground"]??=c("accentForeground"),r["--danger"]??=c("danger"),r["--danger-background"]??=c("dangerBackground"),r["--border"]??=c("border"),r["--input"]??=c("input"),r["--ring"]??=c("ring"),r["--info"]=m(e["editorInfo.foreground"]??s.info),r["--info-foreground"]=c("infoForeground"),r["--success"]=m(e["testing.iconPassed"]??e["gitDecoration.addedResourceForeground"]??s.success),r["--success-foreground"]=c("successForeground"),r["--warning"]=m(e["editorWarning.foreground"]??s.warning),r["--warning-foreground"]=c("warningForeground"),r["--sidebar"]??=c("sidebar"),r["--sidebar-foreground"]??=c("sidebarForeground"),r["--sidebar-accent"]=r["--secondary"]??c("sidebarAccent"),r["--sidebar-accent-foreground"]=r["--sidebar-foreground"],r["--sidebar-border"]??=c("sidebarBorder");const u=[["--foreground","--background"],["--card-foreground","--card"],["--popover-foreground","--popover"],["--primary-foreground","--primary"],["--secondary-foreground","--secondary"],["--accent-foreground","--accent"],["--muted-foreground","--muted"],["--info-foreground","--info"],["--success-foreground","--success"],["--warning-foreground","--warning"],["--sidebar-foreground","--sidebar"],["--sidebar-accent-foreground","--sidebar-accent"]];for(const[i,R]of u)r[i]=H(r[i],r[R]);const g=["--danger-background","--background","--card","--popover","--muted","--sidebar"],f=r["--danger"];r["--danger"]=_(f,g.map(i=>r[i]));const d=F(r["--danger"]);g.every(i=>k(d,F(r[i]))>=4.55)||(r["--danger-background"]=r["--background"],r["--danger"]=_(f,g.map(i=>r[i]))),r["--primary-ink"]=_(r["--primary"],[r["--background"],r["--card"]]);const p=r["--warning"],b=[r["--background"],r["--card"]];return r["--warning-ink"]=_(p,[...b,...b.map(i=>V(p,i,.1))]),r}const z=[["terminal.background","background"],["terminal.foreground","foreground"],["terminal.selectionBackground","selectionBackground"],["terminal.selectionForeground","selectionForeground"],["terminalCursor.foreground","cursor"],["terminalCursor.background","cursorAccent"],["terminal.ansiBlack","black"],["terminal.ansiRed","red"],["terminal.ansiGreen","green"],["terminal.ansiYellow","yellow"],["terminal.ansiBlue","blue"],["terminal.ansiMagenta","magenta"],["terminal.ansiCyan","cyan"],["terminal.ansiWhite","white"],["terminal.ansiBrightBlack","brightBlack"],["terminal.ansiBrightRed","brightRed"],["terminal.ansiBrightGreen","brightGreen"],["terminal.ansiBrightYellow","brightYellow"],["terminal.ansiBrightBlue","brightBlue"],["terminal.ansiBrightMagenta","brightMagenta"],["terminal.ansiBrightCyan","brightCyan"],["terminal.ansiBrightWhite","brightWhite"]];function Q(e){const n={};for(const[r,o]of z){const a=e[r];a&&(n[o]=a)}return n}function E(e){return e.replace(/^#/,"")}function U(e,n){const r=n?"vs-dark":"vs",o=[];if(e.tokenColors)for(const t of e.tokenColors){const s=Array.isArray(t.scope)?t.scope:t.scope?[t.scope]:[""];for(const c of s){const u={token:c};t.settings.foreground&&(u.foreground=E(t.settings.foreground)),t.settings.background&&(u.background=E(t.settings.background)),t.settings.fontStyle&&(u.fontStyle=t.settings.fontStyle),o.push(u)}}const a={};if(e.colors)for(const[t,s]of Object.entries(e.colors))a[t]=s;return{base:r,inherit:!0,rules:o,colors:a}}function J(e){let n="",r=0,o=!1;for(;r<e.length;){const a=e[r];if(o){if(a==="\\"){n+=a+(e[r+1]??""),r+=2;continue}a==='"'&&(o=!1),n+=a,r++;continue}if(a==='"'){o=!0,n+=a,r++;continue}if(a==="/"&&e[r+1]==="/"){for(r+=2;r<e.length&&e[r]!==`
|
|
2
2
|
`;)r++;continue}if(a==="/"&&e[r+1]==="*"){for(r+=2;r<e.length&&!(e[r]==="*"&&e[r+1]==="/");)r++;r+=2;continue}n+=a,r++}return n=n.replace(/,(\s*[}\]])/g,"$1"),n}function rr(e){if(!e||typeof e!="object")throw new Error("Invalid theme: expected an object");const n=e;if(!n.colors&&!n.tokenColors)throw new Error('Invalid theme: must contain "colors" or "tokenColors"');const r=n.colors??{};let o;return n.type==="light"||n.type==="hc-light"?o=!1:n.type==="dark"||n.type==="hc-black"?o=!0:r["editor.background"]?o=N(r["editor.background"]):o=!0,{name:n.name??x.settings_themeImport_fallbackName_label(),type:o?"dark":"light",cssVariables:q(r,o),monacoTheme:U(n,o),terminalColors:Q(r),rawColors:{...r}}}export{rr as p,J as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as L,j as R}from"./
|
|
1
|
+
import{s as L,j as R}from"./CAlQoToi.js";const O=(e,l={})=>{let d=l?.fadeSize??24,r=l?.axis??"y",a=l?.enabled??!0,u=!1,n,c,o=!1,f,i,v;function z(){const s=r==="y"?e.scrollTop:e.scrollLeft,y=r==="y"?e.clientHeight:e.clientWidth,S=r==="y"?e.scrollHeight:e.scrollWidth,k=s>2,x=s+y<S-2,h=k?d:0,g=x?d:0,p=h===0&&g===0?"":`linear-gradient(${r==="y"?"to bottom":"to right"}, transparent, black ${h}px, black calc(100% - ${g}px), transparent)`;p!==v&&(v=p,i?.(),i=R(()=>{i=void 0,e.style.maskImage=p}))}function t(){o||(o=!0,f=L(()=>{o=!1,a&&z()}))}function b(){u&&e.removeEventListener("scroll",t),u=!1,n?.disconnect(),n=void 0,c?.disconnect(),c=void 0,f?.(),f=void 0,i?.(),i=void 0,o=!1,v=void 0,e.style.maskImage=""}function m(){b(),a&&(t(),e.addEventListener("scroll",t,{passive:!0}),u=!0,n=typeof ResizeObserver>"u"?void 0:new ResizeObserver(t),n?.observe(e),c=new MutationObserver(t),c.observe(e,{childList:!0,subtree:!0}))}return m(),{update(s){const y=a;d=s?.fadeSize??24,r=s?.axis??"y",a=s?.enabled??!0,a?y?t():m():b()},destroy:b}};export{O as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as Mt,bq as ae,_ as Vr,a_ as re,by as Ut,bu as be,bs as Zt,b as jt,bo as d}from"./eK7OULll.js";import{bs as Et,ca as ke,aD as e,bH as u,a5 as R,bA as P,W as s,bn as zt,bV as O,c9 as i,aA as oe,c6 as Ot,ay as ue,be as Ge,b$ as et,b_ as C,bO as g,bS as p,bl as S,aB as k,bj as Ar,aw as tt,ai as Nr,c5 as pr,a as gr,a7 as je,aj as vt,cd as Wr,br as Br}from"./DYhIMPy1.js";import{F as mr,G as Or}from"./Dix9BiYu.js";import{s as rt,l as yt,k as or,h as Pt}from"./DZtstCLQ.js";import{c as St}from"./DFcwI6Rh.js";import{b as _r}from"./BaIAhI85.js";import{HR as A,nk as hr,u$ as wr,u_ as br,K4 as qr,K5 as Hr,eB as Kr,eC as Xr,Jv as ir,lv as qt,B5 as nr,rE as sr,nI as Jr,yI as Yr,a9 as lr,Il as Gr,IC as Zr,mW as Qr,iM as ea,nm as ta,uq as ra,z3 as aa,Ju as oa}from"./Bo4s1kgI.js";import{g as ia}from"./DfN8_dcw.js";import{a as na,g as sa,i as la,c as da,h as ca,d as ua,e as dr,f as fa,b as Ht}from"./o5rEX9Xy.js";import{by as va,bL as pa,dm as ga}from"./C-RJDuZ9.js";import{w as cr,d as ma}from"./BDgfVkJh.js";import{f as _a}from"./BXean12D.js";import{n as Kt}from"./-x_SoK5J.js";import{f as Fe,ax as ha}from"./CVjlpAWj.js";import"./p5gLe3PS.js";import{F as Qe,ab as wa,at as ba,aX as xa,b1 as Tt,co as ya,cp as Pa,bk as $a,cN as ka,c5 as Ia}from"./B0JWnOsx.js";import{g as Ca,i as Fa,w as ur}from"./w6mFE4SD.js";import{c as Sa}from"./ChTqQfQN.js";import"./dmSYAakE.js";import{V as Da}from"./pnKMO5U0.js";import{i as Xt,b as Ta,a as Ra}from"./H2jLkRRS.js";import{C as Yt,p as Ma}from"./B6DUgu-2.js";import{M as Ua}from"./Cja4W1Zb.js";import{t as Jt,u as xr}from"./DYfBNrOV.js";import"./D6dCvfQe.js";import"./Bok30zBH.js";import{M as Dt}from"./nLw8YrmA.js";import{V as ja}from"./D7q-DSVP.js";import{bN as Ea,b4 as za}from"./C0VXEpDj.js";import{al as La}from"./D2zJp5fS.js";const yr=A.createSelector((Y,x)=>hr(Y.pdfPreview.previews,x));var Va=k('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),Aa=k('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function Gt(Y,x){if(new.target)return Mt({component:Gt,...Y});Et(x,!0);const Ie=()=>be(xe,"$preview",at),[at,ie]=Zt();let $=ae(x,"workspaceId",7),ne=ae(x,"filePath",7),Ce=ae(x,"gitRootId",7);const Se=crypto.randomUUID(),xe=yr(Se),_e=new WeakMap;let Q=O(null),He=O(void 0),N=O(1),B=O(1),se=O(!0),E=O(!1),ze=O(null),Ne=O(0);const ye=i(()=>Ie()?.error??e(ze)),De=i(()=>e(ye)==="missing"?d.file_pdf_missing_error():e(ye)==="large"?d.file_pdf_large_error():e(ye)==="invalid"?d.file_pdf_invalid_error():e(ye)==="password"?d.file_pdf_password_error():d.file_pdf_load_error());ke(()=>{const l=$(),y=ne();e(Ne);const z=crypto.randomUUID();return A.dispatch(wr(Se,z,l,y,...Ce()?[{gitRootId:Ce()}]:[])),()=>{A.dispatch(br(Se,z))}}),ke(()=>{const l=Ie()?.url;let y=!1,z;if(u(Q,null),u(ze,null),u(se,!0),u(N,1),u(B,1),!!l)return(async()=>{try{const{loadPdfDocument:X}=await Vr(async()=>{const{loadPdfDocument:he}=await import("./cb1JHFKl.js");return{loadPdfDocument:he}},[],import.meta.url);if(y)return;z=X(l);const le=await z.promise;y||u(Q,le)}catch(X){if(y)return;u(ze,X instanceof Error&&X.name==="PasswordException"?"password":X instanceof Error&&X.name==="InvalidPDFException"?"invalid":"load",!0)}finally{y||u(se,!1)}})(),()=>{y=!0,z?.destroy()}}),ke(()=>{const l=e(Q),y=e(He),z=e(N),X=e(B);if(!l||!y)return;let le=!1,he,U;const de=()=>{if(!U)return;const J=(_e.get(U)??1)-1;J?_e.set(U,J):(_e.delete(U),U.cleanup()),U=void 0};return u(E,!0),(async()=>{try{if(U=await l.getPage(z),_e.set(U,(_e.get(U)??0)+1),le){de();return}const J=U.getViewport({scale:X}),ee=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));y.width=Math.ceil(J.width*ee),y.height=Math.ceil(J.height*ee),y.style.width=`${J.width}px`,y.style.height=`${J.height}px`,he=U.render({canvas:y,viewport:J,transform:[ee,0,0,ee,0,0]}),await he.promise}catch{le||u(ze,"invalid")}finally{le||u(E,!1)}})(),()=>{le=!0,he?.cancel(),he?he.promise.then(de,de):de()}});var We={get workspaceId(){return $()},set workspaceId(l){$(l),oe()},get filePath(){return ne()},set filePath(l){ne(l),oe()},get gitRootId(){return Ce()},set gitRootId(l){Ce(l),oe()},$set:Ut,$on:(l,y)=>jt(x,l,y)},o=Aa(),c=R(o);{var M=l=>{{const y=X=>{Ge();var le=et();C(()=>g(le,e(De))),s(X,le)};let z=i(()=>d.ui_combobox_retry_label());Ca(l,{onRetry:()=>Ot(Ne),get retryLabel(){return e(z)},class:"m-auto",message:y,$$slots:{message:!0}})}},m=l=>{{let y=i(()=>d.file_pdf_loading_label());Fa(l,{get label(){return e(y)},count:1,class:"p-4"})}},w=l=>{var y=Va(),z=ue(y),X=R(z);{let ge=i(()=>e(N)<=1);Fe(X,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N,-1),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_previous_label()]),s(Pe,$e)},$$slots:{default:!0}})}var le=p(X,2),he=S(le,!0),U=p(le,2);{let ge=i(()=>e(N)>=e(Q).numPages);Fe(U,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_next_label()]),s(Pe,$e)},$$slots:{default:!0}})}var de=p(U,2);{let ge=i(()=>e(B)<=.25);Fe(de,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.max(.25,e(B)-.25),!0),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomOut_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}var J=p(de,2),ee=S(J,!0),ot=p(J,2);{let ge=i(()=>e(B)>=3);Fe(ot,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.min(3,e(B)+.25),!0),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomIn_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}P(z);var it=p(z,2),Ke=R(it);let Ze;_r(Ke,ge=>u(He,ge),()=>e(He)),P(it),C((ge,Pe,Xe)=>{g(he,ge),g(ee,Pe),rt(it,"aria-busy",e(E)),rt(Ke,"aria-label",Xe),Ze=yt(Ke,"",Ze,{visibility:e(E)?"hidden":"visible"})},[()=>d.file_pdf_page_label({page:Jt(e(N)),total:Jt(e(Q).numPages)}),()=>xr(e(B),{style:"percent"}),()=>d.file_pdf_canvas_ariaLabel({name:ne(),page:Jt(e(N))})]),s(l,y)};re(c,l=>{e(ye)?l(M):e(se)||Ie()?.status==="loading"?l(m,1):e(Q)&&l(w,2)})}P(o),s(Y,o);var Le=zt(We);return ie(),Le}const Na=A.createSelector((Y,x)=>hr(Y.videoPreview.previews,x));var Wa=k('<p role="status"> </p>'),Ba=k('<p role="alert"> </p>'),Oa=k('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),qa=k('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),Ha=k('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Pr(Y,x){if(new.target)return Mt({component:Pr,...Y});Et(x,!0);const Ie=()=>be(He,"$preview",at),[at,ie]=Zt();let $=ae(x,"sourceUrl",7),ne=ae(x,"fileName",7),Ce=ae(x,"allowDownload",7),Se=ae(x,"downloading",7),xe=ae(x,"onDownload",7),_e=O(null);const Q=crypto.randomUUID(),He=Na(Q),N=i(()=>Ie()?.status==="loading"),B=i(()=>e(_e)??Ie()?.error);let se=!1,E=!1;Ar(()=>{E=!0,A.dispatch(qr(Q))});function ze(){if(E||e(N))return;const m=$().startsWith("workspace-file://")?new URL($()):null;if(se||!m||!m.pathname.toLowerCase().endsWith(".mp4")){u(_e,"unsupported");return}se=!0,m.searchParams.set("preview","h264"),A.dispatch(Hr(Q,m.hostname,m.toString()))}function Ne(m){if(E)return;const w=m.currentTarget.error?.code;w===2?u(_e,"network"):w!==1&&ze()}var ye={get sourceUrl(){return $()},set sourceUrl(m){$(m),oe()},get fileName(){return ne()},set fileName(m){ne(m),oe()},get allowDownload(){return Ce()},set allowDownload(m){Ce(m),oe()},get downloading(){return Se()},set downloading(m){Se(m),oe()},get onDownload(){return xe()},set onDownload(m){xe(m),oe()},$set:Ut,$on:(m,w)=>jt(x,m,w)},De=Ha(),We=R(De);{var o=m=>{var w=Oa(),Le=R(w),l=S(Le,!0),y=p(Le,2);{var z=U=>{var de=Wa(),J=S(de,!0);C(ee=>g(J,ee),[()=>d.editor_fileViewer_videoPreparing_label()]),s(U,de)},X=U=>{var de=Ba(),J=S(de,!0);C(ee=>g(J,ee),[()=>e(B)==="network"?d.editor_fileViewer_videoLoad_error():d.editor_fileViewer_videoUnsupported_label()]),s(U,de)};re(y,U=>{e(N)?U(z):U(X,-1)})}var le=p(y,2);{var he=U=>{Fe(U,{variant:"secondary",size:"sm",get onclick(){return xe()},get disabled(){return Se()},children:(de,J)=>{Ge();var ee=et();C(ot=>g(ee,ot),[()=>d.layout_fileTab_downloadFile_label()]),s(de,ee)},$$slots:{default:!0}})};re(le,U=>{Ce()&&U(he)})}P(w),C(()=>g(l,ne())),s(m,w)},c=m=>{var w=qa(),Le=S(w,!0);C(l=>{rt(w,"src",Ie()?.url??$()),g(Le,l)},[()=>d.editor_fileViewer_videoUnsupported_label()]),tt("error",w,Ne),tt("loadedmetadata",w,l=>{l.currentTarget.videoWidth===0&&ze()}),s(m,w)};re(We,m=>{e(B)||e(N)?m(o):m(c,-1)})}P(De),s(Y,De);var M=zt(ye);return ie(),M}var Ka=k('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),Xa=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ja=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ya=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),Ga=k("<!> ",1),Za=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),Qa=k('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),eo=k('<td class="border border-border px-2 py-1 text-xs"> </td>'),to=k("<tr></tr>"),ro=k('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),ao=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),oo=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),io=k('<div class="h-full flex flex-col"><!></div>');function Rt(Y,x){if(new.target)return Mt({component:Rt,...Y});Et(x,!0);const Ie=t=>{var a=Ka(),f=ue(a);{let D=i(()=>d.editor_fileViewer_zoomOut_tooltip());Fe(f,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:de,get title(){return e(D)},children:(T,q)=>{Qe(T,{get icon(){return ya},size:"sm"})},$$slots:{default:!0}})}var _=p(f,2),h=S(_,!0),j=p(_,2);{let D=i(()=>d.editor_fileViewer_zoomIn_tooltip());Fe(j,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:U,get title(){return e(D)},children:(T,q)=>{Qe(T,{get icon(){return Pa},size:"sm"})},$$slots:{default:!0}})}Ge(2),C(()=>g(h,e(ze))),s(t,a)},at=Sa("FileViewer");let ie=ae(x,"filePath",7),$=ae(x,"fileContent",7,""),ne=ae(x,"sourceUrl",7),Ce=ae(x,"language",7),Se=ae(x,"isBinary",7),xe=ae(x,"allowDownload",7,!0),_e=ae(x,"onDownload",7),Q=ae(x,"downloading",7,!1);const He=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},N=i(()=>He(ie())),B=i(()=>ie().split("/").pop()||d.editor_fileViewer_unknown_fallback());let se=O(100),E=O(0);const ze=i(()=>xr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let Ne=O(!1),ye=O(0),De=O(0),We=O(0),o=O(0),c=O(!1),M=null;function m(){const t=M;M=null,u(c,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function w(t){if(t.button!==0||!t.isPrimary||M)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),M={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},u(c,!0),t.preventDefault()}function Le(t){if(!(!M||t.pointerId!==M.pointerId)){if((t.buttons&1)===0){m();return}u(We,M.viewport.scrollLeft,!0),u(o,M.viewport.scrollTop,!0),u(ye,e(ye)+(t.clientX-M.x)),u(De,e(De)+(t.clientY-M.y)),M.x=t.clientX,M.y=t.clientY}}function l(t){t.pointerId===M?.pointerId&&m()}ke(()=>{ie(),ne(),e(se),e(E),u(We,0),u(o,0)}),ke(()=>(ie(),ne(),pr(()=>{m(),u(ye,0),u(De,0)}),m));const y=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},z=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},X=()=>{if(ne())return ne();if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():Se()?`data:${y(ie())};base64,${$()}`:`data:${y(ie())};base64,${$()}`;if($()instanceof ArrayBuffer){const a=new Uint8Array($()).reduce((_,h)=>_+String.fromCharCode(h),""),f=btoa(a);return`data:${y(ie())};base64,${f}`}return""},le=()=>{if(ne())return ne();const t=z(ie());if(!t)return"";if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():`data:${t};base64,${$()}`;const a=new Uint8Array($()),f=[],_=32768;for(let h=0;h<a.length;h+=_)f.push(String.fromCharCode(...a.subarray(h,h+_)));return`data:${t};base64,${btoa(f.join(""))}`},he=()=>{const t=typeof $()=="string"?new TextEncoder().encode($()):new Uint8Array($()),a=[],f=32768;for(let _=0;_<t.length;_+=f)a.push(String.fromCharCode(...t.subarray(_,_+f)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},U=()=>{u(se,Math.min(e(se)+25,500),!0)},de=()=>{u(se,Math.max(e(se)-25,25),!0)},J=()=>{u(E,(e(E)+90)%360)},ee=()=>{if(!xe()||Q())return;if(_e()){_e()();return}const t=document.createElement("a");t.href=e(N)==="video"?le():e(N)==="svg"?he():X(),t.download=e(B),t.click()},ot=async()=>{try{const t=X(),a=new Image;a.crossOrigin="anonymous";const f=await new Promise((_,h)=>{a.onload=()=>{const j=document.createElement("canvas");j.width=a.naturalWidth,j.height=a.naturalHeight;const D=j.getContext("2d");if(!D){h(new Error("Failed to get canvas context"));return}D.drawImage(a,0,0),j.toBlob(T=>{T?_(T):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":f})]),u(Ne,!0),setTimeout(()=>u(Ne,!1),2e3)}catch(t){at.error("Failed to copy image:",t)}},it=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},Ke=t=>t.split(`
|
|
1
|
+
import{t as Mt,bq as ae,_ as Vr,a_ as re,by as Ut,bu as be,bs as Zt,b as jt,bo as d}from"./BLK9_MXJ.js";import{bs as Et,ca as ke,aD as e,bH as u,a5 as R,bA as P,W as s,bn as zt,bV as O,c9 as i,aA as oe,c6 as Ot,ay as ue,be as Ge,b$ as et,b_ as C,bO as g,bS as p,bl as S,aB as k,bj as Ar,aw as tt,ai as Nr,c5 as pr,a as gr,a7 as je,aj as vt,cd as Wr,br as Br}from"./DYhIMPy1.js";import{F as mr,G as Or}from"./Cs29mItj.js";import{s as rt,l as yt,k as or,h as Pt}from"./9ZBkr0Qf.js";import{c as St}from"./kYECwxqW.js";import{b as _r}from"./BaIAhI85.js";import{HR as A,nk as hr,u$ as wr,u_ as br,K4 as qr,K5 as Hr,eB as Kr,eC as Xr,Jv as ir,lv as qt,B5 as nr,rE as sr,nI as Jr,yI as Yr,a9 as lr,Il as Gr,IC as Zr,mW as Qr,iM as ea,nm as ta,uq as ra,z3 as aa,Ju as oa}from"./DSAz0okZ.js";import{g as ia}from"./DfN8_dcw.js";import{a as na,g as sa,i as la,c as da,h as ca,d as ua,e as dr,f as fa,b as Ht}from"./CtlvWnL2.js";import{by as va,bL as pa,dm as ga}from"./ClKXAKis.js";import{w as cr,d as ma}from"./BxwVL-Fm.js";import{f as _a}from"./DgH1Kxzo.js";import{n as Kt}from"./B6l2HPmZ.js";import{f as Fe,ax as ha}from"./CukTrqVi.js";import"./DSemZQdl.js";import{F as Qe,ab as wa,at as ba,aX as xa,b1 as Tt,co as ya,cp as Pa,bk as $a,cN as ka,c5 as Ia}from"./yDAFOpKJ.js";import{g as Ca,i as Fa,w as ur}from"./BA_dLJoi.js";import{c as Sa}from"./ChTqQfQN.js";import"./DNmwPq0o.js";import{V as Da}from"./Dx4FwkUV.js";import{i as Xt,b as Ta,a as Ra}from"./H2jLkRRS.js";import{C as Yt,p as Ma}from"./CvEJT2Bp.js";import{M as Ua}from"./CxFIgZQh.js";import{t as Jt,u as xr}from"./CFpa0qKK.js";import"./B3X_dqJy.js";import"./C_etBYrd.js";import{M as Dt}from"./ZZRQ9A5E.js";import{V as ja}from"./Cd2nCrGL.js";import{bN as Ea,b4 as za}from"./waagD0cO.js";import{al as La}from"./BKGDTzxi.js";const yr=A.createSelector((Y,x)=>hr(Y.pdfPreview.previews,x));var Va=k('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),Aa=k('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function Gt(Y,x){if(new.target)return Mt({component:Gt,...Y});Et(x,!0);const Ie=()=>be(xe,"$preview",at),[at,ie]=Zt();let $=ae(x,"workspaceId",7),ne=ae(x,"filePath",7),Ce=ae(x,"gitRootId",7);const Se=crypto.randomUUID(),xe=yr(Se),_e=new WeakMap;let Q=O(null),He=O(void 0),N=O(1),B=O(1),se=O(!0),E=O(!1),ze=O(null),Ne=O(0);const ye=i(()=>Ie()?.error??e(ze)),De=i(()=>e(ye)==="missing"?d.file_pdf_missing_error():e(ye)==="large"?d.file_pdf_large_error():e(ye)==="invalid"?d.file_pdf_invalid_error():e(ye)==="password"?d.file_pdf_password_error():d.file_pdf_load_error());ke(()=>{const l=$(),y=ne();e(Ne);const z=crypto.randomUUID();return A.dispatch(wr(Se,z,l,y,...Ce()?[{gitRootId:Ce()}]:[])),()=>{A.dispatch(br(Se,z))}}),ke(()=>{const l=Ie()?.url;let y=!1,z;if(u(Q,null),u(ze,null),u(se,!0),u(N,1),u(B,1),!!l)return(async()=>{try{const{loadPdfDocument:X}=await Vr(async()=>{const{loadPdfDocument:he}=await import("./cb1JHFKl.js");return{loadPdfDocument:he}},[],import.meta.url);if(y)return;z=X(l);const le=await z.promise;y||u(Q,le)}catch(X){if(y)return;u(ze,X instanceof Error&&X.name==="PasswordException"?"password":X instanceof Error&&X.name==="InvalidPDFException"?"invalid":"load",!0)}finally{y||u(se,!1)}})(),()=>{y=!0,z?.destroy()}}),ke(()=>{const l=e(Q),y=e(He),z=e(N),X=e(B);if(!l||!y)return;let le=!1,he,U;const de=()=>{if(!U)return;const J=(_e.get(U)??1)-1;J?_e.set(U,J):(_e.delete(U),U.cleanup()),U=void 0};return u(E,!0),(async()=>{try{if(U=await l.getPage(z),_e.set(U,(_e.get(U)??0)+1),le){de();return}const J=U.getViewport({scale:X}),ee=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));y.width=Math.ceil(J.width*ee),y.height=Math.ceil(J.height*ee),y.style.width=`${J.width}px`,y.style.height=`${J.height}px`,he=U.render({canvas:y,viewport:J,transform:[ee,0,0,ee,0,0]}),await he.promise}catch{le||u(ze,"invalid")}finally{le||u(E,!1)}})(),()=>{le=!0,he?.cancel(),he?he.promise.then(de,de):de()}});var We={get workspaceId(){return $()},set workspaceId(l){$(l),oe()},get filePath(){return ne()},set filePath(l){ne(l),oe()},get gitRootId(){return Ce()},set gitRootId(l){Ce(l),oe()},$set:Ut,$on:(l,y)=>jt(x,l,y)},o=Aa(),c=R(o);{var M=l=>{{const y=X=>{Ge();var le=et();C(()=>g(le,e(De))),s(X,le)};let z=i(()=>d.ui_combobox_retry_label());Ca(l,{onRetry:()=>Ot(Ne),get retryLabel(){return e(z)},class:"m-auto",message:y,$$slots:{message:!0}})}},m=l=>{{let y=i(()=>d.file_pdf_loading_label());Fa(l,{get label(){return e(y)},count:1,class:"p-4"})}},w=l=>{var y=Va(),z=ue(y),X=R(z);{let ge=i(()=>e(N)<=1);Fe(X,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N,-1),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_previous_label()]),s(Pe,$e)},$$slots:{default:!0}})}var le=p(X,2),he=S(le,!0),U=p(le,2);{let ge=i(()=>e(N)>=e(Q).numPages);Fe(U,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_next_label()]),s(Pe,$e)},$$slots:{default:!0}})}var de=p(U,2);{let ge=i(()=>e(B)<=.25);Fe(de,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.max(.25,e(B)-.25),!0),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomOut_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}var J=p(de,2),ee=S(J,!0),ot=p(J,2);{let ge=i(()=>e(B)>=3);Fe(ot,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.min(3,e(B)+.25),!0),children:(Pe,Xe)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomIn_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}P(z);var it=p(z,2),Ke=R(it);let Ze;_r(Ke,ge=>u(He,ge),()=>e(He)),P(it),C((ge,Pe,Xe)=>{g(he,ge),g(ee,Pe),rt(it,"aria-busy",e(E)),rt(Ke,"aria-label",Xe),Ze=yt(Ke,"",Ze,{visibility:e(E)?"hidden":"visible"})},[()=>d.file_pdf_page_label({page:Jt(e(N)),total:Jt(e(Q).numPages)}),()=>xr(e(B),{style:"percent"}),()=>d.file_pdf_canvas_ariaLabel({name:ne(),page:Jt(e(N))})]),s(l,y)};re(c,l=>{e(ye)?l(M):e(se)||Ie()?.status==="loading"?l(m,1):e(Q)&&l(w,2)})}P(o),s(Y,o);var Le=zt(We);return ie(),Le}const Na=A.createSelector((Y,x)=>hr(Y.videoPreview.previews,x));var Wa=k('<p role="status"> </p>'),Ba=k('<p role="alert"> </p>'),Oa=k('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),qa=k('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),Ha=k('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Pr(Y,x){if(new.target)return Mt({component:Pr,...Y});Et(x,!0);const Ie=()=>be(He,"$preview",at),[at,ie]=Zt();let $=ae(x,"sourceUrl",7),ne=ae(x,"fileName",7),Ce=ae(x,"allowDownload",7),Se=ae(x,"downloading",7),xe=ae(x,"onDownload",7),_e=O(null);const Q=crypto.randomUUID(),He=Na(Q),N=i(()=>Ie()?.status==="loading"),B=i(()=>e(_e)??Ie()?.error);let se=!1,E=!1;Ar(()=>{E=!0,A.dispatch(qr(Q))});function ze(){if(E||e(N))return;const m=$().startsWith("workspace-file://")?new URL($()):null;if(se||!m||!m.pathname.toLowerCase().endsWith(".mp4")){u(_e,"unsupported");return}se=!0,m.searchParams.set("preview","h264"),A.dispatch(Hr(Q,m.hostname,m.toString()))}function Ne(m){if(E)return;const w=m.currentTarget.error?.code;w===2?u(_e,"network"):w!==1&&ze()}var ye={get sourceUrl(){return $()},set sourceUrl(m){$(m),oe()},get fileName(){return ne()},set fileName(m){ne(m),oe()},get allowDownload(){return Ce()},set allowDownload(m){Ce(m),oe()},get downloading(){return Se()},set downloading(m){Se(m),oe()},get onDownload(){return xe()},set onDownload(m){xe(m),oe()},$set:Ut,$on:(m,w)=>jt(x,m,w)},De=Ha(),We=R(De);{var o=m=>{var w=Oa(),Le=R(w),l=S(Le,!0),y=p(Le,2);{var z=U=>{var de=Wa(),J=S(de,!0);C(ee=>g(J,ee),[()=>d.editor_fileViewer_videoPreparing_label()]),s(U,de)},X=U=>{var de=Ba(),J=S(de,!0);C(ee=>g(J,ee),[()=>e(B)==="network"?d.editor_fileViewer_videoLoad_error():d.editor_fileViewer_videoUnsupported_label()]),s(U,de)};re(y,U=>{e(N)?U(z):U(X,-1)})}var le=p(y,2);{var he=U=>{Fe(U,{variant:"secondary",size:"sm",get onclick(){return xe()},get disabled(){return Se()},children:(de,J)=>{Ge();var ee=et();C(ot=>g(ee,ot),[()=>d.layout_fileTab_downloadFile_label()]),s(de,ee)},$$slots:{default:!0}})};re(le,U=>{Ce()&&U(he)})}P(w),C(()=>g(l,ne())),s(m,w)},c=m=>{var w=qa(),Le=S(w,!0);C(l=>{rt(w,"src",Ie()?.url??$()),g(Le,l)},[()=>d.editor_fileViewer_videoUnsupported_label()]),tt("error",w,Ne),tt("loadedmetadata",w,l=>{l.currentTarget.videoWidth===0&&ze()}),s(m,w)};re(We,m=>{e(B)||e(N)?m(o):m(c,-1)})}P(De),s(Y,De);var M=zt(ye);return ie(),M}var Ka=k('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),Xa=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ja=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ya=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),Ga=k("<!> ",1),Za=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),Qa=k('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),eo=k('<td class="border border-border px-2 py-1 text-xs"> </td>'),to=k("<tr></tr>"),ro=k('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),ao=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),oo=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),io=k('<div class="h-full flex flex-col"><!></div>');function Rt(Y,x){if(new.target)return Mt({component:Rt,...Y});Et(x,!0);const Ie=t=>{var a=Ka(),f=ue(a);{let D=i(()=>d.editor_fileViewer_zoomOut_tooltip());Fe(f,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:de,get title(){return e(D)},children:(T,q)=>{Qe(T,{get icon(){return ya},size:"sm"})},$$slots:{default:!0}})}var _=p(f,2),h=S(_,!0),j=p(_,2);{let D=i(()=>d.editor_fileViewer_zoomIn_tooltip());Fe(j,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:U,get title(){return e(D)},children:(T,q)=>{Qe(T,{get icon(){return Pa},size:"sm"})},$$slots:{default:!0}})}Ge(2),C(()=>g(h,e(ze))),s(t,a)},at=Sa("FileViewer");let ie=ae(x,"filePath",7),$=ae(x,"fileContent",7,""),ne=ae(x,"sourceUrl",7),Ce=ae(x,"language",7),Se=ae(x,"isBinary",7),xe=ae(x,"allowDownload",7,!0),_e=ae(x,"onDownload",7),Q=ae(x,"downloading",7,!1);const He=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},N=i(()=>He(ie())),B=i(()=>ie().split("/").pop()||d.editor_fileViewer_unknown_fallback());let se=O(100),E=O(0);const ze=i(()=>xr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let Ne=O(!1),ye=O(0),De=O(0),We=O(0),o=O(0),c=O(!1),M=null;function m(){const t=M;M=null,u(c,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function w(t){if(t.button!==0||!t.isPrimary||M)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),M={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},u(c,!0),t.preventDefault()}function Le(t){if(!(!M||t.pointerId!==M.pointerId)){if((t.buttons&1)===0){m();return}u(We,M.viewport.scrollLeft,!0),u(o,M.viewport.scrollTop,!0),u(ye,e(ye)+(t.clientX-M.x)),u(De,e(De)+(t.clientY-M.y)),M.x=t.clientX,M.y=t.clientY}}function l(t){t.pointerId===M?.pointerId&&m()}ke(()=>{ie(),ne(),e(se),e(E),u(We,0),u(o,0)}),ke(()=>(ie(),ne(),pr(()=>{m(),u(ye,0),u(De,0)}),m));const y=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},z=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},X=()=>{if(ne())return ne();if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():Se()?`data:${y(ie())};base64,${$()}`:`data:${y(ie())};base64,${$()}`;if($()instanceof ArrayBuffer){const a=new Uint8Array($()).reduce((_,h)=>_+String.fromCharCode(h),""),f=btoa(a);return`data:${y(ie())};base64,${f}`}return""},le=()=>{if(ne())return ne();const t=z(ie());if(!t)return"";if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():`data:${t};base64,${$()}`;const a=new Uint8Array($()),f=[],_=32768;for(let h=0;h<a.length;h+=_)f.push(String.fromCharCode(...a.subarray(h,h+_)));return`data:${t};base64,${btoa(f.join(""))}`},he=()=>{const t=typeof $()=="string"?new TextEncoder().encode($()):new Uint8Array($()),a=[],f=32768;for(let _=0;_<t.length;_+=f)a.push(String.fromCharCode(...t.subarray(_,_+f)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},U=()=>{u(se,Math.min(e(se)+25,500),!0)},de=()=>{u(se,Math.max(e(se)-25,25),!0)},J=()=>{u(E,(e(E)+90)%360)},ee=()=>{if(!xe()||Q())return;if(_e()){_e()();return}const t=document.createElement("a");t.href=e(N)==="video"?le():e(N)==="svg"?he():X(),t.download=e(B),t.click()},ot=async()=>{try{const t=X(),a=new Image;a.crossOrigin="anonymous";const f=await new Promise((_,h)=>{a.onload=()=>{const j=document.createElement("canvas");j.width=a.naturalWidth,j.height=a.naturalHeight;const D=j.getContext("2d");if(!D){h(new Error("Failed to get canvas context"));return}D.drawImage(a,0,0),j.toBlob(T=>{T?_(T):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":f})]),u(Ne,!0),setTimeout(()=>u(Ne,!1),2e3)}catch(t){at.error("Failed to copy image:",t)}},it=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},Ke=t=>t.split(`
|
|
2
2
|
`).map(f=>f.split(",").map(_=>_.trim()));var Ze={get filePath(){return ie()},set filePath(t){ie(t),oe()},get fileContent(){return $()},set fileContent(t=""){$(t),oe()},get sourceUrl(){return ne()},set sourceUrl(t){ne(t),oe()},get language(){return Ce()},set language(t){Ce(t),oe()},get isBinary(){return Se()},set isBinary(t){Se(t),oe()},get allowDownload(){return xe()},set allowDownload(t=!0){xe(t),oe()},get onDownload(){return _e()},set onDownload(t){_e(t),oe()},get downloading(){return Q()},set downloading(t=!1){Q(t),oe()},$set:Ut,$on:(t,a)=>jt(x,t,a)},ge=io();tt("blur",gr,m);var Pe=R(ge);{var Xe=t=>{var a=Xa(),f=R(a),_=R(f);Ie(_);var h=p(_,2);{let te=i(()=>d.editor_fileViewer_rotate_tooltip());Fe(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:J,get title(){return e(te)},children:(we,Te)=>{Qe(we,{get icon(){return wa},size:"sm"})},$$slots:{default:!0}})}var j=p(h,4);{let te=i(()=>d.editor_fileViewer_copyImage_tooltip());Fe(j,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:ot,get title(){return e(te)},children:(we,Te)=>{var Ee=je(),Be=ue(Ee);{var Vt=Je=>{Qe(Je,{get icon(){return ba},size:"sm",class:"text-green-500"})},pt=Je=>{Qe(Je,{get icon(){return xa},size:"sm"})};re(Be,Je=>{e(Ne)?Je(Vt):Je(pt,-1)})}s(we,Ee)},$$slots:{default:!0}})}var D=p(j,2);{let te=i(()=>!xe()||Q()),we=i(()=>d.editor_fileViewer_download_tooltip());Fe(D,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:ee,get disabled(){return e(te)},get title(){return e(we)},children:(Te,Ee)=>{Qe(Te,{get icon(){return Tt},size:"sm"})},$$slots:{default:!0}})}var T=p(D,2),q=S(T,!0);P(f);var L=p(f,2),G=S(L);P(a),C(te=>{g(q,e(B)),or(L,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(c)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),yt(L,`--pan-scroll-x: ${e(We)??""}px; --pan-scroll-y: ${e(o)??""}px;`),rt(G,"src",te),rt(G,"alt",e(B)),yt(G,`translate: ${e(ye)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(E)??""}deg); transition: transform 0.2s;`)},[()=>X()]),vt("pointerdown",L,w),vt("pointermove",L,Le),vt("pointerup",L,l),tt("pointercancel",L,l),tt("lostpointercapture",L,l),s(t,a)},$e=t=>{var a=Ja(),f=R(a),_=R(f);Ie(_);var h=p(_,2);{let L=i(()=>!xe()||Q()),G=i(()=>d.editor_fileViewer_download_tooltip());Fe(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:ee,get disabled(){return e(L)},get title(){return e(G)},children:(te,we)=>{Qe(te,{get icon(){return Tt},size:"sm"})},$$slots:{default:!0}})}var j=p(h,2),D=S(j,!0);P(f);var T=p(f,2),q=S(T);P(a),C(L=>{g(D,e(B)),or(T,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(c)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),yt(T,`--pan-scroll-x: ${e(We)??""}px; --pan-scroll-y: ${e(o)??""}px;`),rt(q,"src",L),rt(q,"alt",e(B)),yt(q,`translate: ${e(ye)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>he()]),vt("pointerdown",T,w),vt("pointermove",T,Le),vt("pointerup",T,l),tt("pointercancel",T,l),tt("lostpointercapture",T,l),s(t,a)},fe=t=>{const a=i(le);var f=je(),_=ue(f);mr(_,()=>ie()+e(a),h=>{Pr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return xe()},get downloading(){return Q()},onDownload:ee})}),s(t,f)},nt=t=>{var a=Ya(),f=p(R(a),2),_=S(f,!0),h=p(f,2),j=R(h),D=p(j);P(h),P(a),C((T,q)=>{g(_,e(B)),rt(j,"src",T),g(D,` ${q??""}`)},[()=>X(),()=>d.editor_fileViewer_audioUnsupported_label()]),s(t,a)},$t=t=>{var a=Za(),f=p(R(a),2),_=S(f,!0),h=p(f,2);{let j=i(()=>!xe()||Q());Fe(h,{size:"sm",variant:"secondary",onclick:ee,get disabled(){return e(j)},children:(D,T)=>{var q=Ga(),L=ue(q);Qe(L,{get icon(){return Tt},size:"sm",class:"mr-2"});var G=p(L);C(te=>g(G,` ${te??""}`),[()=>d.editor_fileViewer_downloadPdf_label()]),s(D,q)},$$slots:{default:!0}})}P(a),C(j=>g(_,j),[()=>d.editor_fileViewer_pdfUnavailable_label()]),s(t,a)},ct=t=>{{let a=i(()=>it($().toString()));Yt(t,{get value(){return e(a)},language:"json",get fileName(){return ie()},lineNumbers:!0,readOnly:!0})}},ut=t=>{const a=i(()=>Ke($().toString()));var f=ro(),_=R(f),h=R(_),j=R(h);Pt(j,23,()=>e(a)[0]||[],(T,q)=>`header-${q}-${T}`,(T,q)=>{var L=Qa(),G=S(L,!0);C(()=>g(G,e(q))),s(T,L)}),P(j),P(h);var D=p(h);Pt(D,23,()=>e(a).slice(1),(T,q)=>`row-${q}`,(T,q,L)=>{var G=to();Pt(G,23,()=>e(q),(te,we)=>`cell-${e(L)}-${we}`,(te,we)=>{var Te=eo(),Ee=S(Te,!0);C(()=>g(Ee,e(we))),s(te,Te)}),P(G),s(T,G)}),P(D),P(_),P(f),s(t,f)},kt=t=>{var a=ao(),f=p(R(a),2),_=S(f,!0),h=p(f,2),j=S(h,!0);P(a),C(D=>{g(_,e(B)),g(j,D)},[()=>d.editor_fileViewer_archive_label()]),s(t,a)},Lt=t=>{var a=oo(),f=p(R(a),2),_=S(f,!0),h=p(f,2),j=S(h,!0);P(a),C(D=>{g(_,e(B)),g(j,D)},[()=>d.editor_fileViewer_binary_label()]),s(t,a)},It=t=>{{let a=i(()=>$().toString());Yt(t,{get value(){return e(a)},get language(){return Ce()},get fileName(){return ie()},lineNumbers:!0,highlightActiveLine:!0})}};re(Pe,t=>{e(N)==="image"?t(Xe):e(N)==="svg"?t($e,1):e(N)==="video"?t(fe,2):e(N)==="audio"?t(nt,3):e(N)==="pdf"?t($t,4):e(N)==="json"?t(ct,5):e(N)==="csv"?t(ut,6):e(N)==="archive"?t(kt,7):e(N)==="binary"?t(Lt,8):t(It,-1)})}return P(ge),s(Y,ge),zt(Ze)}Nr(["pointerdown","pointermove","pointerup"]);const no=/access denied|permission denied|outside (?:the )?workspace/i,so=/file not found|no such file or directory/i;function lo(Y){return no.test(Y)?"access-denied":Y===d.files_read_notFound_error()||so.test(Y)?"not-found":"generic"}function co(Y){switch(Y){case"access-denied":return d.layout_fileTab_errorAccessDenied_label();case"not-found":return d.layout_fileTab_errorNotFound_label();case"generic":return d.layout_fileTab_errorGeneric_label()}}var uo=k("<!> <!>",1),fo=k("<!> <!> <!>",1),vo=k('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),fr=k('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),po=k('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),vr=k('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),go=k('<div class="flex items-center gap-3"><!> <!></div>'),mo=k('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),_o=k('<p class="text-xs"> </p>'),ho=k("<li><!></li>"),wo=k('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),bo=k('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p class="text-danger" role="alert"> </p> <p class="text-xs font-mono"> </p> <!> <!></div>'),xo=k('<div class="flex flex-col items-center justify-center h-full text-subtle gap-3 p-4"><p> </p> <p class="text-xs break-all"> </p> <!></div>'),yo=k('<div class="h-full overflow-auto p-4"><!></div>');function Po(Y,x){if(new.target)return Mt({component:Po,...Y});Et(x,!0);const Ie=()=>be($e,"$workspace",E),at=()=>be(X,"$fileContentStore",E),ie=()=>be(le,"$fileLoadingStore",E),$=()=>be(he,"$fileSavingStore",E),ne=()=>be(U,"$fileErrorStore",E),Ce=()=>be(de,"$fileNotFoundCandidatesStore",E),Se=()=>be(J,"$isFileBinaryStore",E),xe=()=>be(ee,"$isFileDirtyStore",E),_e=()=>be(ot,"$fileLastUpdatedStore",E),Q=()=>be(it,"$ftChanges$",E),He=()=>be(Xe,"$gutterRead$",E),N=()=>be(De,"$lineWrapping",E),B=()=>be(We,"$diffIndicators",E),se=()=>be(ge,"$rootMediaPreview",E),[E,ze]=Zt(),Ne=r=>{var n=uo(),I=ue(n);{var F=pe=>{var Ve=je(),Oe=ue(Ve);St(Oe,()=>Dt,(ft,_t)=>{_t(ft,{get icon(){return $a},get label(){return e(_)},disabled:!0})}),s(pe,Ve)};re(I,pe=>{!e(te)&&!e(l)&&!e(t)&&pe(F)})}var ve=p(I,2);{var Re=pe=>{{let Ve=i(()=>!e(Ct)||!e(L)),Oe=i(()=>!e(l)&&(!e(Ct)||!e(L)));ja(pe,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Ct)},get previewEnabled(){return e(L)},onTogglePreview:()=>u(L,!e(L)),get showWrap(){return e(Ve)},get wrapEnabled(){return N()},onToggleWrap:()=>A.dispatch(Zr()),get showDiff(){return e(Oe)},get diffEnabled(){return B()},onToggleDiff:()=>A.dispatch(Gr())})}};re(ve,pe=>{o().filePath&&!e(te)&&!e(t)&&pe(Re)})}s(r,n)},ye=r=>{var n=je(),I=ue(n);{var F=ve=>{var Re=fo(),pe=ue(Re);{var Ve=Ae=>{var Ye=je(),lt=ue(Ye);{let ht=i(()=>d.layout_fileTab_goToChanges_tooltip());St(lt,()=>Dt,(wt,bt)=>{bt(wt,{get icon(){return Ia},get label(){return e(ht)},onclick:Tr})})}s(Ae,Ye)};re(pe,Ae=>{e(kr)&&Ae(Ve)})}var Oe=p(pe,2);{var ft=Ae=>{var Ye=je(),lt=ue(Ye);{let ht=i(()=>d.layout_fileTab_downloadFile_label()),wt=i(()=>!e(gt)||e(st));St(lt,()=>Dt,(bt,Nt)=>{Nt(bt,{get icon(){return Tt},get label(){return e(ht)},onclick:Ft,get disabled(){return e(wt)}})})}s(Ae,Ye)};re(Oe,Ae=>{e(Be)&&Ae(ft)})}var _t=p(Oe,2);{let Ae=i(()=>d.layout_fileTab_deleteFile_tooltip());St(_t,()=>Dt,(Ye,lt)=>{lt(Ye,{get icon(){return ka},get label(){return e(Ae)},onclick:Rr,destructive:!0})})}s(ve,Re)};re(I,ve=>{o().filePath&&!e(te)&&!e(l)&&ve(F)})}s(r,n)},De=Ea(),We=za();let o=ae(x,"tab",7),c=ae(x,"workspaceId",7),M=ae(x,"isActive",7),m=ae(x,"isPanelFocused",7);ke(()=>{const r=c();if(!(!M()||!r||e(w)))return A.dispatch(Kr(r,"files")),()=>A.dispatch(Xr(r,"files"))});const w=i(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),Le=i(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),l=i(()=>!!e(w)),y=i(()=>o().filePath?_a(o().filePath,e(w)):o().filePath),z=Wr(e(y));ke(()=>{z.set(e(y))});const X=na(c(),z),le=sa(c(),z),he=la(c(),z),U=da(c(),z),de=ca(c(),z),J=ua(c(),z),ee=dr(c(),z),ot=fa(c(),z),it=va(c()),Ke=ia(),Ze=crypto.randomUUID(),ge=yr(Ze),Pe=`file-gutter:${crypto.randomUUID()}`,Xe=pa(c(),Pe),$e=ga(c()),fe=i(()=>Ie()?.worktreePath||Ie()?.repositoryPath||Ie()?.path||null),nt=i(at),$t=i(ie),ct=i($),ut=i(ne),kt=i(()=>e(ut)?lo(e(ut)):"generic"),Lt=5,It=i(()=>(Ce()??[]).slice(0,Lt)),t=i(Se),a=i(xe),f=i(_e),_=i(()=>e(ct)?d.ui_saveIndicator_saving_tooltip():e(a)?d.ui_saveIndicator_autoSaving_tooltip():d.ui_saveIndicator_saved_tooltip());let h=O(null),j=O(Br([])),D=O(null),T=O(void 0),q=O(void 0),L=O(!0);ke(()=>{const r=o().data?.line,n=o().data?.jumpTimestamp;!r||n!==void 0&&n===e(q)||(u(q,n,!0),u(T,{line:r},!0),u(L,!1))});const G=i(()=>e(w)?cr(o().filePath,e(Le)):null),te=i(()=>e(w)?!e(G):!!(o().filePath&&(Ta(o().filePath)||e(fe)&&Ra(o().filePath,e(fe))))),we=i(()=>o().filePath&&e(fe)?Xt(o().filePath)?o().filePath:`${e(fe)}/${o().filePath}`:null),Te=i(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),Ee=i(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Be=i(()=>c()&&/^[A-Za-z0-9._-]+$/.test(c())?cr(o().filePath,e(fe)):null),Vt=i(()=>!e(w)&&e(Be)?e(Be).split("/").slice(0,-1).join("/"):void 0),pt=i(()=>e(Te)||e(Ee)?e(Be):null),Je=i(()=>e(w)&&e(Ee)?{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm"}[o().filePath?.split(".").pop()?.toLowerCase()??""]:void 0);ke(()=>{if(!M()||!e(w)||!e(G)||!e(Je))return;const r=crypto.randomUUID();return A.dispatch(wr(Ze,r,c(),e(G),{gitRootId:e(w),mimeType:e(Je)})),()=>A.dispatch(br(Ze,r))});let st=O(!1);const gt=i(()=>!!e(Be)&&!e($t)&&(!e(Ee)||e(D)===e(Be))),Qt=i(()=>e(D)&&c()?`workspace-file://${c()}/${e(D).split("/").map(encodeURIComponent).join("/")}`:null),At=i(()=>o().filePath?ta(o().filePath):"plaintext"),Ct=i(()=>e(At)==="markdown");ke(()=>{if(!M()||e(Te)||e(w))return;const r=e(pt),n=o().filePath,I=c(),F=o().id;if(u(D,null),!r||!n||!I)return;let ve=!1;const Re=()=>!ve&&c()===I&&o().id===F&&o().filePath===n;return(async()=>{let pe=!1;try{pe=(await ha("file.stat",{workspaceId:I,path:r}))?.isFile===!0}catch{}if(!Re())return;if(pe){u(D,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){u(D,r,!0);return}const{candidates:Ve,truncated:Oe}=await Da(I,r);if(Re()){if(!Oe&&Ve.length===1){A.dispatch(ir(I,n,Ve[0],F));return}u(D,r,!0)}})(),()=>{ve=!0}});function $r(r,n){return!!(r.file===n||r.relativePath===n||r.relativePath&&n.endsWith("/"+r.relativePath)||r.file&&n.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+n)||r.file&&r.file.endsWith("/"+n))}const mt=i(()=>e(l)||!o().filePath?null:Q().find(r=>$r(r,o().filePath))??null),kr=i(()=>!!e(mt));ke(()=>{if(e(l))return;const r=c(),n=o().filePath,I=e(fe);return()=>{if(!r||!n)return;const F=Ht.select(A.state,r,n);if(F?.kind!=="editable-text")return;const ve=qt(F.localContent),Re=dr.select(A.state,r,n),pe=Xt(n)?n:I?`${I}/${n}`:null;Re&&pe&&A.dispatch(nr(r,n,pe,ve))}}),ke(()=>{const r=o().filePath,n=e(we),I=c();if(!M())return;const F=!e(w)&&!!r&&Xt(r)&&!e(fe);r&&I&&!e(te)&&!e(Ee)&&!e(Te)&&!F&&(e(w)&&e(G)&&e(y)?A.dispatch(sr(I,e(y),n??r,{gitRoot:{id:e(w),relativePath:e(G)}})):A.dispatch(sr(I,r,n??r)))});function Ir(){return e(nt)??""}function Cr(r){e(l)||e(t)||!o().filePath||!c()||!e(we)||A.dispatch(oa(c(),o().filePath,qt(r)))}function Fr(){if(e(l)||e(t)||!o().filePath||!e(we)||e(nt)===null||e(ct))return;const r=Ht.select(A.state,c(),o().filePath);r?.kind==="editable-text"&&A.dispatch(nr(c(),o().filePath,e(we),qt(r.localContent)))}function Sr(r){const n=o().filePath;!n||!c()||(A.dispatch(aa(c(),n)),A.dispatch(ir(c(),n,r,o().id)))}ke(()=>{const r=o().filePath,n=e(mt);if(!r||!n){u(j,[],!0);return}if(!M())return;const I=c(),F=crypto.randomUUID();return A.dispatch(Jr(I,Pe,F,{kind:"diffs",path:r,staged:n.stage==="staged"})),()=>{A.dispatch(Yr(I,Pe,F))}}),ke(()=>{const r=He(),n=r?.result?.kind==="diffs"?r.result.chunks:[],I=n.find(F=>F.file===o().filePath)??n[0];u(j,I?Ma(I.chunks.map(F=>({oldStart:F.oldStart,oldLines:F.oldLines,newStart:F.newStart,newLines:F.newLines,lines:F.lines.map(ve=>(ve.type===lr.Addition?"+":ve.type===lr.Deletion?"-":" ")+ve.content)}))):[],!0)});function Dr(r){const n=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),I=Re=>Or(r,La(Re),n);if(I("editor.save")){r.preventDefault(),e(a)&&!e(ct)&&Fr();return}const F=I("editor.undo")?"undo":I("editor.redo")?"redo":I("editor.toggle-task-list")?"toggle-task-list":I("editor.copy")?"copy":I("editor.select-all")?"select-all":null;if(!F||e(l)&&F!=="copy"&&F!=="select-all")return;F!=="toggle-task-list"&&e(h)?.runShortcut(F)&&r.preventDefault()}function Tr(r){if(!o().filePath||!e(mt))return;const n=r?.metaKey||r?.ctrlKey||!1,F=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;A.dispatch(ra(c(),e(mt),{filePath:o().filePath,changeId:e(mt).id,openInAdjacentPanel:n,sourcePanelId:F}))}async function Ft(){const r=e(Be);if(!(e(l)||!r||!c()||!e(gt)||e(st))){u(st,!0);try{const n=await ma(c(),r,e(fe));!n?.success&&!n?.canceled&&Kt.error(n?.error?.message||d.layout_fileTab_downloadFailed_error())}catch{Kt.error(d.layout_fileTab_downloadFailed_error())}finally{u(st,!1)}}}function Rr(){const r=e(we);if(e(l)||!o().filePath||!c()||!r)return;const n=Qr(Ht.select(A.state,c(),o().filePath));if(!n){Kt.error(d.ui_reversibleActions_failed_error({message:d.fileExplorer_tree_undoUnavailable_error()}));return}A.dispatch(ea(c(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:n}))}ke(()=>{if(!Ke||!M())return;const r={isDirty:!e(l)&&e(a),isSaving:!e(l)&&e(ct)};pr(()=>{Ke.registerActions({display:Ne,actions:ye}),Ke.registerState(r)})});var Mr={get tab(){return o()},set tab(r){o(r),oe()},get workspaceId(){return c()},set workspaceId(r){c(r),oe()},get isActive(){return M()},set isActive(r){M(r),oe()},get isPanelFocused(){return m()},set isPanelFocused(r){m(r),oe()},$set:Ut,$on:(r,n)=>jt(x,r,n)},er=je();tt("keydown",gr,r=>M()&&Dr(r));var Ur=ue(er);{var jr=r=>{var n=je(),I=ue(n);mr(I,()=>o().filePath,F=>{var ve=je(),Re=ue(ve);{var pe=b=>{var v=vo(),V=R(v),H=S(V,!0),W=p(V,2),Me=S(W,!0);P(v),C(Z=>{g(H,Z),g(Me,o().filePath)},[()=>d.layout_fileTab_outsideWorkspace_label()]),s(b,v)},Ve=b=>{var v=je(),V=ue(v);{var H=W=>{Gt(W,{get workspaceId(){return c()},get filePath(){return e(G)},get gitRootId(){return e(w)}})};re(V,W=>{M()&&W(H)})}s(b,v)},Oe=b=>{var v=je(),V=ue(v);{var H=Z=>{var K=fr(),ce=R(K),Ue=S(ce,!0);P(K),C(me=>g(Ue,me),[()=>d.layout_fileTab_errorLoading_label()]),s(Z,K)},W=Z=>{Rt(Z,{get filePath(){return o().filePath},get sourceUrl(){return se().url},allowDownload:!1})},Me=Z=>{var K=po(),ce=R(K),Ue=S(ce,!0);P(K),C(me=>g(Ue,me),[()=>d.layout_fileTab_preparing_label()]),s(Z,K)};re(V,Z=>{se()?.error?Z(H):se()?.url?Z(W,1):Z(Me,-1)})}s(b,v)},ft=b=>{var v=je(),V=ue(v);{var H=W=>{Gt(W,{get workspaceId(){return c()},get filePath(){return e(pt)}})};re(V,W=>{M()&&W(H)})}s(b,v)},_t=b=>{var v=fr(),V=R(v),H=S(V,!0);P(v),C(W=>g(H,W),[()=>d.file_pdf_load_error()]),s(b,v)},Ae=b=>{{let v=i(()=>e(D)??o().filePath),V=i(()=>!e(l)&&e(gt));Rt(b,{get filePath(){return e(v)},get sourceUrl(){return e(Qt)},onDownload:Ft,get allowDownload(){return e(V)},get downloading(){return e(st)}})}},Ye=b=>{var v=vr(),V=R(v),H=S(V,!0);P(v),C(W=>g(H,W),[()=>d.layout_fileTab_preparing_label()]),s(b,v)},lt=b=>{var v=mo(),V=R(v);Pt(V,20,()=>[...Array(20).keys()],H=>H,(H,W)=>{var Me=go(),Z=R(Me);ur(Z,{class:"h-3 w-8 shrink-0"});var K=p(Z,2);ur(K,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),P(Me),s(H,Me)}),P(V),P(v),s(b,v)},ht=b=>{var v=bo(),V=R(v),H=S(V,!0),W=p(V,2),Me=S(W,!0),Z=p(W,2);{var K=me=>{var qe=_o(),dt=S(qe,!0);C(()=>g(dt,e(ut))),s(me,qe)};re(Z,me=>{e(kt)==="generic"&&me(K)})}var ce=p(Z,2);{var Ue=me=>{var qe=wo(),dt=ue(qe),Wt=S(dt,!0),tr=p(dt,2);Pt(tr,20,()=>e(It),xt=>xt,(xt,rr)=>{var Bt=ho(),zr=R(Bt);Fe(zr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>Sr(rr),children:(Lr,$o)=>{Ge();var ar=et();C(()=>g(ar,rr)),s(Lr,ar)},$$slots:{default:!0}}),P(Bt),s(xt,Bt)}),P(tr),C(xt=>g(Wt,xt),[()=>d.layout_fileTab_didYouMean_label()]),s(me,qe)};re(ce,me=>{e(It).length>0&&me(Ue)})}P(v),C(me=>{g(H,me),g(Me,o().filePath)},[()=>co(e(kt))]),s(b,v)},wt=b=>{var v=xo(),V=R(v),H=S(V,!0),W=p(V,2),Me=S(W,!0),Z=p(W,2);{var K=ce=>{{let Ue=i(()=>!e(gt)||e(st));Fe(ce,{variant:"secondary",size:"sm",onclick:Ft,get disabled(){return e(Ue)},children:(me,qe)=>{Ge();var dt=et();C(Wt=>g(dt,Wt),[()=>d.layout_fileTab_downloadFile_label()]),s(me,dt)},$$slots:{default:!0}})}};re(Z,ce=>{!e(l)&&e(Be)&&ce(K)})}P(v),C(ce=>{g(H,ce),g(Me,o().filePath)},[()=>d.editor_fileViewer_binary_label()]),s(b,v)},bt=b=>{const v=i(()=>o().filePath?.toLowerCase().endsWith(".svg"));var V=je(),H=ue(V);{var W=K=>{{let ce=i(()=>o().filePath||""),Ue=i(()=>!e(l)&&e(gt));Rt(K,{get filePath(){return e(ce)},get fileContent(){return e(nt)},get language(){return e(At)},get isBinary(){return e(t)},onDownload:Ft,get allowDownload(){return e(Ue)},get downloading(){return e(st)}})}},Me=K=>{var ce=yo(),Ue=R(ce);Ua(Ue,{get content(){return e(nt)},get workspaceId(){return c()},get relativeMediaBase(){return e(Vt)},renderRichFencesAsCode:!0,renderDiagrams:!0}),P(ce),s(K,ce)},Z=K=>{var ce=Ir,Ue=Cr;{let me=i(()=>B()?e(j):[]);_r(Yt(K,{get value(){return ce()},set value(qe){Ue(qe)},get language(){return e(At)},get readOnly(){return e(l)},get fileName(){return o().filePath},get workspaceId(){return c()},get filePath(){return o().filePath},get lineWrapping(){return N()},get lineChanges(){return e(me)},get jumpTo(){return e(T)},get externalContentVersion(){return e(f)},get isPanelFocused(){return m()}}),qe=>u(h,qe,!0),()=>e(h))}};re(H,K=>{e(v)?K(W):e(Ct)&&e(L)?K(Me,1):K(Z,-1)})}s(b,V)},Nt=b=>{var v=vr(),V=R(v),H=S(V,!0);P(v),C(W=>g(H,W),[()=>d.layout_fileTab_preparing_label()]),s(b,v)};re(Re,b=>{e(te)?b(pe):e(w)&&e(Te)&&e(G)?b(Ve,1):e(w)&&e(Ee)?b(Oe,2):e(Te)&&e(pt)?b(ft,3):e(Te)?b(_t,4):e(Qt)?b(Ae,5):e(Ee)?b(Ye,6):e($t)?b(lt,7):e(ut)?b(ht,8):e(t)?b(wt,9):e(nt)!==null?b(bt,10):b(Nt,-1)})}s(F,ve)}),s(r,n)};re(Ur,r=>{o().filePath&&r(jr)})}s(Y,er);var Er=zt(Mr);return ze(),Er}export{Po as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bG as b,da as _,dg as P,bA as k,aQ as C}from"./
|
|
1
|
+
import{bG as b,da as _,dg as P,bA as k,aQ as C}from"./ClKXAKis.js";import{c as v}from"./ChTqQfQN.js";import{bo as m}from"./BLK9_MXJ.js";import{HR as y}from"./DSAz0okZ.js";const A={narrowWidth:600,shortHeight:500,wideWidth:900};function I(e,c,t){let i;e<A.narrowWidth?i=2:(e<A.wideWidth,i=Math.min(3,t));let o;c<A.shortHeight?o=2:o=Math.min(3,Math.ceil(t/i));const n=i*o;return{columns:i,rows:o,maxItems:n}}const h=v("PresetExecutor");async function F(e,c,t){switch(h.info("Applying content preset",{presetId:e,context:t}),e){case"planning":return W(c,t);case"agents-row":return D(c,t);case"changes":return G(c,t);case"review":return L(c,t);default:return c.applyPreset(e),!0}}async function W(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_tabTypes_agent_title(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"note",title:m.layout_shared_spec_title(),noteId:"spec",closable:!0,workspaceId:t},n[1]),!0})}async function D(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=6,r=y.state,l=b.select(r,t),p=C.select(r,t).sort((s,a)=>{const d=s.status==="active"||s.isProcessing,u=a.status==="active"||a.isProcessing;if(d&&!u)return-1;if(!d&&u)return 1;const f=s.lastActivity?new Date(s.lastActivity).getTime():s.updatedAt?new Date(s.updatedAt).getTime():0;return(a.lastActivity?new Date(a.lastActivity).getTime():a.updatedAt?new Date(a.updatedAt).getTime():0)-f});h.info("Agents row preset - agent counts",{total:l.length+p.length,foreground:l.length,background:p.length});const g=[...l,...p.slice(0,n-l.length)].slice(0,n);if(g.length===0)return h.info("No agents to display for agents-row preset"),!1;const T=I(i,o,g.length);return h.info("Agent tiling calculated",{tiling:T,agentCount:g.length}),e.batchMutations(()=>{const s=e.createGridLayout(g.length);h.info("Created grid layout for agents",{panelIds:s,panelCount:s.length,agentCount:g.length});for(let a=0;a<g.length;a++){const d=s[a];d&&e.openTab({type:"agent",title:g[a].name||m.layout_tabTypes_agent_title(),agentId:g[a].id,closable:!0,workspaceId:t},d)}return!0})}async function G(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=y.state,r=_.select(n,t),l=P.select(n,t),p=k.select(n,t),g=l.map(a=>({path:a.relativePath,type:"unstaged"})),T=r.map(a=>({path:a.relativePath,type:"staged"}));let s=[...g,...T].slice(0,6);return s.length===0&&p.length>0&&p[0].files&&(s=p[0].files.slice(0,6).map(a=>({path:a.path,type:"committed"}))),e.batchMutations(()=>{if(s.length===0){h.info("No changes to display for changes preset");const u=e.createGridLayout(1);return e.openTab({type:"changes",title:m.layout_tabTypes_changes_title(),closable:!0,workspaceId:t},u[0]),!0}const a=I(i,o,s.length);h.info("Changes tiling calculated",{tiling:a,fileCount:s.length});const d=e.createGridLayout(s.length);h.info("Created grid layout for changes",{panelIds:d,panelCount:d.length,fileCount:s.length});for(let u=0;u<s.length;u++){const f=s[u],w=f.path.split("/").pop()||f.path;e.openTab({type:"diff",title:w,diffPath:f.path,closable:!0,workspaceId:t,data:{staged:f.type==="staged"}},d[u])}return!0})}async function L(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_presetExecutor_coordinator_fallback(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"local-changes",title:m.layout_presetExecutor_allChanges_title(),closable:!0,workspaceId:t},n[1]),!0})}export{F as applyContentPreset};
|