@intent-hq/web 2.340.2 → 2.340.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{D_lSSx1S.js → -ZizYe8A.js} +2 -2
  3. package/web/app/immutable/chunks/{IdfHcBrb.js → -dEFVrNh.js} +2 -2
  4. package/web/app/immutable/chunks/{BSsRbsMB.js → 0C6mh2Cb.js} +1 -1
  5. package/web/app/immutable/chunks/{D18Ecv4L.js → 0FrU_5Z8.js} +1 -1
  6. package/web/app/immutable/chunks/{f8MDHasY.js → 4w__Ckgh.js} +1 -1
  7. package/web/app/immutable/chunks/{EXDnM3_s.js → 4xXU2uFv.js} +1 -1
  8. package/web/app/immutable/chunks/{BDRppcbA.js → 6XCKtx_n.js} +1 -1
  9. package/web/app/immutable/chunks/{D9s4CP1c.js → 7sHGxjlZ.js} +1 -1
  10. package/web/app/immutable/chunks/{Bn40lmOa.js → 9yACX6ry.js} +1 -1
  11. package/web/app/immutable/chunks/{f_AEjkk5.js → B-IV-4X8.js} +1 -1
  12. package/web/app/immutable/chunks/{D8_nOzWn.js → B02Ft2lH.js} +1 -1
  13. package/web/app/immutable/chunks/{BuE6Eygz.js → B07CbBFu.js} +4 -4
  14. package/web/app/immutable/chunks/{C1IBY-rp.js → B1tdK-Ae.js} +1 -1
  15. package/web/app/immutable/chunks/{m6_pcI91.js → B415At74.js} +1 -1
  16. package/web/app/immutable/chunks/{BPVaItqU.js → B79OvD8n.js} +1 -1
  17. package/web/app/immutable/chunks/{CEg0De9G.js → B8Cn64Nh.js} +1 -1
  18. package/web/app/immutable/chunks/{BBWcFFhG.js → B9-yZUvW.js} +1 -1
  19. package/web/app/immutable/chunks/{sgLbXPKZ.js → B9W8ftWw.js} +1 -1
  20. package/web/app/immutable/chunks/{D0VQJT8L.js → BAWU_DW0.js} +12 -12
  21. package/web/app/immutable/chunks/{ByIZkzDE.js → BAl8Wwh_.js} +6 -6
  22. package/web/app/immutable/chunks/{LPMF1MUO.js → BD_fj1Qj.js} +1 -1
  23. package/web/app/immutable/chunks/{BNE6nViq.js → BDhuhL-X.js} +1 -1
  24. package/web/app/immutable/chunks/{CAonbHvL.js → BE5b4a_c.js} +1 -1
  25. package/web/app/immutable/chunks/{BkwB2mol.js → BGoNekbN.js} +1 -1
  26. package/web/app/immutable/chunks/{DdoxAb5E.js → BJa3qDj8.js} +1 -1
  27. package/web/app/immutable/chunks/{oE3wvz3F.js → BKvhKH1N.js} +1 -1
  28. package/web/app/immutable/chunks/{CkG5rsz4.js → BLH5QuLl.js} +1 -1
  29. package/web/app/immutable/chunks/{D_t0KxWu.js → BLsu_Mu5.js} +1 -1
  30. package/web/app/immutable/chunks/{C6SVbm9t.js → BMqyGHvT.js} +1 -1
  31. package/web/app/immutable/chunks/{D7sczzuC.js → BZSEAUt_.js} +1 -1
  32. package/web/app/immutable/chunks/{ODHkP_kN.js → B_FP_4Xg.js} +1 -1
  33. package/web/app/immutable/chunks/{DcgSIDjr.js → Ba0lB_Za.js} +1 -1
  34. package/web/app/immutable/chunks/{CJr2LVMP.js → Ba5qkGno.js} +1 -1
  35. package/web/app/immutable/chunks/{Cfmqg7ex.js → BaUdfCFE.js} +4 -4
  36. package/web/app/immutable/chunks/{BZfXXcXu.js → BbfzoNWa.js} +1 -1
  37. package/web/app/immutable/chunks/{6Kd5nT2h.js → BcdY6yt8.js} +2 -2
  38. package/web/app/immutable/chunks/{KsmYk2yz.js → BddvxHT9.js} +1 -1
  39. package/web/app/immutable/chunks/{Bb67WdXZ.js → BfapYa0w.js} +1 -1
  40. package/web/app/immutable/chunks/{DjASvlKb.js → BjY36TmK.js} +1 -1
  41. package/web/app/immutable/chunks/{kE32CEyB.js → Bjl5gIYt.js} +3 -3
  42. package/web/app/immutable/chunks/{CE65gWfP.js → BmUrB5no.js} +1 -1
  43. package/web/app/immutable/chunks/{CtDWwfc1.js → BoeU4gU2.js} +1 -1
  44. package/web/app/immutable/chunks/{cFmB6NjI.js → BvATDH-A.js} +1 -1
  45. package/web/app/immutable/chunks/{BcLuNWDd.js → C0YQhBwg.js} +2 -2
  46. package/web/app/immutable/chunks/{BxDUZwkN.js → C4e9qLKa.js} +1 -1
  47. package/web/app/immutable/chunks/{DEsaK2_s.js → C55_qVXj.js} +1 -1
  48. package/web/app/immutable/chunks/{C5uug34F.js → C6GuhOeP.js} +1 -1
  49. package/web/app/immutable/chunks/{B4H49Lvz.js → C7mrp7bl.js} +1 -1
  50. package/web/app/immutable/chunks/{ZO-rsGOh.js → C8AfBLvN.js} +1 -1
  51. package/web/app/immutable/chunks/{C45GhO0_.js → C8jIc_nA.js} +1 -1
  52. package/web/app/immutable/chunks/{lCsiS-lR.js → C9FsCYwO.js} +1 -1
  53. package/web/app/immutable/chunks/{CdOpBzi0.js → C9geMnc8.js} +1 -1
  54. package/web/app/immutable/chunks/{BwDa9T5n.js → CAnw4nhq.js} +1 -1
  55. package/web/app/immutable/chunks/{CZVWvMur.js → CBRb7Nst.js} +1 -1
  56. package/web/app/immutable/chunks/{DY0QTg0i.js → CC4YXG_O.js} +1 -1
  57. package/web/app/immutable/chunks/{CzHM4mac.js → CCzdCGOX.js} +1 -1
  58. package/web/app/immutable/chunks/{CUc7hChd.js → CE5yUFD3.js} +1 -1
  59. package/web/app/immutable/chunks/{COU9OETp.js → CEOP5zFS.js} +1 -1
  60. package/web/app/immutable/chunks/{Cgp7P5r8.js → CJstP53T.js} +3 -3
  61. package/web/app/immutable/chunks/{DZpBinKD.js → CKZK7YUP.js} +1 -1
  62. package/web/app/immutable/chunks/{nvafrjsr.js → CLGBx41M.js} +1 -1
  63. package/web/app/immutable/chunks/{DQ1yJ2LL.js → CMYfSht9.js} +1 -1
  64. package/web/app/immutable/chunks/{P26fbC8x.js → CTv-2xZI.js} +2 -2
  65. package/web/app/immutable/chunks/{CKP3sxGm.js → CZE548IM.js} +2 -2
  66. package/web/app/immutable/chunks/{CYK-PIHY.js → CnGNI1tD.js} +1 -1
  67. package/web/app/immutable/chunks/{QGyJLAMm.js → Cp6YJwqj.js} +1 -1
  68. package/web/app/immutable/chunks/{D_LOsbpY.js → Crp_evpb.js} +1 -1
  69. package/web/app/immutable/chunks/{Cl9IfZkl.js → Ct4GQFDH.js} +1 -1
  70. package/web/app/immutable/chunks/{BmB0yVlr.js → CuGEzxrR.js} +1 -1
  71. package/web/app/immutable/chunks/{DqU8XEOB.js → Cvpiafcq.js} +1 -1
  72. package/web/app/immutable/chunks/{DwtYwoux.js → CwQLuRvL.js} +1 -1
  73. package/web/app/immutable/chunks/{BKynbS2h.js → CyJlA-_o.js} +1 -1
  74. package/web/app/immutable/chunks/{DNk8Z47H.js → Cypenj1y.js} +1 -1
  75. package/web/app/immutable/chunks/{DyTa38UW.js → Cz7YByiK.js} +1 -1
  76. package/web/app/immutable/chunks/{DfzSmPSB.js → D-Wk8zWP.js} +1 -1
  77. package/web/app/immutable/chunks/{CT3GEI9u.js → D1Lg2Y74.js} +1 -1
  78. package/web/app/immutable/chunks/{dxURPdJf.js → D9bTjPyN.js} +1 -1
  79. package/web/app/immutable/chunks/{3Kvdo65f.js → DANDJ6YL.js} +1 -1
  80. package/web/app/immutable/chunks/{D9LBHruj.js → DCygeNQj.js} +1 -1
  81. package/web/app/immutable/chunks/{D4RbLG5y.js → DDpGX96O.js} +1 -1
  82. package/web/app/immutable/chunks/{CnGYs2Fc.js → DEZhhrDD.js} +1 -1
  83. package/web/app/immutable/chunks/{Cgzzb3l-.js → DFyF1avW.js} +1 -1
  84. package/web/app/immutable/chunks/{BUwalWZU.js → DJoZU-z6.js} +1 -1
  85. package/web/app/immutable/chunks/{DnVZFag3.js → DM6SjeKk.js} +1 -1
  86. package/web/app/immutable/chunks/{_-wR8Y_9.js → DOgIhDZj.js} +1 -1
  87. package/web/app/immutable/chunks/{BkZVTNCE.js → DR1XcRDf.js} +2 -2
  88. package/web/app/immutable/chunks/{DBCGdyvL.js → DRmOKL_2.js} +1 -1
  89. package/web/app/immutable/chunks/{BwD161C4.js → DTUR13hm.js} +1 -1
  90. package/web/app/immutable/chunks/{e4lO2pBq.js → DVoEDrAy.js} +1 -1
  91. package/web/app/immutable/chunks/{CaPLF-pt.js → DX9UUoob.js} +1 -1
  92. package/web/app/immutable/chunks/{Cn_PcKYx.js → DXi1-DYW.js} +1 -1
  93. package/web/app/immutable/chunks/{D9oE6G0t.js → D_KvKSAm.js} +1 -1
  94. package/web/app/immutable/chunks/{CToL3WbV.js → Dcgzu7MI.js} +3 -3
  95. package/web/app/immutable/chunks/{CiBmz_K_.js → DflRwa_L.js} +1 -1
  96. package/web/app/immutable/chunks/{DaqJTZ9F.js → DfyBtxAd.js} +1 -1
  97. package/web/app/immutable/chunks/{P7uHTJ09.js → DlAaxPlh.js} +1 -1
  98. package/web/app/immutable/chunks/{Dd4j-WEC.js → DpGVlS8y.js} +1 -1
  99. package/web/app/immutable/chunks/{aVPYoucJ.js → DpLAbmZc.js} +4 -4
  100. package/web/app/immutable/chunks/{DM9zs99A.js → DrsHBbQ8.js} +1 -1
  101. package/web/app/immutable/chunks/{BWLPyzgM.js → Ds3PrQlK.js} +1 -1
  102. package/web/app/immutable/chunks/{M_IeUJIa.js → Dv3p1j1_.js} +3 -3
  103. package/web/app/immutable/chunks/{02iZ0o97.js → DyZsvmHy.js} +1 -1
  104. package/web/app/immutable/chunks/{B4DnbNdK.js → Dycyt-8w.js} +1 -1
  105. package/web/app/immutable/chunks/{CNHveuNx.js → Ez2dzBa_.js} +3 -3
  106. package/web/app/immutable/chunks/{BHiY3_g4.js → Gl4qfiuz.js} +1 -1
  107. package/web/app/immutable/chunks/{BQWgsTNd.js → K8a_NSNR.js} +1 -1
  108. package/web/app/immutable/chunks/{BCdX_ryS.js → N8qqqh0G.js} +1 -1
  109. package/web/app/immutable/chunks/{DV-Q2Imq.js → OtM9LD2A.js} +2 -2
  110. package/web/app/immutable/chunks/{C3yAChji.js → Px5_hntL.js} +1 -1
  111. package/web/app/immutable/chunks/{C3MR6-2f.js → QEfJDbjs.js} +1 -1
  112. package/web/app/immutable/chunks/{CrdehDxu.js → R4Lxokcw.js} +1 -1
  113. package/web/app/immutable/chunks/{LQKJN9ho.js → RHkA1Az2.js} +1 -1
  114. package/web/app/immutable/chunks/{B7QWTWb8.js → X6CpS_gh.js} +1 -1
  115. package/web/app/immutable/chunks/{B0Eojz7f.js → XLA3sRO4.js} +1 -1
  116. package/web/app/immutable/chunks/{D0tip71V.js → _ruAaTW2.js} +1 -1
  117. package/web/app/immutable/chunks/{e0XMdR1L.js → gNRMLIyt.js} +1 -1
  118. package/web/app/immutable/chunks/{oKXDW-Y-.js → gn8d_QDi.js} +1 -1
  119. package/web/app/immutable/chunks/{BQYfutOx.js → hVRjl1Hx.js} +1 -1
  120. package/web/app/immutable/chunks/{EP26VtYX.js → qfpSR0Jz.js} +1 -1
  121. package/web/app/immutable/chunks/{Y-TAA21J.js → rOiaGoSK.js} +1 -1
  122. package/web/app/immutable/chunks/{BA0YX2GW.js → xCFY18Nb.js} +4 -4
  123. package/web/app/immutable/chunks/{C7iv3Nal.js → zdGnrETd.js} +1 -1
  124. package/web/app/immutable/entry/{app.EWTkCOdn.js → app.E2cBe3rZ.js} +2 -2
  125. package/web/app/immutable/entry/start.Bh3lMw8C.js +1 -0
  126. package/web/app/immutable/nodes/{0.DyKuFiaz.js → 0.DpoeXn8L.js} +1 -1
  127. package/web/app/immutable/nodes/{1._KMbmbtj.js → 1.DpkH6Oe_.js} +1 -1
  128. package/web/app/immutable/nodes/{10.DEze-Uuw.js → 10.IVheb6TO.js} +1 -1
  129. package/web/app/immutable/nodes/{14.CnjKRxBb.js → 14.B9sOwya3.js} +1 -1
  130. package/web/app/immutable/nodes/{17.CfSXp9j1.js → 17.cWqIAu-L.js} +2 -2
  131. package/web/app/immutable/nodes/{2.v4rI2Mh_.js → 2.CH9ldJpA.js} +11 -11
  132. package/web/app/immutable/nodes/{3.j4IrW3is.js → 3.Biyx4Lw3.js} +1 -1
  133. package/web/app/immutable/nodes/{4.DKmVwIen.js → 4.BKYfKkg7.js} +1 -1
  134. package/web/app/immutable/nodes/{5.BuZfMSu4.js → 5.B4icq73k.js} +1 -1
  135. package/web/app/immutable/nodes/{6.D-oyFAVb.js → 6.CuD5Jes3.js} +1 -1
  136. package/web/app/immutable/nodes/{7.CpRE1Bsk.js → 7.FcaPZM3x.js} +1 -1
  137. package/web/app/immutable/nodes/{8.DMf0uQQL.js → 8.DxUmbz7I.js} +4 -4
  138. package/web/app/immutable/nodes/{9.BPiHS8kG.js → 9.BFaKv7T9.js} +4 -4
  139. package/web/app/version.json +1 -1
  140. package/web/generated/paraglide.js +8 -8
  141. package/web/index.html +9 -9
  142. package/web/app/immutable/entry/start.2ZXczmm3.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./aVPYoucJ.js";import{b as Xt,l as Yt}from"./lCsiS-lR.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&&lt[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
1
+ import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./DpLAbmZc.js";import{b as Xt,l as Yt}from"./C9FsCYwO.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&&lt[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+ft.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(L==Vt?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[L]||L,line:D.yylineno,loc:At,expected:ft})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+L);switch(B[0]){case 1:u.push(L),S.push(D.yytext),o.push(D.yylloc),u.push(B[1]),L=null,zt=D.yyleng,p=D.yytext,dt=D.yylineno,At=D.yylloc;break;case 2:if(N=this.productions_[B[1]][1],j.$=S[S.length-N],j._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},xi&&(j._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),wt=this.performAction.apply(j,[p,zt,dt,$.yy,B[1],S,o].concat(di)),typeof wt<"u")return wt;N&&(u=u.slice(0,-1*N*2),S=S.slice(0,-1*N),o=o.slice(0,-1*N)),u.push(this.productions_[B[1]][0]),S.push(j.$),o.push(j._$),Wt=lt[u[u.length-2]][u[u.length-1]],u.push(Wt);break;case 3:return!0}}return!0},"parse")},rt=(function(){var O={EOF:1,parseError:n(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:n(function(r,g){return this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var g=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),g=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{b as o}from"./aVPYoucJ.js";var c=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function p(){return!!i()?.mermaidCaptureSizes}o(p,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,p as shouldCaptureSizes};
1
+ import{b as o}from"./DpLAbmZc.js";var c=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function p(){return!!i()?.mermaidCaptureSizes}o(p,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,p as shouldCaptureSizes};
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/C3BW_tmx.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/Cv-W__h8.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/DBkMUdAo.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BZeUwBn0.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/ClsZrb8B.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/GdlMbZRO.js","/app/immutable/chunks/BePtUMMB.js","/app/immutable/chunks/DPvDLGgX.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/D4os-974.js","/app/immutable/chunks/BiLjH_HB.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/ZhmlPELZ.js","/app/immutable/chunks/BahFkvC5.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/Ct5KmixI.js","/app/immutable/chunks/BSY2iZcG.js","/app/immutable/chunks/B_zkbbdR.js","/app/immutable/chunks/DT0NjW76.js","/app/immutable/chunks/By364i7q.js","/app/immutable/chunks/D_EwpcgA.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/1o85IiDb.js","/app/immutable/chunks/BrYjurft.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/CYK-PIHY.js","/app/immutable/chunks/C3yAChji.js","/app/immutable/chunks/DTDbZc--.js","/app/immutable/chunks/j0KL2ItM.js","/app/immutable/chunks/CgCdkhNg.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/BKpkoMuv.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/B10dK85Q.js","/app/immutable/chunks/CEpchTPD.js","/app/immutable/chunks/CUrYTyIw.js","/app/immutable/chunks/BtpuPEaR.js","/app/immutable/chunks/D_lSSx1S.js","/app/immutable/chunks/m6_pcI91.js","/app/immutable/chunks/Bn40lmOa.js","/app/immutable/chunks/nvafrjsr.js"])))=>i.map(i=>d[i]);
2
- import{Ir as a,nI as I,ny as g,nx as k,m3 as Z,qq as Q,i7 as ee,va as Fe,jA as He,CS as $e,uH as Be,nP as ve,m6 as te,q0 as Ve,m5 as ze,lK as Ke,aM as le,lU as Je,l_ as Ye,Fp as Xe,CQ as Ze,zc as Qe,nN as et,m8 as tt}from"./DBkMUdAo.js";import{b as st,p as rt,F as nt,z as at}from"./BtpuPEaR.js";import{aX as V,aT as se,cD as v,cG as ue,co as ot,dr as M,aU as ct,cE as it,dl as lt,o as de,O as ut,dn as dt,c3 as pt,ak as mt,au as ht,ad as ft,bC as St,cA as gt,cY as yt,cm as bt,bD as kt}from"./B10dK85Q.js";import{x as wt}from"./CUrYTyIw.js";import{ah as It,cN as _t,aX as vt,av as Ct,p as At}from"./nvafrjsr.js";import{g as Et}from"./C3BW_tmx.js";import{bp as p,_ as q}from"./Cv-W__h8.js";import{i as w}from"./CEpchTPD.js";import{I as Rt}from"./GdlMbZRO.js";import{L as P}from"./BYdX7EnG.js";import{ae as Tt,k as Pt,h as O,a7 as Ot,p as Wt}from"./Bn40lmOa.js";import{c as Nt}from"./ChTqQfQN.js";import{w as xt}from"./1o85IiDb.js";import{r as x}from"./uXuxG9cN.js";import{aN as Mt,O as Lt,R as Dt,x as Ut}from"./C3yAChji.js";import{bs as pe,bt as me,ax as Ce}from"./BePtUMMB.js";import{d as Gt,o as he,l as fe,s as Se}from"./CIyUrgF0.js";const nr=a.createSelector(e=>e.workspaceShare.open),ar=a.createSelector(e=>e.workspaceShare.workspaceId),or=a.createSelector(e=>{const{open:t,workspaceId:s,session:r}=e.workspaceShare;return t&&s?{workspaceId:s,session:r}:null}),re=a.createSelector(e=>{const{open:t,workspaceId:s,withheld:r}=e.workspaceShare;return!t||!s||r||I(e.workspaceShare,s).inviteWithheld?!1:V.select(e,s)}),cr=a.createSelector(e=>e.workspaceShare.createRequest),ir=a.createSelector(e=>e.workspaceShare.mutationGeneration),lr=a.createSelector(e=>e.workspaceShare.workspaceTitle),ur=a.createSelector(e=>g(e.workspaceShare.members)),dr=a.createSelector((e,t)=>k(e.workspaceShare.members,t)!==void 0),pr=a.createSelector(e=>e.workspaceShare.open&&e.workspaceShare.workspaceId&&!e.workspaceShare.withheld&&!I(e.workspaceShare,e.workspaceShare.workspaceId).inviteWithheld?g(e.workspaceShare.invites).filter(t=>t.workspaceId===e.workspaceShare.workspaceId):[]),mr=a.createSelector(e=>{const{principals:t,members:s}=e.workspaceShare;return g(t).filter(r=>!k(s,r.principalId)&&(r.hostRole===void 0||r.hostRole==="guest"))}),hr=a.createSelector(e=>e.workspaceShare.guestCount),fr=a.createSelector(e=>e.workspaceShare.guestLimit),Sr=a.createSelector(e=>e.workspaceShare.loadStatus==="loading"),gr=a.createSelector(e=>e.workspaceShare.loadError),yr=a.createSelector(e=>e.workspaceShare.creating),br=a.createSelector(e=>e.workspaceShare.createError),kr=a.createSelector(e=>e.workspaceShare.createdLink),wr=a.createSelector(e=>e.workspaceShare.revokingInviteId),Ir=a.createSelector(e=>e.workspaceShare.removingPrincipalId),_r=a.createSelector(e=>e.workspaceShare.addingPrincipalId),vr=a.createSelector(e=>e.workspaceShare.actionError),Cr=a.createSelector((e,t)=>I(e.workspaceShare,t).loadStatus!=="idle"),Ar=a.createSelector((e,t)=>t?g(I(e.workspaceShare,t).members):[]),Er=a.createSelector((e,t)=>!!t&&!I(e.workspaceShare,t).withheld&&V.select(e,t));a.createSelector((e,t)=>!!t&&I(e.workspaceShare,t).withheld);const Rr=a.createSelector((e,t)=>t?I(e.workspaceShare,t).removingPrincipalId:null);a.createSelector((e,t)=>t?I(e.workspaceShare,t).removeError:null);const Tr=a.createSelector(e=>e.workspaceShare.integrationAuth),Pr=a.createSelector(e=>e.workspaceShare.ownerForgeMissing),z=a.createSelector(e=>re.select(e)&&se.select(e)&&e.workspaceShare.sharingContext!==null&&e.workspaceShare.sharingContext===v.select(e)),jt=a.createSelector(e=>z.select(e)?e.workspaceShare.sharingEnabled:null),Or=a.createSelector(e=>z.select(e)&&e.workspaceShare.sharingChecking),qt=a.createSelector(e=>z.select(e)&&e.workspaceShare.sharingEnabling),Ft=a.createSelector(e=>z.select(e)?e.workspaceShare.sharingError:null),Wr=a.createSelector(e=>{if(!re.select(e))return!1;const t=e.workspaceShare;return!t.integrationAuthLoaded||se.select(e)&&jt.select(e)===null&&Ft.select(e)===null&&!qt.select(e)?!0:g(t.members).length===0&&(t.loadStatus==="idle"||t.loadStatus==="loading")}),Nr=a.createSelector(e=>re.select(e)&&!!e.workspaceShare.workspaceId&&(se.select(e)||(ge.select(e)?ge.select(e)===ue.select(e)?.principal.id:ot.select(e,e.workspaceShare.workspaceId)))&&ue.select(e)?.capabilities.workspaceGuestRoles===!0),xr=a.createSelector(e=>e.workspaceShare.pendingRolePrincipalIds),Mr=a.createSelector(e=>e.workspaceShare.roleErrors),ge=a.createSelector(e=>{const t=e.workspaceShare.workspaceId;return t?M.select(e,t)?.ownerPrincipalId??null:null}),Ht=a.createSelector(e=>{const t=v.select(e),s=st.select(e);return{context:t,workspaceIds:t?s.filter(r=>V.select(e,r)):[]}}),Lr=a.createSelector((e,t)=>{const s=I(e.workspaceShare,t);return{context:s.inviteContext,generation:s.inviteGeneration,withheld:s.inviteWithheld}}),$t=[],Bt=a.createSelector((e,t)=>{const s=v.select(e),r=I(e.workspaceShare,t);if(!s||r.inviteContext!==s||r.inviteWithheld||!V.select(e,t))return $t;const n=e.presence?.context===s?e.presence.members[t]:void 0,o=new Set(n?g(n).flatMap(i=>i.identity?[JSON.stringify([i.identity.provider,i.identity.host.toLowerCase(),i.identity.externalUserId])]:[]):[]),c=new Set;return g(e.workspaceShare.invites).filter(i=>{if(i.workspaceId!==t||!i.pinLogin?.trim()||i.revokedAt||i.redeemedAt&&!i.reusable||!(Date.parse(i.expiresAt)>r.inviteReceivedAt))return!1;const l=i.pinIdentity??(i.pinGithubUserId!==void 0?{provider:"github",host:"github.com",externalUserId:String(i.pinGithubUserId)}:null);if(n&&i.redeemedByPrincipalId&&k(n,i.redeemedByPrincipalId))return!1;if(!l)return!0;const m=JSON.stringify([l.provider,l.host.toLowerCase(),l.externalUserId]);return o.has(m)||c.has(m)?!1:(c.add(m),!0)})}),Dr=a.createSelector(e=>{const s=Ht.select(e).workspaceIds.flatMap(r=>Bt.select(e,r).map(n=>Date.parse(n.expiresAt)));return s.length?Math.min(...s):null});function Ur(e){return Object.entries(e).some(([t,s])=>s.available&&wt(t,s.authenticated))}const Gr=a.createSelector(e=>e.hostRequirements.git),jr=a.createSelector(e=>e.hostRequirements.node),qr=a.createSelector(e=>e.hostRequirements.gh),Fr=a.createSelector(e=>e.hostRequirements.checking),Hr=a.createSelector(e=>e.hostRequirements.hasCheckedOnce);function Ae(e){const t=e.gitlabAuth?.statusFailed===!0;return It({labsEnabled:e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0,protocolVersion:e.daemonHealth?.stats?.protocolVersion,githubConnected:e.githubAuth?.isAuthenticated===!0,githubSettled:e.githubAuth?.statusSettled===!0,githubFailed:e.githubAuth?.statusFailed===!0,gitlabConnected:e.gitlabAuth?.isConfigured===!0,gitlabSettled:e.gitlabAuth?.statusReady===!0||t,gitlabFailed:t})}const $r=a.createSelector(Ae),Br=a.createSelector(e=>e.hostRequirements.node.ok&&(e.hostRequirements.git.available||Ae(e))),Vr=a.createSelector(e=>{const t=e.hostRequirements.providerCli;return t?{context:t.context,warnings:g(t.warnings)}:void 0}),zr="22.0.0";function Vt(e){return e.length>15?`${e.slice(0,15)}…`:e}function H(e){return e.name?.trim()||Vt(e.clientId)}function Kr(e){const{eligibleClients:t,ownClientId:s,driving:r,pinnedClientId:n}=e,o=t.find(l=>l.clientId===s&&l.connected),c=r!==null&&!r.connected,i=!r||r.clientId===s;return{mode:c?"offline":i?"here":"elsewhere",hostName:r?H(r):o?H(o):"",canSwitchHere:!!(o&&n!==s)}}const Jr=a.createSelector(e=>e?.browserClients?.ownClientId??null),Yr=a.createSelector(e=>e?.browserClients?.ownClientIdConfirmed===!0);a.createSelector(e=>g(e.browserClients.liveClients));const Xr=a.createSelector((e,t)=>t?e?.browserClients?.byWorkspaceId[t]?.liveClientsLoaded??!1:e?.browserClients?.liveClientsLoaded??!1);a.createSelector((e,t)=>k(e.browserClients.liveClients,t));const Zr=a.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).browserClient),Qr=a.createSelector((e,t)=>{const s=e?.browserClients?.byWorkspaceId[t];return s?.pinnedClientId!==void 0||s?.browserClient!=null});function X(e){const t=e.prettyHostname??e.hostname??e.name;return{clientId:e.clientId,...t!==void 0?{name:t}:{},connected:!0}}const en=a.createSelector((e,t)=>{const s=e?.browserClients??Q,r=s.byWorkspaceId[t]?.liveClients??ee(),n=g(r).filter(y=>y.capabilities.browserExec===!0).map(X),o=(s.byWorkspaceId[t]??Z).browserClient,c=s.byWorkspaceId[t],i=c?.pinnedClientId!==void 0?c.pinnedClientId:o?.source==="workspace"?o.clientId:null,l=i===null?Et(o):void 0;let m=null;if(o?.resolved){const y=k(r,o.resolved.clientId);m=y?X(y):{...o.resolved,connected:!0}}else o?.source==="workspace"?m={clientId:o.clientId,connected:!1}:l&&(m={clientId:l.clientId,connected:!1});return{eligibleClients:n,ownClientId:s.ownClientId??"",routedVia:o?.source==="default"?l?.via:void 0,driving:m,pinnedClientId:i}}),tn=a.createSelector((e,t)=>{const s=e?.browserClients??Q;if(!s.ownClientId||!s.ownClientIdConfirmed)return!1;const r=s.byWorkspaceId[t]?.liveClients??ee(),n=k(r,s.ownClientId);return n!==void 0&&n.capabilities.browserExec!==!0}),sn=a.createSelector((e,t,s)=>{const r=e?.browserClients??Q,n=s?r.byWorkspaceId[s]?.liveClients??ee():r.liveClients,o=s?r.byWorkspaceId[s]?.liveClientsLoaded:r.liveClientsLoaded,c=k(n,t);return c?{name:H(X(c)),connected:!0}:{name:H({clientId:t}),connected:!o}}),rn=a.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).tabsRevision),nn=a.createSelector(e=>Object.entries(e.browserClients?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),N=new Map;function an(e,t){return N.set(e,t),()=>{N.get(e)===t&&N.delete(e)}}async function on(e){const t=N.get(e);return t?t():null}function cn(e){N.delete(e)}const Ee="From repo config",ln="repo-config";function un(e,t){return t==="repo-config"?p.workspace_setupScriptEditor_fromRepoConfig_name():t==="custom"?p.workspace_setupScriptEditor_custom_name():e}function Re(e){if(!e||typeof e!="object"||Array.isArray(e))return{setupScript:null};const t=e.setupScript;return{setupScript:typeof t=="string"&&t.trim().length>0?t:null}}function zt(e){let t;try{t=JSON.parse(e)}catch{return null}return Re(t).setupScript}async function dn(e){if(!e)return null;try{const t=await w(Rt.SETUP_SCRIPTS.READ_REPO_CONFIG,{repoPath:e}),s=t?.success?t.data?.content:null;return typeof s=="string"?zt(s):null}catch{return null}}async function pn(e,t,s){if(!e||!t)return null;try{const{appClient:r}=await q(async()=>{const{appClient:o}=await import("./C3BW_tmx.js").then(c=>c.p);return{appClient:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url),n=await r.integrations.githubRepoConfig(e,t,s);return Re(n.config).setupScript}catch{return null}}function mn(e){const t=e.setupScript.trim();return t?e.setupScriptNameSource==="repo-config"&&e.setupScriptName===Ee&&e.repoConfigScriptRepo===e.repoPath&&t===(e.repoConfigScript??"").trim()?void 0:t:e.explicitChoice?"cd .":void 0}function hn(e){const{repoConfigScript:t,lastUsed:s,genericTemplate:r}=e;return t?{content:t,name:Ee,source:"repo-config"}:s?{content:s.content,name:s.nameSource==="repo-config"?"Custom":s.name,source:s.nameSource==="repo-config"?"custom":s.nameSource??"named"}:r?{content:r.content,name:r.name,source:"named"}:{content:"",name:"Custom",source:"custom"}}const Te="setup-scripts:last-used-by-repo",Pe="setup-scripts:recent-by-repo",$=20,Oe=10,Kt=["repo-config","custom","named"];function ne(e,t){return t?`${e}\0${t}`:e}function We(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return typeof t.name=="string"&&typeof t.content=="string"&&t.content.trim().length>0&&typeof t.usedAt=="string"&&(t.nameSource===void 0||Kt.includes(t.nameSource))}function B(){try{const e=localStorage.getItem(Te);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,n]of Object.entries(t))r&&We(n)&&(s[r]=n);return s}catch{return{}}}function Ne(){try{const e=localStorage.getItem(Pe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,n]of Object.entries(t)){if(!r||!Array.isArray(n))continue;const o=n.filter(We);o.length>0&&(s[r]=o)}return s}catch{return{}}}function Jt(e,t){return e.name===t.name&&(e.nameSource??"named")===(t.nameSource??"named")&&e.content.trim()===t.content.trim()}function xe(e){return[...e].sort((t,s)=>s.usedAt.localeCompare(t.usedAt))}function Me(e){const t=[];for(const s of e)t.some(r=>Jt(r,s))||t.push(s);return t}function fn(e,t){if(!e)return[];const s=ne(e,t),r=Ne()[s]??[],n=B()[s];return Me(xe(n?[...r,n]:r)).slice(0,Oe).map(c=>({name:c.name,content:c.content,nameSource:c.nameSource??"named",usedAt:c.usedAt}))}function Yt(e,t,s){try{const r=Ne(),n=r[e]??(s?[s]:[]);r[e]=Me([t,...xe(n)]).slice(0,Oe);const o=Object.entries(r);o.length>$&&(o.sort(([,c],[,i])=>i[0].usedAt.localeCompare(c[0].usedAt)),o.length=$),localStorage.setItem(Pe,JSON.stringify(Object.fromEntries(o)))}catch{}}function Sn(e,t){if(!e)return;const s=B()[ne(e,t)];return s?{name:s.name,content:s.content,nameSource:s.nameSource??"named"}:void 0}function gn(e,t,s){const r=t.content.trim();if(!e||!r)return;const n=ne(e,s),o={name:t.name,content:r,usedAt:new Date().toISOString(),nameSource:t.nameSource??"named"};Yt(n,o,B()[n]);try{const c=B();c[n]=o;const i=Object.entries(c);i.length>$&&(i.sort(([,l],[,m])=>m.usedAt.localeCompare(l.usedAt)),i.length=$),localStorage.setItem(Te,JSON.stringify(Object.fromEntries(i)))}catch{}}const Xt={async isAuthenticated(e){try{return await w(P.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async getAuthState(e=!1,t){try{return await w(P.GET_AUTH_STATE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0}}},async getStatus(e){try{return await w(P.GET_STATUS,...e===void 0?[]:[{workspaceId:e}])}catch{return{isConfigured:!1,oauthUrl:""}}},async fetchMyIssues(e="assigned",t){return(await this.fetchMyIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async fetchMyIssuesPage(e="assigned",t){try{return await w(P.FETCH_MY_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async searchIssuesPage(e,t){try{return await w(P.SEARCH_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}}},yn=Object.freeze(Object.defineProperty({__proto__:null,linearAuthClient:Xt},Symbol.toStringTag,{value:"Module"})),_={IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},Zt={async isAuthenticated(e){try{return await w(_.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async saveConfig(e,t){return await w(_.SAVE_CONFIG,{organization:e,apiToken:t})},async getAuthState(e){try{return await w(_.GET_AUTH_STATE,...e===void 0?[]:[{workspaceId:e}])}catch{return{isAuthenticated:!1}}},async logout(){await w(_.LOGOUT)},async fetchProjects(e){try{return await w(_.FETCH_PROJECTS,...e===void 0?[]:[{workspaceId:e}])}catch{return[]}},async fetchIssues(e){return(await this.fetchIssuesPage(e)).issues},async fetchIssuesPage(e){try{return await w(_.FETCH_ISSUES,e)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t)).issues},async searchIssuesPage(e,t,s){try{return await w(_.SEARCH_ISSUES,{query:e,project:t,...s})}catch{return{issues:[],nextToken:null}}},async getIssue(e,t){try{return await w(_.GET_ISSUE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return null}}},bn=Object.freeze(Object.defineProperty({__proto__:null,sentryAuthClient:Zt},Symbol.toStringTag,{value:"Module"})),ae=a.createSelector(e=>{const t=v.select(e);return!t||!ct.select(e)?null:JSON.stringify([t,e.hostExecution.generation,e.repositoryCheckout.authorityGeneration,e.gitlabAuth.host,e.gitlabAuth.instanceBaseUrl,e.gitlabAuth.statusReady,e.gitlabAuth.isConfigured,e.gitlabAuth.user])}),K=a.createSelector((e,t)=>k(e.repositoryCheckout.forms,t)??null),kn=a.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.projects):[]}),wn=a.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.branches):[]}),Qt=a.createSelector((e,t)=>{const s=K.select(e,t);return!s||s.status!=="ready"||s.admission!==ae.select(e)||!s.capture||!s.project||!s.branch?null:{checkoutId:s.capture.checkoutId,revision:s.capture.revision,projectPath:s.project.projectPath,branch:s.branch.name,commitSha:s.branch.commitSha,mode:s.mode}}),In=a.createSelector((e,t)=>{const s=Qt.select(e,t);return!!s&&(s.mode==="direct"||K.select(e,t)?.warmStatus==="ready")}),_n="__new-workspace__",vn="__initializer__",Cn="compact-workspace-initializer-state-prompt",An="onboarding-prompt",U=20*1024*1024,ye=Nt("NewWorkspaceDraft");function En(e,t){if(e.length>U)return ye.warn("Draft text exceeds the size guard; skipping persistence",{textLength:e.length,limit:U}),null;const s=Tt(t);if(s.length===0)return{text:e};const r=[];let n=e.length+2,o=0;for(const c of s){const i=JSON.stringify(c).length+1;if(n+i>U){o+=1;continue}r.push(c),n+=i}return o>0&&ye.warn("Draft attachments exceed the size guard; persisting the ones that fit",{limit:U,attachmentCount:s.length,droppedCount:o}),r.length>0?{text:e,attachments:r}:{text:e}}const es="host.providerAuthStatus";function ts(e={}){const t={};return e.workspaceId&&(t.workspaceId=e.workspaceId),typeof e.providerId=="string"&&e.providerId.length>0&&(t.providerId=e.providerId),typeof e.force=="boolean"&&(t.force=e.force),t}function ss(e,t){const s=t.toLowerCase(),r=e.toLowerCase();return s.startsWith(r)?/^(['’]s\s+organization)?$/.test(s.slice(r.length)):!1}function rs(e){const{email:t,orgName:s}=e??{};return t&&s?ss(t,s)?t:`${t} · ${s}`:t||s||void 0}function ns(e){const t={};for(const s of e?.providers??[]){const r={authenticated:s.authenticated??void 0},n=rs(s.identity);n!==void 0&&(r.authDetails=n),s.identity?.email&&(r.email=s.identity.email),t[s.id]=r}return t}const as=6e4,E=new Map,G=new Map,A=new Map;let F=0,Le=0;const os=e=>JSON.stringify([it.select(a.state),Le,e.workspaceId??null,e.providerId??"*"]);function cs(e){if(e.method!=="events.event"||!e.params)return;const t=e.params,r=(t.event&&typeof t.event=="object"?t.event:t).type;return typeof r=="string"?r:void 0}function J(e){if(F+=1,e)for(const t of E.keys()){const[,,,s]=JSON.parse(t);(s===e||s==="*")&&E.delete(t)}else E.clear()}typeof pe=="function"&&pe(e=>{["provider:auth-changed","host:execution-context-changed"].includes(cs(e)??"")&&J()});typeof me=="function"&&me(()=>{Le+=1,J()});function is(e={}){const t=os(e);if(e.force)J(e.providerId);else{const o=E.get(t);if(o&&o.expiresAt>Date.now())return Promise.resolve(o.verdicts);o&&E.delete(t)}const s=G.get(t);if(!e.force&&s?.generation===F)return s.promise;if(s){const o=A.get(t);if(o)return o.force||=e.force===!0,o.promise;let c;const i=s.promise.catch(()=>({})).then(()=>(A.get(t)===c&&A.delete(t),is({...e,force:c.force}))).finally(()=>{A.get(t)===c&&A.delete(t)});return c={force:e.force===!0,promise:i},A.set(t,c),i}const r=F,n=Ce(es,ts(e)).then(ns).then(o=>(r===F&&E.set(t,{verdicts:o,expiresAt:Date.now()+as}),o)).finally(()=>{G.get(t)?.promise===n&&G.delete(t)});return G.set(t,{generation:r,promise:n}),n}function Rn(e,t=e,s="default",r,n){if(!xt.select(a.state))return;const o=n??rt.select(a.state,t)??nt.select(a.state,t)[0];if(!o)return;const c=at.select(a.state,t,o),i={type:"discussion",title:r??(s==="new"?p.workspace_discussion_new_title():p.workspace_discussion_title()),workspaceId:e,closable:!0,data:{conversationId:s}},l=c?.tabs.find(m=>Fe(m,i));s==="new"&&a.dispatch(He(e)),a.dispatch(l?$e(t,l.id,o):Be(t,i,o,void 0,!0,void 0,!0))}function Tn(e,t){return e.name?.trim()?e.name.trim():e.kind==="workspace"?e.id&&e.id!=="default"?p.workspace_discussion_conversation_title():p.workspace_discussion_title():e.participants.filter(r=>r.principalId!==t).map(r=>r.displayName||r.login||p.workspace_discussion_unknownAuthor_label()).join(", ")||p.workspace_discussion_group_title()}const ls=a.createSelector((e,t,s)=>{const r=ve(e.repositoryContext,t);return s!==null&&r.binding===s?r:null});a.createSelector((e,t,s)=>{const r=ls.select(e,t.workspaceId,s);return r?.status==="ready"?k(r.roots,x(t))?.context:void 0});const Pn=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=ve(e.repositoryContext,t.workspaceId),r=s.ownership;return!r||r.demandId!==t.demandId||r.admission!==t.admission||r.request.workspaceId!==t.workspaceId?null:{status:s.status,scope:s.scope,revision:s.revision,roots:s.status==="ready"?g(s.roots).map(n=>n.context):[],unavailableReason:s.unavailableReason}}),On=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=e.repositoryContext.selectionEdits,r=s?k(s,t.editId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&x(r.owner.root)===x(t.root)?r:null}),Wn=a.createSelector((e,t)=>{const s=e.repositoryContext.selectionEdits;return!!s&&g(s).some(r=>r.owner.root.workspaceId===t&&r.owner.admission===v.select(e)&&(r.status==="capturing"||r.status==="pending"&&(!r.observation||r.observation.attempt?.status==="pending")))}),Nn=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission||t.hostContext===null||lt.select(e,t.root.workspaceId)!==t.hostContext)return null;const s=e.repositoryContext.nativeReviewAttempts,r=s?k(s,t.attemptId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&r.owner.hostContext===t.hostContext&&x(r.owner.root)===x(t.root)?r:null}),xn=a.createSelector((e,t)=>e.repositoryContext.nativeReviewAttempts?k(e.repositoryContext.nativeReviewAttempts,t):void 0),us=["venv",".venv","virtualenv","node_modules","google-cloud-sdk","__pycache__",".pytest_cache",".mypy_cache",".ruff_cache",".tox",".nox"];function ds(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function ps(e){const t=new Set(us);return ds(e).some(s=>t.has(s))}const ms=new Set(["lastActivity","statusMessage","statusImageAssetId"]),hs=new Set([".git",".playwright-cli",".svelte-kit",".vite",".turbo",".cache",".parcel-cache",".next",".nuxt",".output","build","coverage","dist","playwright-report","target","test-results"]);function fs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function Ss(e){if(!e.type.startsWith("file:"))return null;const t=e.data,s=t?.relativePath??t?.path??t?.filePath;return typeof s=="string"&&s.length>0?s:null}function gs(e){const t=Ss(e);return!t||ps(t)?!1:!fs(t).some(s=>hs.has(s))}function ys(e){if(e.type==="workspace:displayStatus-changed")return!0;if(e.type!=="workspace:updated")return!1;const t=e.data;if(!t?.changes||typeof t.changes!="object"||Array.isArray(t.changes))return!1;const s=Object.keys(t.changes).filter(r=>r!=="workspaceId");return s.length>0&&s.every(r=>ms.has(r))}function h(e){return typeof e=="string"?e.trim():""}function R(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function be(e){const t=R(e.data),s=h(t.agentId)||h(e.sessionId),r=h(t.messageId);return s&&r?JSON.stringify([s,r]):""}function bs(e){const t=R(e.data),s={workspaceId:e.workspaceId,closable:!0},r=n=>n?{...s,type:"note",noteId:n,title:h(t.title)||h(t.noteTitle)||p.layout_tabTypes_note_title()}:null;switch(e.type){case"note:created":case"note:updated":case"comment:added":case"comment:resolved":return r(h(t.noteId));case"task:status-changed":return r(h(t.noteId)||h(t.linkedNoteId));case"spec:updated":case"goal:updated":return r("spec");case"agent:created":case"agent:renamed":case"agent:restored":case"agent:updated":case"agent:message":case"agent:user-message:sent":{const n=h(t.agentId)||h(e.sessionId);return n?{...s,type:"agent",agentId:n,title:h(t.agentName)||p.layout_tabTypes_agent_title()}:null}case"file:changed":{const n=h(t.path)||h(t.relativePath);return n&&t.action!=="delete"?{...s,type:"file",filePath:n,title:n.split(/[\\/]/).pop()||n}:null}case"git:commit":{const n=h(t.commit),o=h(t.gitRootId);return n?{...s,type:"changes",title:p.layout_tabTypes_changes_title(),data:{commitHash:n,...o?{gitRootId:o}:{}}}:null}default:return null}}function ke(e,t){const s=R(e.data),r=Object.fromEntries(Object.entries(s).filter(([,c])=>typeof c=="string")),n=c=>t?p.workspace_peopleActivity_actorAction_label({name:t,action:c}):c;switch(e.type){case"note:created":case"note:updated":case"note:deleted":case"spec:updated":case"goal:updated":return O({...e,actor:{...e.actor,name:t},data:r});case"agent:created":case"agent:renamed":case"agent:deleted":case"agent:restored":case"git:commit":case"git:push":case"git:pull":case"git:branch":case"git:merge":return n(O({...e,actor:{...e.actor,name:void 0},data:r}));case"agent:updated":return h(s.modelId)||s.completionReportCleared===!0?n(O({...e,actor:{...e.actor,name:void 0},data:s})):null;case"file:changed":return gs(e)?O({...e,actor:{...e.actor,name:t},data:{path:h(s.path)||h(s.relativePath),action:h(s.action)}}):null;case"comment:added":return t?p.events_activity_authorCommented_label({author:t}):p.workspace_peopleActivity_commented_label();case"comment:resolved":return s.resolved===!1?n(p.events_activity_reopenedCommentThread_label()):s.resolved===!0?n(p.events_activity_resolvedCommentThread_label()):null;case"agent:message":case"agent:user-message:sent":{const c=h(s.agentName)||h(s.toAgentName);return n(c?p.workspace_peopleActivity_messagedAgent_label({agent:c}):p.workspace_peopleActivity_sentMessage_label())}case"task:status-changed":return n(O({...e,actor:{...e.actor,name:void 0},data:{taskName:h(s.taskName)||h(s.noteTitle),newStatus:h(s.newStatus)||h(s.status)}}));case"workspace:created":return n(p.events_activity_createdWorkspace_label());case"workspace:updated":{if(ys(e))return null;const c=R(s.changes);if(Object.keys(c).filter(l=>l!=="workspaceId").length===0)return null;const i=h(c.title);return n(i?p.events_activity_renamedWorkspaceTo_label({title:i}):p.events_activity_updatedWorkspace_label())}default:return null}}function W(e,t){const s=h(e);return s===t||/^(user|you|system|unknown|anonymous|local user)$/i.test(s)?"":s}function ks(e,t,s,r){const n=new Map(s.map(u=>[u.principalId,u])),o=new Map;for(const u of t){if(u.workspaceId!==e||u.type!=="agent:last-message")continue;const d=R(u.data),f=de({role:d.role==="user"?"user":"system",author:d.author,metadata:d.metadata}),S=be(u);if(!f||!S||typeof d.lastUserMessage!="string")continue;const b=Pt({id:h(d.messageId),role:"user",timestamp:u.timestamp,contentBlocks:[{type:"text",text:d.lastUserMessage}],author:f,metadata:d.metadata},r);b&&o.set(S,b)}const c=new Set,i=new Set,l=[];let m=0;for(const u of t){if(u.workspaceId!==e||!h(u.id)||c.has(u.id))continue;const d=Date.parse(u.timestamp);if(!Number.isFinite(d)){m++;continue}const f=R(u.data),S=u.type==="agent:message",b=S?de({role:f.role==="user"?"user":"system",author:f.author,metadata:f.metadata}):null;if(S?!b:u.actor?.type!=="user"){S&&f.role==="user"&&u.actor?.type==="user"&&ut(f.metadata)&&l.push({row:null,timestamp:d,segment:m});continue}const qe=S?h(f.messageId):"",T=S?be(u):"";if(T&&i.has(T))continue;const C=h(u.actor?.id),Y=C?n.get(C):void 0,L=b?W(b.displayName,b.principalId??"")||W(b.login,b.principalId??""):W(u.actor.name,C)||W(Y?.displayName,C)||W(Y?.login,C),ce=ke(u,"");if(!ce)continue;if(!L){l.push({row:null,timestamp:d,segment:m});continue}const D=S?o.get(T)??null:null,ie=D?p.workspace_peopleActivity_actorAction_label({name:L,action:D}):ke(u,L);ie&&(c.add(u.id),T&&i.add(T),l.push({timestamp:d,segment:m,row:{id:u.id,name:L,principalId:b?h(b.principalId)||null:C||null,avatarUrl:b?b.avatarUrl:Y?.avatarUrl??null,label:ie,actionLabel:D??ce,continuation:!1,timestamp:u.timestamp,destination:bs(u),messageId:qe||null,messagePreview:D}}))}l.sort((u,d)=>d.timestamp-u.timestamp);const y=[];for(const[u,d]of l.entries()){if(!d.row)continue;const f=l[u-1],S=f?f.timestamp-d.timestamp:NaN;d.row.continuation=!!(d.row.principalId&&f?.row?.principalId===d.row.principalId&&f.segment===d.segment&&Number.isFinite(S)&&S>=0&&S<=15*6e4),y.push(d.row)}return y}const Mn=a.createSelector(e=>e.workspaceEvents.subscriptionAttempt),Ln=a.createSelector(e=>e.workspaceEvents.subscriptionGeneration),ws=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).events),Dn=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).nextToken),Un=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]?.peopleRequestId??null)!==null),Gn=a.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleError??null),jn=a.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleInitialized??!1),De=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).peopleStreams),qn=a.createSelector((e,t)=>Object.values(De.select(e,t)).every(s=>s.initialized&&s.nextToken===null)),Fn=a.createSelector((e,t,s)=>{const r=ws.select(e,t),o=ks(t,r,_t.select(e,t),M.select(e,t)?.ownerPrincipalId)[s-1]?.timestamp,c=De.select(e,t);return["user","message"].filter(i=>{const l=c[i];if(!l.initialized)return!0;if(l.nextToken===null)return!1;const m=r.find(y=>y.id===l.oldestEventId)?.timestamp;return!o||!m||!(Date.parse(m)<=Date.parse(o))})}),Hn=a.createSelector((e,t)=>{const s=[],r=new Set,n=new Set,o=c=>{const i=c.block.attachmentId??c.id;if(!r.has(i)){if(!c.block.attachmentId&&c.block.data&&!c.block.dataTruncated){const l=`${c.block.mimeType}/${c.block.data}`;if(n.has(l))return;n.add(l)}r.add(i),s.push(c)}};for(const[c,i]of Object.entries(Ot.select(e,t)))for(const l of g(i))l.imageData&&l.imageMimeType?o({id:`draft/${c}/${l.id}`,name:l.label,block:{type:"image",data:l.imageData,mimeType:l.imageMimeType}}):l.type==="file"&&(l.attachmentId||l.placementStatus)&&o({id:`draft/${c}/${l.id}`,name:l.label,placementStatus:l.placementStatus,block:{type:l.attachmentMimeType?.startsWith("image/")?"image":"file",attachmentId:l.attachmentId,mimeType:l.attachmentMimeType,fileName:l.label,size:l.attachmentSize}});for(const c of dt.select(e,t)){const i=pt.select(e,c),l=[...mt.select(e,c),...ht.select(e,c)];for(const m of l)if(m.role==="user")for(const[y,u]of(m.contentBlocks??[]).entries()){if(u.type!=="image"&&!Wt(u))continue;const d=u.id?i?.[Ve(m.id,u.id)]:void 0,f=d?.status==="loaded"?d.block:u;o({id:`${c}/${m.id}/${u.id??y}`,name:f.fileName,block:f,agentId:c,messageId:m.id,hydration:d})}}return s}),Is=a.createSelector((e,t)=>e.context.byWorkspaceId[t]??ze),_s=a.createSelector((e,t)=>g(Is.select(e,t).items)),$n=a.createSelector((e,t)=>_s.select(e,t).filter(s=>!s.parentNoteId)),Bn=a.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedAgentIds??Ue),Vn=a.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedFilePaths??Ue),Ue={},zn=a.createSelector((e,t,s)=>{const r=e.gitWrite.byWorkspaceId[t]?.operations;return r?k(r,s):void 0}),Ge=a.createSelector((e,t)=>{const s=e.gitWrite.byWorkspaceId[t]?.operations;return s?g(s):[]}),Kn=a.createSelector((e,t)=>Ge.select(e,t).some(s=>s.status==="queued"||s.status==="running")),Jn=a.createSelector((e,t)=>Ge.select(e,t).filter(s=>s.operation.kind==="partialCommit"&&(s.status==="queued"||s.status==="running")));function we(e){return e.title||`PR #${e.number}`}const oe=a.createSelector((e,t)=>{const s=e.gitRoots?.byWorkspaceId?.[t];return s?g(s.gitRoots):[]});function vs(e){return{key:"primary",isPrimary:!0,path:e.worktreePath??e.path,branch:e.branch,repoOwner:e.repositoryOwner,repoName:e.repositoryName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests}}function Cs(e){return{key:e.id,isPrimary:!1,path:e.path,branch:e.branch,repoOwner:e.repoOwner,repoName:e.repoName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests,gitRoot:e}}const Yn=a.createSelector((e,t)=>{const s=M.select(e,t),r=oe.select(e,t).map(Cs);return s?[vs(s),...r]:r}),Xn=a.createSelector((e,t)=>oe.select(e,t).length>0),Zn=a.createSelector(e=>Object.entries(e.gitRoots?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),As=a.createSelector((e,t,s)=>k((e.acceptWorkflow.byWorkspaceId[t]??Ke).operations,s)),Qn=a.createSelector((e,t,s)=>As.select(e,t,s)?.status==="running"),ea=a.createSelector((e,t)=>e.acceptWorkflow.byWorkspaceId[t]?.mergeDrawerOpen??!1),ta=a.createSelector((e,t)=>{const s=ft.select(e,t)?.hasRemote??!1,r=M.select(e,t)?.pullRequests?.some(n=>n.status===le.Open||n.status===le.Draft)??!1;return{squash:!1,viaPR:s&&r,pushAfter:s,...e.acceptWorkflow.byWorkspaceId[t]?.mergeOptions}}),sa=a.createSelector(e=>Object.keys(e.acceptWorkflow.byWorkspaceId).filter(t=>e.acceptWorkflow.byWorkspaceId[t].observerRequested)),ra=a.createSelector((e,t)=>{const s=M.select(e,t),r=St.select(e,t),n=gt.select(e,t),o=s?.repositoryOwner&&s.repositoryName?`${s.repositoryOwner}/${s.repositoryName}`:void 0,c=vt(Ct(s?.pullRequests,s?.activePullRequest,(i,l)=>At(i,s?.repositoryOwner,s?.repositoryName,l),we,o),yt.select(e,t),o,oe.select(e,t),we).own;return{visible:(e.acceptWorkflow.byWorkspaceId[t]?.consumerCount??0)>0,ready:kt.select(e,t),owner:!bt.select(e,t),authenticated:Mt.select(e),pushedCount:r.filter(i=>i.isPushed).length,hasRemote:n.hasRemote,clearReset:n.hasResetToTrunk&&c.some(i=>i.status!=="merged"),clearMerge:!!(n.mergeHeadSha&&r[0]?.hash&&n.mergeHeadSha!==r[0].hash)}}),na=a.createSelector((e,t,s)=>e.bgExecutor?.byWorkspaceId[t]?.executors[s]??Je),Es=a.createSelector((e,t)=>e.prWorkflow.byWorkspaceId[t]??Ye);a.createSelector((e,t,s)=>Es.select(e,t).operations[s]);const aa=a.createSelector(e=>Object.keys(e.noteReadTracking.unreadNoteIds)),oa=a.createSelector(e=>e.noteReadTracking.readRecords),Rs="host.providerTestPrompt",Ts=Gt("ok",[he({ok:fe(!0)}).passthrough(),he({ok:fe(!1),reason:Se().min(1),message:Se()}).passthrough()]),Ps=3e5;async function ca(e){const t=await Ce(Rs,{providerId:e.providerId,...e.model?{model:e.model}:{}},{timeoutMs:Ps}),s=Ts.parse(t);return(s.ok||s.reason==="auth-required")&&J(e.providerId),s}const Os=-1,Ws=/^remote-script-lost:\s*/,Ns=["idle","starting","running","restarting","exited"],Ie=e=>!!e&&typeof e=="object"&&!Array.isArray(e),_e=e=>typeof e=="string"&&e.trim().length>0;function xs(e){return Ie(e)&&_e(e.remoteAgentId)&&_e(e.nodeId)&&Ie(e.runtime)&&Ns.includes(e.runtime.status)}function ia(e){return Array.isArray(e.machineRuns)?e.machineRuns.filter(xs):[]}function la(e,t,s){const r=Lt(e.nodeId,s)??{nodeId:e.nodeId,name:p.remoteAgent_location_unknownMachine(),platform:null,state:"ready"};if(s&&s.id===e.nodeId)return r;const n=t?.nodeId===e.nodeId?t:null;return{...r,name:n?.nodeName?.trim()||r.name,platform:Dt(n?.placement?.os,n?.placement?.arch)}}function Ms(e){return e.status==="exited"&&e.exitCode===Os}function Ls(e){const t=e.error?.trim().replace(Ws,"").trim();switch(t){case"the machine disconnected":return p.scripts_remote_lostDisconnected_label();case"the machine was removed":return p.scripts_remote_lostRemoved_label();case"the agent was deleted":return p.scripts_remote_lostAgentDeleted_label();case"the agent was stopped for good":return p.scripts_remote_lostAgentStopped_label();default:return t||p.scripts_remote_lostReason_fallback()}}function ua(e){if(Ms(e))return{kind:"lost",label:p.scripts_remote_lost_tooltip({reason:Ls(e)})};const t=Ut(e);switch(t){case"running":return{kind:t,label:p.terminal_quakeOverlay_status_running()};case"restarting":return{kind:t,label:p.workspace_devScripts_restarting_label()};case"idle":return{kind:t,label:p.terminal_quakeOverlay_status_idle()};case"succeeded":return{kind:t,label:p.terminal_quakeOverlay_status_exitedZero()};case"failed":return{kind:t,label:p.terminal_quakeOverlay_status_errorCode({code:e.exitCode??1})};case"stopped":return{kind:t,label:p.terminal_quakeOverlay_status_stoppedSignal({signal:(e.exitCode??128)-128})};default:return{kind:t,label:p.terminal_quakeOverlay_status_exited()}}}const j=e=>typeof e=="string"&&e.length>0,Ds=/\bremote-script-agent-ending:/;function da(e){return!!e&&Ds.test(e)}function pa(e){if(!e||typeof e!="object")return null;const t=e.data;if(!t||typeof t!="object")return null;const s=t,r=e instanceof Error&&e.message?{message:e.message}:{};return s.code==="machine-update-required"?{success:!1,code:"machine-update-required",update:s.update==="backend"?"backend":"machine",...j(s.machineVersion)?{machineVersion:s.machineVersion}:{},...j(s.backendVersion)?{backendVersion:s.backendVersion}:{},...r}:s.code==="machine-unreachable"?{success:!1,code:"machine-unreachable",attempts:Array.isArray(s.attempts)?s.attempts.flatMap(o=>{const c=o??{};return j(c.route)&&j(c.error)?[{route:c.route,error:c.error}]:[]}):[],...r}:null}function ma(e){const s=e.filter(n=>n.runtime.status==="running"&&n.runtime.detectedUrl?.trim()).sort((n,o)=>(o.runtime.startedAt??"").localeCompare(n.runtime.startedAt??""))[0],r=s?.runtime.detectedUrl?.trim();return!s||!r?null:{scriptId:s.id,name:s.name,url:r}}const Us={status:"idle",error:null},Gs=a.createSelector((e,t)=>e.workspaceLifecycle.loadByWorkspaceId[t]??Us);a.createSelector((e,t)=>Gs.select(e,t).error);const ha=a.createSelector((e,t)=>k(e.workspace.workspaces,t)??e.workspace.pendingCreations[t]),je=a.createSelector((e,t)=>e.workspaceLifecycle.sessionPhaseByWorkspaceId[t]),js=e=>e==="hydrated"||e==="live",fa=a.createSelector((e,t)=>{const s=je.select(e,t);return s==="hydrated"||s==="live"}),Sa=a.createSelector(e=>{const t=e.workspaceLifecycle.sessionPhaseByWorkspaceId;return Object.keys(t).filter(s=>js(t[s]))}),ga=a.createSelector((e,t)=>je.select(e,t)==="live");function ya(e){const{selectedProviderId:t,activeProviderId:s,recommitActive:r,dispatch:n}=e;if(t&&!(!r&&t===s))return n(Xe({providerId:t,enabled:!0})),n(Ze(t)),n(Qe()),t}function ba(e){const t=[];for(const s of e){let r={};if(s.metadata)try{r=JSON.parse(s.metadata)}catch{}const n=[];if(n.push(`[${s.identifier}] ${s.title}`),s.url&&n.push(`URL: ${s.url}`),s.description&&n.push(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/C3BW_tmx.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/Cv-W__h8.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/DBkMUdAo.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BZeUwBn0.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/ClsZrb8B.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/GdlMbZRO.js","/app/immutable/chunks/BePtUMMB.js","/app/immutable/chunks/DPvDLGgX.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/D4os-974.js","/app/immutable/chunks/BiLjH_HB.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/ZhmlPELZ.js","/app/immutable/chunks/BahFkvC5.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/Ct5KmixI.js","/app/immutable/chunks/BSY2iZcG.js","/app/immutable/chunks/B_zkbbdR.js","/app/immutable/chunks/DT0NjW76.js","/app/immutable/chunks/By364i7q.js","/app/immutable/chunks/D_EwpcgA.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/1o85IiDb.js","/app/immutable/chunks/BrYjurft.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/CnGNI1tD.js","/app/immutable/chunks/Px5_hntL.js","/app/immutable/chunks/DTDbZc--.js","/app/immutable/chunks/j0KL2ItM.js","/app/immutable/chunks/CgCdkhNg.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/BKpkoMuv.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/B10dK85Q.js","/app/immutable/chunks/CEpchTPD.js","/app/immutable/chunks/CUrYTyIw.js","/app/immutable/chunks/BtpuPEaR.js","/app/immutable/chunks/-ZizYe8A.js","/app/immutable/chunks/B415At74.js","/app/immutable/chunks/9yACX6ry.js","/app/immutable/chunks/CLGBx41M.js"])))=>i.map(i=>d[i]);
2
+ import{Ir as a,nI as I,ny as g,nx as k,m3 as Z,qq as Q,i7 as ee,va as Fe,jA as He,CS as $e,uH as Be,nP as ve,m6 as te,q0 as Ve,m5 as ze,lK as Ke,aM as le,lU as Je,l_ as Ye,Fp as Xe,CQ as Ze,zc as Qe,nN as et,m8 as tt}from"./DBkMUdAo.js";import{b as st,p as rt,F as nt,z as at}from"./BtpuPEaR.js";import{aX as V,aT as se,cD as v,cG as ue,co as ot,dr as M,aU as ct,cE as it,dl as lt,o as de,O as ut,dn as dt,c3 as pt,ak as mt,au as ht,ad as ft,bC as St,cA as gt,cY as yt,cm as bt,bD as kt}from"./B10dK85Q.js";import{x as wt}from"./CUrYTyIw.js";import{ah as It,cN as _t,aX as vt,av as Ct,p as At}from"./CLGBx41M.js";import{g as Et}from"./C3BW_tmx.js";import{bp as p,_ as q}from"./Cv-W__h8.js";import{i as w}from"./CEpchTPD.js";import{I as Rt}from"./GdlMbZRO.js";import{L as P}from"./BYdX7EnG.js";import{ae as Tt,k as Pt,h as O,a7 as Ot,p as Wt}from"./9yACX6ry.js";import{c as Nt}from"./ChTqQfQN.js";import{w as xt}from"./1o85IiDb.js";import{r as x}from"./uXuxG9cN.js";import{aN as Mt,O as Lt,R as Dt,x as Ut}from"./Px5_hntL.js";import{bs as pe,bt as me,ax as Ce}from"./BePtUMMB.js";import{d as Gt,o as he,l as fe,s as Se}from"./CIyUrgF0.js";const nr=a.createSelector(e=>e.workspaceShare.open),ar=a.createSelector(e=>e.workspaceShare.workspaceId),or=a.createSelector(e=>{const{open:t,workspaceId:s,session:r}=e.workspaceShare;return t&&s?{workspaceId:s,session:r}:null}),re=a.createSelector(e=>{const{open:t,workspaceId:s,withheld:r}=e.workspaceShare;return!t||!s||r||I(e.workspaceShare,s).inviteWithheld?!1:V.select(e,s)}),cr=a.createSelector(e=>e.workspaceShare.createRequest),ir=a.createSelector(e=>e.workspaceShare.mutationGeneration),lr=a.createSelector(e=>e.workspaceShare.workspaceTitle),ur=a.createSelector(e=>g(e.workspaceShare.members)),dr=a.createSelector((e,t)=>k(e.workspaceShare.members,t)!==void 0),pr=a.createSelector(e=>e.workspaceShare.open&&e.workspaceShare.workspaceId&&!e.workspaceShare.withheld&&!I(e.workspaceShare,e.workspaceShare.workspaceId).inviteWithheld?g(e.workspaceShare.invites).filter(t=>t.workspaceId===e.workspaceShare.workspaceId):[]),mr=a.createSelector(e=>{const{principals:t,members:s}=e.workspaceShare;return g(t).filter(r=>!k(s,r.principalId)&&(r.hostRole===void 0||r.hostRole==="guest"))}),hr=a.createSelector(e=>e.workspaceShare.guestCount),fr=a.createSelector(e=>e.workspaceShare.guestLimit),Sr=a.createSelector(e=>e.workspaceShare.loadStatus==="loading"),gr=a.createSelector(e=>e.workspaceShare.loadError),yr=a.createSelector(e=>e.workspaceShare.creating),br=a.createSelector(e=>e.workspaceShare.createError),kr=a.createSelector(e=>e.workspaceShare.createdLink),wr=a.createSelector(e=>e.workspaceShare.revokingInviteId),Ir=a.createSelector(e=>e.workspaceShare.removingPrincipalId),_r=a.createSelector(e=>e.workspaceShare.addingPrincipalId),vr=a.createSelector(e=>e.workspaceShare.actionError),Cr=a.createSelector((e,t)=>I(e.workspaceShare,t).loadStatus!=="idle"),Ar=a.createSelector((e,t)=>t?g(I(e.workspaceShare,t).members):[]),Er=a.createSelector((e,t)=>!!t&&!I(e.workspaceShare,t).withheld&&V.select(e,t));a.createSelector((e,t)=>!!t&&I(e.workspaceShare,t).withheld);const Rr=a.createSelector((e,t)=>t?I(e.workspaceShare,t).removingPrincipalId:null);a.createSelector((e,t)=>t?I(e.workspaceShare,t).removeError:null);const Tr=a.createSelector(e=>e.workspaceShare.integrationAuth),Pr=a.createSelector(e=>e.workspaceShare.ownerForgeMissing),z=a.createSelector(e=>re.select(e)&&se.select(e)&&e.workspaceShare.sharingContext!==null&&e.workspaceShare.sharingContext===v.select(e)),jt=a.createSelector(e=>z.select(e)?e.workspaceShare.sharingEnabled:null),Or=a.createSelector(e=>z.select(e)&&e.workspaceShare.sharingChecking),qt=a.createSelector(e=>z.select(e)&&e.workspaceShare.sharingEnabling),Ft=a.createSelector(e=>z.select(e)?e.workspaceShare.sharingError:null),Wr=a.createSelector(e=>{if(!re.select(e))return!1;const t=e.workspaceShare;return!t.integrationAuthLoaded||se.select(e)&&jt.select(e)===null&&Ft.select(e)===null&&!qt.select(e)?!0:g(t.members).length===0&&(t.loadStatus==="idle"||t.loadStatus==="loading")}),Nr=a.createSelector(e=>re.select(e)&&!!e.workspaceShare.workspaceId&&(se.select(e)||(ge.select(e)?ge.select(e)===ue.select(e)?.principal.id:ot.select(e,e.workspaceShare.workspaceId)))&&ue.select(e)?.capabilities.workspaceGuestRoles===!0),xr=a.createSelector(e=>e.workspaceShare.pendingRolePrincipalIds),Mr=a.createSelector(e=>e.workspaceShare.roleErrors),ge=a.createSelector(e=>{const t=e.workspaceShare.workspaceId;return t?M.select(e,t)?.ownerPrincipalId??null:null}),Ht=a.createSelector(e=>{const t=v.select(e),s=st.select(e);return{context:t,workspaceIds:t?s.filter(r=>V.select(e,r)):[]}}),Lr=a.createSelector((e,t)=>{const s=I(e.workspaceShare,t);return{context:s.inviteContext,generation:s.inviteGeneration,withheld:s.inviteWithheld}}),$t=[],Bt=a.createSelector((e,t)=>{const s=v.select(e),r=I(e.workspaceShare,t);if(!s||r.inviteContext!==s||r.inviteWithheld||!V.select(e,t))return $t;const n=e.presence?.context===s?e.presence.members[t]:void 0,o=new Set(n?g(n).flatMap(i=>i.identity?[JSON.stringify([i.identity.provider,i.identity.host.toLowerCase(),i.identity.externalUserId])]:[]):[]),c=new Set;return g(e.workspaceShare.invites).filter(i=>{if(i.workspaceId!==t||!i.pinLogin?.trim()||i.revokedAt||i.redeemedAt&&!i.reusable||!(Date.parse(i.expiresAt)>r.inviteReceivedAt))return!1;const l=i.pinIdentity??(i.pinGithubUserId!==void 0?{provider:"github",host:"github.com",externalUserId:String(i.pinGithubUserId)}:null);if(n&&i.redeemedByPrincipalId&&k(n,i.redeemedByPrincipalId))return!1;if(!l)return!0;const m=JSON.stringify([l.provider,l.host.toLowerCase(),l.externalUserId]);return o.has(m)||c.has(m)?!1:(c.add(m),!0)})}),Dr=a.createSelector(e=>{const s=Ht.select(e).workspaceIds.flatMap(r=>Bt.select(e,r).map(n=>Date.parse(n.expiresAt)));return s.length?Math.min(...s):null});function Ur(e){return Object.entries(e).some(([t,s])=>s.available&&wt(t,s.authenticated))}const Gr=a.createSelector(e=>e.hostRequirements.git),jr=a.createSelector(e=>e.hostRequirements.node),qr=a.createSelector(e=>e.hostRequirements.gh),Fr=a.createSelector(e=>e.hostRequirements.checking),Hr=a.createSelector(e=>e.hostRequirements.hasCheckedOnce);function Ae(e){const t=e.gitlabAuth?.statusFailed===!0;return It({labsEnabled:e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0,protocolVersion:e.daemonHealth?.stats?.protocolVersion,githubConnected:e.githubAuth?.isAuthenticated===!0,githubSettled:e.githubAuth?.statusSettled===!0,githubFailed:e.githubAuth?.statusFailed===!0,gitlabConnected:e.gitlabAuth?.isConfigured===!0,gitlabSettled:e.gitlabAuth?.statusReady===!0||t,gitlabFailed:t})}const $r=a.createSelector(Ae),Br=a.createSelector(e=>e.hostRequirements.node.ok&&(e.hostRequirements.git.available||Ae(e))),Vr=a.createSelector(e=>{const t=e.hostRequirements.providerCli;return t?{context:t.context,warnings:g(t.warnings)}:void 0}),zr="22.0.0";function Vt(e){return e.length>15?`${e.slice(0,15)}…`:e}function H(e){return e.name?.trim()||Vt(e.clientId)}function Kr(e){const{eligibleClients:t,ownClientId:s,driving:r,pinnedClientId:n}=e,o=t.find(l=>l.clientId===s&&l.connected),c=r!==null&&!r.connected,i=!r||r.clientId===s;return{mode:c?"offline":i?"here":"elsewhere",hostName:r?H(r):o?H(o):"",canSwitchHere:!!(o&&n!==s)}}const Jr=a.createSelector(e=>e?.browserClients?.ownClientId??null),Yr=a.createSelector(e=>e?.browserClients?.ownClientIdConfirmed===!0);a.createSelector(e=>g(e.browserClients.liveClients));const Xr=a.createSelector((e,t)=>t?e?.browserClients?.byWorkspaceId[t]?.liveClientsLoaded??!1:e?.browserClients?.liveClientsLoaded??!1);a.createSelector((e,t)=>k(e.browserClients.liveClients,t));const Zr=a.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).browserClient),Qr=a.createSelector((e,t)=>{const s=e?.browserClients?.byWorkspaceId[t];return s?.pinnedClientId!==void 0||s?.browserClient!=null});function X(e){const t=e.prettyHostname??e.hostname??e.name;return{clientId:e.clientId,...t!==void 0?{name:t}:{},connected:!0}}const en=a.createSelector((e,t)=>{const s=e?.browserClients??Q,r=s.byWorkspaceId[t]?.liveClients??ee(),n=g(r).filter(y=>y.capabilities.browserExec===!0).map(X),o=(s.byWorkspaceId[t]??Z).browserClient,c=s.byWorkspaceId[t],i=c?.pinnedClientId!==void 0?c.pinnedClientId:o?.source==="workspace"?o.clientId:null,l=i===null?Et(o):void 0;let m=null;if(o?.resolved){const y=k(r,o.resolved.clientId);m=y?X(y):{...o.resolved,connected:!0}}else o?.source==="workspace"?m={clientId:o.clientId,connected:!1}:l&&(m={clientId:l.clientId,connected:!1});return{eligibleClients:n,ownClientId:s.ownClientId??"",routedVia:o?.source==="default"?l?.via:void 0,driving:m,pinnedClientId:i}}),tn=a.createSelector((e,t)=>{const s=e?.browserClients??Q;if(!s.ownClientId||!s.ownClientIdConfirmed)return!1;const r=s.byWorkspaceId[t]?.liveClients??ee(),n=k(r,s.ownClientId);return n!==void 0&&n.capabilities.browserExec!==!0}),sn=a.createSelector((e,t,s)=>{const r=e?.browserClients??Q,n=s?r.byWorkspaceId[s]?.liveClients??ee():r.liveClients,o=s?r.byWorkspaceId[s]?.liveClientsLoaded:r.liveClientsLoaded,c=k(n,t);return c?{name:H(X(c)),connected:!0}:{name:H({clientId:t}),connected:!o}}),rn=a.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).tabsRevision),nn=a.createSelector(e=>Object.entries(e.browserClients?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),N=new Map;function an(e,t){return N.set(e,t),()=>{N.get(e)===t&&N.delete(e)}}async function on(e){const t=N.get(e);return t?t():null}function cn(e){N.delete(e)}const Ee="From repo config",ln="repo-config";function un(e,t){return t==="repo-config"?p.workspace_setupScriptEditor_fromRepoConfig_name():t==="custom"?p.workspace_setupScriptEditor_custom_name():e}function Re(e){if(!e||typeof e!="object"||Array.isArray(e))return{setupScript:null};const t=e.setupScript;return{setupScript:typeof t=="string"&&t.trim().length>0?t:null}}function zt(e){let t;try{t=JSON.parse(e)}catch{return null}return Re(t).setupScript}async function dn(e){if(!e)return null;try{const t=await w(Rt.SETUP_SCRIPTS.READ_REPO_CONFIG,{repoPath:e}),s=t?.success?t.data?.content:null;return typeof s=="string"?zt(s):null}catch{return null}}async function pn(e,t,s){if(!e||!t)return null;try{const{appClient:r}=await q(async()=>{const{appClient:o}=await import("./C3BW_tmx.js").then(c=>c.p);return{appClient:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url),n=await r.integrations.githubRepoConfig(e,t,s);return Re(n.config).setupScript}catch{return null}}function mn(e){const t=e.setupScript.trim();return t?e.setupScriptNameSource==="repo-config"&&e.setupScriptName===Ee&&e.repoConfigScriptRepo===e.repoPath&&t===(e.repoConfigScript??"").trim()?void 0:t:e.explicitChoice?"cd .":void 0}function hn(e){const{repoConfigScript:t,lastUsed:s,genericTemplate:r}=e;return t?{content:t,name:Ee,source:"repo-config"}:s?{content:s.content,name:s.nameSource==="repo-config"?"Custom":s.name,source:s.nameSource==="repo-config"?"custom":s.nameSource??"named"}:r?{content:r.content,name:r.name,source:"named"}:{content:"",name:"Custom",source:"custom"}}const Te="setup-scripts:last-used-by-repo",Pe="setup-scripts:recent-by-repo",$=20,Oe=10,Kt=["repo-config","custom","named"];function ne(e,t){return t?`${e}\0${t}`:e}function We(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return typeof t.name=="string"&&typeof t.content=="string"&&t.content.trim().length>0&&typeof t.usedAt=="string"&&(t.nameSource===void 0||Kt.includes(t.nameSource))}function B(){try{const e=localStorage.getItem(Te);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,n]of Object.entries(t))r&&We(n)&&(s[r]=n);return s}catch{return{}}}function Ne(){try{const e=localStorage.getItem(Pe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,n]of Object.entries(t)){if(!r||!Array.isArray(n))continue;const o=n.filter(We);o.length>0&&(s[r]=o)}return s}catch{return{}}}function Jt(e,t){return e.name===t.name&&(e.nameSource??"named")===(t.nameSource??"named")&&e.content.trim()===t.content.trim()}function xe(e){return[...e].sort((t,s)=>s.usedAt.localeCompare(t.usedAt))}function Me(e){const t=[];for(const s of e)t.some(r=>Jt(r,s))||t.push(s);return t}function fn(e,t){if(!e)return[];const s=ne(e,t),r=Ne()[s]??[],n=B()[s];return Me(xe(n?[...r,n]:r)).slice(0,Oe).map(c=>({name:c.name,content:c.content,nameSource:c.nameSource??"named",usedAt:c.usedAt}))}function Yt(e,t,s){try{const r=Ne(),n=r[e]??(s?[s]:[]);r[e]=Me([t,...xe(n)]).slice(0,Oe);const o=Object.entries(r);o.length>$&&(o.sort(([,c],[,i])=>i[0].usedAt.localeCompare(c[0].usedAt)),o.length=$),localStorage.setItem(Pe,JSON.stringify(Object.fromEntries(o)))}catch{}}function Sn(e,t){if(!e)return;const s=B()[ne(e,t)];return s?{name:s.name,content:s.content,nameSource:s.nameSource??"named"}:void 0}function gn(e,t,s){const r=t.content.trim();if(!e||!r)return;const n=ne(e,s),o={name:t.name,content:r,usedAt:new Date().toISOString(),nameSource:t.nameSource??"named"};Yt(n,o,B()[n]);try{const c=B();c[n]=o;const i=Object.entries(c);i.length>$&&(i.sort(([,l],[,m])=>m.usedAt.localeCompare(l.usedAt)),i.length=$),localStorage.setItem(Te,JSON.stringify(Object.fromEntries(i)))}catch{}}const Xt={async isAuthenticated(e){try{return await w(P.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async getAuthState(e=!1,t){try{return await w(P.GET_AUTH_STATE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0}}},async getStatus(e){try{return await w(P.GET_STATUS,...e===void 0?[]:[{workspaceId:e}])}catch{return{isConfigured:!1,oauthUrl:""}}},async fetchMyIssues(e="assigned",t){return(await this.fetchMyIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async fetchMyIssuesPage(e="assigned",t){try{return await w(P.FETCH_MY_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async searchIssuesPage(e,t){try{return await w(P.SEARCH_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}}},yn=Object.freeze(Object.defineProperty({__proto__:null,linearAuthClient:Xt},Symbol.toStringTag,{value:"Module"})),_={IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},Zt={async isAuthenticated(e){try{return await w(_.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async saveConfig(e,t){return await w(_.SAVE_CONFIG,{organization:e,apiToken:t})},async getAuthState(e){try{return await w(_.GET_AUTH_STATE,...e===void 0?[]:[{workspaceId:e}])}catch{return{isAuthenticated:!1}}},async logout(){await w(_.LOGOUT)},async fetchProjects(e){try{return await w(_.FETCH_PROJECTS,...e===void 0?[]:[{workspaceId:e}])}catch{return[]}},async fetchIssues(e){return(await this.fetchIssuesPage(e)).issues},async fetchIssuesPage(e){try{return await w(_.FETCH_ISSUES,e)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t)).issues},async searchIssuesPage(e,t,s){try{return await w(_.SEARCH_ISSUES,{query:e,project:t,...s})}catch{return{issues:[],nextToken:null}}},async getIssue(e,t){try{return await w(_.GET_ISSUE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return null}}},bn=Object.freeze(Object.defineProperty({__proto__:null,sentryAuthClient:Zt},Symbol.toStringTag,{value:"Module"})),ae=a.createSelector(e=>{const t=v.select(e);return!t||!ct.select(e)?null:JSON.stringify([t,e.hostExecution.generation,e.repositoryCheckout.authorityGeneration,e.gitlabAuth.host,e.gitlabAuth.instanceBaseUrl,e.gitlabAuth.statusReady,e.gitlabAuth.isConfigured,e.gitlabAuth.user])}),K=a.createSelector((e,t)=>k(e.repositoryCheckout.forms,t)??null),kn=a.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.projects):[]}),wn=a.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.branches):[]}),Qt=a.createSelector((e,t)=>{const s=K.select(e,t);return!s||s.status!=="ready"||s.admission!==ae.select(e)||!s.capture||!s.project||!s.branch?null:{checkoutId:s.capture.checkoutId,revision:s.capture.revision,projectPath:s.project.projectPath,branch:s.branch.name,commitSha:s.branch.commitSha,mode:s.mode}}),In=a.createSelector((e,t)=>{const s=Qt.select(e,t);return!!s&&(s.mode==="direct"||K.select(e,t)?.warmStatus==="ready")}),_n="__new-workspace__",vn="__initializer__",Cn="compact-workspace-initializer-state-prompt",An="onboarding-prompt",U=20*1024*1024,ye=Nt("NewWorkspaceDraft");function En(e,t){if(e.length>U)return ye.warn("Draft text exceeds the size guard; skipping persistence",{textLength:e.length,limit:U}),null;const s=Tt(t);if(s.length===0)return{text:e};const r=[];let n=e.length+2,o=0;for(const c of s){const i=JSON.stringify(c).length+1;if(n+i>U){o+=1;continue}r.push(c),n+=i}return o>0&&ye.warn("Draft attachments exceed the size guard; persisting the ones that fit",{limit:U,attachmentCount:s.length,droppedCount:o}),r.length>0?{text:e,attachments:r}:{text:e}}const es="host.providerAuthStatus";function ts(e={}){const t={};return e.workspaceId&&(t.workspaceId=e.workspaceId),typeof e.providerId=="string"&&e.providerId.length>0&&(t.providerId=e.providerId),typeof e.force=="boolean"&&(t.force=e.force),t}function ss(e,t){const s=t.toLowerCase(),r=e.toLowerCase();return s.startsWith(r)?/^(['’]s\s+organization)?$/.test(s.slice(r.length)):!1}function rs(e){const{email:t,orgName:s}=e??{};return t&&s?ss(t,s)?t:`${t} · ${s}`:t||s||void 0}function ns(e){const t={};for(const s of e?.providers??[]){const r={authenticated:s.authenticated??void 0},n=rs(s.identity);n!==void 0&&(r.authDetails=n),s.identity?.email&&(r.email=s.identity.email),t[s.id]=r}return t}const as=6e4,E=new Map,G=new Map,A=new Map;let F=0,Le=0;const os=e=>JSON.stringify([it.select(a.state),Le,e.workspaceId??null,e.providerId??"*"]);function cs(e){if(e.method!=="events.event"||!e.params)return;const t=e.params,r=(t.event&&typeof t.event=="object"?t.event:t).type;return typeof r=="string"?r:void 0}function J(e){if(F+=1,e)for(const t of E.keys()){const[,,,s]=JSON.parse(t);(s===e||s==="*")&&E.delete(t)}else E.clear()}typeof pe=="function"&&pe(e=>{["provider:auth-changed","host:execution-context-changed"].includes(cs(e)??"")&&J()});typeof me=="function"&&me(()=>{Le+=1,J()});function is(e={}){const t=os(e);if(e.force)J(e.providerId);else{const o=E.get(t);if(o&&o.expiresAt>Date.now())return Promise.resolve(o.verdicts);o&&E.delete(t)}const s=G.get(t);if(!e.force&&s?.generation===F)return s.promise;if(s){const o=A.get(t);if(o)return o.force||=e.force===!0,o.promise;let c;const i=s.promise.catch(()=>({})).then(()=>(A.get(t)===c&&A.delete(t),is({...e,force:c.force}))).finally(()=>{A.get(t)===c&&A.delete(t)});return c={force:e.force===!0,promise:i},A.set(t,c),i}const r=F,n=Ce(es,ts(e)).then(ns).then(o=>(r===F&&E.set(t,{verdicts:o,expiresAt:Date.now()+as}),o)).finally(()=>{G.get(t)?.promise===n&&G.delete(t)});return G.set(t,{generation:r,promise:n}),n}function Rn(e,t=e,s="default",r,n){if(!xt.select(a.state))return;const o=n??rt.select(a.state,t)??nt.select(a.state,t)[0];if(!o)return;const c=at.select(a.state,t,o),i={type:"discussion",title:r??(s==="new"?p.workspace_discussion_new_title():p.workspace_discussion_title()),workspaceId:e,closable:!0,data:{conversationId:s}},l=c?.tabs.find(m=>Fe(m,i));s==="new"&&a.dispatch(He(e)),a.dispatch(l?$e(t,l.id,o):Be(t,i,o,void 0,!0,void 0,!0))}function Tn(e,t){return e.name?.trim()?e.name.trim():e.kind==="workspace"?e.id&&e.id!=="default"?p.workspace_discussion_conversation_title():p.workspace_discussion_title():e.participants.filter(r=>r.principalId!==t).map(r=>r.displayName||r.login||p.workspace_discussion_unknownAuthor_label()).join(", ")||p.workspace_discussion_group_title()}const ls=a.createSelector((e,t,s)=>{const r=ve(e.repositoryContext,t);return s!==null&&r.binding===s?r:null});a.createSelector((e,t,s)=>{const r=ls.select(e,t.workspaceId,s);return r?.status==="ready"?k(r.roots,x(t))?.context:void 0});const Pn=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=ve(e.repositoryContext,t.workspaceId),r=s.ownership;return!r||r.demandId!==t.demandId||r.admission!==t.admission||r.request.workspaceId!==t.workspaceId?null:{status:s.status,scope:s.scope,revision:s.revision,roots:s.status==="ready"?g(s.roots).map(n=>n.context):[],unavailableReason:s.unavailableReason}}),On=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=e.repositoryContext.selectionEdits,r=s?k(s,t.editId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&x(r.owner.root)===x(t.root)?r:null}),Wn=a.createSelector((e,t)=>{const s=e.repositoryContext.selectionEdits;return!!s&&g(s).some(r=>r.owner.root.workspaceId===t&&r.owner.admission===v.select(e)&&(r.status==="capturing"||r.status==="pending"&&(!r.observation||r.observation.attempt?.status==="pending")))}),Nn=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission||t.hostContext===null||lt.select(e,t.root.workspaceId)!==t.hostContext)return null;const s=e.repositoryContext.nativeReviewAttempts,r=s?k(s,t.attemptId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&r.owner.hostContext===t.hostContext&&x(r.owner.root)===x(t.root)?r:null}),xn=a.createSelector((e,t)=>e.repositoryContext.nativeReviewAttempts?k(e.repositoryContext.nativeReviewAttempts,t):void 0),us=["venv",".venv","virtualenv","node_modules","google-cloud-sdk","__pycache__",".pytest_cache",".mypy_cache",".ruff_cache",".tox",".nox"];function ds(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function ps(e){const t=new Set(us);return ds(e).some(s=>t.has(s))}const ms=new Set(["lastActivity","statusMessage","statusImageAssetId"]),hs=new Set([".git",".playwright-cli",".svelte-kit",".vite",".turbo",".cache",".parcel-cache",".next",".nuxt",".output","build","coverage","dist","playwright-report","target","test-results"]);function fs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function Ss(e){if(!e.type.startsWith("file:"))return null;const t=e.data,s=t?.relativePath??t?.path??t?.filePath;return typeof s=="string"&&s.length>0?s:null}function gs(e){const t=Ss(e);return!t||ps(t)?!1:!fs(t).some(s=>hs.has(s))}function ys(e){if(e.type==="workspace:displayStatus-changed")return!0;if(e.type!=="workspace:updated")return!1;const t=e.data;if(!t?.changes||typeof t.changes!="object"||Array.isArray(t.changes))return!1;const s=Object.keys(t.changes).filter(r=>r!=="workspaceId");return s.length>0&&s.every(r=>ms.has(r))}function h(e){return typeof e=="string"?e.trim():""}function R(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function be(e){const t=R(e.data),s=h(t.agentId)||h(e.sessionId),r=h(t.messageId);return s&&r?JSON.stringify([s,r]):""}function bs(e){const t=R(e.data),s={workspaceId:e.workspaceId,closable:!0},r=n=>n?{...s,type:"note",noteId:n,title:h(t.title)||h(t.noteTitle)||p.layout_tabTypes_note_title()}:null;switch(e.type){case"note:created":case"note:updated":case"comment:added":case"comment:resolved":return r(h(t.noteId));case"task:status-changed":return r(h(t.noteId)||h(t.linkedNoteId));case"spec:updated":case"goal:updated":return r("spec");case"agent:created":case"agent:renamed":case"agent:restored":case"agent:updated":case"agent:message":case"agent:user-message:sent":{const n=h(t.agentId)||h(e.sessionId);return n?{...s,type:"agent",agentId:n,title:h(t.agentName)||p.layout_tabTypes_agent_title()}:null}case"file:changed":{const n=h(t.path)||h(t.relativePath);return n&&t.action!=="delete"?{...s,type:"file",filePath:n,title:n.split(/[\\/]/).pop()||n}:null}case"git:commit":{const n=h(t.commit),o=h(t.gitRootId);return n?{...s,type:"changes",title:p.layout_tabTypes_changes_title(),data:{commitHash:n,...o?{gitRootId:o}:{}}}:null}default:return null}}function ke(e,t){const s=R(e.data),r=Object.fromEntries(Object.entries(s).filter(([,c])=>typeof c=="string")),n=c=>t?p.workspace_peopleActivity_actorAction_label({name:t,action:c}):c;switch(e.type){case"note:created":case"note:updated":case"note:deleted":case"spec:updated":case"goal:updated":return O({...e,actor:{...e.actor,name:t},data:r});case"agent:created":case"agent:renamed":case"agent:deleted":case"agent:restored":case"git:commit":case"git:push":case"git:pull":case"git:branch":case"git:merge":return n(O({...e,actor:{...e.actor,name:void 0},data:r}));case"agent:updated":return h(s.modelId)||s.completionReportCleared===!0?n(O({...e,actor:{...e.actor,name:void 0},data:s})):null;case"file:changed":return gs(e)?O({...e,actor:{...e.actor,name:t},data:{path:h(s.path)||h(s.relativePath),action:h(s.action)}}):null;case"comment:added":return t?p.events_activity_authorCommented_label({author:t}):p.workspace_peopleActivity_commented_label();case"comment:resolved":return s.resolved===!1?n(p.events_activity_reopenedCommentThread_label()):s.resolved===!0?n(p.events_activity_resolvedCommentThread_label()):null;case"agent:message":case"agent:user-message:sent":{const c=h(s.agentName)||h(s.toAgentName);return n(c?p.workspace_peopleActivity_messagedAgent_label({agent:c}):p.workspace_peopleActivity_sentMessage_label())}case"task:status-changed":return n(O({...e,actor:{...e.actor,name:void 0},data:{taskName:h(s.taskName)||h(s.noteTitle),newStatus:h(s.newStatus)||h(s.status)}}));case"workspace:created":return n(p.events_activity_createdWorkspace_label());case"workspace:updated":{if(ys(e))return null;const c=R(s.changes);if(Object.keys(c).filter(l=>l!=="workspaceId").length===0)return null;const i=h(c.title);return n(i?p.events_activity_renamedWorkspaceTo_label({title:i}):p.events_activity_updatedWorkspace_label())}default:return null}}function W(e,t){const s=h(e);return s===t||/^(user|you|system|unknown|anonymous|local user)$/i.test(s)?"":s}function ks(e,t,s,r){const n=new Map(s.map(u=>[u.principalId,u])),o=new Map;for(const u of t){if(u.workspaceId!==e||u.type!=="agent:last-message")continue;const d=R(u.data),f=de({role:d.role==="user"?"user":"system",author:d.author,metadata:d.metadata}),S=be(u);if(!f||!S||typeof d.lastUserMessage!="string")continue;const b=Pt({id:h(d.messageId),role:"user",timestamp:u.timestamp,contentBlocks:[{type:"text",text:d.lastUserMessage}],author:f,metadata:d.metadata},r);b&&o.set(S,b)}const c=new Set,i=new Set,l=[];let m=0;for(const u of t){if(u.workspaceId!==e||!h(u.id)||c.has(u.id))continue;const d=Date.parse(u.timestamp);if(!Number.isFinite(d)){m++;continue}const f=R(u.data),S=u.type==="agent:message",b=S?de({role:f.role==="user"?"user":"system",author:f.author,metadata:f.metadata}):null;if(S?!b:u.actor?.type!=="user"){S&&f.role==="user"&&u.actor?.type==="user"&&ut(f.metadata)&&l.push({row:null,timestamp:d,segment:m});continue}const qe=S?h(f.messageId):"",T=S?be(u):"";if(T&&i.has(T))continue;const C=h(u.actor?.id),Y=C?n.get(C):void 0,L=b?W(b.displayName,b.principalId??"")||W(b.login,b.principalId??""):W(u.actor.name,C)||W(Y?.displayName,C)||W(Y?.login,C),ce=ke(u,"");if(!ce)continue;if(!L){l.push({row:null,timestamp:d,segment:m});continue}const D=S?o.get(T)??null:null,ie=D?p.workspace_peopleActivity_actorAction_label({name:L,action:D}):ke(u,L);ie&&(c.add(u.id),T&&i.add(T),l.push({timestamp:d,segment:m,row:{id:u.id,name:L,principalId:b?h(b.principalId)||null:C||null,avatarUrl:b?b.avatarUrl:Y?.avatarUrl??null,label:ie,actionLabel:D??ce,continuation:!1,timestamp:u.timestamp,destination:bs(u),messageId:qe||null,messagePreview:D}}))}l.sort((u,d)=>d.timestamp-u.timestamp);const y=[];for(const[u,d]of l.entries()){if(!d.row)continue;const f=l[u-1],S=f?f.timestamp-d.timestamp:NaN;d.row.continuation=!!(d.row.principalId&&f?.row?.principalId===d.row.principalId&&f.segment===d.segment&&Number.isFinite(S)&&S>=0&&S<=15*6e4),y.push(d.row)}return y}const Mn=a.createSelector(e=>e.workspaceEvents.subscriptionAttempt),Ln=a.createSelector(e=>e.workspaceEvents.subscriptionGeneration),ws=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).events),Dn=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).nextToken),Un=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]?.peopleRequestId??null)!==null),Gn=a.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleError??null),jn=a.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleInitialized??!1),De=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).peopleStreams),qn=a.createSelector((e,t)=>Object.values(De.select(e,t)).every(s=>s.initialized&&s.nextToken===null)),Fn=a.createSelector((e,t,s)=>{const r=ws.select(e,t),o=ks(t,r,_t.select(e,t),M.select(e,t)?.ownerPrincipalId)[s-1]?.timestamp,c=De.select(e,t);return["user","message"].filter(i=>{const l=c[i];if(!l.initialized)return!0;if(l.nextToken===null)return!1;const m=r.find(y=>y.id===l.oldestEventId)?.timestamp;return!o||!m||!(Date.parse(m)<=Date.parse(o))})}),Hn=a.createSelector((e,t)=>{const s=[],r=new Set,n=new Set,o=c=>{const i=c.block.attachmentId??c.id;if(!r.has(i)){if(!c.block.attachmentId&&c.block.data&&!c.block.dataTruncated){const l=`${c.block.mimeType}/${c.block.data}`;if(n.has(l))return;n.add(l)}r.add(i),s.push(c)}};for(const[c,i]of Object.entries(Ot.select(e,t)))for(const l of g(i))l.imageData&&l.imageMimeType?o({id:`draft/${c}/${l.id}`,name:l.label,block:{type:"image",data:l.imageData,mimeType:l.imageMimeType}}):l.type==="file"&&(l.attachmentId||l.placementStatus)&&o({id:`draft/${c}/${l.id}`,name:l.label,placementStatus:l.placementStatus,block:{type:l.attachmentMimeType?.startsWith("image/")?"image":"file",attachmentId:l.attachmentId,mimeType:l.attachmentMimeType,fileName:l.label,size:l.attachmentSize}});for(const c of dt.select(e,t)){const i=pt.select(e,c),l=[...mt.select(e,c),...ht.select(e,c)];for(const m of l)if(m.role==="user")for(const[y,u]of(m.contentBlocks??[]).entries()){if(u.type!=="image"&&!Wt(u))continue;const d=u.id?i?.[Ve(m.id,u.id)]:void 0,f=d?.status==="loaded"?d.block:u;o({id:`${c}/${m.id}/${u.id??y}`,name:f.fileName,block:f,agentId:c,messageId:m.id,hydration:d})}}return s}),Is=a.createSelector((e,t)=>e.context.byWorkspaceId[t]??ze),_s=a.createSelector((e,t)=>g(Is.select(e,t).items)),$n=a.createSelector((e,t)=>_s.select(e,t).filter(s=>!s.parentNoteId)),Bn=a.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedAgentIds??Ue),Vn=a.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedFilePaths??Ue),Ue={},zn=a.createSelector((e,t,s)=>{const r=e.gitWrite.byWorkspaceId[t]?.operations;return r?k(r,s):void 0}),Ge=a.createSelector((e,t)=>{const s=e.gitWrite.byWorkspaceId[t]?.operations;return s?g(s):[]}),Kn=a.createSelector((e,t)=>Ge.select(e,t).some(s=>s.status==="queued"||s.status==="running")),Jn=a.createSelector((e,t)=>Ge.select(e,t).filter(s=>s.operation.kind==="partialCommit"&&(s.status==="queued"||s.status==="running")));function we(e){return e.title||`PR #${e.number}`}const oe=a.createSelector((e,t)=>{const s=e.gitRoots?.byWorkspaceId?.[t];return s?g(s.gitRoots):[]});function vs(e){return{key:"primary",isPrimary:!0,path:e.worktreePath??e.path,branch:e.branch,repoOwner:e.repositoryOwner,repoName:e.repositoryName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests}}function Cs(e){return{key:e.id,isPrimary:!1,path:e.path,branch:e.branch,repoOwner:e.repoOwner,repoName:e.repoName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests,gitRoot:e}}const Yn=a.createSelector((e,t)=>{const s=M.select(e,t),r=oe.select(e,t).map(Cs);return s?[vs(s),...r]:r}),Xn=a.createSelector((e,t)=>oe.select(e,t).length>0),Zn=a.createSelector(e=>Object.entries(e.gitRoots?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),As=a.createSelector((e,t,s)=>k((e.acceptWorkflow.byWorkspaceId[t]??Ke).operations,s)),Qn=a.createSelector((e,t,s)=>As.select(e,t,s)?.status==="running"),ea=a.createSelector((e,t)=>e.acceptWorkflow.byWorkspaceId[t]?.mergeDrawerOpen??!1),ta=a.createSelector((e,t)=>{const s=ft.select(e,t)?.hasRemote??!1,r=M.select(e,t)?.pullRequests?.some(n=>n.status===le.Open||n.status===le.Draft)??!1;return{squash:!1,viaPR:s&&r,pushAfter:s,...e.acceptWorkflow.byWorkspaceId[t]?.mergeOptions}}),sa=a.createSelector(e=>Object.keys(e.acceptWorkflow.byWorkspaceId).filter(t=>e.acceptWorkflow.byWorkspaceId[t].observerRequested)),ra=a.createSelector((e,t)=>{const s=M.select(e,t),r=St.select(e,t),n=gt.select(e,t),o=s?.repositoryOwner&&s.repositoryName?`${s.repositoryOwner}/${s.repositoryName}`:void 0,c=vt(Ct(s?.pullRequests,s?.activePullRequest,(i,l)=>At(i,s?.repositoryOwner,s?.repositoryName,l),we,o),yt.select(e,t),o,oe.select(e,t),we).own;return{visible:(e.acceptWorkflow.byWorkspaceId[t]?.consumerCount??0)>0,ready:kt.select(e,t),owner:!bt.select(e,t),authenticated:Mt.select(e),pushedCount:r.filter(i=>i.isPushed).length,hasRemote:n.hasRemote,clearReset:n.hasResetToTrunk&&c.some(i=>i.status!=="merged"),clearMerge:!!(n.mergeHeadSha&&r[0]?.hash&&n.mergeHeadSha!==r[0].hash)}}),na=a.createSelector((e,t,s)=>e.bgExecutor?.byWorkspaceId[t]?.executors[s]??Je),Es=a.createSelector((e,t)=>e.prWorkflow.byWorkspaceId[t]??Ye);a.createSelector((e,t,s)=>Es.select(e,t).operations[s]);const aa=a.createSelector(e=>Object.keys(e.noteReadTracking.unreadNoteIds)),oa=a.createSelector(e=>e.noteReadTracking.readRecords),Rs="host.providerTestPrompt",Ts=Gt("ok",[he({ok:fe(!0)}).passthrough(),he({ok:fe(!1),reason:Se().min(1),message:Se()}).passthrough()]),Ps=3e5;async function ca(e){const t=await Ce(Rs,{providerId:e.providerId,...e.model?{model:e.model}:{}},{timeoutMs:Ps}),s=Ts.parse(t);return(s.ok||s.reason==="auth-required")&&J(e.providerId),s}const Os=-1,Ws=/^remote-script-lost:\s*/,Ns=["idle","starting","running","restarting","exited"],Ie=e=>!!e&&typeof e=="object"&&!Array.isArray(e),_e=e=>typeof e=="string"&&e.trim().length>0;function xs(e){return Ie(e)&&_e(e.remoteAgentId)&&_e(e.nodeId)&&Ie(e.runtime)&&Ns.includes(e.runtime.status)}function ia(e){return Array.isArray(e.machineRuns)?e.machineRuns.filter(xs):[]}function la(e,t,s){const r=Lt(e.nodeId,s)??{nodeId:e.nodeId,name:p.remoteAgent_location_unknownMachine(),platform:null,state:"ready"};if(s&&s.id===e.nodeId)return r;const n=t?.nodeId===e.nodeId?t:null;return{...r,name:n?.nodeName?.trim()||r.name,platform:Dt(n?.placement?.os,n?.placement?.arch)}}function Ms(e){return e.status==="exited"&&e.exitCode===Os}function Ls(e){const t=e.error?.trim().replace(Ws,"").trim();switch(t){case"the machine disconnected":return p.scripts_remote_lostDisconnected_label();case"the machine was removed":return p.scripts_remote_lostRemoved_label();case"the agent was deleted":return p.scripts_remote_lostAgentDeleted_label();case"the agent was stopped for good":return p.scripts_remote_lostAgentStopped_label();default:return t||p.scripts_remote_lostReason_fallback()}}function ua(e){if(Ms(e))return{kind:"lost",label:p.scripts_remote_lost_tooltip({reason:Ls(e)})};const t=Ut(e);switch(t){case"running":return{kind:t,label:p.terminal_quakeOverlay_status_running()};case"restarting":return{kind:t,label:p.workspace_devScripts_restarting_label()};case"idle":return{kind:t,label:p.terminal_quakeOverlay_status_idle()};case"succeeded":return{kind:t,label:p.terminal_quakeOverlay_status_exitedZero()};case"failed":return{kind:t,label:p.terminal_quakeOverlay_status_errorCode({code:e.exitCode??1})};case"stopped":return{kind:t,label:p.terminal_quakeOverlay_status_stoppedSignal({signal:(e.exitCode??128)-128})};default:return{kind:t,label:p.terminal_quakeOverlay_status_exited()}}}const j=e=>typeof e=="string"&&e.length>0,Ds=/\bremote-script-agent-ending:/;function da(e){return!!e&&Ds.test(e)}function pa(e){if(!e||typeof e!="object")return null;const t=e.data;if(!t||typeof t!="object")return null;const s=t,r=e instanceof Error&&e.message?{message:e.message}:{};return s.code==="machine-update-required"?{success:!1,code:"machine-update-required",update:s.update==="backend"?"backend":"machine",...j(s.machineVersion)?{machineVersion:s.machineVersion}:{},...j(s.backendVersion)?{backendVersion:s.backendVersion}:{},...r}:s.code==="machine-unreachable"?{success:!1,code:"machine-unreachable",attempts:Array.isArray(s.attempts)?s.attempts.flatMap(o=>{const c=o??{};return j(c.route)&&j(c.error)?[{route:c.route,error:c.error}]:[]}):[],...r}:null}function ma(e){const s=e.filter(n=>n.runtime.status==="running"&&n.runtime.detectedUrl?.trim()).sort((n,o)=>(o.runtime.startedAt??"").localeCompare(n.runtime.startedAt??""))[0],r=s?.runtime.detectedUrl?.trim();return!s||!r?null:{scriptId:s.id,name:s.name,url:r}}const Us={status:"idle",error:null},Gs=a.createSelector((e,t)=>e.workspaceLifecycle.loadByWorkspaceId[t]??Us);a.createSelector((e,t)=>Gs.select(e,t).error);const ha=a.createSelector((e,t)=>k(e.workspace.workspaces,t)??e.workspace.pendingCreations[t]),je=a.createSelector((e,t)=>e.workspaceLifecycle.sessionPhaseByWorkspaceId[t]),js=e=>e==="hydrated"||e==="live",fa=a.createSelector((e,t)=>{const s=je.select(e,t);return s==="hydrated"||s==="live"}),Sa=a.createSelector(e=>{const t=e.workspaceLifecycle.sessionPhaseByWorkspaceId;return Object.keys(t).filter(s=>js(t[s]))}),ga=a.createSelector((e,t)=>je.select(e,t)==="live");function ya(e){const{selectedProviderId:t,activeProviderId:s,recommitActive:r,dispatch:n}=e;if(t&&!(!r&&t===s))return n(Xe({providerId:t,enabled:!0})),n(Ze(t)),n(Qe()),t}function ba(e){const t=[];for(const s of e){let r={};if(s.metadata)try{r=JSON.parse(s.metadata)}catch{}const n=[];if(n.push(`[${s.identifier}] ${s.title}`),s.url&&n.push(`URL: ${s.url}`),s.description&&n.push(`
3
3
  Description:
4
4
  ${s.description}`),r.state&&n.push(`Status: ${r.state}`),r.teamName&&n.push(`Team: ${r.teamName}`),r.priority!==void 0){const o=["No priority","Urgent","High","Medium","Low"];n.push(`Priority: ${o[r.priority]||r.priority}`)}r.assignee&&n.push(`Assignee: ${r.assignee}`),t.push({type:s.itemType||"unknown",provider:s.provider,identifier:s.identifier,title:s.title,url:s.url,content:n.join(`
5
- `),metadata:r})}return t}function ka(e){const t=[];for(const s of e){if(s.type!=="file")continue;let r=s.meta?.fullPath||s.meta?.path||"";if(!r&&s.id?.startsWith("file-")){const n=s.id.slice(5);(n.startsWith("/")||/^[A-Za-z]:/.test(n))&&(r=n)}if(!r&&s.uri)if(s.uri.startsWith("devspace://file/"))try{r=decodeURIComponent(s.uri.slice(16))}catch{}else s.uri.startsWith("file:")&&(r=s.uri.slice(5));r||(r=s.label||s.meta?.name||""),t.push({type:"file",path:r,title:s.label})}return t}async function wa(e,t){const s=[];for(const r of e){if(r.type==="terminal")try{const{terminalManager:n}=await q(async()=>{const{terminalManager:l}=await import("./BSY2iZcG.js").then(m=>m.c);return{terminalManager:l}},__vite__mapDeps([25,3,2,20,21,12,8,0,1,4,5,6,7,9,10,11,13,14,15,16,17,18,19,22,23,24,26,27,28,29,30,31,32,33,34]),import.meta.url),o=r.meta?.workspaceId||"",c=r.id??"",i=await n.getBufferContent(c,o);i&&s.push({type:"terminal",content:i,title:r.label,metadata:{terminalName:r.label,terminalId:c}})}catch(n){t?.warn("[OnboardingContext] Failed to read terminal buffer:",n)}if(r.type==="script")try{const{selectScriptById:n,selectScriptRuntime:o}=await q(async()=>{const{selectScriptById:S,selectScriptRuntime:b}=await import("./CYK-PIHY.js");return{selectScriptById:S,selectScriptRuntime:b}},__vite__mapDeps([35,4,5,3,6,7,8,9,2,10,11,12,36,37,14,15,13,16,17,18,19,38,39,40,41,42,43,44,45,23,32,46,21,20,47,48,24,1,49]),import.meta.url),{readScriptContextOutputLines:c}=await q(async()=>{const{readScriptContextOutputLines:S}=await import("./m6_pcI91.js");return{readScriptContextOutputLines:S}},__vite__mapDeps([50,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,51,45,41,32,38,52,36,37,39,40,42,43,44,46,47,48,49,35]),import.meta.url),i=r.meta?.workspaceId||"",l=r.id??"",m=a.state,y=await c(m,i,l),u=n.select(m,i,l),d=o.select(m,i,l);let f=`Script: ${u?.name||r.label}
5
+ `),metadata:r})}return t}function ka(e){const t=[];for(const s of e){if(s.type!=="file")continue;let r=s.meta?.fullPath||s.meta?.path||"";if(!r&&s.id?.startsWith("file-")){const n=s.id.slice(5);(n.startsWith("/")||/^[A-Za-z]:/.test(n))&&(r=n)}if(!r&&s.uri)if(s.uri.startsWith("devspace://file/"))try{r=decodeURIComponent(s.uri.slice(16))}catch{}else s.uri.startsWith("file:")&&(r=s.uri.slice(5));r||(r=s.label||s.meta?.name||""),t.push({type:"file",path:r,title:s.label})}return t}async function wa(e,t){const s=[];for(const r of e){if(r.type==="terminal")try{const{terminalManager:n}=await q(async()=>{const{terminalManager:l}=await import("./BSY2iZcG.js").then(m=>m.c);return{terminalManager:l}},__vite__mapDeps([25,3,2,20,21,12,8,0,1,4,5,6,7,9,10,11,13,14,15,16,17,18,19,22,23,24,26,27,28,29,30,31,32,33,34]),import.meta.url),o=r.meta?.workspaceId||"",c=r.id??"",i=await n.getBufferContent(c,o);i&&s.push({type:"terminal",content:i,title:r.label,metadata:{terminalName:r.label,terminalId:c}})}catch(n){t?.warn("[OnboardingContext] Failed to read terminal buffer:",n)}if(r.type==="script")try{const{selectScriptById:n,selectScriptRuntime:o}=await q(async()=>{const{selectScriptById:S,selectScriptRuntime:b}=await import("./CnGNI1tD.js");return{selectScriptById:S,selectScriptRuntime:b}},__vite__mapDeps([35,4,5,3,6,7,8,9,2,10,11,12,36,37,14,15,13,16,17,18,19,38,39,40,41,42,43,44,45,23,32,46,21,20,47,48,24,1,49]),import.meta.url),{readScriptContextOutputLines:c}=await q(async()=>{const{readScriptContextOutputLines:S}=await import("./B415At74.js");return{readScriptContextOutputLines:S}},__vite__mapDeps([50,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,51,45,41,32,38,52,36,37,39,40,42,43,44,46,47,48,49,35]),import.meta.url),i=r.meta?.workspaceId||"",l=r.id??"",m=a.state,y=await c(m,i,l),u=n.select(m,i,l),d=o.select(m,i,l);let f=`Script: ${u?.name||r.label}
6
6
  `;if(f+=`Command: ${u?.command||"unknown"}
7
7
  `,f+=`Status: ${d.status}`,d.exitCode!==null&&d.exitCode!==void 0&&(f+=` (exit code: ${d.exitCode})`),f+=`
8
8
  `,d.detectedUrl&&(f+=`URL: ${d.detectedUrl}
@@ -1,4 +1,4 @@
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"./Cv-W__h8.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"./D4os-974.js";import{n as yr,p as Ro,v as Lt,u as Me,w as So,I as To,g as It}from"./DPvDLGgX.js";import{b as wt}from"./BaIAhI85.js";import{d as xr}from"./BA0YX2GW.js";import{H as $o,G as Uo,I as Ao}from"./GdlMbZRO.js";import{c as nr}from"./ChTqQfQN.js";import{a as Bo}from"./CC7to1B5.js";import{f as Be,bc as No}from"./BePtUMMB.js";import{k as st}from"./DTDbZc--.js";import{s as Oo}from"./ClsZrb8B.js";import{ck as Or,F as _e,a4 as Mo,aV as Do,an as Ko,cF as Vo,aI as Wo,aW as Jt,Y as ar,_ as ir,aZ as Mr,as as zo,ay as Dr,cO as Go,cd as Kr,bO as Vr,ci as qo}from"./BKpkoMuv.js";import"./CgCdkhNg.js";import{Ir as Pe,fL as Ho,br as jo,z8 as Zo,yv as Xo,Kq as Cr,dI as Yo,bL as Jo,Kp as Qo,uf as en,Kn as kr,gr as tn,tC as rn,Ko as on,K3 as Ir,Km as Er}from"./DBkMUdAo.js";import"./BgcFKXg4.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"./D2pEu7en.js";import{a as qr,B as Et}from"./BvFAWM27.js";import{cq as fn}from"./C3yAChji.js";import{a3 as gn,u as vn}from"./Bn40lmOa.js";import{w as pn,K as wn}from"./BtpuPEaR.js";import{I as $t}from"./B8IFnCn1.js";import{d as bn}from"./BSY2iZcG.js";import{a3 as mn,ae as _n}from"./BuE6Eygz.js";import{i as Qt}from"./CEpchTPD.js";import{i as hn,a as yn}from"./CUQ53Tah.js";import{B as xn,m as Cn,n as kn}from"./DV-Q2Imq.js";import"./BvDMLNjQ.js";import{t as Ke}from"./j0KL2ItM.js";import{M as Hr}from"./C-SF0TBp.js";import"./9s3slwY6.js";import"./Dj_1qKAG.js";import{b as In}from"./DAZ23kin.js";import"./DUGj7TPr.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"./e0XMdR1L.js";import{aw as Ln,_ as Fn}from"./Cgp7P5r8.js";import{aO as Rn}from"./B10dK85Q.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=`
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"./Cv-W__h8.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"./D4os-974.js";import{n as yr,p as Ro,v as Lt,u as Me,w as So,I as To,g as It}from"./DPvDLGgX.js";import{b as wt}from"./BaIAhI85.js";import{d as xr}from"./xCFY18Nb.js";import{H as $o,G as Uo,I as Ao}from"./GdlMbZRO.js";import{c as nr}from"./ChTqQfQN.js";import{a as Bo}from"./CC7to1B5.js";import{f as Be,bc as No}from"./BePtUMMB.js";import{k as st}from"./DTDbZc--.js";import{s as Oo}from"./ClsZrb8B.js";import{ck as Or,F as _e,a4 as Mo,aV as Do,an as Ko,cF as Vo,aI as Wo,aW as Jt,Y as ar,_ as ir,aZ as Mr,as as zo,ay as Dr,cO as Go,cd as Kr,bO as Vr,ci as qo}from"./BKpkoMuv.js";import"./CgCdkhNg.js";import{Ir as Pe,fL as Ho,br as jo,z8 as Zo,yv as Xo,Kq as Cr,dI as Yo,bL as Jo,Kp as Qo,uf as en,Kn as kr,gr as tn,tC as rn,Ko as on,K3 as Ir,Km as Er}from"./DBkMUdAo.js";import"./BgcFKXg4.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"./D2pEu7en.js";import{a as qr,B as Et}from"./BvFAWM27.js";import{cq as fn}from"./Px5_hntL.js";import{a3 as gn,u as vn}from"./9yACX6ry.js";import{w as pn,K as wn}from"./BtpuPEaR.js";import{I as $t}from"./B8IFnCn1.js";import{d as bn}from"./BSY2iZcG.js";import{a3 as mn,ae as _n}from"./B07CbBFu.js";import{i as Qt}from"./CEpchTPD.js";import{i as hn,a as yn}from"./CUQ53Tah.js";import{B as xn,m as Cn,n as kn}from"./OtM9LD2A.js";import"./BvDMLNjQ.js";import{t as Ke}from"./j0KL2ItM.js";import{M as Hr}from"./C-SF0TBp.js";import"./9s3slwY6.js";import"./Dj_1qKAG.js";import{b as In}from"./DAZ23kin.js";import"./DUGj7TPr.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"./gNRMLIyt.js";import{aw as Ln,_ as Fn}from"./CJstP53T.js";import{aO as Rn}from"./B10dK85Q.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
2
  (function() {
3
3
  if (window.__augmentKeyboardInterceptorInstalled) return;
4
4
  window.__augmentKeyboardInterceptorInstalled = true;
@@ -1,4 +1,4 @@
1
- var a1=Object.defineProperty;var i1=(t,e,r)=>e in t?a1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>i1(t,typeof e!="symbol"?e+"":e,r);import{cD as ur,aU as s1,ds as _l,_ as R0,Y as ya,Z as o1,X as l1,a1 as c1,ab as u1,U as d1,dT as h1,M as p1,ba as Pl,cG as Pr,dr as Ll,aT as m1,aX as f1,co as g1,cE as v1,c9 as b1,dl as Xa,dN as y1,dG as w1,ay as Fn,al as k1,at as Ti,dq as Ol,dD as x1,dX as $l,dW as S1}from"./B10dK85Q.js";import{D as Ps,bv as A1,bM as T1,aY as E1}from"./C3yAChji.js";import{M as M1,F as i0}from"./GdlMbZRO.js";import{yw as gn,Ir as E,ny as ge,nx as Se,aM as C1,g as Bl,y as Re,be as c0,jT as Ei,lS as vn,aj as jt,lR as Ls,l$ as Os,lY as $s,jq as ql,gj as Ka,GP as I1,t2 as z1,zT as R1,oB as D1,mE as bn,Bs as N1,iw as _1,m9 as P1,lM as L1}from"./DBkMUdAo.js";import{bp as ne}from"./Cv-W__h8.js";import{t as rt}from"./j0KL2ItM.js";import{l as O1,d as xr}from"./C3BW_tmx.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Xe,l as h0,g as $1,n as Pe,c as or,b as Ue,u as B1,d as q1}from"./CIyUrgF0.js";import{j as Fl}from"./uXuxG9cN.js";import{w as F1}from"./1o85IiDb.js";import{b as H1}from"./BtpuPEaR.js";import{i as He}from"./CEpchTPD.js";import{l as wa,c as Hl}from"./ChTqQfQN.js";import{f as Mi,C as Ul,D as Wl,l as U1,z as Gl,r as W1,u as G1}from"./CUrYTyIw.js";import{e as j1,h as Sr}from"./BahFkvC5.js";import{ax as p0}from"./BePtUMMB.js";import{i as Bs}from"./ZhmlPELZ.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function V1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const Y1=new Uint8Array(16);function X1(){return crypto.getRandomValues(Y1)}function Ci(t,e,r){return crypto.randomUUID?crypto.randomUUID():K1(t)}function K1(t,e,r){t=t||{};const n=t.random??t.rng?.()??X1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,V1(n)}function Ii(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=Ii({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?M1(r.replace(/\.git\/?$/,""),e):null}function w5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":Ii(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function k5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function x5(t){return t.type==="local"&&t.path?t.path:void 0}const Z1=["/.clones/","/.repo-cache/"];function S5(t){const e=t.replaceAll("\\","/");return Z1.some(r=>e.includes(r))}function A5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Q1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function T5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Q1(r)}}function E5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const J1="known-repos",ed=6e4;function td({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function M5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function C5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<ed?"skip":"load"}function I5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=Ii(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function rd({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ps)?Ps:null;return s===null||!i(s)?null:s}const z5=E.createSelector(t=>t.workspaceInitializer.hydrated),R5=E.createSelector(t=>t.workspaceInitializer.compactFormState),D5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),N5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),_5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),P5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),L5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),O5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),$5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),B5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),q5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),F5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),H5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),U5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),W5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),G5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),j5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),V5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),Y5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),X5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),K5=E.createSelector(t=>rd({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:T1.select(t),orchestratorId:A1.select(t)?.id??null})),nd=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&s1.select(t)?JSON.stringify([r,e]):null}),Z5=E.createSelector(t=>{const e=nd.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),ad=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,J1),r=ur.select(t);return td({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),Q5=E.createSelector(t=>_l.select(t)?ad.select(t):[]),J5=E.createSelector(t=>E1.select(t)||void 0),qs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class id{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(qs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(qs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new id;function e3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function sd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function t3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function r3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function n3(t,e){return`${e}:${t.agentId??"manual"}`}function od(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ld(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function cd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function a3(t,e,r,n){const a=od(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function i3(t,e,r){const n=ld(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function s3(t,e){const r=cd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function o3(t,e){return e===0&&t.length>0}function l3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function c3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function u3(t,e,r){return r?.path===t&&r?.staged===e}function d3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function h3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function ud(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function p3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=ud(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?zi(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function m3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??C1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function dd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${o1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:dd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:zi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function zi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function f3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const K=`${C.toLowerCase()}#${W.number}`;if(M.has(K))continue;M.add(K);const X=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:X,htmlUrl:X,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:zi(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Fs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function g3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Fs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[l1(t)??e],n=Fs(t)?O1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(sd(a.mergeBlockedReason))),r.join(`
1
+ var a1=Object.defineProperty;var i1=(t,e,r)=>e in t?a1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>i1(t,typeof e!="symbol"?e+"":e,r);import{cD as ur,aU as s1,ds as _l,_ as R0,Y as ya,Z as o1,X as l1,a1 as c1,ab as u1,U as d1,dT as h1,M as p1,ba as Pl,cG as Pr,dr as Ll,aT as m1,aX as f1,co as g1,cE as v1,c9 as b1,dl as Xa,dN as y1,dG as w1,ay as Fn,al as k1,at as Ti,dq as Ol,dD as x1,dX as $l,dW as S1}from"./B10dK85Q.js";import{D as Ps,bv as A1,bM as T1,aY as E1}from"./Px5_hntL.js";import{M as M1,F as i0}from"./GdlMbZRO.js";import{yw as gn,Ir as E,ny as ge,nx as Se,aM as C1,g as Bl,y as Re,be as c0,jT as Ei,lS as vn,aj as jt,lR as Ls,l$ as Os,lY as $s,jq as ql,gj as Ka,GP as I1,t2 as z1,zT as R1,oB as D1,mE as bn,Bs as N1,iw as _1,m9 as P1,lM as L1}from"./DBkMUdAo.js";import{bp as ne}from"./Cv-W__h8.js";import{t as rt}from"./j0KL2ItM.js";import{l as O1,d as xr}from"./C3BW_tmx.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Xe,l as h0,g as $1,n as Pe,c as or,b as Ue,u as B1,d as q1}from"./CIyUrgF0.js";import{j as Fl}from"./uXuxG9cN.js";import{w as F1}from"./1o85IiDb.js";import{b as H1}from"./BtpuPEaR.js";import{i as He}from"./CEpchTPD.js";import{l as wa,c as Hl}from"./ChTqQfQN.js";import{f as Mi,C as Ul,D as Wl,l as U1,z as Gl,r as W1,u as G1}from"./CUrYTyIw.js";import{e as j1,h as Sr}from"./BahFkvC5.js";import{ax as p0}from"./BePtUMMB.js";import{i as Bs}from"./ZhmlPELZ.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function V1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const Y1=new Uint8Array(16);function X1(){return crypto.getRandomValues(Y1)}function Ci(t,e,r){return crypto.randomUUID?crypto.randomUUID():K1(t)}function K1(t,e,r){t=t||{};const n=t.random??t.rng?.()??X1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,V1(n)}function Ii(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=Ii({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?M1(r.replace(/\.git\/?$/,""),e):null}function w5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":Ii(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function k5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function x5(t){return t.type==="local"&&t.path?t.path:void 0}const Z1=["/.clones/","/.repo-cache/"];function S5(t){const e=t.replaceAll("\\","/");return Z1.some(r=>e.includes(r))}function A5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Q1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function T5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Q1(r)}}function E5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const J1="known-repos",ed=6e4;function td({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function M5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function C5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<ed?"skip":"load"}function I5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=Ii(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function rd({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ps)?Ps:null;return s===null||!i(s)?null:s}const z5=E.createSelector(t=>t.workspaceInitializer.hydrated),R5=E.createSelector(t=>t.workspaceInitializer.compactFormState),D5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),N5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),_5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),P5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),L5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),O5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),$5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),B5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),q5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),F5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),H5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),U5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),W5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),G5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),j5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),V5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),Y5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),X5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),K5=E.createSelector(t=>rd({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:T1.select(t),orchestratorId:A1.select(t)?.id??null})),nd=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&s1.select(t)?JSON.stringify([r,e]):null}),Z5=E.createSelector(t=>{const e=nd.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),ad=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,J1),r=ur.select(t);return td({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),Q5=E.createSelector(t=>_l.select(t)?ad.select(t):[]),J5=E.createSelector(t=>E1.select(t)||void 0),qs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class id{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(qs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(qs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new id;function e3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function sd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function t3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function r3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function n3(t,e){return`${e}:${t.agentId??"manual"}`}function od(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ld(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function cd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function a3(t,e,r,n){const a=od(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function i3(t,e,r){const n=ld(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function s3(t,e){const r=cd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function o3(t,e){return e===0&&t.length>0}function l3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function c3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function u3(t,e,r){return r?.path===t&&r?.staged===e}function d3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function h3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function ud(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function p3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=ud(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?zi(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function m3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??C1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function dd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${o1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:dd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:zi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function zi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function f3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const K=`${C.toLowerCase()}#${W.number}`;if(M.has(K))continue;M.add(K);const X=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:X,htmlUrl:X,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:zi(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Fs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function g3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Fs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[l1(t)??e],n=Fs(t)?O1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(sd(a.mergeBlockedReason))),r.join(`
2
2
  `)}function v3(t,e){return e.has(t??"manual")}function b3(t,e){return{path:t.relativePath,additions:t.stats.additions,deletions:t.stats.deletions,staged:e,status:t.status,attribution:t.attribution?.agent?{agentId:t.attribution.agent.agentId,agentName:t.attribution.agent.agentName,sessionId:t.attribution.agent.sessionId,turnNumber:t.attribution.agent.turnNumber,timestamp:t.attribution.timestamp}:void 0}}const Vl=500;function y3(t,e=Vl){const r=Math.max(0,Math.floor(e));return t.length<=r?{visible:t,shown:t.length,hiddenCount:0}:{visible:t.slice(0,r),shown:r,hiddenCount:t.length-r}}function w3(t,e,r=Vl){let n=Math.max(0,Math.floor(r)),a=0,i=0;return{groups:t.map(o=>{if(e(o))return{group:o,visibleFiles:[]};const c=Math.min(n,o.files.length);return n-=c,a+=c,i+=o.files.length-c,{group:o,visibleFiles:c===o.files.length?o.files:o.files.slice(0,c)}}),shown:a,hiddenCount:i}}function k3(t){if(t.hiddenCount<=0)return"";const e=rt(t.shown),r=rt(t.shown+t.hiddenCount);return t.hiddenCount===1?ne.workspace_fileChanges_hiddenFiles_one({shown:e,total:r}):ne.workspace_fileChanges_hiddenFiles_many({shown:e,total:r,count:rt(t.hiddenCount)})}function hd(t){if(!t)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Qa(t){return t.startsWith("@")?t.slice(1):t}function pd(t,e,r,n){const a=t.fullPath||t.path||t.filename;if(a)return Qa(String(a));const i=[r,e,n.trim()].map(Qa).filter(Boolean),s=i.find(o=>o.includes("/"))??i[0];return s?c1(s).path:void 0}function md(t){const e=t.line??t.startLine??t.range?.start;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function fd(t){if(!t||t.getAttribute("data-mention")===null)return null;const e=t.getAttribute("data-type")||"",r=t.getAttribute("data-id")||"",n=t.getAttribute("data-label")||"",a=t.getAttribute("data-uri")||"",i=hd(t.getAttribute("data-meta")),s={type:e,id:r,label:n,uri:a,meta:i},o=a.startsWith("intent://")?a:typeof i.fullUrl=="string"&&i.fullUrl.startsWith("intent://")?i.fullUrl:void 0;if(o&&(s.intentUrl=o),e==="file"||e==="file-range"){const c=pd(i,n,r,t.textContent||"");c&&(s.filePath=c);const d=md(i);d!==void 0&&(s.line=d)}else if(e==="folder"||e==="source-folder"){const c=i.fullPath||i.path||r||n,d=c?Qa(String(c)).replace(/\/+$/,""):"";d&&(s.folderPath=d)}else if(e==="note"||e==="note-range"){const c=i.noteId||r;c&&(s.note=i.isExternalLink&&i.workspaceId?{id:c,workspaceId:String(i.workspaceId)}:{id:c})}return s}function x3(t){return{sidebarTabId:"files",type:"file",filePath:`${t}/`}}function Ri(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Lr=Ri();function Yl(t){Lr=t}var Ir={exec:()=>null};function Xr(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),a=e[n];return a||(a=t(n),e[n]=a),a}}function ce(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ye.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}var gd=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Ye={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Xr(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Xr(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}>`))},vd=/^(?:[ \t]*(?:\n|$))+/,bd=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yd=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,W0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wd=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Di=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Xl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kl=ce(Xl).replace(/bull/g,Di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),kd=ce(Xl).replace(/bull/g,Di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ni=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,xd=/^[^\n]+/,_i=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Sd=ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_i).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ad=ce(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Di).getRegex(),Hn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Pi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Td=ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Pi).replace("tag",Hn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Zl=t=>ce(Ni).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Ed=Zl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Md=Zl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Cd=ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Md).getRegex(),Li={blockquote:Cd,code:bd,def:Sd,fences:yd,heading:wd,hr:W0,html:Td,lheading:Kl,list:Ad,newline:vd,paragraph:Ed,table:Ir,text:xd},Hs=ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Id={...Li,lheading:kd,table:Hs,paragraph:ce(Ni).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hs).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex()},zd={...Li,html:ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Pi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ir,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ce(Ni).replace("hr",W0).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("lheading",Kl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Rd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ql=/^( {2,}|\\)\n(?!\s*$)/,Nd=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vt=/[\p{P}\p{S}]/u,m0=/[\s\p{P}\p{S}]/u,G0=/[^\s\p{P}\p{S}]/u,_d=ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,m0).getRegex(),Pd=/[\p{Pi}\p{Ps}"']/u,Jl=/(?!~)[\p{P}\p{S}]/u,Ld=/(?!~)[\s\p{P}\p{S}]/u,Od=/(?:[^\s\p{P}\p{S}]|~)/u,$d=ce(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gd?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ec=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bd=ce(ec,"u").replace(/punct/g,Vt).getRegex(),qd=ce(ec,"u").replace(/punct/g,Jl).getRegex(),Fd=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Hd=ce(Fd,"u").replace(/openQuote/g,Pd).replace(/punct/g,Vt).getRegex(),tc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ud=ce(tc,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Wd=ce(tc,"gu").replace(/notPunctSpace/g,Od).replace(/punctSpace/g,Ld).replace(/punct/g,Jl).getRegex(),Gd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",jd=ce(Gd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Vd=ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Yd="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Xd=ce(Yd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Kd=ce(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Vt).getRegex(),Zd="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Qd=ce(Zd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Jd=ce(/\\(punct)/,"gu").replace(/punct/g,Vt).getRegex(),eh=ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),th=ce(Pi).replace("(?:-->|$)","-->").getRegex(),rh=ce("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",th).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Pn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nh=ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Pn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rc=ce(/^!?\[(label)\]\[(ref)\]/).replace("label",Pn).replace("ref",_i).getRegex(),nc=ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",_i).getRegex(),ah=ce("reflink|nolink(?!\\()","g").replace("reflink",rc).replace("nolink",nc).getRegex(),Us=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Oi={_backpedal:Ir,anyPunctuation:Jd,autolink:eh,blockSkip:$d,br:Ql,code:Dd,del:Ir,delLDelim:Ir,delRDelim:Ir,emStrongLDelim:Bd,emStrongRDelimAst:Ud,emStrongRDelimUnd:Vd,escape:Rd,link:nh,nolink:nc,punctuation:_d,reflink:rc,reflinkSearch:ah,tag:rh,text:Nd,url:Ir},ih={...Oi,emStrongLDelim:Hd,emStrongRDelimAst:jd,emStrongRDelimUnd:Xd,link:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",Pn).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pn).getRegex()},Ja={...Oi,emStrongRDelimAst:Wd,emStrongLDelim:qd,delLDelim:Kd,delRDelim:Qd,url:ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Us).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ce(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Us).getRegex()},sh={...Ja,br:ce(Ql).replace("{2,}","*").getRegex(),text:ce(Ja.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wn={normal:Li,gfm:Id,pedantic:zd},S0={normal:Oi,gfm:Ja,breaks:sh,pedantic:ih},oh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ws=t=>oh[t];function Dt(t,e){if(e){if(Ye.escapeTest.test(t))return t.replace(Ye.escapeReplace,Ws)}else if(Ye.escapeTestNoEncode.test(t))return t.replace(Ye.escapeReplaceNoEncode,Ws);return t}function Gs(t){try{t=encodeURI(t).replace(Ye.percentDecode,"%")}catch{return null}return t}function js(t,e){let r=t.replace(Ye.findPipe,(i,s,o)=>{let c=!1,d=s;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ye.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ye.slashPipe,"|");return n}function tr(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}function Vs(t){let e=t.split(`
4
4
  `),r=e.length-1;for(;r>=0&&Ye.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
@@ -1,2 +1,2 @@
1
- import{Ir as g,rm as b,I4 as S}from"./DBkMUdAo.js";import{V as A,bk as _}from"./CUrYTyIw.js";import{bv as k}from"./B10dK85Q.js";import{bM as y,bI as w}from"./C3yAChji.js";import{bp as n}from"./Cv-W__h8.js";import{t as I}from"./j0KL2ItM.js";const z=g.createSelector(e=>e.backgroundAgentSettings.defaultModel),B=g.createSelector(e=>e.backgroundAgentSettings.typeOverrides),G=g.createSelector(e=>e.backgroundAgentSettings.defaultReasoningEffort),W=g.createSelector(e=>e.backgroundAgentSettings.typeReasoningEffortOverrides),j=g.createSelector(e=>e.backgroundAgentSettings);function r(e){return{category:"settings",...e}}const f=[{id:"new-workspace",tab:"",label:"New workspace",route:"/workspace/new",category:"navigation",description:"Create-workspace flow."},r({id:"utility-default-model",tab:"providers",hashAliases:["utility-default-model","default-model","quickActions.defaultModel","backgroundAgents.defaultModel"],scrollSelector:"#utility-default-model",highlightSelector:'[data-highlight-id="utility-default-model"]',label:"Settings: Default model",route:"/settings?tab=providers#utility-default-model",description:"Default AI behavior model selection."}),r({id:"global-instructions",tab:"agent-behavior",hashAliases:["global-instructions","agents","specialists","all-agents"],scrollSelector:"#global-instructions",highlightSelector:'[data-highlight-id="global-instructions"]',label:"Settings: Agent Behavior",route:"/settings?tab=agent-behavior#global-instructions",description:"Global agent instructions and defaults."}),r({id:"create-specialist",tab:"specialists",hashAliases:["create-specialist"],scrollSelector:"#create-specialist",highlightSelector:'[data-highlight-id="create-specialist"]',label:"Settings: Create specialist",route:"/settings?tab=specialists&view=create-specialist#create-specialist",description:"Create-specialist entry point."}),r({id:"providers",tab:"providers",hashAliases:["providers"],scrollSelector:"#providers",highlightSelector:'[data-highlight-id="providers"]',label:"Settings: AI coding CLIs",route:"/settings?tab=providers#providers",description:"Provider/account selector settings."}),r({id:"integrations",tab:"connections",hashAliases:["integrations"],scrollSelector:"#integrations",highlightSelector:'[data-highlight-id="integrations"]',label:"Settings: Connections",route:"/settings?tab=connections#integrations",description:"Connected integrations settings."}),r({id:"devices",tab:"devices",hashAliases:["devices","machines"],scrollSelector:"#devices",highlightSelector:"#devices",label:"Settings: Machines",route:"/settings?tab=devices#devices",description:"Saved remote machine settings."}),r({id:"mobile",tab:"mobile",hashAliases:["mobile"],scrollSelector:"#mobile",highlightSelector:'[data-highlight-id="mobile"]',label:"Settings: Mobile",route:"/settings?tab=mobile#mobile",description:"Remote access and Intent Mobile pairing."}),r({id:"guest-sessions",tab:"collaboration",hashAliases:["collaboration","guest-sessions","sharing"],scrollSelector:"#collaboration",highlightSelector:"#collaboration",label:"Settings: Collaboration",route:"/settings?tab=collaboration#collaboration",description:"Host membership, workspace guests and joined hosts."}),r({id:"websocket-api",tab:"mobile",hashAliases:["websocket-api","remote-access"],scrollSelector:"#websocket-api",highlightSelector:'[data-highlight-id="websocket-api"]',label:"Settings: Remote Access",route:"/settings?tab=mobile#websocket-api",description:"Remote access (WebSocket API) settings."}),...[["voice","Voice Dictation","Voice dictation settings.","input"],["keyboard-shortcuts","Keyboard Shortcuts","Keyboard shortcuts reference.","input"],["mcp-servers","MCP Servers","MCP server configuration.","connections"],["plugins","Plugins","App-wide Agent Plugins.","connections"],["git-workspace","Git & Workspace","Git and workspace defaults.","setup"],["git","Git","Git defaults.","setup"],["shell","Shell","Shell and CLI optimization settings.","setup"],["workspace","Workspace","Workspace defaults.","setup"],["cli-optimization","CLI Optimization","RTK/CLI optimization settings.","setup"],["workspace-api","Tool Output & Retention","Tool output size and retention settings.","advanced"],["notifications","Notifications","Notification preferences.","app-behavior"],["updates","Updates","Application update preferences.","app-behavior"],["open-in","Open In","External editor/app launch preferences.","app-behavior"],["github-link-action","GitHub Links","GitHub issue and pull request link behavior.","app-behavior"],["agent-features","Agent Features","Agent feature settings.","agent-behavior"],["font-style","Font style","Font style settings.","display"],["language","Language","Application language settings.","display"],["labs","Labs","Experimental feature switches.","advanced"],["agent-backend","Agent Backend","Agent backend settings.","advanced"],["connection","Connection","Daemon connection details.","advanced"],["hardware","Hardware","Hardware integration settings.","advanced"],["developer","Developer","Development-only settings.","advanced"]].map(([e,t,i,a])=>r({id:e,tab:a,hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=${a}#${e}`,description:i})),r({id:"appearance",tab:"display",hashAliases:["appearance","theme"],scrollSelector:"#theme",highlightSelector:'[data-highlight-id="appearance"]',label:"Settings: Appearance",route:"/settings?tab=display#theme",description:"Theme mode controls."}),...[["color-theme","Color theme","Color theme selection."],["note-font","Notes font","Notes/spec font style."],["agent-chat-font","Agent chat font","Agent chat font style."],["code-font","Code font","Code editor and diff font."]].map(([e,t,i])=>r({id:e,tab:"display",hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=display#${e}`,description:i})),r({id:"general",tab:"advanced",hashAliases:["general","reset"],scrollSelector:"#reset",highlightSelector:'[data-highlight-id="general"]',label:"Settings: Advanced",route:"/settings?tab=advanced#reset",description:"Advanced settings and reset controls."}),{id:"workspace-card",tab:"",hashAliases:["workspace-card"],highlightSelector:'[data-highlight-id^="workspace-"]',label:"Workspace card",category:"workspace",description:"A workspace card on workspace list surfaces.",dynamic:!0,idPattern:"workspace-{workspaceId}"},{id:"specialist-entry",tab:"specialists",highlightSelector:'[data-highlight-id^="specialist-"]',label:"Specialist entry",route:"/settings?tab=specialists&specialist={specialistId}#specialist-{specialistId}",category:"specialist",description:"A specific specialist row in settings.",dynamic:!0,idPattern:"specialist-{specialistId}"}];function m(e){const t=e.indexOf("#"),i=t>=0?e.slice(t+1):e;return decodeURIComponent(i.replace(/^#/,"")).trim()}function P(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function M(e,t){if(!t.match(/\{[^}]+\}/g)?.length)return e===t;const a=t.split(/\{[^}]+\}/g).map(P).join("[^/]+");return new RegExp(`^${a}$`).test(e)}function R(e){const t=m(e);if(!t)return;const i=f.find(o=>o.id===t||o.hashAliases?.includes(t));if(i)return i;const a=f.find(o=>o.route&&o.dynamic&&o.idPattern&&M(t,o.idPattern));return a?{...a,id:t}:void 0}function T(e){try{return new URL(e,"app://intent").pathname||"/"}catch{const t=e.indexOf("?"),i=e.indexOf("#");let a=e.length;return t>=0&&(a=Math.min(a,t)),i>=0&&(a=Math.min(a,i)),e.slice(0,a)||"/"}}const E=new Set(f.flatMap(e=>e.route?[T(e.route)]:[])),C=[/^\/workspace\/[^/]+$/,/^\/agent\/[^/]+$/];function F(e){if(typeof e!="string")return!1;const t=e.trim();if(!t)return!1;if(t.startsWith("intent://"))return!0;let i,a;try{const o=new URL(t,"app://intent");if(o.protocol!=="app:")return!1;i=o.pathname||"/",a=m(o.hash)}catch{return!1}return E.has(i)?a?!!R(a):!0:C.some(o=>o.test(i))}const U=g.createSelector(e=>{const t=new Map,i=(s,c)=>{const d=t.get(s)??new Set;d.add(c),t.set(s,d)},a=k.select(e),o=A.select(e),h=_.select(e)[o];h&&o&&i(o,n.settings_providers_inUseDefaultModel_label({model:h})),b(o)&&!h&&i(o,n.settings_providers_inUseDefaultProvider_label());const u=e.backgroundAgentSettings?.providerId;u&&b(u)&&i(u,n.settings_providers_inUseQuickActions_label());for(const s of y.select(e)){const c=w.select(e,s.id),d=s.source?{project:n.settings_providers_pinSourceProject_label(),user:n.settings_providers_pinSourceUser_label(),bundled:n.settings_providers_pinSourceBundled_label(),builtin:n.settings_providers_pinSourceBuiltin_label(),"electron-store":n.settings_providers_pinSourceLegacy_label()}[s.source]:void 0,p=l=>d&&c?n.settings_providers_inUseSourcePath_label({reason:l,source:d,path:c}):d?n.settings_providers_inUseSource_label({reason:l,source:d}):c?n.settings_providers_inUsePath_label({reason:l,path:c}):l;if(s.codingAgent&&i(s.codingAgent,p(n.settings_providers_inUseSpecialistAgent_label({name:s.name}))),s.modelOptions?.forEach((l,v)=>{l.provider&&b(l.provider)&&i(l.provider,p(n.settings_providers_inUseSpecialistModelOption_label({name:s.name,position:I(v+1)})))}),s.defaultModel)if(s.defaultModel.includes(":")){const l=S(s.defaultModel).providerId??a;i(l,p(n.settings_providers_inUseSpecialistModel_label({name:s.name,model:s.defaultModel})))}else s.codingAgent||i(a,p(n.settings_providers_inUseSpecialistModel_label({name:s.name,model:s.defaultModel})))}return Object.fromEntries([...t].map(([s,c])=>[s,[...c].join(`
1
+ import{Ir as g,rm as b,I4 as S}from"./DBkMUdAo.js";import{V as A,bk as _}from"./CUrYTyIw.js";import{bv as k}from"./B10dK85Q.js";import{bM as y,bI as w}from"./Px5_hntL.js";import{bp as n}from"./Cv-W__h8.js";import{t as I}from"./j0KL2ItM.js";const z=g.createSelector(e=>e.backgroundAgentSettings.defaultModel),B=g.createSelector(e=>e.backgroundAgentSettings.typeOverrides),G=g.createSelector(e=>e.backgroundAgentSettings.defaultReasoningEffort),W=g.createSelector(e=>e.backgroundAgentSettings.typeReasoningEffortOverrides),j=g.createSelector(e=>e.backgroundAgentSettings);function r(e){return{category:"settings",...e}}const f=[{id:"new-workspace",tab:"",label:"New workspace",route:"/workspace/new",category:"navigation",description:"Create-workspace flow."},r({id:"utility-default-model",tab:"providers",hashAliases:["utility-default-model","default-model","quickActions.defaultModel","backgroundAgents.defaultModel"],scrollSelector:"#utility-default-model",highlightSelector:'[data-highlight-id="utility-default-model"]',label:"Settings: Default model",route:"/settings?tab=providers#utility-default-model",description:"Default AI behavior model selection."}),r({id:"global-instructions",tab:"agent-behavior",hashAliases:["global-instructions","agents","specialists","all-agents"],scrollSelector:"#global-instructions",highlightSelector:'[data-highlight-id="global-instructions"]',label:"Settings: Agent Behavior",route:"/settings?tab=agent-behavior#global-instructions",description:"Global agent instructions and defaults."}),r({id:"create-specialist",tab:"specialists",hashAliases:["create-specialist"],scrollSelector:"#create-specialist",highlightSelector:'[data-highlight-id="create-specialist"]',label:"Settings: Create specialist",route:"/settings?tab=specialists&view=create-specialist#create-specialist",description:"Create-specialist entry point."}),r({id:"providers",tab:"providers",hashAliases:["providers"],scrollSelector:"#providers",highlightSelector:'[data-highlight-id="providers"]',label:"Settings: AI coding CLIs",route:"/settings?tab=providers#providers",description:"Provider/account selector settings."}),r({id:"integrations",tab:"connections",hashAliases:["integrations"],scrollSelector:"#integrations",highlightSelector:'[data-highlight-id="integrations"]',label:"Settings: Connections",route:"/settings?tab=connections#integrations",description:"Connected integrations settings."}),r({id:"devices",tab:"devices",hashAliases:["devices","machines"],scrollSelector:"#devices",highlightSelector:"#devices",label:"Settings: Machines",route:"/settings?tab=devices#devices",description:"Saved remote machine settings."}),r({id:"mobile",tab:"mobile",hashAliases:["mobile"],scrollSelector:"#mobile",highlightSelector:'[data-highlight-id="mobile"]',label:"Settings: Mobile",route:"/settings?tab=mobile#mobile",description:"Remote access and Intent Mobile pairing."}),r({id:"guest-sessions",tab:"collaboration",hashAliases:["collaboration","guest-sessions","sharing"],scrollSelector:"#collaboration",highlightSelector:"#collaboration",label:"Settings: Collaboration",route:"/settings?tab=collaboration#collaboration",description:"Host membership, workspace guests and joined hosts."}),r({id:"websocket-api",tab:"mobile",hashAliases:["websocket-api","remote-access"],scrollSelector:"#websocket-api",highlightSelector:'[data-highlight-id="websocket-api"]',label:"Settings: Remote Access",route:"/settings?tab=mobile#websocket-api",description:"Remote access (WebSocket API) settings."}),...[["voice","Voice Dictation","Voice dictation settings.","input"],["keyboard-shortcuts","Keyboard Shortcuts","Keyboard shortcuts reference.","input"],["mcp-servers","MCP Servers","MCP server configuration.","connections"],["plugins","Plugins","App-wide Agent Plugins.","connections"],["git-workspace","Git & Workspace","Git and workspace defaults.","setup"],["git","Git","Git defaults.","setup"],["shell","Shell","Shell and CLI optimization settings.","setup"],["workspace","Workspace","Workspace defaults.","setup"],["cli-optimization","CLI Optimization","RTK/CLI optimization settings.","setup"],["workspace-api","Tool Output & Retention","Tool output size and retention settings.","advanced"],["notifications","Notifications","Notification preferences.","app-behavior"],["updates","Updates","Application update preferences.","app-behavior"],["open-in","Open In","External editor/app launch preferences.","app-behavior"],["github-link-action","GitHub Links","GitHub issue and pull request link behavior.","app-behavior"],["agent-features","Agent Features","Agent feature settings.","agent-behavior"],["font-style","Font style","Font style settings.","display"],["language","Language","Application language settings.","display"],["labs","Labs","Experimental feature switches.","advanced"],["agent-backend","Agent Backend","Agent backend settings.","advanced"],["connection","Connection","Daemon connection details.","advanced"],["hardware","Hardware","Hardware integration settings.","advanced"],["developer","Developer","Development-only settings.","advanced"]].map(([e,t,i,a])=>r({id:e,tab:a,hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=${a}#${e}`,description:i})),r({id:"appearance",tab:"display",hashAliases:["appearance","theme"],scrollSelector:"#theme",highlightSelector:'[data-highlight-id="appearance"]',label:"Settings: Appearance",route:"/settings?tab=display#theme",description:"Theme mode controls."}),...[["color-theme","Color theme","Color theme selection."],["note-font","Notes font","Notes/spec font style."],["agent-chat-font","Agent chat font","Agent chat font style."],["code-font","Code font","Code editor and diff font."]].map(([e,t,i])=>r({id:e,tab:"display",hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=display#${e}`,description:i})),r({id:"general",tab:"advanced",hashAliases:["general","reset"],scrollSelector:"#reset",highlightSelector:'[data-highlight-id="general"]',label:"Settings: Advanced",route:"/settings?tab=advanced#reset",description:"Advanced settings and reset controls."}),{id:"workspace-card",tab:"",hashAliases:["workspace-card"],highlightSelector:'[data-highlight-id^="workspace-"]',label:"Workspace card",category:"workspace",description:"A workspace card on workspace list surfaces.",dynamic:!0,idPattern:"workspace-{workspaceId}"},{id:"specialist-entry",tab:"specialists",highlightSelector:'[data-highlight-id^="specialist-"]',label:"Specialist entry",route:"/settings?tab=specialists&specialist={specialistId}#specialist-{specialistId}",category:"specialist",description:"A specific specialist row in settings.",dynamic:!0,idPattern:"specialist-{specialistId}"}];function m(e){const t=e.indexOf("#"),i=t>=0?e.slice(t+1):e;return decodeURIComponent(i.replace(/^#/,"")).trim()}function P(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function M(e,t){if(!t.match(/\{[^}]+\}/g)?.length)return e===t;const a=t.split(/\{[^}]+\}/g).map(P).join("[^/]+");return new RegExp(`^${a}$`).test(e)}function R(e){const t=m(e);if(!t)return;const i=f.find(o=>o.id===t||o.hashAliases?.includes(t));if(i)return i;const a=f.find(o=>o.route&&o.dynamic&&o.idPattern&&M(t,o.idPattern));return a?{...a,id:t}:void 0}function T(e){try{return new URL(e,"app://intent").pathname||"/"}catch{const t=e.indexOf("?"),i=e.indexOf("#");let a=e.length;return t>=0&&(a=Math.min(a,t)),i>=0&&(a=Math.min(a,i)),e.slice(0,a)||"/"}}const E=new Set(f.flatMap(e=>e.route?[T(e.route)]:[])),C=[/^\/workspace\/[^/]+$/,/^\/agent\/[^/]+$/];function F(e){if(typeof e!="string")return!1;const t=e.trim();if(!t)return!1;if(t.startsWith("intent://"))return!0;let i,a;try{const o=new URL(t,"app://intent");if(o.protocol!=="app:")return!1;i=o.pathname||"/",a=m(o.hash)}catch{return!1}return E.has(i)?a?!!R(a):!0:C.some(o=>o.test(i))}const U=g.createSelector(e=>{const t=new Map,i=(s,c)=>{const d=t.get(s)??new Set;d.add(c),t.set(s,d)},a=k.select(e),o=A.select(e),h=_.select(e)[o];h&&o&&i(o,n.settings_providers_inUseDefaultModel_label({model:h})),b(o)&&!h&&i(o,n.settings_providers_inUseDefaultProvider_label());const u=e.backgroundAgentSettings?.providerId;u&&b(u)&&i(u,n.settings_providers_inUseQuickActions_label());for(const s of y.select(e)){const c=w.select(e,s.id),d=s.source?{project:n.settings_providers_pinSourceProject_label(),user:n.settings_providers_pinSourceUser_label(),bundled:n.settings_providers_pinSourceBundled_label(),builtin:n.settings_providers_pinSourceBuiltin_label(),"electron-store":n.settings_providers_pinSourceLegacy_label()}[s.source]:void 0,p=l=>d&&c?n.settings_providers_inUseSourcePath_label({reason:l,source:d,path:c}):d?n.settings_providers_inUseSource_label({reason:l,source:d}):c?n.settings_providers_inUsePath_label({reason:l,path:c}):l;if(s.codingAgent&&i(s.codingAgent,p(n.settings_providers_inUseSpecialistAgent_label({name:s.name}))),s.modelOptions?.forEach((l,v)=>{l.provider&&b(l.provider)&&i(l.provider,p(n.settings_providers_inUseSpecialistModelOption_label({name:s.name,position:I(v+1)})))}),s.defaultModel)if(s.defaultModel.includes(":")){const l=S(s.defaultModel).providerId??a;i(l,p(n.settings_providers_inUseSpecialistModel_label({name:s.name,model:s.defaultModel})))}else s.codingAgent||i(a,p(n.settings_providers_inUseSpecialistModel_label({name:s.name,model:s.defaultModel})))}return Object.fromEntries([...t].map(([s,c])=>[s,[...c].join(`
2
2
  `)]))});g.createSelector((e,t)=>U.select(e)[t]??null);const O=[{id:"dracula",label:"Dracula"},{id:"nord",label:"Nord"},{id:"rose-pine",label:"Rosé Pine"},{id:"tokyo-night",label:"Tokyo Night"},{id:"solarized",label:"Solarized"},{id:"github",label:"GitHub"},{id:"high-contrast",label:"High Contrast"}],q=O.map(({id:e})=>e);export{q as T,O as a,G as b,j as c,B as d,W as e,U as f,F as i,R as r,z as s};