@intent-hq/web 2.361.2 → 2.361.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/assets/{MarkdownViewer.CmMrjGND.css → MarkdownViewer.D2MexjjT.css} +1 -1
- package/web/app/immutable/chunks/-5BGDZDk.js +32 -0
- package/web/app/immutable/chunks/{CrLichOk.js → 1P8JUNrt.js} +1 -1
- package/web/app/immutable/chunks/{BKw6wLyE.js → 8p81B4Fd.js} +1 -1
- package/web/app/immutable/chunks/{B1Tr5BPZ.js → B-nCPlyy.js} +1 -1
- package/web/app/immutable/chunks/{D9H2UCuG.js → B5G8dQJa.js} +1 -1
- package/web/app/immutable/chunks/{DOjUJ8i8.js → B61qyrBq.js} +1 -1
- package/web/app/immutable/chunks/{CytLF-ur.js → B6iZl_wM.js} +6 -6
- package/web/app/immutable/chunks/{B9tRD7MQ.js → B71-bXIU.js} +1 -1
- package/web/app/immutable/chunks/{Bhx5E4sN.js → B7wYsi9q.js} +1 -1
- package/web/app/immutable/chunks/{Bgk8kfr8.js → BALMGKKv.js} +1 -1
- package/web/app/immutable/chunks/{c1DCm8IK.js → BCyX6y2H.js} +1 -1
- package/web/app/immutable/chunks/{DkgfeEA0.js → BCykELTT.js} +1 -1
- package/web/app/immutable/chunks/{BMYcVUUM.js → BFvvXNf5.js} +8 -8
- package/web/app/immutable/chunks/{aokikQw5.js → BGdv1uWf.js} +13 -13
- package/web/app/immutable/chunks/{7tcI69cn.js → BIPMq18e.js} +1 -1
- package/web/app/immutable/chunks/{C9otdzZM.js → BPeXyR5m.js} +4 -4
- package/web/app/immutable/chunks/{DyIRpoZq.js → BQO2-pKG.js} +1 -1
- package/web/app/immutable/chunks/{OiHDtgNp.js → BS6UmzgC.js} +1 -1
- package/web/app/immutable/chunks/{CpY-WDD9.js → BTvnh9qa.js} +1 -1
- package/web/app/immutable/chunks/{BGOuxFsr.js → BVz2MGVx.js} +1 -1
- package/web/app/immutable/chunks/{Tqm9-f9l.js → BWtgKffi.js} +1 -1
- package/web/app/immutable/chunks/{CmVyGqNV.js → BYDNdw_J.js} +2 -2
- package/web/app/immutable/chunks/BaGrEyO7.js +1 -0
- package/web/app/immutable/chunks/BeF36lmB.js +3 -0
- package/web/app/immutable/chunks/{BD9wTbmm.js → BfOb5kjD.js} +1 -1
- package/web/app/immutable/chunks/{B5Pg9_MZ.js → BiLbb6HG.js} +1 -1
- package/web/app/immutable/chunks/{CVOsommd.js → BjGths7V.js} +2 -2
- package/web/app/immutable/chunks/{CuGN_Lgy.js → Bm01ytIS.js} +1 -1
- package/web/app/immutable/chunks/{Byj6QL5F.js → BmqyXExt.js} +1 -1
- package/web/app/immutable/chunks/{DjKDfA1m.js → BrBAfQ57.js} +2 -2
- package/web/app/immutable/chunks/{BOSMtVmb.js → BsloAXs5.js} +1 -1
- package/web/app/immutable/chunks/{Vfi0Dmt8.js → BuV8a8sz.js} +1 -1
- package/web/app/immutable/chunks/{BeLtysng.js → BuoVynwM.js} +1 -1
- package/web/app/immutable/chunks/{P-joxIX5.js → BuqbrxB1.js} +1 -1
- package/web/app/immutable/chunks/{Bl2aLOn5.js → C2GygP-d.js} +1 -1
- package/web/app/immutable/chunks/{dGnsWF4N.js → C4YDKHOI.js} +1 -1
- package/web/app/immutable/chunks/{CvH6beJr.js → C4rZWprN.js} +2 -2
- package/web/app/immutable/chunks/C7GN5GMc.js +3 -0
- package/web/app/immutable/chunks/{D5kZvSPC.js → C8__WGAb.js} +1 -1
- package/web/app/immutable/chunks/{DC3pczce.js → C8xHhbCK.js} +1 -1
- package/web/app/immutable/chunks/{Bt_RDNlI.js → C9idh8Ua.js} +1 -1
- package/web/app/immutable/chunks/{1EW4b83o.js → CBYFxd4u.js} +1 -1
- package/web/app/immutable/chunks/{DlBKZ9jQ.js → CGhO7uI2.js} +2 -2
- package/web/app/immutable/chunks/CIWs30wy.js +1 -0
- package/web/app/immutable/chunks/{DaHbZjgp.js → CK3bnTgZ.js} +1 -1
- package/web/app/immutable/chunks/{C-Qm3bfA.js → CKnHTDAw.js} +1 -1
- package/web/app/immutable/chunks/{CsqD9xz6.js → CLtHxjHo.js} +2 -2
- package/web/app/immutable/chunks/{QWfAA7k-.js → CN6piAaf.js} +1 -1
- package/web/app/immutable/chunks/{D3rVaYU0.js → CNmxox94.js} +2 -2
- package/web/app/immutable/chunks/{8HLudOb-.js → CNo8m56L.js} +1 -1
- package/web/app/immutable/chunks/{R1d5Y9eD.js → CP5zM-2z.js} +1 -1
- package/web/app/immutable/chunks/{DHbwKi-E.js → CQILQHaF.js} +2 -2
- package/web/app/immutable/chunks/{Bx_nP_MK.js → CQJgY6fB.js} +1 -1
- package/web/app/immutable/chunks/{aCDFJfWo.js → CRBbB4Mw.js} +1 -1
- package/web/app/immutable/chunks/{BG8JSmc7.js → CTU9yjO5.js} +1 -1
- package/web/app/immutable/chunks/{Bya2sQrR.js → CVGUPwtj.js} +1 -1
- package/web/app/immutable/chunks/{DD4-FHBp.js → CVig8fcR.js} +1 -1
- package/web/app/immutable/chunks/{dxPehZVa.js → CWVUBnHm.js} +2 -2
- package/web/app/immutable/chunks/{D0g6v2_u.js → CXe2ucrR.js} +1 -1
- package/web/app/immutable/chunks/{CNUg0Cs8.js → CZYViob1.js} +6 -6
- package/web/app/immutable/chunks/{CvPVdUUZ.js → CaOJIXi2.js} +1 -1
- package/web/app/immutable/chunks/{CGINFMqT.js → CdpHTR0L.js} +1 -1
- package/web/app/immutable/chunks/CffWzOD9.js +1 -0
- package/web/app/immutable/chunks/{-7du9lfn.js → CgCxS7G9.js} +1 -1
- package/web/app/immutable/chunks/{Cq8fk3CH.js → CiBGAwnh.js} +1 -1
- package/web/app/immutable/chunks/{CuoerPJp.js → Cket6Weo.js} +3 -3
- package/web/app/immutable/chunks/{Wz08guGa.js → Cl9ySU-o.js} +1 -1
- package/web/app/immutable/chunks/{DPfWnZYT.js → ClV-2Tgv.js} +1 -1
- package/web/app/immutable/chunks/{BXId-8a9.js → Clj6cYni.js} +1 -1
- package/web/app/immutable/chunks/{DXcrfgZH.js → Cobx8hVY.js} +2 -2
- package/web/app/immutable/chunks/{Bl0Adq86.js → CpxaxzA8.js} +1 -1
- package/web/app/immutable/chunks/{DHBQy6St.js → CtUkyckm.js} +1 -1
- package/web/app/immutable/chunks/{DwHEsGP4.js → CvCk2zex.js} +1 -1
- package/web/app/immutable/chunks/{6d4Jv8Hz.js → CxyAwsTu.js} +2 -2
- package/web/app/immutable/chunks/{CcZqxMtd.js → Cyj5BnLo.js} +1 -1
- package/web/app/immutable/chunks/{CyQJi5fM.js → CyloLyza.js} +1 -1
- package/web/app/immutable/chunks/{DzmdzUVi.js → Cz4zW21_.js} +1 -1
- package/web/app/immutable/chunks/{5NiJCy7J.js → CzwZgSIh.js} +1 -1
- package/web/app/immutable/chunks/{buVzC4lf.js → D-joLTU5.js} +1 -1
- package/web/app/immutable/chunks/{CssvkQD7.js → D-xbpOd2.js} +1 -1
- package/web/app/immutable/chunks/{As8lK70V.js → D0rtAmW8.js} +1 -1
- package/web/app/immutable/chunks/{C5cRG0yV.js → D1mB5Biz.js} +3 -3
- package/web/app/immutable/chunks/{B2ns9OTA.js → D47LEQTi.js} +1 -1
- package/web/app/immutable/chunks/{BbIMIfqX.js → D4Qdu3Ph.js} +1 -1
- package/web/app/immutable/chunks/{Cb4s3Dt_.js → D5-Qkhrf.js} +4 -4
- package/web/app/immutable/chunks/{BAgFsuQz.js → D65NcKrS.js} +1 -1
- package/web/app/immutable/chunks/{BpL3mTkL.js → D6YJZGmY.js} +1 -1
- package/web/app/immutable/chunks/{D4LnecGU.js → D8Pj7OSy.js} +2 -2
- package/web/app/immutable/chunks/{CJHViisg.js → DC2f25QV.js} +5 -5
- package/web/app/immutable/chunks/{cU6Fqv3g.js → DJ0zWgRW.js} +1 -1
- package/web/app/immutable/chunks/{Ds8ezw9K.js → DKfGiH_H.js} +1 -1
- package/web/app/immutable/chunks/{yTlZ1Sih.js → DLwNAutM.js} +1 -1
- package/web/app/immutable/chunks/{CpHAR9_T.js → DTXj0Rgw.js} +1 -1
- package/web/app/immutable/chunks/{B07OdpUU.js → DVhvsf4B.js} +3 -3
- package/web/app/immutable/chunks/{BG4tBRsm.js → DY8ddh3S.js} +1 -1
- package/web/app/immutable/chunks/{DsCJG1hb.js → D_pi05yD.js} +1 -1
- package/web/app/immutable/chunks/{BskEvHZa.js → Dagg0ZW1.js} +1 -1
- package/web/app/immutable/chunks/{DXXjnBc_.js → DbaAc_-Q.js} +1 -1
- package/web/app/immutable/chunks/{DkNdI_Wp.js → DcNzEJkC.js} +1 -1
- package/web/app/immutable/chunks/{C_z20mJT.js → DdNipNbw.js} +1 -1
- package/web/app/immutable/chunks/{CjorBqRt.js → DfVuwPvT.js} +1 -1
- package/web/app/immutable/chunks/{B4kCZd9W.js → Dh4zlY8h.js} +1 -1
- package/web/app/immutable/chunks/{BKHUH54N.js → DhEKpkr8.js} +1 -1
- package/web/app/immutable/chunks/{D0VMf2Fp.js → DihoaAJc.js} +3 -3
- package/web/app/immutable/chunks/DkBcuECQ.js +176 -0
- package/web/app/immutable/chunks/{rUCEwUE_.js → DlrcSqxf.js} +1 -1
- package/web/app/immutable/chunks/{sLpI8Vr2.js → DuAq2d-z.js} +1 -1
- package/web/app/immutable/chunks/{W67SWYQh.js → DuU6k7P3.js} +1 -1
- package/web/app/immutable/chunks/{ivBdCvd6.js → Dwa7mF5q.js} +7 -7
- package/web/app/immutable/chunks/{Dtqu7Pxg.js → Dxi1HqSj.js} +1 -1
- package/web/app/immutable/chunks/{BTR14c-t.js → DyHNI41j.js} +3 -3
- package/web/app/immutable/chunks/{D1FSU9Gk.js → E53OBtIE.js} +1 -1
- package/web/app/immutable/chunks/{Db7PzaF_.js → F7k6DTn_.js} +1 -1
- package/web/app/immutable/chunks/{YhYmjxML.js → FvRoXWri.js} +1 -1
- package/web/app/immutable/chunks/{BLFlTVjy.js → GvAc6kd4.js} +4 -4
- package/web/app/immutable/chunks/{CgS1Dv_8.js → I6IukSJg.js} +1 -1
- package/web/app/immutable/chunks/{DAwOD17b.js → JWLuWIPn.js} +1 -1
- package/web/app/immutable/chunks/{BQKRBk9B.js → KEUh5hD5.js} +1 -1
- package/web/app/immutable/chunks/{CO15VKbw.js → L325nzu4.js} +6 -6
- package/web/app/immutable/chunks/{52-_4pXR.js → Lar8kBUq.js} +1 -1
- package/web/app/immutable/chunks/{tSlfPnTD.js → LbWlLIDM.js} +1 -1
- package/web/app/immutable/chunks/{TaZ6zGN1.js → QsxxF2f1.js} +1 -1
- package/web/app/immutable/chunks/{C3L3GwMq.js → RZZC2VMk.js} +1 -1
- package/web/app/immutable/chunks/{B0JbhmMb.js → SFGrktzA.js} +1 -1
- package/web/app/immutable/chunks/{kbpbXlKS.js → SXIguSgd.js} +1 -1
- package/web/app/immutable/chunks/{BPRz9VyT.js → T4Vy0gCu.js} +1 -1
- package/web/app/immutable/chunks/{AxCVH26S.js → TXWL9W0o.js} +1 -1
- package/web/app/immutable/chunks/{5u3dQlae.js → XlJ5hhYy.js} +1 -1
- package/web/app/immutable/chunks/{D00mCTUs.js → _z8Ra-Dv.js} +2 -2
- package/web/app/immutable/chunks/{DVlYg0SZ.js → adKwpenO.js} +4 -4
- package/web/app/immutable/chunks/{CkVsI2Jc.js → aj6BVewJ.js} +1 -1
- package/web/app/immutable/chunks/{C1wjuTFV.js → bCGgAomG.js} +1 -1
- package/web/app/immutable/chunks/{C4qqiNcA.js → irvHhhJ8.js} +6 -6
- package/web/app/immutable/chunks/{Big1YQpq.js → lNKbWlW4.js} +1 -1
- package/web/app/immutable/chunks/{96DwTK9j.js → n9HBJb8W.js} +2 -2
- package/web/app/immutable/chunks/{B9pYL5w0.js → rG-lrv5J.js} +3 -3
- package/web/app/immutable/chunks/{Ch9oF0ek.js → sqDmXMOe.js} +1 -1
- package/web/app/immutable/chunks/{CkuFMgpI.js → sr1p2voA.js} +1 -1
- package/web/app/immutable/chunks/{DQTzZEWU.js → srjzsbo_.js} +2 -2
- package/web/app/immutable/chunks/{BSM5O6JV.js → tOoxsTJG.js} +1 -1
- package/web/app/immutable/chunks/{CpBPE3-0.js → tc8BXJjE.js} +1 -1
- package/web/app/immutable/chunks/{MzfVdJbX.js → u8xausOt.js} +1 -1
- package/web/app/immutable/chunks/{t94_2IkW.js → veeA223Q.js} +1 -1
- package/web/app/immutable/chunks/{DuTju9rc.js → w0ZX4RW-.js} +1 -1
- package/web/app/immutable/chunks/xFrJrsZA.js +4 -0
- package/web/app/immutable/chunks/{T_1hfFnC.js → xUNvQVfC.js} +2 -2
- package/web/app/immutable/entry/{app.CYYj7JvH.js → app.CblwGXso.js} +2 -2
- package/web/app/immutable/entry/start.q08osiX3.js +1 -0
- package/web/app/immutable/nodes/{0.vJoG8nTo.js → 0.Dj38UZF2.js} +1 -1
- package/web/app/immutable/nodes/{1.Di6AbyQm.js → 1.COOUD58l.js} +1 -1
- package/web/app/immutable/nodes/{10.BkazfxT8.js → 10.DWYTu71C.js} +4 -4
- package/web/app/immutable/nodes/{11.Ck_7PTgk.js → 11.dUTFxK_f.js} +1 -1
- package/web/app/immutable/nodes/{15.DWwqZzAg.js → 15.BVFZbc0c.js} +1 -1
- package/web/app/immutable/nodes/{19.CjDPuA-n.js → 19.BW6AKD4N.js} +2 -2
- package/web/app/immutable/nodes/{2.B7bl9OWL.js → 2.DG3n2WCl.js} +12 -12
- package/web/app/immutable/nodes/{20.tmuZaULh.js → 20.BztXJVwA.js} +1 -1
- package/web/app/immutable/nodes/{3.CY1Mye6q.js → 3.Ce1vN9CA.js} +1 -1
- package/web/app/immutable/nodes/{4.sNrk6dxf.js → 4.Ch2uLuDy.js} +1 -1
- package/web/app/immutable/nodes/{5.BrOibHKo.js → 5.DrcqOekH.js} +1 -1
- package/web/app/immutable/nodes/{6.BVYLHxv3.js → 6.BIHEeJJU.js} +1 -1
- package/web/app/immutable/nodes/{7.BZ0ZLzU_.js → 7.Bbv7Zz5A.js} +1 -1
- package/web/app/immutable/nodes/{8.BNlg4qDc.js → 8.ClCyEWtu.js} +1 -1
- package/web/app/immutable/nodes/{9.C8X38wWW.js → 9.kP1jiSrK.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/0_7FQkiC.js +0 -1
- package/web/app/immutable/chunks/BEyxbMng.js +0 -18
- package/web/app/immutable/chunks/CeFme0q3.js +0 -1
- package/web/app/immutable/chunks/Cq0xvhw9.js +0 -3
- package/web/app/immutable/chunks/DWWTsFh-.js +0 -190
- package/web/app/immutable/chunks/DvCS4TTw.js +0 -1
- package/web/app/immutable/chunks/lZNvj_WH.js +0 -4
- package/web/app/immutable/chunks/yAiwGS7g.js +0 -3
- package/web/app/immutable/entry/start.BH_-Ros5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ca as p,c5 as i,aD as l,c9 as S,bs as W,a7 as I,ay as R,W as q,bn as z,aA as m}from"./CJxGDkBm.js";import{IX as h,sL as C,bn as K}from"./BkzMrEqG.js";import{t as x,bo as u,bw as M,bs as f,bq as A,b as D}from"./AeC4KVgG.js";import{i as E}from"./k2awEenT.js";import{t as H}from"./D2MmXC4A.js";import{m as L}from"./BOXv-Vsz.js";import{aH as O}from"./
|
|
1
|
+
import{ca as p,c5 as i,aD as l,c9 as S,bs as W,a7 as I,ay as R,W as q,bn as z,aA as m}from"./CJxGDkBm.js";import{IX as h,sL as C,bn as K}from"./BkzMrEqG.js";import{t as x,bo as u,bw as M,bs as f,bq as A,b as D}from"./AeC4KVgG.js";import{i as E}from"./k2awEenT.js";import{t as H}from"./D2MmXC4A.js";import{m as L}from"./BOXv-Vsz.js";import{aH as O}from"./CWVUBnHm.js";import{c as X}from"./BbV7MtxC.js";function U(t){const s=()=>h.dispatch(C({quiet:t.quiet}));p(()=>{t.key?.(),t.active()&&i(s)});const r=S(()=>t.workspaces().some(o=>o.status===K.Retired));let a=i(()=>l(r));p(()=>{const o=l(r);i(()=>{a&&!o&&t.active()&&s(),a=o})})}function j(t,s){if(new.target)return x({component:j,...t});W(s,!0);const r=()=>f($,"$connected$",o),a=()=>f(_,"$slot$",o),[o,k]=A();let c=u(s,"workspaceId",7),n=u(s,"size",7,"default");const $=L(),_=O(H(()=>c()));var b={get workspaceId(){return c()},set workspaceId(e){c(e),m()},get size(){return n()},set size(e="default"){n(e),m()},$set:M,$on:(e,y)=>D(s,e,y)},d=I(),g=R(d);{var v=e=>{X(e,{get slot(){return a()},get size(){return n()}})};E(g,e=>{r()&&a()!==null&&e(v)})}q(t,d);var w=z(b);return k(),w}export{j as W,U as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as se,bo as u,bw as ae,b as ie}from"./AeC4KVgG.js";import{bs as ne,a5 as A,bl as K,bS as R,bA as y,bf as oe,b_ as M,aD as e,bO as U,W as g,bn as de,c9 as c,aA as m,aB as B,a7 as D,ay as F}from"./CJxGDkBm.js";import{i as P}from"./k2awEenT.js";import{g as Y}from"./CswzK9Go.js";import{s as Z}from"./Dp2nUoTL.js";import{S as Se}from"./DZGQ9Nrs.js";import{c as Ie,e as ke,s as _,f as ye}from"./DrHJ7oPv.js";import{S as Ce}from"./
|
|
1
|
+
import{t as se,bo as u,bw as ae,b as ie}from"./AeC4KVgG.js";import{bs as ne,a5 as A,bl as K,bS as R,bA as y,bf as oe,b_ as M,aD as e,bO as U,W as g,bn as de,c9 as c,aA as m,aB as B,a7 as D,ay as F}from"./CJxGDkBm.js";import{i as P}from"./k2awEenT.js";import{g as Y}from"./CswzK9Go.js";import{s as Z}from"./Dp2nUoTL.js";import{S as Se}from"./DZGQ9Nrs.js";import{c as Ie,e as ke,s as _,f as ye}from"./DrHJ7oPv.js";import{S as Ce}from"./CTU9yjO5.js";import{IX as ce,jb as Le,qN as Pe}from"./BkzMrEqG.js";var Be=B('<div class="max-w-full shrink-0"><!></div>'),je=B('<p class="type-body max-w-2xl text-muted-foreground"> </p>'),Qe=B('<p class="type-body mt-2 text-danger" role="alert"> </p>'),Te=B('<section data-slot="settings-section"><header class="space-y-1"><div class="flex min-w-0 flex-wrap items-center justify-between gap-3 sm:flex-nowrap"><h2 class="type-title min-w-0 break-words text-foreground"> </h2> <!></div> <!></header> <!> <div data-slot="settings-section-content" class="mt-4 min-w-0 divide-y divide-border rounded-(--radius-medium) bg-card"><!></div></section>');function le(i,a){if(new.target)return se({component:le,...i});ne(a,!0);let o=u(a,"id",7),v=u(a,"title",7),p=u(a,"description",7),w=u(a,"busy",7,!1),h=u(a,"error",7),x=u(a,"actions",7),S=u(a,"children",7),C=u(a,"class",7);const j=c(()=>o()?`${o()}-title`:void 0),N=c(()=>o()&&p()?`${o()}-description`:void 0),Q=c(()=>o()&&h()?`${o()}-error`:void 0),W=c(()=>[e(N),e(Q)].filter(Boolean).join(" ")||void 0);var X={get id(){return o()},set id(r){o(r),m()},get title(){return v()},set title(r){v(r),m()},get description(){return p()},set description(r){p(r),m()},get busy(){return w()},set busy(r=!1){w(r),m()},get error(){return h()},set error(r){h(r),m()},get actions(){return x()},set actions(r){x(r),m()},get children(){return S()},set children(r){S(r),m()},get class(){return C()},set class(r){C(r),m()},$set:ae,$on:(r,d)=>ie(a,r,d)},f=Te(),t=A(f),n=A(t),l=A(n),b=K(l,!0),I=R(l,2);{var s=r=>{var d=Be(),k=A(d);Z(k,x),y(d),g(r,d)};P(I,r=>{x()&&r(s)})}y(n);var O=R(n,2);{var q=r=>{var d=je(),k=K(d,!0);M(()=>{_(d,"id",e(N)),U(k,p())}),g(r,d)};P(O,r=>{p()&&r(q)})}y(t);var T=R(t,2);{var E=r=>{var d=Qe(),k=K(d,!0);M(()=>{_(d,"id",e(Q)),U(k,h())}),g(r,d)};P(T,r=>{h()&&r(E)})}var z=R(T,2),G=A(z);return Z(G,()=>S()??oe),y(z),y(f),M(r=>{_(f,"id",o()),_(f,"data-highlight-id",o()),ye(f,1,r),_(f,"aria-labelledby",e(j)),_(f,"aria-label",e(j)?void 0:v()),_(f,"aria-describedby",e(W)),_(f,"aria-busy",w()||void 0),_(l,"id",e(j)),U(b,v())},[()=>Ie(ke("min-w-0 scroll-mt-20",C()))]),g(i,f),de(X)}function He(i){return i}function Je(i){return i}function V(i,a){return i===void 0?a:typeof i=="function"?i():i}function Ae(i,a){const o=a.trim().toLocaleLowerCase();return o?[i.label,i.description,i.featureCode,i.id].filter(Boolean).some(v=>v.toLocaleLowerCase().includes(o)):!0}var De=B('<div data-slot="settings-form" class="@container/settings-form min-w-0 divide-y divide-border"></div>'),Fe=B('<div data-slot="settings-form" class="@container/settings-form min-w-0 space-y-10"></div>');function Ne(i,a){if(new.target)return se({component:Ne,...i});ne(a,!0);const o=(t,n=oe)=>{var l=D(),b=F(l);Y(b,17,n,I=>I.id,(I,s)=>{const O=c(()=>`setting-${e(s).id}`),q=c(()=>V(e(s).disabled,!1)),T=c(()=>V(e(s).busy,!1)),E=c(()=>V(e(s).error,void 0)),z=c(()=>V(e(s).status,void 0));{const G=(me,H)=>{let fe=()=>(H?.()).labelId,ge=()=>(H?.()).descriptionId,ve=()=>(H?.()).errorId;const $=c(()=>({entry:e(s),controlId:e(O),labelId:fe(),descriptionId:ge(),errorId:ve(),disabled:e(q),busy:e(T)}));var ee=D(),be=F(ee);{var pe=L=>{var te=D(),_e=F(te);{var we=J=>{var re=D(),xe=F(re);Z(xe,()=>w()[e(s).id],()=>e($)),g(J,re)};P(_e,J=>{w()[e(s).id]&&J(we)})}g(L,te)},he=L=>{Ce(L,{get entry(){return e(s)},get context(){return e($)},get compact(){return S()}})};P(be,L=>{e(s).kind==="custom"?L(pe):L(he,-1)})}g(me,ee)};let r=c(()=>e(s).kind==="custom"&&e(s).layout==="full-width"),d=c(()=>j(e(s).kind)?e(O):void 0),k=c(()=>e(s).kind==="select"),ue=c(()=>[e(s).label,e(s).description,e(s).featureCode].filter(Boolean).join(" "));Se(I,{get compact(){return S()},get id(){return e(s).id},get label(){return e(s).label},get description(){return e(s).description},get descriptionContent(){return h()[e(s).id]},get controlOnly(){return e(r)},get htmlFor(){return e(d)},get activateLabel(){return e(k)},get disabled(){return e(q)},get busy(){return e(T)},get error(){return e(E)},get status(){return e(z)},get statusTone(){return e(s).statusTone},get danger(){return e(s).danger},get experimental(){return e(s).experimental},get featureCode(){return e(s).featureCode},get searchText(){return e(ue)},get class(){return e(s).class},control:G,$$slots:{control:!0}})}}),g(t,l)};let v=u(a,"schema",7),p=u(a,"searchQuery",7,""),w=u(a,"custom",23,()=>({})),h=u(a,"descriptions",23,()=>({})),x=u(a,"embedded",7,!1),S=u(a,"compact",7,!0);const C=c(()=>v().sections.filter(t=>t.when?.()??!0).map(t=>({...t,entries:t.entries.filter(n=>(n.when?.()??!0)&&Ae(n,p()))})).filter(t=>t.entries.length>0)),j=t=>["select","input","number","path","keybinding"].includes(t);var N={get schema(){return v()},set schema(t){v(t),m()},get searchQuery(){return p()},set searchQuery(t=""){p(t),m()},get custom(){return w()},set custom(t={}){w(t),m()},get descriptions(){return h()},set descriptions(t={}){h(t),m()},get embedded(){return x()},set embedded(t=!1){x(t),m()},get compact(){return S()},set compact(t=!0){S(t),m()},$set:ae,$on:(t,n)=>ie(a,t,n)},Q=D(),W=F(Q);{var X=t=>{var n=De();Y(n,21,()=>e(C),l=>l.id,(l,b)=>{o(l,()=>e(b).entries)}),y(n),g(t,n)},f=t=>{var n=Fe();Y(n,21,()=>e(C),l=>l.id,(l,b)=>{le(l,{get id(){return e(b).id},get title(){return e(b).title},get description(){return e(b).description},children:(I,s)=>{o(I,()=>e(b).entries)},$$slots:{default:!0}})}),y(n),g(t,n)};P(W,t=>{x()?t(X):t(f,-1)})}return g(i,Q),de(N)}const Ke=ce.createSelector(i=>Le(i.devicePasskeys??Pe)),Me=ce.createSelector(i=>{const a=i.devicePasskeys?.status??"unknown";return a==="ready"||a==="error"||a==="loading"});export{Ne as S,le as a,Je as b,Me as c,He as d,Ke as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as S}from"./BdWqymET.js";import{aE as l}from"./CJxGDkBm.js";import{g as c}from"./
|
|
1
|
+
import{a as S}from"./BdWqymET.js";import{aE as l}from"./CJxGDkBm.js";import{g as c}from"./B6iZl_wM.js";import{p as g}from"./BiLbb6HG.js";import{d as I}from"./B0Z-1lwJ.js";import{dO as f}from"./-5BGDZDk.js";import{B_ as u,i as y,IX as o,gZ as A,vp as m,vq as N,vs as b}from"./BkzMrEqG.js";import{g as W,n as h}from"./CAYSf4zc.js";import{S as D,a as R,n as O}from"./n9HBJb8W.js";import{n as _,o as v}from"./E53OBtIE.js";const k="intent:onboarding-skip:v1";function P(e){return u.getItem(h(k,e))==="1"}function re(e){P(e)||u.setItem(h(k,e),"1")}function E(e){return e.connections?.hasReceivedList===!0&&P(W(e))}function F(e,a){return e.some(t=>t.id!==y&&t.id!==a&&t.status!=="Archived"&&t.status!=="Deleted")}function j(e,a,t=!1){return t||F(e,a)?"/":"/workspace/new"}function d(e,a){return j(f.select(e),a,E(e))}const se=Object.freeze(Object.defineProperty({__proto__:null,resolveWindowEmptyDestination:d},Symbol.toStringTag,{value:"Module"})),r=new S("WorkspaceNavigation");async function L(e){r.info(`[navigateToAgent] Navigating to agent: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToAgent] No workspace ID found in current page params");return}const n=new URL(window.location.href);n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","agent"),n.searchParams.set("selectedAgent",e),n.searchParams.delete("selectedTerminal"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"agent",e))}async function $(e){r.info(`[navigateToTerminal] Navigating to terminal: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToTerminal] No workspace ID found in current page params");return}const n=new URL(window.location.href),i=n.searchParams.get("drawerOpen")==="1",s=n.searchParams.get("drawerType")==="terminal";(!i||!s)&&n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","terminal"),n.searchParams.set("selectedTerminal",e),n.searchParams.delete("selectedAgent"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"terminal",e))}function C(e){return!e||!(e instanceof Element)?void 0:e.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}async function p(e,a){r.info(`[navigateToNote] Navigating to note: ${e}`,a);const t=l(g),n=a?.workspaceId??t.params.id;if(!n){r.error("[navigateToNote] No workspace ID found in current page params");return}o.dispatch(b(n,e,{openInAdjacentPanel:a?.openInAdjacentPanel??!1,openInNewAdjacentPanel:a?.openInNewAdjacentPanel??!1,sourcePanelId:a?.sourcePanelId}))}async function U(e,a,t){r.info(`[navigateToFile] Navigating to file: ${e}${a?` (line ${a})`:""}`,t);const i=l(g).params.id;if(!i){r.error("[navigateToFile] No workspace ID found in current page params");return}o.dispatch(N(i,e,{line:a,openInAdjacentPanel:t?.openInAdjacentPanel??!1,sourcePanelId:t?.sourcePanelId}))}async function B(){r.info("[navigateToSpec] Navigating to workspace spec"),await p("spec")}async function M(){r.info("[closeDrawer] Closing drawer");const a=l(g).params.id;if(!a){r.error("[closeDrawer] No workspace ID found in current page params");return}const t=new URL(window.location.href);t.searchParams.set("drawerOpen","0"),t.searchParams.delete("selectedAgent"),t.searchParams.delete("selectedTerminal"),await c(t.toString(),{replaceState:!0}),o.dispatch(A(a))}async function K(){r.info("[clearMainContent] Clearing main content");const e=new URL(window.location.href);e.searchParams.set("mainContentType","empty"),e.searchParams.delete("selectedNoteId"),e.searchParams.delete("selectedFile"),e.searchParams.delete("line"),await c(e.toString(),{replaceState:!1})}async function G(e,a,t){r.info("[navigateToTask] Navigating to task",{noteId:e,taskPosition:a,taskText:t}),await p(e);const n=()=>{I("scroll-to-task",{noteId:e,taskPosition:a,taskText:t},{bubbles:!0}),r.debug("[navigateToTask] Dispatched scroll-to-task event",{noteId:e,taskPosition:a})},i=[100,300,600];for(const s of i)setTimeout(n,s)}async function H(e){r.info("[navigateToSettings] Navigating to settings",e);const a=new URL("/settings",window.location.origin),t=window.location.pathname.match(/^\/workspace\/([^/]+)/)?.[1],n=t==="new"?void 0:t,i=e?.workspaceId??n;if(e?.tab&&a.searchParams.set("tab",e.tab),e?.specialist&&a.searchParams.set("specialist",e.specialist),e?.view&&a.searchParams.set("view",e.view),i&&a.searchParams.set("workspaceId",i),e?.hash&&(a.hash=e.hash),typeof window<"u"&&window.location.pathname==="/settings"){if(e?.tab||e?.specialist||e?.view||e?.workspaceId){const s=new URL(window.location.href);e?.tab&&s.searchParams.set("tab",e.tab),e?.specialist&&s.searchParams.set("specialist",e.specialist),e?.view&&s.searchParams.set("view",e.view),e?.workspaceId&&s.searchParams.set("workspaceId",e.workspaceId),e?.hash&&(s.hash=e.hash),await c(s.toString(),{replaceState:!0});return}if(e?.hash){const s=`#${e.hash}`;window.location.hash===s&&(window.location.hash=""),window.location.hash=s;return}return}await O(a.pathname+a.search+a.hash)}function T(){const e=typeof sessionStorage>"u"?null:sessionStorage.getItem(D);if(e&&e!=="/"&&!R(e))return e;const a=w();return a?`/workspace/${a.id}`:d(o.state)}async function z(){const e=T();r.info("[navigateBackFromSettings] Navigating back to:",e),await _(e)}function w(e){return f.select(o.state).find(a=>a.id!==e&&a.status!=="Archived"&&a.status!=="Deleted")}async function Y(){const e=w();if(e){r.info("[navigateToFirstWorkspace] Showing workspace:",e.id),await v(e.id);return}const a=d(o.state);r.info("[navigateToFirstWorkspace] Navigating to:",a),await c(a)}async function q(e){const a=w(e);if(a){r.info("[navigateAfterWorkspaceRemoval] Showing workspace:",a.id),await v(a.id);return}const t=d(o.state,e);r.info("[navigateAfterWorkspaceRemoval] Navigating to:",t),await c(t)}const ie=Object.freeze(Object.defineProperty({__proto__:null,clearMainContent:K,closeDrawer:M,findSourcePanelId:C,getSettingsPreviousPath:T,navigateAfterWorkspaceRemoval:q,navigateBackFromSettings:z,navigateToAgent:L,navigateToFile:U,navigateToFirstWorkspace:Y,navigateToNote:p,navigateToSettings:H,navigateToSpec:B,navigateToTask:G,navigateToTerminal:$},Symbol.toStringTag,{value:"Module"}));export{U as a,Y as b,p as c,H as d,G as e,C as f,d as g,ie as h,E as i,z as n,re as r,se as w};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{t as
|
|
2
|
-
`);let s=0,I=0,le=!1;for(const B of De)if(B.startsWith("@@")){le=!0;const Z=B.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);Z&&(I=parseInt(Z[1],10),s=parseInt(Z[2],10))}else le&&(B.startsWith("+")?(re.add(s+J),s++):B.startsWith("-")?(pe.add(I+J),I++):B.startsWith(" ")&&(s++,I++));return{additions:re,deletions:pe}}function _n(q){return Number.isFinite(q)&&q>1?Math.floor(q):1}var Ln=T("<div><!> <!></div>"),Cn=T('<div class="diff-skeleton svelte-1f4chm"><div class="diff-skeleton-header svelte-1f4chm"><!> <!></div> <div class="diff-skeleton-content svelte-1f4chm"></div></div>'),yn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-danger text-sm ml-2"> </span></div>'),xn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-subtle text-sm ml-2"> </span></div>'),Pn=T('<div class="empty-state svelte-1f4chm"><span class="text-subtle text-sm"><!></span></div>'),Sn=T('<span class="icon">+</span> ',1),Hn=T('<span class="icon">−</span> ',1),Rn=T('<div class="selection-action-bar svelte-1f4chm"><span class="selection-info"> </span> <!> <!></div>'),In=T('<div class="diff-wrapper svelte-1f4chm"><!> <div class="diff-content svelte-1f4chm"><!></div></div>'),Wn=T('<div class="tracked-change-diff-viewer svelte-1f4chm"><!></div>');function Dn(q,c){if(new.target)return
|
|
1
|
+
import{t as Xt,bo as v,bm as F,bw as Jt,bs as Ye,bq as Zt,b as Qt}from"./AeC4KVgG.js";import{bs as en,c5 as Xe,ca as xe,aD as t,bH as H,a5 as M,bA as R,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Je,bO as X,aB as T,b$ as Pe,be as sn,a7 as an,ay as Ze}from"./CJxGDkBm.js";import{i as me}from"./k2awEenT.js";import{g as on,i as rn}from"./CswzK9Go.js";import{f as ln}from"./DrHJ7oPv.js";import{f as cn}from"./CZ-8NDq0.js";import{k as dn}from"./Hy_004pB.js";import{IX as Se,o6 as fn,zJ as un,so as bt,o8 as hn,a8 as kt}from"./BkzMrEqG.js";import{bY as gn,dD as vn}from"./-5BGDZDk.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./B-nCPlyy.js";import{F as wt,b9 as _t}from"./Ci7mS1ie.js";import{f as Qe}from"./DJM6amHV.js";import"./jhNNYE0v.js";import{S as Re}from"./F1SvNoTt.js";import{l as bn}from"./DWUO9rBe.js";import{g as kn}from"./Cn0ug0UZ.js";function wn(q,c,oe,Ie=1){const We=Lt(q,c,oe,"","",{context:3}),re=new Set,pe=new Set,J=_n(Ie)-1,De=We.split(`
|
|
2
|
+
`);let s=0,I=0,le=!1;for(const B of De)if(B.startsWith("@@")){le=!0;const Z=B.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);Z&&(I=parseInt(Z[1],10),s=parseInt(Z[2],10))}else le&&(B.startsWith("+")?(re.add(s+J),s++):B.startsWith("-")?(pe.add(I+J),I++):B.startsWith(" ")&&(s++,I++));return{additions:re,deletions:pe}}function _n(q){return Number.isFinite(q)&&q>1?Math.floor(q):1}var Ln=T("<div><!> <!></div>"),Cn=T('<div class="diff-skeleton svelte-1f4chm"><div class="diff-skeleton-header svelte-1f4chm"><!> <!></div> <div class="diff-skeleton-content svelte-1f4chm"></div></div>'),yn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-danger text-sm ml-2"> </span></div>'),xn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-subtle text-sm ml-2"> </span></div>'),Pn=T('<div class="empty-state svelte-1f4chm"><span class="text-subtle text-sm"><!></span></div>'),Sn=T('<span class="icon">+</span> ',1),Hn=T('<span class="icon">−</span> ',1),Rn=T('<div class="selection-action-bar svelte-1f4chm"><span class="selection-info"> </span> <!> <!></div>'),In=T('<div class="diff-wrapper svelte-1f4chm"><!> <div class="diff-content svelte-1f4chm"><!></div></div>'),Wn=T('<div class="tracked-change-diff-viewer svelte-1f4chm"><!></div>');function Dn(q,c){if(new.target)return Xt({component:Dn,...q});en(c,!0);const oe=()=>Ye(yt,"$read$",re),Ie=()=>Ye(Rt,"$workspace$",re),We=()=>Ye(It,"$workingTreeFileContentStore",re),[re,pe]=Zt(),J=mn("TrackedChangeDiffViewer"),De=2*1024*1024;let s=v(c,"change",7),I=v(c,"active",7,!0),le=v(c,"workspaceId",7),B=v(c,"viewMode",7,"unified"),Z=v(c,"showHeader",7,!1),Ne=v(c,"foldUnchanged",7,!0),Me=v(c,"lineWrapping",7,!1),U=v(c,"onStageHunk",7),A=v(c,"onUnstageHunk",7),et=v(c,"onOpenCommit",7),Ue=v(c,"refreshKey",7),Ae=v(c,"branchBaseRef",7),Ee=v(c,"branchBaseCommitSha",7),ge=v(c,"useProvidedContent",7,!1),ce=v(c,"allowHeadReads",7,!0),Fe=v(c,"canReadHeadFiles",7),W=v(c,"lineOffset",7,1),tt=v(c,"lineStageIndicators",7),Oe=v(c,"annotations",23,()=>[]),Te=v(c,"renderAnnotation",7),Be=v(c,"virtualizer",7),G=v(c,"gitRootId",7,void 0),be=v(c,"gitRootPath",7,void 0);const de=Xe(()=>le())??kn()?.workspaceId??"",Ct=Math.random().toString(36).substring(2,8),$e=`tracked-diff:${crypto.randomUUID()}`,yt=gn(de,$e),Q=d(()=>oe()?.result?.kind==="trackedDiff"?oe().result:void 0),ke=d(()=>oe()?.loading??!0),nt=d(()=>oe()?.error??null),ze=d(()=>(t(Q)?.oldContent.length??0)+(t(Q)?.newContent.length??0)>De),$=d(()=>t(ze)?"":t(Q)?.oldContent??""),V=d(()=>t(ze)?"":t(Q)?.newContent??""),ee=d(()=>ct(s()?.relativePath||s()?.file||"")),it=d(()=>t(Q)?.chunk?.chunks.length?At(t(Q).chunk,t(ee)):""),xt=d(()=>!t($)&&!t(V)&&!t(it)),Pt=d(()=>!!s()?.gitlink||!!t(Q)?.gitlink),st=d(()=>W()>1?`
|
|
3
3
|
`.repeat(W()-1):""),St=d(()=>t(st)+t($)),Ht=d(()=>t(st)+t(V));let w=ae(null),Ke=ae(null),we=null,_e=ae(!1);const Rt=vn(de),at=pt(void 0),ot=pt(""),It=dn(ot,at),rt=d(Ie),te=d(()=>be()||t(rt)?.worktreePath||t(rt)?.repositoryPath||""),Le=d(()=>s()?.relativePath||s()?.file||"file"),Wt=d(()=>Ut(t(Le)));let Ce=ae(null),lt=ae("");function ct(e){if(!e.startsWith("/")||!t(te))return e;const i=t(te).endsWith("/")?t(te).slice(0,-1):t(te);if(e.startsWith(i+"/"))return e.slice(i.length+1);if(e.startsWith(i)){const a=e.slice(i.length);return a.startsWith("/")?a.slice(1):a}return e}function Dt(e){return e?e.startsWith("/")?e:t(te)?`${t(te)}/${e}`:null:null}const dt=d(()=>W()>1),Nt=d(()=>t(dt)?`${t(Le)}:${He(t($))}:off${W()}`:void 0),Mt=d(()=>t(dt)?`${t(Le)}:${He(t(V))}:off${W()}`:void 0);function Ut(e){const i=e.split(".").pop()?.toLowerCase();return i?{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rs:"rust",go:"go",rb:"ruby",java:"java",kt:"kotlin",swift:"swift",cs:"csharp",cpp:"cpp",c:"c",h:"c",hpp:"cpp",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",html:"html",css:"css",scss:"scss",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",svelte:"svelte",vue:"vue"}[i]:void 0}function At(e,i){const a=`a/${i}`,o=`b/${i}`,u=[`diff --git ${a} ${o}`,`--- ${a}`,`+++ ${o}`];for(const r of e.chunks){u.push(`@@ -${r.oldStart},${r.oldLines} +${r.newStart},${r.newLines} @@`);for(const h of r.lines){const l=h.type===kt.Addition?"+":h.type===kt.Deletion?"-":" ",g=h.content.endsWith(`
|
|
4
4
|
`)?h.content.slice(0,-1):h.content;u.push(`${l}${g}`)}}return u.join(`
|
|
5
5
|
`)+`
|
|
6
6
|
`}let ft=ae(!1),ut=ae(0);function Et(e=!1){H(ft,e,!0),nn(ut)}function je(e,i,a){const o=t(ee)||s().relativePath||s().file,u=3,r=W()>1?Math.floor(W())-1:0,h=Math.max(1,e-r),l=Math.max(h,i-r),b=Lt(o,t($),t(V),"","",{context:u}).split(`
|
|
7
|
-
`),fe=t($)===""&&r===0?[`diff --git a/${o} b/${o}`,"new file mode 100644","--- /dev/null",`+++ b/${o}`]:[`diff --git a/${o} b/${o}`,`--- a/${o}`,`+++ b/${o}`],_=[];let ve=!1,ne=0,ie=0;for(const n of b)if(!(n.startsWith("Index:")||n.startsWith("===")||n.startsWith("---")||n.startsWith("+++")))if(n.startsWith("@@")){const f=n.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);f&&(ie=parseInt(f[1],10),ne=parseInt(f[2],10),ve=!0)}else ve&&n!==""&&(n.startsWith("+")?(_.push({content:n,oldLine:null,newLine:ne,type:"addition"}),ne++):n.startsWith("-")?(_.push({content:n,oldLine:ie,newLine:null,type:"deletion"}),ie++):n.startsWith(" ")&&(_.push({content:n,oldLine:ie,newLine:ne,type:"context"}),ne++,ie++));let k=-1,y=-1;J.info("[generateLinePatch] Searching for target lines",{startLine:e,endLine:i,localStartLine:h,localEndLine:l,side:a,allHunkLinesCount:_.length,allHunkLinesSample:_.slice(0,10).map(n=>({content:n.content.substring(0,40),oldLine:n.oldLine,newLine:n.newLine,type:n.type,effectiveLineNum:n.newLine??n.oldLine}))});for(let n=0;n<_.length;n++){const f=_[n],K=f.newLine??f.oldLine;if(K!==null&&K>=h&&K<=l){const
|
|
8
|
-
`),he=u-C.length;for(let p=0;p<he;p++){const P=f+p;if(P<
|
|
9
|
-
`),he=u-C.length;for(let p=0;p<he;p++){const P=f+p;if(P<
|
|
10
|
-
`),mt=[...fe,ue,
|
|
7
|
+
`),fe=t($)===""&&r===0?[`diff --git a/${o} b/${o}`,"new file mode 100644","--- /dev/null",`+++ b/${o}`]:[`diff --git a/${o} b/${o}`,`--- a/${o}`,`+++ b/${o}`],_=[];let ve=!1,ne=0,ie=0;for(const n of b)if(!(n.startsWith("Index:")||n.startsWith("===")||n.startsWith("---")||n.startsWith("+++")))if(n.startsWith("@@")){const f=n.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);f&&(ie=parseInt(f[1],10),ne=parseInt(f[2],10),ve=!0)}else ve&&n!==""&&(n.startsWith("+")?(_.push({content:n,oldLine:null,newLine:ne,type:"addition"}),ne++):n.startsWith("-")?(_.push({content:n,oldLine:ie,newLine:null,type:"deletion"}),ie++):n.startsWith(" ")&&(_.push({content:n,oldLine:ie,newLine:ne,type:"context"}),ne++,ie++));let k=-1,y=-1;J.info("[generateLinePatch] Searching for target lines",{startLine:e,endLine:i,localStartLine:h,localEndLine:l,side:a,allHunkLinesCount:_.length,allHunkLinesSample:_.slice(0,10).map(n=>({content:n.content.substring(0,40),oldLine:n.oldLine,newLine:n.newLine,type:n.type,effectiveLineNum:n.newLine??n.oldLine}))});for(let n=0;n<_.length;n++){const f=_[n],K=f.newLine??f.oldLine;if(K!==null&&K>=h&&K<=l){const Y=f.type==="addition",he=f.type==="deletion";if(a==="additions"&&!Y||a==="deletions"&&!he)continue;(Y||he)&&(k===-1&&(k=n),y=n)}}if(J.info("[generateLinePatch] Target found",{targetStartIdx:k,targetEndIdx:y,targetLines:k>=0?_.slice(k,y+1).map(n=>({content:n.content,oldLine:n.oldLine,newLine:n.newLine,type:n.type})):null}),k===-1)return null;const D=[];for(let n=k-1;n>=0&&D.length<u;n--){const f=_[n];if(f.type==="context")D.unshift(f);else break}const ye=[];for(let n=k;n<=y;n++)ye.push(_[n]);const C=[];for(let n=y+1;n<_.length&&C.length<u;n++){const f=_[n];if(f.type==="context")C.push(f);else break}if(C.length<u)if(s().stage==="staged"){let f=0;const K=C[C.length-1];if(K?.newLine)f=K.newLine;else for(let p=y;p>=0;p--){const P=_[p];if(P.newLine!==null){f=P.newLine;break}}if(f===0){const p=D[D.length-1];p?.newLine&&(f=p.newLine)}const Y=t(V).split(`
|
|
8
|
+
`),he=u-C.length;for(let p=0;p<he;p++){const P=f+p;if(P<Y.length){const Ve=Y[P];C.push({content:" "+Ve,oldLine:null,newLine:P+1,type:"context"})}}}else{let f=0;const K=C[C.length-1];if(K?.oldLine)f=K.oldLine;else for(let p=y;p>=0;p--){const P=_[p];if(P.oldLine!==null){f=P.oldLine;break}}if(f===0){const p=D[D.length-1];p?.oldLine&&(f=p.oldLine)}const Y=t($).split(`
|
|
9
|
+
`),he=u-C.length;for(let p=0;p<he;p++){const P=f+p;if(P<Y.length){const Ve=Y[P];C.push({content:" "+Ve,oldLine:P+1,newLine:null,type:"context"})}}}const x=[...D,...ye,...C];if(x.length===0)return null;let N=0,E=0;for(const n of x)if(n.oldLine!==null&&N===0&&(N=n.oldLine),n.newLine!==null&&E===0&&(E=n.newLine),N!==0&&E!==0)break;N===0&&(N=E>0?E-1:1),E===0&&(E=N);let z=0,se=0;for(const n of x)n.type==="deletion"?z++:(n.type==="addition"||z++,se++);const ue=`@@ -${N+r},${z} +${E+r},${se} @@`,Yt=x.map(n=>n.content).join(`
|
|
10
|
+
`),mt=[...fe,ue,Yt].join(`
|
|
11
11
|
`)+`
|
|
12
|
-
`;return J.info("[generateLinePatch] Generated patch",{hunkHeader:ue,selectedLinesCount:x.length,selectedLinesContent:x.map(n=>({content:n.content,type:n.type})),fullPatch:mt}),mt}function Ft(e){H(w,e,!0)}function Ot(){if(!t(w))return;const e=t(ee)||s().relativePath||s().file,i=je(t(w).start,t(w).end,t(w).side);i&&U()&&(U()(e,i),H(w,null))}function Tt(){if(!t(w))return;const e=t(ee)||s().relativePath||s().file,i=je(t(w).start,t(w).end,t(w).side);i&&A()&&(A()(e,i),H(w,null))}const ht={additions:new Set,deletions:new Set};let gt="",qe=ht;function vt(){if(!t($)&&!t(V))return ht;const e=t(ee)||s().relativePath||s().file,i=`${e}|${He(t($))}|${He(t(V))}|${W()}`;if(i===gt)return qe;const{additions:a,deletions:o}=wn(e,t($),t(V),W());return gt=i,qe={additions:a,deletions:o},qe}xe(()=>{if(!I())return;Ue(),t(ut),s().id;const e=crypto.randomUUID();return Se.dispatch(fn(de,$e,e,{kind:"trackedDiff",filePath:t(ee),workspacePath:t(te),stage:s().stage,commitHash:s().commitHash,gitRootId:G(),gitRootPath:be(),gitlink:s().gitlink,baseRef:Ae(),baseCommitSha:Ee(),providedOld:s().content?.oldContent,providedNew:s().content?.newContent,useProvidedContent:ge(),forceRefresh:t(ft),allowHeadReads:ce()},Fe())),()=>{Se.dispatch(un(de,$e,e))}}),xe(()=>{if(!I())return;const e=de,i=ct(s()?.relativePath||s()?.file||""),a=Dt(i),o=G()?cn(a??i,G()):i,u=`${e}:${o}`;ot.set(e),at.set(o),u!==t(lt)&&(H(lt,u),H(Ce,null)),e&&i&&a&&s()?.stage!=="committed"&&!ge()&&ce()&&!t(ke)&&!t(Pt)&&Se.dispatch(G()?bt(e,o,a,{gitRoot:{id:G(),relativePath:i}}):bt(e,i,a))}),xe(()=>{if(!I()||ge()||!ce())return;const e=We();if(e===null||e===t(Ce))return;const i=
|
|
12
|
+
`;return J.info("[generateLinePatch] Generated patch",{hunkHeader:ue,selectedLinesCount:x.length,selectedLinesContent:x.map(n=>({content:n.content,type:n.type})),fullPatch:mt}),mt}function Ft(e){H(w,e,!0)}function Ot(){if(!t(w))return;const e=t(ee)||s().relativePath||s().file,i=je(t(w).start,t(w).end,t(w).side);i&&U()&&(U()(e,i),H(w,null))}function Tt(){if(!t(w))return;const e=t(ee)||s().relativePath||s().file,i=je(t(w).start,t(w).end,t(w).side);i&&A()&&(A()(e,i),H(w,null))}const ht={additions:new Set,deletions:new Set};let gt="",qe=ht;function vt(){if(!t($)&&!t(V))return ht;const e=t(ee)||s().relativePath||s().file,i=`${e}|${He(t($))}|${He(t(V))}|${W()}`;if(i===gt)return qe;const{additions:a,deletions:o}=wn(e,t($),t(V),W());return gt=i,qe={additions:a,deletions:o},qe}xe(()=>{if(!I())return;Ue(),t(ut),s().id;const e=crypto.randomUUID();return Se.dispatch(fn(de,$e,e,{kind:"trackedDiff",filePath:t(ee),workspacePath:t(te),stage:s().stage,commitHash:s().commitHash,gitRootId:G(),gitRootPath:be(),gitlink:s().gitlink,baseRef:Ae(),baseCommitSha:Ee(),providedOld:s().content?.oldContent,providedNew:s().content?.newContent,useProvidedContent:ge(),forceRefresh:t(ft),allowHeadReads:ce()},Fe())),()=>{Se.dispatch(un(de,$e,e))}}),xe(()=>{if(!I())return;const e=de,i=ct(s()?.relativePath||s()?.file||""),a=Dt(i),o=G()?cn(a??i,G()):i,u=`${e}:${o}`;ot.set(e),at.set(o),u!==t(lt)&&(H(lt,u),H(Ce,null)),e&&i&&a&&s()?.stage!=="committed"&&!ge()&&ce()&&!t(ke)&&!t(Pt)&&Se.dispatch(G()?bt(e,o,a,{gitRoot:{id:G(),relativePath:i}}):bt(e,i,a))}),xe(()=>{if(!I()||ge()||!ce())return;const e=We();if(e===null||e===t(Ce))return;const i=Xe(()=>t(Ce));H(Ce,e,!0),i!==null&&(J.debug("[files slice] File content changed, reloading diff",{instanceId:Ct,filePath:s()?.relativePath||s()?.file}),Se.dispatch(hn(de,G())))}),xe(()=>{if(!I())return;const e=t(Ke);we&&(we.remove(),we=null),e?.numberElement&&Xe(()=>{const i=vt();if(!(e.side==="additions"?i.additions:i.deletions).has(e.lineNumber)||t(_e)||t(ke))return;const o=s().stage==="unstaged";if(!(o?U():A()))return;const r=document.createElement("button");r.className=o?"hunk-action-btn hunk-stage-btn line-hover-btn":"hunk-action-btn hunk-unstage-btn line-hover-btn",r.innerHTML=o?"+":"−",r.title=o?F.ui_trackedDiff_stageLine_tooltip():F.ui_trackedDiff_unstageLine_tooltip();const h=l=>{l.stopPropagation(),l.preventDefault()};r.onpointerdown=h,r.onpointerup=h,r.onmousedown=h,r.onmouseup=h,r.onclick=async l=>{if(l.stopPropagation(),l.preventDefault(),!(!ce()||t(_e)||t(ke))){H(_e,!0),r.disabled=!0,r.style.opacity="0.5";try{const g=t(ee)||s().relativePath||s().file,b=je(e.lineNumber,e.lineNumber,e.side);b&&(o&&U()?U()(g,b):!o&&A()&&A()(g,b)),Et(!0)}finally{H(_e,!1)}}},e.numberElement.appendChild(r),we=r})});var Bt={get change(){return s()},set change(e){s(e),m()},get active(){return I()},set active(e=!0){I(e),m()},get workspaceId(){return le()},set workspaceId(e){le(e),m()},get viewMode(){return B()},set viewMode(e="unified"){B(e),m()},get showHeader(){return Z()},set showHeader(e=!1){Z(e),m()},get foldUnchanged(){return Ne()},set foldUnchanged(e=!0){Ne(e),m()},get lineWrapping(){return Me()},set lineWrapping(e=!1){Me(e),m()},get onStageHunk(){return U()},set onStageHunk(e){U(e),m()},get onUnstageHunk(){return A()},set onUnstageHunk(e){A(e),m()},get onOpenCommit(){return et()},set onOpenCommit(e){et(e),m()},get refreshKey(){return Ue()},set refreshKey(e){Ue(e),m()},get branchBaseRef(){return Ae()},set branchBaseRef(e){Ae(e),m()},get branchBaseCommitSha(){return Ee()},set branchBaseCommitSha(e){Ee(e),m()},get useProvidedContent(){return ge()},set useProvidedContent(e=!1){ge(e),m()},get allowHeadReads(){return ce()},set allowHeadReads(e=!0){ce(e),m()},get canReadHeadFiles(){return Fe()},set canReadHeadFiles(e){Fe(e),m()},get lineOffset(){return W()},set lineOffset(e=1){W(e),m()},get lineStageIndicators(){return tt()},set lineStageIndicators(e){tt(e),m()},get annotations(){return Oe()},set annotations(e=[]){Oe(e),m()},get renderAnnotation(){return Te()},set renderAnnotation(e){Te(e),m()},get virtualizer(){return Be()},set virtualizer(e){Be(e),m()},get gitRootId(){return G()},set gitRootId(e=void 0){G(e),m()},get gitRootPath(){return be()},set gitRootPath(e=void 0){be(e),m()},$set:Jt,$on:(e,i)=>Qt(c,e,i)},Ge=Wn(),$t=M(Ge);{var zt=e=>{var i=Cn(),a=M(i),o=M(a);Re(o,{class:"h-4 w-48"});var u=O(o,2);Re(u,{class:"h-4 w-24"}),R(a);var r=O(a,2);on(r,20,()=>[0,1,2,3,4,5,6,7,8,9,10,11],rn,(h,l)=>{var g=Ln();let b;var S=M(g);Re(S,{class:"h-3 w-6 shrink-0"});var fe=O(S,2);Re(fe,{class:"h-3",style:`width: ${40+Math.random()*50}%`}),R(g),j(()=>b=ln(g,1,"diff-skeleton-line svelte-1f4chm",null,b,{"diff-skeleton-line--added":l%5===2,"diff-skeleton-line--removed":l%7===3})),L(h,g)}),R(r),R(i),L(e,i)},Kt=e=>{var i=yn(),a=M(i);wt(a,{get icon(){return _t},class:"text-danger"});var o=O(a,2),u=Je(o,!0);R(i),j(()=>X(u,t(nt))),L(e,i)},jt=e=>{var i=xn(),a=M(i);wt(a,{get icon(){return _t},class:"text-warning"});var o=O(a,2),u=Je(o,!0);R(i),j(r=>X(u,r),[()=>F.ui_trackedDiff_tooLarge_error()]),L(e,i)},qt=e=>{var i=Pn(),a=M(i),o=M(a);{var u=l=>{var g=Pe();j(b=>X(g,b),[()=>F.ui_trackedDiff_commitUnavailable_error()]),L(l,g)},r=l=>{var g=Pe();j(b=>X(g,b),[()=>F.ui_trackedDiff_noStagedChanges_label()]),L(l,g)},h=l=>{var g=Pe();j(b=>X(g,b),[()=>F.ui_trackedDiff_noUnstagedChanges_label()]),L(l,g)};me(o,l=>{s().stage==="committed"?l(u):s().stage==="staged"?l(r,1):l(h,-1)})}R(a),R(i),L(e,i)},Gt=e=>{var i=In(),a=M(i);{var o=h=>{const l=d(vt),g=d(()=>t(w).side==="additions"?t(l).additions:t(l).deletions),b=d(()=>Array.from({length:t(w).end-t(w).start+1},(k,y)=>t(w).start+y).filter(k=>t(g).has(k)).length);var S=Rn(),fe=M(S),_=Je(fe,!0),ve=O(fe,2);{var ne=k=>{var y=an(),D=Ze(y);{var ye=x=>{Qe(x,{variant:"plain",size:"compact",class:"hunk-action-btn hunk-stage-btn h-auto! gap-1 rounded-sm! bg-success/15 px-2! py-[0.2rem]! text-success hover:bg-success/25",onclick:Ot,children:(N,E)=>{var z=Sn(),se=O(Ze(z));j(ue=>X(se,` ${ue??""}`),[()=>F.ui_trackedDiff_stage_label()]),L(N,z)},$$slots:{default:!0}})},C=x=>{Qe(x,{variant:"plain",size:"compact",class:"hunk-action-btn hunk-unstage-btn h-auto! gap-1 rounded-sm! bg-danger/15 px-2! py-[0.2rem]! text-danger hover:bg-danger/25",onclick:Tt,children:(N,E)=>{var z=Hn(),se=O(Ze(z));j(ue=>X(se,` ${ue??""}`),[()=>F.ui_trackedDiff_unstage_label()]),L(N,z)},$$slots:{default:!0}})};me(D,x=>{s().stage==="unstaged"&&U()?x(ye):s().stage==="staged"&&A()&&x(C,1)})}L(k,y)};me(ve,k=>{t(b)>0&&k(ne)})}var ie=O(ve,2);Qe(ie,{variant:"plain",size:"compact",class:"hunk-action-btn h-auto! rounded-sm! px-2! py-[0.2rem]! text-muted-foreground",onclick:()=>H(w,null),children:(k,y)=>{sn();var D=Pe("✕");L(k,D)},$$slots:{default:!0}}),R(S),j(k=>X(_,k),[()=>t(b)===1?F.ui_trackedDiff_linesSelected_one():F.ui_trackedDiff_linesSelected_many({count:bn(t(b))})]),L(h,S)};me(a,h=>{t(w)&&h(o)})}var u=O(a,2),r=M(u);{let h=d(()=>t(it)||void 0),l=d(()=>!Ne()),g=d(()=>Me()?"wrap":"scroll"),b=d(()=>!!(U()||A()));pn(r,{get patch(){return t(h)},get oldContent(){return t(St)},get newContent(){return t(Ht)},get oldCacheKey(){return t(Nt)},get newCacheKey(){return t(Mt)},get fileName(){return t(Le)},get language(){return t(Wt)},get viewMode(){return B()},get showHeader(){return Z()},showStats:!1,get expandUnchanged(){return t(l)},get overflow(){return t(g)},get enableLineSelection(){return t(b)},get selectedLines(){return t(w)},onLineSelected:Ft,onLineEnter:S=>{(U()||A())&&H(Ke,{lineNumber:S.lineNumber,side:S.annotationSide,lineElement:S.lineElement,numberElement:S.numberElement})},onLineLeave:()=>{H(Ke,null)},get annotations(){return Oe()},get renderAnnotation(){return Te()},get virtualizer(){return Be()},unsafeCSS:`
|
|
13
13
|
/* Make line number column relative for hover button positioning */
|
|
14
14
|
[data-column-number] {
|
|
15
15
|
position: sticky;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as C}from"./
|
|
1
|
+
import{D as C}from"./SFGrktzA.js";import{t as re,bo as y,bw as se,b as ae,bm as I}from"./AeC4KVgG.js";import{bs as ne,cb as oe,c5 as ie,bH as k,aD as b,a5 as G,bA as W,b_ as R,W as E,bn as le,bV as q,c9 as F,aA as x,ay as H,bl as N,bS as L,bO as O,a7 as ce,aB as P}from"./CJxGDkBm.js";import{i as de}from"./k2awEenT.js";import{k as me}from"./HftJbvyF.js";import{s as D}from"./DrHJ7oPv.js";import{a as ue}from"./BPeXyR5m.js";const K=C.shape.model,pe=C.shape.states.unwrap().element;function U(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function fe(t){return/^(?:|model|model\.(?:nodes|edges|groups)|states)$/.test(t)}function ge(t){let e=0;const s=()=>{for(;/[\t\n\r ]/.test(t[e]??"\0");)e+=1},a=(l,d)=>{if(d>64)throw new Error("JSON nesting limit exceeded");s();const f=e,m=t[e];if(m===void 0)return{complete:!1};if(m==='"'){for(e+=1;e<t.length;){const r=t[e++];if(r==="\\")e+=1;else if(r==='"')return{value:JSON.parse(t.slice(f,e)),complete:!0}}return{complete:!1}}if(m==="{"||m==="["){const r=m==="{",c=r?Object.create(null):[],h=r?"}":"]";if(e+=1,s(),t[e]===h)return e+=1,{value:c,complete:!0};for(;e<t.length;){let i="";if(r){if(t[e]!=='"')throw new Error("Expected JSON property");const _=a(l,d+1);if(!_.complete)return{value:c,complete:!1};if(i=_.value,s(),e===t.length)return{value:c,complete:!1};if(t[e++]!==":")throw new Error("Expected JSON colon")}const g=r?l?`${l}.${i}`:i:`${l}[]`,v=a(g,d+1);if((v.complete||fe(g)&&v.value!==void 0)&&(Array.isArray(c)?c.push(v.value):c[i]=v.value),!v.complete)return{value:c,complete:!1};if(s(),e===t.length)return{value:c,complete:!1};if(t[e]===h)return e+=1,{value:c,complete:!0};if(t[e++]!==",")throw new Error("Expected JSON separator");s()}return{value:c,complete:!1}}for(;e<t.length&&!/[\t\n\r ,}\]]/.test(t[e]);)e+=1;return e===t.length?{complete:!1}:{value:JSON.parse(t.slice(f,e)),complete:!0}},n=a("",0);if(s(),n.complete&&e!==t.length)throw new Error("Unexpected JSON suffix");return n}function J(t){const e=new Set;return t.filter(({id:s})=>e.has(s)?!1:(e.add(s),!0))}function z(t,e,s,a){return[t.visibleNodes,t.highlightedNodes].every(n=>n?.every(l=>e.has(l))??!0)&&[t.visibleEdges,t.highlightedEdges].every(n=>n?.every(l=>s.has(l))??!0)&&(t.visibleGroups?.every(n=>a.has(n))??!0)&&(t.camera?.focus===void 0||e.has(t.camera.focus))}function ve(t){if(!U(t)||!U(t.model))return null;const e=t.model,s=(i,g)=>Array.isArray(i)?i.filter(v=>g.safeParse(v).success):[];let a=J(s(e.nodes,K.shape.nodes.element)),n=J(s(e.groups,K.shape.groups.unwrap().element)),l=!0;for(;l;){const i=new Set(a.map(({id:u})=>u)),g=n.filter(u=>u.nodeIds.every(A=>i.has(A))),v=new Set(g.map(({id:u})=>u)),_=a.filter(u=>u.group===void 0||v.has(u.group));l=_.length!==a.length||g.length!==n.length,a=_,n=g}if(!a.length)return null;const d=new Set(a.map(({id:i})=>i)),f=J(s(e.edges,K.shape.edges.element)).filter(i=>d.has(i.from)&&d.has(i.to)),m=new Set(f.map(({id:i})=>i)),r=new Set(n.map(({id:i})=>i)),c=J(s(t.states,pe)).filter(i=>z(i,d,m,r)),h={...t,model:{...e,nodes:a,edges:f,...e.groups===void 0?{}:{groups:n}},...t.states===void 0?{}:{states:c}};return c.some(i=>i.id===h.currentStateId)||delete h.currentStateId,C.safeParse(h).success?h:null}function V(t){if(!C.safeParse(t).success)return null;const e=t,{nodes:s,edges:a,groups:n=[]}=e.model,l=e.states??[],d=new Set(s.map(({id:r})=>r)),f=new Set(a.map(({id:r})=>r)),m=new Set(n.map(({id:r})=>r));return[s,a,n,l].some(r=>new Set(r.map(({id:c})=>c)).size!==r.length)||s.some(r=>r.group!==void 0&&!m.has(r.group))||a.some(r=>!d.has(r.from)||!d.has(r.to))||n.some(r=>r.nodeIds.some(c=>!d.has(c)))||l.some(r=>!z(r,d,f,m))||e.currentStateId!==void 0&&!l.some(r=>r.id===e.currentStateId)?null:e}function Oe(t,e=!1){const s=(a,n,l)=>({rawSource:t,status:a,diagram:n,...l?{error:l}:{}});try{if(e){const n=V(JSON.parse(t));return n?s("complete",n):s("invalid",null,"Invalid diagram payload")}const a=ge(t);if(a.complete){const n=V(a.value);if(n)return s("complete",n)}return s("partial",ve(a.value))}catch{return s(e?"invalid":"partial",null,e?"Invalid diagram JSON":void 0)}}var he=P('<div class="diagram-feedback svelte-p097sp" role="alert"><strong> </strong> <span> </span></div> <pre class="diagram-source svelte-p097sp"> </pre>',1),we=P('<div class="diagram-feedback svelte-p097sp" role="status"> </div>'),Se=P('<div class="streaming-diagram svelte-p097sp"><!></div>');function _e(t,e){if(new.target)return re({component:_e,...t});ne(e,!0);let s=y(e,"diagram",7),a=y(e,"isStreaming",7,!1),n=y(e,"source",7),l=y(e,"sourceError",7),d=y(e,"viewResetKey",7),f=y(e,"onBindingClick",7),m=q(null),r=q(0),c="",h,i=!1;oe(()=>{const o=s(),p=n(),w=d(),S=a(),B=!!l();ie(()=>{i&&(w!==h||!p.startsWith(c))&&(k(m,null),k(r,b(r)+1)),i=!0,c=p,h=w,B||!S&&!o?k(m,null):o&&k(m,o,!0)})});const g=F(()=>l()?null:s()??(a()?b(m):null)),v=F(()=>!!l()||!a()&&!s());var _={get diagram(){return s()},set diagram(o){s(o),x()},get isStreaming(){return a()},set isStreaming(o=!1){a(o),x()},get source(){return n()},set source(o){n(o),x()},get sourceError(){return l()},set sourceError(o){l(o),x()},get viewResetKey(){return d()},set viewResetKey(o){d(o),x()},get onBindingClick(){return f()},set onBindingClick(o){f(o),x()},$set:se,$on:(o,p)=>ae(e,o,p)},u=Se(),A=G(u);{var M=o=>{var p=he(),w=H(p),S=G(w),B=N(S,!0),X=L(S,2),Y=N(X,!0);W(w);var j=L(w,2),Z=N(j,!0);R(($,ee,te)=>{O(B,$),O(Y,ee),D(j,"aria-label",te),O(Z,n())},[()=>I.markdown_mermaid_renderFailed_error(),()=>I.diagram_renderer_error_description(),()=>I.markdown_mermaid_viewSource_label()]),E(o,p)},Q=o=>{var p=ce(),w=H(p);me(w,()=>b(r),S=>{ue(S,{get diagram(){return b(g)},editable:!1,get viewResetKey(){return d()},get onBindingClick(){return f()}})}),E(o,p)},T=o=>{var p=we(),w=N(p,!0);R(S=>O(w,S),[()=>I.ui_spinner_loading_ariaLabel()]),E(o,p)};de(A,o=>{b(v)?o(M):b(g)?o(Q,1):o(T,-1)})}return W(u),R(()=>{D(u,"aria-busy",a()),D(u,"data-diagram-streaming",a())}),E(t,u),le(_)}export{_e as S,Oe as p};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{t as Ue,bo as x,bw as ze,b as Be,bm as Le,_ as Tt}from"./AeC4KVgG.js";import{bs as Ne,ca as vt,aD as a,bH as y,ay as ie,bS as J,W,bn as Oe,bV as z,aA as F,c9 as R,aB as j,a5 as q,bA as V,b_ as te,a7 as Re,bl as He,aw as ke,aC as Lt,c3 as be,bb as Pe,bO as Je,ai as Pt,aF as St,br as Rt,bj as Ht,aj as ee}from"./CJxGDkBm.js";import{i as X}from"./k2awEenT.js";import{e as _e,g as Wt,i as Ut}from"./CswzK9Go.js";import{h as tt}from"./BigcqNWS.js";import{g as Xe,s as rt,f as le}from"./DrHJ7oPv.js";import{b as Te}from"./NtFyWdpR.js";import{d1 as Me,d0 as nt,ap as zt,d3 as ht,a9 as We,aF as kt,aX as Bt,ax as Nt,a7 as at,r as Ot,aO as Vt,aT as Dt,F as qt}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BCykELTT.js","/app/immutable/chunks/AeC4KVgG.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/k2awEenT.js","/app/immutable/chunks/BPeXyR5m.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/SFGrktzA.js","/app/immutable/chunks/-5BGDZDk.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BkzMrEqG.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/Bd1FsnP3.js","/app/immutable/chunks/Dp2nUoTL.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DWPd-rzt.js","/app/immutable/chunks/Ci7mS1ie.js","/app/immutable/chunks/ZcoUa9Jg.js","/app/immutable/chunks/DrHJ7oPv.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CswzK9Go.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/jhNNYE0v.js","/app/immutable/chunks/Cwla-sl1.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Dz2z231n.js","/app/immutable/chunks/DWUO9rBe.js","/app/immutable/chunks/DcNzEJkC.js","/app/immutable/chunks/BbV7MtxC.js","/app/immutable/chunks/DJM6amHV.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/HftJbvyF.js","/app/immutable/chunks/BNODdf6r.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/DsyH2ZOJ.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CbSeeP7P.js","/app/immutable/chunks/DTWXK3Yd.js","/app/immutable/chunks/n9HBJb8W.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CWVUBnHm.js","/app/immutable/chunks/DwQfkcIA.js","/app/immutable/chunks/CAYSf4zc.js","/app/immutable/chunks/CZ-8NDq0.js","/app/immutable/chunks/CP5zM-2z.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/CD7PpB6R.js","/app/immutable/chunks/BV4GrhSx.js","/app/immutable/chunks/BigcqNWS.js","/app/immutable/chunks/u8xausOt.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/CkCQ3HCp.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/-6dzlBdM.js","/app/immutable/chunks/DpqAXGKG.js","/app/immutable/chunks/BBjKvnMF.js","/app/immutable/chunks/B7DTATjS.js","/app/immutable/chunks/Bw3fY4XA.js","/app/immutable/chunks/8gFeUK_j.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/Cn4uSlRl.js","/app/immutable/chunks/CkHTSBAH.js","/app/immutable/chunks/B-AWjR8f.js","/app/immutable/chunks/BDwdwGgf.js","/app/immutable/chunks/Cc2R8pz2.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/G2FM8dd1.js","/app/immutable/chunks/CLtHxjHo.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/C4xwE0yj.js","/app/immutable/chunks/CCnGCUBh.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css","/app/immutable/chunks/Dxi1HqSj.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as Ue,bo as x,bw as ze,b as Be,bm as Le,_ as Tt}from"./AeC4KVgG.js";import{bs as Ne,ca as vt,aD as a,bH as y,ay as ie,bS as J,W,bn as Oe,bV as z,aA as F,c9 as R,aB as j,a5 as q,bA as V,b_ as te,a7 as Re,bl as He,aw as ke,aC as Lt,c3 as be,bb as Pe,bO as Je,ai as Pt,aF as St,br as Rt,bj as Ht,aj as ee}from"./CJxGDkBm.js";import{i as X}from"./k2awEenT.js";import{e as _e,g as Wt,i as Ut}from"./CswzK9Go.js";import{h as tt}from"./BigcqNWS.js";import{g as Xe,s as rt,f as le}from"./DrHJ7oPv.js";import{b as Te}from"./NtFyWdpR.js";import{d1 as Me,d0 as nt,ap as zt,d3 as ht,a9 as We,aF as kt,aX as Bt,ax as Nt,a7 as at,r as Ot,aO as Vt,aT as Dt,F as qt}from"./SFGrktzA.js";import{i as jt,bl as ot,IX as Ke,vq as Kt,t1 as Gt,vs as Zt}from"./BkzMrEqG.js";import{K as Jt,a9 as Xt}from"./-5BGDZDk.js";import{l as Se}from"./ChTqQfQN.js";import{h as st}from"./CLtHxjHo.js";import{a as Qt,c as bt,b as Qe,V as Ye,p as Fe,d as wt,I as Yt,r as $t,s as er}from"./u8xausOt.js";import{g as it}from"./Cn0ug0UZ.js";import{s as tr}from"./Dp2nUoTL.js";import{f as rr}from"./DJM6amHV.js";import{F as Ge}from"./jhNNYE0v.js";import{m as lt}from"./CD7PpB6R.js";import{F as nr,bE as ar}from"./Ci7mS1ie.js";import{t as or}from"./DAsc1V4f.js";function xe(r,o){return o||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(r.trim())}function sr(r,o){if(o||!r)return r;const n=document.createElement("template");n.innerHTML=r;for(const l of n.content.querySelectorAll("img, video")){const c=l.getAttribute("src")||l.getAttribute("data-media-src")||"",u=[...l.querySelectorAll("source")];if(!xe(c,!1)||u.some(f=>!xe(f.getAttribute("src")||"",!1))){const f=document.createElement("img");f.setAttribute("alt",l.getAttribute("alt")||l.getAttribute("data-name")||""),f.setAttribute("data-media-unavailable","node-owned"),l.replaceWith(f);continue}l.removeAttribute("srcset");const s=l.getAttribute("poster");s&&!xe(s,!1)&&l.removeAttribute("poster")}return n.innerHTML}const ir=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function lr(r){return r&&(ir.some(o=>o.test(r))||Jt(r,"markdown"))?"static":"simple"}var cr=j("<!> <!>",1);function It(r,o){if(new.target)return Ue({component:It,...r});Ne(o,!0);let n=x(o,"workspaceId",7),l=x(o,"canUseMedia",7),c=z(null),u=z(null),s=z(!1),f=z(!1);function _(m){y(c,{url:m.getAttribute("src")||"",name:m.getAttribute("alt")||void 0,opener:m},!0),y(s,!0)}function I(m){const h=nt(m.getAttribute("href")||"",n());return h&&l()(h)?(y(c,{url:h,name:m.textContent?.trim()||void 0,opener:m,assetLink:!0},!0),y(s,!0),!0):p(m)}function p(m){const h=Me(m.getAttribute("href")||"",n());return!h||!l()(h.url)?!1:(y(u,{url:h.url,mimeType:h.mimeType,name:m.textContent?.trim()||void 0,opener:m},!0),y(f,!0),!0)}vt(()=>{a(u)&&!Me(a(u).url,n())&&(y(f,!1),y(u,null)),a(c)?.assetLink&&!nt(a(c).url,n())&&(y(s,!1),y(c,null))});var k={openImage:_,openAsset:I,get workspaceId(){return n()},set workspaceId(m){n(m),F()},get canUseMedia(){return l()},set canUseMedia(m){l(m),F()},$set:ze,$on:(m,h)=>Be(o,m,h)},v=cr(),w=ie(v);{var M=m=>{Qt(m,{get imageUrl(){return a(c).url},get imageName(){return a(c).name},get openerElement(){return a(c).opener},showActionsMenu:!0,get open(){return a(s)},set open(h){y(s,h,!0)}})},T=R(()=>a(c)&&l()(a(c).url));X(w,m=>{a(T)&&m(M)})}var C=J(w,2);{var t=m=>{bt(m,{get videoUrl(){return a(u).url},get videoName(){return a(u).name},get mimeType(){return a(u).mimeType},sourceKind:"workspace",get openerElement(){return a(u).opener},get open(){return a(f)},set open(h){y(f,h,!0)}})},d=R(()=>a(u)&&Me(a(u).url,n())&&l()(a(u).url));X(C,m=>{a(d)&&m(t)})}return W(r,v),Oe(k)}var dr=j('<div class="flex items-center gap-2"><!> <!></div>'),ur=Lt('<svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg>'),fr=j('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><!></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span><svg viewBox="0 0 20 20" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),mr=j("<div><!> <!></div>"),pr=j('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function yt(r,o){if(new.target)return Ue({component:yt,...r});Ne(o,!0);let n=x(o,"source",7),l=x(o,"name",23,()=>Le.chat_videoBlock_fromAgent_label()),c=x(o,"poster",7),u=x(o,"allowFileMedia",7,!0),s=x(o,"canOpenFile",7),f=x(o,"fluid",7,!1),_=x(o,"compact",7,!1),I=x(o,"compactPreview",7),p=z(!1),k=z(!1),v=z(!1),w=z(null);const M=R(()=>n().kind==="inline"?`data:${n().mimeType};base64,${n().data}`:n().url);function T(g){return xe(g,u()&&s()?.()!==!1)}const C=R(()=>!T(a(M))),t=R(()=>Fe(a(M))),d=R(()=>{if(!(!c()||!T(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const g=new URL(c());return(g.protocol==="https:"||g.protocol==="workspace-file:")&&!g.username&&!g.password?c():void 0}catch{return}}});function m(){y(k,!0),y(v,!1)}var h={get source(){return n()},set source(g){n(g),F()},get name(){return l()},set name(g=Le.chat_videoBlock_fromAgent_label()){l(g),F()},get poster(){return c()},set poster(g){c(g),F()},get allowFileMedia(){return u()},set allowFileMedia(g=!0){u(g),F()},get canOpenFile(){return s()},set canOpenFile(g){s(g),F()},get fluid(){return f()},set fluid(g=!1){f(g),F()},get compact(){return _()},set compact(g=!1){_(g),F()},get compactPreview(){return I()},set compactPreview(g){I(g),F()},$set:ze,$on:(g,H)=>Be(o,g,H)},E=pr(),U=ie(E);let O;var ve=q(U);{var D=g=>{Qe(g,{get name(){return l()},reason:"load-failed"})},ae=g=>{var H=dr(),ce=q(H);{let Q=R(()=>a(t)?.path),re=R(()=>a(t)?.workspaceId);Qe(ce,{get name(){return l()},reason:"load-failed",get path(){return a(Q)},get workspaceId(){return a(re)}})}var se=J(ce,2);Ye(se,{get videoUrl(){return a(M)},get videoName(){return l()},get sourceKind(){return n().kind},get mimeType(){return n().mimeType}}),V(H),W(g,H)},K=g=>{var H=mr();let ce;var se=q(H);{let de=R(()=>Le.chat_videoBlock_play_ariaLabel({name:l()}));rr(se,{wrapContent:!1,type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return a(de)},"data-testid":"chat-video-snapshot",onclick:()=>{T(a(M))&&y(p,!0)},get ref(){return a(w)},set ref(he){y(w,he,!0)},children:(he,De)=>{var ue=Re(),B=ie(ue);{var we=Y=>{var G=Re(),Z=ie(G);tr(Z,I),W(Y,G)},fe=Y=>{var G=fr(),Z=ie(G),Ce=q(Z);{var Ee=pe=>{var qe=ur();W(pe,qe)};X(Ce,pe=>{f()||pe(Ee)})}V(Z);var $=J(Z,2);$.muted=!0;var me=J($,2),Ie=q(me),ye=He(Ie);V(me),te(()=>{rt($,"src",a(M)),rt($,"poster",a(d)),le($,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${a(d)||a(k)&&!a(v)?"opacity-100":"opacity-0"}`),le(Ie,1,`flex ${_()?"size-6":"size-11"} shrink-0 aspect-square items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]`),le(ye,0,`ml-0.5 ${_()?"size-3":"size-5"}`)}),ke("loadeddata",$,m),ke("error",$,()=>y(v,!0)),W(Y,G)};X(B,Y=>{I()?Y(we):Y(fe,-1)})}W(he,ue)},$$slots:{default:!0}})}var Q=J(se,2);{var re=de=>{Ye(de,{get videoUrl(){return a(M)},get videoName(){return l()},get sourceKind(){return n().kind},get mimeType(){return n().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"})};X(Q,de=>{I()||de(re)})}V(H),te(()=>{le(H,1,`group relative aspect-video w-full max-w-2xl ${f()?"max-h-72":"max-h-40"}`),ce=Xe(H,"",ce,{height:I()?"100%":void 0,width:f()?"min(100%, calc(18rem * 16 / 9))":"min(100%, calc(10rem * 16 / 9))"})}),W(g,H)};X(ve,g=>{a(C)?g(D):a(v)?g(ae,1):g(K,-1)})}V(U);var oe=J(U,2);{var Ve=g=>{bt(g,{get videoUrl(){return a(M)},get videoName(){return l()},get poster(){return a(d)},get sourceKind(){return n().kind},get mimeType(){return n().mimeType},get openerElement(){return a(w)},get open(){return a(p)},set open(H){y(p,H,!0)}})};X(oe,g=>{!a(v)&&!a(C)&&g(Ve)})}return te(()=>O=Xe(U,"",O,{height:I()?"100%":void 0})),W(r,E),Oe(h)}const gr=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,vr=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ct(r,o){if(typeof r!="string"||!r||r!==r.trim())return null;if(r.startsWith("workspace-asset://"))return Me(r,o);if(r.startsWith("workspace-file://")){const l=Fe(r);if(!l||l.workspaceId!==o)return null;const c=ht(r);return c?lt(c,o):null}const n=r.startsWith("intent://")?r:`intent://local/file/${r}`;return lt(n,o)}function hr(r,o){if(r.startsWith("workspace-file://")){const n=Fe(r);if(!n||n.workspaceId!==o)return!1;const l=ht(r);return!!l&&!!We(l,o)}return!!We(r,o,{readOnly:!0})}function kr(r,o){return(o===0||!r[o-1].trim())&&(o===r.length-1||!r[o+1].trim())}function br(r,o,n){const l=n[0];return r.findIndex((c,u)=>{if(u<=o)return!1;const s=c.trim();return s.length>=n.length&&s.split("").every(f=>f===l)})}function wr(r,o){const n=r.split(`
|
|
3
3
|
`),l=[];let c=[];const u=()=>{const s=c.join(`
|
|
4
4
|
`);s.trim()&&l.push({type:"markdown",content:s}),c=[]};for(let s=0;s<n.length;s+=1){const f=n[s].match(vr);if(f){const w=br(n,s,f[1]);if(w>s){const M=n.slice(s,w+1);if(f[2].trim()==="ws-block:video")try{const T=JSON.parse(n.slice(s+1,w).join(`
|
|
5
|
-
`)),C=ct(T?.path,o);if(C){u(),l.push({type:"video",source:C,name:typeof T.path=="string"?T.path:void 0,poster:typeof T.poster=="string"?T.poster:void 0}),s=w;continue}}catch{}c.push(...M),s=w;continue}c.push(...n.slice(s));break}const I=!/^(?: {4}|\t)/.test(n[s])&&kr(n,s)?n[s].match(gr):null;if(!I){c.push(n[s]);continue}const[,p,k]=I,v=ct(k,o);v?(u(),l.push({type:"video",source:v,name:p||void 0})):k.startsWith("workspace-asset://")&&!zt(k)||hr(k,o)?c.push(n[s]):c.push(`[${p}](${k})`)}return u(),l}function Ae(r){return wt(r.getAttribute("src")||"")}function Ze(r){return r instanceof HTMLImageElement?r:r instanceof HTMLAnchorElement?r.querySelector("img"):null}function Ir(r,o){const n=r.getBoundingClientRect(),l=o.getBoundingClientRect();return{top:n.top-l.top+6,right:l.right-n.right+6}}function dt(r,o){const n=document.activeElement;return!!(n&&(n===r||n===r?.closest("a")||o?.contains(n)))}function yr(r,o){const n=r.getAttribute("src")||"",l=Fe(n)?.path??kt(n,o)?.path;if(l)return l;if(n.startsWith("workspace-asset://")){const c=n.split(/[?#]/)[0].split("/").pop();if(c)return c}if(n&&!/^[a-z][a-z0-9+.-]*:/i.test(n)&&!n.startsWith("//"))try{return decodeURI(n)}catch{return n}return r.getAttribute("alt")||void 0}const _t="data-image-sized",ut=r=>typeof r=="number"&&Number.isInteger(r)&&r>0;function _r(r){try{return encodeURI(r).replace(/%25/g,"%")}catch{return null}}function Ar(r){return r.startsWith("workspace-file://")?r.split(/[?#]/)[0]:r}function Mr(r,o,n){const l=new Map;for(const[c,u]of Object.entries(r)){if(!u||!ut(u.width)||!ut(u.height))continue;const s={width:u.width,height:u.height},f=new Set([c]),_=_r(c);_&&f.add(_);for(const I of[...f]){const p=We(I,o);if(p&&f.add(p),n!==void 0){const k=Bt(I,n);if(k){const v=We(`intent://local/file/${k.split("/").map(encodeURIComponent).join("/")}`,o);v&&f.add(v)}}}for(const I of f)l.has(I)||l.set(I,s)}return l}function xr(r,o,n,l){if(!o||!r.includes("<img"))return r;const c=Mr(o,n,l);return c.size===0?r:r.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const f=Ar(s[1].replace(/&/g,"&")),_=c.get(f);return _?u.replace(/\s*\/?>$/,` width="${_.width}" height="${_.height}" ${_t}="">`):u})}function ft(r,o){let n=o,l,c=!1,u=!1;const s=new Map;function f(){for(const[p,{component:k,source:v}]of s)be(k),r.contains(p)&&p.replaceWith(v);s.clear()}function _(){if(!u){for(const[p,{component:k}]of s)r.contains(p)||(be(k),s.delete(p));if(n.enabled)for(const p of r.querySelectorAll("pre > code")){if(p.closest("[data-markdown-diagram]"))continue;const k=[...p.classList].find(C=>C.startsWith("language-"))?.slice(9);let v;if(k==="mermaid")v="mermaid";else if(k==="diagram"||k==="ws-block:diagram")v="diagram";else if(k==="ws-block")try{if(JSON.parse(p.textContent??"").type!=="diagram")continue;v="diagram"}catch{continue}else continue;const w=p.parentElement;if(!w)continue;if(!l){c||(c=!0,Tt(()=>import("./DkgfeEA0.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url).then(C=>{l=C.default,c=!1,_()}).catch(C=>{c=!1,Se.error("Failed to load the Markdown diagram renderer",{error:C})}));return}const M=document.createElement("div");M.dataset.markdownDiagram=v,w.replaceWith(M);const T=Pe(l,{target:M,context:n.context,props:{kind:v,source:p.textContent??"",workspaceId:n.workspaceId}});s.set(M,{component:T,source:w})}}}const I=new MutationObserver(_);return I.observe(r,{childList:!0,subtree:!0}),queueMicrotask(_),{update(p){(n.enabled!==p.enabled||n.workspaceId!==p.workspaceId)&&f(),n=p,_()},destroy(){u=!0,I.disconnect(),f()}}}var Fr=j('<span class="min-w-0 max-w-full truncate"> </span>'),Cr=j('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function At(r,o){if(new.target)return Ue({component:At,...r});Ne(o,!0);let n=x(o,"name",7);var l={get name(){return n()},set name(v){n(v),F()},$set:ze,$on:(v,w)=>Be(o,v,w)},c=Cr(),u=q(c),s=q(u);nr(s,{get icon(){return ar},class:"size-3.5"}),V(u);var f=J(u,2),_=q(f),I=He(_,!0),p=J(_,2);{var k=v=>{var w=Fr(),M=He(w,!0);_e(w,(T,C)=>or?.(T,C),n),te(()=>Je(M,n())),W(v,w)};X(p,v=>{n()&&v(k)})}return V(f),V(c),te(v=>Je(I,v),[()=>Le.ui_mediaLoadingPlaceholder_title_label()]),W(r,c),Oe(l)}const mt="markdown-image-frame";function Er(r,o){const n=new Map,l=new Map,c=new Map,u=[300,1e3];let s=!1;function f(t){let d=l.get(t);return d||(d={source:t.getAttribute("src")||"",workspaceId:o.getWorkspaceId(),retries:0,failureHandled:!1},l.set(t,d)),d}function _(t){const d=f(t);return!s&&r.contains(d.fallbackHost??t)&&d.workspaceId===o.getWorkspaceId()&&o.canUseMedia(d.source)&&!t.hasAttribute("data-media-unavailable")&&!t.hasAttribute("data-media-unsupported")&&at(d.source)!==null}function I(t,d=!1){if(!_(t))return;const m=f(t),h=at(m.source);if(!h)return;const E=m.fallbackHost,U=E?.contains(document.activeElement)??!1;if(m.failureHandled=!1,m.fallbackHost=void 0,d&&(m.retries=0),t.removeAttribute("src"),t.setAttribute("src",h),E){const O=n.get(E);O&&be(O),n.delete(E),E.replaceWith(t),M(),U&&r.contains(t)&&t.focus()}}function p(t){const d=f(t);s||!r.contains(t)||d.failureHandled||(d.failureHandled=!0,_(t)&&d.retries<u.length?d.timer=setTimeout(()=>{d.timer=void 0,I(t)},u[d.retries++]):w(t,"load-failed"))}function k(t){const d=t.parentElement;return d?.classList.contains(mt)?d:null}function v(t){const d=Number(t.getAttribute("width")),m=Number(t.getAttribute("height"));if(!(d>0&&m>0))return;const h=document.createElement("span");h.className=mt,h.style.aspectRatio=`${d} / ${m}`,h.style.setProperty("--image-aspect-ratio",`${d} / ${m}`),h.style.width=`min(${d}px, 100%)`,h.dataset.loaded="false",t.replaceWith(h),h.appendChild(t);const E=h.appendChild(document.createElement("span"));E.className="markdown-image-frame-placeholder",n.set(E,Pe(At,{target:E,props:{name:yr(t,o.getWorkspaceId())}}));const U=()=>{if(c.delete(t),s||!r.contains(h))return;h.dataset.loaded="true";const O=n.get(E);O&&(be(O),n.delete(E)),E.remove()};t.complete&&t.naturalWidth>0?U():(c.set(t,U),t.addEventListener("load",U,{once:!0}))}function w(t,d){const m=t.getAttribute("src")||t.getAttribute("data-media-src")||"",h=Fe(m),E=kt(m,o.getWorkspaceId()),U=h?.path??E?.path,O=h?.workspaceId??E?.workspaceId,ve=t.getAttribute("data-name")||t.getAttribute("alt")||U?.split("/").pop()||void 0,D=document.createElement(t instanceof HTMLVideoElement?"div":"span");D.className="media-unavailable-host",(k(t)??t).replaceWith(D),o.onMediaRemoved(t);let ae;if(t instanceof HTMLImageElement&&d==="load-failed"){const oe=f(t);oe.fallbackHost=D,_(t)&&(ae=()=>I(t,!0))}const K=Pe(Qe,{target:D,props:{name:ve,reason:d,path:U,workspaceId:O,onRetry:ae}});if(n.set(D,K),t instanceof HTMLVideoElement){D.classList.add("flex","items-center","gap-2");const oe=D.appendChild(document.createElement("span"));n.set(oe,Pe(Ye,{target:oe,props:{videoUrl:m,videoName:ve,sourceKind:"workspace",mimeType:Me(m,o.getWorkspaceId())?.mimeType}}))}}function M(){if(!s){for(const t of r.querySelectorAll("img"))Ae(t)&&!t.closest("a")&&(t.tabIndex=0,t.setAttribute("role","button")),!(t.hasAttribute("data-media-unsupported")||t.hasAttribute("data-media-unavailable"))&&(f(t),t.hasAttribute(_t)&&!k(t)&&v(t),t.getAttribute("src")&&t.complete&&t.naturalWidth===0&&p(t));for(const t of r.querySelectorAll("[data-media-unsupported]"))w(t,"unsupported");for(const t of r.querySelectorAll("[data-media-unavailable]"))w(t,Nt(t));for(const[t,d]of l)r.contains(d.fallbackHost??t)||(d.timer!==void 0&&clearTimeout(d.timer),l.delete(t));for(const[t,d]of c)r.contains(t)||(t.removeEventListener("load",d),c.delete(t));for(const[t,d]of n)r.contains(t)||(be(d),n.delete(t))}}function T(t){const d=t.target;(d instanceof HTMLImageElement||d instanceof HTMLVideoElement)&&(d instanceof HTMLImageElement?p(d):w(d,"load-failed"))}const C=new MutationObserver(M);return C.observe(r,{childList:!0,subtree:!0}),r.addEventListener("error",T,!0),queueMicrotask(M),{destroy(){s=!0,C.disconnect();for(const t of l.values())t.timer!==void 0&&clearTimeout(t.timer);l.clear();for(const[t,d]of c)t.removeEventListener("load",d);c.clear(),r.removeEventListener("error",T,!0);for(const t of n.values())be(t);n.clear()}}}var Tr=j('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),Lr=j("<div></div>"),pt=j('<div role="group"><!> <!></div>'),Pr=j('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),Sr=j("<!> <!>",1);function gt(r,o){if(new.target)return Ue({component:gt,...r});Ne(o,!0);const n=e=>{var i=Re(),A=ie(i);{var b=P=>{var S=Tr(),ne=q(S);{let N=R(()=>a(B).getAttribute("src")||""),ge=R(()=>a(B).getAttribute("alt")||void 0);Te(Yt(ne,{get imageUrl(){return a(N)},get imageName(){return a(ge)},get open(){return a(fe)},set open(je){y(fe,je,!0)}}),je=>y(Y,je,!0),()=>a(Y))}V(S),Te(S,N=>y(G,N),()=>a(G)),te(()=>Xe(S,`top: ${a(we).top??""}px; right: ${a(we).right??""}px;`)),W(P,S)},L=R(()=>a(B)&&K(a(B).getAttribute("src")||""));X(A,P=>{a(L)&&P(b)})}W(e,i)};let l=x(o,"content",7),c=x(o,"isStreaming",7,!1),u=x(o,"className",7,""),s=x(o,"workspaceId",23,()=>it()?.workspaceId??void 0),f=x(o,"relativeMediaBase",7),_=x(o,"onCodeBlockAction",7),I=x(o,"onFileClick",7),p=x(o,"canOpenFile",7),k=x(o,"allowFileMedia",7,!0),v=x(o,"taskBlockRenderMode",7,"placeholder"),w=x(o,"chatImageThumbnails",7,!1),M=x(o,"forceExternalLinks",7,!1),T=x(o,"renderRichFencesAsCode",7,!1),C=x(o,"renderDiagrams",7,!1),t=x(o,"allowSanitizedHtml",7,!1),d=x(o,"media",7);const m=Ot(),h=St(),E=R(()=>wr(l(),s())),U=R(()=>a(E).some(e=>e.type==="video")),O=R(()=>!a(U)&&a(E).length===1&&a(E)[0].type==="markdown"?a(E)[0].content:l()),ve=R(()=>lr(a(O)));let D=z(null),ae=z("");function K(e){return xe(e,k()&&p()?.()!==!1)}const oe=R(()=>sr(a(ae),k()&&p()?.()!==!1)),Ve=R(()=>$t(a(oe),s(),er)),g=R(()=>`<div class="markdown-content">${a(Ve)}</div>`);let H=0;const ce=150;let se=-1/0,Q=null,re=null;async function de(e,i,A,b){try{const L=await Vt(e,{...i,readOnly:!0});if(b!==H)return;y(ae,xr(L,A,i?.workspaceId,i?.relativeMediaBase),!0)}catch(L){if(b!==H)return;Se.error("Failed to process markdown:",L);const P=e.replace(/[&<>"']/g,S=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[S]||S);y(ae,`<p>${P}</p>`)}}function he(){if(!re)return;const e=ce-(performance.now()-se);if(e>0){Q=setTimeout(()=>{Q=null,he()},e);return}const i=re;re=null,se=performance.now(),i()}function De(){Q!==null&&(clearTimeout(Q),Q=null),re=null,se=-1/0}vt(()=>{const e=a(O),i={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:v(),workspaceId:s(),relativeMediaBase:f()??(s()&&s()!==jt?"":void 0),renderRichFencesAsCode:T()||C(),processPrimitives:!C(),allowSanitizedHtml:t(),renderMath:!c(),workspaceFileVersion:m},A=d(),b=++H,L=()=>void de(e,i,A,b);c()?(re=L,Q===null&&he()):(De(),L())});let ue=z(void 0),B=z(null),we=z(Rt({top:0,right:0})),fe=z(!1),Y=z(void 0),G=z(null);function Z(e){if(e.type==="mouseover"&&dt(a(B),a(G)))return;const i=e.target,A=Ze(i);if(A&&Ae(A)&&K(A.getAttribute("src")||"")){if(a(B)===A)return;y(B,A,!0),y(we,Ir(A,e.currentTarget),!0)}else if(a(B)&&!a(fe)){if(i instanceof Node&&a(G)?.contains(i))return;y(B,null)}}function Ce(){!a(fe)&&!dt(a(B),a(G))&&y(B,null)}function Ee(e){const i=Ze(e.target);!i||!Ae(i)||!K(i.getAttribute("src")||"")||(e.preventDefault(),e.stopPropagation(),Z(e),y(fe,!0))}function $(e){return Er(e,{getWorkspaceId:()=>s(),canUseMedia:K,onMediaRemoved:i=>{a(B)===i&&y(B,null)}})}function me(e){const i=e.target,A=i.closest("a");if(!A&&i instanceof HTMLImageElement){const L=i.getAttribute("src")||"";if(wt(L)&&K(L)){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),a(ue)?.openImage(i);return}}if(A?.href){if(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),a(ue)?.openAsset(A))return;const L=pe(e),P=s()?ot(s()):void 0;st(A.href,{workspaceId:P,canOpenFile:p(),sourcePanelId:L,event:e,rawHref:A.getAttribute("href")??void 0,...M()?{forceExternal:!0}:{}});return}const b=Dt(i.closest("[data-mention]"));if(b){const{type:L,meta:P}=b;if(L==="file"&&b.filePath){if(p()?.()===!1)return;e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();const S=b.filePath;Se.debug("[MarkdownViewer] File mention clicked",{filePath:S,meta:P});const ne=pe(e),N=Ge({event:e});if(I())I()(S,{line:b.line,openInAdjacentPanel:N,sourcePanelId:ne});else{const ge=s();ge&&Ke.dispatch(Kt(ge,S,{line:b.line,openInAdjacentPanel:N,sourcePanelId:ne}))}}else if(b.folderPath!==void 0){if(p()?.()===!1||!s())return;e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),Ke.dispatch(Gt(s(),qt(b.folderPath)))}else if(L==="note"&&b.note){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();const S=b.note.id;Se.debug("[MarkdownViewer] Note mention clicked",{noteId:S,meta:P});const ne=pe(e),N=Ge({event:e});if(b.note.workspaceId&&b.note.workspaceId!==s()){st(Xt(S,b.note.workspaceId),{workspaceId:s()?ot(s()):void 0,sourcePanelId:ne,event:e});return}const ge=s();ge&&Ke.dispatch(Zt(ge,S,{openInAdjacentPanel:N,sourcePanelId:ne}))}}}function Ie(e){if(ye(e),!e.defaultPrevented){if(e.target instanceof HTMLImageElement&&Ae(e.target)&&(e.key==="Enter"||e.key===" ")){me(e);return}e.key!=="Enter"||!Ge({event:e})||me(e)}}function ye(e){const i=Ze(e.target);!i||!Ae(i)||!K(i.getAttribute("src")||"")||a(Y)?.handleCopy(e,i.getAttribute("src")||"")}function pe(e){const i=e.target;if(i instanceof HTMLElement)return i.closest("[data-panel-id]")?.dataset.panelId}Ht(()=>{H+=1,De()});var qe={get content(){return l()},set content(e){l(e),F()},get isStreaming(){return c()},set isStreaming(e=!1){c(e),F()},get className(){return u()},set className(e=""){u(e),F()},get workspaceId(){return s()},set workspaceId(e=it()?.workspaceId??void 0){s(e),F()},get relativeMediaBase(){return f()},set relativeMediaBase(e){f(e),F()},get onCodeBlockAction(){return _()},set onCodeBlockAction(e){_(e),F()},get onFileClick(){return I()},set onFileClick(e){I(e),F()},get canOpenFile(){return p()},set canOpenFile(e){p(e),F()},get allowFileMedia(){return k()},set allowFileMedia(e=!0){k(e),F()},get taskBlockRenderMode(){return v()},set taskBlockRenderMode(e="placeholder"){v(e),F()},get chatImageThumbnails(){return w()},set chatImageThumbnails(e=!1){w(e),F()},get forceExternalLinks(){return M()},set forceExternalLinks(e=!1){M(e),F()},get renderRichFencesAsCode(){return T()},set renderRichFencesAsCode(e=!1){T(e),F()},get renderDiagrams(){return C()},set renderDiagrams(e=!1){C(e),F()},get allowSanitizedHtml(){return t()},set allowSanitizedHtml(e=!1){t(e),F()},get media(){return d()},set media(e){d(e),F()},$set:ze,$on:(e,i)=>Be(o,e,i)},$e=Sr(),et=ie($e);{var Mt=e=>{var i=Lr();Wt(i,21,()=>a(E),Ut,(A,b)=>{var L=Re(),P=ie(L);{var S=N=>{yt(N,{get allowFileMedia(){return k()},get canOpenFile(){return p()},get source(){return a(b).source},get name(){return a(b).name},get poster(){return a(b).poster}})},ne=N=>{gt(N,{get content(){return a(b).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return f()},get onCodeBlockAction(){return _()},get onFileClick(){return I()},get canOpenFile(){return p()},get allowFileMedia(){return k()},get taskBlockRenderMode(){return v()},get chatImageThumbnails(){return w()},get forceExternalLinks(){return M()},get renderRichFencesAsCode(){return T()},get renderDiagrams(){return C()},get allowSanitizedHtml(){return t()},get media(){return d()}})};X(P,N=>{a(b).type==="video"?N(S):N(ne,-1)})}W(A,L)}),V(i),te(()=>le(i,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),W(e,i)},xt=e=>{var i=pt();let A;var b=q(i);tt(b,()=>a(g));var L=J(b,2);n(L),V(i),_e(i,P=>$?.(P)),_e(i,(P,S)=>ft?.(P,S),()=>({enabled:C(),workspaceId:s(),context:h})),te(()=>A=le(i,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",A,{"chat-image-thumbnails":w()})),ee("click",i,me),ee("keydown",i,Ie),ke("copy",i,ye),ee("contextmenu",i,Ee),ee("mouseover",i,Z),ee("focusin",i,Z),ke("mouseleave",i,Ce),W(e,i)},Ft=e=>{var i=Pr(),A=q(i),b=He(A,!0);V(i),te(()=>{le(i,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),Je(b,a(O))}),W(e,i)},Ct=e=>{var i=pt();let A;var b=q(i);tt(b,()=>a(g));var L=J(b,2);n(L),V(i),Te(i,P=>y(D,P),()=>a(D)),_e(i,P=>$?.(P)),_e(i,(P,S)=>ft?.(P,S),()=>({enabled:C(),workspaceId:s(),context:h})),te(()=>A=le(i,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",A,{"chat-image-thumbnails":w()})),ee("click",i,me),ee("keydown",i,Ie),ke("copy",i,ye),ee("contextmenu",i,Ee),ee("mouseover",i,Z),ee("focusin",i,Z),ke("mouseleave",i,Ce),W(e,i)};X(et,e=>{a(U)?e(Mt):c()?e(xt,1):a(ve)==="simple"&&!t()?e(Ft,2):e(Ct,-1)})}var Et=J(et,2);return Te(It(Et,{get workspaceId(){return s()},canUseMedia:K}),e=>y(ue,e,!0),()=>a(ue)),W(r,$e),Oe(qe)}Pt(["click","keydown","contextmenu","mouseover","focusin"]);export{yt as C,gt as M,At as a,wr as s};
|
|
5
|
+
`)),C=ct(T?.path,o);if(C){u(),l.push({type:"video",source:C,name:typeof T.path=="string"?T.path:void 0,poster:typeof T.poster=="string"?T.poster:void 0}),s=w;continue}}catch{}c.push(...M),s=w;continue}c.push(...n.slice(s));break}const I=!/^(?: {4}|\t)/.test(n[s])&&kr(n,s)?n[s].match(gr):null;if(!I){c.push(n[s]);continue}const[,p,k]=I,v=ct(k,o);v?(u(),l.push({type:"video",source:v,name:p||void 0})):k.startsWith("workspace-asset://")&&!zt(k)||hr(k,o)?c.push(n[s]):c.push(`[${p}](${k})`)}return u(),l}function Ae(r){return wt(r.getAttribute("src")||"")}function Ze(r){return r instanceof HTMLImageElement?r:r instanceof HTMLAnchorElement?r.querySelector("img"):null}function Ir(r,o){const n=r.getBoundingClientRect(),l=o.getBoundingClientRect();return{top:n.top-l.top+6,right:l.right-n.right+6}}function dt(r,o){const n=document.activeElement;return!!(n&&(n===r||n===r?.closest("a")||o?.contains(n)))}function yr(r,o){const n=r.getAttribute("src")||"",l=Fe(n)?.path??kt(n,o)?.path;if(l)return l;if(n.startsWith("workspace-asset://")){const c=n.split(/[?#]/)[0].split("/").pop();if(c)return c}if(n&&!/^[a-z][a-z0-9+.-]*:/i.test(n)&&!n.startsWith("//"))try{return decodeURI(n)}catch{return n}return r.getAttribute("alt")||void 0}const _t="data-image-sized",ut=r=>typeof r=="number"&&Number.isInteger(r)&&r>0;function _r(r){try{return encodeURI(r).replace(/%25/g,"%")}catch{return null}}function Ar(r){return r.startsWith("workspace-file://")?r.split(/[?#]/)[0]:r}function Mr(r,o,n){const l=new Map;for(const[c,u]of Object.entries(r)){if(!u||!ut(u.width)||!ut(u.height))continue;const s={width:u.width,height:u.height},f=new Set([c]),_=_r(c);_&&f.add(_);for(const I of[...f]){const p=We(I,o);if(p&&f.add(p),n!==void 0){const k=Bt(I,n);if(k){const v=We(`intent://local/file/${k.split("/").map(encodeURIComponent).join("/")}`,o);v&&f.add(v)}}}for(const I of f)l.has(I)||l.set(I,s)}return l}function xr(r,o,n,l){if(!o||!r.includes("<img"))return r;const c=Mr(o,n,l);return c.size===0?r:r.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const f=Ar(s[1].replace(/&/g,"&")),_=c.get(f);return _?u.replace(/\s*\/?>$/,` width="${_.width}" height="${_.height}" ${_t}="">`):u})}function ft(r,o){let n=o,l,c=!1,u=!1;const s=new Map;function f(){for(const[p,{component:k,source:v}]of s)be(k),r.contains(p)&&p.replaceWith(v);s.clear()}function _(){if(!u){for(const[p,{component:k}]of s)r.contains(p)||(be(k),s.delete(p));if(n.enabled)for(const p of r.querySelectorAll("pre > code")){if(p.closest("[data-markdown-diagram]"))continue;const k=[...p.classList].find(C=>C.startsWith("language-"))?.slice(9);let v;if(k==="mermaid")v="mermaid";else if(k==="diagram"||k==="ws-block:diagram")v="diagram";else if(k==="ws-block")try{if(JSON.parse(p.textContent??"").type!=="diagram")continue;v="diagram"}catch{continue}else continue;const w=p.parentElement;if(!w)continue;if(!l){c||(c=!0,Tt(()=>import("./BCykELTT.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url).then(C=>{l=C.default,c=!1,_()}).catch(C=>{c=!1,Se.error("Failed to load the Markdown diagram renderer",{error:C})}));return}const M=document.createElement("div");M.dataset.markdownDiagram=v,w.replaceWith(M);const T=Pe(l,{target:M,context:n.context,props:{kind:v,source:p.textContent??"",workspaceId:n.workspaceId}});s.set(M,{component:T,source:w})}}}const I=new MutationObserver(_);return I.observe(r,{childList:!0,subtree:!0}),queueMicrotask(_),{update(p){(n.enabled!==p.enabled||n.workspaceId!==p.workspaceId)&&f(),n=p,_()},destroy(){u=!0,I.disconnect(),f()}}}var Fr=j('<span class="min-w-0 max-w-full truncate"> </span>'),Cr=j('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function At(r,o){if(new.target)return Ue({component:At,...r});Ne(o,!0);let n=x(o,"name",7);var l={get name(){return n()},set name(v){n(v),F()},$set:ze,$on:(v,w)=>Be(o,v,w)},c=Cr(),u=q(c),s=q(u);nr(s,{get icon(){return ar},class:"size-3.5"}),V(u);var f=J(u,2),_=q(f),I=He(_,!0),p=J(_,2);{var k=v=>{var w=Fr(),M=He(w,!0);_e(w,(T,C)=>or?.(T,C),n),te(()=>Je(M,n())),W(v,w)};X(p,v=>{n()&&v(k)})}return V(f),V(c),te(v=>Je(I,v),[()=>Le.ui_mediaLoadingPlaceholder_title_label()]),W(r,c),Oe(l)}const mt="markdown-image-frame";function Er(r,o){const n=new Map,l=new Map,c=new Map,u=[300,1e3];let s=!1;function f(t){let d=l.get(t);return d||(d={source:t.getAttribute("src")||"",workspaceId:o.getWorkspaceId(),retries:0,failureHandled:!1},l.set(t,d)),d}function _(t){const d=f(t);return!s&&r.contains(d.fallbackHost??t)&&d.workspaceId===o.getWorkspaceId()&&o.canUseMedia(d.source)&&!t.hasAttribute("data-media-unavailable")&&!t.hasAttribute("data-media-unsupported")&&at(d.source)!==null}function I(t,d=!1){if(!_(t))return;const m=f(t),h=at(m.source);if(!h)return;const E=m.fallbackHost,U=E?.contains(document.activeElement)??!1;if(m.failureHandled=!1,m.fallbackHost=void 0,d&&(m.retries=0),t.removeAttribute("src"),t.setAttribute("src",h),E){const O=n.get(E);O&&be(O),n.delete(E),E.replaceWith(t),M(),U&&r.contains(t)&&t.focus()}}function p(t){const d=f(t);s||!r.contains(t)||d.failureHandled||(d.failureHandled=!0,_(t)&&d.retries<u.length?d.timer=setTimeout(()=>{d.timer=void 0,I(t)},u[d.retries++]):w(t,"load-failed"))}function k(t){const d=t.parentElement;return d?.classList.contains(mt)?d:null}function v(t){const d=Number(t.getAttribute("width")),m=Number(t.getAttribute("height"));if(!(d>0&&m>0))return;const h=document.createElement("span");h.className=mt,h.style.aspectRatio=`${d} / ${m}`,h.style.setProperty("--image-aspect-ratio",`${d} / ${m}`),h.style.setProperty("--image-width",`${d}px`),h.dataset.loaded="false",t.replaceWith(h),h.appendChild(t);const E=h.appendChild(document.createElement("span"));E.className="markdown-image-frame-placeholder",n.set(E,Pe(At,{target:E,props:{name:yr(t,o.getWorkspaceId())}}));const U=()=>{if(c.delete(t),s||!r.contains(h))return;h.dataset.loaded="true";const O=n.get(E);O&&(be(O),n.delete(E)),E.remove()};t.complete&&t.naturalWidth>0?U():(c.set(t,U),t.addEventListener("load",U,{once:!0}))}function w(t,d){const m=t.getAttribute("src")||t.getAttribute("data-media-src")||"",h=Fe(m),E=kt(m,o.getWorkspaceId()),U=h?.path??E?.path,O=h?.workspaceId??E?.workspaceId,ve=t.getAttribute("data-name")||t.getAttribute("alt")||U?.split("/").pop()||void 0,D=document.createElement(t instanceof HTMLVideoElement?"div":"span");D.className="media-unavailable-host",(k(t)??t).replaceWith(D),o.onMediaRemoved(t);let ae;if(t instanceof HTMLImageElement&&d==="load-failed"){const oe=f(t);oe.fallbackHost=D,_(t)&&(ae=()=>I(t,!0))}const K=Pe(Qe,{target:D,props:{name:ve,reason:d,path:U,workspaceId:O,onRetry:ae}});if(n.set(D,K),t instanceof HTMLVideoElement){D.classList.add("flex","items-center","gap-2");const oe=D.appendChild(document.createElement("span"));n.set(oe,Pe(Ye,{target:oe,props:{videoUrl:m,videoName:ve,sourceKind:"workspace",mimeType:Me(m,o.getWorkspaceId())?.mimeType}}))}}function M(){if(!s){for(const t of r.querySelectorAll("img"))Ae(t)&&!t.closest("a")&&(t.tabIndex=0,t.setAttribute("role","button")),!(t.hasAttribute("data-media-unsupported")||t.hasAttribute("data-media-unavailable"))&&(f(t),t.hasAttribute(_t)&&!k(t)&&v(t),t.getAttribute("src")&&t.complete&&t.naturalWidth===0&&p(t));for(const t of r.querySelectorAll("[data-media-unsupported]"))w(t,"unsupported");for(const t of r.querySelectorAll("[data-media-unavailable]"))w(t,Nt(t));for(const[t,d]of l)r.contains(d.fallbackHost??t)||(d.timer!==void 0&&clearTimeout(d.timer),l.delete(t));for(const[t,d]of c)r.contains(t)||(t.removeEventListener("load",d),c.delete(t));for(const[t,d]of n)r.contains(t)||(be(d),n.delete(t))}}function T(t){const d=t.target;(d instanceof HTMLImageElement||d instanceof HTMLVideoElement)&&(d instanceof HTMLImageElement?p(d):w(d,"load-failed"))}const C=new MutationObserver(M);return C.observe(r,{childList:!0,subtree:!0}),r.addEventListener("error",T,!0),queueMicrotask(M),{destroy(){s=!0,C.disconnect();for(const t of l.values())t.timer!==void 0&&clearTimeout(t.timer);l.clear();for(const[t,d]of c)t.removeEventListener("load",d);c.clear(),r.removeEventListener("error",T,!0);for(const t of n.values())be(t);n.clear()}}}var Tr=j('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),Lr=j("<div></div>"),pt=j('<div role="group"><!> <!></div>'),Pr=j('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),Sr=j("<!> <!>",1);function gt(r,o){if(new.target)return Ue({component:gt,...r});Ne(o,!0);const n=e=>{var i=Re(),A=ie(i);{var b=P=>{var S=Tr(),ne=q(S);{let N=R(()=>a(B).getAttribute("src")||""),ge=R(()=>a(B).getAttribute("alt")||void 0);Te(Yt(ne,{get imageUrl(){return a(N)},get imageName(){return a(ge)},get open(){return a(fe)},set open(je){y(fe,je,!0)}}),je=>y(Y,je,!0),()=>a(Y))}V(S),Te(S,N=>y(G,N),()=>a(G)),te(()=>Xe(S,`top: ${a(we).top??""}px; right: ${a(we).right??""}px;`)),W(P,S)},L=R(()=>a(B)&&K(a(B).getAttribute("src")||""));X(A,P=>{a(L)&&P(b)})}W(e,i)};let l=x(o,"content",7),c=x(o,"isStreaming",7,!1),u=x(o,"className",7,""),s=x(o,"workspaceId",23,()=>it()?.workspaceId??void 0),f=x(o,"relativeMediaBase",7),_=x(o,"onCodeBlockAction",7),I=x(o,"onFileClick",7),p=x(o,"canOpenFile",7),k=x(o,"allowFileMedia",7,!0),v=x(o,"taskBlockRenderMode",7,"placeholder"),w=x(o,"chatImageThumbnails",7,!1),M=x(o,"forceExternalLinks",7,!1),T=x(o,"renderRichFencesAsCode",7,!1),C=x(o,"renderDiagrams",7,!1),t=x(o,"allowSanitizedHtml",7,!1),d=x(o,"media",7);const m=Ot(),h=St(),E=R(()=>wr(l(),s())),U=R(()=>a(E).some(e=>e.type==="video")),O=R(()=>!a(U)&&a(E).length===1&&a(E)[0].type==="markdown"?a(E)[0].content:l()),ve=R(()=>lr(a(O)));let D=z(null),ae=z("");function K(e){return xe(e,k()&&p()?.()!==!1)}const oe=R(()=>sr(a(ae),k()&&p()?.()!==!1)),Ve=R(()=>$t(a(oe),s(),er)),g=R(()=>`<div class="markdown-content">${a(Ve)}</div>`);let H=0;const ce=150;let se=-1/0,Q=null,re=null;async function de(e,i,A,b){try{const L=await Vt(e,{...i,readOnly:!0});if(b!==H)return;y(ae,xr(L,A,i?.workspaceId,i?.relativeMediaBase),!0)}catch(L){if(b!==H)return;Se.error("Failed to process markdown:",L);const P=e.replace(/[&<>"']/g,S=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[S]||S);y(ae,`<p>${P}</p>`)}}function he(){if(!re)return;const e=ce-(performance.now()-se);if(e>0){Q=setTimeout(()=>{Q=null,he()},e);return}const i=re;re=null,se=performance.now(),i()}function De(){Q!==null&&(clearTimeout(Q),Q=null),re=null,se=-1/0}vt(()=>{const e=a(O),i={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:v(),workspaceId:s(),relativeMediaBase:f()??(s()&&s()!==jt?"":void 0),renderRichFencesAsCode:T()||C(),processPrimitives:!C(),allowSanitizedHtml:t(),renderMath:!c(),workspaceFileVersion:m},A=d(),b=++H,L=()=>void de(e,i,A,b);c()?(re=L,Q===null&&he()):(De(),L())});let ue=z(void 0),B=z(null),we=z(Rt({top:0,right:0})),fe=z(!1),Y=z(void 0),G=z(null);function Z(e){if(e.type==="mouseover"&&dt(a(B),a(G)))return;const i=e.target,A=Ze(i);if(A&&Ae(A)&&K(A.getAttribute("src")||"")){if(a(B)===A)return;y(B,A,!0),y(we,Ir(A,e.currentTarget),!0)}else if(a(B)&&!a(fe)){if(i instanceof Node&&a(G)?.contains(i))return;y(B,null)}}function Ce(){!a(fe)&&!dt(a(B),a(G))&&y(B,null)}function Ee(e){const i=Ze(e.target);!i||!Ae(i)||!K(i.getAttribute("src")||"")||(e.preventDefault(),e.stopPropagation(),Z(e),y(fe,!0))}function $(e){return Er(e,{getWorkspaceId:()=>s(),canUseMedia:K,onMediaRemoved:i=>{a(B)===i&&y(B,null)}})}function me(e){const i=e.target,A=i.closest("a");if(!A&&i instanceof HTMLImageElement){const L=i.getAttribute("src")||"";if(wt(L)&&K(L)){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),a(ue)?.openImage(i);return}}if(A?.href){if(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),a(ue)?.openAsset(A))return;const L=pe(e),P=s()?ot(s()):void 0;st(A.href,{workspaceId:P,canOpenFile:p(),sourcePanelId:L,event:e,rawHref:A.getAttribute("href")??void 0,...M()?{forceExternal:!0}:{}});return}const b=Dt(i.closest("[data-mention]"));if(b){const{type:L,meta:P}=b;if(L==="file"&&b.filePath){if(p()?.()===!1)return;e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();const S=b.filePath;Se.debug("[MarkdownViewer] File mention clicked",{filePath:S,meta:P});const ne=pe(e),N=Ge({event:e});if(I())I()(S,{line:b.line,openInAdjacentPanel:N,sourcePanelId:ne});else{const ge=s();ge&&Ke.dispatch(Kt(ge,S,{line:b.line,openInAdjacentPanel:N,sourcePanelId:ne}))}}else if(b.folderPath!==void 0){if(p()?.()===!1||!s())return;e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),Ke.dispatch(Gt(s(),qt(b.folderPath)))}else if(L==="note"&&b.note){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();const S=b.note.id;Se.debug("[MarkdownViewer] Note mention clicked",{noteId:S,meta:P});const ne=pe(e),N=Ge({event:e});if(b.note.workspaceId&&b.note.workspaceId!==s()){st(Xt(S,b.note.workspaceId),{workspaceId:s()?ot(s()):void 0,sourcePanelId:ne,event:e});return}const ge=s();ge&&Ke.dispatch(Zt(ge,S,{openInAdjacentPanel:N,sourcePanelId:ne}))}}}function Ie(e){if(ye(e),!e.defaultPrevented){if(e.target instanceof HTMLImageElement&&Ae(e.target)&&(e.key==="Enter"||e.key===" ")){me(e);return}e.key!=="Enter"||!Ge({event:e})||me(e)}}function ye(e){const i=Ze(e.target);!i||!Ae(i)||!K(i.getAttribute("src")||"")||a(Y)?.handleCopy(e,i.getAttribute("src")||"")}function pe(e){const i=e.target;if(i instanceof HTMLElement)return i.closest("[data-panel-id]")?.dataset.panelId}Ht(()=>{H+=1,De()});var qe={get content(){return l()},set content(e){l(e),F()},get isStreaming(){return c()},set isStreaming(e=!1){c(e),F()},get className(){return u()},set className(e=""){u(e),F()},get workspaceId(){return s()},set workspaceId(e=it()?.workspaceId??void 0){s(e),F()},get relativeMediaBase(){return f()},set relativeMediaBase(e){f(e),F()},get onCodeBlockAction(){return _()},set onCodeBlockAction(e){_(e),F()},get onFileClick(){return I()},set onFileClick(e){I(e),F()},get canOpenFile(){return p()},set canOpenFile(e){p(e),F()},get allowFileMedia(){return k()},set allowFileMedia(e=!0){k(e),F()},get taskBlockRenderMode(){return v()},set taskBlockRenderMode(e="placeholder"){v(e),F()},get chatImageThumbnails(){return w()},set chatImageThumbnails(e=!1){w(e),F()},get forceExternalLinks(){return M()},set forceExternalLinks(e=!1){M(e),F()},get renderRichFencesAsCode(){return T()},set renderRichFencesAsCode(e=!1){T(e),F()},get renderDiagrams(){return C()},set renderDiagrams(e=!1){C(e),F()},get allowSanitizedHtml(){return t()},set allowSanitizedHtml(e=!1){t(e),F()},get media(){return d()},set media(e){d(e),F()},$set:ze,$on:(e,i)=>Be(o,e,i)},$e=Sr(),et=ie($e);{var Mt=e=>{var i=Lr();Wt(i,21,()=>a(E),Ut,(A,b)=>{var L=Re(),P=ie(L);{var S=N=>{yt(N,{get allowFileMedia(){return k()},get canOpenFile(){return p()},get source(){return a(b).source},get name(){return a(b).name},get poster(){return a(b).poster}})},ne=N=>{gt(N,{get content(){return a(b).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return f()},get onCodeBlockAction(){return _()},get onFileClick(){return I()},get canOpenFile(){return p()},get allowFileMedia(){return k()},get taskBlockRenderMode(){return v()},get chatImageThumbnails(){return w()},get forceExternalLinks(){return M()},get renderRichFencesAsCode(){return T()},get renderDiagrams(){return C()},get allowSanitizedHtml(){return t()},get media(){return d()}})};X(P,N=>{a(b).type==="video"?N(S):N(ne,-1)})}W(A,L)}),V(i),te(()=>le(i,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),W(e,i)},xt=e=>{var i=pt();let A;var b=q(i);tt(b,()=>a(g));var L=J(b,2);n(L),V(i),_e(i,P=>$?.(P)),_e(i,(P,S)=>ft?.(P,S),()=>({enabled:C(),workspaceId:s(),context:h})),te(()=>A=le(i,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",A,{"chat-image-thumbnails":w()})),ee("click",i,me),ee("keydown",i,Ie),ke("copy",i,ye),ee("contextmenu",i,Ee),ee("mouseover",i,Z),ee("focusin",i,Z),ke("mouseleave",i,Ce),W(e,i)},Ft=e=>{var i=Pr(),A=q(i),b=He(A,!0);V(i),te(()=>{le(i,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),Je(b,a(O))}),W(e,i)},Ct=e=>{var i=pt();let A;var b=q(i);tt(b,()=>a(g));var L=J(b,2);n(L),V(i),Te(i,P=>y(D,P),()=>a(D)),_e(i,P=>$?.(P)),_e(i,(P,S)=>ft?.(P,S),()=>({enabled:C(),workspaceId:s(),context:h})),te(()=>A=le(i,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",A,{"chat-image-thumbnails":w()})),ee("click",i,me),ee("keydown",i,Ie),ke("copy",i,ye),ee("contextmenu",i,Ee),ee("mouseover",i,Z),ee("focusin",i,Z),ke("mouseleave",i,Ce),W(e,i)};X(et,e=>{a(U)?e(Mt):c()?e(xt,1):a(ve)==="simple"&&!t()?e(Ft,2):e(Ct,-1)})}var Et=J(et,2);return Te(It(Et,{get workspaceId(){return s()},canUseMedia:K}),e=>y(ue,e,!0),()=>a(ue)),W(r,$e),Oe(qe)}Pt(["click","keydown","contextmenu","mouseover","focusin"]);export{yt as C,gt as M,At as a,wr as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,v as h,t as k}from"./PVXvIyE8.js";import{IX as s,vt as w}from"./BkzMrEqG.js";import{i as W,d as E,e as c,n as i,b as m}from"./
|
|
1
|
+
import{d as l,v as h,t as k}from"./PVXvIyE8.js";import{IX as s,vt as w}from"./BkzMrEqG.js";import{i as W,d as E,e as c,n as i,b as m}from"./n9HBJb8W.js";const A=new Set(["new","creating"]);function g(n){let t;try{t=decodeURIComponent(n)}catch{return null}return t.length===0||A.has(t)?null:t}function f(n){const t=/^\/workspace\/([^/?#]+)\/?(?:[?#].*)?$/.exec(n);return t?g(t[1]):null}function I(n){const t=/^\/workspace\/([^/?#]+)(?:[/?#].*)?$/.exec(n);return t?g(t[1]):null}function U(n,t){return t.length>0&&I(n)===t}function p(){return typeof window>"u"?null:window.location?.pathname??null}function d(n,t){const e=`/workspace/${encodeURIComponent(n)}`,a=t?new URLSearchParams(t).toString():"";return a?`${e}?${a}`:e}function R(n,t){const e=t?.presenceFollowRequestId;return e?w(n,e):w(n)}function P(n,t){return t?i(n,{state:t}):i(n)}function o(n){return n?.tabState?.currentTabId??null}async function S(n,t,e,a){m();const u=P(t,e),r={workspaceId:n,epoch:c(),startTabId:a};return await u,r}function b(n){return!n||W()||E()}function y(n,t){if(c()!==n.epoch||t!==n.startTabId&&t!==n.workspaceId)return!1;const e=p();return e===null||f(e)===n.workspaceId}async function v(n,t,e){if(b(n))return!1;const a=await S(n,t,e,o(s.state));return y(a,o(s.state))?(s.dispatch(R(n,e)),!0):!1}function*T(n,t,e){if(b(n))return!1;const a=o(yield*h(r=>r)),u=yield*l(S,n,t,e,a);return y(u,o(yield*h(r=>r)))?(yield*k(R(n,e)),!0):!1}function _(){m();const n=c(),t=o(s.state),e=p();return()=>c()===n&&o(s.state)===t&&p()===e}function O(n,t={}){return v(n,d(n,t.query),t.state)}function $(n,t={}){return T(n,d(n,t.query),t.state)}async function j(n){const t=f(n);t?await v(t,n,void 0):await i(n)}function*q(n){const t=f(n);t?yield*l(T,t,n,void 0):yield*l(i,n)}const J=Object.freeze(Object.defineProperty({__proto__:null,claimNavigation:_,navigateToAppRoute:j,navigateToAppRouteSaga:q,openAndShowWorkspace:O,showWorkspaceSaga:$,workspaceRoute:d},Symbol.toStringTag,{value:"Module"}));export{p as a,q as b,_ as c,$ as d,d as e,U as i,j as n,O as o,f as p,J as s,I as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./
|
|
1
|
+
import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./BPeXyR5m.js";import{b as Xt,l as Yt}from"./Dagg0ZW1.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&<[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+ft.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(L==Vt?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[L]||L,line:D.yylineno,loc:At,expected:ft})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+L);switch(B[0]){case 1:u.push(L),S.push(D.yytext),o.push(D.yylloc),u.push(B[1]),L=null,zt=D.yyleng,p=D.yytext,dt=D.yylineno,At=D.yylloc;break;case 2:if(N=this.productions_[B[1]][1],j.$=S[S.length-N],j._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},xi&&(j._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),wt=this.performAction.apply(j,[p,zt,dt,$.yy,B[1],S,o].concat(di)),typeof wt<"u")return wt;N&&(u=u.slice(0,-1*N*2),S=S.slice(0,-1*N),o=o.slice(0,-1*N)),u.push(this.productions_[B[1]][0]),S.push(j.$),o.push(j._$),Wt=lt[u[u.length-2]][u[u.length-1]],u.push(Wt);break;case 3:return!0}}return!0},"parse")},rt=(function(){var O={EOF:1,parseError:n(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:n(function(r,g){return this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var g=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),g=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as T,bo as r,bw as W,bq as S,b as $,bs as x}from"./AeC4KVgG.js";import{bs as B,cd as C,ca as
|
|
1
|
+
import{t as T,bo as r,bw as W,bq as S,b as $,bs as x}from"./AeC4KVgG.js";import{bs as B,cd as C,ca as D,a7 as u,ay as f,W as k,bn as q,aA as o}from"./CJxGDkBm.js";import{i as H}from"./k2awEenT.js";import{k as L}from"./HftJbvyF.js";import{a as X}from"./CffWzOD9.js";import{dD as j}from"./-5BGDZDk.js";import{IX as z,gS as E}from"./BkzMrEqG.js";function F(i,t){if(new.target)return T({component:F,...i});B(t,!0);const d=()=>x(g,"$workspace$",b),[b,w]=S();let c=r(t,"tab",7),a=r(t,"workspaceId",7),n=r(t,"layoutId",7),p=r(t,"isActive",7);const m=C(a());D(()=>m.set(a()));const g=j(m);var v={get tab(){return c()},set tab(e){c(e),o()},get workspaceId(){return a()},set workspaceId(e){a(e),o()},get layoutId(){return n()},set layoutId(e){n(e),o()},get isActive(){return p()},set isActive(e){p(e),o()},$set:W,$on:(e,s)=>$(t,e,s)},l=u(),_=f(l);{var y=e=>{var s=u(),A=f(s);L(A,a,h=>{X(h,{get workspace(){return d()},showBackToList:!1,onclose:()=>z.dispatch(E(n()??a(),c().id))})}),k(e,s)};H(_,e=>{p()&&d()&&e(y)})}k(i,l);var I=q(v);return w(),I}export{F as default};
|