@testmuai/kane-cli 0.3.1 → 0.3.2

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 (97) hide show
  1. package/dist/{ChromeProfilePicker-HGRJNQDM.js → ChromeProfilePicker-ETBZA64A.js} +1 -1
  2. package/dist/{CliFeedbackPrompt-JXEPBJ63.js → CliFeedbackPrompt-S7RZGMBQ.js} +1 -1
  3. package/dist/{CliUploadProgress-L5VJUXUC.js → CliUploadProgress-TPWX5ARU.js} +1 -1
  4. package/dist/{ConfigView-LOEAT3HQ.js → ConfigView-BSIS2LOH.js} +1 -1
  5. package/dist/FolderPicker-7FXP3PIM.js +2 -0
  6. package/dist/HelpView-MUIOT5UN.js +2 -0
  7. package/dist/{InfoBox-MK7EEGCH.js → InfoBox-3EY4ARJG.js} +1 -1
  8. package/dist/{LinksBox-RSWQWL6G.js → LinksBox-UD364LBX.js} +1 -1
  9. package/dist/{ProfilesView-KCOMTDR5.js → ProfilesView-UOJP2KA2.js} +1 -1
  10. package/dist/ProjectPicker-5ZPZNRSS.js +2 -0
  11. package/dist/{SaveSessionPrompt-RGL3LAEB.js → SaveSessionPrompt-D4PETK7B.js} +1 -1
  12. package/dist/SingleShotApp-N4AGSAPW.js +2 -0
  13. package/dist/{SummaryBox-5YPKUIHB.js → SummaryBox-L4ZXY4S4.js} +1 -1
  14. package/dist/{TestMdRunView-QS7IUANM.js → TestMdRunView-YD3Z6MCR.js} +1 -1
  15. package/dist/{WhoamiView-GL3HZQ4Q.js → WhoamiView-ZZUFXKDU.js} +1 -1
  16. package/dist/changelog-H2RXH4LH.js +4 -0
  17. package/dist/{chunk-3ELBJPHQ.js → chunk-2FCAWRCU.js} +1 -1
  18. package/dist/{chunk-L4GAZTAQ.js → chunk-3UDKGPAS.js} +1 -1
  19. package/dist/chunk-3YGQYJ3D.js +2 -0
  20. package/dist/chunk-477FDDDW.js +13 -0
  21. package/dist/{chunk-XMK4GYI7.js → chunk-4GQZBMTW.js} +1 -1
  22. package/dist/{chunk-THNGNS36.js → chunk-7ECMUWV2.js} +1 -1
  23. package/dist/chunk-7JB4RPI2.js +2 -0
  24. package/dist/chunk-AH4AXJML.js +2 -0
  25. package/dist/{chunk-XP5SMOND.js → chunk-AH7HH3OE.js} +1 -1
  26. package/dist/chunk-AMCAQCEV.js +17 -0
  27. package/dist/{chunk-ZLQ7YLXO.js → chunk-BSHGW3QM.js} +1 -1
  28. package/dist/{chunk-NOH6RERF.js → chunk-E7QWDV7M.js} +1 -1
  29. package/dist/chunk-EZJNX4VE.js +5 -0
  30. package/dist/chunk-FMMDLDDI.js +2 -0
  31. package/dist/chunk-GCAHPH2E.js +2 -0
  32. package/dist/{chunk-34DK2AUH.js → chunk-HXIGYD2T.js} +1 -1
  33. package/dist/chunk-JI7KJKG4.js +2 -0
  34. package/dist/{chunk-KVDOQY2Q.js → chunk-KGZATJQN.js} +1 -1
  35. package/dist/chunk-KKZRPFWO.js +2 -0
  36. package/dist/chunk-L5LI2JF4.js +38 -0
  37. package/dist/{chunk-ZX3PMRMO.js → chunk-MVX3N7GI.js} +1 -1
  38. package/dist/{chunk-BR2S57O2.js → chunk-O22K3JLR.js} +1 -1
  39. package/dist/{chunk-VUBZQUP4.js → chunk-OQ64GUQE.js} +1 -1
  40. package/dist/chunk-OQZG3V6B.js +2 -0
  41. package/dist/{chunk-TK7ZJ7YX.js → chunk-PAQGYV5G.js} +1 -1
  42. package/dist/{chunk-L4OZRHUT.js → chunk-RBED7RVV.js} +1 -1
  43. package/dist/{chunk-3QD3LA72.js → chunk-RDJPZQBU.js} +1 -1
  44. package/dist/{chunk-QO6VFDI4.js → chunk-RVQBAKOK.js} +1 -1
  45. package/dist/{chunk-L2HVRWIT.js → chunk-UFNKCPUB.js} +11 -11
  46. package/dist/chunk-V4S5H6O2.js +9 -0
  47. package/dist/chunk-V7QXJKX7.js +3 -0
  48. package/dist/{chunk-RXMOIIQD.js → chunk-WCRLZETG.js} +1 -1
  49. package/dist/chunk-X7VI7KK3.js +11 -0
  50. package/dist/{chunk-HJ3CHMEM.js → chunk-XK33C64U.js} +1 -1
  51. package/dist/{chunk-MEB2KLWF.js → chunk-XUDEM7I6.js} +1 -1
  52. package/dist/chunk-YZTCCQHR.js +2 -0
  53. package/dist/chunk-ZB72T6HB.js +5 -0
  54. package/dist/controller-client-OMKEBP4B.js +2 -0
  55. package/dist/index.js +23 -23
  56. package/dist/logging-RMC6R23F.js +2 -0
  57. package/dist/login-flow-NL3LNSP5.js +2 -0
  58. package/dist/persist-recorded-session-GG732QRB.js +3 -0
  59. package/dist/pipeline-EUZIM2ZO.js +2 -0
  60. package/dist/{recording-banner-IDLY2FM6.js → recording-banner-LAAAMKIM.js} +1 -1
  61. package/dist/resolver-F6HCOZOX.js +2 -0
  62. package/dist/run-test-md-IAEJXIVK.js +65 -0
  63. package/dist/testmd-actions-5O7F22EC.js +20 -0
  64. package/dist/tms-client-XOARLBEP.js +2 -0
  65. package/dist/{validate-basic-27BIMJ2F.js → validate-basic-NIEIKFGP.js} +1 -1
  66. package/dist/version-check-WHWTPX6C.js +2 -0
  67. package/package.json +5 -5
  68. package/dist/FolderPicker-I6JTRNAU.js +0 -2
  69. package/dist/HelpView-UEUKYHFR.js +0 -2
  70. package/dist/ProjectPicker-AX6H5MX3.js +0 -2
  71. package/dist/SingleShotApp-YTFAGVZD.js +0 -2
  72. package/dist/changelog-CLQ7HCB3.js +0 -4
  73. package/dist/chunk-BM4COXQU.js +0 -53
  74. package/dist/chunk-BQKDPI6L.js +0 -2
  75. package/dist/chunk-DUR6AFYA.js +0 -5
  76. package/dist/chunk-DXKKUGFG.js +0 -2
  77. package/dist/chunk-F6HEB4PA.js +0 -2
  78. package/dist/chunk-FFO5XXKV.js +0 -4
  79. package/dist/chunk-GTFULP6B.js +0 -13
  80. package/dist/chunk-K7MSPKEM.js +0 -5
  81. package/dist/chunk-KULEBWMB.js +0 -2
  82. package/dist/chunk-L5Y2GUO6.js +0 -2
  83. package/dist/chunk-NZSHFIZX.js +0 -3
  84. package/dist/chunk-PWGEMRBD.js +0 -2
  85. package/dist/chunk-SLA75N5B.js +0 -2
  86. package/dist/chunk-WAFO4MT4.js +0 -20
  87. package/dist/chunk-YUUZDFT7.js +0 -2
  88. package/dist/controller-client-7BIK5FYL.js +0 -2
  89. package/dist/logging-GG23EW5G.js +0 -2
  90. package/dist/login-flow-ZUZUZIXD.js +0 -2
  91. package/dist/persist-recorded-session-ZXKA4H7E.js +0 -5
  92. package/dist/pipeline-BVH3R7YP.js +0 -2
  93. package/dist/resolver-QLDOAIXU.js +0 -2
  94. package/dist/run-test-md-UPAR3DQY.js +0 -54
  95. package/dist/testmd-actions-YYFFNNIH.js +0 -20
  96. package/dist/tms-client-CTH4NVFM.js +0 -2
  97. package/dist/version-check-6DXFF6IN.js +0 -2
@@ -0,0 +1,38 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ function Ce(e){return typeof e>"u"||e===null}function $e(e){return typeof e=="object"&&e!==null}function Qe(e){return Array.isArray(e)?e:Ce(e)?[]:[e]}function Ve(e,n){var i,l,r,u;if(n)for(u=Object.keys(n),i=0,l=u.length;i<l;i+=1)r=u[i],e[r]=n[r];return e}function Xe(e,n){var i="",l;for(l=0;l<n;l+=1)i+=e;return i}function Ze(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var ze=Ce,Je=$e,en=Qe,nn=Xe,rn=Ze,ln=Ve,y={isNothing:ze,isObject:Je,toArray:en,repeat:nn,isNegativeZero:rn,extend:ln};function _e(e,n){var i="",l=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(i+=`
3
+
4
+ `+e.mark.snippet),l+" "+i):l}function Y(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=_e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Y.prototype=Object.create(Error.prototype);Y.prototype.constructor=Y;Y.prototype.toString=function(n){return this.name+": "+_e(this,n)};var w=Y;function $(e,n,i,l,r){var u="",o="",f=Math.floor(r/2)-1;return l-n>f&&(u=" ... ",n=l-f+u.length),i-l>f&&(o=" ...",i=l+f-o.length),{str:u+e.slice(n,i).replace(/\t/g,"\u2192")+o,pos:l-n+u.length}}function Q(e,n){return y.repeat(" ",n-e.length)+e}function on(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,l=[0],r=[],u,o=-1;u=i.exec(e.buffer);)r.push(u.index),l.push(u.index+u[0].length),e.position<=u.index&&o<0&&(o=l.length-2);o<0&&(o=l.length-1);var f="",c,a,t=Math.min(e.line+n.linesAfter,r.length).toString().length,p=n.maxLength-(n.indent+t+3);for(c=1;c<=n.linesBefore&&!(o-c<0);c++)a=$(e.buffer,l[o-c],r[o-c],e.position-(l[o]-l[o-c]),p),f=y.repeat(" ",n.indent)+Q((e.line-c+1).toString(),t)+" | "+a.str+`
5
+ `+f;for(a=$(e.buffer,l[o],r[o],e.position,p),f+=y.repeat(" ",n.indent)+Q((e.line+1).toString(),t)+" | "+a.str+`
6
+ `,f+=y.repeat("-",n.indent+t+3+a.pos)+`^
7
+ `,c=1;c<=n.linesAfter&&!(o+c>=r.length);c++)a=$(e.buffer,l[o+c],r[o+c],e.position-(l[o]-l[o+c]),p),f+=y.repeat(" ",n.indent)+Q((e.line+c+1).toString(),t)+" | "+a.str+`
8
+ `;return f.replace(/\n$/,"")}var un=on,fn=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],cn=["scalar","sequence","mapping"];function an(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(l){n[String(l)]=i})}),n}function pn(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(fn.indexOf(i)===-1)throw new w('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=an(n.styleAliases||null),cn.indexOf(this.kind)===-1)throw new w('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var C=pn;function ue(e,n){var i=[];return e[n].forEach(function(l){var r=i.length;i.forEach(function(u,o){u.tag===l.tag&&u.kind===l.kind&&u.multi===l.multi&&(r=o)}),i[r]=l}),i}function tn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function l(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(n=0,i=arguments.length;n<i;n+=1)arguments[n].forEach(l);return e}function X(e){return this.extend(e)}X.prototype.extend=function(n){var i=[],l=[];if(n instanceof C)l.push(n);else if(Array.isArray(n))l=l.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(i=i.concat(n.implicit)),n.explicit&&(l=l.concat(n.explicit));else throw new w("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(u){if(!(u instanceof C))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.loadKind!=="scalar")throw new w("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new w("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(u){if(!(u instanceof C))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(X.prototype);return r.implicit=(this.implicit||[]).concat(i),r.explicit=(this.explicit||[]).concat(l),r.compiledImplicit=ue(r,"implicit"),r.compiledExplicit=ue(r,"explicit"),r.compiledTypeMap=tn(r.compiledImplicit,r.compiledExplicit),r};var hn=X,dn=new C("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),sn=new C("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),mn=new C("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),xn=new hn({explicit:[dn,sn,mn]});function gn(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function An(){return null}function vn(e){return e===null}var yn=new C("tag:yaml.org,2002:null",{kind:"scalar",resolve:gn,construct:An,predicate:vn,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Cn(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function _n(e){return e==="true"||e==="True"||e==="TRUE"}function wn(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var En=new C("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Cn,construct:_n,predicate:wn,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Sn(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Fn(e){return 48<=e&&e<=55}function bn(e){return 48<=e&&e<=57}function Tn(e){if(e===null)return!1;var n=e.length,i=0,l=!1,r;if(!n)return!1;if(r=e[i],(r==="-"||r==="+")&&(r=e[++i]),r==="0"){if(i+1===n)return!0;if(r=e[++i],r==="b"){for(i++;i<n;i++)if(r=e[i],r!=="_"){if(r!=="0"&&r!=="1")return!1;l=!0}return l&&r!=="_"}if(r==="x"){for(i++;i<n;i++)if(r=e[i],r!=="_"){if(!Sn(e.charCodeAt(i)))return!1;l=!0}return l&&r!=="_"}if(r==="o"){for(i++;i<n;i++)if(r=e[i],r!=="_"){if(!Fn(e.charCodeAt(i)))return!1;l=!0}return l&&r!=="_"}}if(r==="_")return!1;for(;i<n;i++)if(r=e[i],r!=="_"){if(!bn(e.charCodeAt(i)))return!1;l=!0}return!(!l||r==="_")}function On(e){var n=e,i=1,l;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),l=n[0],(l==="-"||l==="+")&&(l==="-"&&(i=-1),n=n.slice(1),l=n[0]),n==="0")return 0;if(l==="0"){if(n[1]==="b")return i*parseInt(n.slice(2),2);if(n[1]==="x")return i*parseInt(n.slice(2),16);if(n[1]==="o")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}function In(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!y.isNegativeZero(e)}var Ln=new C("tag:yaml.org,2002:int",{kind:"scalar",resolve:Tn,construct:On,predicate:In,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),kn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Nn(e){return!(e===null||!kn.test(e)||e[e.length-1]==="_")}function Rn(e){var n,i;return n=e.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)}var Dn=/^[-+]?[0-9]+e/;function Mn(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(y.isNegativeZero(e))return"-0.0";return i=e.toString(10),Dn.test(i)?i.replace("e",".e"):i}function Yn(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||y.isNegativeZero(e))}var Bn=new C("tag:yaml.org,2002:float",{kind:"scalar",resolve:Nn,construct:Rn,predicate:Yn,represent:Mn,defaultStyle:"lowercase"}),Pn=xn.extend({implicit:[yn,En,Ln,Bn]}),Hn=Pn,we=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ee=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function jn(e){return e===null?!1:we.exec(e)!==null||Ee.exec(e)!==null}function Un(e){var n,i,l,r,u,o,f,c=0,a=null,t,p,d;if(n=we.exec(e),n===null&&(n=Ee.exec(e)),n===null)throw new Error("Date resolve error");if(i=+n[1],l=+n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(i,l,r));if(u=+n[4],o=+n[5],f=+n[6],n[7]){for(c=n[7].slice(0,3);c.length<3;)c+="0";c=+c}return n[9]&&(t=+n[10],p=+(n[11]||0),a=(t*60+p)*6e4,n[9]==="-"&&(a=-a)),d=new Date(Date.UTC(i,l,r,u,o,f,c)),a&&d.setTime(d.getTime()-a),d}function Kn(e){return e.toISOString()}var qn=new C("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:jn,construct:Un,instanceOf:Date,represent:Kn});function Gn(e){return e==="<<"||e===null}var Wn=new C("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Gn}),ne=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
9
+ \r`;function $n(e){if(e===null)return!1;var n,i,l=0,r=e.length,u=ne;for(i=0;i<r;i++)if(n=u.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;l+=6}return l%8===0}function Qn(e){var n,i,l=e.replace(/[\r\n=]/g,""),r=l.length,u=ne,o=0,f=[];for(n=0;n<r;n++)n%4===0&&n&&(f.push(o>>16&255),f.push(o>>8&255),f.push(o&255)),o=o<<6|u.indexOf(l.charAt(n));return i=r%4*6,i===0?(f.push(o>>16&255),f.push(o>>8&255),f.push(o&255)):i===18?(f.push(o>>10&255),f.push(o>>2&255)):i===12&&f.push(o>>4&255),new Uint8Array(f)}function Vn(e){var n="",i=0,l,r,u=e.length,o=ne;for(l=0;l<u;l++)l%3===0&&l&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[l];return r=u%3,r===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):r===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):r===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function Xn(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Zn=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:$n,construct:Qn,predicate:Xn,represent:Vn}),zn=Object.prototype.hasOwnProperty,Jn=Object.prototype.toString;function ei(e){if(e===null)return!0;var n=[],i,l,r,u,o,f=e;for(i=0,l=f.length;i<l;i+=1){if(r=f[i],o=!1,Jn.call(r)!=="[object Object]")return!1;for(u in r)if(zn.call(r,u))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(u)===-1)n.push(u);else return!1}return!0}function ni(e){return e!==null?e:[]}var ii=new C("tag:yaml.org,2002:omap",{kind:"sequence",resolve:ei,construct:ni}),ri=Object.prototype.toString;function li(e){if(e===null)return!0;var n,i,l,r,u,o=e;for(u=new Array(o.length),n=0,i=o.length;n<i;n+=1){if(l=o[n],ri.call(l)!=="[object Object]"||(r=Object.keys(l),r.length!==1))return!1;u[n]=[r[0],l[r[0]]]}return!0}function oi(e){if(e===null)return[];var n,i,l,r,u,o=e;for(u=new Array(o.length),n=0,i=o.length;n<i;n+=1)l=o[n],r=Object.keys(l),u[n]=[r[0],l[r[0]]];return u}var ui=new C("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:li,construct:oi}),fi=Object.prototype.hasOwnProperty;function ci(e){if(e===null)return!0;var n,i=e;for(n in i)if(fi.call(i,n)&&i[n]!==null)return!1;return!0}function ai(e){return e!==null?e:{}}var pi=new C("tag:yaml.org,2002:set",{kind:"mapping",resolve:ci,construct:ai}),Se=Hn.extend({implicit:[qn,Wn],explicit:[Zn,ii,ui,pi]}),O=Object.prototype.hasOwnProperty,j=1,Fe=2,be=3,U=4,V=1,ti=2,fe=3,hi=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,di=/[\x85\u2028\u2029]/,si=/[,\[\]\{\}]/,Te=/^(?:!|!!|![a-z\-]+!)$/i,Oe=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ce(e){return Object.prototype.toString.call(e)}function F(e){return e===10||e===13}function L(e){return e===9||e===32}function E(e){return e===9||e===32||e===10||e===13}function N(e){return e===44||e===91||e===93||e===123||e===125}function mi(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function xi(e){return e===120?2:e===117?4:e===85?8:0}function gi(e){return 48<=e&&e<=57?e-48:-1}function ae(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
10
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Ai(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Ie(e,n,i){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var Le=new Array(256),ke=new Array(256);for(I=0;I<256;I++)Le[I]=ae(I)?1:0,ke[I]=ae(I);var I;function vi(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Se,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ne(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=un(i),new w(n,i)}function h(e,n){throw Ne(e,n)}function K(e,n){e.onWarning&&e.onWarning.call(null,Ne(e,n))}var pe={YAML:function(n,i,l){var r,u,o;n.version!==null&&h(n,"duplication of %YAML directive"),l.length!==1&&h(n,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(l[0]),r===null&&h(n,"ill-formed argument of the YAML directive"),u=parseInt(r[1],10),o=parseInt(r[2],10),u!==1&&h(n,"unacceptable YAML version of the document"),n.version=l[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&K(n,"unsupported YAML version of the document")},TAG:function(n,i,l){var r,u;l.length!==2&&h(n,"TAG directive accepts exactly two arguments"),r=l[0],u=l[1],Te.test(r)||h(n,"ill-formed tag handle (first argument) of the TAG directive"),O.call(n.tagMap,r)&&h(n,'there is a previously declared suffix for "'+r+'" tag handle'),Oe.test(u)||h(n,"ill-formed tag prefix (second argument) of the TAG directive");try{u=decodeURIComponent(u)}catch{h(n,"tag prefix is malformed: "+u)}n.tagMap[r]=u}};function T(e,n,i,l){var r,u,o,f;if(n<i){if(f=e.input.slice(n,i),l)for(r=0,u=f.length;r<u;r+=1)o=f.charCodeAt(r),o===9||32<=o&&o<=1114111||h(e,"expected valid JSON character");else hi.test(f)&&h(e,"the stream contains non-printable characters");e.result+=f}}function te(e,n,i,l){var r,u,o,f;for(y.isObject(i)||h(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),o=0,f=r.length;o<f;o+=1)u=r[o],O.call(n,u)||(Ie(n,u,i[u]),l[u]=!0)}function R(e,n,i,l,r,u,o,f,c){var a,t;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),a=0,t=r.length;a<t;a+=1)Array.isArray(r[a])&&h(e,"nested arrays are not supported inside keys"),typeof r=="object"&&ce(r[a])==="[object Object]"&&(r[a]="[object Object]");if(typeof r=="object"&&ce(r)==="[object Object]"&&(r="[object Object]"),r=String(r),n===null&&(n={}),l==="tag:yaml.org,2002:merge")if(Array.isArray(u))for(a=0,t=u.length;a<t;a+=1)te(e,n,u[a],i);else te(e,n,u,i);else!e.json&&!O.call(i,r)&&O.call(n,r)&&(e.line=o||e.line,e.lineStart=f||e.lineStart,e.position=c||e.position,h(e,"duplicated mapping key")),Ie(n,r,u),delete i[r];return n}function ie(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):h(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function v(e,n,i){for(var l=0,r=e.input.charCodeAt(e.position);r!==0;){for(;L(r);)r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(n&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(F(r))for(ie(e),r=e.input.charCodeAt(e.position),l++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return i!==-1&&l!==0&&e.lineIndent<i&&K(e,"deficient indentation"),l}function W(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||E(i)))}function re(e,n){n===1?e.result+=" ":n>1&&(e.result+=y.repeat(`
11
+ `,n-1))}function yi(e,n,i){var l,r,u,o,f,c,a,t,p=e.kind,d=e.result,s;if(s=e.input.charCodeAt(e.position),E(s)||N(s)||s===35||s===38||s===42||s===33||s===124||s===62||s===39||s===34||s===37||s===64||s===96||(s===63||s===45)&&(r=e.input.charCodeAt(e.position+1),E(r)||i&&N(r)))return!1;for(e.kind="scalar",e.result="",u=o=e.position,f=!1;s!==0;){if(s===58){if(r=e.input.charCodeAt(e.position+1),E(r)||i&&N(r))break}else if(s===35){if(l=e.input.charCodeAt(e.position-1),E(l))break}else{if(e.position===e.lineStart&&W(e)||i&&N(s))break;if(F(s))if(c=e.line,a=e.lineStart,t=e.lineIndent,v(e,!1,-1),e.lineIndent>=n){f=!0,s=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=a,e.lineIndent=t;break}}f&&(T(e,u,o,!1),re(e,e.line-c),u=o=e.position,f=!1),L(s)||(o=e.position+1),s=e.input.charCodeAt(++e.position)}return T(e,u,o,!1),e.result?!0:(e.kind=p,e.result=d,!1)}function Ci(e,n){var i,l,r;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,l=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(T(e,l,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)l=e.position,e.position++,r=e.position;else return!0;else F(i)?(T(e,l,r,!0),re(e,v(e,!1,n)),l=r=e.position):e.position===e.lineStart&&W(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function _i(e,n){var i,l,r,u,o,f;if(f=e.input.charCodeAt(e.position),f!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=l=e.position;(f=e.input.charCodeAt(e.position))!==0;){if(f===34)return T(e,i,e.position,!0),e.position++,!0;if(f===92){if(T(e,i,e.position,!0),f=e.input.charCodeAt(++e.position),F(f))v(e,!1,n);else if(f<256&&Le[f])e.result+=ke[f],e.position++;else if((o=xi(f))>0){for(r=o,u=0;r>0;r--)f=e.input.charCodeAt(++e.position),(o=mi(f))>=0?u=(u<<4)+o:h(e,"expected hexadecimal character");e.result+=Ai(u),e.position++}else h(e,"unknown escape sequence");i=l=e.position}else F(f)?(T(e,i,l,!0),re(e,v(e,!1,n)),i=l=e.position):e.position===e.lineStart&&W(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,l=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function wi(e,n){var i=!0,l,r,u,o=e.tag,f,c=e.anchor,a,t,p,d,s,m=Object.create(null),g,A,S,x;if(x=e.input.charCodeAt(e.position),x===91)t=93,s=!1,f=[];else if(x===123)t=125,s=!0,f={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),x=e.input.charCodeAt(++e.position);x!==0;){if(v(e,!0,n),x=e.input.charCodeAt(e.position),x===t)return e.position++,e.tag=o,e.anchor=c,e.kind=s?"mapping":"sequence",e.result=f,!0;i?x===44&&h(e,"expected the node content, but found ','"):h(e,"missed comma between flow collection entries"),A=g=S=null,p=d=!1,x===63&&(a=e.input.charCodeAt(e.position+1),E(a)&&(p=d=!0,e.position++,v(e,!0,n))),l=e.line,r=e.lineStart,u=e.position,D(e,n,j,!1,!0),A=e.tag,g=e.result,v(e,!0,n),x=e.input.charCodeAt(e.position),(d||e.line===l)&&x===58&&(p=!0,x=e.input.charCodeAt(++e.position),v(e,!0,n),D(e,n,j,!1,!0),S=e.result),s?R(e,f,m,A,g,S,l,r,u):p?f.push(R(e,null,m,A,g,S,l,r,u)):f.push(g),v(e,!0,n),x=e.input.charCodeAt(e.position),x===44?(i=!0,x=e.input.charCodeAt(++e.position)):i=!1}h(e,"unexpected end of the stream within a flow collection")}function Ei(e,n){var i,l,r=V,u=!1,o=!1,f=n,c=0,a=!1,t,p;if(p=e.input.charCodeAt(e.position),p===124)l=!1;else if(p===62)l=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)V===r?r=p===43?fe:ti:h(e,"repeat of a chomping mode identifier");else if((t=gi(p))>=0)t===0?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?h(e,"repeat of an indentation width identifier"):(f=n+t-1,o=!0);else break;if(L(p)){do p=e.input.charCodeAt(++e.position);while(L(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!F(p)&&p!==0)}for(;p!==0;){for(ie(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!o||e.lineIndent<f)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>f&&(f=e.lineIndent),F(p)){c++;continue}if(e.lineIndent<f){r===fe?e.result+=y.repeat(`
12
+ `,u?1+c:c):r===V&&u&&(e.result+=`
13
+ `);break}for(l?L(p)?(a=!0,e.result+=y.repeat(`
14
+ `,u?1+c:c)):a?(a=!1,e.result+=y.repeat(`
15
+ `,c+1)):c===0?u&&(e.result+=" "):e.result+=y.repeat(`
16
+ `,c):e.result+=y.repeat(`
17
+ `,u?1+c:c),u=!0,o=!0,c=0,i=e.position;!F(p)&&p!==0;)p=e.input.charCodeAt(++e.position);T(e,i,e.position,!1)}return!0}function he(e,n){var i,l=e.tag,r=e.anchor,u=[],o,f=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,h(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!E(o))));){if(f=!0,e.position++,v(e,!0,-1)&&e.lineIndent<=n){u.push(null),c=e.input.charCodeAt(e.position);continue}if(i=e.line,D(e,n,be,!1,!0),u.push(e.result),v(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&c!==0)h(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return f?(e.tag=l,e.anchor=r,e.kind="sequence",e.result=u,!0):!1}function Si(e,n,i){var l,r,u,o,f,c,a=e.tag,t=e.anchor,p={},d=Object.create(null),s=null,m=null,g=null,A=!1,S=!1,x;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),x=e.input.charCodeAt(e.position);x!==0;){if(!A&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,h(e,"tab characters must not be used in indentation")),l=e.input.charCodeAt(e.position+1),u=e.line,(x===63||x===58)&&E(l))x===63?(A&&(R(e,p,d,s,m,null,o,f,c),s=m=g=null),S=!0,A=!0,r=!0):A?(A=!1,r=!0):h(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,x=l;else{if(o=e.line,f=e.lineStart,c=e.position,!D(e,i,Fe,!1,!0))break;if(e.line===u){for(x=e.input.charCodeAt(e.position);L(x);)x=e.input.charCodeAt(++e.position);if(x===58)x=e.input.charCodeAt(++e.position),E(x)||h(e,"a whitespace character is expected after the key-value separator within a block mapping"),A&&(R(e,p,d,s,m,null,o,f,c),s=m=g=null),S=!0,A=!1,r=!1,s=e.tag,m=e.result;else if(S)h(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=t,!0}else if(S)h(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=a,e.anchor=t,!0}if((e.line===u||e.lineIndent>n)&&(A&&(o=e.line,f=e.lineStart,c=e.position),D(e,n,U,!0,r)&&(A?m=e.result:g=e.result),A||(R(e,p,d,s,m,g,o,f,c),s=m=g=null),v(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===u||e.lineIndent>n)&&x!==0)h(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return A&&R(e,p,d,s,m,null,o,f,c),S&&(e.tag=a,e.anchor=t,e.kind="mapping",e.result=p),S}function Fi(e){var n,i=!1,l=!1,r,u,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&h(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(i=!0,o=e.input.charCodeAt(++e.position)):o===33?(l=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",n=e.position,i){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(u=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):h(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!E(o);)o===33&&(l?h(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(n-1,e.position+1),Te.test(r)||h(e,"named tag handle cannot contain such characters"),l=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);u=e.input.slice(n,e.position),si.test(u)&&h(e,"tag suffix cannot contain flow indicator characters")}u&&!Oe.test(u)&&h(e,"tag name cannot contain such characters: "+u);try{u=decodeURIComponent(u)}catch{h(e,"tag name is malformed: "+u)}return i?e.tag=u:O.call(e.tagMap,r)?e.tag=e.tagMap[r]+u:r==="!"?e.tag="!"+u:r==="!!"?e.tag="tag:yaml.org,2002:"+u:h(e,'undeclared tag handle "'+r+'"'),!0}function bi(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&h(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!E(i)&&!N(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&h(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function Ti(e){var n,i,l;if(l=e.input.charCodeAt(e.position),l!==42)return!1;for(l=e.input.charCodeAt(++e.position),n=e.position;l!==0&&!E(l)&&!N(l);)l=e.input.charCodeAt(++e.position);return e.position===n&&h(e,"name of an alias node must contain at least one character"),i=e.input.slice(n,e.position),O.call(e.anchorMap,i)||h(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],v(e,!0,-1),!0}function D(e,n,i,l,r){var u,o,f,c=1,a=!1,t=!1,p,d,s,m,g,A;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,u=o=f=U===i||be===i,l&&v(e,!0,-1)&&(a=!0,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)),c===1)for(;Fi(e)||bi(e);)v(e,!0,-1)?(a=!0,f=u,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)):f=!1;if(f&&(f=a||r),(c===1||U===i)&&(j===i||Fe===i?g=n:g=n+1,A=e.position-e.lineStart,c===1?f&&(he(e,A)||Si(e,A,g))||wi(e,g)?t=!0:(o&&Ei(e,g)||Ci(e,g)||_i(e,g)?t=!0:Ti(e)?(t=!0,(e.tag!==null||e.anchor!==null)&&h(e,"alias node should not have any properties")):yi(e,g,j===i)&&(t=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(t=f&&he(e,A))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&h(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,d=e.implicitTypes.length;p<d;p+=1)if(m=e.implicitTypes[p],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(O.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,s=e.typeMap.multi[e.kind||"fallback"],p=0,d=s.length;p<d;p+=1)if(e.tag.slice(0,s[p].tag.length)===s[p].tag){m=s[p];break}m||h(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&h(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||t}function Oi(e){var n=e.position,i,l,r,u=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(v(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(u=!0,o=e.input.charCodeAt(++e.position),i=e.position;o!==0&&!E(o);)o=e.input.charCodeAt(++e.position);for(l=e.input.slice(i,e.position),r=[],l.length<1&&h(e,"directive name must not be less than one character in length");o!==0;){for(;L(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!F(o));break}if(F(o))break;for(i=e.position;o!==0&&!E(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(i,e.position))}o!==0&&ie(e),O.call(pe,l)?pe[l](e,l,r):K(e,'unknown document directive "'+l+'"')}if(v(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,v(e,!0,-1)):u&&h(e,"directives end mark is expected"),D(e,e.lineIndent-1,U,!1,!0),v(e,!0,-1),e.checkLineBreaks&&di.test(e.input.slice(n,e.position))&&K(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&W(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,v(e,!0,-1));return}if(e.position<e.length-1)h(e,"end of the stream or a document separator is expected");else return}function Re(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
18
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new vi(e,n),l=e.indexOf("\0");for(l!==-1&&(i.position=l,h(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)Oi(i);return i.documents}function Ii(e,n,i){n!==null&&typeof n=="object"&&typeof i>"u"&&(i=n,n=null);var l=Re(e,i);if(typeof n!="function")return l;for(var r=0,u=l.length;r<u;r+=1)n(l[r])}function Li(e,n){var i=Re(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new w("expected a single document in the stream, but found more")}}var ki=Ii,Ni=Li,De={loadAll:ki,load:Ni},Me=Object.prototype.toString,Ye=Object.prototype.hasOwnProperty,le=65279,Ri=9,B=10,Di=13,Mi=32,Yi=33,Bi=34,Z=35,Pi=37,Hi=38,ji=39,Ui=42,Be=44,Ki=45,q=58,qi=61,Gi=62,Wi=63,$i=64,Pe=91,He=93,Qi=96,je=123,Vi=124,Ue=125,_={};_[0]="\\0";_[7]="\\a";_[8]="\\b";_[9]="\\t";_[10]="\\n";_[11]="\\v";_[12]="\\f";_[13]="\\r";_[27]="\\e";_[34]='\\"';_[92]="\\\\";_[133]="\\N";_[160]="\\_";_[8232]="\\L";_[8233]="\\P";var Xi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Zi=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function zi(e,n){var i,l,r,u,o,f,c;if(n===null)return{};for(i={},l=Object.keys(n),r=0,u=l.length;r<u;r+=1)o=l[r],f=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&Ye.call(c.styleAliases,f)&&(f=c.styleAliases[f]),i[o]=f;return i}function Ji(e){var n,i,l;if(n=e.toString(16).toUpperCase(),e<=255)i="x",l=2;else if(e<=65535)i="u",l=4;else if(e<=4294967295)i="U",l=8;else throw new w("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+y.repeat("0",l-n.length)+n}var er=1,P=2;function nr(e){this.schema=e.schema||Se,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=y.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=zi(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?P:er,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function de(e,n){for(var i=y.repeat(" ",n),l=0,r=-1,u="",o,f=e.length;l<f;)r=e.indexOf(`
19
+ `,l),r===-1?(o=e.slice(l),l=f):(o=e.slice(l,r+1),l=r+1),o.length&&o!==`
20
+ `&&(u+=i),u+=o;return u}function z(e,n){return`
21
+ `+y.repeat(" ",e.indent*n)}function ir(e,n){var i,l,r;for(i=0,l=e.implicitTypes.length;i<l;i+=1)if(r=e.implicitTypes[i],r.resolve(n))return!0;return!1}function G(e){return e===Mi||e===Ri}function H(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==le||65536<=e&&e<=1114111}function se(e){return H(e)&&e!==le&&e!==Di&&e!==B}function me(e,n,i){var l=se(e),r=l&&!G(e);return(i?l:l&&e!==Be&&e!==Pe&&e!==He&&e!==je&&e!==Ue)&&e!==Z&&!(n===q&&!r)||se(n)&&!G(n)&&e===Z||n===q&&r}function rr(e){return H(e)&&e!==le&&!G(e)&&e!==Ki&&e!==Wi&&e!==q&&e!==Be&&e!==Pe&&e!==He&&e!==je&&e!==Ue&&e!==Z&&e!==Hi&&e!==Ui&&e!==Yi&&e!==Vi&&e!==qi&&e!==Gi&&e!==ji&&e!==Bi&&e!==Pi&&e!==$i&&e!==Qi}function lr(e){return!G(e)&&e!==q}function M(e,n){var i=e.charCodeAt(n),l;return i>=55296&&i<=56319&&n+1<e.length&&(l=e.charCodeAt(n+1),l>=56320&&l<=57343)?(i-55296)*1024+l-56320+65536:i}function Ke(e){var n=/^\n* /;return n.test(e)}var qe=1,J=2,Ge=3,We=4,k=5;function or(e,n,i,l,r,u,o,f){var c,a=0,t=null,p=!1,d=!1,s=l!==-1,m=-1,g=rr(M(e,0))&&lr(M(e,e.length-1));if(n||o)for(c=0;c<e.length;a>=65536?c+=2:c++){if(a=M(e,c),!H(a))return k;g=g&&me(a,t,f),t=a}else{for(c=0;c<e.length;a>=65536?c+=2:c++){if(a=M(e,c),a===B)p=!0,s&&(d=d||c-m-1>l&&e[m+1]!==" ",m=c);else if(!H(a))return k;g=g&&me(a,t,f),t=a}d=d||s&&c-m-1>l&&e[m+1]!==" "}return!p&&!d?g&&!o&&!r(e)?qe:u===P?k:J:i>9&&Ke(e)?k:o?u===P?k:J:d?We:Ge}function ur(e,n,i,l,r){e.dump=(function(){if(n.length===0)return e.quotingType===P?'""':"''";if(!e.noCompatMode&&(Xi.indexOf(n)!==-1||Zi.test(n)))return e.quotingType===P?'"'+n+'"':"'"+n+"'";var u=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-u),f=l||e.flowLevel>-1&&i>=e.flowLevel;function c(a){return ir(e,a)}switch(or(n,f,e.indent,o,c,e.quotingType,e.forceQuotes&&!l,r)){case qe:return n;case J:return"'"+n.replace(/'/g,"''")+"'";case Ge:return"|"+xe(n,e.indent)+ge(de(n,u));case We:return">"+xe(n,e.indent)+ge(de(fr(n,o),u));case k:return'"'+cr(n)+'"';default:throw new w("impossible error: invalid scalar style")}})()}function xe(e,n){var i=Ke(e)?String(n):"",l=e[e.length-1]===`
22
+ `,r=l&&(e[e.length-2]===`
23
+ `||e===`
24
+ `),u=r?"+":l?"":"-";return i+u+`
25
+ `}function ge(e){return e[e.length-1]===`
26
+ `?e.slice(0,-1):e}function fr(e,n){for(var i=/(\n+)([^\n]*)/g,l=(function(){var a=e.indexOf(`
27
+ `);return a=a!==-1?a:e.length,i.lastIndex=a,Ae(e.slice(0,a),n)})(),r=e[0]===`
28
+ `||e[0]===" ",u,o;o=i.exec(e);){var f=o[1],c=o[2];u=c[0]===" ",l+=f+(!r&&!u&&c!==""?`
29
+ `:"")+Ae(c,n),r=u}return l}function Ae(e,n){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,l,r=0,u,o=0,f=0,c="";l=i.exec(e);)f=l.index,f-r>n&&(u=o>r?o:f,c+=`
30
+ `+e.slice(r,u),r=u+1),o=f;return c+=`
31
+ `,e.length-r>n&&o>r?c+=e.slice(r,o)+`
32
+ `+e.slice(o+1):c+=e.slice(r),c.slice(1)}function cr(e){for(var n="",i=0,l,r=0;r<e.length;i>=65536?r+=2:r++)i=M(e,r),l=_[i],!l&&H(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=l||Ji(i);return n}function ar(e,n,i){var l="",r=e.tag,u,o,f;for(u=0,o=i.length;u<o;u+=1)f=i[u],e.replacer&&(f=e.replacer.call(i,String(u),f)),(b(e,n,f,!1,!1)||typeof f>"u"&&b(e,n,null,!1,!1))&&(l!==""&&(l+=","+(e.condenseFlow?"":" ")),l+=e.dump);e.tag=r,e.dump="["+l+"]"}function ve(e,n,i,l){var r="",u=e.tag,o,f,c;for(o=0,f=i.length;o<f;o+=1)c=i[o],e.replacer&&(c=e.replacer.call(i,String(o),c)),(b(e,n+1,c,!0,!0,!1,!0)||typeof c>"u"&&b(e,n+1,null,!0,!0,!1,!0))&&((!l||r!=="")&&(r+=z(e,n)),e.dump&&B===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=u,e.dump=r||"[]"}function pr(e,n,i){var l="",r=e.tag,u=Object.keys(i),o,f,c,a,t;for(o=0,f=u.length;o<f;o+=1)t="",l!==""&&(t+=", "),e.condenseFlow&&(t+='"'),c=u[o],a=i[c],e.replacer&&(a=e.replacer.call(i,c,a)),b(e,n,c,!1,!1)&&(e.dump.length>1024&&(t+="? "),t+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),b(e,n,a,!1,!1)&&(t+=e.dump,l+=t));e.tag=r,e.dump="{"+l+"}"}function tr(e,n,i,l){var r="",u=e.tag,o=Object.keys(i),f,c,a,t,p,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new w("sortKeys must be a boolean or a function");for(f=0,c=o.length;f<c;f+=1)d="",(!l||r!=="")&&(d+=z(e,n)),a=o[f],t=i[a],e.replacer&&(t=e.replacer.call(i,a,t)),b(e,n+1,a,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&B===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,p&&(d+=z(e,n)),b(e,n+1,t,!0,p)&&(e.dump&&B===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,r+=d));e.tag=u,e.dump=r||"{}"}function ye(e,n,i){var l,r,u,o,f,c;for(r=i?e.explicitTypes:e.implicitTypes,u=0,o=r.length;u<o;u+=1)if(f=r[u],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof n=="object"&&n instanceof f.instanceOf)&&(!f.predicate||f.predicate(n))){if(i?f.multi&&f.representName?e.tag=f.representName(n):e.tag=f.tag:e.tag="?",f.represent){if(c=e.styleMap[f.tag]||f.defaultStyle,Me.call(f.represent)==="[object Function]")l=f.represent(n,c);else if(Ye.call(f.represent,c))l=f.represent[c](n,c);else throw new w("!<"+f.tag+'> tag resolver accepts not "'+c+'" style');e.dump=l}return!0}return!1}function b(e,n,i,l,r,u,o){e.tag=null,e.dump=i,ye(e,i,!1)||ye(e,i,!0);var f=Me.call(e.dump),c=l,a;l&&(l=e.flowLevel<0||e.flowLevel>n);var t=f==="[object Object]"||f==="[object Array]",p,d;if(t&&(p=e.duplicates.indexOf(i),d=p!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&n>0)&&(r=!1),d&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(t&&d&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),f==="[object Object]")l&&Object.keys(e.dump).length!==0?(tr(e,n,e.dump,r),d&&(e.dump="&ref_"+p+e.dump)):(pr(e,n,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(f==="[object Array]")l&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?ve(e,n-1,e.dump,r):ve(e,n,e.dump,r),d&&(e.dump="&ref_"+p+e.dump)):(ar(e,n,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(f==="[object String]")e.tag!=="?"&&ur(e,e.dump,n,u,c);else{if(f==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new w("unacceptable kind of an object to dump "+f)}e.tag!==null&&e.tag!=="?"&&(a=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?a="!"+a:a.slice(0,18)==="tag:yaml.org,2002:"?a="!!"+a.slice(18):a="!<"+a+">",e.dump=a+" "+e.dump)}return!0}function hr(e,n){var i=[],l=[],r,u;for(ee(e,i,l),r=0,u=l.length;r<u;r+=1)n.duplicates.push(i[l[r]]);n.usedDuplicates=new Array(u)}function ee(e,n,i){var l,r,u;if(e!==null&&typeof e=="object")if(r=n.indexOf(e),r!==-1)i.indexOf(r)===-1&&i.push(r);else if(n.push(e),Array.isArray(e))for(r=0,u=e.length;r<u;r+=1)ee(e[r],n,i);else for(l=Object.keys(e),r=0,u=l.length;r<u;r+=1)ee(e[l[r]],n,i)}function dr(e,n){n=n||{};var i=new nr(n);i.noRefs||hr(e,i);var l=e;return i.replacer&&(l=i.replacer.call({"":l},"",l)),b(i,0,l,!0,!0)?i.dump+`
33
+ `:""}var sr=dr,mr={dump:sr};function oe(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var xr=De.load,gr=De.loadAll,Ar=mr.dump;var vr=oe("safeLoad","load"),yr=oe("safeLoadAll","loadAll"),Cr=oe("safeDump","dump");export{xr as a,Ar as b};
34
+ /*! Bundled license information:
35
+
36
+ js-yaml/dist/js-yaml.mjs:
37
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
38
+ */
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as u,b as x}from"./chunk-34DK2AUH.js";import{a as f}from"./chunk-HCBYKLMW.js";import{t as m}from"./chunk-3ELBJPHQ.js";import{a as r,b as i}from"./chunk-C44QQJR4.js";import{e as n}from"./chunk-UR6MHSHU.js";var e=n(f(),1);function C({title:B,titleColor:d,borderColor:c,variant:p,rows:s,footer:t,labelWidth:l=14,marginBottom:b=1}){return(0,e.jsxs)(u,{title:B,titleColor:d,borderColor:c,variant:p,marginBottom:b,children:[s.map((o,a)=>typeof o.value=="string"?(0,e.jsx)(x,{label:o.label,value:o.value,valueColor:o.valueColor,labelWidth:l},`${o.label}-${a}`):(0,e.jsxs)(r,{children:[(0,e.jsx)(r,{width:l,children:(0,e.jsx)(i,{color:m.dimmed,children:o.label})}),o.value]},`${o.label}-${a}`)),t&&(0,e.jsx)(r,{marginTop:1,children:t})]})}export{C as a};
2
+ import{a as u,b as x}from"./chunk-HXIGYD2T.js";import{a as f}from"./chunk-HCBYKLMW.js";import{t as m}from"./chunk-2FCAWRCU.js";import{a as r,b as i}from"./chunk-C44QQJR4.js";import{e as n}from"./chunk-UR6MHSHU.js";var e=n(f(),1);function C({title:B,titleColor:d,borderColor:c,variant:p,rows:s,footer:t,labelWidth:l=14,marginBottom:b=1}){return(0,e.jsxs)(u,{title:B,titleColor:d,borderColor:c,variant:p,marginBottom:b,children:[s.map((o,a)=>typeof o.value=="string"?(0,e.jsx)(x,{label:o.label,value:o.value,valueColor:o.valueColor,labelWidth:l},`${o.label}-${a}`):(0,e.jsxs)(r,{children:[(0,e.jsx)(r,{width:l,children:(0,e.jsx)(i,{color:m.dimmed,children:o.label})}),o.value]},`${o.label}-${a}`)),t&&(0,e.jsx)(r,{marginTop:1,children:t})]})}export{C as a};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as D,b as A}from"./chunk-K7MSPKEM.js";import{l as S,m as C,n as P,o as U,p as N}from"./chunk-3ELBJPHQ.js";import{createServer as Oe}from"http";import{randomBytes as He}from"crypto";import{URL as $e}from"url";import Z from"process";import{Buffer as ee}from"buffer";import re from"path";import{fileURLToPath as ke}from"url";import{promisify as Le}from"util";import te from"child_process";import Me,{constants as Ie}from"fs/promises";import Y from"process";import G,{constants as me}from"fs/promises";import j from"process";import le from"os";import L from"fs";import se from"fs";import z from"fs";var E;function ie(){try{return z.statSync("/.dockerenv"),!0}catch{return!1}}function ae(){try{return z.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function B(){return E===void 0&&(E=ie()||ae()),E}var k,ce=()=>{try{return se.statSync("/run/.containerenv"),!0}catch{return!1}};function u(){return k===void 0&&(k=ce()||B()),k}var K=()=>{if(j.platform!=="linux")return!1;if(le.release().toLowerCase().includes("microsoft"))return!u();try{if(L.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!u()}catch{}return L.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||L.existsSync("/run/WSL")?!u():!1},d=j.env.__IS_WSL_TEST__?K:K();var de=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let t="/etc/wsl.conf",n=!1;try{await G.access(t,me.F_OK),n=!0}catch{}if(!n)return e;let o=await G.readFile(t,{encoding:"utf8"}),i=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(o);return i?(r=i.groups.mountPoint.trim(),r=r.endsWith("/")?r:`${r}/`,r):e}})(),fe=async()=>`${await de()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,M=async()=>d?fe():`${Y.env.SYSTEMROOT||Y.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;function f(e,r,t){let n=o=>Object.defineProperty(e,r,{value:o,enumerable:!0,writable:!0});return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){let o=t();return n(o),o},set(o){n(o)}}),e}import{promisify as Pe}from"util";import O from"process";import{execFile as Ae}from"child_process";import{promisify as pe}from"util";import ue from"process";import{execFile as ge}from"child_process";var he=pe(ge);async function I(){if(ue.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await he("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),t=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari";return t==="com.apple.safari"?"com.apple.Safari":t}import we from"process";import{promisify as xe}from"util";import{execFile as ye,execFileSync as cr}from"child_process";var ve=xe(ye);async function X(e,{humanReadableOutput:r=!0,signal:t}={}){if(we.platform!=="darwin")throw new Error("macOS only");let n=r?[]:["-ss"],o={};t&&(o.signal=t);let{stdout:i}=await ve("osascript",["-e",e,n],o);return i.trim()}async function T(e){return X(`tell application "Finder" to set app_path to application file id "${e}" as string
2
+ import{a as D,b as A}from"./chunk-ZB72T6HB.js";import{l as S,m as C,n as P,o as U,p as N}from"./chunk-2FCAWRCU.js";import{createServer as Oe}from"http";import{randomBytes as He}from"crypto";import{URL as $e}from"url";import Z from"process";import{Buffer as ee}from"buffer";import re from"path";import{fileURLToPath as ke}from"url";import{promisify as Le}from"util";import te from"child_process";import Me,{constants as Ie}from"fs/promises";import Y from"process";import G,{constants as me}from"fs/promises";import j from"process";import le from"os";import L from"fs";import se from"fs";import z from"fs";var E;function ie(){try{return z.statSync("/.dockerenv"),!0}catch{return!1}}function ae(){try{return z.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function B(){return E===void 0&&(E=ie()||ae()),E}var k,ce=()=>{try{return se.statSync("/run/.containerenv"),!0}catch{return!1}};function u(){return k===void 0&&(k=ce()||B()),k}var K=()=>{if(j.platform!=="linux")return!1;if(le.release().toLowerCase().includes("microsoft"))return!u();try{if(L.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!u()}catch{}return L.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||L.existsSync("/run/WSL")?!u():!1},d=j.env.__IS_WSL_TEST__?K:K();var de=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let t="/etc/wsl.conf",n=!1;try{await G.access(t,me.F_OK),n=!0}catch{}if(!n)return e;let o=await G.readFile(t,{encoding:"utf8"}),i=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(o);return i?(r=i.groups.mountPoint.trim(),r=r.endsWith("/")?r:`${r}/`,r):e}})(),fe=async()=>`${await de()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,M=async()=>d?fe():`${Y.env.SYSTEMROOT||Y.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;function f(e,r,t){let n=o=>Object.defineProperty(e,r,{value:o,enumerable:!0,writable:!0});return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){let o=t();return n(o),o},set(o){n(o)}}),e}import{promisify as Pe}from"util";import O from"process";import{execFile as Ae}from"child_process";import{promisify as pe}from"util";import ue from"process";import{execFile as ge}from"child_process";var he=pe(ge);async function I(){if(ue.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await he("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),t=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari";return t==="com.apple.safari"?"com.apple.Safari":t}import we from"process";import{promisify as xe}from"util";import{execFile as ye,execFileSync as cr}from"child_process";var ve=xe(ye);async function X(e,{humanReadableOutput:r=!0,signal:t}={}){if(we.platform!=="darwin")throw new Error("macOS only");let n=r?[]:["-ss"],o={};t&&(o.signal=t);let{stdout:i}=await ve("osascript",["-e",e,n],o);return i.trim()}async function T(e){return X(`tell application "Finder" to set app_path to application file id "${e}" as string
3
3
  tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}import{promisify as be}from"util";import{execFile as Se}from"child_process";var Ce=be(Se),y={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},ur=new Map(Object.entries(y)),F=class extends Error{};async function _(e=Ce){let{stdout:r}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),t=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(r);if(!t)throw new F(`Cannot find Windows browser in stdout: ${JSON.stringify(r)}`);let{id:n}=t.groups,o=n.lastIndexOf("."),i=n.lastIndexOf("-"),c=o===-1?void 0:n.slice(0,o),a=i===-1?void 0:n.slice(0,i);return y[n]??y[c]??y[a]??{name:n,id:n}}var Ee=Pe(Ae),Be=e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,r=>r.toUpperCase());async function H(){if(O.platform==="darwin"){let e=await I();return{name:await T(e),id:e}}if(O.platform==="linux"){let{stdout:e}=await Ee("xdg-mime",["query","default","x-scheme-handler/http"]),r=e.trim();return{name:Be(r.replace(/.desktop$/,"").replace("-"," ")),id:r}}if(O.platform==="win32")return _();throw new Error("Only macOS, Linux, and Windows are supported")}var Te=Le(te.execFile),$=re.dirname(ke(import.meta.url)),q=re.join($,"xdg-open"),{platform:w,arch:V}=Z;async function Fe(){let e=await M(),r=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,t=ee.from(r,"utf16le").toString("base64"),{stdout:n}=await Te(e,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",t],{encoding:"utf8"}),o=n.trim(),i={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return i[o]?{id:i[o]}:{}}var J=async(e,r)=>{let t;for(let n of e)try{return await r(n)}catch(o){t=o}throw t},v=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return J(e.app,a=>v({...e,app:a}));let{name:r,arguments:t=[]}=e.app??{};if(t=[...t],Array.isArray(r))return J(r,a=>v({...e,app:{name:a,arguments:t}}));if(r==="browser"||r==="browserPrivate"){let a={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},l={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},s=d?await Fe():await H();if(s.id in a){let m=a[s.id];return r==="browserPrivate"&&t.push(l[m]),v({...e,app:{name:g[m],arguments:t}})}throw new Error(`${s.name} is not supported as a default browser`)}let n,o=[],i={};if(w==="darwin")n="open",e.wait&&o.push("--wait-apps"),e.background&&o.push("--background"),e.newInstance&&o.push("--new"),r&&o.push("-a",r);else if(w==="win32"||d&&!u()&&!r){n=await M(),o.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),d||(i.windowsVerbatimArguments=!0);let a=["Start"];e.wait&&a.push("-Wait"),r?(a.push(`"\`"${r}\`""`),e.target&&t.push(e.target)):e.target&&a.push(`"${e.target}"`),t.length>0&&(t=t.map(l=>`"\`"${l}\`""`),a.push("-ArgumentList",t.join(","))),e.target=ee.from(a.join(" "),"utf16le").toString("base64")}else{if(r)n=r;else{let a=!$||$==="/",l=!1;try{await Me.access(q,Ie.X_OK),l=!0}catch{}n=Z.versions.electron??(w==="android"||a||!l)?"xdg-open":q}t.length>0&&o.push(...t),e.wait||(i.stdio="ignore",i.detached=!0)}w==="darwin"&&t.length>0&&o.push("--args",...t),e.target&&o.push(e.target);let c=te.spawn(n,o,i);return e.wait?new Promise((a,l)=>{c.once("error",l),c.once("close",s=>{if(!e.allowNonzeroExitCode&&s>0){l(new Error(`Exited with code ${s}`));return}a(c)})}):(c.unref(),c)},_e=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return v({...r,target:e})};function Q(e){if(typeof e=="string"||Array.isArray(e))return e;let{[V]:r}=e;if(!r)throw new Error(`${V} is not supported`);return r}function b({[w]:e},{wsl:r}){if(r&&d)return Q(r);if(!e)throw new Error(`${w} is not supported`);return Q(e)}var g={};f(g,"chrome",()=>b({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));f(g,"brave",()=>b({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));f(g,"firefox",()=>b({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));f(g,"edge",()=>b({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));f(g,"browser",()=>"browser");f(g,"browserPrivate",()=>"browserPrivate");var oe=_e;var ne=class{profile;environment;creds;oauth;constructor(r="default",t="prod",n){this.profile=r,this.environment=t,this.creds=n??new D,this.oauth=new A(t)}async login(){let{server:r,port:t}=await this.startCallbackServer(),n=N(t);try{let o=this.creds.loadClient(this.profile,this.environment),i=o?.redirect_uris;(!o||!i?.includes(n))&&(o=await this.oauth.registerClient(n),this.creds.saveClient(this.profile,this.environment,o));let c=o.client_id,[a,l]=A.generatePkce(),s=He(32).toString("hex"),m=this.oauth.buildAuthorizationUrl(c,l,s,n),p=await this.waitForCallback(r,t,m,s);if(!p)throw new Error("Login cancelled or timed out");let h=await this.oauth.exchangeCode(p,c,a,n),x={access_token:h.access_token,refresh_token:h.refresh_token,expires_at:Math.floor(Date.now()/1e3)+h.expires_in,scope:h.scope??"*"};return this.creds.saveCredentials(this.profile,this.environment,x),this.creds.setActiveProfile(this.profile),x}catch(o){throw r.close(),o}}startCallbackServer(){return new Promise((r,t)=>{let n=C,o=()=>{let i=Oe();i.on("error",c=>{c.code==="EADDRINUSE"&&n<P?(n++,o()):t(new Error(`Failed to start callback server: ${c.message}. Ports ${C}-${P} are all in use.`))}),i.listen(n,S,()=>{r({server:i,port:n})})};o()})}waitForCallback(r,t,n,o){return new Promise(i=>{let c=!1,a=setTimeout(()=>l(null),12e4),l=s=>{c||(c=!0,clearTimeout(a),r.close(),i(s))};r.on("request",(s,m)=>{let p=new $e(s.url??"/",`http://${S}:${t}`);if(p.pathname!==U){m.writeHead(404),m.end();return}let h=p.searchParams.get("state"),x=p.searchParams.get("code");if(p.searchParams.get("error")){m.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),m.end(R({state:"error",title:"Login failed",message:"We couldn't complete the sign-in. You can close this tab and try again from your terminal."})),l(null);return}if(h!==o){m.writeHead(400,{"Content-Type":"text/html; charset=utf-8"}),m.end(R({state:"error",title:"Invalid state",message:"The sign-in response didn't match this session. Please return to your terminal and try again."})),l(null);return}m.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),m.end(R({state:"success",title:"You're signed in",message:"Head back to your terminal \u2014 KaneAI is ready when you are.",autoClose:!0})),l(x)}),oe(n).catch(s=>{let m=s instanceof Error?s.message:String(s);process.stderr.write(`[auth] Could not open browser: ${m}
4
4
  Please open this URL manually: ${n}
5
5
  `)})})}};function R(e){let r=e.state==="success",t=r?"#22c55e":"#ef4444",n=r?"rgba(34, 197, 94, 0.12)":"rgba(239, 68, 68, 0.12)",o=r?'<svg viewBox="0 0 24 24" width="36" height="36" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7"/></svg>':'<svg viewBox="0 0 24 24" width="36" height="36" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>',i=e.autoClose?"<script>setTimeout(function(){try{window.close();}catch(e){}}, 1500);</script>":"";return`<!doctype html>
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as f}from"./chunk-RXMOIIQD.js";import{a as x}from"./chunk-HCBYKLMW.js";import{t}from"./chunk-3ELBJPHQ.js";import{a as r,b as n}from"./chunk-C44QQJR4.js";import{a as B}from"./chunk-6YGTRKDT.js";import{e as c}from"./chunk-UR6MHSHU.js";var p=c(B(),1);var e=c(x(),1);function v(){return[{name:"convert",label:"Converting session data",status:"pending"},{name:"zip",label:"Compressing artifacts",status:"pending"},{name:"presign",label:"Requesting upload URLs",status:"pending"},{name:"upload",label:"Uploading to KaneAI",status:"pending"},{name:"atomic_replace",label:"Replacing local output",status:"pending"},{name:"commit_lock",label:"Committing to TMS",status:"pending"},{name:"finalize",label:"Finalizing test case",status:"pending"},{name:"code_export",label:"Downloading test code",status:"pending"}]}function U(s,o,d,a){return s.map(l=>l.name===o?{...l,status:d,detail:a}:l)}function R(s){let o=s/1e3;if(o<60)return`${o.toFixed(1)}s`;let d=Math.floor(o/60),a=Math.round(o%60);return`${d}m ${a}s`}function D(s){let[o,d]=(0,p.useState)(0),a=p.default.useRef(Date.now());return(0,p.useEffect)(()=>{if(!s)return;a.current=Date.now();let l=setInterval(()=>{d(Date.now()-a.current)},100);return()=>clearInterval(l)},[s]),o}function h({steps:s,status:o,testUrl:d,error:a}){let l=D(o==="uploading");return o==="uploading"?(0,e.jsxs)(r,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(r,{children:[(0,e.jsx)(n,{color:t.primary,children:"\u2601 "}),(0,e.jsx)(n,{color:t.primary,bold:!0,children:"Saving to KaneAI"}),(0,e.jsxs)(n,{color:t.dimmed,children:[" ",R(l)]})]}),(0,e.jsx)(r,{flexDirection:"column",marginTop:1,children:s.filter(i=>i.status!=="skipped").map((i,S,T)=>{let b=S===T.length-1?"\u2514\u2500":"\u251C\u2500",m=i.status==="done",u=i.status==="running",g=i.status==="failed";return(0,e.jsxs)(r,{children:[(0,e.jsxs)(n,{color:t.dimmed,children:[" ",b," "]}),(0,e.jsx)(r,{width:3,children:u?(0,e.jsx)(f,{}):m?(0,e.jsx)(n,{color:t.green,children:"\u2713"}):g?(0,e.jsx)(n,{color:t.red,children:"\u2717"}):(0,e.jsx)(n,{color:t.muted,children:"\u25CB"})}),(0,e.jsx)(n,{color:m?t.dim:u?t.base:g?t.red:t.muted,children:i.label}),i.detail&&(0,e.jsxs)(n,{color:t.dimmed,children:[" ",i.detail]})]},i.name)})}),(0,e.jsx)(r,{marginTop:1,children:(0,e.jsx)(n,{color:t.muted,children:" press Ctrl+C twice to force exit"})})]}):o==="success"?(0,e.jsx)(e.Fragment,{}):(0,e.jsxs)(r,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(r,{children:[(0,e.jsx)(n,{color:t.red,children:"\u2601 "}),(0,e.jsx)(n,{color:t.red,bold:!0,children:"Save failed"})]}),a&&(0,e.jsxs)(r,{marginTop:0,children:[(0,e.jsx)(n,{color:t.dimmed,children:" "}),(0,e.jsx)(n,{color:t.dim,children:a})]})]})}export{v as a,U as b,h as c};
2
+ import{b as f}from"./chunk-WCRLZETG.js";import{a as x}from"./chunk-HCBYKLMW.js";import{t}from"./chunk-2FCAWRCU.js";import{a as r,b as n}from"./chunk-C44QQJR4.js";import{a as B}from"./chunk-6YGTRKDT.js";import{e as c}from"./chunk-UR6MHSHU.js";var p=c(B(),1);var e=c(x(),1);function v(){return[{name:"convert",label:"Converting session data",status:"pending"},{name:"zip",label:"Compressing artifacts",status:"pending"},{name:"presign",label:"Requesting upload URLs",status:"pending"},{name:"upload",label:"Uploading to KaneAI",status:"pending"},{name:"atomic_replace",label:"Replacing local output",status:"pending"},{name:"commit_lock",label:"Committing to TMS",status:"pending"},{name:"finalize",label:"Finalizing test case",status:"pending"},{name:"code_export",label:"Downloading test code",status:"pending"}]}function U(s,o,d,a){return s.map(l=>l.name===o?{...l,status:d,detail:a}:l)}function R(s){let o=s/1e3;if(o<60)return`${o.toFixed(1)}s`;let d=Math.floor(o/60),a=Math.round(o%60);return`${d}m ${a}s`}function D(s){let[o,d]=(0,p.useState)(0),a=p.default.useRef(Date.now());return(0,p.useEffect)(()=>{if(!s)return;a.current=Date.now();let l=setInterval(()=>{d(Date.now()-a.current)},100);return()=>clearInterval(l)},[s]),o}function h({steps:s,status:o,testUrl:d,error:a}){let l=D(o==="uploading");return o==="uploading"?(0,e.jsxs)(r,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(r,{children:[(0,e.jsx)(n,{color:t.primary,children:"\u2601 "}),(0,e.jsx)(n,{color:t.primary,bold:!0,children:"Saving to KaneAI"}),(0,e.jsxs)(n,{color:t.dimmed,children:[" ",R(l)]})]}),(0,e.jsx)(r,{flexDirection:"column",marginTop:1,children:s.filter(i=>i.status!=="skipped").map((i,S,T)=>{let b=S===T.length-1?"\u2514\u2500":"\u251C\u2500",m=i.status==="done",u=i.status==="running",g=i.status==="failed";return(0,e.jsxs)(r,{children:[(0,e.jsxs)(n,{color:t.dimmed,children:[" ",b," "]}),(0,e.jsx)(r,{width:3,children:u?(0,e.jsx)(f,{}):m?(0,e.jsx)(n,{color:t.green,children:"\u2713"}):g?(0,e.jsx)(n,{color:t.red,children:"\u2717"}):(0,e.jsx)(n,{color:t.muted,children:"\u25CB"})}),(0,e.jsx)(n,{color:m?t.dim:u?t.base:g?t.red:t.muted,children:i.label}),i.detail&&(0,e.jsxs)(n,{color:t.dimmed,children:[" ",i.detail]})]},i.name)})}),(0,e.jsx)(r,{marginTop:1,children:(0,e.jsx)(n,{color:t.muted,children:" press Ctrl+C twice to force exit"})})]}):o==="success"?(0,e.jsx)(e.Fragment,{}):(0,e.jsxs)(r,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(r,{children:[(0,e.jsx)(n,{color:t.red,children:"\u2601 "}),(0,e.jsx)(n,{color:t.red,bold:!0,children:"Save failed"})]}),a&&(0,e.jsxs)(r,{marginTop:0,children:[(0,e.jsx)(n,{color:t.dimmed,children:" "}),(0,e.jsx)(n,{color:t.dim,children:a})]})]})}export{v as a,U as b,h as c};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{f as l}from"./chunk-X7VI7KK3.js";import{readFileSync as y,existsSync as S}from"fs";import{basename as f,dirname as R,isAbsolute as w,resolve as g}from"path";var h=["target","chrome_profile","cdp_endpoint","ws_endpoint","headless"],r=class extends Error{constructor(t){super(t),this.name="TestMdResolveError"}};function $(o){let t=g(o),n=m(t),s=x(n.global),i=[];return u(n,[],i,[],t),i.forEach((e,p)=>e.flatIndex=p+1),{rootPath:t,rootTitle:n.title,rootGlobal:n.global,rootSteps:n.steps,chrome:s,steps:i}}function m(o){if(!S(o))throw new r(`@import path not found: ${o}`);let t=y(o,"utf8");return l(o,t)}function u(o,t,n,s,i){if(t.includes(o.path)){let e=[...t,o.path].map(p=>f(p)).join(" \u2192 ");throw new r(`cyclic reference: ${e}`)}t.push(o.path);let a=s.length===0;for(let e of o.steps){let p=e.body.kind!=="objective";if(e.optional&&p&&!a)throw new r(`intermediate-ref 'optional' is not supported in v1: ${o.path}:${e.headingLine}`);let d={file:o.path,stepIndex:e.index,heading:e.heading,optional:e.optional??!1};if(e.body.kind==="objective"){let v=F(o.global,e.config);n.push({flatIndex:0,objective:e.body.text,sourceFile:o.path,trace:[...s,d],config:v,parsedConfig:e.config,optional:e.optional??!1});continue}let b=R(o.path),c=w(e.body.path)?e.body.path:g(b,e.body.path);if(f(c).endsWith("_test.md"))throw new r(`cannot @import a test file: only helpers may be imported (got ${c})`);let C=m(c);u(C,t,n,[...s,d],i)}t.pop()}function x(o){let t={};for(let n of h)o[n]!==void 0&&(t[n]=o[n]);return t}function F(o,t){let n={};for(let[s,i]of Object.entries(o))h.includes(s)||(n[s]=i);return{...n,...t??{}}}export{$ as a};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{s}from"./chunk-3ELBJPHQ.js";function n(r="prod"){let e=s[r];return r!=="stage"?e:{authBaseUrl:process.env.KANE_STAGE_AUTH_URL??e.authBaseUrl,consentUrl:process.env.KANE_STAGE_CONSENT_URL??e.consentUrl,controllerBaseUrl:process.env.TESTMUAI_BASE_URL??e.controllerBaseUrl,tmsBaseUrl:process.env.KANE_STAGE_TMS_URL??e.tmsBaseUrl,secretsBaseUrl:process.env.KANE_STAGE_SECRETS_URL??e.secretsBaseUrl,testManagerUiUrl:process.env.KANE_STAGE_TEST_MANAGER_UI_URL??e.testManagerUiUrl,shareApiBaseUrl:process.env.KANE_STAGE_SHARE_API_URL??e.shareApiBaseUrl,v16ServerHost:process.env.KANE_STAGE_V16_SERVER_HOST??e.v16ServerHost}}export{n as a};
2
+ import{s}from"./chunk-2FCAWRCU.js";function n(r="prod"){let e=s[r];return r!=="stage"?e:{authBaseUrl:process.env.KANE_STAGE_AUTH_URL??e.authBaseUrl,consentUrl:process.env.KANE_STAGE_CONSENT_URL??e.consentUrl,controllerBaseUrl:process.env.TESTMUAI_BASE_URL??e.controllerBaseUrl,tmsBaseUrl:process.env.KANE_STAGE_TMS_URL??e.tmsBaseUrl,secretsBaseUrl:process.env.KANE_STAGE_SECRETS_URL??e.secretsBaseUrl,testManagerUiUrl:process.env.KANE_STAGE_TEST_MANAGER_UI_URL??e.testManagerUiUrl,shareApiBaseUrl:process.env.KANE_STAGE_SHARE_API_URL??e.shareApiBaseUrl,v16ServerHost:process.env.KANE_STAGE_V16_SERVER_HOST??e.v16ServerHost}}export{n as a};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as se,b as Te}from"./chunk-RXMOIIQD.js";import{b as ke}from"./chunk-DUR6AFYA.js";import{d as Be,e as ae}from"./chunk-G7VF5SDK.js";import{a as Re}from"./chunk-34DK2AUH.js";import{a as N}from"./chunk-HCBYKLMW.js";import{t as s}from"./chunk-3ELBJPHQ.js";import{a as c,b as o,d as ye,k as ue}from"./chunk-C44QQJR4.js";import{a as le}from"./chunk-6YGTRKDT.js";import{e as j}from"./chunk-UR6MHSHU.js";var G=j(N(),1),Le=64;function Pe(t){return t.split(`
2
+ import{a as se,b as Te}from"./chunk-WCRLZETG.js";import{b as ke}from"./chunk-EZJNX4VE.js";import{d as Be,e as ae}from"./chunk-G7VF5SDK.js";import{a as Re}from"./chunk-HXIGYD2T.js";import{a as N}from"./chunk-HCBYKLMW.js";import{t as s}from"./chunk-2FCAWRCU.js";import{a as c,b as o,d as ye,k as ue}from"./chunk-C44QQJR4.js";import{a as le}from"./chunk-6YGTRKDT.js";import{e as j}from"./chunk-UR6MHSHU.js";var G=j(N(),1),Le=64;function Pe(t){return t.split(`
3
3
  `).map(i=>i.replace(/^[-–•]\s*/,"").trim()).filter(i=>i.length>0)}function Ge({status:t,summary:i,duration:l,steps:u,stepsPassed:S,stepsFailed:f,reason:x,creditsConsumed:d}){let D=t==="passed",E=D?s.green:s.red,P=D?"\u2713":"\u2717",F=t.toUpperCase(),H=S??(D?u:Math.max(0,u-1)),I=f??(D?0:1),M=I>0?`${u} steps (${H} passed, ${I} failed)`:`${u} steps`,Q=l<60?`${l.toFixed(1)}s`:`${Math.floor(l/60)}m ${Math.round(l%60)}s`,V=Pe(i);return(0,G.jsx)(c,{flexDirection:"column",marginTop:1,children:(0,G.jsxs)(c,{borderStyle:"round",borderColor:E,flexDirection:"column",paddingX:2,paddingY:1,width:Le+6,children:[(0,G.jsxs)(c,{flexDirection:"column",children:[(0,G.jsxs)(o,{bold:!0,color:E,children:[P," ",F]}),(0,G.jsxs)(o,{color:s.dimmed,wrap:"wrap",children:[M," \xB7 ",Q,typeof d=="number"&&d>0?` \xB7 ${parseFloat(d.toFixed(4))} credits`:""]})]}),V.length>0&&(0,G.jsx)(c,{flexDirection:"column",marginTop:1,marginLeft:1,children:V.map((Z,W)=>(0,G.jsxs)(c,{marginBottom:W<V.length-1?1:0,children:[(0,G.jsx)(o,{color:s.primary,children:"\u25CF "}),(0,G.jsx)(c,{flexShrink:1,children:(0,G.jsx)(o,{wrap:"wrap",children:Z})})]},W))}),x&&!D&&(0,G.jsx)(c,{marginTop:1,children:(0,G.jsxs)(o,{color:s.red,wrap:"wrap",children:["Reason: ",x]})})]})})}var A=j(N(),1);function Ke({message:t,code:i,remediation:l,docsUrl:u}){return(0,A.jsx)(Re,{title:"Error",variant:"error",children:(0,A.jsxs)(c,{flexDirection:"column",paddingY:1,children:[(0,A.jsxs)(o,{color:s.red,bold:!0,children:[" \u2717 ",t]}),i&&(0,A.jsxs)(c,{marginTop:0,marginLeft:5,children:[(0,A.jsx)(o,{color:s.muted,children:"Code: "}),(0,A.jsx)(o,{color:s.dimmed,children:i})]}),l&&(0,A.jsxs)(c,{flexDirection:"column",marginTop:1,marginLeft:5,children:[(0,A.jsx)(o,{color:s.green,bold:!0,children:"Fix:"}),(0,A.jsxs)(o,{color:s.cyan,children:["$ ",l]})]}),u&&(0,A.jsxs)(c,{marginTop:1,marginLeft:5,children:[(0,A.jsx)(o,{color:s.muted,children:"Docs: "}),(0,A.jsx)(o,{color:s.cyan,underline:!0,children:u})]})]})})}var $=j(le(),1);var we=j(le(),1);var de=j(N(),1),De="#ffc580",Fe="#ffd9a8",ve="#ffffff";function _e({text:t,active:i=!0}){let[l,u]=(0,we.useState)(0),S=4;if(se(()=>{u(x=>(x+1)%(t.length+S*2))},i?80:null),!i)return(0,de.jsx)(o,{color:ve,children:t});let f=t.split("").map((x,d)=>{let D=l-S,E=Math.abs(d-D-S/2),P;return E<=S/2?P=De:E<=S?P=Fe:P=ve,(0,de.jsx)(o,{color:P,children:x},d)});return(0,de.jsx)(o,{children:f})}var O=j(N(),1),Oe={starting:s.cyan,running:s.purple,passed:s.green,failed:s.red,cancelled:s.dimmed,timed_out:s.yellow};function fe({currentStep:t,maxSteps:i,elapsed:l,status:u}){let{stdout:S}=ue(),f=S?.columns??80,x=Oe[u]??s.purple,d=l<60?`${l.toFixed(1)}s`:`${Math.floor(l/60)}m ${Math.round(l%60)}s`;return(0,O.jsxs)(c,{flexDirection:"column",marginTop:1,children:[(0,O.jsx)(o,{color:s.muted,children:"\u2500".repeat(Math.min(f,60))}),(0,O.jsxs)(c,{children:[(0,O.jsx)(o,{children:" "}),(0,O.jsx)(o,{color:s.dimmed,children:"Steps "}),(0,O.jsx)(o,{bold:!0,children:t}),(0,O.jsxs)(o,{color:s.dimmed,children:["/",i]}),(0,O.jsx)(o,{children:" "}),(0,O.jsx)(o,{color:s.dimmed,children:"Elapsed "}),(0,O.jsx)(o,{bold:!0,children:d}),(0,O.jsx)(o,{children:" "}),(0,O.jsx)(o,{color:s.dimmed,children:"Status "}),(0,O.jsx)(o,{bold:!0,color:x,children:u})]})]})}var Me={click:"\u25CF",type:"\u229E",scroll:"\u2195",navigate:"\u2192",analyze:"\u25CE",assert:"\u25C8","if-else":"\u2442",select:"\u25BC",press_key:"\u21B5",wait:"\u2026",tool_call:"\u2299"};function $e(t){return Me[t]??"\u25CF"}var ne=j(N(),1);function xe({steps:t,flows:i,cmInitCounts:l,renderStep:u}){return(0,ne.jsxs)(c,{flexDirection:"column",marginLeft:2,paddingLeft:1,children:[(0,ne.jsxs)(o,{color:s.dimmed,children:["\u2501\u2501 Bifurcated into ",i?.length??t.length," flows \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"]}),t.map((S,f)=>(0,ne.jsxs)(c,{flexDirection:"column",marginTop:f>0?1:0,children:[(0,ne.jsxs)(o,{color:s.purple,children:["Flow ",f+1,": ",i?.[f]??S.objective]}),l&&l[f]!=null&&(0,ne.jsxs)(o,{color:s.dimmed,children:[" \u25AA Generated task with ",l[f]," checkpoints"]}),S.children&&S.children.length>0?S.children.map(x=>u(x,`f${f}-${x.index}`)):S.status==="pending"&&(0,ne.jsx)(o,{color:s.dimmed,children:" \u25CB Waiting..."})]},f))]})}var r=j(N(),1);function U({step:t,indent:i=2}){let l=t.actionType?$e(t.actionType):null,u=t.status==="running",S=t.status==="passed",f=t.status==="failed",x=t.status==="pending"||t.status==="stopped",{stdout:d}=ue(),D=d?.columns??80,E=Math.max(20,D-i-21),P=t.objective??"",F=P.length>E?P.slice(0,E-1)+"\u2026":P,H=(t.duration??0)*1e3,I=t.duration!=null?H<1e3?`${Math.round(H)}ms`:`${(H/1e3).toFixed(1)}s`:"";return(0,r.jsxs)(c,{flexDirection:"column",children:[(0,r.jsxs)(c,{marginLeft:i,children:[(0,r.jsx)(c,{width:4,children:(0,r.jsxs)(o,{color:s.muted,children:[String(t.index).padStart(2," ")," "]})}),(0,r.jsx)(c,{width:3,children:u?(0,r.jsx)(Te,{}):S?(0,r.jsx)(o,{color:s.green,bold:!0,children:"\u2713"}):f?(0,r.jsx)(o,{color:s.red,bold:!0,children:"\u2717"}):(0,r.jsx)(o,{color:s.muted,children:"\u25CB"})}),(0,r.jsx)(c,{flexGrow:1,children:u?(0,r.jsx)(_e,{text:F,active:!0}):f?(0,r.jsx)(o,{color:s.red,children:F}):x?(0,r.jsx)(o,{color:s.dimmed,children:F}):(0,r.jsx)(o,{color:s.greenDim,children:F})}),(S||f)&&l?(0,r.jsx)(c,{width:3,marginLeft:1,children:(0,r.jsx)(o,{color:s.muted,children:l})}):(0,r.jsx)(c,{width:3,marginLeft:1}),(0,r.jsx)(c,{width:7,justifyContent:"flex-end",children:(0,r.jsx)(o,{color:s.dimmed,children:I})})]}),t.children&&t.children.length>0&&(0,r.jsx)(c,{flexDirection:"column",children:t.children.map((M,Q)=>(0,r.jsx)(U,{step:M,indent:i+2},`child-${Q}`))})]})}function ft({steps:t,bifurcated:i,flows:l,cmInitCounts:u,maxSteps:S=50,staticSteps:f=!1,onStepCommit:x}){let d=(0,$.useRef)(new Set),D=(0,$.useRef)(!1),E=(0,$.useRef)(new Set),P=(0,$.useRef)(!1),F=(0,$.useRef)(new Set),H=(0,$.useRef)(0);(0,$.useEffect)(()=>{t.length===0&&H.current>0&&(d.current.clear(),D.current=!1,E.current.clear(),P.current=!1,F.current.clear()),H.current=t.length},[t.length]);let I=t.flatMap(n=>[n,...n.children??[]]),M=I.some(n=>n.status==="running"),Q=I.some(n=>n.status==="failed"),V=I.length===0||I.every(n=>n.status==="pending"),Z=I.filter(n=>n.status==="passed"||n.status==="failed").length,W;V?W="starting":M?W="running":Q?W="failed":W="passed";let ee=(0,$.useRef)(null),[ie,ce]=(0,$.useState)(0);(0,$.useEffect)(()=>{I.length===0||V?(ee.current=null,ce(0)):M&&ee.current==null&&(ee.current=Date.now())},[M,V,I.length]),(0,$.useEffect)(()=>{if(!M)return;let n=setInterval(()=>{ee.current!=null&&ce((Date.now()-ee.current)/1e3)},500);return()=>clearInterval(n)},[M]);let v=(0,$.useRef)(new Set),[C,K]=(0,$.useState)([]),re=(0,$.useRef)(!1);(0,$.useEffect)(()=>{if(!f||i)return;let n=[];if(!i&&!re.current&&u&&u[0]!=null&&(re.current=!0,u[0]>0&&n.push({key:"cm_init_0",type:"cm_init",count:u[0]})),i){!v.current.has(-1)&&t.length>0&&(v.current.add(-1),n.push({key:"bif_header",type:"bifurcation_header",flowCount:l?.length??t.length}));for(let p=0;p<t.length;p++){let a=t[p],y=-(p+10);v.current.has(y)||(v.current.add(y),n.push({key:`flow_header_${p}`,type:"flow_header",flowIdx:p,label:l?.[p]??a.objective,cmCount:u?.[p]}));for(let B of a.children??[])(B.status==="passed"||B.status==="failed")&&!v.current.has(B.index)&&(v.current.add(B.index),n.push({key:`step_f${p}_${B.index}`,type:"step",step:{...B}}))}}else for(let p of t)(p.status==="passed"||p.status==="failed")&&!v.current.has(p.index)&&(v.current.add(p.index),n.push({key:`step_${p.index}`,type:"step",step:{...p,children:p.children?[...p.children]:void 0}}));n.length>0&&K(p=>[...p,...n])},[t,i,l,u,f]),(0,$.useEffect)(()=>{if(x)if(!i&&!P.current&&u&&u[0]!=null&&(P.current=!0,u[0]>0&&x((0,r.jsx)(c,{marginLeft:2,children:(0,r.jsxs)(o,{color:s.dimmed,children:["\u25A0 Generated task with ",u[0]," checkpoints"]})}))),i&&l&&!D.current&&(D.current=!0,x((0,r.jsx)(o,{color:"#b388ff",children:"\u2501\u2501 Bifurcated into "+l.length+" flows \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"}))),i){let n=t.flatMap((p,a)=>{let y=p.children??[];return!E.current.has(a)&&y.length>0&&(E.current.add(a),x((0,r.jsx)(o,{color:"#b388ff",children:" Flow "+(a+1)+": "+(l?.[a]??"")})),u?.[a]!=null&&u[a]>0&&!F.current.has(a)&&(F.current.add(a),x((0,r.jsx)(c,{marginLeft:2,children:(0,r.jsxs)(o,{color:s.dimmed,children:[" \u25AA Generated task with ",u[a]," checkpoints"]})})))),u?.[a]!=null&&u[a]>0&&E.current.has(a)&&!F.current.has(a)&&(F.current.add(a),x((0,r.jsx)(c,{marginLeft:2,children:(0,r.jsxs)(o,{color:s.dimmed,children:[" \u25AA Generated task with ",u[a]," checkpoints"]})}))),y});for(let p of n){let a=`${p.index}-${p.objective}`;d.current.has(a)||(p.status==="passed"||p.status==="failed"||p.status==="stopped")&&(d.current.add(a),x((0,r.jsx)(c,{marginLeft:2,children:(0,r.jsx)(U,{step:p})})))}}else for(let n of t){let p=`${n.index}-${n.objective}`,a=!!n.branchObjective;a&&!d.current.has(p)&&(d.current.add(p),x((0,r.jsx)(c,{marginLeft:2,children:(0,r.jsx)(U,{step:{...n,children:void 0}})})));for(let y of n.children??[]){let B=`child-${n.index}-${y.index}-${y.objective}`;d.current.has(B)||(y.status==="passed"||y.status==="failed"||y.status==="stopped")&&(d.current.add(B),x((0,r.jsx)(c,{marginLeft:4,children:(0,r.jsx)(U,{step:y})})))}!a&&!d.current.has(p)&&(n.status==="passed"||n.status==="failed"||n.status==="stopped")&&(d.current.add(p),x((0,r.jsx)(c,{marginLeft:2,children:(0,r.jsx)(U,{step:{...n,children:void 0}})})))}},[t,x,i,l,u]);let Y=[];if(x)if(i)for(let n of t){let a=(n.children??[]).filter(y=>{let B=`${y.index}-${y.objective}`;return!d.current.has(B)});a.length>0&&Y.push({...n,children:a})}else for(let n of t){let p=`${n.index}-${n.objective}`,a=d.current.has(p),y=(n.children??[]).filter(B=>{let L=`child-${n.index}-${B.index}-${B.objective}`;return!d.current.has(L)});a?y.length>0&&Y.push({...n,children:y}):Y.push({...n,children:y})}else if(f){if(!i)for(let n of t)v.current.has(n.index)||Y.push(n)}if(!f){let n=x?Y:t;return(0,r.jsxs)(c,{flexDirection:"column",children:[i?x?n.length>0?(0,r.jsx)(c,{flexDirection:"column",marginLeft:2,paddingLeft:1,children:n.map((a,y)=>(0,r.jsx)(c,{flexDirection:"column",marginTop:y>0?1:0,children:a.children&&a.children.length>0?a.children.map(B=>(0,r.jsx)(U,{step:B},`f${y}-${B.index}`)):a.status==="pending"&&(0,r.jsx)(o,{color:s.dimmed,children:" \u25CB Waiting..."})},y))}):null:(0,r.jsx)(xe,{steps:t,flows:l,cmInitCounts:u,renderStep:(a,y)=>(0,r.jsx)(U,{step:a},y)}):(0,r.jsxs)(c,{flexDirection:"column",marginLeft:2,paddingLeft:1,children:[!x&&u&&u[0]!=null&&(0,r.jsxs)(o,{color:s.dimmed,children:["\u25AA Generated task with ",u[0]," checkpoints"]}),n.map(a=>{let y=`${a.index}-${a.objective}`;return x&&d.current.has(y)?(0,r.jsx)(c,{flexDirection:"column",children:(a.children??[]).map(B=>(0,r.jsx)(c,{marginLeft:2,children:(0,r.jsx)(U,{step:B})},B.index))},`branch-children-${a.index}`):(0,r.jsx)(U,{step:a},a.index)})]}),M&&(0,r.jsx)(fe,{currentStep:Z,maxSteps:S,elapsed:ie,status:W})]})}return i?(0,r.jsxs)(c,{flexDirection:"column",children:[(0,r.jsx)(xe,{steps:t,flows:l,cmInitCounts:u,renderStep:(n,p)=>(0,r.jsx)(U,{step:n},p)}),M&&(0,r.jsx)(fe,{currentStep:Z,maxSteps:S,elapsed:ie,status:W})]}):(0,r.jsxs)(c,{flexDirection:"column",children:[(0,r.jsx)(ye,{items:C,children:n=>n.type==="cm_init"?(0,r.jsx)(c,{marginLeft:2,paddingLeft:1,children:(0,r.jsxs)(o,{color:s.dimmed,children:["\u25AA Generated task with ",n.count," checkpoints"]})},n.key):n.type==="bifurcation_header"?(0,r.jsx)(c,{marginLeft:2,paddingLeft:1,children:(0,r.jsxs)(o,{color:s.dimmed,children:["\u2501\u2501 Bifurcated into ",n.flowCount," flows \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"]})},n.key):n.type==="flow_header"?(0,r.jsxs)(c,{flexDirection:"column",marginLeft:2,paddingLeft:1,children:[(0,r.jsxs)(o,{color:s.purple,children:["Flow ",n.flowIdx+1,": ",n.label]}),n.cmCount!=null&&(0,r.jsxs)(o,{color:s.dimmed,children:[" \u25AA Generated task with ",n.cmCount," checkpoints"]})]},n.key):(0,r.jsx)(c,{marginLeft:2,paddingLeft:1,children:(0,r.jsx)(U,{step:n.step})},n.key)}),Y.length>0&&(0,r.jsx)(c,{flexDirection:"column",marginLeft:2,paddingLeft:1,children:Y.map(n=>(0,r.jsx)(U,{step:n},n.index))}),M&&(0,r.jsx)(fe,{currentStep:Z,maxSteps:S,elapsed:ie,status:W})]})}var ge=j(le(),1);var pe=j(N(),1),Ee=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function bt({label:t,hasBifurcation:i=!1}){let[l,u]=(0,ge.useState)(0),[S,f]=(0,ge.useState)(0);se(()=>{u(d=>(d+1)%Ee.length)},80),se(()=>{f(d=>(d+1)%4)},400);let x=t??(i?"Planning approach":"Analyzing objective");return(0,pe.jsxs)(c,{marginLeft:1,children:[(0,pe.jsxs)(o,{color:s.primary,children:[Ee[l]," "]}),(0,pe.jsxs)(o,{color:s.dim,children:[x,".".repeat(S+1)]})]})}function yt(t){if(!t.isRunning||t.replayInfo)return null;let i=t.bifurcationInfo;if(i&&!i.isSingleFlow){let l=t.steps.findIndex(S=>S.status==="running");return(l===-1?t.cmInitCounts.length===0:l>=t.cmInitCounts.length)?{label:l>0?`Planning flow ${l+1}`:void 0,hasBifurcation:!0}:null}return t.cmInitCounts.length>0||t.steps.some(l=>l.children?.length)?null:{hasBifurcation:!!i}}var _=j(le(),1);function be(t){let i=t.indexOf(": ");return i>0&&i<15?t.slice(i+2):t}function Se(t){return t.map(i=>{let l=i.children?Se(i.children):i.children;return i.status==="running"?{...i,status:"stopped",phase:void 0,children:l}:l!==i.children?{...i,children:l}:i})}function kt(t,i,l,u){let[S,f]=(0,_.useState)(!1),[x,d]=(0,_.useState)([]),[D,E]=(0,_.useState)(null),[P,F]=(0,_.useState)(null),[H,I]=(0,_.useState)(null),[M,Q]=(0,_.useState)(null),[V,Z]=(0,_.useState)([]),[W,ee]=(0,_.useState)(null),[ie,ce]=(0,_.useState)(void 0),v=(0,_.useRef)(null),C=(0,_.useRef)(null),K=(0,_.useRef)(0),re=(0,_.useRef)(!1),Y=(0,_.useCallback)(async(a,y)=>{let B=v.current;if(B){try{await B.exited}catch{}v.current=null}d([]),E(null),F(null),I(null),Q(null),Z([]),ee(null),ce(a.max_steps),f(!0),C.current=null,K.current=0;let L;try{L=ke(a,y)}catch(te){I(te instanceof Error?te.message:String(te)),f(!1);return}v.current=L,Be("runner",()=>L.cancel()),(async()=>{re.current=!1;let te=!1;for await(let e of L.events){if(re.current)break;switch(e.type){case"run_start":if(C.current&&!C.current.isSingleFlow){let R=K.current;K.current++,d(T=>T.map((h,b)=>b===R?{...h,status:"running"}:h.status==="running"&&!h.children?.some(m=>m.status==="running")?{...h,status:h.children?.some(m=>m.status==="failed")?"failed":"passed"}:h))}break;case"bifurcation":{let R=e.flows??[],T=e.count??R.length,h={flows:R,isSingleFlow:e.is_single_flow??T<=1};Q(h),C.current=h,K.current=0,d(R.map((b,m)=>({index:m+1,objective:b??`Flow ${m+1}`,status:"pending"})));break}case"step_start":{i?.("STEP_START",`Step ${e.index} started`,{index:e.index,objective:e.objective,child_id:e.child_id});let R=e.index,T=e.objective??`Step ${R}`,h=e.child_id,b=C.current&&!C.current.isSingleFlow;if(h)d(m=>{let g=m.findIndex(z=>z.status==="running"||z.children?.some(je=>je.status==="running"));if(g===-1)return m;let k=[...m],w={...k[g]},J=[...w.children??[]].map(z=>z.status==="running"?{...z,status:"stopped",phase:void 0}:z);return J.push({index:R,objective:T,status:"running"}),w.children=J,k[g]=w,k});else if(b){let m=Math.max(0,K.current-1);d(g=>{let k=[...g];if(m>=k.length)return g;let w={...k[m]},J=[...w.children??[]].map(z=>z.status==="running"?{...z,status:"stopped",phase:void 0}:z);return J.push({index:R,objective:T,status:"running"}),w.children=J,w.status="running",k[m]=w,k})}else d(m=>{let g=Se(m);return g.some(w=>w.index===R)?g.map(w=>w.index===R?{...w,status:"running",objective:T}:w):[...g,{index:R,objective:T,status:"running"}]});break}case"step_event":{i?.("STEP_EVENT",`Step ${e.index} ${e.event}`,{index:e.index,phase:e.event,action_type:e.action_type,detail:e.detail,child_id:e.child_id});let R=e.child_id,T=C.current&&!C.current.isSingleFlow;if(e.event==="cm_init"&&e.checkpoint_count!=null){Z(h=>[...h,e.checkpoint_count]);break}if(e.event==="replay_started"){ee({recordingLength:e.recording_length??0});break}if(e.event==="reasoning"&&e.detail&&e.detail!=="reasoning"&&l?.(e.detail),R)d(h=>h.map(b=>{if(!b.children)return b;let m=b.children.map(g=>{if(g.index!==e.index)return g;let k={phase:e.event};return e.event==="reasoning"&&e.detail&&e.detail!=="reasoning"&&(k.objective=e.detail),e.action_type&&(k.actionType=e.action_type),{...g,...k}});return{...b,children:m}}));else if(T){let h=Math.max(0,K.current-1);d(b=>{let m=[...b];if(h>=m.length)return b;let g={...m[h]},k=[...g.children??[]];if(!k.some(X=>X.index===e.index))k.push({index:e.index,objective:`Step ${e.index}`,status:"running",phase:e.event,actionType:e.action_type});else for(let X=0;X<k.length;X++){if(k[X].index!==e.index)continue;let J={phase:e.event};e.event==="reasoning"&&e.detail&&e.detail!=="reasoning"&&(J.objective=e.detail),e.action_type&&(J.actionType=e.action_type),k[X]={...k[X],...J}}return g.children=k,m[h]=g,m})}else d(h=>h.some(m=>m.index===e.index)?h.map(m=>{if(m.index!==e.index)return m;let g={phase:e.event};return e.event==="reasoning"&&e.detail&&e.detail!=="reasoning"&&(g.objective=e.detail),e.action_type&&(g.actionType=e.action_type),{...m,...g}}):[...Se(h),{index:e.index,objective:`Step ${e.index}`,status:"running",phase:e.event,actionType:e.action_type}]);break}case"step_end":{i?.("STEP_END",`Step ${e.index} ${e.status}`,{index:e.index,status:e.status,duration:e.duration,summary:e.summary,child_id:e.child_id}),u?.();let R=e.child_id,T=C.current&&!C.current.isSingleFlow;if(R)d(h=>h.map(b=>{if(!b.children)return b;let m=b.children.map(g=>g.index===e.index?{...g,status:e.status,duration:e.duration,phase:void 0,objective:g.objective.startsWith("Step ")?be(e.summary||g.objective):g.objective}:g);return{...b,children:m}}));else if(T){let h=Math.max(0,K.current-1);d(b=>{let m=[...b];if(h>=m.length)return b;let g={...m[h]},k=(g.children??[]).map(w=>w.index===e.index?{...w,status:e.status,duration:e.duration,phase:void 0,objective:w.objective.startsWith("Step ")?be(e.summary||w.objective):w.objective}:w);return g.children=k,m[h]=g,m})}else d(h=>h.map(b=>b.index===e.index?{...b,status:e.status,duration:e.duration,phase:void 0,objective:b.objective.startsWith("Step ")?be(e.summary||b.objective):b.objective}:b));{let b=C.current&&!C.current.isSingleFlow?Math.max(0,K.current-1):0;t?.(e.index,b,e.child_id)}break}case"child_agent_start":{let R=e.objective??"";d(T=>T.map(h=>h.status==="running"?{...h,objective:`${R} (branch)`,phase:`child: ${R.slice(0,50)}`,branchObjective:R}:h));break}case"child_agent_end":d(R=>R.map(T=>T.phase?.startsWith("child:")?{...T,phase:`child ${e.success?"done":"failed"}`}:T));break;case"ask_user":E(e.question??"");break;case"run_end":d(R=>R.map(T=>T.status==="running"?{...T,status:e.status,phase:void 0}:T)),f(!1),F(e),te=!0;break;case"error":f(!1),I(e.message??"Runner error"),d(R=>R.map(T=>T.status==="running"?{...T,status:"failed",phase:void 0}:T));break}}let{code:q,signal:me}=await L.exited,he=L.stderr,Ie=q===0&&!me,oe=[];q!==null&&q!==0&&oe.push(`Runner exited with code ${q}`),me&&oe.push(`Runner killed by signal ${me}`),he&&(!Ie||!te?oe.push(he):y?.log?.("debug","RUNNER_STDERR_BENIGN","Runner stderr on clean exit",{stderr:he})),v.current===L&&(oe.length>0&&I(oe.join(`
4
4
  `)),f(!1),ae("runner","Event stream ended"),v.current=null)})().catch(te=>{let q=[`Runner event loop error: ${te}`];L.exitCode!==null&&L.exitCode!==0&&q.push(`Exit code: ${L.exitCode}`),L.exitSignal&&q.push(`Signal: ${L.exitSignal}`),L.stderr&&q.push(L.stderr),v.current===L&&(I(q.join(`
5
5
  `)),f(!1),ae("runner","Event loop error"),v.current=null)})},[t,i,l,u]),n=(0,_.useCallback)(a=>{v.current?.sendUserResponse(a),E(null)},[]),p=(0,_.useCallback)(()=>{let a=v.current;a&&(a.sendCancel("user"),f(!1),E(null),setTimeout(()=>{v.current===a&&(ae("runner","User cancelled run"),v.current=null)},5e3))},[]);return(0,_.useEffect)(()=>()=>{re.current=!0,ae("runner","Component unmounted"),v.current=null},[]),{isRunning:S,steps:x,askingUser:D,lastRunEnd:P,runError:H,bifurcationInfo:M,cmInitCounts:V,replayInfo:W,maxSteps:ie,startRun:Y,sendAnswer:n,cancelRun:p}}function wt(t){let i=t.flatMap(f=>[f,...f.children??[]]),l=i.filter(f=>f.status==="passed").length,u=i.filter(f=>f.status==="failed").length,S=i.filter(f=>f.status==="passed"||f.status==="failed").length;return{passed:l,failed:u,total:S}}export{ft as a,bt as b,yt as c,kt as d,wt as e,Ge as f,Ke as g};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as A}from"./chunk-YCCUBQY4.js";import{a as _}from"./chunk-THNGNS36.js";import{a as B}from"./chunk-TK7ZJ7YX.js";import{a as R}from"./chunk-HJ3CHMEM.js";import{a as P}from"./chunk-HCBYKLMW.js";import{t as c}from"./chunk-3ELBJPHQ.js";import{a as u,b as l}from"./chunk-C44QQJR4.js";import{a as J}from"./chunk-6YGTRKDT.js";import{a as k}from"./chunk-YUUZDFT7.js";import{e as L}from"./chunk-UR6MHSHU.js";var t=L(J(),1);var e=L(P(),1);function X(n,s,y,m){return{id:n,label:`${s} (${n}) \xB7 ${y} tests`,isActive:n===m}}function W({resolver:n,projectId:s,currentFolderId:y,env:m,onSelect:x,onCancel:w}){let[I,M]=(0,t.useState)([]),[$,d]=(0,t.useState)(!0),[O,g]=(0,t.useState)(!1),[U,N]=(0,t.useState)(null),[p,b]=(0,t.useState)("list"),[S,v]=(0,t.useState)(""),[E,f]=(0,t.useState)(null),h=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(!n){N("Login first to browse folders"),d(!1);return}let o=new AbortController;return d(!0),g(!0),(async()=>{try{let r=n.cached??await n.resolve();if(!r){N("Login first to browse folders"),d(!1),g(!1);return}let a=B(m),T=new k(a.tmsBaseUrl,r.username,r.access_key),F=(async function*(){if(o.signal.aborted)return;let i=await T.listFolders(s);yield{page:1,folders:i,totalLoaded:i.length,done:!0}})();for await(let i of F){if(d(!1),i.totalLoaded===0){h.current=!0,b("naming"),g(!1);return}M(i.folders.map(C=>X(C.id,C.name,C.test_cases_count,y))),i.done&&g(!1)}}catch(r){if(r?.name==="AbortError")return;N(r instanceof Error?r.message:String(r)),d(!1),g(!1)}})(),()=>o.abort()},[n,s,y,m]);let D=(0,t.useCallback)(o=>{let r=o.trim();if(!r){f("Name cannot be empty");return}if(!s){f("No project selected \u2014 pick a project first");return}f(null),b("creating"),(async()=>{try{if(!n)throw new Error("Not authenticated");let a=n.cached??await n.resolve();if(!a)throw new Error("Not authenticated");let T=B(m),i=await new k(T.tmsBaseUrl,a.username,a.access_key).createFolder(s,r);x(i.id,i.name)}catch(a){f(a instanceof Error?a.message:String(a)),b("naming")}})()},[n,s,m,x]),H=(0,t.useCallback)(()=>{v(""),f(null),h.current?w():b("list")},[w]);return p==="naming"||p==="creating"?(0,e.jsxs)(u,{flexDirection:"column",borderStyle:"round",borderColor:c.primary,paddingX:2,paddingY:1,children:[(0,e.jsx)(l,{color:c.primary,bold:!0,children:"Create new folder"}),h.current&&(0,e.jsx)(u,{marginTop:1,children:(0,e.jsx)(l,{color:c.dim,children:"No folders yet \u2014 let's create one."})}),(0,e.jsxs)(u,{marginTop:1,children:[(0,e.jsx)(l,{color:c.dim,children:"Name: "}),p==="naming"?(0,e.jsx)(A,{value:S,onChange:o=>{v(o),E&&f(null)},onSubmit:D,onCancel:H}):(0,e.jsx)(l,{children:S})]}),E&&(0,e.jsx)(u,{marginTop:1,children:(0,e.jsx)(l,{color:c.red,children:E})}),p==="creating"&&(0,e.jsx)(u,{marginTop:1,children:(0,e.jsx)(l,{color:c.dim,children:"Creating..."})}),p==="naming"&&(0,e.jsx)(R,{bindings:[{keys:"\u21B5",label:"create"}],escBackLabel:h.current?"cancel":"back"})]}):(0,e.jsx)(_,{title:"Folders",items:I,loading:$,loadingMore:O,preserveSelectionById:!0,error:U,itemNoun:"folders",onTab:()=>{h.current=!1,b("naming")},extraHint:"tab to create new",onSelect:o=>{let r=o.label.split(" (")[0];x(o.id,r)},onCancel:w})}export{X as a,W as b};
2
+ import{a as A}from"./chunk-YCCUBQY4.js";import{a as _}from"./chunk-7ECMUWV2.js";import{a as B}from"./chunk-PAQGYV5G.js";import{a as R}from"./chunk-XK33C64U.js";import{a as P}from"./chunk-HCBYKLMW.js";import{t as c}from"./chunk-2FCAWRCU.js";import{a as u,b as l}from"./chunk-C44QQJR4.js";import{a as J}from"./chunk-6YGTRKDT.js";import{a as k}from"./chunk-YZTCCQHR.js";import{e as L}from"./chunk-UR6MHSHU.js";var t=L(J(),1);var e=L(P(),1);function X(n,s,y,m){return{id:n,label:`${s} (${n}) \xB7 ${y} tests`,isActive:n===m}}function W({resolver:n,projectId:s,currentFolderId:y,env:m,onSelect:x,onCancel:w}){let[I,M]=(0,t.useState)([]),[$,d]=(0,t.useState)(!0),[O,g]=(0,t.useState)(!1),[U,N]=(0,t.useState)(null),[p,b]=(0,t.useState)("list"),[S,v]=(0,t.useState)(""),[E,f]=(0,t.useState)(null),h=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(!n){N("Login first to browse folders"),d(!1);return}let o=new AbortController;return d(!0),g(!0),(async()=>{try{let r=n.cached??await n.resolve();if(!r){N("Login first to browse folders"),d(!1),g(!1);return}let a=B(m),T=new k(a.tmsBaseUrl,r.username,r.access_key),F=(async function*(){if(o.signal.aborted)return;let i=await T.listFolders(s);yield{page:1,folders:i,totalLoaded:i.length,done:!0}})();for await(let i of F){if(d(!1),i.totalLoaded===0){h.current=!0,b("naming"),g(!1);return}M(i.folders.map(C=>X(C.id,C.name,C.test_cases_count,y))),i.done&&g(!1)}}catch(r){if(r?.name==="AbortError")return;N(r instanceof Error?r.message:String(r)),d(!1),g(!1)}})(),()=>o.abort()},[n,s,y,m]);let D=(0,t.useCallback)(o=>{let r=o.trim();if(!r){f("Name cannot be empty");return}if(!s){f("No project selected \u2014 pick a project first");return}f(null),b("creating"),(async()=>{try{if(!n)throw new Error("Not authenticated");let a=n.cached??await n.resolve();if(!a)throw new Error("Not authenticated");let T=B(m),i=await new k(T.tmsBaseUrl,a.username,a.access_key).createFolder(s,r);x(i.id,i.name)}catch(a){f(a instanceof Error?a.message:String(a)),b("naming")}})()},[n,s,m,x]),H=(0,t.useCallback)(()=>{v(""),f(null),h.current?w():b("list")},[w]);return p==="naming"||p==="creating"?(0,e.jsxs)(u,{flexDirection:"column",borderStyle:"round",borderColor:c.primary,paddingX:2,paddingY:1,children:[(0,e.jsx)(l,{color:c.primary,bold:!0,children:"Create new folder"}),h.current&&(0,e.jsx)(u,{marginTop:1,children:(0,e.jsx)(l,{color:c.dim,children:"No folders yet \u2014 let's create one."})}),(0,e.jsxs)(u,{marginTop:1,children:[(0,e.jsx)(l,{color:c.dim,children:"Name: "}),p==="naming"?(0,e.jsx)(A,{value:S,onChange:o=>{v(o),E&&f(null)},onSubmit:D,onCancel:H}):(0,e.jsx)(l,{children:S})]}),E&&(0,e.jsx)(u,{marginTop:1,children:(0,e.jsx)(l,{color:c.red,children:E})}),p==="creating"&&(0,e.jsx)(u,{marginTop:1,children:(0,e.jsx)(l,{color:c.dim,children:"Creating..."})}),p==="naming"&&(0,e.jsx)(R,{bindings:[{keys:"\u21B5",label:"create"}],escBackLabel:h.current?"cancel":"back"})]}):(0,e.jsx)(_,{title:"Folders",items:I,loading:$,loadingMore:O,preserveSelectionById:!0,error:U,itemNoun:"folders",onTab:()=>{h.current=!1,b("naming")},extraHint:"tab to create new",onSelect:o=>{let r=o.label.split(" (")[0];x(o.id,r)},onCancel:w})}export{X as a,W as b};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as h}from"./chunk-HJ3CHMEM.js";import{a as A}from"./chunk-HCBYKLMW.js";import{t as a}from"./chunk-3ELBJPHQ.js";import{a as c,b as f,i as P}from"./chunk-C44QQJR4.js";import{a as y}from"./chunk-6YGTRKDT.js";import{e as x}from"./chunk-UR6MHSHU.js";var L=x(y(),1);var r=x(A(),1);function B(i,d,l,u,p){let g=l==="basic"&&u?`basic (${u})`:l,n=20,s=`${i} [${d}]`,m="\xB7".repeat(Math.max(2,n-s.length+3));return{label:`${s} ${m} ${g}`,profile:i,env:d,isActive:p}}function I({creds:i,onSwitch:d,onCancel:l}){let u=i.listProfiles(),p=i.getActiveProfile(),g=i.getDefaultEnv(),n=u.map(e=>{let t=i.loadBasicAuth(e.profile,e.env),o=i.loadCredentials(e.profile,e.env)!==null,v=t?"basic":o?"oauth":"none",b=t?t.username:null,w=e.profile===p&&e.env===g;return B(e.profile,e.env,v,b,w)}),[s,m]=(0,L.useState)(()=>{let e=n.findIndex(t=>t.isActive);return e>=0?e:0});return P((e,t)=>{if(t.escape){l();return}if(t.upArrow){m(o=>Math.max(0,o-1));return}if(t.downArrow){m(o=>Math.min(n.length-1,o+1));return}if(t.return&&n[s]){let o=n[s];o.isActive||d(o.profile,o.env),l();return}}),n.length===0?(0,r.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:a.primary,paddingX:2,paddingY:1,children:[(0,r.jsx)(f,{color:a.primary,bold:!0,children:"Profiles"}),(0,r.jsx)(c,{marginTop:1,children:(0,r.jsx)(f,{color:a.dim,children:"No profiles \u2014 use Login to create one"})}),(0,r.jsx)(h,{bindings:[],escBackLabel:"back"})]}):(0,r.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:a.primary,paddingX:2,paddingY:1,children:[(0,r.jsx)(f,{color:a.primary,bold:!0,children:"Profiles"}),(0,r.jsx)(c,{flexDirection:"column",marginTop:1,children:n.map((e,t)=>{let o=t===s,v=o?"\u276F ":" ",b=e.isActive?a.statusPass:o?a.primary:void 0;return(0,r.jsxs)(f,{color:b,children:[v,e.label,e.isActive?" \u25CF active":""]},`${e.profile}-${e.env}`)})}),(0,r.jsx)(h,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"switch"}],escBackLabel:"back"})]})}export{B as a,I as b};
2
+ import{a as h}from"./chunk-XK33C64U.js";import{a as A}from"./chunk-HCBYKLMW.js";import{t as a}from"./chunk-2FCAWRCU.js";import{a as c,b as f,i as P}from"./chunk-C44QQJR4.js";import{a as y}from"./chunk-6YGTRKDT.js";import{e as x}from"./chunk-UR6MHSHU.js";var L=x(y(),1);var r=x(A(),1);function B(i,d,l,u,p){let g=l==="basic"&&u?`basic (${u})`:l,n=20,s=`${i} [${d}]`,m="\xB7".repeat(Math.max(2,n-s.length+3));return{label:`${s} ${m} ${g}`,profile:i,env:d,isActive:p}}function I({creds:i,onSwitch:d,onCancel:l}){let u=i.listProfiles(),p=i.getActiveProfile(),g=i.getDefaultEnv(),n=u.map(e=>{let t=i.loadBasicAuth(e.profile,e.env),o=i.loadCredentials(e.profile,e.env)!==null,v=t?"basic":o?"oauth":"none",b=t?t.username:null,w=e.profile===p&&e.env===g;return B(e.profile,e.env,v,b,w)}),[s,m]=(0,L.useState)(()=>{let e=n.findIndex(t=>t.isActive);return e>=0?e:0});return P((e,t)=>{if(t.escape){l();return}if(t.upArrow){m(o=>Math.max(0,o-1));return}if(t.downArrow){m(o=>Math.min(n.length-1,o+1));return}if(t.return&&n[s]){let o=n[s];o.isActive||d(o.profile,o.env),l();return}}),n.length===0?(0,r.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:a.primary,paddingX:2,paddingY:1,children:[(0,r.jsx)(f,{color:a.primary,bold:!0,children:"Profiles"}),(0,r.jsx)(c,{marginTop:1,children:(0,r.jsx)(f,{color:a.dim,children:"No profiles \u2014 use Login to create one"})}),(0,r.jsx)(h,{bindings:[],escBackLabel:"back"})]}):(0,r.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:a.primary,paddingX:2,paddingY:1,children:[(0,r.jsx)(f,{color:a.primary,bold:!0,children:"Profiles"}),(0,r.jsx)(c,{flexDirection:"column",marginTop:1,children:n.map((e,t)=>{let o=t===s,v=o?"\u276F ":" ",b=e.isActive?a.statusPass:o?a.primary:void 0;return(0,r.jsxs)(f,{color:b,children:[v,e.label,e.isActive?" \u25CF active":""]},`${e.profile}-${e.env}`)})}),(0,r.jsx)(h,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"switch"}],escBackLabel:"back"})]})}export{B as a,I as b};