@intent-hq/web 2.334.4 → 2.334.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/assets/0.DDO9e6AE.css +1 -0
- package/web/app/immutable/chunks/{B--DS5uB.js → 0FyVrvMr.js} +1 -1
- package/web/app/immutable/chunks/{DiQPrKdw.js → 0WwOrUwa.js} +1 -1
- package/web/app/immutable/chunks/{jQoVJUan.js → 62Ck3yAT.js} +4 -4
- package/web/app/immutable/chunks/{tCQts2qZ.js → 81XDh255.js} +1 -1
- package/web/app/immutable/chunks/{eydIaLOC.js → 8_ljbhiH.js} +1 -1
- package/web/app/immutable/chunks/{_UdqBB2L.js → B-tqV-du.js} +1 -1
- package/web/app/immutable/chunks/{D2mgiwW6.js → B0AQrNP8.js} +1 -1
- package/web/app/immutable/chunks/{CrrEv2rL.js → B2dH0oKn.js} +1 -1
- package/web/app/immutable/chunks/{ZQGx2tXF.js → BBCAmMgd.js} +1 -1
- package/web/app/immutable/chunks/{-TOEU8_A.js → BBSarno7.js} +1 -1
- package/web/app/immutable/chunks/{CuWBzd-F.js → BEtyTdg1.js} +1 -1
- package/web/app/immutable/chunks/{CY6nFc9b.js → BMxxonMM.js} +1 -1
- package/web/app/immutable/chunks/{BBQmqbzc.js → BN7oNeT4.js} +1 -1
- package/web/app/immutable/chunks/{uRN7AKow.js → BNE5EdJc.js} +1 -1
- package/web/app/immutable/chunks/{CsBjcw-w.js → BRhn0zzz.js} +1 -1
- package/web/app/immutable/chunks/{CxJbFBxw.js → BRq9XkNc.js} +1 -1
- package/web/app/immutable/chunks/{BwwEJ73s.js → BSj_w_6H.js} +1 -1
- package/web/app/immutable/chunks/{C7MBFDJp.js → BSt9DnIU.js} +1 -1
- package/web/app/immutable/chunks/{Ceq7cv95.js → BUfNF6yo.js} +1 -1
- package/web/app/immutable/chunks/{D81SHt2l.js → BVbFqMmm.js} +1 -1
- package/web/app/immutable/chunks/{bUGfWLiY.js → BWwaybhk.js} +1 -1
- package/web/app/immutable/chunks/{W61kh8fv.js → Ba_-F0B5.js} +6 -6
- package/web/app/immutable/chunks/{J08yAvVE.js → BcXaAxkW.js} +1 -1
- package/web/app/immutable/chunks/{Cz2XOG-L.js → Bd3NQ0dc.js} +1 -1
- package/web/app/immutable/chunks/{Bs3DdycY.js → Be-iTE3o.js} +1 -1
- package/web/app/immutable/chunks/{BrH3hKEJ.js → BerYJ_N3.js} +1 -1
- package/web/app/immutable/chunks/{znAltH1L.js → BgVKKIhh.js} +4 -4
- package/web/app/immutable/chunks/{Da5ikdTd.js → BhHLn-bI.js} +1 -1
- package/web/app/immutable/chunks/{PotN_tv7.js → BkmDnHK5.js} +1 -1
- package/web/app/immutable/chunks/{CBHhz236.js → BlAnjJrQ.js} +1 -1
- package/web/app/immutable/chunks/{C58MXMyI.js → Bm8uDgI4.js} +1 -1
- package/web/app/immutable/chunks/{DeRdhkHZ.js → BmVaEhYz.js} +1 -1
- package/web/app/immutable/chunks/{ms_dJmyn.js → BnEsz2KN.js} +1 -1
- package/web/app/immutable/chunks/{B8IlgGpJ.js → BnFz8cck.js} +2 -2
- package/web/app/immutable/chunks/{Iv4WzslT.js → BqZYZkSb.js} +1 -1
- package/web/app/immutable/chunks/{_sWyQxbQ.js → Bs4slzIC.js} +2 -2
- package/web/app/immutable/chunks/{D5JZ5TDM.js → Bte-s6hN.js} +3 -3
- package/web/app/immutable/chunks/{CGlMnf5q.js → Bugw0Y8f.js} +1 -1
- package/web/app/immutable/chunks/{DS8-U49C.js → BwWjWCx7.js} +1 -1
- package/web/app/immutable/chunks/{BvZf2Y4o.js → BxoQ-54W.js} +1 -1
- package/web/app/immutable/chunks/{BOWbyG8Q.js → C0n3GkXc.js} +1 -1
- package/web/app/immutable/chunks/{BxmfBtHG.js → C1v_uKxt.js} +1 -1
- package/web/app/immutable/chunks/{Do-q4-tL.js → C27VjfPV.js} +3 -3
- package/web/app/immutable/chunks/{Ba7P2HkQ.js → C43c9gOy.js} +1 -1
- package/web/app/immutable/chunks/{BcBl1qMn.js → C4HlRcUf.js} +2 -2
- package/web/app/immutable/chunks/{DDugF1XE.js → C4twHGiQ.js} +1 -1
- package/web/app/immutable/chunks/{BzP4gCLt.js → C6KILHrA.js} +1 -1
- package/web/app/immutable/chunks/{DistMkl2.js → C9HiWs7H.js} +4 -4
- package/web/app/immutable/chunks/{DIwBqoFo.js → CAnlGY8T.js} +1 -1
- package/web/app/immutable/chunks/{BCvW5fLL.js → CB_s16b4.js} +1 -1
- package/web/app/immutable/chunks/{CcOMWwsU.js → CF8VGN6V.js} +1 -1
- package/web/app/immutable/chunks/{BnsMMXeG.js → CFnSm94u.js} +1 -1
- package/web/app/immutable/chunks/{DHM67VRx.js → CJGmFcnd.js} +1 -1
- package/web/app/immutable/chunks/{BOE4Qfjf.js → CQdt2YW2.js} +1 -1
- package/web/app/immutable/chunks/{C4Yfp_TG.js → CRUpele6.js} +1 -1
- package/web/app/immutable/chunks/{CJsd_APB.js → CR_TLVSm.js} +1 -1
- package/web/app/immutable/chunks/{CSvJVg_I.js → CUIX5TSy.js} +4 -4
- package/web/app/immutable/chunks/{L9gWdMu_.js → CeVaI72E.js} +1 -1
- package/web/app/immutable/chunks/{BVA72xzt.js → Cf5QUyxQ.js} +1 -1
- package/web/app/immutable/chunks/{CJDCNDP4.js → CldWVpJx.js} +1 -1
- package/web/app/immutable/chunks/{UdI8St87.js → ClsZKLeX.js} +1 -1
- package/web/app/immutable/chunks/{-cH4Kg6N.js → ClyIJA-J.js} +3 -3
- package/web/app/immutable/chunks/{D613d4CE.js → Co9CQOEE.js} +1 -1
- package/web/app/immutable/chunks/{aS0Ledp-.js → CxKI5WLV.js} +1 -1
- package/web/app/immutable/chunks/{DUMFiDJG.js → CxN5ww35.js} +1 -1
- package/web/app/immutable/chunks/{C4-YEGNY.js → D-JiThfG.js} +1 -1
- package/web/app/immutable/chunks/{D9eQxumT.js → D2R9j_dh.js} +1 -1
- package/web/app/immutable/chunks/{BdpYl7Gv.js → D4KuwGYO.js} +1 -1
- package/web/app/immutable/chunks/{BB8HM8Ay.js → D4RvzmFV.js} +1 -1
- package/web/app/immutable/chunks/{ZBqfJekw.js → DAS5c34n.js} +1 -1
- package/web/app/immutable/chunks/{BI3Qf00U.js → DBNZp5Wp.js} +1 -1
- package/web/app/immutable/chunks/{CqpFmLF1.js → DCoF9aZO.js} +1 -1
- package/web/app/immutable/chunks/{B25gpTlR.js → DDzpiEuq.js} +1 -1
- package/web/app/immutable/chunks/DFIEz-U9.js +227 -0
- package/web/app/immutable/chunks/{BVVMn1l6.js → DFZXcT7x.js} +1 -1
- package/web/app/immutable/chunks/{B-Y3a_F8.js → DGCiv8do.js} +1 -1
- package/web/app/immutable/chunks/{DFWkFU6G.js → DGIH8Giy.js} +1 -1
- package/web/app/immutable/chunks/{by2sennB.js → DHZ6PxAq.js} +1 -1
- package/web/app/immutable/chunks/{BnZxq056.js → DHrUgmm5.js} +1 -1
- package/web/app/immutable/chunks/DIHTPxGm.js +408 -0
- package/web/app/immutable/chunks/{DanU7KQt.js → DIUwrF_K.js} +1 -1
- package/web/app/immutable/chunks/{Bfwh7fx_.js → DLHQbJV8.js} +1 -1
- package/web/app/immutable/chunks/{CFuCenWl.js → DLdcS_fn.js} +1 -1
- package/web/app/immutable/chunks/{BwxmdpQk.js → DMrPpGxC.js} +1 -1
- package/web/app/immutable/chunks/{DXA93DnF.js → DO-6xcR6.js} +1 -1
- package/web/app/immutable/chunks/{CYgoZYHa.js → DQ0dj2KX.js} +1 -1
- package/web/app/immutable/chunks/{CaEWxG5p.js → DV0bJEUk.js} +2 -2
- package/web/app/immutable/chunks/{_HObNlpG.js → DYa_4kRY.js} +1 -1
- package/web/app/immutable/chunks/{CSf8qtlt.js → D_pdm8Iu.js} +1 -1
- package/web/app/immutable/chunks/{CI3pmd4G.js → DaM3w2zL.js} +1 -1
- package/web/app/immutable/chunks/{C0fLKaB9.js → DblhKpGx.js} +1 -1
- package/web/app/immutable/chunks/{DPkE3Irc.js → Dgr_dd3s.js} +1 -1
- package/web/app/immutable/chunks/{C0IuX8Tw.js → Di8eJd7y.js} +1 -1
- package/web/app/immutable/chunks/{Dl2HfqsO.js → DjJMRMqK.js} +1 -1
- package/web/app/immutable/chunks/{BWJ-0D-2.js → Do1EoraG.js} +1 -1
- package/web/app/immutable/chunks/{cKtqmo72.js → Dq3t5TwZ.js} +3 -3
- package/web/app/immutable/chunks/{CXqkKZxQ.js → Dqj_x1iH.js} +1 -1
- package/web/app/immutable/chunks/{CtspFCnO.js → Dt0PtZRf.js} +1 -1
- package/web/app/immutable/chunks/{CqdcwUul.js → DwGXL-qt.js} +1 -1
- package/web/app/immutable/chunks/{BAJMpiJG.js → Dyka1Qt_.js} +2 -2
- package/web/app/immutable/chunks/{B2g0crjj.js → E9lFZacU.js} +1 -1
- package/web/app/immutable/chunks/{ClCRB_mv.js → FvsPOdWc.js} +1 -1
- package/web/app/immutable/chunks/{C6KqUwgB.js → G24AfB6y.js} +1 -1
- package/web/app/immutable/chunks/{DwovkWl8.js → H7Zvcn3V.js} +1 -1
- package/web/app/immutable/chunks/{C1wyQWdd.js → IlIt-f56.js} +1 -1
- package/web/app/immutable/chunks/{DZWmQz5X.js → LyXMg8Qe.js} +1 -1
- package/web/app/immutable/chunks/{MohDaz1W.js → QGl-Xn9g.js} +2 -2
- package/web/app/immutable/chunks/{Ced3NNcG.js → SuEehhCe.js} +1 -1
- package/web/app/immutable/chunks/{LF6JrNMn.js → UEEF_pji.js} +2 -2
- package/web/app/immutable/chunks/{BZGUu0nU.js → XTm8XS4k.js} +3 -3
- package/web/app/immutable/chunks/{D51IE5D2.js → YzN4RtUL.js} +1 -1
- package/web/app/immutable/chunks/{Bgmz76v7.js → fkBazoe-.js} +1 -1
- package/web/app/immutable/chunks/{BiWS3oN6.js → gZgaz0G2.js} +2 -2
- package/web/app/immutable/chunks/{D4jQS0eM.js → hODW-NKf.js} +1 -1
- package/web/app/immutable/chunks/{QiVjRpIE.js → i27DVf4h.js} +1 -1
- package/web/app/immutable/chunks/{DNc3c430.js → kNlqjW-C.js} +1 -1
- package/web/app/immutable/chunks/{D3LGlsX3.js → oLdtVgVq.js} +1 -1
- package/web/app/immutable/chunks/{DJbDjFTs.js → oUKZGyo6.js} +1 -1
- package/web/app/immutable/chunks/{G3hahPKG.js → qS-FFtmP.js} +1 -1
- package/web/app/immutable/chunks/{BvK0-XNr.js → seqIFXVs.js} +1 -1
- package/web/app/immutable/chunks/{rVFNKqUq.js → sylOMk5x.js} +1 -1
- package/web/app/immutable/chunks/{CGgST5OQ.js → xctgDwNB.js} +1 -1
- package/web/app/immutable/entry/{app.DVdz1aQK.js → app.DMK38pKj.js} +2 -2
- package/web/app/immutable/entry/start.DedWlol5.js +1 -0
- package/web/app/immutable/nodes/{0.1qBEgFWI.js → 0.ZjGfuQZ5.js} +1 -1
- package/web/app/immutable/nodes/{1.iJqMO56i.js → 1.CzSlxWDI.js} +1 -1
- package/web/app/immutable/nodes/{10.Dtdcvc6-.js → 10.CDcFOY3m.js} +1 -1
- package/web/app/immutable/nodes/{14.BRod9dtf.js → 14.442_Kmt_.js} +1 -1
- package/web/app/immutable/nodes/{17.B-vrsgfn.js → 17.Gp4mmeUX.js} +2 -2
- package/web/app/immutable/nodes/2.BWlNOzaY.js +13 -0
- package/web/app/immutable/nodes/{3.DGf0u_3o.js → 3.DwEqcKct.js} +1 -1
- package/web/app/immutable/nodes/{4.B1fIfTX2.js → 4.CLbC-SYM.js} +1 -1
- package/web/app/immutable/nodes/{5.CJgBMBBF.js → 5.Cb95bBtk.js} +1 -1
- package/web/app/immutable/nodes/{6.CUqou9xf.js → 6.K81lfiYe.js} +1 -1
- package/web/app/immutable/nodes/{7.DBynvHNx.js → 7.B8yYgNgD.js} +1 -1
- package/web/app/immutable/nodes/{8.BFuKMy6D.js → 8.CNNQksh_.js} +4 -4
- package/web/app/immutable/nodes/{9.CVLLynGu.js → 9.Cg_qHOdY.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +8 -8
- package/web/index.html +10 -10
- package/web/app/immutable/assets/0.CvWOFl38.css +0 -1
- package/web/app/immutable/chunks/BOSe_KRq.js +0 -227
- package/web/app/immutable/chunks/pBwXi0xp.js +0 -408
- package/web/app/immutable/entry/start.CP_dOJoI.js +0 -1
- package/web/app/immutable/nodes/2.BLWWZTlf.js +0 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ie}from"./
|
|
1
|
+
import{g as ie}from"./BSt9DnIU.js";import{s as re}from"./BmVaEhYz.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./C9HiWs7H.js";import{c as Ee}from"./Bugw0Y8f.js";import{aO as _e}from"./qS-FFtmP.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],R=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:R,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:R,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:R,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:R,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(N){n.length=n.length-2*N,E.length=E.length-N,i.length=i.length-N}p(se,"popStack");function Nt(){var N;return N=T.pop()||k.lex()||Q,typeof N!="number"&&(N instanceof Array&&(T=N,N=T.pop()),N=f.symbols_[N]||N),N}p(Nt,"lex");for(var x,U,O,bt,J={},ft,Y,Rt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Nt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+k.showPosition()+`
|
|
3
3
|
Expecting `+pt.join(", ")+", got '"+(this.terminals_[x]||x)+"'":kt="Parse error on line "+(G+1)+": Unexpected "+(x==Q?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(kt,{text:k.match,token:this.terminals_[x]||x,line:k.yylineno,loc:_t,expected:pt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+x);switch(O[0]){case 1:n.push(x),E.push(k.yytext),i.push(k.yylloc),n.push(O[1]),x=null,X=k.yyleng,d=k.yytext,G=k.yylineno,_t=k.yylloc;break;case 2:if(Y=this.productions_[O[1]][1],J.$=E[E.length-Y],J._$={first_line:i[i.length-(Y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Y||1)].first_column,last_column:i[i.length-1].last_column},ee&&(J._$.range=[i[i.length-(Y||1)].range[0],i[i.length-1].range[1]]),bt=this.performAction.apply(J,[d,X,G,W.yy,O[1],E,i].concat(Tt)),typeof bt<"u")return bt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),i=i.slice(0,-1*Y)),n.push(this.productions_[O[1]][0]),E.push(J.$),i.push(J._$),Rt=B[n[n.length-2]][n[n.length-1]],n.push(Rt);break;case 3:return!0}}return!0},"parse")},te=(function(){var V={EOF:1,parseError:p(function(f,n){if(this.yy.parser)this.yy.parser.parseError(f,n);else throw new Error(f)},"parseError"),setInput:p(function(o,f){return this.yy=f||this.yy||{},this._input=o,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:p(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:p(function(o){var f=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var T=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),n.length-1&&(this.yylineno-=n.length-1);var E=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:n?(n.length===T.length?this.yylloc.first_column:0)+T[T.length-n.length].length-n[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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:p(function(o){this.unput(this.match.slice(o))},"less"),pastInput:p(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,br as S,a_ as M,bp as P,bz as un,bt as On,b as hn,bv as je}from"./CEL6QztG.js";import{ai as xr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as H,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as Y,aA as x,ay as ne,bS as y,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Ln,a as Us,be as Tt,b$ as ft,bf as or}from"./DYhIMPy1.js";import{v as En,u as Ve,n as Pt,p as Hn,I as ir,g as ar,w as lr}from"./yn6WWSq8.js";import{I as cn,F as Ws,c as Bs,t as Rt}from"./wwtnRh6M.js";import{b as on}from"./BaIAhI85.js";import{Ik as Me,eD as Vs,eu as Ks,ev as js,oz as qs,no as Vt,ns as cr,nr as In,ex as Gs,uQ as Qs,uR as Xs,uT as Ys,Go as Zs,Ip as Js,rg as eo,eC as to}from"./DYfeeu3f.js";import{c as no}from"./CV0Fs-12.js";import{F as Ne,Z as ro,a4 as An,as as dr,at as ur,bN as so,aL as oo,c7 as hr,bU as gr,ck as fr}from"./DnKg2UsP.js";import{dr as io,be as ao,M as lo,aC as mr,i as co}from"./Dml826jn.js";import{L as pr}from"./BpLDGdQv.js";import{C as an}from"./DypB-Dwi.js";import{b5 as kr,bK as uo,bQ as ho}from"./G3hahPKG.js";import{q as $e,d as go,g as fo}from"./UdI8St87.js";import"./CiSnSGvU.js";import{f as ke}from"./Cd_8r4jJ.js";import{e as mo}from"./MohDaz1W.js";import{T as Pr}from"./Ceq7cv95.js";import{g as Nn}from"./DR_tn5Kl.js";import{C as po}from"./C3vze1oW.js";import{C as vo}from"./Cn76YSbd.js";import{s as vr}from"./tCQts2qZ.js";import{t as Dt}from"./BCF9Fm7Q.js";import{P as _o,k as _r}from"./znAltH1L.js";import{g as wo}from"./YWYRemCe.js";import{a5 as bo,V as Co}from"./D9eQxumT.js";import{ap as yo}from"./Do-q4-tL.js";import{L as wr}from"./cKtqmo72.js";import{ad as So,ac as xo,ae as ko}from"./pBwXi0xp.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,C=a?l+c*2:b;if(r=Math.max(r,C),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+C,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Lo=[0,1e-6,.99999,1],Ho={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Ho,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Lo,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,C=a+c+p;return!(r<b-l||r>C)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:C}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(C==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let C,A;b<=0?(C=b,A="bottom"):(C=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(C>=0&&(a.fileOffset<0||C<a.fileOffset)||C<0&&a.fileOffset<0&&C>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:C,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Lr(f,r){if(new.target)return dn({component:Lr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=S(r,"change",7),C=S(r,"foldUnchanged",7,!0),A=S(r,"allowHeadReads",7,!0),F=S(r,"canReadHeadFiles",7),G=S(r,"lineWrapping",7,!1),h=S(r,"scrollToLine",7),oe=S(r,"isAggregate",7,!1),Te=S(r,"showScrollHint",7,!1),ue=S(r,"onStageHunk",7),Q=S(r,"onUnstageHunk",7),at=S(r,"onOpenCommit",7),pt=S(r,"virtualizer",7),vt=S(r,"gitRootId",7,void 0),_t=S(r,"gitRootPath",7,void 0);const ve=kr();let Re=Y(!1),Ce=Y(!1),Fe=Y(!1),Ue=Y(0),qe=Y(void 0);const $=80;function ie(){m(Ce,!0)}function De(){m(Ce,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(Ce)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(Ce))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:Ct,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let yt;return Ke==="committed"?yt=an.Committed:rt?yt=an.Staged:yt=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:yt,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:Ct},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Ht={get change(){return b()},set change(v){b(v),x()},get foldUnchanged(){return C()},set foldUnchanged(v=!0){C(v),x()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),x()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),x()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),x()},get scrollToLine(){return h()},set scrollToLine(v){h(v),x()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),x()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),x()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),x()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),x()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),x()},get virtualizer(){return pt()},set virtualizer(v){pt(v),x()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),x()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),x()},$set:un,$on:(v,_e)=>hn(r,v,_e)},He=To();let wt;var It=N(He);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Lt)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return C()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var Ct=y(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=y(At);H(Ke),H(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(Ct,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(Ct=>K(Qe,Ct),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}H(He),on(He,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(He,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(He,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",He,ie),sn("mouseleave",He,De),sn("wheel",He,Le),ln("focusin",He,jt),ln("focusout",He,qt),w(f,He);var mn=fn(Ht);return c(),mn}xr(["focusin","focusout"]);function Cr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
|
|
1
|
+
var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,br as S,a_ as M,bp as P,bz as un,bt as On,b as hn,bv as je}from"./CEL6QztG.js";import{ai as xr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as H,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as Y,aA as x,ay as ne,bS as y,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Ln,a as Us,be as Tt,b$ as ft,bf as or}from"./DYhIMPy1.js";import{v as En,u as Ve,n as Pt,p as Hn,I as ir,g as ar,w as lr}from"./yn6WWSq8.js";import{I as cn,F as Ws,c as Bs,t as Rt}from"./wwtnRh6M.js";import{b as on}from"./BaIAhI85.js";import{Ik as Me,eD as Vs,eu as Ks,ev as js,oz as qs,no as Vt,ns as cr,nr as In,ex as Gs,uQ as Qs,uR as Xs,uT as Ys,Go as Zs,Ip as Js,rg as eo,eC as to}from"./DYfeeu3f.js";import{c as no}from"./CV0Fs-12.js";import{F as Ne,Z as ro,a4 as An,as as dr,at as ur,bN as so,aL as oo,c7 as hr,bU as gr,ck as fr}from"./DnKg2UsP.js";import{dr as io,be as ao,M as lo,aC as mr,i as co}from"./Dml826jn.js";import{L as pr}from"./BpLDGdQv.js";import{C as an}from"./DypB-Dwi.js";import{b5 as kr,bK as uo,bQ as ho}from"./qS-FFtmP.js";import{q as $e,d as go,g as fo}from"./ClsZKLeX.js";import"./CiSnSGvU.js";import{f as ke}from"./Cd_8r4jJ.js";import{e as mo}from"./QGl-Xn9g.js";import{T as Pr}from"./BUfNF6yo.js";import{g as Nn}from"./DR_tn5Kl.js";import{C as po}from"./C3vze1oW.js";import{C as vo}from"./Cn76YSbd.js";import{s as vr}from"./81XDh255.js";import{t as Dt}from"./BCF9Fm7Q.js";import{P as _o,k as _r}from"./BgVKKIhh.js";import{g as wo}from"./YWYRemCe.js";import{a5 as bo,V as Co}from"./D2R9j_dh.js";import{ap as yo}from"./C27VjfPV.js";import{L as wr}from"./Dq3t5TwZ.js";import{ad as So,ac as xo,ae as ko}from"./DIHTPxGm.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,C=a?l+c*2:b;if(r=Math.max(r,C),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+C,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Lo=[0,1e-6,.99999,1],Ho={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Ho,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Lo,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,C=a+c+p;return!(r<b-l||r>C)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:C}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(C==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let C,A;b<=0?(C=b,A="bottom"):(C=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(C>=0&&(a.fileOffset<0||C<a.fileOffset)||C<0&&a.fileOffset<0&&C>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:C,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Lr(f,r){if(new.target)return dn({component:Lr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=S(r,"change",7),C=S(r,"foldUnchanged",7,!0),A=S(r,"allowHeadReads",7,!0),F=S(r,"canReadHeadFiles",7),G=S(r,"lineWrapping",7,!1),h=S(r,"scrollToLine",7),oe=S(r,"isAggregate",7,!1),Te=S(r,"showScrollHint",7,!1),ue=S(r,"onStageHunk",7),Q=S(r,"onUnstageHunk",7),at=S(r,"onOpenCommit",7),pt=S(r,"virtualizer",7),vt=S(r,"gitRootId",7,void 0),_t=S(r,"gitRootPath",7,void 0);const ve=kr();let Re=Y(!1),Ce=Y(!1),Fe=Y(!1),Ue=Y(0),qe=Y(void 0);const $=80;function ie(){m(Ce,!0)}function De(){m(Ce,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(Ce)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(Ce))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:Ct,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let yt;return Ke==="committed"?yt=an.Committed:rt?yt=an.Staged:yt=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:yt,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:Ct},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Ht={get change(){return b()},set change(v){b(v),x()},get foldUnchanged(){return C()},set foldUnchanged(v=!0){C(v),x()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),x()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),x()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),x()},get scrollToLine(){return h()},set scrollToLine(v){h(v),x()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),x()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),x()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),x()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),x()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),x()},get virtualizer(){return pt()},set virtualizer(v){pt(v),x()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),x()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),x()},$set:un,$on:(v,_e)=>hn(r,v,_e)},He=To();let wt;var It=N(He);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Lt)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return C()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var Ct=y(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=y(At);H(Ke),H(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(Ct,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(Ct=>K(Qe,Ct),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}H(He),on(He,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(He,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(He,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",He,ie),sn("mouseleave",He,De),sn("wheel",He,Le),ln("focusin",He,jt),ln("focusout",He,qt),w(f,He);var mn=fn(Ht);return c(),mn}xr(["focusin","focusout"]);function Cr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
|
|
2
2
|
`):[],a=r?r.split(`
|
|
3
3
|
`):[];if(l.length===0&&a.length===0)return[];const c=[];for(const p of l)c.push({type:"Deletion",content:p});for(const p of a)c.push({type:"Addition",content:p});return[{oldStart:1,oldLines:l.length,newStart:1,newLines:a.length,lines:c}]}function Mo(f){if(!f||f.length===0)return[];const r=[];for(const a of f){let c=a.change.chunks||[];c.length===0&&(a.change.oldContent!=null||a.change.newContent!=null)&&(c=zo(a.change.oldContent??"",a.change.newContent??"")),c.forEach((p,b)=>{r.push({hunk:p,stage:a.category,part:a,hunkIndex:b})})}if(r.length===0)return[];r.sort((a,c)=>a.hunk.newStart-c.hunk.newStart);const l=[];for(const{hunk:a,stage:c,hunkIndex:p}of r){const C=Do(a).map(A=>({type:A.type,content:A.content,oldLineNumber:A.oldLineNumber,newLineNumber:A.newLineNumber,stage:c,hunkIndex:p}));l.push({headStart:a.oldStart,headLines:a.oldLines,wtStart:a.newStart,wtLines:a.newLines,lines:C,stages:new Set([c])})}return $o(l)}function $o(f){if(f.length<=1)return f;const r=[];let l=f[0];for(let a=1;a<f.length;a++){const c=f[a],p=l.wtStart+l.wtLines;c.wtStart<=p+3?l=Fo(l,c):(r.push(l),l=c)}return r.push(l),r}function Fo(f,r){const l=new Map,a=new Map,c=new Set;for(const h of f.lines)c.add(Cr(h)),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h);const p=[...f.lines];for(const h of r.lines){const oe=Cr(h);if(!c.has(oe)){if(h.type==="Context"){const Te=h.newLineNumber!==void 0?l.get(h.newLineNumber):void 0,ue=h.oldLineNumber!==void 0?a.get(h.oldLineNumber):void 0;if(Te?.type==="Context"||ue?.type==="Context"){c.add(oe);continue}}p.push(h),c.add(oe),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h)}}p.sort((h,oe)=>{const Te=h.newLineNumber??h.oldLineNumber??0,ue=oe.newLineNumber??oe.oldLineNumber??0;return Te-ue});const b=new Set([...f.stages,...r.stages]),C=Math.min(f.headStart,r.headStart),A=Math.min(f.wtStart,r.wtStart),F=Math.max(f.headStart+f.headLines,r.headStart+r.headLines),G=Math.max(f.wtStart+f.wtLines,r.wtStart+r.wtLines);return{headStart:C,headLines:F-C,wtStart:A,wtLines:G-A,lines:p,stages:b}}function Uo(f){const r=[],l=[];let a=f[0]?.headStart??1,c=f[0]?.wtStart??1;const p=(b,C,A)=>{let F=C;for(;F<A;)b.push(""),F++;return F};for(const b of f){a=p(r,a,b.headStart),c=p(l,c,b.wtStart);for(const C of b.lines)C.type==="Context"?(C.oldLineNumber!==void 0&&(a=p(r,a,C.oldLineNumber)),C.newLineNumber!==void 0&&(c=p(l,c,C.newLineNumber)),r.push(C.content),l.push(C.content),a++,c++):C.type==="Deletion"?(C.oldLineNumber!==void 0&&(a=p(r,a,C.oldLineNumber)),r.push(C.content),a++):C.type==="Addition"&&(C.newLineNumber!==void 0&&(c=p(l,c,C.newLineNumber)),l.push(C.content),c++)}return{oldContent:r.join(`
|
|
4
4
|
`),newContent:l.join(`
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import{t as He,br as v,bp as d,a_ as be,bz as je,b as Ze,bu as or,bv as _t,bt as Ur}from"./CEL6QztG.js";import{bs as Xe,ay as X,be as ut,b$ as nt,b_ as q,bO as Y,W as y,bS as m,aD as e,a7 as ht,bl as xe,bn as Ye,c9 as c,aA as p,aB as re,ca as Le,c0 as pt,bH as s,a5 as oe,bA as ne,bV as V,br as Ct,bk as Ar,bj as Br,bf as Lo,bo as Nr,c5 as kt,aw as Yt,bz as Fo,cd as qt}from"./DYhIMPy1.js";import{c as Q}from"./B4USm-wY.js";import{n as yr,p as Ro,v as Lt,u as Me,w as So,I as To,g as It}from"./yn6WWSq8.js";import{b as wt}from"./BaIAhI85.js";import{d as xr}from"./CUIX5TSy.js";import{H as $o,G as Uo,I as Ao}from"./CuEQVba7.js";import{c as nr}from"./ChTqQfQN.js";import{a as Bo}from"./CC7to1B5.js";import{f as Be,bc as No}from"./Cd_8r4jJ.js";import{k as st}from"./Cn76YSbd.js";import{s as Oo}from"./CiSnSGvU.js";import{cj as Or,F as _e,a4 as Mo,aV as Do,an as Ko,cE as Vo,aI as Wo,aW as Jt,Y as ar,_ as ir,aZ as Mr,as as zo,ay as Dr,cN as Go,cc as Kr,bN as Vr,ch as qo}from"./DnKg2UsP.js";import"./D-Brs8OV.js";import{Ik as Pe,fL as Ho,br as jo,z2 as Zo,yq as Xo,Kj as Cr,dI as Yo,bL as Jo,Ki as Qo,ua as en,Kg as kr,gr as tn,tx as rn,Kh as on,JY as Ir,Kf as Er}from"./DYfeeu3f.js";import"./zKAv0Iid.js";import{R as nn,k as Ht,l as dt,j as an,i as qe,p as Wr,h as zr,K as sn,m as ln,o as dn,n as un,M as Gr,d as cn}from"./BCF9Fm7Q.js";import{a as qr,B as Et}from"./BvFAWM27.js";import{cq as fn}from"./C43c9gOy.js";import{a2 as gn,t as vn}from"./D2R9j_dh.js";import{w as pn,K as wn}from"./C3cmIhWo.js";import{I as $t}from"./DXDNvQ8c.js";import{d as bn}from"./DbXcLBX5.js";import{a2 as mn,ab as _n}from"./BgVKKIhh.js";import{i as Qt}from"./CsUbymBr.js";import{i as hn,a as yn}from"./DsgX6aFj.js";import{B as xn,m as Cn,n as kn}from"./QGl-Xn9g.js";import"./CGjjowC8.js";import{t as Ke}from"./wwtnRh6M.js";import{M as Hr}from"./DSLbxDPz.js";import"./BAnLxjCI.js";import"./Bsy-6OEk.js";import{b as In}from"./CbM8k2mZ.js";import"./BYddvidz.js";import{o as Pr,s as lt,n as St}from"./CIyUrgF0.js";import{g as En}from"./DfN8_dcw.js";import{f as Pn}from"./seqIFXVs.js";import{ax as Ln,$ as Fn}from"./C27VjfPV.js";import{aO as Rn}from"./Dml826jn.js";function Sn(o,r){return o.loadURL(r)}function Tn(o){return{previousUrlProp:o||null}}function Lr(o,r){o.previousUrlProp=r}function $n(o,r,i){const b=i||r;return o.previousUrlProp===b?null:(o.previousUrlProp=b,b)}function Un(o,r,i){return r?o.previousUrlProp===null?(o.previousUrlProp=r,{shouldLoad:!1,targetUrl:null}):r===o.previousUrlProp?{shouldLoad:!1,targetUrl:null}:i.webviewReady?(o.previousUrlProp=r,i.isValidBrowserUrl(r)?{shouldLoad:!0,targetUrl:r}:{shouldLoad:!1,targetUrl:null}):{shouldLoad:!1,targetUrl:null}:{shouldLoad:!1,targetUrl:null}}const jr=nr("TabBoundsReporter"),An=150;function jt(o,r,i){!(r>0)||!(i>0)||window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o,width:r,height:i}).catch(b=>{jr.debug("Failed to report tab bounds",{tabId:o,error:b})})}function Fr(o){window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o}).catch(r=>{jr.debug("Failed to clear tab bounds",{tabId:o,error:r})})}function Bn(o,r){let i=r,b;const x=typeof ResizeObserver>"u"?void 0:new ResizeObserver(C=>{if(!i)return;const h=C[C.length-1]?.contentRect;if(!h)return;const N=i;clearTimeout(b),b=setTimeout(()=>{jt(N,h.width,h.height)},An)});if(x?.observe(o),i){const C=o.getBoundingClientRect();jt(i,C.width,C.height)}return{update(C){if(C!==i&&(clearTimeout(b),i&&Fr(i),i=C,i)){const h=o.getBoundingClientRect();jt(i,h.width,h.height)}},destroy(){clearTimeout(b),x?.disconnect(),i&&Fr(i)}}}function Zr(o){let r=o.trim();if(!r)return null;/^[a-z][a-z0-9+.-]*:\/\//i.test(r)||(r=(r.includes("localhost")||r.includes("127.0.0.1")||r.includes("0.0.0.0")?"http://":"https://")+r);try{return new URL(r),r}catch{return null}}function ot(o,r=typeof window<"u"?window.location.origin:""){return o==="about:blank"||Xr(o,r)}function Xr(o,r=typeof window<"u"?window.location.origin:""){if(!o)return!1;try{const i=new URL(o);return qr.NAVIGATION_ALLOWED.includes(i.protocol)&&i.origin!==r}catch{return!1}}const er="__INTENT_PANEL_BRACKET__:",Nn=`
|
|
2
|
+
(function() {
|
|
3
|
+
if (window.__augmentKeyboardInterceptorInstalled) return;
|
|
4
|
+
window.__augmentKeyboardInterceptorInstalled = true;
|
|
5
|
+
function forwardPanelShortcut(e) {
|
|
6
|
+
e.preventDefault();
|
|
7
|
+
e.stopPropagation();
|
|
8
|
+
console.log(
|
|
9
|
+
'${er}' +
|
|
10
|
+
[
|
|
11
|
+
e.key,
|
|
12
|
+
e.shiftKey ? '1' : '0',
|
|
13
|
+
e.metaKey ? '1' : '0',
|
|
14
|
+
e.ctrlKey ? '1' : '0',
|
|
15
|
+
e.altKey ? '1' : '0',
|
|
16
|
+
].join(':')
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
document.addEventListener('keydown', function(e) {
|
|
20
|
+
const isMod = e.metaKey || e.ctrlKey;
|
|
21
|
+
// Cmd+W / Ctrl+W - close tab
|
|
22
|
+
if (isMod && (e.key === 'w' || e.key === 'W')) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
console.log('__INTENT_CLOSE_TAB__');
|
|
26
|
+
}
|
|
27
|
+
// Cmd+R / Ctrl+R / F5 - refresh browser
|
|
28
|
+
if (e.key === 'F5' || (isMod && (e.key === 'r' || e.key === 'R'))) {
|
|
29
|
+
e.preventDefault();
|
|
30
|
+
e.stopPropagation();
|
|
31
|
+
console.log('__INTENT_REFRESH__');
|
|
32
|
+
}
|
|
33
|
+
// Cmd+L / Ctrl+L - edit the current address
|
|
34
|
+
if (isMod && !e.shiftKey && !e.altKey && (e.key === 'l' || e.key === 'L')) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
e.stopPropagation();
|
|
37
|
+
console.log('__INTENT_FOCUS_URL__');
|
|
38
|
+
}
|
|
39
|
+
// Forward pane (Mod+[ ]) and workspace-tab (Mod+Shift+[ ]) bracket shortcuts.
|
|
40
|
+
if (isMod && !e.altKey && ['[', ']', '{', '}'].includes(e.key)) {
|
|
41
|
+
forwardPanelShortcut(e);
|
|
42
|
+
}
|
|
43
|
+
// Forward column focus (Mod+Alt+Left/Right). Mod is Cmd on macOS and Ctrl elsewhere,
|
|
44
|
+
// so Ctrl+Opt+Arrow on a Mac stays with the page.
|
|
45
|
+
const isMac = /mac/i.test(navigator.platform);
|
|
46
|
+
const isPlatformMod = isMac ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey;
|
|
47
|
+
if (
|
|
48
|
+
isPlatformMod &&
|
|
49
|
+
e.altKey &&
|
|
50
|
+
!e.shiftKey &&
|
|
51
|
+
(e.key === 'ArrowLeft' || e.key === 'ArrowRight')
|
|
52
|
+
) {
|
|
53
|
+
forwardPanelShortcut(e);
|
|
54
|
+
}
|
|
55
|
+
// Cmd+Shift+C / Ctrl+Shift+C - copy current browser URL
|
|
56
|
+
if (isMod && e.shiftKey && !e.altKey && (e.key === 'c' || e.key === 'C')) {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
e.stopPropagation();
|
|
59
|
+
console.log('__INTENT_COPY_URL__');
|
|
60
|
+
}
|
|
61
|
+
// Cmd+Option+I / Ctrl+Shift+I - open devtools
|
|
62
|
+
if ((e.metaKey && e.altKey && (e.key === 'i' || e.key === 'I')) ||
|
|
63
|
+
(e.ctrlKey && e.shiftKey && (e.key === 'i' || e.key === 'I'))) {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
console.log('__INTENT_DEVTOOLS__');
|
|
67
|
+
}
|
|
68
|
+
}, true);
|
|
69
|
+
})();
|
|
70
|
+
`;function On(o){if(!o.startsWith(er))return null;const[r,i,b,x,C]=o.slice(er.length).split(":");return r?{key:r,shiftKey:i==="1",metaKey:b==="1",ctrlKey:x==="1",altKey:C==="1"}:null}function Mn(o){return!o.altKey||o.metaKey||o.ctrlKey?null:o.key==="ArrowLeft"?"back":o.key==="ArrowRight"?"forward":null}const Ut=[{id:"iphone-se",name:"iPhone SE",category:"phone",width:375,height:667},{id:"iphone-15",name:"iPhone 15",category:"phone",width:393,height:852},{id:"pixel-8",name:"Pixel 8",category:"phone",width:412,height:915},{id:"ipad-mini",name:"iPad Mini",category:"tablet",width:768,height:1024},{id:"ipad-pro-11",name:"iPad Pro 11″",category:"tablet",width:834,height:1194},{id:"desktop-1280x800",name:"1280 × 800",category:"desktop",width:1280,height:800},{id:"desktop-1440x900",name:"1440 × 900",category:"desktop",width:1440,height:900}];function Dn(o){return{...o,width:o.height,height:o.width}}var Kn=re('<span class="min-w-0 flex-1 truncate"> </span> <span class="type-caption ml-3 text-muted-foreground"> </span>',1),Zt=re("<!> <!> <!>",1),Vn=re('<span class="min-w-0 flex-1"> </span> <span class="type-caption text-muted-foreground"> </span>',1),Xt=re("<!> <!>",1);function sr(o,r){if(new.target)return He({component:sr,...o});Xe(r,!0);let i=v(r,"viewport",7),b=v(r,"onViewportChange",7),x=v(r,"onCustom",7);const C=["phone","tablet","desktop"],h=c(()=>i().mode==="fit"?"fit":i().mode==="preset"?i().presetId:"custom");function N(_){if(_==="fit")return b()({mode:"fit"});const k=Ut.find(j=>j.id===_);k&&b()({mode:"preset",presetId:k.id,width:k.width,height:k.height})}var w={get viewport(){return i()},set viewport(_){i(_),p()},get onViewportChange(){return b()},set onViewportChange(_){b(_),p()},get onCustom(){return x()},set onCustom(_){x(_),p()},$set:je,$on:(_,k)=>Ze(r,_,k)},f=Zt(),$=X(f);Q($,()=>nn,(_,k)=>{k(_,{get value(){return e(h)},onValueChange:N,children:(j,T)=>{var R=Zt(),I=X(R);Q(I,()=>Ht,(J,D)=>{D(J,{value:"fit",children:(u,z)=>{ut();var M=nt();q(ee=>Y(M,ee),[()=>d.browser_viewport_fitPanel_label()]),y(u,M)},$$slots:{default:!0}})});var H=m(I,2);yr(H,17,()=>C,Ro,(J,D)=>{var u=Zt(),z=X(u);Q(z,()=>dt,(B,te)=>{te(B,{})});var M=m(z,2);Q(M,()=>an,(B,te)=>{te(B,{children:(a,E)=>{ut();var Z=nt();q(le=>Y(Z,le),[()=>e(D)==="phone"?d.browser_viewport_phoneGroup_label():e(D)==="tablet"?d.browser_viewport_tabletGroup_label():d.browser_viewport_desktopGroup_label()]),y(a,Z)},$$slots:{default:!0}})});var ee=m(M,2);yr(ee,17,()=>Ut.filter(B=>B.category===e(D)),B=>B.id,(B,te)=>{var a=ht(),E=X(a);Q(E,()=>Ht,(Z,le)=>{le(Z,{get value(){return e(te).id},children:(G,U)=>{var F=Kn(),l=X(F),L=xe(l,!0),S=m(l,2),we=xe(S,!0);q(he=>{Y(L,e(te).name),Y(we,he)},[()=>d.browser_viewport_dimensions_label({width:Ke(e(te).width),height:Ke(e(te).height)})]),y(G,F)},$$slots:{default:!0}})}),y(B,a)}),y(J,u)});var ae=m(H,2);{var ie=J=>{var D=Xt(),u=X(D);Q(u,()=>dt,(M,ee)=>{ee(M,{})});var z=m(u,2);Q(z,()=>Ht,(M,ee)=>{ee(M,{value:"custom",get onSelect(){return x()},children:(B,te)=>{var a=Vn(),E=X(a),Z=xe(E,!0),le=m(E,2),G=xe(le,!0);q((U,F)=>{Y(Z,U),Y(G,F)},[()=>d.browser_viewport_custom_label(),()=>d.browser_viewport_dimensions_label({width:Ke(i().width),height:Ke(i().height)})]),y(B,a)},$$slots:{default:!0}})}),y(J,D)};be(ae,J=>{i().mode==="custom"&&J(ie)})}y(j,R)},$$slots:{default:!0}})});var A=m($,2);{var W=_=>{var k=Xt(),j=X(k);Q(j,()=>dt,(R,I)=>{I(R,{})});var T=m(j,2);Q(T,()=>qe,(R,I)=>{I(R,{get onSelect(){return x()},children:(H,ae)=>{ut();var ie=nt();q(J=>Y(ie,J),[()=>d.browser_viewport_custom_label()]),y(H,ie)},$$slots:{default:!0}})}),y(_,k)};be(A,_=>{i().mode!=="custom"&&_(W)})}var P=m(A,2);{var O=_=>{var k=Xt(),j=X(k);Q(j,()=>dt,(R,I)=>{I(R,{})});var T=m(j,2);{let R=c(()=>d.browser_viewport_rotate_label());Q(T,()=>Hr,(I,H)=>{H(I,{get icon(){return Or},get label(){return e(R)},onSelect:()=>b()(Dn(i()))})})}y(_,k)};be(P,_=>{i().mode!=="fit"&&_(O)})}return y(o,f),Ye(w)}var Wn=re('<div class="grid grid-cols-2 gap-3"><label class="space-y-1 type-caption"><span> </span> <!></label> <label class="space-y-1 type-caption"><span> </span> <!></label></div>');function lr(o,r){if(new.target)return He({component:lr,...o});Xe(r,!0);let i=v(r,"open",15,!1),b=v(r,"viewport",7),x=v(r,"onViewportChange",7),C=v(r,"returnFocus",7);const h=320,N=3840;let w=V(1280),f=V(800),$=V(null);function A(_){return typeof _=="number"&&Number.isInteger(_)&&_>=h&&_<=N}const W=c(()=>A(e(w))&&A(e(f)));Le(()=>{if(i())return()=>{pt().then(()=>{C()?.isConnected&&C().focus()})}}),Le(()=>{i()||(s(w,b().mode==="fit"?1280:b().width,!0),s(f,b().mode==="fit"?800:b().height,!0))});function P(){!e(W)||e(w)===null||e(f)===null||(x()({mode:"custom",width:e(w),height:e(f)}),i(!1))}var O={get open(){return i()},set open(_=!1){i(_),p()},get viewport(){return b()},set viewport(_){b(_),p()},get onViewportChange(){return x()},set onViewportChange(_){x(_),p()},get returnFocus(){return C()},set returnFocus(_){C(_),p()},$set:je,$on:(_,k)=>Ze(r,_,k)};{let _=c(()=>d.browser_viewport_custom_label()),k=c(()=>d.browser_viewport_sizeRange_description({min:Ke(h),max:Ke(N)})),j=c(()=>d.browser_viewport_apply_label());In(o,{get title(){return e(_)},get description(){return e(k)},get submitLabel(){return e(j)},get canSubmit(){return e(W)},onSubmit:P,get initialFocus(){return e($)},get open(){return i()},set open(T){i(T)},children:(T,R)=>{var I=Wn(),H=oe(I),ae=oe(H),ie=xe(ae,!0),J=m(ae,2);{let ee=c(()=>!A(e(w)));$t(J,{type:"number",min:h,max:N,step:"1",get"aria-invalid"(){return e(ee)},get value(){return e(w)},set value(B){s(w,B,!0)},get ref(){return e($)},set ref(B){s($,B,!0)}})}ne(H);var D=m(H,2),u=oe(D),z=xe(u,!0),M=m(u,2);{let ee=c(()=>!A(e(f)));$t(M,{type:"number",min:h,max:N,step:"1",get"aria-invalid"(){return e(ee)},get value(){return e(f)},set value(B){s(f,B,!0)}})}ne(D),ne(I),q((ee,B)=>{Y(ie,ee),Y(z,B)},[()=>d.browser_viewport_width_label(),()=>d.browser_viewport_height_label()]),y(T,I)},$$slots:{default:!0}})}return Ye(O)}var Tt=re("<!> <!>",1),rt=re("<!> ",1),zn=re('<!> <span class="min-w-0 flex-1 truncate"> </span>',1),Gn=re("<!> <!> <!> <!> <!>",1),qn=re('<!> <span class="min-w-0 flex-1"> </span> <kbd class="type-caption ml-5 text-muted-foreground" aria-hidden="true">⌘⌥I</kbd>',1),Hn=re("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function Yr(o,r){if(new.target)return He({component:Yr,...o});Xe(r,!0);let i=v(r,"errorCount",7,0),b=v(r,"disabled",7,!1),x=v(r,"collapsed",7,!1),C=v(r,"canGoBack",7,!1),h=v(r,"canGoForward",7,!1),N=v(r,"canSelectElement",7,!1),w=v(r,"selectingElement",7,!1),f=v(r,"viewport",23,()=>({mode:"fit"})),$=v(r,"onGoBack",7),A=v(r,"onGoForward",7),W=v(r,"onToggleElementPicker",7),P=v(r,"onViewportChange",7),O=v(r,"onOpenExternal",7),_=v(r,"onCopyUrl",7),k=v(r,"onScreenshot",7),j=v(r,"onOpenConsole",7),T=v(r,"onOpenSource",7),R=v(r,"onOpenInspector",7),I=v(r,"onReloadWithoutCache",7);const H=c(()=>i()>0?d.browser_overflow_triggerWithErrors_ariaLabel({count:Ke(i())}):d.browser_overflow_trigger_ariaLabel()),ae=c(()=>f().mode==="preset"?Ut.find(a=>a.id===f().presetId):void 0),ie=c(()=>f().mode==="fit"?d.browser_viewport_fitPanel_label():e(ae)?.name??d.browser_viewport_dimensions_label({width:Ke(f().width),height:Ke(f().height)}));let J=V(!1),D=V(null),u=V(!1);async function z(){s(u,!1),await pt(),s(J,!0)}var M={get errorCount(){return i()},set errorCount(a=0){i(a),p()},get disabled(){return b()},set disabled(a=!1){b(a),p()},get collapsed(){return x()},set collapsed(a=!1){x(a),p()},get canGoBack(){return C()},set canGoBack(a=!1){C(a),p()},get canGoForward(){return h()},set canGoForward(a=!1){h(a),p()},get canSelectElement(){return N()},set canSelectElement(a=!1){N(a),p()},get selectingElement(){return w()},set selectingElement(a=!1){w(a),p()},get viewport(){return f()},set viewport(a={mode:"fit"}){f(a),p()},get onGoBack(){return $()},set onGoBack(a){$(a),p()},get onGoForward(){return A()},set onGoForward(a){A(a),p()},get onToggleElementPicker(){return W()},set onToggleElementPicker(a){W(a),p()},get onViewportChange(){return P()},set onViewportChange(a){P(a),p()},get onOpenExternal(){return O()},set onOpenExternal(a){O(a),p()},get onCopyUrl(){return _()},set onCopyUrl(a){_(a),p()},get onScreenshot(){return k()},set onScreenshot(a){k(a),p()},get onOpenConsole(){return j()},set onOpenConsole(a){j(a),p()},get onOpenSource(){return T()},set onOpenSource(a){T(a),p()},get onOpenInspector(){return R()},set onOpenInspector(a){R(a),p()},get onReloadWithoutCache(){return I()},set onReloadWithoutCache(a){I(a),p()},$set:je,$on:(a,E)=>Ze(r,a,E)},ee=Tt(),B=X(ee);Q(B,()=>Gr,(a,E)=>{E(a,{get open(){return e(u)},set open(Z){s(u,Z,!0)},children:(Z,le)=>{var G=Tt(),U=X(G);{const l=(L,S)=>{let we=()=>(S?.()).props;{let he=c(()=>d.browser_overflow_trigger_tooltip());Be(L,or(we,{variant:"ghost-light",size:"icon-xs",class:"relative",get disabled(){return b()},get tooltip(){return e(he)},tooltipSide:"bottom",get"aria-label"(){return e(H)},"data-testid":"browser-overflow-trigger",get ref(){return e(D)},set ref(ye){s(D,ye,!0)},children:(ye,Fe)=>{var Re=Tt(),Se=X(Re);sn(Se,{class:"size-3.5"});var Je=m(Se,2);{var Te=Ce=>{xn(Ce,{variant:"destructive",class:"absolute -right-1.5 -top-1.5 h-4 min-w-4 px-1 text-xs leading-none","data-testid":"browser-console-error-badge",children:(ve,Ve)=>{ut();var Qe=nt();q(et=>Y(Qe,et),[()=>i()>9?"9+":Ke(i())]),y(ve,Qe)},$$slots:{default:!0}})};be(Je,Ce=>{i()>0&&Ce(Te)})}y(ye,Re)},$$slots:{default:!0}}))}};Q(U,()=>Wr,(L,S)=>{S(L,{child:l,$$slots:{child:!0}})})}var F=m(U,2);Q(F,()=>zr,(l,L)=>{L(l,{align:"end",class:"w-56",onCloseAutoFocus:S=>e(J)&&S.preventDefault(),children:(S,we)=>{var he=Hn(),ye=X(he);{var Fe=de=>{var pe=Gn(),ke=X(pe);{let fe=c(()=>!C());Q(ke,()=>qe,(Ne,Ee)=>{Ee(Ne,{get disabled(){return e(fe)},get onSelect(){return $()},children:(at,ct)=>{var $e=rt(),De=X($e);_e(De,{get icon(){return ar},size:"xs",class:"w-4 text-muted-foreground"});var We=m(De);q(Oe=>Y(We,` ${Oe??""}`),[()=>d.browser_embedded_goBack_ariaLabel()]),y(at,$e)},$$slots:{default:!0}})})}var ze=m(ke,2);{let fe=c(()=>!h());Q(ze,()=>qe,(Ne,Ee)=>{Ee(Ne,{get disabled(){return e(fe)},get onSelect(){return A()},children:(at,ct)=>{var $e=rt(),De=X($e);_e(De,{get icon(){return ir},size:"xs",class:"w-4 text-muted-foreground"});var We=m(De);q(Oe=>Y(We,` ${Oe??""}`),[()=>d.browser_embedded_goForward_ariaLabel()]),y(at,$e)},$$slots:{default:!0}})})}var ue=m(ze,2);{let fe=c(()=>!N());Q(ue,()=>qe,(Ne,Ee)=>{Ee(Ne,{get disabled(){return e(fe)},onSelect:()=>void W()?.(),children:(at,ct)=>{var $e=rt(),De=X($e);_e(De,{get icon(){return Jt},size:"xs",class:"w-4 text-muted-foreground"});var We=m(De);q(Oe=>Y(We,` ${Oe??""}`),[()=>w()?d.browser_embedded_cancelElementSelection_ariaLabel():d.browser_embedded_selectElement_ariaLabel()]),y(at,$e)},$$slots:{default:!0}})})}var ce=m(ue,2);Q(ce,()=>ln,(fe,Ne)=>{Ne(fe,{children:(Ee,at)=>{var ct=Tt(),$e=X(ct);{let We=c(()=>!P());Q($e,()=>dn,(Oe,ft)=>{ft(Oe,{get disabled(){return e(We)},children:(bt,gt)=>{var yt=zn(),mt=X(yt);_e(mt,{get icon(){return Mr},size:"xs",class:"w-4 text-muted-foreground"});var xt=m(mt,2),Bt=xe(xt,!0);q(Ft=>Y(Bt,Ft),[()=>d.browser_viewport_trigger_ariaLabel({mode:e(ie)})]),y(bt,yt)},$$slots:{default:!0}})})}var De=m($e,2);Q(De,()=>un,(We,Oe)=>{Oe(We,{class:"w-64",children:(ft,bt)=>{sr(ft,{get viewport(){return f()},onViewportChange:gt=>P()?.(gt),onCustom:z})},$$slots:{default:!0}})}),y(Ee,ct)},$$slots:{default:!0}})});var Ie=m(ce,2);Q(Ie,()=>dt,(fe,Ne)=>{Ne(fe,{})}),y(de,pe)};be(ye,de=>{x()&&de(Fe)})}var Re=m(ye,2);Q(Re,()=>qe,(de,pe)=>{pe(de,{onSelect:()=>void O()(),children:(ke,ze)=>{var ue=rt(),ce=X(ue);_e(ce,{get icon(){return Mo},size:"xs",class:"w-4 text-muted-foreground"});var Ie=m(ce);q(fe=>Y(Ie,` ${fe??""}`),[()=>d.browser_overflow_openExternal_label()]),y(ke,ue)},$$slots:{default:!0}})});var Se=m(Re,2);Q(Se,()=>qe,(de,pe)=>{pe(de,{onSelect:()=>void _()(),children:(ke,ze)=>{var ue=rt(),ce=X(ue);_e(ce,{get icon(){return Do},size:"xs",class:"w-4 text-muted-foreground"});var Ie=m(ce);q(fe=>Y(Ie,` ${fe??""}`),[()=>d.browser_overflow_copyUrl_label()]),y(ke,ue)},$$slots:{default:!0}})});var Je=m(Se,2);Q(Je,()=>dt,(de,pe)=>{pe(de,{})});var Te=m(Je,2);Q(Te,()=>qe,(de,pe)=>{pe(de,{onSelect:()=>void k()(),children:(ke,ze)=>{var ue=rt(),ce=X(ue);_e(ce,{get icon(){return Ko},size:"xs",class:"w-4 text-muted-foreground"});var Ie=m(ce);q(fe=>Y(Ie,` ${fe??""}`),[()=>d.browser_overflow_screenshot_label()]),y(ke,ue)},$$slots:{default:!0}})});var Ce=m(Te,2);Q(Ce,()=>dt,(de,pe)=>{pe(de,{})});var ve=m(Ce,2);Q(ve,()=>qe,(de,pe)=>{pe(de,{onSelect:()=>void j()(),children:(ke,ze)=>{var ue=rt(),ce=X(ue);_e(ce,{get icon(){return Vo},size:"xs",class:"w-4 text-muted-foreground"});var Ie=m(ce);q(fe=>Y(Ie,` ${fe??""}`),[()=>d.browser_overflow_console_label()]),y(ke,ue)},$$slots:{default:!0}})});var Ve=m(ve,2);Q(Ve,()=>qe,(de,pe)=>{pe(de,{onSelect:()=>void T()(),children:(ke,ze)=>{var ue=rt(),ce=X(ue);_e(ce,{get icon(){return Wo},size:"xs",class:"w-4 text-muted-foreground"});var Ie=m(ce);q(fe=>Y(Ie,` ${fe??""}`),[()=>d.browser_overflow_source_label()]),y(ke,ue)},$$slots:{default:!0}})});var Qe=m(Ve,2);Q(Qe,()=>qe,(de,pe)=>{pe(de,{onSelect:()=>void R()(),children:(ke,ze)=>{var ue=qn(),ce=X(ue);_e(ce,{get icon(){return Jt},size:"xs",class:"w-4 text-muted-foreground"});var Ie=m(ce,2),fe=xe(Ie,!0);ut(2),q(Ne=>Y(fe,Ne),[()=>d.browser_overflow_inspector_label()]),y(ke,ue)},$$slots:{default:!0}})});var et=m(Qe,2);Q(et,()=>dt,(de,pe)=>{pe(de,{})});var At=m(et,2);Q(At,()=>qe,(de,pe)=>{pe(de,{onSelect:()=>void I()(),children:(ke,ze)=>{var ue=rt(),ce=X(ue);_e(ce,{get icon(){return Or},size:"xs",class:"w-4 text-muted-foreground"});var Ie=m(ce);q(fe=>Y(Ie,` ${fe??""}`),[()=>d.browser_overflow_reloadWithoutCache_label()]),y(ke,ue)},$$slots:{default:!0}})}),y(S,he)},$$slots:{default:!0}})}),y(Z,G)},$$slots:{default:!0}})});var te=m(B,2);return lr(te,{get viewport(){return f()},onViewportChange:a=>P()?.(a),get returnFocus(){return e(D)},get open(){return e(J)},set open(a){s(J,a,!0)}}),y(o,ee),Ye(M)}var jn=re('<span class="truncate"> </span> <!>',1),Rr=re("<!> <!>",1);function Jr(o,r){if(new.target)return He({component:Jr,...o});Xe(r,!0);let i=v(r,"viewport",7),b=v(r,"onViewportChange",7),x=V(!1),C=V(!1),h=V(null);const N=c(()=>i().mode==="preset"?Ut.find(k=>k.id===i().presetId):void 0),w=c(()=>i().mode==="fit"?"":d.browser_viewport_dimensions_label({width:Ke(i().width),height:Ke(i().height)})),f=c(()=>i().mode==="fit"?d.browser_viewport_fit_short_label():i().mode==="preset"&&e(N)?e(N).name:e(w)),$=c(()=>i().mode==="fit"?d.browser_viewport_fitPanel_label():e(f));async function A(){s(x,!1),await pt(),s(C,!0)}var W={get viewport(){return i()},set viewport(k){i(k),p()},get onViewportChange(){return b()},set onViewportChange(k){b(k),p()},$set:je,$on:(k,j)=>Ze(r,k,j)},P=Rr(),O=X(P);Q(O,()=>Gr,(k,j)=>{j(k,{get open(){return e(x)},set open(T){s(x,T,!0)},children:(T,R)=>{var I=Rr(),H=X(I);{const ie=(J,D)=>{let u=()=>(D?.()).props;{let z=c(()=>d.browser_viewport_trigger_ariaLabel({mode:e($)}));Be(J,or(u,{variant:"ghost-light",size:"xs",class:"h-6 max-w-36 gap-1 rounded-full bg-muted px-2 text-xs hover:bg-muted/80",get"aria-label"(){return e(z)},"data-testid":"browser-viewport-trigger",get ref(){return e(h)},set ref(M){s(h,M,!0)},children:(M,ee)=>{var B=jn(),te=X(B),a=xe(te,!0),E=m(te,2);_e(E,{get icon(){return zo},size:"xs",class:"shrink-0"}),q(()=>Y(a,e(f))),y(M,B)},$$slots:{default:!0}}))}};Q(H,()=>Wr,(J,D)=>{D(J,{child:ie,$$slots:{child:!0}})})}var ae=m(H,2);Q(ae,()=>zr,(ie,J)=>{J(ie,{align:"end",class:"w-64",onCloseAutoFocus:D=>e(C)&&D.preventDefault(),children:(D,u)=>{sr(D,{get viewport(){return i()},get onViewportChange(){return b()},onCustom:A})},$$slots:{default:!0}})}),y(T,I)},$$slots:{default:!0}})});var _=m(O,2);return lr(_,{get viewport(){return i()},get onViewportChange(){return b()},get returnFocus(){return e(h)},get open(){return e(C)},set open(k){s(C,k,!0)}}),y(o,P),Ye(W)}var Zn=re('<span class="pointer-events-none absolute bottom-1 left-1/2 z-10 -translate-x-1/2 rounded bg-background/90 px-1.5 py-0.5 text-xs text-muted-foreground shadow-sm backdrop-blur" data-browser-viewport-readout=""> </span> <!>',1),Xn=re('<div data-browser-device-frame-container=""><div><!> <!></div></div>');function Qr(o,r){if(new.target)return He({component:Qr,...o});Xe(r,!0);const i=320,b=3840,x=150;let C=v(r,"viewport",7),h=v(r,"onViewportChange",7),N=v(r,"children",7),w=V(Ct(C().mode==="fit"?i:C().width)),f=V(Ct(C().mode==="fit"?i:C().height)),$,A=V(0),W=V(0),P=V(!1),O=null,_=0,k=0,j=0,T=0,R;const I=c(()=>C().mode==="fit"),H=c(()=>d.browser_viewport_dimensions_label({width:Ke(e(w)),height:Ke(e(f))})),ae=c(()=>!e(I)&&e(A)>0&&e(W)>0?Math.min(1,e(A)/e(w),e(W)/e(f)):1),ie=c(()=>e(w)*e(ae)),J=c(()=>e(f)*e(ae));Le(()=>{e(P)||C().mode==="fit"||(s(w,C().width,!0),s(f,C().height,!0))});function D(F){return Math.min(b,Math.max(i,Math.round(F)))}function u(){h()({mode:"custom",width:e(w),height:e(f)})}function z(){clearTimeout(R),R=setTimeout(u,x)}function M(F){e(I)||F.button!==0||(F.preventDefault(),s(P,!0),O=F.pointerId,_=F.clientX,k=F.clientY,j=e(w),T=e(f),F.currentTarget instanceof HTMLElement&&F.currentTarget.setPointerCapture?.(F.pointerId))}function ee(F){!e(P)||F.pointerId!==O||(s(w,D(j+F.clientX-_),!0),s(f,D(T+F.clientY-k),!0),z())}function B(F){if(!e(P)||F.pointerId!==O)return;clearTimeout(R),s(P,!1),O=null;const l=F.currentTarget;l instanceof HTMLElement&&l.hasPointerCapture?.(F.pointerId)&&l.releasePointerCapture&&l.releasePointerCapture(F.pointerId),u()}Ar(()=>{const F=(L,S)=>{s(A,L,!0),s(W,S,!0)};F($.clientWidth,$.clientHeight);const l=typeof ResizeObserver>"u"?void 0:new ResizeObserver(([L])=>{F(L?.contentRect.width??$.clientWidth,L?.contentRect.height??$.clientHeight)});return l?.observe($),()=>l?.disconnect()}),Br(()=>clearTimeout(R));var te={get viewport(){return C()},set viewport(F){C(F),p()},get onViewportChange(){return h()},set onViewportChange(F){h(F),p()},get children(){return N()},set children(F){N(F),p()},$set:je,$on:(F,l)=>Ze(r,F,l)},a=Xn(),E=oe(a);let Z;var le=oe(E);Oo(le,()=>N()??Lo);var G=m(le,2);{var U=F=>{var l=Zn(),L=X(l),S=xe(L,!0),we=m(L,2);{let he=c(()=>d.browser_viewport_resizeHandle_ariaLabel());Be(we,{type:"button",variant:"ghost",size:"icon-xs",iconOnly:!0,class:"absolute bottom-0 right-0 z-20 size-5 cursor-nwse-resize touch-none border-0 bg-transparent p-0 after:absolute after:bottom-1 after:right-1 after:size-2 after:border-b-2 after:border-r-2 after:border-muted-foreground",get"aria-label"(){return e(he)},"data-testid":"browser-device-resize-handle",onpointerdown:M,onpointermove:ee,onpointerup:B,onpointercancel:B})}q(()=>Y(S,e(H))),y(F,l)};be(G,F=>{e(I)||F(U)})}return ne(E),ne(a),wt(a,F=>$=F,()=>$),q(()=>{Lt(a,1,`flex h-full w-full items-center justify-center overflow-hidden ${e(I)?"bg-background":"bg-muted/40"}`),Lt(E,1,`relative overflow-hidden bg-background ${e(I)?"h-full w-full":e(P)?"ring-2 ring-primary/30":""}`),Me(E,"data-browser-device-frame",e(I)?void 0:""),Me(E,"data-width",e(I)?void 0:e(w)),Me(E,"data-height",e(I)?void 0:e(f)),Z=So(E,"",Z,{width:e(I)?void 0:`${e(ie)}px`,height:e(I)?void 0:`${e(J)}px`})}),y(o,a),Ye(te)}function eo(o,r){if(new.target)return He({component:eo,...o});Xe(r,!0);let i=v(r,"active",7),b=v(r,"disabled",7),x=v(r,"onToggle",7);var C={get active(){return i()},set active(h){i(h),p()},get disabled(){return b()},set disabled(h){b(h),p()},get onToggle(){return x()},set onToggle(h){x(h),p()},$set:je,$on:(h,N)=>Ze(r,h,N)};{let h=c(()=>i()?"bg-muted text-foreground":""),N=c(()=>i()?d.browser_embedded_cancelElementSelection_tooltip():d.browser_embedded_selectElement_tooltip()),w=c(()=>i()?d.browser_embedded_cancelElementSelection_ariaLabel():d.browser_embedded_selectElement_ariaLabel());Be(o,{variant:"ghost-light",size:"icon-xs",get class(){return e(h)},get onclick(){return x()},get disabled(){return b()},get tooltip(){return e(N)},tooltipSide:"bottom",get"aria-label"(){return e(w)},get"aria-pressed"(){return i()},"data-testid":"browser-select-element",children:(f,$)=>{_e(f,{get icon(){return Jt},size:"xs"})},$$slots:{default:!0}})}return Ye(C)}var Yn=re('<span class="sr-only"> </span>'),Jn=re('<p class="min-h-0 overflow-y-auto text-sm text-foreground [overflow-wrap:anywhere]"> </p> <!>',1),Qn=re("<!> <!>",1),ea=re('<span class="inline-flex shrink-0"><!> <!></span>');function dr(o,r){const i=Nr();if(new.target)return He({component:dr,...o});Xe(r,!0);let b=v(r,"label",7),x=v(r,"description",7),C=v(r,"ariaLabel",23,b),h=v(r,"tone",7,"info"),N=v(r,"actionLabel",7),w=v(r,"onAction",7),f=v(r,"actionFocusTarget",7),$=v(r,"descriptionId",7),A=V(!1),W=!1;async function P(){W=!0,s(A,!1),await pt(),f()?.focus(),w()?.()}var O={get label(){return b()},set label(R){b(R),p()},get description(){return x()},set description(R){x(R),p()},get ariaLabel(){return C()},set ariaLabel(R=b){C(R),p()},get tone(){return h()},set tone(R="info"){h(R),p()},get actionLabel(){return N()},set actionLabel(R){N(R),p()},get onAction(){return w()},set onAction(R){w(R),p()},get actionFocusTarget(){return f()},set actionFocusTarget(R){f(R),p()},get descriptionId(){return $()},set descriptionId(R){$(R),p()},$set:je,$on:(R,I)=>Ze(r,R,I)},_=ea(),k=oe(_);{var j=R=>{var I=Yn(),H=xe(I,!0);q(()=>{Me(I,"id",i),Me(I,"role",h()==="error"?"alert":"status"),Y(H,x())}),y(R,I)};be(k,R=>{$()||R(j)})}var T=m(k,2);return Q(T,()=>kn,(R,I)=>{I(R,{get open(){return e(A)},set open(H){s(A,H,!0)},children:(H,ae)=>{var ie=Qn(),J=X(ie);{const u=(z,M)=>{let ee=()=>(M?.()).props;{let B=c(()=>h()==="error"?"text-danger":h()==="warning"?"text-warning-ink":"text-muted-foreground"),te=c(()=>$()??i);Be(z,or(ee,{variant:"ghost-light",size:"icon-compact",wrapContent:!1,get class(){return e(B)},get"aria-label"(){return C()},get"aria-describedby"(){return e(te)},get tooltip(){return x()},get tooltipDisabled(){return e(A)},tooltipSide:"bottom",tooltipDelayDuration:300,children:(a,E)=>{{let Z=c(()=>h()==="error"?Dr:h()==="warning"?Go:Mr);_e(a,{get icon(){return e(Z)},size:"xs",class:"shrink-0"})}},$$slots:{default:!0}}))}};Q(J,()=>mn,(z,M)=>{M(z,{child:u,$$slots:{child:!0}})})}var D=m(J,2);Q(D,()=>Cn,(u,z)=>{z(u,{align:"end",class:"flex max-h-[var(--bits-popover-content-available-height,calc(100dvh-1rem))] w-72 max-w-[calc(100vw-1rem)] flex-col gap-3 p-3",get"aria-label"(){return C()},onCloseAutoFocus:M=>{W&&f()&&(M.preventDefault(),f().focus()),W=!1},children:(M,ee)=>{var B=Jn(),te=X(B),a=xe(te,!0),E=m(te,2);{var Z=le=>{Be(le,{variant:"secondary",size:"sm",class:"self-start",onclick:()=>void P(),children:(G,U)=>{ut();var F=nt();q(()=>Y(F,N())),y(G,F)},$$slots:{default:!0}})};be(E,le=>{N()&&w()&&le(Z)})}q(()=>Y(a,x())),y(M,B)},$$slots:{default:!0}})}),y(H,ie)},$$slots:{default:!0}})}),ne(_),q(()=>Me(_,"data-browser-status",h())),y(o,_),Ye(O)}function ta(o,r,i){const b=i.width>0?r.width/i.width:1,x=i.height>0?r.height/i.height:1,C=Math.max(0,Math.floor(o.x*b)),h=Math.max(0,Math.floor(o.y*x)),N=Math.min(r.width,Math.ceil((o.x+o.width)*b)),w=Math.min(r.height,Math.ceil((o.y+o.height)*x));return{x:C,y:h,width:Math.max(0,N-C),height:Math.max(0,w-h)}}const ra=Pr({selector:lt().min(1),domPath:lt().min(1),tagName:lt().min(1),id:lt(),className:lt(),textSnippet:lt().max(120),rect:Pr({x:St().finite(),y:St().finite(),width:St().finite().nonnegative(),height:St().finite().nonnegative()}).strict(),pageUrl:lt().min(1),sourceRef:lt().min(1).optional()}).strict(),Sr="__INTENT_ELEMENT_PICKED__:";function oa(o){if(o==="__INTENT_ELEMENT_PICK_CANCELLED__")return{type:"cancelled"};if(!o.startsWith(Sr))return null;let r;try{r=JSON.parse(o.slice(Sr.length))}catch{r=null}const i=ra.safeParse(r);return i.success?{type:"picked",element:i.data}:{type:"malformed",issues:i.error.issues}}const na=String.raw`
|
|
71
|
+
(function() {
|
|
72
|
+
var PICKED_PREFIX = '__INTENT_ELEMENT_PICKED__:';
|
|
73
|
+
var CANCELLED = '__INTENT_ELEMENT_PICK_CANCELLED__';
|
|
74
|
+
var existingCleanup = window.__intentElementPickerCleanup;
|
|
75
|
+
if (typeof existingCleanup === 'function') existingCleanup();
|
|
76
|
+
|
|
77
|
+
var overlay = document.createElement('div');
|
|
78
|
+
var label = document.createElement('div');
|
|
79
|
+
overlay.setAttribute('data-intent-element-picker-overlay', '');
|
|
80
|
+
overlay.style.cssText = 'position:fixed;z-index:2147483647;pointer-events:none;border:2px solid #7c3aed;background:rgba(124,58,237,.12);box-sizing:border-box;display:none;';
|
|
81
|
+
label.style.cssText = 'position:absolute;left:-2px;bottom:100%;max-width:320px;padding:2px 5px;background:#7c3aed;color:#fff;font:11px/1.4 ui-monospace,monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;';
|
|
82
|
+
overlay.appendChild(label);
|
|
83
|
+
(document.documentElement || document.body).appendChild(overlay);
|
|
84
|
+
|
|
85
|
+
function escapeCss(value) {
|
|
86
|
+
if (window.CSS && typeof window.CSS.escape === 'function') return window.CSS.escape(value);
|
|
87
|
+
return value.replace(/[^a-zA-Z0-9_-]/g, function(character) {
|
|
88
|
+
return '\\' + character;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function segment(element) {
|
|
93
|
+
var value = element.tagName.toLowerCase();
|
|
94
|
+
if (element.id) return value + '#' + escapeCss(element.id);
|
|
95
|
+
var classValue = typeof element.className === 'string' ? element.className.trim() : '';
|
|
96
|
+
if (classValue) value += '.' + classValue.split(/\s+/).map(escapeCss).join('.');
|
|
97
|
+
return value;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function uniqueSelector(element) {
|
|
101
|
+
if (element.id) {
|
|
102
|
+
var idSelector = '#' + escapeCss(element.id);
|
|
103
|
+
if (document.querySelectorAll(idSelector).length === 1) return idSelector;
|
|
104
|
+
}
|
|
105
|
+
var parts = [];
|
|
106
|
+
var current = element;
|
|
107
|
+
while (current && current.nodeType === 1) {
|
|
108
|
+
var part = segment(current);
|
|
109
|
+
var parent = current.parentElement;
|
|
110
|
+
if (parent) {
|
|
111
|
+
var siblings = Array.prototype.filter.call(parent.children, function(child) {
|
|
112
|
+
return child.tagName === current.tagName;
|
|
113
|
+
});
|
|
114
|
+
if (siblings.length > 1) part += ':nth-of-type(' + (siblings.indexOf(current) + 1) + ')';
|
|
115
|
+
}
|
|
116
|
+
parts.unshift(part);
|
|
117
|
+
var selector = parts.join(' > ');
|
|
118
|
+
try {
|
|
119
|
+
if (document.querySelectorAll(selector).length === 1) return selector;
|
|
120
|
+
} catch (_) {}
|
|
121
|
+
current = parent;
|
|
122
|
+
}
|
|
123
|
+
return parts.join(' > ');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function domPath(element) {
|
|
127
|
+
var parts = [];
|
|
128
|
+
var current = element;
|
|
129
|
+
while (current && current.nodeType === 1) {
|
|
130
|
+
parts.unshift(segment(current));
|
|
131
|
+
current = current.parentElement;
|
|
132
|
+
}
|
|
133
|
+
return parts.join('>');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function sourceReference(element) {
|
|
137
|
+
try {
|
|
138
|
+
var attribute = element.getAttribute('data-source') || element.getAttribute('data-loc');
|
|
139
|
+
if (attribute) return attribute;
|
|
140
|
+
var testId = element.getAttribute('data-testid');
|
|
141
|
+
if (testId) return 'data-testid=' + testId;
|
|
142
|
+
} catch (_) {}
|
|
143
|
+
try {
|
|
144
|
+
var svelteLoc = element.__svelte_meta && element.__svelte_meta.loc;
|
|
145
|
+
if (svelteLoc && svelteLoc.file) {
|
|
146
|
+
return svelteLoc.file + (svelteLoc.line == null ? '' : ':' + svelteLoc.line + ':' + (svelteLoc.column || 0));
|
|
147
|
+
}
|
|
148
|
+
} catch (_) {}
|
|
149
|
+
try {
|
|
150
|
+
var fiberKey = Object.keys(element).find(function(key) {
|
|
151
|
+
return key.indexOf('__reactFiber$') === 0 || key.indexOf('__reactInternalInstance$') === 0;
|
|
152
|
+
});
|
|
153
|
+
var fiber = fiberKey ? element[fiberKey] : null;
|
|
154
|
+
while (fiber) {
|
|
155
|
+
if (fiber._debugSource && fiber._debugSource.fileName) {
|
|
156
|
+
return fiber._debugSource.fileName + ':' + (fiber._debugSource.lineNumber || 0) + ':' + (fiber._debugSource.columnNumber || 0);
|
|
157
|
+
}
|
|
158
|
+
var ownerType = fiber._debugOwner && fiber._debugOwner.type;
|
|
159
|
+
var ownerName = ownerType && (ownerType.displayName || ownerType.name);
|
|
160
|
+
if (ownerName) return 'React:' + ownerName;
|
|
161
|
+
fiber = fiber.return;
|
|
162
|
+
}
|
|
163
|
+
} catch (_) {}
|
|
164
|
+
try {
|
|
165
|
+
var vueType = element.__vueParentComponent && element.__vueParentComponent.type;
|
|
166
|
+
if (vueType && vueType.__file) return vueType.__file;
|
|
167
|
+
} catch (_) {}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function cleanup() {
|
|
171
|
+
document.removeEventListener('mousemove', onMove, true);
|
|
172
|
+
document.removeEventListener('click', onClick, true);
|
|
173
|
+
document.removeEventListener('keydown', onKeyDown, true);
|
|
174
|
+
overlay.remove();
|
|
175
|
+
if (window.__intentElementPickerCleanup === cleanup) delete window.__intentElementPickerCleanup;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function onMove(event) {
|
|
179
|
+
var target = event.target;
|
|
180
|
+
if (!target || target === overlay || overlay.contains(target) || !target.getBoundingClientRect) return;
|
|
181
|
+
var rect = target.getBoundingClientRect();
|
|
182
|
+
overlay.style.display = 'block';
|
|
183
|
+
overlay.style.left = rect.left + 'px';
|
|
184
|
+
overlay.style.top = rect.top + 'px';
|
|
185
|
+
overlay.style.width = rect.width + 'px';
|
|
186
|
+
overlay.style.height = rect.height + 'px';
|
|
187
|
+
label.textContent = segment(target) + ' ' + Math.round(rect.width) + '×' + Math.round(rect.height);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function onClick(event) {
|
|
191
|
+
var target = event.target;
|
|
192
|
+
if (!target || target === overlay || overlay.contains(target) || !target.getBoundingClientRect) return;
|
|
193
|
+
event.preventDefault();
|
|
194
|
+
event.stopPropagation();
|
|
195
|
+
event.stopImmediatePropagation();
|
|
196
|
+
var rect = target.getBoundingClientRect();
|
|
197
|
+
var text = (target.textContent || '').replace(/\s+/g, ' ').trim().slice(0, 120);
|
|
198
|
+
var payload = {
|
|
199
|
+
selector: uniqueSelector(target),
|
|
200
|
+
domPath: domPath(target),
|
|
201
|
+
tagName: target.tagName.toLowerCase(),
|
|
202
|
+
id: target.id || '',
|
|
203
|
+
className: typeof target.className === 'string' ? target.className : '',
|
|
204
|
+
textSnippet: text,
|
|
205
|
+
rect: { x: rect.x, y: rect.y, width: rect.width, height: rect.height },
|
|
206
|
+
pageUrl: window.location.href
|
|
207
|
+
};
|
|
208
|
+
var sourceRef = sourceReference(target);
|
|
209
|
+
if (sourceRef) payload.sourceRef = sourceRef;
|
|
210
|
+
cleanup();
|
|
211
|
+
console.log(PICKED_PREFIX + JSON.stringify(payload));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function onKeyDown(event) {
|
|
215
|
+
if (event.key !== 'Escape') return;
|
|
216
|
+
event.preventDefault();
|
|
217
|
+
event.stopPropagation();
|
|
218
|
+
cleanup();
|
|
219
|
+
console.log(CANCELLED);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
window.__intentElementPickerCleanup = cleanup;
|
|
223
|
+
document.addEventListener('mousemove', onMove, true);
|
|
224
|
+
document.addEventListener('click', onClick, true);
|
|
225
|
+
document.addEventListener('keydown', onKeyDown, true);
|
|
226
|
+
})();
|
|
227
|
+
`;function aa(o){return o<400?"controls-collapsed":o<560?"hostname-hidden":"full"}function ia(o,r){let i=r,b;const x=h=>{if(h<=0)return;const N=aa(h);N!==b&&(b=N,i(N))};x(o.getBoundingClientRect().width);const C=typeof ResizeObserver>"u"?void 0:new ResizeObserver(([h])=>x(h?.contentRect.width??o.clientWidth));return C?.observe(o),{update(h){i=h,b&&i(b)},destroy(){C?.disconnect()}}}var sa=re('<webview class="w-full h-full border-none" allowpopups=""></webview>'),la=re('<span class="size-5 shrink-0 rounded-full bg-muted" aria-hidden="true" data-browser-page-favicon-fallback=""></span>'),da=re('<img alt="" class="size-5 shrink-0 rounded-sm" data-browser-page-favicon=""/>'),ua=re('<form class="relative z-10 flex h-full min-w-0 flex-1 items-center px-2"><!> <!></form>'),ca=re('<span class="browser-toolbar-hostname truncate text-xs text-muted-foreground svelte-n30m5t"> </span>'),fa=re('<!> <span class="min-w-0 flex-1 truncate text-sm font-medium text-foreground"> </span> <!>',1),ga=re('<div class="flex items-center justify-center h-full text-subtle"><div class="text-center"><div class="text-4xl mb-3 opacity-50">⚠️</div> <p class="text-lg font-medium mb-1"> </p> <p class="text-sm"><!></p> <p class="text-xs mt-2 max-w-md break-all text-muted-foreground"> </p></div></div>'),va=re('<div class="flex items-center justify-center h-full text-subtle"><div class="text-center"><div class="text-4xl mb-3 opacity-50">🌐</div> <p class="text-lg font-medium mb-1"> </p> <p class="text-sm"> </p></div></div>'),pa=re('<p class="text-foreground"> </p>'),wa=re('<div class="absolute inset-0 z-30 flex flex-col overflow-y-auto bg-background" data-browser-load-error=""><!></div>'),ba=re('<div class="flex flex-col h-full bg-background"><div class="browser-toolbar flex h-12 shrink-0 items-center gap-1 border-b border-border bg-muted/30 px-2 svelte-n30m5t" data-browser-toolbar=""><div class="flex gap-0.5"><div class="browser-toolbar-history flex gap-0.5 svelte-n30m5t"><!> <!></div> <!> <!></div> <div class="flex min-w-0 flex-1 items-center gap-2"><!> <div class="relative flex h-8 min-w-0 flex-1 items-center rounded-md bg-background" data-browser-address-surface=""><!> <span aria-hidden="true"></span></div></div> <div class="browser-toolbar-picker h-7 w-7 shrink-0 svelte-n30m5t" data-browser-select-element-slot=""><!></div> <div class="browser-toolbar-viewport flex shrink-0 items-center svelte-n30m5t" data-browser-viewport-slot=""><!></div> <div class="flex h-7 w-7 shrink-0 items-center" data-browser-overflow-slot=""><!></div></div> <div class="min-h-0 flex-1 relative overflow-hidden"><!> <!></div></div>');function to(o,r){const i=Nr();if(new.target)return He({component:to,...o});Xe(r,!0);const b=()=>_t(J,"$pendingZoom$",C),x=()=>_t(f,"$copyBrowserUrlShortcut$",C),[C,h]=Ur(),N=t=>{var n=sa();wt(n,g=>s(u,g),()=>e(u)),It(n,(g,K)=>Bn?.(g,K),P),q(g=>{n.inert=!!e(U),Me(n,"src",g),Me(n,"partition",Et)},[()=>kt(()=>e(ve))]),y(t,n)},w=nr("EmbeddedBrowser"),f=_n("panel.copy-browser-url"),$=qr.NAVIGATION_ALLOWED;let A=v(r,"url",7),W=v(r,"workspaceId",7),P=v(r,"tabId",7),O=v(r,"onNavigate",7),_=v(r,"onTitleChange",7),k=v(r,"onFaviconChange",7),j=v(r,"onFocus",7),T=v(r,"focusUrlBarOnMount",7,!1),R=v(r,"isFocused",7,!1),I=v(r,"isActive",7,!0),H=v(r,"ownerAgentId",7),ae=v(r,"viewport",23,()=>({mode:"fit"})),ie=v(r,"onViewportChange",7);const J=P()?gn(W(),P()):null;Le(()=>{w.info("EmbeddedBrowser URL prop",{url:A(),isValid:ot(A()),appOrigin:typeof window<"u"?window.location.origin:"N/A",workspaceId:W()})}),Le(()=>{if(!J||!P())return;const t=b();if(!(!t||t.length===0)&&!(!e(u)||!e(l))){try{for(const n of t){const g=e(u).getZoomLevel?.()??0;n==="in"?e(u).setZoomLevel?.(g+.5):n==="out"?e(u).setZoomLevel?.(g-.5):n==="reset"&&e(u).setZoomLevel?.(0)}}catch{}Pe.dispatch(Ho(W(),P()))}});let D=V(null),u=V(null);Le(()=>{if(!e(u)||!P())return;const t=P(),n=crypto.randomUUID();return kt(()=>Pe.dispatch(jo(t,n))),()=>{kt(()=>Pe.dispatch(Zo(t,n)))}});let z=V(Ct(A()||"")),M=V(""),ee=V(!1),B=V(""),te=V(""),a=V(!1),E=V(!1),Z=V(!1),le=V(!1),G=V(Ct(A()?.startsWith("https://")??!1)),U=V(""),F=V(null),l=V(!1),L=V(0),S=V(!1),we=V("full");function he(t){s(we,t,!0)}let ye=V(!1),Fe=0,Re="",Se="",Je="";function Te(){return Re="",Se="",Je="",++Fe}let Ce=V(!1),ve=V(Ct(ot(A())?A():"about:blank"));Le(()=>{if(e(u))try{e(u).setAudioMuted?.(!I())}catch{}});const Ve=Tn(A());function Qe(t){if(!t||t==="about:blank")return"";try{return new URL(t).hostname}catch{return""}}const et=c(()=>Qe(e(z))),At=c(()=>e(B)||e(et)||(e(z)&&e(z)!=="about:blank"?e(z):d.browser_embedded_url_placeholder()));async function de(){s(M,e(z),!0),s(ee,!0),await pt(),requestAnimationFrame(()=>{e(D)?.focus(),e(D)?.select()})}function pe(){s(ee,!1),s(M,"")}function ke(t){if((t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()==="l"){t.preventDefault(),e(D)?.select();return}t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),pe())}let ze=c(()=>ot(e(ve)));Le(()=>{const t=Un(Ve,A(),{webviewReady:e(l)||!e(u),isValidBrowserUrl:ot});t.shouldLoad&&t.targetUrl&&(s(z,t.targetUrl,!0),Oe(t.targetUrl))});let ue=[],ce;function Ie(){e(u)&&e(u).executeJavaScript(Nn).then(()=>{}).catch(t=>{w.debug("Failed to inject keyboard interceptor",{error:t.message})})}Le(()=>{const t=e(u);if(t){t.getAttribute("partition")||(t.setAttribute("partition",Et),w.debug("Set partition attribute on webview",{partition:Et})),t.hasAttribute("allowpopups")||(t.setAttribute("allowpopups",""),w.debug("Set allowpopups attribute on webview")),ct();const n=()=>{if(s(l,!0),w.debug("Webview ready",{url:e(ve)}),Ie(),P())try{const K=t.getWebContentsId();K!==ce&&(ce=K,w.info("Registering browser tab for CDP",{tabId:P(),webContentsId:K}),window.electronAPI?.invoke("browser:register-tab",{tabId:P(),webContentsId:K,workspaceId:W()}).catch(se=>{w.error("Failed to register browser tab for CDP",{tabId:P(),webContentsId:K,error:se}),ce===K&&(ce=void 0)}))}catch{w.debug("Failed to get webContentsId for CDP registration",{tabId:P()})}};t.addEventListener("dom-ready",n),ue.push({event:"dom-ready",handler:n});const g=()=>{Ie()};return t.addEventListener("did-finish-load",g),ue.push({event:"did-finish-load",handler:g}),()=>{Ne(t)}}});const fe={current:!1};Le(()=>{fe.current=R(),w.debug("isFocused changed",{isFocused:R(),url:A()})}),Ar(()=>{T()&&de();const t=n=>{const g=Bo(n.target),K=n.metaKey||n.ctrlKey,se=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent);if(e(S)&&n.key==="Escape"){n.preventDefault(),n.stopPropagation(),fr();return}if(fe.current&&!g&&K&&!n.shiftKey&&!n.altKey&&n.key.toLowerCase()==="l"){n.preventDefault(),n.stopPropagation(),de();return}if(fe.current&&!g&&$o(n,x(),se)){n.preventDefault(),n.stopPropagation(),xt();return}const ge=Mn(n);ge==="back"&&!g?e(l)&&e(u)&&(n.preventDefault(),ft()):ge==="forward"&&!g&&e(l)&&e(u)&&(n.preventDefault(),bt()),(n.key==="F5"||K&&n.key==="r")&&fe.current&&(n.preventDefault(),n.stopPropagation(),gt())};return window.addEventListener("keydown",t,!0),()=>{window.removeEventListener("keydown",t,!0),Te(),Ne()}});function Ne(t=e(u)){if(t)for(const{event:n,handler:g}of ue)try{t.removeEventListener?.(n,g)}catch{}ue=[]}function Ee(t,n){e(u)&&(e(u).addEventListener(t,n),ue.push({event:t,handler:n}))}function at(t){try{t.getWebContentsId()}catch{return"none"}try{return t.getURL?.(),"live"}catch{return"dead"}}function ct(){e(u)&&(Ee("did-start-loading",()=>{s(le,!0),s(S,!1)}),Ee("did-stop-loading",()=>{s(le,!1),s(l,!0),We(e(z)),$e()}),Ee("destroyed",()=>{const t=e(u),n=t?at(t):"none";if(!t?.isConnected||n!=="dead"){w.debug("Ignoring destroyed event for a replaced guest",{tabId:P(),guest:n});return}w.warn("Webview guest was destroyed",{tabId:P(),url:bn(e(ve))}),Ne(),s(l,!1),s(le,!1),s(S,!1),s(E,!1),s(Z,!1),ce=void 0,s(U,d.browser_embedded_pageClosed_error(),!0),s(Ce,!0)}),Ee("did-navigate",t=>{s(L,0),s(ve,t.url,!0),s(z,t.url,!0),s(B,""),s(te,""),s(a,!1),s(G,t.url?.startsWith("https://"),!0),s(U,"");const n=Xo(Je||void 0,t.url,Se||void 0);Te(),Lr(Ve,t.url),n?O()?.(t.url,n):O()?.(t.url),$e()}),Ee("did-navigate-in-page",t=>{t.isMainFrame&&(s(U,""),s(ve,t.url,!0),s(z,t.url,!0),s(G,t.url?.startsWith("https://"),!0),Te(),Lr(Ve,t.url),O()?.(t.url),$e())}),Ee("page-title-updated",t=>{s(B,t.title??"",!0),Pe.dispatch(Cr(W(),e(z),t.title,void 0)),_()?.(t.title)}),Ee("page-favicon-updated",t=>{t.favicons?.length>0&&(s(te,t.favicons[0],!0),s(a,!1),Pe.dispatch(Cr(W(),e(z),void 0,t.favicons[0])),k()?.(t.favicons[0]))}),Ee("did-fail-load",t=>{if(t.isMainFrame!==!1){if(t.errorCode!==-3){const n=t.validatedURL||e(ve),g=n?.includes("localhost")||n?.includes("127.0.0.1");if(Re)s(U,Re,!0),w.warn("Webview failed to load after a resolver error",{url:n,errorCode:t.errorCode,errorDescription:t.errorDescription});else if(t.errorCode===-102&&g){const K=n?.match(/:(\d+)/)?.[1];s(U,K?d.browser_embedded_localhostRefusedPort_error({port:K}):d.browser_embedded_localhostRefused_error(),!0),w.warn("Localhost connection refused",{url:n,errorCode:t.errorCode})}else s(U,t.errorDescription||d.browser_embedded_loadFailed_error(),!0),w.error("Webview failed to load",{errorCode:t.errorCode,errorDescription:t.errorDescription})}s(le,!1)}}),Ee("focus",()=>{j()?.()}),Ee("console-message",t=>{t.level===3&&s(L,e(L)+1);const n=t.message;if(n==="__INTENT_CLOSE_TAB__"){const g=new KeyboardEvent("keydown",{key:"w",code:"KeyW",metaKey:!0,ctrlKey:!1,bubbles:!0,cancelable:!0});window.dispatchEvent(g)}else if(n==="__INTENT_REFRESH__")gt();else if(n==="__INTENT_FOCUS_URL__")de();else if(n.startsWith("__INTENT_PANEL_BRACKET__:")){const g=On(n);if(!g)return;window.dispatchEvent(new KeyboardEvent("keydown",{...g,bubbles:!0,cancelable:!0}))}else if(n==="__INTENT_COPY_URL__")xt();else if(n==="__INTENT_DEVTOOLS__")so();else{const g=oa(n);if(g&&!e(S)){w.debug("Ignored element picker message while picker was inactive");return}g?.type==="cancelled"&&s(S,!1),g?.type==="malformed"&&(s(S,!1),w.warn("Ignored malformed element picker payload",{issues:g.issues})),g?.type==="picked"&&(s(S,!1),ao(g.element))}}))}function $e(){if(e(u)&&e(l))try{s(E,e(u).canGoBack?.()??!1,!0),s(Z,e(u).canGoForward?.()??!1,!0)}catch{s(E,!1),s(Z,!1)}}function De(){try{return e(u)?.getURL?.()}catch{return}}function We(t){const n=$n(Ve,t,De());n&&(s(z,n,!0),s(G,n.startsWith("https://"),!0),O()?.(n))}async function Oe(t){if(t){if(Te(),!ot(t)){try{const n=new URL(t);$.includes(n.protocol)?(s(U,d.browser_embedded_selfLoad_error(),!0),w.warn("Prevented loading app URL in webview",{url:t})):(s(U,d.browser_embedded_protocolNotAllowed_error({protocol:n.protocol,protocols:$.join(", ")}),!0),w.warn("Blocked disallowed protocol in webview",{url:t,protocol:n.protocol}))}catch{s(U,d.browser_embedded_invalidUrlFormat_error(),!0),w.warn("Invalid URL format",{url:t})}return}try{if(new URL(t),s(U,""),w.info("loadUrl: validated URL",{url:t,webviewRef:!!e(u),webviewReady:e(l)}),e(u)){w.info("loadUrl: calling webviewRef.loadURL",{targetUrl:t});const n=e(u);Sn(n,t).then(()=>{We(t),$e()}).catch(g=>{w.warn("Webview navigation failed",{targetUrl:t,error:g})})}else w.info("loadUrl: recreating webview",{targetUrl:t}),s(ye,!0),await pt(),s(ve,t,!0),s(Ce,!1),s(ye,!1),s(l,!1)}catch(n){s(U,d.browser_embedded_invalidUrl_error(),!0),w.error("Invalid URL",{url:t,error:n})}}}function ft(){if(!(!e(l)||!e(u)))try{e(u).canGoBack?.()&&(Te(),e(u).goBack())}catch{}}function bt(){if(!(!e(l)||!e(u)))try{e(u).canGoForward?.()&&(Te(),e(u).goForward())}catch{}}function gt(){if(e(Ce)){const t=e(ve)!=="about:blank"?e(ve):e(z);t&&Oe(t);return}if(!(!e(l)||!e(u)))try{Te(),e(u).reload?.(),e(U)||e(u).focus?.()}catch{}}function yt(){if(e(F)?.focus(),e(l)||e(Ce)){gt();return}const t=De()||e(z)||e(ve);ot(t)?Oe(t):de()}function mt(){const t=De();return t&&t!=="about:blank"?t:e(ve)!=="about:blank"?e(ve):""}async function xt(){const t=mt();if(!t){st.error(d.browser_embedded_noUrlToCopy_error());return}try{await fn(t),st.success(d.browser_embedded_urlCopied_label())}catch(n){w.error("Failed to copy browser URL",n,{url:t}),st.error(d.browser_embedded_copyFailed_error())}}async function Bt(){const t=mt();if(!t){st.error(d.browser_embedded_noUrlToOpen_error());return}try{await Qt("shell:openExternal",{url:t})}catch(n){w.error("Failed to open browser URL externally",n,{url:t}),st.error(d.browser_embedded_openExternalFailed_error())}}function Ft(t){const n="data:",g=";base64,",K=t.indexOf(g,n.length),se=t.slice(n.length,K),ge=t.slice(K+g.length);if(!t.startsWith(n)||K<0||!se.startsWith("image/")||!ge)throw new Error("Captured image did not produce a valid base64 data URL");return{data:ge,mimeType:se}}function ur(t,n){if(!P()||!e(u))return;const g=n?.pageUrl||mt(),K=pn.select(Pe.state,W())?.agentId??H();if(!K){st.error(d.browser_embedded_noTargetAgent_error());return}Pe.dispatch(Yo(W(),{tabId:P(),ownerAgentId:H(),targetAgentId:K,pageUrl:g,title:e(B)||Qe(g)||g,viewport:ae().mode==="fit"?{width:e(u).clientWidth,height:e(u).clientHeight}:{width:ae().width,height:ae().height},image:t,...n?{element:n}:{}}))}async function no(){if(!(!e(u)?.capturePage||!e(l)||!P()))try{const t=await e(u).capturePage();ur(Ft(t.toDataURL()))}catch(t){w.error("Failed to capture browser screenshot",t),st.error(d.browser_embedded_screenshotFailed_error())}}async function ao(t){if(!e(u)?.capturePage||!e(l)||!P())return;const n={width:e(u).clientWidth,height:e(u).clientHeight},g=ae().mode==="fit"?n:{width:ae().width,height:ae().height},K=ta(t.rect,n,g);if(K.width<=0||K.height<=0){w.warn("Ignored offscreen element picker rectangle",{rect:t.rect});return}try{const se=await e(u).capturePage(K);ur(Ft(se.toDataURL()),t)}catch(se){w.error("Failed to capture selected browser element",se),st.error(d.browser_embedded_screenshotFailed_error())}}async function cr(){if(e(S)){fr();return}if(!(!e(u)||!e(l)||!P()))try{await e(u).executeJavaScript(na),s(S,!0),e(u).focus?.()}catch(t){w.debug("Failed to inject element picker",{error:t}),s(S,!1)}}function fr(){s(S,!1),e(u)?.executeJavaScript("typeof window.__intentElementPickerCleanup === 'function' && window.__intentElementPickerCleanup()").catch(t=>w.debug("Failed to clean up element picker",{error:t}))}async function Nt(t){if(!(!e(u)||!e(l))){if(!P()){e(u).openDevTools?.();return}try{await window.electronAPI?.invoke("browser:open-devtools-panel",{tabId:P(),panel:t})}catch(n){w.warn("Failed to select DevTools panel; opening plain DevTools",{panel:t,error:n}),e(u).openDevTools?.()}}}function io(){if(!(!e(u)||!e(l)))try{Te(),e(u).reloadIgnoringCache?.(),e(u).focus?.()}catch{}}function so(){if(!(!e(u)||!e(l)))try{e(u).isDevToolsOpened?.()?e(u).closeDevTools?.():e(u).openDevTools?.()}catch{}}function lo(t){if(t.preventDefault(),w.info("Form submitted",{urlDraft:e(M),currentWebviewUrl:e(ve),previousUrlProp:Ve.previousUrlProp,webviewReady:e(l),webviewRef:!!e(u)}),e(M)){const n=Zr(e(M));if(n===null){s(U,d.browser_embedded_invalidUrlFormat_error(),!0),w.warn("Invalid URL format",{url:e(M)}),pe();return}w.info("Loading URL from form",{urlToLoad:n}),hn(n)?uo(n):Oe(n),Pe.dispatch(Jo(W(),n,void 0,void 0,new Date().toISOString())),pe()}}async function uo(t){const n=Te(),g=await yn(t,Qt);if(n!==Fe){w.info("Dropping superseded address-bar alias resolution",{requestedUrl:t,url:g.url});return}w.info("Resolved address-bar loopback alias",{requestedUrl:t,url:g.url,rewritten:g.rewritten,tunneled:g.tunneled,reason:g.reason,error:g.error}),await Oe(g.url),g.rewritten&&(Se=t,Je=g.url),g.error&&g.rewritten&&(Re=g.forbidden?d.browser_linkOpen_ownerOnlyForward_error():d.browser_embedded_resolveFailed_error(),s(U,Re,!0))}var co={get url(){return A()},set url(t){A(t),p()},get workspaceId(){return W()},set workspaceId(t){W(t),p()},get tabId(){return P()},set tabId(t){P(t),p()},get onNavigate(){return O()},set onNavigate(t){O(t),p()},get onTitleChange(){return _()},set onTitleChange(t){_(t),p()},get onFaviconChange(){return k()},set onFaviconChange(t){k(t),p()},get onFocus(){return j()},set onFocus(t){j(t),p()},get focusUrlBarOnMount(){return T()},set focusUrlBarOnMount(t=!1){T(t),p()},get isFocused(){return R()},set isFocused(t=!1){R(t),p()},get isActive(){return I()},set isActive(t=!0){I(t),p()},get ownerAgentId(){return H()},set ownerAgentId(t){H(t),p()},get viewport(){return ae()},set viewport(t={mode:"fit"}){ae(t),p()},get onViewportChange(){return ie()},set onViewportChange(t){ie(t),p()},$set:je,$on:(t,n)=>Ze(r,t,n)},Ot=ba(),Rt=oe(Ot),Mt=oe(Rt),Dt=oe(Mt),gr=oe(Dt);{let t=c(()=>!e(E)),n=c(()=>d.browser_embedded_goBack_tooltip()),g=c(()=>d.browser_embedded_goBack_ariaLabel());Be(gr,{variant:"ghost-light",size:"icon-xs",onclick:ft,get disabled(){return e(t)},get tooltip(){return e(n)},tooltipShortcut:"alt+←",tooltipSide:"bottom",get"aria-label"(){return e(g)},children:(K,se)=>{_e(K,{get icon(){return ar},size:"xs"})},$$slots:{default:!0}})}var fo=m(gr,2);{let t=c(()=>!e(Z)),n=c(()=>d.browser_embedded_goForward_tooltip()),g=c(()=>d.browser_embedded_goForward_ariaLabel());Be(fo,{variant:"ghost-light",size:"icon-xs",onclick:bt,get disabled(){return e(t)},get tooltip(){return e(n)},tooltipShortcut:"alt+→",tooltipSide:"bottom",get"aria-label"(){return e(g)},children:(K,se)=>{_e(K,{get icon(){return ir},size:"xs"})},$$slots:{default:!0}})}ne(Dt);var vr=m(Dt,2);{let t=c(()=>d.browser_embedded_refresh_tooltip()),n=c(()=>d.browser_embedded_refresh_ariaLabel());Be(vr,{variant:"ghost-light",size:"icon-xs",onclick:gt,get disabled(){return e(le)},get tooltip(){return e(t)},tooltipShortcut:"mod+r",tooltipSide:"bottom",get"aria-label"(){return e(n)},get ref(){return e(F)},set ref(g){s(F,g,!0)},children:(g,K)=>{var se=ht(),ge=X(se);{var me=Ae=>{To(Ae,{size:12})},Ue=Ae=>{_e(Ae,{get icon(){return Kr},size:"xs"})};be(ge,Ae=>{e(le)?Ae(me):Ae(Ue,-1)})}y(g,se)},$$slots:{default:!0}})}var go=m(vr,2);{var vo=t=>{{let n=c(()=>d.browser_status_error_label()),g=c(()=>d.chat_shared_retry_label());dr(t,{get label(){return e(n)},get description(){return e(U)},tone:"error",get actionLabel(){return e(g)},onAction:yt,get actionFocusTarget(){return e(F)},get descriptionId(){return i}})}};be(go,t=>{e(U)&&!e(Ce)&&t(vo)})}ne(Mt);var Kt=m(Mt,2),pr=oe(Kt);{var po=t=>{var n=ht(),g=X(n);{var K=ge=>{var me=la();y(ge,me)},se=ge=>{var me=ht(),Ue=X(me);Uo(Ue,()=>e(te),Ae=>{var it=da();q(()=>Me(it,"src",e(te))),Yt("error",it,()=>s(a,!0)),Fo(it),y(Ae,it)}),y(ge,me)};be(g,ge=>{e(a)?ge(K):ge(se,-1)})}y(t,n)};be(pr,t=>{e(te)&&t(po)})}var wr=m(pr,2),br=oe(wr);{var wo=t=>{var n=ua(),g=oe(n);{let se=c(()=>d.browser_embedded_url_placeholder()),ge=c(()=>d.browser_embedded_addressInput_ariaLabel());wt($t(g,{type:"text",onkeydown:ke,onblur:pe,noFocusStyle:!0,class:"inline-edit-input h-full flex-1 rounded-none border-0 bg-transparent px-0 hover:border-transparent",get placeholder(){return e(se)},get"aria-label"(){return e(ge)},get value(){return e(M)},set value(me){s(M,me,!0)}}),me=>s(D,me,!0),()=>e(D))}var K=m(g,2);Be(K,{type:"submit",variant:"ghost",size:"xs",class:"sr-only",children:(se,ge)=>{ut();var me=nt();q(Ue=>Y(me,Ue),[()=>d.browser_embedded_go_label()]),y(se,me)},$$slots:{default:!0}}),ne(n),Yt("submit",n,lo),y(t,n)},bo=t=>{{let n=c(()=>d.browser_embedded_editAddress_ariaLabel());Be(t,{type:"button",variant:"plain",size:"sm",class:"relative z-10 flex h-full min-w-0 flex-1 cursor-text items-center gap-1.5 rounded-md px-2 text-left outline-none hover:bg-hover active:bg-active focus-visible:ring-1 focus-visible:ring-focus-ring",onclick:()=>void de(),get"aria-label"(){return e(n)},children:(g,K)=>{var se=fa(),ge=X(se);{var me=tt=>{_e(tt,{get icon(){return Vr},class:"shrink-0 text-muted-foreground",size:"sm"})};be(ge,tt=>{e(G)&&tt(me)})}var Ue=m(ge,2),Ae=xe(Ue,!0),it=m(Ue,2);{var zt=tt=>{var Ge=ca(),vt=xe(Ge,!0);q(()=>Y(vt,e(et))),y(tt,Ge)};be(it,tt=>{e(B)&&e(et)&&e(et)!==e(B)&&tt(zt)})}q(()=>Y(Ae,e(At))),y(g,se)},$$slots:{default:!0}})}};be(br,t=>{e(ee)?t(wo):t(bo,-1)})}var mo=m(br,2);ne(wr),ne(Kt);var Vt=m(Kt,2),_o=oe(Vt);{let t=c(()=>!e(l)||!P());eo(_o,{get active(){return e(S)},get disabled(){return e(t)},onToggle:()=>void cr()})}ne(Vt);var Wt=m(Vt,2),ho=oe(Wt);Jr(ho,{get viewport(){return ae()},onViewportChange:t=>ie()?.(t)}),ne(Wt);var mr=m(Wt,2),yo=oe(mr);{let t=c(()=>!e(l)),n=c(()=>e(we)==="controls-collapsed"),g=c(()=>e(l)&&!!P());Yr(yo,{get errorCount(){return e(L)},get disabled(){return e(t)},get collapsed(){return e(n)},get canGoBack(){return e(E)},get canGoForward(){return e(Z)},get canSelectElement(){return e(g)},get selectingElement(){return e(S)},get viewport(){return ae()},onGoBack:ft,onGoForward:bt,onToggleElementPicker:()=>void cr(),onViewportChange:K=>ie()?.(K),onOpenExternal:Bt,onCopyUrl:xt,onScreenshot:no,onOpenConsole:()=>Nt("console"),onOpenSource:()=>Nt("sources"),onOpenInspector:()=>Nt("elements"),onReloadWithoutCache:io})}ne(mr),ne(Rt),It(Rt,(t,n)=>ia?.(t,n),()=>he);var _r=m(Rt,2),hr=oe(_r);{var xo=t=>{Qr(t,{get viewport(){return ae()},onViewportChange:n=>ie()?.(n),children:(n,g)=>{N(n)},$$slots:{default:!0}})},Co=t=>{var n=ga(),g=oe(n),K=m(oe(g),2),se=xe(K,!0),ge=m(K,2),me=oe(ge);{var Ue=Ge=>{var vt=nt();q(Gt=>Y(vt,Gt),[()=>d.browser_embedded_protocolBlocked_description()]),y(Ge,vt)},Ae=c(()=>A().startsWith("javascript:")||A().startsWith("data:")),it=Ge=>{var vt=nt();q(Gt=>Y(vt,Gt),[()=>d.browser_embedded_selfLoadBlocked_description()]),y(Ge,vt)};be(me,Ge=>{e(Ae)?Ge(Ue):Ge(it,-1)})}ne(ge);var zt=m(ge,2),tt=xe(zt,!0);ne(g),ne(n),q(Ge=>{Y(se,Ge),Y(tt,A())},[()=>d.browser_embedded_cannotLoadUrl_label()]),y(t,n)},ko=t=>{var n=va(),g=oe(n),K=m(oe(g),2),se=xe(K,!0),ge=m(K,2),me=xe(ge,!0);ne(g),ne(n),q((Ue,Ae)=>{Y(se,Ue),Y(me,Ae)},[()=>d.browser_embedded_noUrl_label(),()=>d.browser_embedded_noUrl_description()]),y(t,n)};be(hr,t=>{e(ze)&&!e(ye)&&!e(Ce)?t(xo):A()&&!e(ye)&&!e(Ce)?t(Co,1):e(Ce)||t(ko,2)})}var Io=m(hr,2);{var Eo=t=>{var n=wa(),g=oe(n);{const K=me=>{_e(me,{get icon(){return Dr},size:"lg"})},se=me=>{var Ue=pa(),Ae=xe(Ue,!0);q(()=>{Me(Ue,"id",i),Y(Ae,e(U))}),y(me,Ue)};let ge=c(()=>d.chat_shared_retry_label());cn(g,{class:"my-auto min-h-0 w-full shrink-0 py-6 [overflow-wrap:anywhere]",severity:"danger",get retryLabel(){return e(ge)},onRetry:yt,icon:K,message:se,$$slots:{icon:!0,message:!0}})}ne(n),q(()=>Me(n,"data-browser-guest-destroyed",e(Ce)||void 0)),y(t,n)};be(Io,t=>{e(U)&&t(Eo)})}ne(_r),ne(Ot),q(()=>Lt(mo,1,`pointer-events-none absolute z-0 rounded-(--radius-small) border transition-[inset,border-color,background-color] duration-(--motion-standard) ease-(--ease-standard) motion-reduce:transition-none ${e(ee)?"-inset-x-2 -inset-y-1.5 border-ring/60 bg-background":"-inset-x-1 -inset-y-0.5 border-transparent bg-transparent"}`)),y(o,Ot);var Po=Ye(co);return h(),Po}var ma=re('<form class="flex h-full min-w-0 flex-1 items-center px-2"><!> <!></form>'),_a=re('<span class="browser-viewer-hostname truncate text-xs text-muted-foreground svelte-1jyro9v"> </span>'),ha=re('<!> <span class="min-w-0 flex-1 truncate text-sm font-medium text-foreground"> </span> <!>',1),ya=re('<div class="flex flex-col"><div class="flex h-12 shrink-0 items-center gap-1 border-b border-border bg-muted/30 px-2 svelte-1jyro9v" data-browser-toolbar=""><div class="flex gap-0.5"><div class="browser-viewer-history flex gap-0.5 svelte-1jyro9v"><!> <!></div> <!></div> <div data-browser-address-surface=""><!></div> <!></div></div>');function ro(o,r){if(new.target)return He({component:ro,...o});Xe(r,!0);let i=v(r,"url",7),b=v(r,"title",7),x=v(r,"host",7),C=v(r,"agentOwned",7,!1),h=v(r,"showHostStatus",7,!0),N=v(r,"canGoBack",7,!0),w=v(r,"canGoForward",7,!0),f=v(r,"onNavigate",7),$=v(r,"onGoBack",7),A=v(r,"onGoForward",7),W=v(r,"onRefresh",7),P=v(r,"onClose",7),O=V(!1),_=V(""),k=V(!1),j=V(null);const T=c(()=>!x().connected),R=c(()=>i().startsWith("https://")),I=c(()=>{try{return new URL(i()).hostname}catch{return""}}),H=c(()=>b()?.trim()||e(I)||i());async function ae(){e(T)||(s(_,i(),!0),s(k,!1),s(O,!0),await pt(),e(j)?.focus(),e(j)?.select())}Le(()=>{e(T)&&(s(O,!1),s(k,!1))});function ie(l){if(l.preventDefault(),e(T)||!e(_).trim()){s(O,!1);return}const L=Zr(e(_));if(!L||!ot(L)){s(k,!0);return}s(O,!1),L!==i()&&f()?.(L)}function J(l){l.key==="Escape"&&(l.preventDefault(),s(O,!1))}var D={get url(){return i()},set url(l){i(l),p()},get title(){return b()},set title(l){b(l),p()},get host(){return x()},set host(l){x(l),p()},get agentOwned(){return C()},set agentOwned(l=!1){C(l),p()},get showHostStatus(){return h()},set showHostStatus(l=!0){h(l),p()},get canGoBack(){return N()},set canGoBack(l=!0){N(l),p()},get canGoForward(){return w()},set canGoForward(l=!0){w(l),p()},get onNavigate(){return f()},set onNavigate(l){f(l),p()},get onGoBack(){return $()},set onGoBack(l){$(l),p()},get onGoForward(){return A()},set onGoForward(l){A(l),p()},get onRefresh(){return W()},set onRefresh(l){W(l),p()},get onClose(){return P()},set onClose(l){P(l),p()},$set:je,$on:(l,L)=>Ze(r,l,L)},u=ya(),z=oe(u),M=oe(z),ee=oe(M),B=oe(ee);{let l=c(()=>e(T)||!N()),L=c(()=>d.browser_embedded_goBack_tooltip()),S=c(()=>d.browser_embedded_goBack_ariaLabel());Be(B,{variant:"ghost-light",size:"icon-compact",onclick:()=>$()?.(),get disabled(){return e(l)},get tooltip(){return e(L)},tooltipSide:"bottom",get"aria-label"(){return e(S)},children:(we,he)=>{_e(we,{get icon(){return ar},size:"xs"})},$$slots:{default:!0}})}var te=m(B,2);{let l=c(()=>e(T)||!w()),L=c(()=>d.browser_embedded_goForward_tooltip()),S=c(()=>d.browser_embedded_goForward_ariaLabel());Be(te,{variant:"ghost-light",size:"icon-compact",onclick:()=>A()?.(),get disabled(){return e(l)},get tooltip(){return e(L)},tooltipSide:"bottom",get"aria-label"(){return e(S)},children:(we,he)=>{_e(we,{get icon(){return ir},size:"xs"})},$$slots:{default:!0}})}ne(ee);var a=m(ee,2);{let l=c(()=>d.browser_embedded_refresh_tooltip()),L=c(()=>d.browser_embedded_refresh_ariaLabel());Be(a,{variant:"ghost-light",size:"icon-compact",onclick:()=>W()?.(),get disabled(){return e(T)},get tooltip(){return e(l)},tooltipSide:"bottom",get"aria-label"(){return e(L)},children:(S,we)=>{_e(S,{get icon(){return Kr},size:"xs"})},$$slots:{default:!0}})}ne(M);var E=m(M,2),Z=oe(E);{var le=l=>{var L=ma(),S=oe(L);{let he=c(()=>d.browser_embedded_url_placeholder()),ye=c(()=>d.browser_embedded_addressInput_ariaLabel()),Fe=c(()=>e(k)||void 0),Re=c(()=>e(k)?d.browser_panel_invalidUrl_error():void 0);wt($t(S,{type:"text",oninput:()=>s(k,!1),onkeydown:J,onblur:()=>s(O,!1),noFocusStyle:!0,get disabled(){return e(T)},class:"h-full flex-1 rounded-none border-0 bg-transparent px-0 hover:border-transparent",get placeholder(){return e(he)},get"aria-label"(){return e(ye)},get"aria-invalid"(){return e(Fe)},get title(){return e(Re)},get value(){return e(_)},set value(Se){s(_,Se,!0)}}),Se=>s(j,Se,!0),()=>e(j))}var we=m(S,2);Be(we,{type:"submit",variant:"ghost",size:"compact",class:"sr-only",children:(he,ye)=>{ut();var Fe=nt();q(Re=>Y(Fe,Re),[()=>d.browser_embedded_go_label()]),y(he,Fe)},$$slots:{default:!0}}),ne(L),Yt("submit",L,ie),y(l,L)},G=l=>{{let L=c(()=>d.browser_embedded_editAddress_ariaLabel()),S=c(()=>e(T)?d.browser_viewer_navigationPaused_tooltip({host:x().name}):void 0);Be(l,{variant:"plain",type:"button",class:"flex h-full min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 text-left outline-none hover:bg-hover active:bg-active focus-visible:ring-1 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:hover:bg-transparent",onclick:()=>void ae(),get disabled(){return e(T)},get"aria-label"(){return e(L)},get title(){return e(S)},children:(we,he)=>{var ye=ha(),Fe=X(ye);{var Re=ve=>{_e(ve,{get icon(){return Vr},class:"shrink-0 text-muted-foreground",size:"sm"})};be(Fe,ve=>{e(R)&&ve(Re)})}var Se=m(Fe,2),Je=xe(Se,!0),Te=m(Se,2);{var Ce=ve=>{var Ve=_a(),Qe=xe(Ve,!0);q(()=>Y(Qe,e(I))),y(ve,Ve)};be(Te,ve=>{b()&&e(I)&&e(I)!==b()&&ve(Ce)})}q(()=>Y(Je,e(H))),y(we,ye)},$$slots:{default:!0}})}};be(Z,l=>{e(O)?l(le):l(G,-1)})}ne(E);var U=m(E,2);{var F=l=>{{let L=c(()=>e(T)?d.browser_status_offline_label():x().name),S=c(()=>e(T)?d.browser_status_offlineHost_ariaLabel({host:x().name}):d.browser_status_host_label({host:x().name})),we=c(()=>e(T)?d.browser_viewer_hostOffline_description({host:x().name}):C()?d.browser_tabNotice_notPrimary_description({host:x().name}):d.browser_status_host_description({host:x().name})),he=c(()=>e(T)?"warning":"info"),ye=c(()=>e(T)?d.browser_viewer_forceClose_label():void 0),Fe=c(()=>e(T)&&P()?()=>P()?.({force:!0}):void 0);dr(l,{get label(){return e(L)},get ariaLabel(){return e(S)},get description(){return e(we)},get tone(){return e(he)},get actionLabel(){return e(ye)},get onAction(){return e(Fe)}})}};be(U,l=>{(e(T)||h())&&l(F)})}return ne(z),ne(u),q(()=>{Me(u,"data-browser-viewer-header",e(T)?"offline":"online"),Lt(E,1,`flex h-8 min-w-0 flex-1 items-center rounded-md bg-background ${e(T)?"opacity-60":""}`)}),y(o,u),Ye(D)}function xa(o){return{followSeq:0,activeFollowSeq:null,activeFollowCommitted:!1,forwardSeq:0,pendingForward:null,canonicalUrl:null,webviewReady:!1,targetUrl:null,mirrorUrl:null,isValidBrowserUrl:o.isValidBrowserUrl,isForwardableUrl:o.isForwardableUrl}}function Pt(o,r){return o.followSeq+=1,o.activeFollowSeq=o.followSeq,o.activeFollowCommitted=!1,o.targetUrl=r,{type:"load",seq:o.followSeq,url:r}}function Tr(o,r){return[Pt(o,r),tr(o,r)]}function Ca(o){const r=o.canonicalUrl;return!r||r===o.mirrorUrl||!o.webviewReady?[]:o.isValidBrowserUrl(r)?[Pt(o,r)]:[]}function tr(o,r,i={retarget:!0}){return o.forwardSeq+=1,o.pendingForward={seq:o.forwardSeq,followSeq:o.followSeq},i.retarget&&(o.targetUrl=r),{type:"forward",seq:o.forwardSeq,url:r}}function ka(o,r){switch(r.type){case"canonical":return o.webviewReady=r.webviewReady,r.url?(o.canonicalUrl=r.url,o.followSeq===0?(o.followSeq=1,o.activeFollowSeq=1,o.activeFollowCommitted=!1,o.targetUrl=r.url,[]):r.url===o.targetUrl?[]:r.webviewReady?o.isValidBrowserUrl(r.url)?o.activeFollowSeq===null&&r.url===o.mirrorUrl?(o.targetUrl=r.url,[]):[Pt(o,r.url)]:[]:[]):[];case"guest-navigated":{if(!r.isMainFrame||!r.url)return[];if(o.mirrorUrl=r.url,o.activeFollowSeq!==null){if(!r.inPage)return o.activeFollowCommitted=!0,[];if(!o.activeFollowCommitted||r.url===o.targetUrl)return[]}return o.isForwardableUrl(r.url)?[tr(o,r.url)]:Ca(o)}case"follow-settled":return r.seq===o.activeFollowSeq&&(o.activeFollowSeq=null),[];case"forward-settled":{const i=o.pendingForward;if(!i||i.seq!==r.seq)return[];if(o.pendingForward=null,r.ok)return[];if(o.followSeq!==i.followSeq)return[];const b=o.canonicalUrl;if(!b||!o.isValidBrowserUrl(b))return[];if(!o.webviewReady)return[];const x=o.activeFollowSeq===null||o.targetUrl===b;return b===o.mirrorUrl&&x?(o.targetUrl=b,[]):[Pt(o,b)]}case"address":return!r.url||!o.isForwardableUrl(r.url)?[]:o.webviewReady?Tr(o,r.url):[tr(o,r.url,{retarget:!1})];case"refresh":{const i=o.canonicalUrl;return!i||!o.isValidBrowserUrl(i)||!o.webviewReady?[]:o.isForwardableUrl(i)?Tr(o,i):[Pt(o,i)]}}}var Ia=re('<div class="flex h-full flex-col bg-background" data-browser-viewer-tab=""><!> <div><webview class="h-full w-full border-none" allowpopups=""></webview></div></div>');function oo(o,r){if(new.target)return He({component:oo,...o});Xe(r,!0);let i=v(r,"url",7),b=v(r,"title",7),x=v(r,"host",7),C=v(r,"agentOwned",7,!1),h=v(r,"isActive",7,!0),N=v(r,"onNavigate",7),w=v(r,"onClose",7),f=v(r,"onFaviconChange",7),$=v(r,"onFocus",7);const A=ot(i())?i():"about:blank",W=xa({isValidBrowserUrl:ot,isForwardableUrl:Xr}),P=1;let O=V(null),_=V(!1),k=V(!1),j=V(!1),T=[];function R(a){if(a.type==="load"){const Z=e(O),le=()=>I({type:"follow-settled",seq:a.seq});if(!Z)return le();try{Z.loadURL(a.url).then(le,le)}catch{le()}return}const E=Z=>I({type:"forward-settled",seq:a.seq,ok:Z});if(!x().connected){queueMicrotask(()=>E(!1));return}try{Promise.resolve(N()?.(a.url)).then(()=>E(!0),()=>E(!1))}catch{E(!1)}}function I(a){for(const E of ka(W,a))R(E)}function H(a,E,Z){a.addEventListener(E,Z),T.push({event:E,handler:Z})}function ae(a){if(a)for(const{event:E,handler:Z}of T)try{a.removeEventListener?.(E,Z)}catch{}T=[]}function ie(a){try{s(k,a.canGoBack(),!0),s(j,a.canGoForward(),!0)}catch{}}function J(a,E,Z){I({type:"guest-navigated",url:E.url??"",isMainFrame:E.isMainFrame!==!1,inPage:Z}),ie(a)}function D(a){x().connected&&I({type:"address",url:a})}Le(()=>{const a=e(O);if(a)return a.getAttribute("partition")||a.setAttribute("partition",Et),a.hasAttribute("allowpopups")||a.setAttribute("allowpopups",""),H(a,"dom-ready",()=>{s(_,!0),ie(a)}),H(a,"did-stop-loading",()=>{s(_,!0),I({type:"follow-settled",seq:P}),ie(a)}),H(a,"did-fail-load",E=>{E.isMainFrame!==!1&&I({type:"follow-settled",seq:P})}),H(a,"did-navigate",E=>J(a,E,!1)),H(a,"did-navigate-in-page",E=>J(a,E,!0)),H(a,"page-favicon-updated",E=>{E.favicons?.length>0&&f()?.(E.favicons[0])}),H(a,"focus",()=>$()?.()),()=>ae(a)}),Le(()=>{I({type:"canonical",url:i(),webviewReady:e(_)})}),Le(()=>{const a=e(O);if(!(!a||!e(_)))try{a.setAudioMuted?.(!h())}catch{}}),Br(()=>ae(e(O)));var u={get url(){return i()},set url(a){i(a),p()},get title(){return b()},set title(a){b(a),p()},get host(){return x()},set host(a){x(a),p()},get agentOwned(){return C()},set agentOwned(a=!1){C(a),p()},get isActive(){return h()},set isActive(a=!0){h(a),p()},get onNavigate(){return N()},set onNavigate(a){N(a),p()},get onClose(){return w()},set onClose(a){w(a),p()},get onFaviconChange(){return f()},set onFaviconChange(a){f(a),p()},get onFocus(){return $()},set onFocus(a){$(a),p()},$set:je,$on:(a,E)=>Ze(r,a,E)},z=Ia(),M=oe(z);ro(M,{get url(){return i()},get title(){return b()},get host(){return x()},get agentOwned(){return C()},get canGoBack(){return e(k)},get canGoForward(){return e(j)},onNavigate:D,onGoBack:()=>e(_)&&e(O)?.goBack(),onGoForward:()=>e(_)&&e(O)?.goForward(),onRefresh:()=>e(_)&&I({type:"refresh"}),get onClose(){return w()}});var ee=m(M,2);let B;var te=oe(ee);return wt(te,a=>s(O,a),()=>e(O)),ne(ee),ne(z),q(()=>{B=Lt(ee,1,"relative min-h-0 flex-1",null,B,{"pointer-events-none":!x().connected}),Me(te,"src",A),Me(te,"partition",Et)}),y(o,z),Ye(u)}const Ea=nr("BrowserViewport"),rr="browser-viewport-change";function Pa(o,r,i){Pe.dispatch(Qo(o,r,i)),Qt(Ao.BROWSER.SET_TAB_VIEWPORT,{tabId:r,viewport:i}).catch(b=>{Ea.warn("Failed to apply browser viewport in the main process",{tabId:r,error:b})})}function La(o,r){let i=r;const b=x=>{Pa(i.layoutId,i.tabId,x.detail)};return o.addEventListener(rr,b),{update(x){i=x},destroy(){o.removeEventListener(rr,b)}}}var $r=re('<div class="min-h-0 flex-1"><!></div>'),Fa=re('<div class="flex h-full flex-col" data-browser-tab-frame=""><!></div>');function Ra(o,r){if(new.target)return He({component:Ra,...o});Xe(r,!0);const i=()=>_t(T,"$pendingPanelReveal$",h),b=()=>_t(H,"$agents$",h),x=()=>_t(u,"$ownClientId$",h),C=()=>_t(ee,"$tabHost$",h),[h,N]=Ur(),w=G=>{var U=ht(),F=X(U);{var l=L=>{var S=ht(),we=X(S);{let he=c(()=>d.browser_embedded_ownerChip_ariaLabel({name:e(ae)??f().ownerAgentId}));Q(we,()=>Hr,(ye,Fe)=>{Fe(ye,{get icon(){return qo},get label(){return e(he)},onclick:ie,get"data-browser-owner-chip"(){return f().ownerAgentId}})})}y(L,S)};be(F,L=>{f().ownerAgentId&&L(l)})}y(G,U)};let f=v(r,"tab",7),$=v(r,"workspaceId",7),A=v(r,"layoutId",7),W=v(r,"isActive",7),P=v(r,"isPanelFocused",7),O=v(r,"onFocus",7);const _=c(()=>f().browserUrl??"about:blank"),k=c(()=>A()??$()),j=qt(kt(()=>e(k)));Le(()=>j.set(e(k)));const T=wn(j),R=c(()=>i()?.tabId===f().id&&i().preserveFocus===!0),I=qt($());Le(()=>I.set($()));const H=Rn(I),ae=c(()=>f().ownerAgentId?vn(f().ownerAgentId,b(),f().ownerAgentName):void 0);function ie(G){f().ownerAgentId&&Pe.dispatch(en($(),{agentId:f().ownerAgentId,sourcePanelId:Pn(e(D)??G.target),openInAdjacentPanel:No({event:G})}))}const J=En();Le(()=>{if(!(!J||!W()||!f().ownerAgentId))return J.registerActions({actions:w})});let D=V(null);const u=Ln(),z=c(()=>f().hostClientId===void 0||f().hostClientId===x()),M=qt(kt(()=>f().hostClientId??""));Le(()=>M.set(f().hostClientId??""));const ee=Fn(M,I);var B={get tab(){return f()},set tab(G){f(G),p()},get workspaceId(){return $()},set workspaceId(G){$(G),p()},get layoutId(){return A()},set layoutId(G){A(G),p()},get isActive(){return W()},set isActive(G){W(G),p()},get isPanelFocused(){return P()},set isPanelFocused(G){P(G),p()},get onFocus(){return O()},set onFocus(G){O(G),p()},$set:je,$on:(G,U)=>Ze(r,G,U)},te=Fa(),a=oe(te);{var E=G=>{var U=$r(),F=oe(U);{let l=c(()=>!!f().ownerAgentId);oo(F,{get url(){return e(_)},get title(){return f().title},get host(){return C()},get agentOwned(){return e(l)},get isActive(){return W()},onNavigate:L=>Pe.dispatch(rn(f().id,L)),onClose:({force:L})=>{Pe.dispatch(tn(f().id,L))},onFaviconChange:L=>{Pe.dispatch(kr(e(k),f().id,L))},get onFocus(){return O()}})}ne(U),It(U,(l,L)=>xr?.(l,L),$),wt(U,l=>s(D,l),()=>e(D)),q(()=>Me(U,"data-browser-tab-mirror",f().hostClientId)),y(G,U)},Z=G=>{var U=$r(),F=oe(U);{let l=c(()=>W()&&P()&&!e(R)),L=c(()=>f().viewport??{mode:"fit"});to(F,{get url(){return e(_)},get workspaceId(){return $()},get tabId(){return f().id},get isActive(){return W()},get focusUrlBarOnMount(){return e(l)},get isFocused(){return P()},get ownerAgentId(){return f().ownerAgentId},get viewport(){return e(L)},onViewportChange:S=>{e(D)?.dispatchEvent(new CustomEvent(rr,{detail:S}))},onNavigate:(S,we)=>{Pe.dispatch(we===void 0?Er(e(k),f().id,S):Er(e(k),f().id,S,we)),f().contextItemId&&Pe.dispatch(Ir($(),f().contextItemId,{url:S}))},onTitleChange:S=>{Pe.dispatch(on(e(k),f().id,S)),f().contextItemId&&Pe.dispatch(Ir($(),f().contextItemId,{title:S}))},onFaviconChange:S=>{Pe.dispatch(kr(e(k),f().id,S))},get onFocus(){return O()}})}ne(U),It(U,(l,L)=>xr?.(l,L),$),wt(U,l=>s(D,l),()=>e(D)),It(U,(l,L)=>La?.(l,L),()=>({layoutId:e(k),tabId:f().id})),y(G,U)};be(a,G=>{e(z)?e(_)&&G(Z,1):G(E)})}ne(te),y(o,te);var le=Ye(B);return N(),le}export{Ra as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as le,br as u,a_ as D,bz as ce,b as ve}from"./CEL6QztG.js";import{bs as de,ca as fe,aD as e,a5 as H,bS as ue,bA as L,bH as K,b_ as S,W as T,bn as ge,bV as P,c9 as x,aA as g,a7 as me,ay as he,bl as pe,bO as be,aB as z}from"./DYhIMPy1.js";import{v as X,u as c,n as _e,w as R}from"./yn6WWSq8.js";import{s as ke}from"./CiSnSGvU.js";import{b as we}from"./BaIAhI85.js";import{t as j}from"./wwtnRh6M.js";import{A as xe}from"./
|
|
1
|
+
import{t as le,br as u,a_ as D,bz as ce,b as ve}from"./CEL6QztG.js";import{bs as de,ca as fe,aD as e,a5 as H,bS as ue,bA as L,bH as K,b_ as S,W as T,bn as ge,bV as P,c9 as x,aA as g,a7 as me,ay as he,bl as pe,bO as be,aB as z}from"./DYhIMPy1.js";import{v as X,u as c,n as _e,w as R}from"./yn6WWSq8.js";import{s as ke}from"./CiSnSGvU.js";import{b as we}from"./BaIAhI85.js";import{t as j}from"./wwtnRh6M.js";import{A as xe}from"./BgVKKIhh.js";import{s as We}from"./QGl-Xn9g.js";function Ie(W){const{itemCount:a,maxVisible:v,availableWidth:r,surface:s,overlap:b,overflowOverlap:d}=W;if(r<=0)return 0;const _=s-b,m=Math.min(a,Math.max(0,v)),y=i=>i===0?0:s+(i-1)*_;if(a<=m&&y(a)<=r)return a;for(let i=m;i>=0;i-=1){const A=a-i;if(y(i)+(A>0?W.measureOverflowText(A)-(i>0?d:0):0)<=r)return i}return 0}function ye(W,a=r=>requestAnimationFrame(r),v=r=>cancelAnimationFrame(r)){let r,s;return{set(b){if(r=b,s!==void 0)return;let d=!1;const _=a(()=>{d=!0,s=void 0;const m=r;r=void 0,W(m)});d||(s=_)},cancel(){s!==void 0&&(v(s),s=void 0),r=void 0}}}const Ae=20,Ce=12;let O,J;const Q=new Map;var Te=z('<span data-agent-avatar-stack-item=""><!></span>'),Oe=z('<span class="agent-avatar-stack-track svelte-1nk9fhe"></span>'),Ve=z('<span class="agent-avatar-stack-overflow svelte-1nk9fhe" data-agent-avatar-overflow=""> </span>'),Me=z('<span data-agent-avatar-stack="" data-agent-avatar-stack-overlap="later-on-top"><!> <!></span>');function Se(W,a){if(new.target)return le({component:Se,...W});de(a,!0);let v=u(a,"items",7),r=u(a,"maxVisible",7,3),s=u(a,"adaptive",7,!1),b=u(a,"align",7,"end"),d=u(a,"variant",7,"card-stack"),_=u(a,"interactive",7,!1),m=u(a,"overflowId",7),y=u(a,"overflowTestId",7),i=u(a,"itemContent",7),A=u(a,"class",7,""),I=P(void 0),F=P(void 0);const h=x(()=>We[d()]),U=x(()=>s()&&e(F)!==void 0?Ie({itemCount:v().length,maxVisible:r(),availableWidth:e(F),surface:e(h).surface,overlap:e(h).overlap,overflowOverlap:e(h).overlap,measureOverflowText:t=>Math.max(e(h).surface,$(t)+Ce)}):void 0),Y=x(()=>Math.min(v().length,Math.max(0,s()?e(U)??r():r()))),k=x(()=>v().slice(0,e(Y))),E=x(()=>Math.max(0,v().length-e(k).length)),N=x(()=>e(h).surface-e(h).overlap),Z=x(()=>e(k).length===0?0:e(h).surface+(e(k).length-1)*e(N));function $(t){const n=`+${j(t)}`,o=Q.get(n);if(o!==void 0)return o;if(O===void 0&&(O=document.createElement("canvas").getContext("2d")),!O||!e(I))return Ae;J??=`500 12px ${getComputedStyle(e(I)).fontFamily}`,O.font=J;const l=O.measureText(n).width;return Q.set(n,l),l}fe(()=>{if(!s()||!e(I)||typeof ResizeObserver>"u")return;const t=ye(o=>{K(F,o,!0)}),n=new ResizeObserver(o=>{const l=o[o.length-1];t.set(l.borderBoxSize?.[0]?.inlineSize??l.contentRect.width)});return n.observe(e(I)),()=>{n.disconnect(),t.cancel()}});var ee={get items(){return v()},set items(t){v(t),g()},get maxVisible(){return r()},set maxVisible(t=3){r(t),g()},get adaptive(){return s()},set adaptive(t=!1){s(t),g()},get align(){return b()},set align(t="end"){b(t),g()},get variant(){return d()},set variant(t="card-stack"){d(t),g()},get interactive(){return _()},set interactive(t=!1){_(t),g()},get overflowId(){return m()},set overflowId(t){m(t),g()},get overflowTestId(){return y()},set overflowTestId(t){y(t),g()},get itemContent(){return i()},set itemContent(t){i(t),g()},get class(){return A()},set class(t=""){A(t),g()},$set:ce,$on:(t,n)=>ve(a,t,n)},p=Me();let q;var B=H(p);{var te=t=>{var n=Oe();let o;_e(n,23,()=>e(k),l=>l.key,(l,w,V)=>{var f=Te();let G;var re=H(f);{var se=C=>{var M=me(),oe=he(M);ke(oe,i,()=>e(w)),T(C,M)},ie=C=>{{let M=x(()=>e(w).state??"idle");xe(C,{get agentId(){return e(w).agentId},get specialist(){return e(w).specialist},get icon(){return e(w).icon},get state(){return e(M)},get variant(){return d()},class:"agent-avatar-stack-surface"})}};D(re,C=>{i()?C(se):C(ie,-1)})}L(f),S(()=>{G=X(f,1,"agent-avatar-stack-item svelte-1nk9fhe",null,G,{"agent-avatar-stack-item--before-overflow":e(E)>0&&e(V)===e(k).length-1}),R(f,`inset-inline-start: ${e(V)*e(N)}px; z-index: ${e(V)+1};`),c(f,"data-agent-avatar-stack-index",e(V)),c(f,"data-agent-avatar-stack-key",e(w).key),c(f,"data-agent-avatar-stack-agent-id",e(w).agentId),c(f,"data-agent-avatar-stack-specialist",e(w).specialist??void 0),c(f,"aria-hidden",_()?void 0:"true")}),T(l,f)}),L(n),S(()=>o=R(n,"",o,{width:`${e(Z)}px`})),T(t,n)};D(B,t=>{e(k).length>0&&t(te)})}var ae=ue(B,2);{var ne=t=>{var n=Ve(),o=pe(n);S(l=>{c(n,"id",m()),R(n,`margin-inline-start: ${e(k).length>0?-e(h).overlap:0}px; z-index: ${e(k).length+1};`),c(n,"data-testid",y()),be(o,`+${l??""}`)},[()=>j(e(E))]),T(t,n)};D(ae,t=>{e(E)>0&&t(ne)})}return L(p),we(p,t=>K(I,t),()=>e(I)),S(()=>{q=X(p,1,`agent-avatar-stack ${A()??""}`,"svelte-1nk9fhe",q,{"agent-avatar-stack--adaptive":s(),"agent-avatar-stack--start":b()==="start"}),c(p,"data-agent-avatar-stack-align",b()),c(p,"data-avatar-variant",d()),c(p,"data-agent-avatar-stack-clear-space",e(h).ring),c(p,"aria-hidden",!_()&&!m()?"true":void 0)}),T(W,p),ge(ee)}export{Se as A};
|