@intent-hq/web 2.372.1 → 2.372.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{SSRyQIWE.js → -il6if-X.js} +1 -1
- package/web/app/immutable/chunks/{B-vPMZJe.js → 0PFbquWg.js} +1 -1
- package/web/app/immutable/chunks/{D7h3Dl5-.js → 2gbKHQXV.js} +1 -1
- package/web/app/immutable/chunks/{B2pOchvy.js → 3vi-OgRR.js} +1 -1
- package/web/app/immutable/chunks/{C9WFArWI.js → 4WFBPbig.js} +2 -2
- package/web/app/immutable/chunks/{D8PTjyMt.js → 64KJqioX.js} +1 -1
- package/web/app/immutable/chunks/{-A1Xt6t2.js → 8vt0w0gB.js} +1 -1
- package/web/app/immutable/chunks/{TET1QjU6.js → AzvtNQGc.js} +1 -1
- package/web/app/immutable/chunks/{B6jc-_sR.js → B3agx6Zv.js} +1 -1
- package/web/app/immutable/chunks/{CKEnN_Hn.js → B430oCRo.js} +1 -1
- package/web/app/immutable/chunks/{BbU8lQ23.js → B4N2SW_I.js} +1 -1
- package/web/app/immutable/chunks/{KwzSRF2d.js → B6OWzTDz.js} +1 -1
- package/web/app/immutable/chunks/{DFudQwu4.js → B77zwvv7.js} +1 -1
- package/web/app/immutable/chunks/{BEAj7h28.js → B8GoKZxM.js} +1 -1
- package/web/app/immutable/chunks/{DLR3Xiy1.js → B93aSOB6.js} +1 -1
- package/web/app/immutable/chunks/{CU2GkTBo.js → BAcZGd3g.js} +1 -1
- package/web/app/immutable/chunks/{kVZwUKh5.js → BDMD6FdT.js} +1 -1
- package/web/app/immutable/chunks/{D1S-BeW0.js → BFAXN_U2.js} +1 -1
- package/web/app/immutable/chunks/{DDRbr07B.js → BIZcpPtH.js} +1 -1
- package/web/app/immutable/chunks/{BJ8UpUx3.js → BMjTWq66.js} +1 -1
- package/web/app/immutable/chunks/{BRbooHVW.js → BQ0lhaiw.js} +1 -1
- package/web/app/immutable/chunks/{C8kqUaJu.js → BR-e1Dqz.js} +4 -4
- package/web/app/immutable/chunks/{BN7MhY13.js → BSXFgzj_.js} +1 -1
- package/web/app/immutable/chunks/{Dh6rqlVy.js → BbbO1mVP.js} +1 -1
- package/web/app/immutable/chunks/{CuiAAAM-.js → BiWBSez2.js} +2 -2
- package/web/app/immutable/chunks/{Cuk_Gihq.js → BjLzmoKu.js} +1 -1
- package/web/app/immutable/chunks/{BxNRSHj7.js → BjmThgx9.js} +3 -3
- package/web/app/immutable/chunks/{CTpG0iUn.js → BlPpu_gv.js} +1 -1
- package/web/app/immutable/chunks/{B-9Pvu6y.js → Bmgc_Vmk.js} +1 -1
- package/web/app/immutable/chunks/{DVuRO9FX.js → BpXYSrHL.js} +4 -4
- package/web/app/immutable/chunks/{VNZmrcSz.js → BuHIOAsb.js} +1 -1
- package/web/app/immutable/chunks/{C1elIQnx.js → Buf2XX2m.js} +1 -1
- package/web/app/immutable/chunks/{DaO8nz6N.js → Byc-Gwn1.js} +2 -2
- package/web/app/immutable/chunks/{EUqcNEWQ.js → C2f0QCtk.js} +1 -1
- package/web/app/immutable/chunks/{CJrtVlDG.js → C4tXJNlU.js} +1 -1
- package/web/app/immutable/chunks/{BRfr79MP.js → C5Ddrquv.js} +1 -1
- package/web/app/immutable/chunks/{CPI29I6f.js → C8F76z1j.js} +1 -1
- package/web/app/immutable/chunks/{D9sQ8qcN.js → C8GDR5mq.js} +1 -1
- package/web/app/immutable/chunks/{0A5oWXer.js → CBP_r2rZ.js} +1 -1
- package/web/app/immutable/chunks/{piULzuzd.js → CCr3GhwT.js} +1 -1
- package/web/app/immutable/chunks/{Cp6ekE_s.js → CEIGYgmC.js} +1 -1
- package/web/app/immutable/chunks/{Cp4OFkA0.js → CLkKOQIb.js} +1 -1
- package/web/app/immutable/chunks/{IcVyfKsD.js → CMR4RacT.js} +1 -1
- package/web/app/immutable/chunks/{zmWxChUq.js → CMd9xe_v.js} +1 -1
- package/web/app/immutable/chunks/{BD3toGAv.js → CNW9Rwes.js} +1 -1
- package/web/app/immutable/chunks/{DD1WD1M5.js → CNc8h__d.js} +1 -1
- package/web/app/immutable/chunks/{DuiyN7wg.js → CP03b_lt.js} +1 -1
- package/web/app/immutable/chunks/{Cqh6RRVt.js → CSUG4tUd.js} +2 -2
- package/web/app/immutable/chunks/{DiFC8Mk6.js → CVA75Jzf.js} +1 -1
- package/web/app/immutable/chunks/{C8e17gER.js → CXXobfG5.js} +1 -1
- package/web/app/immutable/chunks/{CVhHgrXf.js → C_MA8w30.js} +1 -1
- package/web/app/immutable/chunks/{C4Dbybcz.js → CbGkMYMi.js} +1 -1
- package/web/app/immutable/chunks/{DyVTwc41.js → CgyKOUjB.js} +1 -1
- package/web/app/immutable/chunks/{IpC95BdD.js → Ciyw1cDk.js} +1 -1
- package/web/app/immutable/chunks/{CuByX_yP.js → CjmicwNO.js} +1 -1
- package/web/app/immutable/chunks/Ck2JBj0W.js +3 -0
- package/web/app/immutable/chunks/{d4XsLpJr.js → CmfLCgYN.js} +1 -1
- package/web/app/immutable/chunks/{hlGimPBZ.js → CuNdhmq6.js} +1 -1
- package/web/app/immutable/chunks/{DEkD3je6.js → Cu_kcmjo.js} +1 -1
- package/web/app/immutable/chunks/{CrKTQysx.js → CvO597Pq.js} +1 -1
- package/web/app/immutable/chunks/{Dhb96fci.js → CwLBVHwC.js} +1 -1
- package/web/app/immutable/chunks/{Cc-PW4gv.js → CygNkso5.js} +1 -1
- package/web/app/immutable/chunks/{v3dlpdhZ.js → D-5xnKgT.js} +1 -1
- package/web/app/immutable/chunks/{ClsrgcJW.js → D0WHOKE3.js} +1 -1
- package/web/app/immutable/chunks/{DpBTZWt9.js → D4HebHoD.js} +1 -1
- package/web/app/immutable/chunks/{CJJs2g33.js → D4_8WlAX.js} +1 -1
- package/web/app/immutable/chunks/{TYee8CmD.js → D4p9bnGO.js} +1 -1
- package/web/app/immutable/chunks/{2EVipgJi.js → D73rJM26.js} +1 -1
- package/web/app/immutable/chunks/{B873lVHv.js → D7X_WaSL.js} +3 -3
- package/web/app/immutable/chunks/{ChUo22u6.js → D9E1Sed-.js} +3 -3
- package/web/app/immutable/chunks/{nPO4QUTk.js → D9ZsyNyz.js} +1 -1
- package/web/app/immutable/chunks/{vRnYB3t4.js → DAAshoKb.js} +1 -1
- package/web/app/immutable/chunks/{gFsMmW36.js → DL1rChoc.js} +1 -1
- package/web/app/immutable/chunks/{Oweeyv1v.js → DL9oF9R-.js} +1 -1
- package/web/app/immutable/chunks/{Dm3V_bi_.js → DO0YQnSr.js} +1 -1
- package/web/app/immutable/chunks/{fZM82vlq.js → DQITwHBm.js} +2 -2
- package/web/app/immutable/chunks/{QnlnDXiH.js → DSam4kPq.js} +2 -2
- package/web/app/immutable/chunks/{7UCN4F7m.js → DSviIBB2.js} +1 -1
- package/web/app/immutable/chunks/{CGprRn3S.js → DTl-epgW.js} +1 -1
- package/web/app/immutable/chunks/{D-Uz-39Z.js → DUnf3IJM.js} +1 -1
- package/web/app/immutable/chunks/{BiWJoWSv.js → DVkhmNxg.js} +3 -3
- package/web/app/immutable/chunks/{wUr2Clcr.js → DXT_tHZV.js} +3 -3
- package/web/app/immutable/chunks/{D7c2h2XU.js → DXq51U5Z.js} +1 -1
- package/web/app/immutable/chunks/{C7-pF3hJ.js → DZnf3Vcd.js} +1 -1
- package/web/app/immutable/chunks/{MUCe8vjx.js → D_yMjDjB.js} +6 -6
- package/web/app/immutable/chunks/{CtatSKin.js → DdfA1Cl6.js} +2 -2
- package/web/app/immutable/chunks/{CzTHqaDJ.js → DfvdR1t7.js} +13 -13
- package/web/app/immutable/chunks/{C3HJlgor.js → Di8laZBj.js} +1 -1
- package/web/app/immutable/chunks/{Bb_op89B.js → DjHgMTjl.js} +3 -3
- package/web/app/immutable/chunks/{DRbwhDjx.js → DlekFIEJ.js} +1 -1
- package/web/app/immutable/chunks/{jWqlu3Sf.js → DmNlyOFF.js} +2 -2
- package/web/app/immutable/chunks/{uh-AKdCH.js → DoGlKPs8.js} +1 -1
- package/web/app/immutable/chunks/{Demr6Qvy.js → DoKriIRg.js} +1 -1
- package/web/app/immutable/chunks/{CugIOLIa.js → DoUa1hTg.js} +1 -1
- package/web/app/immutable/chunks/{DXoCvZQl.js → DpqgMZNx.js} +1 -1
- package/web/app/immutable/chunks/{BUIz4Yba.js → Dqso2iIq.js} +1 -1
- package/web/app/immutable/chunks/{DVWpH0Ww.js → Dr_KWcsf.js} +1 -1
- package/web/app/immutable/chunks/{CvNJnDlW.js → DsATs4Yw.js} +3 -3
- package/web/app/immutable/chunks/{Bn_8JArX.js → DtPlbqlO.js} +1 -1
- package/web/app/immutable/chunks/{DlXO0azG.js → DumB3eQv.js} +1 -1
- package/web/app/immutable/chunks/{CFPreIC6.js → DyOuvQsx.js} +3 -3
- package/web/app/immutable/chunks/{CutJRErj.js → Dyda26aD.js} +1 -1
- package/web/app/immutable/chunks/{DBeNyp1m.js → Dz9187FZ.js} +1 -1
- package/web/app/immutable/chunks/{xs7GVnBi.js → DzXo18RQ.js} +1 -1
- package/web/app/immutable/chunks/{DkM2tUNb.js → FHdlPR2E.js} +1 -1
- package/web/app/immutable/chunks/{CiKM_Bkk.js → QJaPD5ja.js} +3 -3
- package/web/app/immutable/chunks/{QMZYeDiU.js → Smn45KEu.js} +1 -1
- package/web/app/immutable/chunks/{BtZepnY7.js → TWY-IEJw.js} +1 -1
- package/web/app/immutable/chunks/{DHk9xTTU.js → a_hFrVUs.js} +1 -1
- package/web/app/immutable/chunks/{DJPMh7Pg.js → eHy-2vQk.js} +1 -1
- package/web/app/immutable/chunks/{BbSguaMP.js → eWtOjdwZ.js} +1 -1
- package/web/app/immutable/chunks/{DAd8-v0C.js → ezsQjlt6.js} +1 -1
- package/web/app/immutable/chunks/{Be-tvUeZ.js → kRDyYnu-.js} +1 -1
- package/web/app/immutable/chunks/{BRIObpKH.js → lMYobXp7.js} +1 -1
- package/web/app/immutable/chunks/{vjUVG9_D.js → m5FEmsd9.js} +1 -1
- package/web/app/immutable/chunks/{BAy-IHSv.js → n1Mub_w4.js} +1 -1
- package/web/app/immutable/chunks/{D9uHbDgA.js → pO_uIUtS.js} +2 -2
- package/web/app/immutable/chunks/{D6QsCyM5.js → paBp5EDQ.js} +2 -2
- package/web/app/immutable/chunks/{BOj9vGyw.js → rUAQGuY9.js} +1 -1
- package/web/app/immutable/chunks/{BCAvwmcb.js → s5eSUTR7.js} +1 -1
- package/web/app/immutable/chunks/{DjmUoBsP.js → sppurVVE.js} +1 -1
- package/web/app/immutable/chunks/{Bc_WCBau.js → tDXv5z_U.js} +1 -1
- package/web/app/immutable/chunks/{DuvgBOgL.js → uMNoDmQ2.js} +1 -1
- package/web/app/immutable/chunks/{BQYZptYQ.js → xCNFDAsL.js} +1 -1
- package/web/app/immutable/chunks/{C-CEp48D.js → yc-ZA4uZ.js} +1 -1
- package/web/app/immutable/entry/{app.HXk4QgVW.js → app.DDy_f4Vr.js} +2 -2
- package/web/app/immutable/entry/start.CtWgyCM1.js +1 -0
- package/web/app/immutable/nodes/{0.C35VPs87.js → 0.BIgrj7tk.js} +1 -1
- package/web/app/immutable/nodes/{1.ZQ0mU96X.js → 1.BS4qG73n.js} +1 -1
- package/web/app/immutable/nodes/{10.Ba3bdQFj.js → 10.CoUmfWJP.js} +4 -4
- package/web/app/immutable/nodes/{11.ls9oXbQw.js → 11.Cp19-DaX.js} +1 -1
- package/web/app/immutable/nodes/{15.DwnvTlNj.js → 15._NKX_puo.js} +1 -1
- package/web/app/immutable/nodes/{19.ChdL9npo.js → 19.CrIpgdrd.js} +2 -2
- package/web/app/immutable/nodes/{2.CEHgYNfF.js → 2.B-ARMoF4.js} +4 -4
- package/web/app/immutable/nodes/{3.yDo-Jv4L.js → 3.CeiKZ0d6.js} +1 -1
- package/web/app/immutable/nodes/{4.BfGmTHCX.js → 4.-s0Jfvde.js} +1 -1
- package/web/app/immutable/nodes/{5.CdbvrG1H.js → 5.BIDxYMYJ.js} +1 -1
- package/web/app/immutable/nodes/{6.D-e34gg6.js → 6.3fDeScAq.js} +1 -1
- package/web/app/immutable/nodes/{7.DkqU_r1v.js → 7.DydkXABx.js} +1 -1
- package/web/app/immutable/nodes/{8.DXAWn9Y1.js → 8.DyQruTiJ.js} +1 -1
- package/web/app/immutable/nodes/{9.a_zRpwry.js → 9.D0w1njvH.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/Qqd9dQHZ.js +0 -3
- package/web/app/immutable/entry/start.okH3MvzT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,r as u,d as n}from"./
|
|
1
|
+
import{g as p,r as u,d as n}from"./DZnf3Vcd.js";import{p as f}from"./ezsQjlt6.js";import{b as a,ay as o}from"./BpXYSrHL.js";import{M as c,c as d}from"./2ypcXvW0.js";var v=d().RailroadAbnf.parser.LangiumParser,i=a(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=a(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=a(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=a(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=a(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=a(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=a(e=>{f(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(P(r)))},"populateDb"),R={parse:a(e=>{n.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:n}},w={parser:R,db:n,renderer:u,styles:p};export{w as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o,r as l,d as t}from"./
|
|
1
|
+
import{g as o,r as l,d as t}from"./DZnf3Vcd.js";import{p as m}from"./ezsQjlt6.js";import{b as n,ay as s}from"./BpXYSrHL.js";import{M as p,d as u}from"./2ypcXvW0.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),y=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),g={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),y(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:g,db:t,renderer:l,styles:o};export{h as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as tt}from"./
|
|
1
|
+
import{p as tt}from"./ezsQjlt6.js";import{U as et,aZ as at,V as rt,a_ as it,Y as nt,b0 as ot,b as l,ay as E,X as st,q as lt,aX as ct,aH as dt,d as I,B as gt,r as ht,aJ as pt,O as ft}from"./BpXYSrHL.js";import{p as ut}from"./2ypcXvW0.js";import{o as mt}from"./CBP_r2rZ.js";var vt=ft.pie,R={sections:new Map,showData:!1},b=R.sections,H=R.showData,St=structuredClone(vt),xt=l(()=>structuredClone(St),"getConfig"),wt=l(()=>{b=new Map,H=R.showData,ht()},"clear"),$t=l(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);b.has(t)||(b.set(t,a),E.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),Ct=l(()=>b,"getSections"),yt=l(t=>{H=t},"setShowData"),Dt=l(()=>H,"getShowData"),U={getConfig:xt,clear:wt,setDiagramTitle:ot,getDiagramTitle:nt,setAccTitle:it,getAccTitle:rt,setAccDescription:at,getAccDescription:et,addSection:$t,getSections:Ct,setShowData:yt,getShowData:Dt},bt=l((t,a)=>{tt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:l(async t=>{const a=await ut("pie",t);E.debug(a),bt(a,U)},"parse")},At=l(t=>`
|
|
2
2
|
.pieCircle{
|
|
3
3
|
stroke: ${t.pieStrokeColor};
|
|
4
4
|
stroke-width : ${t.pieStrokeWidth};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{bm as o,t as st,bo as K,bw as nt,b as ot,bq as Ft,bs as Fe,_ as Ut}from"./ClpAEjbe.js";import{bs as it,a5 as f,aD as t,bA as v,b_ as T,W as y,bn as ct,c9 as k,aA as H,aB as S,ca as Ue,bk as Vt,c6 as Yt,cd as Ie,bV as Gt,bS as g,ay as ge,bl as M,bO as N}from"./CJxGDkBm.js";import{i as $}from"./wmcYjLAa.js";import{e as Ve,g as Ye}from"./BwASeArv.js";import{c as Qt,e as Jt,f as lt,g as Xt,s as x}from"./CnGVh7I3.js";import{aZ as Zt,d7 as ea,X as ta,aH as aa,dA as ra,a3 as sa,dE as dt}from"./D9Ykl3eH.js";import{t as Ge}from"./DAsc1V4f.js";import{b as na,A as oa}from"./Dd5ei__B.js";import{l as Qe}from"./CvNJnDlW.js";import{aM as ia,aJ as ca,aK as Je,a0 as la}from"./b89lNINv.js";import{S as le}from"./B06RKBOm.js";import"./CPDV_dyu.js";import{f as Xe}from"./BVi5KkOP.js";import{l as B,n as da}from"./By588DV1.js";import{s9 as ut,Jq as W,mM as ua,fU as pa,nI as va,uZ as ma,c as _a,wz as ga,tC as fa,rS as wa}from"./CpP1PKzF.js";import{c as ba}from"./ChTqQfQN.js";import{o as ka}from"./DHk9xTTU.js";import{aR as ha,aS as Ze,bC as ya,aB as xa,bB as Sa,aG as Aa,d3 as Ca,cT as Ra,F as fe,ay as et,bK as qa}from"./CtJxHvGv.js";import{selectCurrentWorkspaceTabId as Ia}from"./DujUyPvo.js";import{p as Pa}from"./DJPMh7Pg.js";import{i as Ma}from"./BiWJoWSv.js";const Na=new Set(["failed","blocked","needs_attention","in_progress"]),Wa={failed:{visual:"icon",icon:Ra,className:"text-foreground"},blocked:{visual:"icon",icon:Ca,className:"text-danger"},needs_attention:{visual:"icon",icon:Aa,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Sa,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:xa,className:"text-success"},pr_queued:{visual:"icon",icon:ya,className:"text-info"},pr_ready:{visual:"icon",icon:Ze,className:"text-success"},pr_open:{visual:"icon",icon:Ze,className:"text-info"},pr_merged:{visual:"icon",icon:ha,className:"text-purple-500"}};function Ta(r){switch(r){case"failed":return o.workspace_statusIcon_failed_label();case"blocked":return o.workspace_statusIcon_blocked_label();case"needs_attention":return o.workspace_statusIcon_needsAttention_label();case"in_progress":return o.workspace_statusIcon_inProgress_label();case"waiting":return o.workspace_taskStatus_waiting_label();case"unread":return o.layout_activeCard_unread_header();case"not_started":return o.workspace_statusIcon_notStarted_label();case"idle":return o.workspace_statusIcon_idle_label();case"complete":return o.workspace_statusIcon_complete_label();case"pr_queued":return o.workspace_statusIcon_prQueued_label();case"pr_ready":return o.workspace_statusIcon_prReady_label();case"pr_open":return o.workspace_statusIcon_prOpen_label();case"pr_merged":return o.workspace_statusIcon_prMerged_label()}}function Oa(r){const n=ut(r.displayStatus)?r.displayStatus:"not_started";return Na.has(n)?n:r.attention==="unread"?"unread":r.waiting===!0?"waiting":n}function pt(r){const n=r==="waiting"||r==="unread"||ut(r)?r:"not_started",b=Ta(n);return{state:n,...Wa[n],label:b,tooltip:b,accessibleName:b}}var Da=S('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),Ea=S("<span><!></span>");function vt(r,n){if(new.target)return st({component:vt,...r});it(n,!0);let b=K(n,"status",7),m=K(n,"size",7,14),w=K(n,"decorative",7,!1),u=K(n,"class",7);const i=k(()=>pt(b()));var a={get status(){return b()},set status(_){b(_),H()},get size(){return m()},set size(_=14){m(_),H()},get decorative(){return w()},set decorative(_=!1){w(_),H()},get class(){return u()},set class(_){u(_),H()},$set:nt,$on:(_,G)=>ot(n,_,G)},p=Ea(),re=f(p);{var se=_=>{var G=Da();y(_,G)},ne=_=>{fe(_,{get icon(){return t(i).icon},class:"size-full!"})};$(re,_=>{t(i).visual==="dot"?_(se):t(i).icon&&_(ne,1)})}return v(p),T(_=>{lt(p,1,_,"svelte-14zk5l0"),Xt(p,`width: ${m()??""}px; height: ${m()??""}px;`),x(p,"role",w()?void 0:"img"),x(p,"aria-label",w()?void 0:t(i).accessibleName),x(p,"aria-hidden",w()?"true":void 0),x(p,"title",w()?void 0:t(i).tooltip),x(p,"data-workspace-status",t(i).state),x(p,"data-workspace-status-visual",t(i).visual),x(p,"data-workspace-status-icon",t(i).icon?.iconName)},[()=>Qt(Jt("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",t(i).className,u()))]),y(r,p),ct(a)}const Me=6e4,Ne=60*Me,We=24*Ne,tt=30*We;function La(r,n=new Date){if(r==null)return null;const b=r instanceof Date?r:new Date(r),m=b.getTime(),w=n.getTime();if(!Number.isFinite(m)||!Number.isFinite(w))return null;const u=Math.max(0,w-m);let i;u<Me?i="<1m":u<Ne?i=`${B(Math.floor(u/Me))}m`:u<We?i=`${B(Math.floor(u/Ne))}h`:u<tt?i=`${B(Math.floor(u/We))}d`:i=`${B(Math.floor(u/tt))}mo`;const a=m>w?n:b,p=da(a,{now:n});return p?{compact:i,accessible:p,dateTime:b.toISOString()}:null}var $a=S('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),Ka=S('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),Ha=S('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),Ba=S('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),at=S('<div role="listitem"><!></div>'),za=S('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),ja=S('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),Fa=S('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),Ua=S('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),Va=S('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),Ya=S('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),Ga=S('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),Qa=S('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),Ja=S('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function Xa(r,n){if(new.target)return st({component:Xa,...r});it(n,!0);const b=()=>Fe(gt,"$workspaceAgents$",w),m=()=>Fe(ft,"$prMonitors$",w),[w,u]=Ft(),i=ba("WorkspaceHoverCard");let a=K(n,"workspace",7),p=K(n,"isLoading",7,!1),re=K(n,"activeAgentIds",23,()=>[]),se=K(n,"loadAgentSessions",7,!0),ne=K(n,"onkeydown",7),_=K(n,"staticData",7,!1);const G=Ie("");function mt(){return _()?Ie([]):Zt(G)}function _t(){return _()?Ie([]):ea(G)}const gt=mt(),ft=_t();Ue(()=>G.set(a()?.id??""));let Te=Gt(0);Vt(()=>Qe.subscribe(()=>Yt(Te)));let wt=k(()=>a()?.agentSummary?.agentIds??[]),Oe=k(()=>(t(Te),a()?Qe.getStreamingAgentIdsForWorkspace(a().id):[])),De=null,we=new Set;Ue(()=>{if(!a()||!se())return;const e=String(a().id);De!==e&&(De=e,we=new Set);for(const c of new Set([...t(wt).slice(0,6),...re(),...t(Oe)]))we.has(c)||(W.dispatch(ua(e,c)),we.add(c))});function bt(e){return[e.name,e.context,e.questionMeta?.accessible,e.updated.accessible].filter(Boolean).join(". ")}function kt(e){return e?e.kind==="attention"?e.attention.reason?.trim()||null:"text"in e&&e.text.trim()||null:null}function ht(e){return La(e.lastActivity||e.updatedAt||e.createdAt)??{compact:"—",accessible:o.workspace_hoverCard_noRecentActivity_label()}}function yt(e){const c=String(e.status).toLowerCase(),l=va(e),h=na(e),E=h==="question"?ia(e):null,q=kt(aa.select(W.state,String(e.id)));let I,z,P,A,O,J,j=!1;if(h==="question"){I="attention",z="question",P=E?.questions[0]?.question.trim()||q||o.workspace_hoverCard_question_label(),A="question",O=1;const de=E?.questions.length??0;de>1&&(J={compact:`${B(1)}/${B(de)}`,accessible:o.chat_questionWizard_stepCounter_label({current:1,total:de})})}else if(h==="attention-discussion")I="attention",z="discussion",P=l?.reason?.trim()||o.chat_agentCard_attentionDiscussion_label(),A="attention-discussion",O=1;else if(h==="attention-blocker"||c==="blocked")I="attention",z="blocker",P=l?.reason?.trim()||o.chat_agentCard_attentionBlocker_label(),A="attention-blocker",O=0;else if(e.hasUnread)I="attention",z="unread",P=q||o.chat_newMessagesDivider_label(),j=!!q,A="unread",O=2;else if(e.isStreaming||e.isProcessing||re().includes(String(e.id))||t(Oe).includes(String(e.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(c))I="active",P=q||o.workspace_devScripts_running_label(),j=!!q,A=e.isProcessing?"responding":"running",O=3;else if(["waiting","pending","queued","starting"].includes(c))I="waiting",P=q||o.workspace_taskStatus_waiting_label(),j=!!q,A="waiting",O=4;else return null;const ye=e.agentMetadata??e.metadata;return{id:String(e.id),name:e.name?.trim()||o.workspace_fileChanges_agent_label(),group:I,attentionKind:z,avatarState:A,specialist:ye?.specialist,context:P,questionMeta:J,contextIsPreview:j,updated:ht(e),priority:O}}let xt=k(()=>{const e=a()?.agentSummary,c=new Map;if(Array.isArray(e?.agents))for(const l of e.agents)l&&typeof l=="object"&&typeof l.id=="string"&&c.set(l.id,l.parentAgentId);return b().filter(l=>{const h=c.get(String(l.id));return!(pa(l)!=="topLevel"||typeof h=="string"&&h||l.pendingDeleteAt||l.retiredAt||String(l.status).toLowerCase()==="deleted")})}),be=k(()=>t(xt).map(yt).filter(e=>e!==null).sort((e,c)=>e.priority-c.priority)),St=k(()=>t(be).slice(0,6)),Ee=k(()=>Math.max(0,t(be).length-6)),At=k(()=>a()?.repositoryName?a().repositoryOwner?`${a().repositoryOwner} / ${a().repositoryName}`:a().repositoryName:o.workspace_hoverCard_localRepository_label()),Le=k(()=>Oa(a()??{})),Ct=k(()=>pt(t(Le))),ke=k(()=>a()?.statusMessage?.trim()||"");function $e(e){if(!e)return null;const c=e.activePullRequest??e.pullRequests?.[0]??null;return c||(e.prStatus?{id:`legacy-pr-${e.prNumber??"workspace"}`,number:e.prNumber??0,url:e.prUrl??"",title:o.workspace_hoverCard_pullRequest_label(),status:e.prStatus,createdAt:e.updatedAt,updatedAt:e.updatedAt}:null)}let Rt=k(()=>a()?_()?$e(a()):ra.select(W.state,a().id)??$e(a()):null),Q=k(()=>{if(!a()||ta(a()))return[];const e=a().repositoryOwner&&a().repositoryName?`${a().repositoryOwner}/${a().repositoryName}`:void 0;return Ma({workspacePRs:a().pullRequests,activePR:t(Rt),monitors:m(),workspaceRepo:e,buildPrUrl:(c,l)=>Pa(c,a().repositoryOwner,a().repositoryName,l),getDisplayTitle:c=>c.title})}),qt=k(()=>t(Q).slice(0,3)),Ke=k(()=>Math.max(0,t(Q).length-3)),He=k(()=>t(be).length>0),Be=k(()=>t(Q).length>0),ze=k(()=>t(He)||t(Be));function je(e){const c=e.resource?.repository.provider==="gitlab"?`${e.repo} !${e.number}`:e.repo?o.workspace_card_prBadge_repoLine_tooltip({repo:e.repo,number:e.number}):o.workspace_card_prBadge_label({number:` #${e.number}`});return[sa(c,e),e.title,e.details].filter(Boolean).join(`
|
|
3
|
-
`)}function It(e,c){if(e.stopPropagation(),!a()||!se())return;const l=a().id;Ia.select(W.state)!==l&&ka(l).catch(h=>{i.warn("Failed to switch workspace for hover-card agent",{agentId:c,error:h})}),W.dispatch(ma(l,{agentId:c}))}function Pt(e,c){if(e.stopPropagation(),!a()||!c.url)return;const l=a().id;Ut(async()=>{const{handleLink:h}=await import("./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/paBp5EDQ.js","/app/immutable/chunks/ClpAEjbe.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/CpP1PKzF.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgBcONKs.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/WSVFXKpL.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CVA75Jzf.js","/app/immutable/chunks/C1zxTHwk.js","/app/immutable/chunks/wmcYjLAa.js","/app/immutable/chunks/CnGVh7I3.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BVi5KkOP.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/BwASeArv.js","/app/immutable/chunks/CPDV_dyu.js","/app/immutable/chunks/BejTxFyR.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DSqSJXGX.js","/app/immutable/chunks/Xh71Wbuh.js","/app/immutable/chunks/By588DV1.js","/app/immutable/chunks/BeYVt6Wg.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/CtJxHvGv.js","/app/immutable/chunks/oXpJ1LFx.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/D9Ykl3eH.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CTV49dzf.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/pO_uIUtS.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/b89lNINv.js","/app/immutable/chunks/DujUyPvo.js","/app/immutable/chunks/ByoP16rr.js","/app/immutable/chunks/C5TH9nNS.js","/app/immutable/chunks/B6-GEB4b.js","/app/immutable/chunks/B5aYN90J.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bm as o,t as st,bo as K,bw as nt,b as ot,bq as Ft,bs as Fe,_ as Ut}from"./ClpAEjbe.js";import{bs as it,a5 as f,aD as t,bA as v,b_ as T,W as y,bn as ct,c9 as k,aA as H,aB as S,ca as Ue,bk as Vt,c6 as Yt,cd as Ie,bV as Gt,bS as g,ay as ge,bl as M,bO as N}from"./CJxGDkBm.js";import{i as $}from"./wmcYjLAa.js";import{e as Ve,g as Ye}from"./BwASeArv.js";import{c as Qt,e as Jt,f as lt,g as Xt,s as x}from"./CnGVh7I3.js";import{aZ as Zt,d7 as ea,X as ta,aH as aa,dA as ra,a3 as sa,dE as dt}from"./D9Ykl3eH.js";import{t as Ge}from"./DAsc1V4f.js";import{b as na,A as oa}from"./Dd5ei__B.js";import{l as Qe}from"./DsATs4Yw.js";import{aM as ia,aJ as ca,aK as Je,a0 as la}from"./b89lNINv.js";import{S as le}from"./B06RKBOm.js";import"./CPDV_dyu.js";import{f as Xe}from"./BVi5KkOP.js";import{l as B,n as da}from"./By588DV1.js";import{s9 as ut,Jq as W,mM as ua,fU as pa,nI as va,uZ as ma,c as _a,wz as ga,tC as fa,rS as wa}from"./CpP1PKzF.js";import{c as ba}from"./ChTqQfQN.js";import{o as ka}from"./a_hFrVUs.js";import{aR as ha,aS as Ze,bC as ya,aB as xa,bB as Sa,aG as Aa,d3 as Ca,cT as Ra,F as fe,ay as et,bK as qa}from"./CtJxHvGv.js";import{selectCurrentWorkspaceTabId as Ia}from"./DujUyPvo.js";import{p as Pa}from"./eHy-2vQk.js";import{i as Ma}from"./DVkhmNxg.js";const Na=new Set(["failed","blocked","needs_attention","in_progress"]),Wa={failed:{visual:"icon",icon:Ra,className:"text-foreground"},blocked:{visual:"icon",icon:Ca,className:"text-danger"},needs_attention:{visual:"icon",icon:Aa,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Sa,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:xa,className:"text-success"},pr_queued:{visual:"icon",icon:ya,className:"text-info"},pr_ready:{visual:"icon",icon:Ze,className:"text-success"},pr_open:{visual:"icon",icon:Ze,className:"text-info"},pr_merged:{visual:"icon",icon:ha,className:"text-purple-500"}};function Ta(r){switch(r){case"failed":return o.workspace_statusIcon_failed_label();case"blocked":return o.workspace_statusIcon_blocked_label();case"needs_attention":return o.workspace_statusIcon_needsAttention_label();case"in_progress":return o.workspace_statusIcon_inProgress_label();case"waiting":return o.workspace_taskStatus_waiting_label();case"unread":return o.layout_activeCard_unread_header();case"not_started":return o.workspace_statusIcon_notStarted_label();case"idle":return o.workspace_statusIcon_idle_label();case"complete":return o.workspace_statusIcon_complete_label();case"pr_queued":return o.workspace_statusIcon_prQueued_label();case"pr_ready":return o.workspace_statusIcon_prReady_label();case"pr_open":return o.workspace_statusIcon_prOpen_label();case"pr_merged":return o.workspace_statusIcon_prMerged_label()}}function Oa(r){const n=ut(r.displayStatus)?r.displayStatus:"not_started";return Na.has(n)?n:r.attention==="unread"?"unread":r.waiting===!0?"waiting":n}function pt(r){const n=r==="waiting"||r==="unread"||ut(r)?r:"not_started",b=Ta(n);return{state:n,...Wa[n],label:b,tooltip:b,accessibleName:b}}var Da=S('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),Ea=S("<span><!></span>");function vt(r,n){if(new.target)return st({component:vt,...r});it(n,!0);let b=K(n,"status",7),m=K(n,"size",7,14),w=K(n,"decorative",7,!1),u=K(n,"class",7);const i=k(()=>pt(b()));var a={get status(){return b()},set status(_){b(_),H()},get size(){return m()},set size(_=14){m(_),H()},get decorative(){return w()},set decorative(_=!1){w(_),H()},get class(){return u()},set class(_){u(_),H()},$set:nt,$on:(_,G)=>ot(n,_,G)},p=Ea(),re=f(p);{var se=_=>{var G=Da();y(_,G)},ne=_=>{fe(_,{get icon(){return t(i).icon},class:"size-full!"})};$(re,_=>{t(i).visual==="dot"?_(se):t(i).icon&&_(ne,1)})}return v(p),T(_=>{lt(p,1,_,"svelte-14zk5l0"),Xt(p,`width: ${m()??""}px; height: ${m()??""}px;`),x(p,"role",w()?void 0:"img"),x(p,"aria-label",w()?void 0:t(i).accessibleName),x(p,"aria-hidden",w()?"true":void 0),x(p,"title",w()?void 0:t(i).tooltip),x(p,"data-workspace-status",t(i).state),x(p,"data-workspace-status-visual",t(i).visual),x(p,"data-workspace-status-icon",t(i).icon?.iconName)},[()=>Qt(Jt("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",t(i).className,u()))]),y(r,p),ct(a)}const Me=6e4,Ne=60*Me,We=24*Ne,tt=30*We;function La(r,n=new Date){if(r==null)return null;const b=r instanceof Date?r:new Date(r),m=b.getTime(),w=n.getTime();if(!Number.isFinite(m)||!Number.isFinite(w))return null;const u=Math.max(0,w-m);let i;u<Me?i="<1m":u<Ne?i=`${B(Math.floor(u/Me))}m`:u<We?i=`${B(Math.floor(u/Ne))}h`:u<tt?i=`${B(Math.floor(u/We))}d`:i=`${B(Math.floor(u/tt))}mo`;const a=m>w?n:b,p=da(a,{now:n});return p?{compact:i,accessible:p,dateTime:b.toISOString()}:null}var $a=S('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),Ka=S('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),Ha=S('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),Ba=S('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),at=S('<div role="listitem"><!></div>'),za=S('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),ja=S('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),Fa=S('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),Ua=S('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),Va=S('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),Ya=S('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),Ga=S('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),Qa=S('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),Ja=S('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function Xa(r,n){if(new.target)return st({component:Xa,...r});it(n,!0);const b=()=>Fe(gt,"$workspaceAgents$",w),m=()=>Fe(ft,"$prMonitors$",w),[w,u]=Ft(),i=ba("WorkspaceHoverCard");let a=K(n,"workspace",7),p=K(n,"isLoading",7,!1),re=K(n,"activeAgentIds",23,()=>[]),se=K(n,"loadAgentSessions",7,!0),ne=K(n,"onkeydown",7),_=K(n,"staticData",7,!1);const G=Ie("");function mt(){return _()?Ie([]):Zt(G)}function _t(){return _()?Ie([]):ea(G)}const gt=mt(),ft=_t();Ue(()=>G.set(a()?.id??""));let Te=Gt(0);Vt(()=>Qe.subscribe(()=>Yt(Te)));let wt=k(()=>a()?.agentSummary?.agentIds??[]),Oe=k(()=>(t(Te),a()?Qe.getStreamingAgentIdsForWorkspace(a().id):[])),De=null,we=new Set;Ue(()=>{if(!a()||!se())return;const e=String(a().id);De!==e&&(De=e,we=new Set);for(const c of new Set([...t(wt).slice(0,6),...re(),...t(Oe)]))we.has(c)||(W.dispatch(ua(e,c)),we.add(c))});function bt(e){return[e.name,e.context,e.questionMeta?.accessible,e.updated.accessible].filter(Boolean).join(". ")}function kt(e){return e?e.kind==="attention"?e.attention.reason?.trim()||null:"text"in e&&e.text.trim()||null:null}function ht(e){return La(e.lastActivity||e.updatedAt||e.createdAt)??{compact:"—",accessible:o.workspace_hoverCard_noRecentActivity_label()}}function yt(e){const c=String(e.status).toLowerCase(),l=va(e),h=na(e),E=h==="question"?ia(e):null,q=kt(aa.select(W.state,String(e.id)));let I,z,P,A,O,J,j=!1;if(h==="question"){I="attention",z="question",P=E?.questions[0]?.question.trim()||q||o.workspace_hoverCard_question_label(),A="question",O=1;const de=E?.questions.length??0;de>1&&(J={compact:`${B(1)}/${B(de)}`,accessible:o.chat_questionWizard_stepCounter_label({current:1,total:de})})}else if(h==="attention-discussion")I="attention",z="discussion",P=l?.reason?.trim()||o.chat_agentCard_attentionDiscussion_label(),A="attention-discussion",O=1;else if(h==="attention-blocker"||c==="blocked")I="attention",z="blocker",P=l?.reason?.trim()||o.chat_agentCard_attentionBlocker_label(),A="attention-blocker",O=0;else if(e.hasUnread)I="attention",z="unread",P=q||o.chat_newMessagesDivider_label(),j=!!q,A="unread",O=2;else if(e.isStreaming||e.isProcessing||re().includes(String(e.id))||t(Oe).includes(String(e.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(c))I="active",P=q||o.workspace_devScripts_running_label(),j=!!q,A=e.isProcessing?"responding":"running",O=3;else if(["waiting","pending","queued","starting"].includes(c))I="waiting",P=q||o.workspace_taskStatus_waiting_label(),j=!!q,A="waiting",O=4;else return null;const ye=e.agentMetadata??e.metadata;return{id:String(e.id),name:e.name?.trim()||o.workspace_fileChanges_agent_label(),group:I,attentionKind:z,avatarState:A,specialist:ye?.specialist,context:P,questionMeta:J,contextIsPreview:j,updated:ht(e),priority:O}}let xt=k(()=>{const e=a()?.agentSummary,c=new Map;if(Array.isArray(e?.agents))for(const l of e.agents)l&&typeof l=="object"&&typeof l.id=="string"&&c.set(l.id,l.parentAgentId);return b().filter(l=>{const h=c.get(String(l.id));return!(pa(l)!=="topLevel"||typeof h=="string"&&h||l.pendingDeleteAt||l.retiredAt||String(l.status).toLowerCase()==="deleted")})}),be=k(()=>t(xt).map(yt).filter(e=>e!==null).sort((e,c)=>e.priority-c.priority)),St=k(()=>t(be).slice(0,6)),Ee=k(()=>Math.max(0,t(be).length-6)),At=k(()=>a()?.repositoryName?a().repositoryOwner?`${a().repositoryOwner} / ${a().repositoryName}`:a().repositoryName:o.workspace_hoverCard_localRepository_label()),Le=k(()=>Oa(a()??{})),Ct=k(()=>pt(t(Le))),ke=k(()=>a()?.statusMessage?.trim()||"");function $e(e){if(!e)return null;const c=e.activePullRequest??e.pullRequests?.[0]??null;return c||(e.prStatus?{id:`legacy-pr-${e.prNumber??"workspace"}`,number:e.prNumber??0,url:e.prUrl??"",title:o.workspace_hoverCard_pullRequest_label(),status:e.prStatus,createdAt:e.updatedAt,updatedAt:e.updatedAt}:null)}let Rt=k(()=>a()?_()?$e(a()):ra.select(W.state,a().id)??$e(a()):null),Q=k(()=>{if(!a()||ta(a()))return[];const e=a().repositoryOwner&&a().repositoryName?`${a().repositoryOwner}/${a().repositoryName}`:void 0;return Ma({workspacePRs:a().pullRequests,activePR:t(Rt),monitors:m(),workspaceRepo:e,buildPrUrl:(c,l)=>Pa(c,a().repositoryOwner,a().repositoryName,l),getDisplayTitle:c=>c.title})}),qt=k(()=>t(Q).slice(0,3)),Ke=k(()=>Math.max(0,t(Q).length-3)),He=k(()=>t(be).length>0),Be=k(()=>t(Q).length>0),ze=k(()=>t(He)||t(Be));function je(e){const c=e.resource?.repository.provider==="gitlab"?`${e.repo} !${e.number}`:e.repo?o.workspace_card_prBadge_repoLine_tooltip({repo:e.repo,number:e.number}):o.workspace_card_prBadge_label({number:` #${e.number}`});return[sa(c,e),e.title,e.details].filter(Boolean).join(`
|
|
3
|
+
`)}function It(e,c){if(e.stopPropagation(),!a()||!se())return;const l=a().id;Ia.select(W.state)!==l&&ka(l).catch(h=>{i.warn("Failed to switch workspace for hover-card agent",{agentId:c,error:h})}),W.dispatch(ma(l,{agentId:c}))}function Pt(e,c){if(e.stopPropagation(),!a()||!c.url)return;const l=a().id;Ut(async()=>{const{handleLink:h}=await import("./paBp5EDQ.js").then(E=>E.l);return{handleLink:h}},__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]),import.meta.url).then(({handleLink:h})=>h(c.url,{workspaceId:l,event:e}))}var Mt={get workspace(){return a()},set workspace(e){a(e),H()},get isLoading(){return p()},set isLoading(e=!1){p(e),H()},get activeAgentIds(){return re()},set activeAgentIds(e=[]){re(e),H()},get loadAgentSessions(){return se()},set loadAgentSessions(e=!0){se(e),H()},get onkeydown(){return ne()},set onkeydown(e){ne(e),H()},get staticData(){return _()},set staticData(e=!1){_(e),H()},$set:nt,$on:(e,c)=>ot(n,e,c)},he=Ja(),Nt=f(he);{var Wt=e=>{var c=$a(),l=f(c),h=f(l),E=f(h);le(E,{class:"h-7 min-w-0 max-w-64 flex-1"});var q=g(E,2);le(q,{class:"h-5 w-20 shrink-0"}),v(h);var I=g(h,2);le(I,{class:"h-4 w-40"});var z=g(I,2);le(z,{class:"mt-2 h-10 w-full"}),v(l);var P=g(l,4),A=f(P),O=f(A);le(O,{class:"h-10 w-full"}),v(A);var J=g(A,2),j=f(J);le(j,{class:"h-10 w-full"}),v(J),v(P),v(c),y(e,c)},Tt=e=>{var c=Qa(),l=ge(c);let h;var E=f(l),q=f(E),I=f(q),z=M(I,!0),P=g(I,2),A=f(P),O=M(A,!0),J=g(A);vt(J,{get status(){return t(Le)},size:16,decorative:!0}),v(P),v(q);var j=g(q,2),ye=M(j,!0),de=g(j,2);{var Dt=F=>{var oe=Ka(),me=M(oe,!0);Ve(oe,(_e,xe)=>Ge?.(_e,xe),()=>t(ke)),T(()=>N(me,t(ke))),y(F,oe)};$(de,F=>{t(ke)&&F(Dt)})}v(E),v(l);var Et=g(l,2);{var Lt=F=>{var oe=Ga(),me=g(ge(oe),2),_e=f(me);{var xe=X=>{var U=ja(),Y=f(U);Ye(Y,21,()=>t(St),d=>d.id,(d,s)=>{var C=at(),Z=f(C);{let ee=k(()=>bt(t(s)));Xe(Z,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return t(ee)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return t(s).group},get"data-attention-kind"(){return t(s).attentionKind},get onkeydown(){return ne()},onclick:V=>It(V,t(s).id),children:(V,ue)=>{var D=Ba(),R=ge(D),L=f(R);{let ae=k(()=>t(s).specialist??null);oa(L,{get agentId(){return t(s).id},variant:"compact",get state(){return t(s).avatarState},get specialist(){return t(ae)}})}v(R);var ie=g(R),Ce=M(ie,!0),te=g(ie),Re=M(te,!0),pe=g(te,2),ve=f(pe),qe=M(ve,!0);Ve(ve,(ae,ce)=>Ge?.(ae,ce),()=>t(s).context);var Ht=g(ve);{var Bt=ae=>{var ce=Ha(),zt=f(ce),jt=M(zt,!0);v(ce),T(()=>{x(ce,"aria-label",t(s).questionMeta.accessible),N(jt,t(s).questionMeta.compact)}),y(ae,ce)};$(Ht,ae=>{t(s).questionMeta&&ae(Bt)})}v(pe),T(()=>{N(Ce,t(s).name),x(te,"datetime",t(s).updated.dateTime),x(te,"aria-label",t(s).updated.accessible),N(Re,t(s).updated.compact),x(pe,"data-workspace-hover-card-agent-preview",t(s).contextIsPreview||void 0),N(qe,t(s).context)}),y(V,D)},$$slots:{default:!0}})}v(C),y(d,C)}),v(Y);var Se=g(Y,2);{var Ae=d=>{var s=za(),C=f(s),Z=M(C,!0),ee=g(C,2);fe(ee,{get icon(){return et},size:10}),v(s),T(V=>N(Z,V),[()=>o.workspace_hoverCard_moreAgents_label({count:B(t(Ee))})]),y(d,s)};$(Se,d=>{t(Ee)&&d(Ae)})}v(U),T(d=>x(U,"aria-label",d),[()=>o.workspace_multiSelectSidebar_agentsTab_label()]),y(X,U)};$(_e,X=>{t(He)&&X(xe)})}var $t=g(_e,2);{var Kt=X=>{var U=Ya(),Y=f(U);Ye(Y,21,()=>t(qt),d=>d.identity,(d,s)=>{var C=at();{const ue=D=>{var R=Fa(),L=ge(R);fe(L,{get icon(){return t(s).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${t(s).foregroundClass??""}`}});var ie=g(L,2),Ce=M(ie,!0),te=g(ie,2),Re=M(te,!0),pe=g(te,2),ve=M(pe,!0);T(qe=>{N(Ce,qe),N(Re,t(s).accessibleStateLabel),N(ve,t(s).numberLabel??`#${t(s).number}`)},[()=>t(s).title||(t(s).resource?.repository.provider==="gitlab"?o.workspace_hoverCard_mergeRequest_label():o.workspace_hoverCard_pullRequest_label())]),y(D,R)};var Z=f(C);{var ee=D=>{{let R=k(()=>je(t(s)));Xe(D,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return t(R)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return t(s).identity},get"data-pr-status"(){return t(s).status},get onkeydown(){return ne()},onclick:L=>Pt(L,t(s)),children:(L,ie)=>{ue(L)},$$slots:{default:!0}})}},V=D=>{var R=Ua(),L=f(R);ue(L),v(R),T(()=>{x(R,"data-pr-identity",t(s).identity),x(R,"data-pr-status",t(s).status)}),y(D,R)};$(Z,D=>{t(s).url?D(ee):D(V,-1)})}v(C)}T(ue=>x(C,"aria-label",ue),[()=>t(s).url?void 0:je(t(s))]),y(d,C)}),v(Y);var Se=g(Y,2);{var Ae=d=>{var s=Va(),C=f(s),Z=M(C,!0),ee=g(C,2);fe(ee,{get icon(){return et},size:10}),v(s),T(V=>N(Z,V),[()=>o.workspace_hoverCard_moreItems_label({count:B(t(Ke))})]),y(d,s)};$(Se,d=>{t(Ke)&&d(Ae)})}v(U),T((d,s)=>{x(U,"aria-label",d),x(Y,"aria-label",s)},[()=>t(Q).every(d=>d.resource?.repository.provider==="gitlab")?o.workspace_hoverCard_mergeRequests_label():t(Q).some(d=>d.resource?.repository.provider==="gitlab")?o.workspace_hoverCard_reviews_label():o.workspace_hoverCard_pullRequests_label(),()=>t(Q).every(d=>d.resource?.repository.provider==="gitlab")?o.workspace_hoverCard_mergeRequests_label():t(Q).some(d=>d.resource?.repository.provider==="gitlab")?o.workspace_hoverCard_reviews_label():o.workspace_hoverCard_pullRequests_label()]),y(X,U)};$($t,X=>{t(Be)&&X(Kt)})}v(me),y(F,oe)};$(Et,F=>{t(ze)&&F(Lt)})}T(F=>{h=lt(l,1,"min-w-0 px-5 pt-4",null,h,{"pb-4":!t(ze)}),N(z,F),N(O,t(Ct).label),N(ye,t(At))},[()=>a().title||o.workspace_links_untitled_label()]),y(e,c)};$(Nt,e=>{p()||!a()?e(Wt):e(Tt,-1)})}v(he),y(r,he);var Ot=ct(Mt);return u(),Ot}const rt=800,xr=175,Za=300;function er(){let r=0,n=null;const b=new Set,m=new Set;function w(){return r>0||n!==null?0:rt}function u(){const a=w();b.forEach(p=>p(a))}function i(){n!==null&&(clearTimeout(n),n=null)}return{get currentOpenDelay(){return w()},subscribe(a){return b.add(a),a(w()),()=>b.delete(a)},notifyOpened(){const a=r===0&&n===null;i(),r+=1,a&&u()},notifyClosed(){r!==0&&(r-=1,!(r>0)&&(i(),n=setTimeout(()=>{n=null,u()},Za)))},deferClose(a){return m.add(a),()=>m.delete(a)},settleDeferredCloses(){const a=[...m];m.clear(),a.forEach(p=>p())},reset(){const a=w()!==rt;i(),r=0,m.clear(),a&&u()}}}const Sr=er();function Pe(r){const n=dt.select(W.state,r);return n!==void 0&&wa(n)}function tr(r,n){if(!Pe(r))return[];const b=ca.select(W.state,r),m=Je.select(W.state,r),w=la.select(W.state),u=[];for(let i=0;i<_a;i+=1){const a=w[i],p=a&&a!==r?dt.select(W.state,a):void 0;u.push({id:`assign-micro-key-${i+1}`,label:p?o.workspace_card_assignOccupiedMicroKey_label({number:B(i+1),title:p.title}):o.workspace_card_assignMicroKeyNumber_label({number:B(i+1)}),checked:b===i,closeOnSelect:!0,onClick:()=>{Pe(r)&&W.dispatch(ga(i,r)),n()}})}return m!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:o.workspace_card_unassignMicroKey_label(),onClick:()=>{Pe(r)&&Je.select(W.state,r)===m&&W.dispatch(fa(m)),n()}})),u}function Ar(r,{connected:n,onClose:b}){if(!n)return[];const m=tr(r,b);if(m.length===0)return[];const w=m.filter(i=>"id"in i&&i.id!=="unassign-micro-key"),u=m.find(i=>"id"in i&&i.id==="unassign-micro-key");return[{id:"assign-micro-key",label:o.workspace_card_assignMicroKey_label(),icon:qa,onClick:()=>{},selection:"single",submenu:w},...u?[u]:[]]}export{xr as W,rt as a,Xa as b,vt as c,tr as d,Ar as e,pt as g,Oa as r,Sr as w};
|
|
@@ -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 Et}from"./ClpAEjbe.js";import{bs as Ne,ca as vt,aD as a,bH as y,ay as ie,bS as Z,W,bn as Oe,bV as z,aA as F,c9 as R,aB as j,a5 as D,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 Ze,ai as Pt,aF as St,br as Rt,bj as Ht,aj as ee}from"./CJxGDkBm.js";import{i as X}from"./wmcYjLAa.js";import{e as _e,g as Wt,i as Ut}from"./BwASeArv.js";import{h as tt}from"./BigcqNWS.js";import{g as Xe,s as rt,f as le}from"./CnGVh7I3.js";import{b as Ee}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 qt,F as Dt}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CCr3GhwT.js","/app/immutable/chunks/ClpAEjbe.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/wmcYjLAa.js","/app/immutable/chunks/BpXYSrHL.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/eHy-2vQk.js","/app/immutable/chunks/D9Ykl3eH.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CpP1PKzF.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgBcONKs.js","/app/immutable/chunks/WSVFXKpL.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CtJxHvGv.js","/app/immutable/chunks/DSqSJXGX.js","/app/immutable/chunks/CnGVh7I3.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BwASeArv.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CPDV_dyu.js","/app/immutable/chunks/BejTxFyR.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CTV49dzf.js","/app/immutable/chunks/By588DV1.js","/app/immutable/chunks/CVA75Jzf.js","/app/immutable/chunks/C1zxTHwk.js","/app/immutable/chunks/BVi5KkOP.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/Xh71Wbuh.js","/app/immutable/chunks/BeYVt6Wg.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/oXpJ1LFx.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/pO_uIUtS.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/b89lNINv.js","/app/immutable/chunks/DujUyPvo.js","/app/immutable/chunks/ByoP16rr.js","/app/immutable/chunks/C5TH9nNS.js","/app/immutable/chunks/B6-GEB4b.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BxKppgO5.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/BigcqNWS.js","/app/immutable/chunks/sppurVVE.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B06RKBOm.js","/app/immutable/chunks/CZ0QQTR9.js","/app/immutable/chunks/MZe3NxQe.js","/app/immutable/chunks/Gb7Ohwuc.js","/app/immutable/chunks/ISNHM8TL.js","/app/immutable/chunks/B5wwCKYG.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/Qt_rZNko.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BYiyLeZ4.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/C7RGdxsV.js","/app/immutable/chunks/V7b2Jgc1.js","/app/immutable/chunks/wJsFiZDi.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/B8-SJLLz.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/CMe1I98y.js","/app/immutable/chunks/paBp5EDQ.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/CARsKzUN.js","/app/immutable/chunks/DRG24ZS8.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css","/app/immutable/chunks/CwLBVHwC.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 Et}from"./ClpAEjbe.js";import{bs as Ne,ca as vt,aD as a,bH as y,ay as ie,bS as Z,W,bn as Oe,bV as z,aA as F,c9 as R,aB as j,a5 as D,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 Ze,ai as Pt,aF as St,br as Rt,bj as Ht,aj as ee}from"./CJxGDkBm.js";import{i as X}from"./wmcYjLAa.js";import{e as _e,g as Wt,i as Ut}from"./BwASeArv.js";import{h as tt}from"./BigcqNWS.js";import{g as Xe,s as rt,f as le}from"./CnGVh7I3.js";import{b as Ee}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 qt,F as Dt}from"./eHy-2vQk.js";import{m as jt,bq as ot,Jq as Ke,vG as Kt,th as Gt,vI as Jt}from"./CpP1PKzF.js";import{K as Zt,a9 as Xt}from"./D9Ykl3eH.js";import{l as Se}from"./ChTqQfQN.js";import{h as st}from"./paBp5EDQ.js";import{a as Qt,c as bt,b as Qe,V as Ye,p as Fe,f as wt,I as Yt,r as $t,s as er}from"./sppurVVE.js";import{g as it}from"./G-nrQJwO.js";import{s as tr}from"./WSVFXKpL.js";import{f as rr}from"./BVi5KkOP.js";import{F as Ge}from"./CPDV_dyu.js";import{m as lt}from"./BxKppgO5.js";import{F as nr,bF as ar}from"./CtJxHvGv.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))||Zt(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)}})},E=R(()=>a(c)&&l()(a(c).url));X(w,m=>{a(E)&&m(M)})}var C=Z(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 E(g){return xe(g,u()&&s()?.()!==!1)}const C=R(()=>!E(a(M))),t=R(()=>Fe(a(M))),d=R(()=>{if(!(!c()||!E(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)},T=pr(),U=ie(T);let O;var ve=D(U);{var q=g=>{Qe(g,{get name(){return l()},reason:"load-failed"})},ae=g=>{var H=dr(),ce=D(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=Z(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=D(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:()=>{E(a(M))&&y(p,!0)},get ref(){return a(w)},set ref(he){y(w,he,!0)},children:(he,qe)=>{var ue=Re(),B=ie(ue);{var we=Y=>{var G=Re(),J=ie(G);tr(J,I),W(Y,G)},fe=Y=>{var G=fr(),J=ie(G),Ce=D(J);{var Te=pe=>{var De=ur();W(pe,De)};X(Ce,pe=>{f()||pe(Te)})}V(J);var $=Z(J,2);$.muted=!0;var me=Z($,2),Ie=D(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=Z(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(q):a(v)?g(ae,1):g(K,-1)})}V(U);var oe=Z(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,T),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 E=JSON.parse(n.slice(s+1,w).join(`
|
|
5
|
-
`)),C=ct(E?.path,o);if(C){u(),l.push({type:"video",source:C,name:typeof E.path=="string"?E.path:void 0,poster:typeof E.poster=="string"?E.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 Je(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,Et(()=>import("./piULzuzd.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,79,80]),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 E=Pe(l,{target:M,context:n.context,props:{kind:v,source:p.textContent??"",workspaceId:n.workspaceId}});s.set(M,{component:E,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=D(c),s=D(u);nr(s,{get icon(){return ar},class:"size-3.5"}),V(u);var f=Z(u,2),_=D(f),I=He(_,!0),p=Z(_,2);{var k=v=>{var w=Fr(),M=He(w,!0);_e(w,(E,C)=>or?.(E,C),n),te(()=>Ze(M,n())),W(v,w)};X(p,v=>{n()&&v(k)})}return V(f),V(c),te(v=>Ze(I,v),[()=>Le.ui_mediaLoadingPlaceholder_title_label()]),W(r,c),Oe(l)}const mt="markdown-image-frame";function Tr(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 T=m.fallbackHost,U=T?.contains(document.activeElement)??!1;if(m.failureHandled=!1,m.fallbackHost=void 0,d&&(m.retries=0),t.removeAttribute("src"),t.setAttribute("src",h),T){const O=n.get(T);O&&be(O),n.delete(T),T.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 T=h.appendChild(document.createElement("span"));T.className="markdown-image-frame-placeholder",n.set(T,Pe(At,{target:T,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(T);O&&(be(O),n.delete(T)),T.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),T=kt(m,o.getWorkspaceId()),U=h?.path??T?.path,O=h?.workspaceId??T?.workspaceId,ve=t.getAttribute("data-name")||t.getAttribute("alt")||U?.split("/").pop()||void 0,q=document.createElement(t instanceof HTMLVideoElement?"div":"span");q.className="media-unavailable-host",(k(t)??t).replaceWith(q),o.onMediaRemoved(t);let ae;if(t instanceof HTMLImageElement&&d==="load-failed"){const oe=f(t);oe.fallbackHost=q,_(t)&&(ae=()=>I(t,!0))}const K=Pe(Qe,{target:q,props:{name:ve,reason:d,path:U,workspaceId:O,onRetry:ae}});if(n.set(q,K),t instanceof HTMLVideoElement){q.classList.add("flex","items-center","gap-2");const oe=q.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 E(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",E,!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",E,!0);for(const t of n.values())be(t);n.clear()}}}var Er=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=Er(),ne=D(S);{let N=R(()=>a(B).getAttribute("src")||""),ge=R(()=>a(B).getAttribute("alt")||void 0);Ee(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),Ee(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),E=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(),T=R(()=>wr(l(),s())),U=R(()=>a(T).some(e=>e.type==="video")),O=R(()=>!a(U)&&a(T).length===1&&a(T)[0].type==="markdown"?a(T)[0].content:l()),ve=R(()=>lr(a(O)));let q=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 qe(){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:E()||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()):(qe(),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 J(e){if(e.type==="mouseover"&&dt(a(B),a(G)))return;const i=e.target,A=Je(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 Te(e){const i=Je(e.target);!i||!Ae(i)||!K(i.getAttribute("src")||"")||(e.preventDefault(),e.stopPropagation(),J(e),y(fe,!0))}function $(e){return Tr(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=qt(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(),Dt(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(Jt(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=Je(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,qe()});var De={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 E()},set renderRichFencesAsCode(e=!1){E(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(T),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 E()},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=D(i);tt(b,()=>a(g));var L=Z(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,Te),ee("mouseover",i,J),ee("focusin",i,J),ke("mouseleave",i,Ce),W(e,i)},Ft=e=>{var i=Pr(),A=D(i),b=He(A,!0);V(i),te(()=>{le(i,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),Ze(b,a(O))}),W(e,i)},Ct=e=>{var i=pt();let A;var b=D(i);tt(b,()=>a(g));var L=Z(b,2);n(L),V(i),Ee(i,P=>y(q,P),()=>a(q)),_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,Te),ee("mouseover",i,J),ee("focusin",i,J),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 Tt=Z(et,2);return Ee(It(Tt,{get workspaceId(){return s()},canUseMedia:K}),e=>y(ue,e,!0),()=>a(ue)),W(r,$e),Oe(De)}Pt(["click","keydown","contextmenu","mouseover","focusin"]);export{yt as C,gt as M,At as a,wr as s};
|
|
5
|
+
`)),C=ct(E?.path,o);if(C){u(),l.push({type:"video",source:C,name:typeof E.path=="string"?E.path:void 0,poster:typeof E.poster=="string"?E.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 Je(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,Et(()=>import("./CCr3GhwT.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,79,80]),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 E=Pe(l,{target:M,context:n.context,props:{kind:v,source:p.textContent??"",workspaceId:n.workspaceId}});s.set(M,{component:E,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=D(c),s=D(u);nr(s,{get icon(){return ar},class:"size-3.5"}),V(u);var f=Z(u,2),_=D(f),I=He(_,!0),p=Z(_,2);{var k=v=>{var w=Fr(),M=He(w,!0);_e(w,(E,C)=>or?.(E,C),n),te(()=>Ze(M,n())),W(v,w)};X(p,v=>{n()&&v(k)})}return V(f),V(c),te(v=>Ze(I,v),[()=>Le.ui_mediaLoadingPlaceholder_title_label()]),W(r,c),Oe(l)}const mt="markdown-image-frame";function Tr(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 T=m.fallbackHost,U=T?.contains(document.activeElement)??!1;if(m.failureHandled=!1,m.fallbackHost=void 0,d&&(m.retries=0),t.removeAttribute("src"),t.setAttribute("src",h),T){const O=n.get(T);O&&be(O),n.delete(T),T.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 T=h.appendChild(document.createElement("span"));T.className="markdown-image-frame-placeholder",n.set(T,Pe(At,{target:T,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(T);O&&(be(O),n.delete(T)),T.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),T=kt(m,o.getWorkspaceId()),U=h?.path??T?.path,O=h?.workspaceId??T?.workspaceId,ve=t.getAttribute("data-name")||t.getAttribute("alt")||U?.split("/").pop()||void 0,q=document.createElement(t instanceof HTMLVideoElement?"div":"span");q.className="media-unavailable-host",(k(t)??t).replaceWith(q),o.onMediaRemoved(t);let ae;if(t instanceof HTMLImageElement&&d==="load-failed"){const oe=f(t);oe.fallbackHost=q,_(t)&&(ae=()=>I(t,!0))}const K=Pe(Qe,{target:q,props:{name:ve,reason:d,path:U,workspaceId:O,onRetry:ae}});if(n.set(q,K),t instanceof HTMLVideoElement){q.classList.add("flex","items-center","gap-2");const oe=q.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 E(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",E,!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",E,!0);for(const t of n.values())be(t);n.clear()}}}var Er=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=Er(),ne=D(S);{let N=R(()=>a(B).getAttribute("src")||""),ge=R(()=>a(B).getAttribute("alt")||void 0);Ee(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),Ee(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),E=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(),T=R(()=>wr(l(),s())),U=R(()=>a(T).some(e=>e.type==="video")),O=R(()=>!a(U)&&a(T).length===1&&a(T)[0].type==="markdown"?a(T)[0].content:l()),ve=R(()=>lr(a(O)));let q=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 qe(){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:E()||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()):(qe(),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 J(e){if(e.type==="mouseover"&&dt(a(B),a(G)))return;const i=e.target,A=Je(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 Te(e){const i=Je(e.target);!i||!Ae(i)||!K(i.getAttribute("src")||"")||(e.preventDefault(),e.stopPropagation(),J(e),y(fe,!0))}function $(e){return Tr(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=qt(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(),Dt(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(Jt(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=Je(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,qe()});var De={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 E()},set renderRichFencesAsCode(e=!1){E(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(T),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 E()},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=D(i);tt(b,()=>a(g));var L=Z(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,Te),ee("mouseover",i,J),ee("focusin",i,J),ke("mouseleave",i,Ce),W(e,i)},Ft=e=>{var i=Pr(),A=D(i),b=He(A,!0);V(i),te(()=>{le(i,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),Ze(b,a(O))}),W(e,i)},Ct=e=>{var i=pt();let A;var b=D(i);tt(b,()=>a(g));var L=Z(b,2);n(L),V(i),Ee(i,P=>y(q,P),()=>a(q)),_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,Te),ee("mouseover",i,J),ee("focusin",i,J),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 Tt=Z(et,2);return Ee(It(Tt,{get workspaceId(){return s()},canUseMedia:K}),e=>y(ue,e,!0),()=>a(ue)),W(r,$e),Oe(De)}Pt(["click","keydown","contextmenu","mouseover","focusin"]);export{yt as C,gt as M,At as a,wr as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./ClpAEjbe.js";import{bs as D,cd as E,ca as L,a7 as O,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./CJxGDkBm.js";import{i as R}from"./wmcYjLAa.js";import{C as U}from"./
|
|
1
|
+
import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./ClpAEjbe.js";import{bs as D,cd as E,ca as L,a7 as O,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./CJxGDkBm.js";import{i as R}from"./wmcYjLAa.js";import{C as U}from"./3vi-OgRR.js";import{dE as V}from"./D9Ykl3eH.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=E(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=F(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=G(C);return u(),x}export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o}from"./
|
|
1
|
+
import{b as o}from"./BpXYSrHL.js";var c=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function p(){return!!i()?.mermaidCaptureSizes}o(p,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,p as shouldCaptureSizes};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aZ as Ae,U as ke,Y as ae,b0 as Fe,V as Pe,a_ as ve,b as o,X as Vt,ay as bt,aW as Lt,B as Ce,r as Le,O as V,aV as Ee,a6 as De}from"./
|
|
1
|
+
import{aZ as Ae,U as ke,Y as ae,b0 as Fe,V as Pe,a_ as ve,b as o,X as Vt,ay as bt,aW as Lt,B as Ce,r as Le,O as V,aV as Ee,a6 as De}from"./BpXYSrHL.js";import{l as ie}from"./CBP_r2rZ.js";var Et=(function(){var t=o(function(Y,r,l,x){for(l=l||{},x=Y.length;x--;l[Y[x]]=r);return l},"o"),n=[1,3],f=[1,4],d=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],_=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],k=[2,36],u=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],g=[1,41],A=[1,45],ht=[1,14],xt=[1,23],ft=[1,18],gt=[1,19],ct=[1,20],_t=[1,21],dt=[1,22],i=[1,24],zt=[1,25],It=[1,26],wt=[1,27],Bt=[1,28],Rt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Xt=[1,71],Ht=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],At=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],kt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,x,c,S,e,ut){var s=e.length-1;switch(S){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],c.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),c.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),c.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),c.setAccDescription(this.$);break;case 46:c.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:c.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:c.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:c.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:c.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:c.setXAxisLeftText(e[s-2]),c.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",c.setXAxisLeftText(e[s-1]);break;case 53:c.setXAxisLeftText(e[s]);break;case 54:c.setYAxisBottomText(e[s-2]),c.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",c.setYAxisBottomText(e[s-1]);break;case 56:c.setYAxisBottomText(e[s]);break;case 57:c.setQuadrant1Text(e[s]);break;case 58:c.setQuadrant2Text(e[s]);break;case 59:c.setQuadrant3Text(e[s]);break;case 60:c.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:f,55:d,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:f,55:d,56:h,57:p},{18:n,26:9,27:2,28:f,55:d,56:h,57:p},t(y,[2,33],{29:10}),t(_,[2,61]),t(_,[2,62]),t(_,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:zt,51:It,52:wt,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:d,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:zt,51:It,52:wt,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(a,[2,29],{10:At}),t(Zt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:At}),t(a,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(a,[2,50],{10:At}),t(Zt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var x=new Error(r);throw x.hash=l,x}},"parseError"),parse:o(function(r){var l=this,x=[0],c=[],S=[null],e=[],ut=this.table,s="",yt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(j.yy[Ft]=this.yy[Ft]);D.setInput(r,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Pt=D.yylloc;e.push(Pt);var Se=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){x.length=x.length-2*R,S.length=S.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=c.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(c=R,R=c.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,G,W,vt,rt={},Tt,M,ee,qt;;){if(G=x[x.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=te()),W=ut[G]&&ut[G][B]),typeof W>"u"||!W.length||!W[0]){var Ct="";qt=[];for(Tt in ut[G])this.terminals_[Tt]&&Tt>me&&qt.push("'"+this.terminals_[Tt]+"'");D.showPosition?Ct="Parse error on line "+(yt+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+qt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Ct="Parse error on line "+(yt+1)+": Unexpected "+(B==$t?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Pt,expected:qt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(W[0]){case 1:x.push(B),S.push(D.yytext),e.push(D.yylloc),x.push(W[1]),B=null,Jt=D.yyleng,s=D.yytext,yt=D.yylineno,Pt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=S[S.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),vt=this.performAction.apply(rt,[s,Jt,yt,j.yy,W[1],S,e].concat(be)),typeof vt<"u")return vt;M&&(x=x.slice(0,-1*M*2),S=S.slice(0,-1*M),e=e.slice(0,-1*M)),x.push(this.productions_[W[1]][0]),S.push(rt.$),e.push(rt._$),ee=ut[x[x.length-2]][x[x.length-1]],x.push(ee);break;case 3:return!0}}return!0},"parse")},qe=(function(){var Y={EOF:1,parseError:o(function(l,x){if(this.yy.parser)this.yy.parser.parseError(l,x);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||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:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(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:o(function(r){var l=r.length,x=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var c=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),x.length-1&&(this.yylineno-=x.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:x?(x.length===c.length?this.yylloc.first_column:0)+c[c.length-x.length].length-x[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(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:o(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:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as V,bo as L,bm as H,bw as F,bq as dt,b as G,bs as nt}from"./ClpAEjbe.js";import{bs as K,cd as lt,ca as j,c5 as ct,a5 as B,be as D,b$ as J,b_ as h,bO as _,W as l,bH as M,aD as e,bS as T,bA as C,bn as N,bV as it,aA as R,c9 as u,aB as b,bl as S,ay as pt}from"./CJxGDkBm.js";import{i as q}from"./wmcYjLAa.js";import{C as ut}from"./CTsZeMVP.js";import{f as U}from"./BVi5KkOP.js";import"./CPDV_dyu.js";import{k as bt}from"./
|
|
1
|
+
import{t as V,bo as L,bm as H,bw as F,bq as dt,b as G,bs as nt}from"./ClpAEjbe.js";import{bs as K,cd as lt,ca as j,c5 as ct,a5 as B,be as D,b$ as J,b_ as h,bO as _,W as l,bH as M,aD as e,bS as T,bA as C,bn as N,bV as it,aA as R,c9 as u,aB as b,bl as S,ay as pt}from"./CJxGDkBm.js";import{i as q}from"./wmcYjLAa.js";import{C as ut}from"./CTsZeMVP.js";import{f as U}from"./BVi5KkOP.js";import"./CPDV_dyu.js";import{k as bt}from"./Ck2JBj0W.js";import{Jq as P,dB as vt,dz as kt,dC as _t}from"./CpP1PKzF.js";var gt=b('<p class="p-2 text-xs text-subtle" data-testid="hook-script-content-too-large"> </p>'),mt=b('<div class="min-h-0 min-w-0 flex-1 overflow-auto" data-testid="hook-script-content-script"><!></div>'),ft=b('<span class="text-xs font-medium text-danger"> </span> <pre class="whitespace-pre-wrap break-all rounded bg-danger-background/10 p-2 font-mono text-xs text-danger"> </pre>',1),ht=b('<pre class="whitespace-pre-wrap break-all rounded bg-muted/40 p-2 font-mono text-xs text-subtle"> </pre>'),xt=b('<p class="text-xs text-subtle"> </p>'),wt=b('<div class="flex min-h-0 min-w-0 flex-1 flex-col gap-2 overflow-auto" data-testid="hook-script-content-logs"><!> <!></div>'),It=b('<div class="flex h-full min-h-0 min-w-0 flex-col gap-3 overflow-hidden" data-testid="hook-script-content"><div class="flex shrink-0 border-b border-border" role="tablist"><!> <!></div> <!></div>');function Q(x,c){if(new.target)return V({component:Q,...x});K(c,!0);const g=()=>nt($,"$hooks$",w),[w,E]=dt();let s=L(c,"workspaceId",7),I=L(c,"hookId",7);const d=lt(s());j(()=>d.set(s()));const $=bt(d),v=u(()=>g().find(t=>t.hookId===I()));j(()=>{if(!s())return;const t=s();return ct(()=>{P.dispatch(vt(t)),P.dispatch(kt(t))}),()=>P.dispatch(_t(t))});let k=it("script");var X={get workspaceId(){return s()},set workspaceId(t){s(t),R()},get hookId(){return I()},set hookId(t){I(t),R()},$set:F,$on:(t,r)=>G(c,t,r)},z=It(),A=B(z),W=B(A);{let t=u(()=>e(k)==="script"),r=u(()=>e(k)==="script"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");U(W,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>M(k,"script"),children:(p,y)=>{D();var i=J();h(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_scriptTab_label()]),l(p,i)},$$slots:{default:!0}})}var Y=T(W,2);{let t=u(()=>e(k)==="logs"),r=u(()=>e(k)==="logs"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");U(Y,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>M(k,"logs"),children:(p,y)=>{D();var i=J();h(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_logsTab_label()]),l(p,i)},$$slots:{default:!0}})}C(A);var Z=T(A,2);{var tt=t=>{var r=mt(),p=B(r);{var y=a=>{var m=gt(),o=S(m,!0);h(n=>_(o,n),[()=>H.chat_backgroundHooks_modal_codeTooLarge_description({size:(e(v).codeBytes??0).toLocaleString()})]),l(a,m)},i=a=>{{let m=u(()=>e(v)?.code??"");ut(a,{get code(){return e(m)},language:"javascript",noMargin:!0})}};q(p,a=>{e(v)?.codeOmitted?a(y):a(i,-1)})}C(r),l(t,r)},et=t=>{var r=wt(),p=B(r);{var y=o=>{var n=ft(),f=pt(n),O=S(f,!0),at=T(f,2),ot=S(at,!0);h(st=>{_(O,st),_(ot,e(v).lastError)},[()=>H.chat_backgroundHooks_modal_lastError_label()]),l(o,n)};q(p,o=>{e(v)?.lastError&&o(y)})}var i=T(p,2);{var a=o=>{var n=ht(),f=S(n,!0);h(()=>_(f,e(v).lastLogs)),l(o,n)},m=o=>{var n=xt(),f=S(n,!0);h(O=>_(f,O),[()=>H.chat_backgroundHooks_modal_noLogs_description()]),l(o,n)};q(i,o=>{e(v)?.lastLogs?o(a):o(m,-1)})}C(r),l(t,r)};q(Z,t=>{e(k)==="script"?t(tt):t(et,-1)})}C(z),l(x,z);var rt=N(X);return E(),rt}var $t=b('<div class="h-full min-h-0 min-w-0 max-w-full overflow-hidden p-4" data-testid="hook-script-panel"><!></div>');function yt(x,c){if(new.target)return V({component:yt,...x});K(c,!0);let g=L(c,"tab",7),w=L(c,"workspaceId",7);var E={get tab(){return g()},set tab(d){g(d),R()},get workspaceId(){return w()},set workspaceId(d){w(d),R()},$set:F,$on:(d,$)=>G(c,d,$)},s=$t(),I=B(s);{let d=u(()=>g().workspaceId??w()),$=u(()=>g().hookId??"");Q(I,{get workspaceId(){return e(d)},get hookId(){return e($)}})}return C(s),l(x,s),N(E)}export{yt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as fe}from"./
|
|
1
|
+
import{g as fe}from"./CygNkso5.js";import{b as o,ay as te,X as U,aX as ye,ad as be,ah as me,aL as ke,b3 as Ee,O as K,aV as F,ax as _e,J as Se,an as Ne,au as ce,H as le}from"./BpXYSrHL.js";var $=(function(){var e=o(function(O,s,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=s);return n},"o"),h=[1,4],p=[1,13],i=[1,12],d=[1,15],k=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],E=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(s,n,r,a,u,t,M){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(E,[2,19]),e(E,[2,21],{15:30,24:G}),e(E,[2,22]),e(E,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(E,[2,16],{15:37,24:G}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(E,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(s,n){if(n.recoverable)this.trace(s);else{var r=new Error(s);throw r.hash=n,r}},"parseError"),parse:o(function(s){var n=this,r=[0],a=[],u=[null],t=[],M=this.table,c="",W=0,ie=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(s,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var _,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=ae()),x=M[P]&&M[P][_]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in M[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+X.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(_==re?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:q,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(x[0]){case 1:r.push(_),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),_=null,ie=b.yyleng,c=b.yytext,W=b.yylineno,q=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],j.$=u[u.length-C],j._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(j._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[c,ie,W,R.yy,x[1],u,t].concat(ge)),typeof Q<"u")return Q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(j.$),t.push(j._$),oe=M[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var n=s.length,r=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=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),r.length-1&&(this.yylineno-=r.length-1);var u=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|