diff --git a/lib/index.js b/lib/index.js index 1fbeb29..863d609 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1 +1,11434 @@ -module.exports=(()=>{var e={7351:function(e,r,n){"use strict";var t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))r[n]=e[n];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const o=t(n(2087));const s=n(5278);function issueCommand(e,r,n){const t=new Command(e,r,n);process.stdout.write(t.toString()+o.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const i="::";class Command{constructor(e,r,n){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=n}toString(){let e=i+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const t=this.properties[n];if(t){if(r){r=false}else{e+=","}e+=`${n}=${escapeProperty(t)}`}}}}e+=`${i}${escapeData(this.message)}`;return e}}function escapeData(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,r,n){"use strict";var t=this&&this.__awaiter||function(e,r,n,t){function adopt(e){return e instanceof n?e:new n(function(r){r(e)})}return new(n||(n=Promise))(function(n,o){function fulfilled(e){try{step(t.next(e))}catch(e){o(e)}}function rejected(e){try{step(t["throw"](e))}catch(e){o(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((t=t.apply(e,r||[])).next())})};var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))r[n]=e[n];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const s=n(7351);const i=n(717);const u=n(5278);const c=o(n(2087));const a=o(n(5622));var f;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(f=r.ExitCode||(r.ExitCode={}));function exportVariable(e,r){const n=u.toCommandValue(r);process.env[e]=n;const t=process.env["GITHUB_ENV"]||"";if(t){const r="_GitHubActionsFileCommandDelimeter_";const t=`${e}<<${r}${c.EOL}${n}${c.EOL}${r}`;i.issueCommand("ENV",t)}else{s.issueCommand("set-env",{name:e},n)}}r.exportVariable=exportVariable;function setSecret(e){s.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){const r=process.env["GITHUB_PATH"]||"";if(r){i.issueCommand("PATH",e)}else{s.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${a.delimiter}${process.env["PATH"]}`}r.addPath=addPath;function getInput(e,r){const n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(r&&r.required&&!n){throw new Error(`Input required and not supplied: ${e}`)}return n.trim()}r.getInput=getInput;function setOutput(e,r){process.stdout.write(c.EOL);s.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setCommandEcho(e){s.issue("echo",e?"on":"off")}r.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=f.Failure;error(e)}r.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}r.isDebug=isDebug;function debug(e){s.issueCommand("debug",{},e)}r.debug=debug;function error(e){s.issue("error",e instanceof Error?e.toString():e)}r.error=error;function warning(e){s.issue("warning",e instanceof Error?e.toString():e)}r.warning=warning;function info(e){process.stdout.write(e+c.EOL)}r.info=info;function startGroup(e){s.issue("group",e)}r.startGroup=startGroup;function endGroup(){s.issue("endgroup")}r.endGroup=endGroup;function group(e,r){return t(this,void 0,void 0,function*(){startGroup(e);let n;try{n=yield r()}finally{endGroup()}return n})}r.group=group;function saveState(e,r){s.issueCommand("save-state",{name:e},r)}r.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}r.getState=getState},717:function(e,r,n){"use strict";var t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))r[n]=e[n];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const o=t(n(5747));const s=t(n(2087));const i=n(5278);function issueCommand(e,r){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}o.appendFileSync(n,`${i.toCommandValue(r)}${s.EOL}`,{encoding:"utf8"})}r.issueCommand=issueCommand},5278:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}r.toCommandValue=toCommandValue},4751:(e,r,n)=>{"use strict";function __export(e){for(var n in e)if(!r.hasOwnProperty(n))r[n]=e[n]}Object.defineProperty(r,"__esModule",{value:true});__export(n(2825))},2825:function(e,r,n){"use strict";var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});const o=n(5747);const s=t(n(8231));const i=s.default("@kwsites/file-exists");function check(e,r,n){i(`checking %s`,e);try{const t=o.statSync(e);if(t.isFile()&&r){i(`[OK] path represents a file`);return true}if(t.isDirectory()&&n){i(`[OK] path represents a directory`);return true}i(`[FAIL] path represents something other than a file or directory`);return false}catch(e){if(e.code==="ENOENT"){i(`[FAIL] path is not accessible: %o`,e);return false}i(`[FATAL] %o`,e);throw e}}function exists(e,n=r.READABLE){return check(e,(n&r.FILE)>0,(n&r.FOLDER)>0)}r.exists=exists;r.FILE=1;r.FOLDER=2;r.READABLE=r.FILE+r.FOLDER},9819:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createDeferred=r.deferred=void 0;function deferred(){let e;let r;let n="pending";const t=new Promise((n,t)=>{e=n;r=t});return{promise:t,done(r){if(n==="pending"){n="resolved";e(r)}},fail(e){if(n==="pending"){n="rejected";r(e)}},get fulfilled(){return n!=="pending"},get status(){return n}}}r.deferred=deferred;r.createDeferred=deferred;r.default=deferred},8222:(e,r,n)=>{r.log=log;r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.storage=localstorage();r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(r){r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;r.splice(1,0,n,"color: inherit");let t=0;let o=0;r[0].replace(/%[a-zA-Z%]/g,e=>{if(e==="%%"){return}t++;if(e==="%c"){o=t}});r.splice(o,0,n)}function log(...e){return typeof console==="object"&&console.log&&console.log(...e)}function save(e){try{if(e){r.storage.setItem("debug",e)}else{r.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=r.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=n(6243)(r);const{formatters:t}=e.exports;t.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},6243:(e,r,n)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(900);Object.keys(e).forEach(r=>{createDebug[r]=e[r]});createDebug.instances=[];createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let r=0;for(let n=0;n{if(r==="%%"){return r}s++;const o=createDebug.formatters[t];if(typeof o==="function"){const t=e[s];r=o.call(n,t);e.splice(s,1);s--}return r});createDebug.formatArgs.call(n,e);const i=n.log||createDebug.log;i.apply(n,e)}debug.namespace=e;debug.enabled=createDebug.enabled(e);debug.useColors=createDebug.useColors();debug.color=selectColor(e);debug.destroy=destroy;debug.extend=extend;if(typeof createDebug.init==="function"){createDebug.init(debug)}createDebug.instances.push(debug);return debug}function destroy(){const e=createDebug.instances.indexOf(this);if(e!==-1){createDebug.instances.splice(e,1);return true}return false}function extend(e,r){const n=createDebug(this.namespace+(typeof r==="undefined"?":":r)+e);n.log=this.log;return n}function enable(e){createDebug.save(e);createDebug.names=[];createDebug.skips=[];let r;const n=(typeof e==="string"?e:"").split(/[\s,]+/);const t=n.length;for(r=0;r"-"+e)].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let r;let n;for(r=0,n=createDebug.skips.length;r{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=n(8222)}else{e.exports=n(5332)}},5332:(e,r,n)=>{const t=n(3867);const o=n(1669);r.init=init;r.log=log;r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.colors=[6,2,3,4,5,1];try{const e=n(9318);if(e&&(e.stderr||e).level>=2){r.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}r.inspectOpts=Object.keys(process.env).filter(e=>{return/^debug_/i.test(e)}).reduce((e,r)=>{const n=r.substring(6).toLowerCase().replace(/_([a-z])/g,(e,r)=>{return r.toUpperCase()});let t=process.env[r];if(/^(yes|on|true|enabled)$/i.test(t)){t=true}else if(/^(no|off|false|disabled)$/i.test(t)){t=false}else if(t==="null"){t=null}else{t=Number(t)}e[n]=t;return e},{});function useColors(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):t.isatty(process.stderr.fd)}function formatArgs(r){const{namespace:n,useColors:t}=this;if(t){const t=this.color;const o="[3"+(t<8?t:"8;5;"+t);const s=` ${o};1m${n} `;r[0]=s+r[0].split("\n").join("\n"+s);r.push(o+"m+"+e.exports.humanize(this.diff)+"")}else{r[0]=getDate()+n+" "+r[0]}}function getDate(){if(r.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(o.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const n=Object.keys(r.inspectOpts);for(let t=0;t{"use strict";e.exports=((e,r=process.argv)=>{const n=e.startsWith("-")?"":e.length===1?"-":"--";const t=r.indexOf(n+e);const o=r.indexOf("--");return t!==-1&&(o===-1||t{"use strict";var t=n(1161);var o=n(8866);function renamed(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. "+"Use yaml."+r+" instead, which is now safe by default.")}}e.exports.Type=n(6073);e.exports.Schema=n(1082);e.exports.FAILSAFE_SCHEMA=n(8562);e.exports.JSON_SCHEMA=n(1035);e.exports.CORE_SCHEMA=n(2011);e.exports.DEFAULT_SCHEMA=n(8759);e.exports.load=t.load;e.exports.loadAll=t.loadAll;e.exports.dump=o.dump;e.exports.YAMLException=n(8179);e.exports.safeLoad=renamed("safeLoad","load");e.exports.safeLoadAll=renamed("safeLoadAll","loadAll");e.exports.safeDump=renamed("safeDump","dump")},6829:e=>{"use strict";function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,r){var n,t,o,s;if(r){s=Object.keys(r);for(n=0,t=s.length;n{"use strict";var t=n(6829);var o=n(8179);var s=n(8759);var i=Object.prototype.toString;var u=Object.prototype.hasOwnProperty;var c=65279;var a=9;var f=10;var l=13;var p=32;var h=33;var d=34;var g=35;var m=37;var b=38;var v=39;var C=42;var O=44;var T=45;var y=58;var E=61;var S=62;var k=63;var A=64;var w=91;var D=93;var F=96;var R=123;var M=124;var P=125;var j={};j[0]="\\0";j[7]="\\a";j[8]="\\b";j[9]="\\t";j[10]="\\n";j[11]="\\v";j[12]="\\f";j[13]="\\r";j[27]="\\e";j[34]='\\"';j[92]="\\\\";j[133]="\\N";j[160]="\\_";j[8232]="\\L";j[8233]="\\P";var L=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var I=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(e,r){var n,t,o,s,i,c,a;if(r===null)return{};n={};t=Object.keys(r);for(o=0,s=t.length;o=55296&&n<=56319&&r+1=56320&&t<=57343){return(n-55296)*1024+t-56320+65536}}return n}function needIndentIndicator(e){var r=/^\n* /;return r.test(e)}var N=1,$=2,x=3,U=4,Y=5;function chooseScalarStyle(e,r,n,t,o,s,i,u){var c;var a=0;var l=null;var p=false;var h=false;var d=t!==-1;var g=-1;var m=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(r||i){for(c=0;c=65536?c+=2:c++){a=codePointAt(e,c);if(!isPrintable(a)){return Y}m=m&&isPlainSafe(a,l,u);l=a}}else{for(c=0;c=65536?c+=2:c++){a=codePointAt(e,c);if(a===f){p=true;if(d){h=h||c-g-1>t&&e[g+1]!==" ";g=c}}else if(!isPrintable(a)){return Y}m=m&&isPlainSafe(a,l,u);l=a}h=h||d&&(c-g-1>t&&e[g+1]!==" ")}if(!p&&!h){if(m&&!i&&!o(e)){return N}return s===B?Y:$}if(n>9&&needIndentIndicator(e)){return Y}if(!i){return h?U:x}return s===B?Y:$}function writeScalar(e,r,n,t,s){e.dump=function(){if(r.length===0){return e.quotingType===B?'""':"''"}if(!e.noCompatMode){if(L.indexOf(r)!==-1||I.test(r)){return e.quotingType===B?'"'+r+'"':"'"+r+"'"}}var i=e.indent*Math.max(1,n);var u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i);var c=t||e.flowLevel>-1&&n>=e.flowLevel;function testAmbiguity(r){return testImplicitResolving(e,r)}switch(chooseScalarStyle(r,c,e.indent,u,testAmbiguity,e.quotingType,e.forceQuotes&&!t,s)){case N:return r;case $:return"'"+r.replace(/'/g,"''")+"'";case x:return"|"+blockHeader(r,e.indent)+dropEndingNewline(indentString(r,i));case U:return">"+blockHeader(r,e.indent)+dropEndingNewline(indentString(foldString(r,u),i));case Y:return'"'+escapeString(r,u)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function blockHeader(e,r){var n=needIndentIndicator(e)?String(r):"";var t=e[e.length-1]==="\n";var o=t&&(e[e.length-2]==="\n"||e==="\n");var s=o?"+":t?"":"-";return n+s+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,r){var n=/(\n+)([^\n]*)/g;var t=function(){var t=e.indexOf("\n");t=t!==-1?t:e.length;n.lastIndex=t;return foldLine(e.slice(0,t),r)}();var o=e[0]==="\n"||e[0]===" ";var s;var i;while(i=n.exec(e)){var u=i[1],c=i[2];s=c[0]===" ";t+=u+(!o&&!s&&c!==""?"\n":"")+foldLine(c,r);o=s}return t}function foldLine(e,r){if(e===""||e[0]===" ")return e;var n=/ [^ ]/g;var t;var o=0,s,i=0,u=0;var c="";while(t=n.exec(e)){u=t.index;if(u-o>r){s=i>o?i:u;c+="\n"+e.slice(o,s);o=s+1}i=u}c+="\n";if(e.length-o>r&&i>o){c+=e.slice(o,i)+"\n"+e.slice(i+1)}else{c+=e.slice(o)}return c.slice(1)}function escapeString(e){var r="";var n=0;var t;for(var o=0;o=65536?o+=2:o++){n=codePointAt(e,o);t=j[n];if(!t&&isPrintable(n)){r+=e[o];if(n>=65536)r+=e[o+1]}else{r+=t||encodeHex(n)}}return r}function writeFlowSequence(e,r,n){var t="",o=e.tag,s,i,u;for(s=0,i=n.length;s1024)f+="? ";f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,r,a,false,false)){continue}f+=e.dump;t+=f}e.tag=o;e.dump="{"+t+"}"}function writeBlockMapping(e,r,n,t){var s="",i=e.tag,u=Object.keys(n),c,a,l,p,h,d;if(e.sortKeys===true){u.sort()}else if(typeof e.sortKeys==="function"){u.sort(e.sortKeys)}else if(e.sortKeys){throw new o("sortKeys must be a boolean or a function")}for(c=0,a=u.length;c1024;if(h){if(e.dump&&f===e.dump.charCodeAt(0)){d+="?"}else{d+="? "}}d+=e.dump;if(h){d+=generateNextLine(e,r)}if(!writeNode(e,r+1,p,true,h)){continue}if(e.dump&&f===e.dump.charCodeAt(0)){d+=":"}else{d+=": "}d+=e.dump;s+=d}e.tag=i;e.dump=s||"{}"}function detectType(e,r,n){var t,s,c,a,f,l;s=n?e.explicitTypes:e.implicitTypes;for(c=0,a=s.length;c tag resolver accepts not "'+l+'" style')}e.dump=t}return true}}return false}function writeNode(e,r,n,t,s,u,c){e.tag=null;e.dump=n;if(!detectType(e,n,false)){detectType(e,n,true)}var a=i.call(e.dump);var f=t;var l;if(t){t=e.flowLevel<0||e.flowLevel>r}var p=a==="[object Object]"||a==="[object Array]",h,d;if(p){h=e.duplicates.indexOf(n);d=h!==-1}if(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&r>0){s=false}if(d&&e.usedDuplicates[h]){e.dump="*ref_"+h}else{if(p&&d&&!e.usedDuplicates[h]){e.usedDuplicates[h]=true}if(a==="[object Object]"){if(t&&Object.keys(e.dump).length!==0){writeBlockMapping(e,r,e.dump,s);if(d){e.dump="&ref_"+h+e.dump}}else{writeFlowMapping(e,r,e.dump);if(d){e.dump="&ref_"+h+" "+e.dump}}}else if(a==="[object Array]"){if(t&&e.dump.length!==0){if(e.noArrayIndent&&!c&&r>0){writeBlockSequence(e,r-1,e.dump,s)}else{writeBlockSequence(e,r,e.dump,s)}if(d){e.dump="&ref_"+h+e.dump}}else{writeFlowSequence(e,r,e.dump);if(d){e.dump="&ref_"+h+" "+e.dump}}}else if(a==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,r,u,f)}}else if(a==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new o("unacceptable kind of an object to dump "+a)}if(e.tag!==null&&e.tag!=="?"){l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){l="!"+l}else if(l.slice(0,18)==="tag:yaml.org,2002:"){l="!!"+l.slice(18)}else{l="!<"+l+">"}e.dump=l+" "+e.dump}}return true}function getDuplicateReferences(e,r){var n=[],t=[],o,s;inspectNode(e,n,t);for(o=0,s=t.length;o{"use strict";function formatError(e,r){var n="",t=e.reason||"(unknown reason)";if(!e.mark)return t;if(e.mark.name){n+='in "'+e.mark.name+'" '}n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")";if(!r&&e.mark.snippet){n+="\n\n"+e.mark.snippet}return t+" "+n}function YAMLException(e,r){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=r;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(e){return this.name+": "+formatError(this,e)};e.exports=YAMLException},1161:(e,r,n)=>{"use strict";var t=n(6829);var o=n(8179);var s=n(6975);var i=n(8759);var u=Object.prototype.hasOwnProperty;var c=1;var a=2;var f=3;var l=4;var p=1;var h=2;var d=3;var g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var m=/[\x85\u2028\u2029]/;var b=/[,\[\]\{\}]/;var v=/^(?:!|!!|![a-z\-]+!)$/i;var C=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return e===10||e===13}function is_WHITE_SPACE(e){return e===9||e===32}function is_WS_OR_EOL(e){return e===9||e===32||e===10||e===13}function is_FLOW_INDICATOR(e){return e===44||e===91||e===93||e===123||e===125}function fromHexCode(e){var r;if(48<=e&&e<=57){return e-48}r=e|32;if(97<=r&&r<=102){return r-97+10}return-1}function escapedHexLen(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}function fromDecimalCode(e){if(48<=e&&e<=57){return e-48}return-1}function simpleEscapeSequence(e){return e===48?"\0":e===97?"":e===98?"\b":e===116?"\t":e===9?"\t":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function charFromCodepoint(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var O=new Array(256);var T=new Array(256);for(var y=0;y<256;y++){O[y]=simpleEscapeSequence(y)?1:0;T[y]=simpleEscapeSequence(y)}function State(e,r){this.input=e;this.filename=r["filename"]||null;this.schema=r["schema"]||i;this.onWarning=r["onWarning"]||null;this.legacy=r["legacy"]||false;this.json=r["json"]||false;this.listener=r["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 generateError(e,r){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};n.snippet=s(n);return new o(r,n)}function throwError(e,r){throw generateError(e,r)}function throwWarning(e,r){if(e.onWarning){e.onWarning.call(null,generateError(e,r))}}var E={YAML:function handleYamlDirective(e,r,n){var t,o,s;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(n.length!==1){throwError(e,"YAML directive accepts exactly one argument")}t=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);if(t===null){throwError(e,"ill-formed argument of the YAML directive")}o=parseInt(t[1],10);s=parseInt(t[2],10);if(o!==1){throwError(e,"unacceptable YAML version of the document")}e.version=n[0];e.checkLineBreaks=s<2;if(s!==1&&s!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,r,n){var t,o;if(n.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}t=n[0];o=n[1];if(!v.test(t)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(u.call(e.tagMap,t)){throwError(e,'there is a previously declared suffix for "'+t+'" tag handle')}if(!C.test(o)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}try{o=decodeURIComponent(o)}catch(r){throwError(e,"tag prefix is malformed: "+o)}e.tagMap[t]=o}};function captureSegment(e,r,n,t){var o,s,i,u;if(r1){e.result+=t.repeat("\n",r-1)}}function readPlainScalar(e,r,n){var t,o,s,i,u,c,a,f,l=e.kind,p=e.result,h;h=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(h)||is_FLOW_INDICATOR(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96){return false}if(h===63||h===45){o=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(o)||n&&is_FLOW_INDICATOR(o)){return false}}e.kind="scalar";e.result="";s=i=e.position;u=false;while(h!==0){if(h===58){o=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(o)||n&&is_FLOW_INDICATOR(o)){break}}else if(h===35){t=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(t)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||n&&is_FLOW_INDICATOR(h)){break}else if(is_EOL(h)){c=e.line;a=e.lineStart;f=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=r){u=true;h=e.input.charCodeAt(e.position);continue}else{e.position=i;e.line=c;e.lineStart=a;e.lineIndent=f;break}}if(u){captureSegment(e,s,i,false);writeFoldedLines(e,e.line-c);s=i=e.position;u=false}if(!is_WHITE_SPACE(h)){i=e.position+1}h=e.input.charCodeAt(++e.position)}captureSegment(e,s,i,false);if(e.result){return true}e.kind=l;e.result=p;return false}function readSingleQuotedScalar(e,r){var n,t,o;n=e.input.charCodeAt(e.position);if(n!==39){return false}e.kind="scalar";e.result="";e.position++;t=o=e.position;while((n=e.input.charCodeAt(e.position))!==0){if(n===39){captureSegment(e,t,e.position,true);n=e.input.charCodeAt(++e.position);if(n===39){t=e.position;e.position++;o=e.position}else{return true}}else if(is_EOL(n)){captureSegment(e,t,o,true);writeFoldedLines(e,skipSeparationSpace(e,false,r));t=o=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;o=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,r){var n,t,o,s,i,u;u=e.input.charCodeAt(e.position);if(u!==34){return false}e.kind="scalar";e.result="";e.position++;n=t=e.position;while((u=e.input.charCodeAt(e.position))!==0){if(u===34){captureSegment(e,n,e.position,true);e.position++;return true}else if(u===92){captureSegment(e,n,e.position,true);u=e.input.charCodeAt(++e.position);if(is_EOL(u)){skipSeparationSpace(e,false,r)}else if(u<256&&O[u]){e.result+=T[u];e.position++}else if((i=escapedHexLen(u))>0){o=i;s=0;for(;o>0;o--){u=e.input.charCodeAt(++e.position);if((i=fromHexCode(u))>=0){s=(s<<4)+i}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(s);e.position++}else{throwError(e,"unknown escape sequence")}n=t=e.position}else if(is_EOL(u)){captureSegment(e,n,t,true);writeFoldedLines(e,skipSeparationSpace(e,false,r));n=t=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;t=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,r){var n=true,t,o,s,i=e.tag,u,a=e.anchor,f,l,p,h,d,g=Object.create(null),m,b,v,C;C=e.input.charCodeAt(e.position);if(C===91){l=93;d=false;u=[]}else if(C===123){l=125;d=true;u={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=u}C=e.input.charCodeAt(++e.position);while(C!==0){skipSeparationSpace(e,true,r);C=e.input.charCodeAt(e.position);if(C===l){e.position++;e.tag=i;e.anchor=a;e.kind=d?"mapping":"sequence";e.result=u;return true}else if(!n){throwError(e,"missed comma between flow collection entries")}else if(C===44){throwError(e,"expected the node content, but found ','")}b=m=v=null;p=h=false;if(C===63){f=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(f)){p=h=true;e.position++;skipSeparationSpace(e,true,r)}}t=e.line;o=e.lineStart;s=e.position;composeNode(e,r,c,false,true);b=e.tag;m=e.result;skipSeparationSpace(e,true,r);C=e.input.charCodeAt(e.position);if((h||e.line===t)&&C===58){p=true;C=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,r);composeNode(e,r,c,false,true);v=e.result}if(d){storeMappingPair(e,u,g,b,m,v,t,o,s)}else if(p){u.push(storeMappingPair(e,null,g,b,m,v,t,o,s))}else{u.push(m)}skipSeparationSpace(e,true,r);C=e.input.charCodeAt(e.position);if(C===44){n=true;C=e.input.charCodeAt(++e.position)}else{n=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,r){var n,o,s=p,i=false,u=false,c=r,a=0,f=false,l,g;g=e.input.charCodeAt(e.position);if(g===124){o=false}else if(g===62){o=true}else{return false}e.kind="scalar";e.result="";while(g!==0){g=e.input.charCodeAt(++e.position);if(g===43||g===45){if(p===s){s=g===43?d:h}else{throwError(e,"repeat of a chomping mode identifier")}}else if((l=fromDecimalCode(g))>=0){if(l===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!u){c=r+l-1;u=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(g)){do{g=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(g));if(g===35){do{g=e.input.charCodeAt(++e.position)}while(!is_EOL(g)&&g!==0)}}while(g!==0){readLineBreak(e);e.lineIndent=0;g=e.input.charCodeAt(e.position);while((!u||e.lineIndentc){c=e.lineIndent}if(is_EOL(g)){a++;continue}if(e.lineIndentr)&&c!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentr){if(v){i=e.line;u=e.lineStart;c=e.position}if(composeNode(e,r,l,true,o)){if(v){m=e.result}else{b=e.result}}if(!v){storeMappingPair(e,h,d,g,m,b,i,u,c);g=m=b=null}skipSeparationSpace(e,true,-1);O=e.input.charCodeAt(e.position)}if((e.line===s||e.lineIndent>r)&&O!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentr){h=1}else if(e.lineIndent===r){h=0}else if(e.lineIndentr){h=1}else if(e.lineIndent===r){h=0}else if(e.lineIndent tag; it should be "scalar", not "'+e.kind+'"')}for(m=0,b=e.implicitTypes.length;m")}if(e.result!==null&&C.kind!==e.kind){throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+C.kind+'", not "'+e.kind+'"')}if(!C.resolve(e.result,e.tag)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=C.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||g}function readDocument(e){var r=e.position,n,t,o,s=false,i;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((i=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);i=e.input.charCodeAt(e.position);if(e.lineIndent>0||i!==37){break}s=true;i=e.input.charCodeAt(++e.position);n=e.position;while(i!==0&&!is_WS_OR_EOL(i)){i=e.input.charCodeAt(++e.position)}t=e.input.slice(n,e.position);o=[];if(t.length<1){throwError(e,"directive name must not be less than one character in length")}while(i!==0){while(is_WHITE_SPACE(i)){i=e.input.charCodeAt(++e.position)}if(i===35){do{i=e.input.charCodeAt(++e.position)}while(i!==0&&!is_EOL(i));break}if(is_EOL(i))break;n=e.position;while(i!==0&&!is_WS_OR_EOL(i)){i=e.input.charCodeAt(++e.position)}o.push(e.input.slice(n,e.position))}if(i!==0)readLineBreak(e);if(u.call(E,t)){E[t](e,t,o)}else{throwWarning(e,'unknown document directive "'+t+'"')}}skipSeparationSpace(e,true,-1);if(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;skipSeparationSpace(e,true,-1)}else if(s){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,l,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&m.test(e.input.slice(r,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position{"use strict";var t=n(8179);var o=n(6073);function compileList(e,r,n){var t=[];e[r].forEach(function(e){n.forEach(function(r,n){if(r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi){t.push(n)}});n.push(e)});return n.filter(function(e,r){return t.indexOf(r)===-1})}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,n;function collectType(r){if(r.multi){e.multi[r.kind].push(r);e.multi["fallback"].push(r)}else{e[r.kind][r.tag]=e["fallback"][r.tag]=r}}for(r=0,n=arguments.length;r{"use strict";e.exports=n(1035)},8759:(e,r,n)=>{"use strict";e.exports=n(2011).extend({implicit:[n(9212),n(6104)],explicit:[n(7900),n(9046),n(6860),n(9548)]})},8562:(e,r,n)=>{"use strict";var t=n(1082);e.exports=new t({explicit:[n(3619),n(7283),n(6150)]})},1035:(e,r,n)=>{"use strict";e.exports=n(8562).extend({implicit:[n(721),n(4993),n(1615),n(2705)]})},6975:(e,r,n)=>{"use strict";var t=n(6829);function getLine(e,r,n,t,o){var s="";var i="";var u=Math.floor(o/2)-1;if(t-r>u){s=" ... ";r=t-u+s.length}if(n-t>u){i=" ...";n=t+u-i.length}return{str:s+e.slice(r,n).replace(/\t/g,"→")+i,pos:t-r+s.length}}function padStart(e,r){return t.repeat(" ",r-e.length)+e}function makeSnippet(e,r){r=Object.create(r||null);if(!e.buffer)return null;if(!r.maxLength)r.maxLength=79;if(typeof r.indent!=="number")r.indent=1;if(typeof r.linesBefore!=="number")r.linesBefore=3;if(typeof r.linesAfter!=="number")r.linesAfter=2;var n=/\r?\n|\r|\0/g;var o=[0];var s=[];var i;var u=-1;while(i=n.exec(e.buffer)){s.push(i.index);o.push(i.index+i[0].length);if(e.position<=i.index&&u<0){u=o.length-2}}if(u<0)u=o.length-1;var c="",a,f;var l=Math.min(e.line+r.linesAfter,s.length).toString().length;var p=r.maxLength-(r.indent+l+3);for(a=1;a<=r.linesBefore;a++){if(u-a<0)break;f=getLine(e.buffer,o[u-a],s[u-a],e.position-(o[u]-o[u-a]),p);c=t.repeat(" ",r.indent)+padStart((e.line-a+1).toString(),l)+" | "+f.str+"\n"+c}f=getLine(e.buffer,o[u],s[u],e.position,p);c+=t.repeat(" ",r.indent)+padStart((e.line+1).toString(),l)+" | "+f.str+"\n";c+=t.repeat("-",r.indent+l+3+f.pos)+"^"+"\n";for(a=1;a<=r.linesAfter;a++){if(u+a>=s.length)break;f=getLine(e.buffer,o[u+a],s[u+a],e.position-(o[u]-o[u+a]),p);c+=t.repeat(" ",r.indent)+padStart((e.line+a+1).toString(),l)+" | "+f.str+"\n"}return c.replace(/\n$/,"")}e.exports=makeSnippet},6073:(e,r,n)=>{"use strict";var t=n(8179);var o=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var s=["scalar","sequence","mapping"];function compileStyleAliases(e){var r={};if(e!==null){Object.keys(e).forEach(function(n){e[n].forEach(function(e){r[String(e)]=n})})}return r}function Type(e,r){r=r||{};Object.keys(r).forEach(function(r){if(o.indexOf(r)===-1){throw new t('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}});this.tag=e;this.kind=r["kind"]||null;this.resolve=r["resolve"]||function(){return true};this.construct=r["construct"]||function(e){return e};this.instanceOf=r["instanceOf"]||null;this.predicate=r["predicate"]||null;this.represent=r["represent"]||null;this.representName=r["representName"]||null;this.defaultStyle=r["defaultStyle"]||null;this.multi=r["multi"]||false;this.styleAliases=compileStyleAliases(r["styleAliases"]||null);if(s.indexOf(this.kind)===-1){throw new t('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}e.exports=Type},7900:(e,r,n)=>{"use strict";var t=n(6073);var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var r,n,t=0,s=e.length,i=o;for(n=0;n64)continue;if(r<0)return false;t+=6}return t%8===0}function constructYamlBinary(e){var r,n,t=e.replace(/[\r\n=]/g,""),s=t.length,i=o,u=0,c=[];for(r=0;r>16&255);c.push(u>>8&255);c.push(u&255)}u=u<<6|i.indexOf(t.charAt(r))}n=s%4*6;if(n===0){c.push(u>>16&255);c.push(u>>8&255);c.push(u&255)}else if(n===18){c.push(u>>10&255);c.push(u>>2&255)}else if(n===12){c.push(u>>4&255)}return new Uint8Array(c)}function representYamlBinary(e){var r="",n=0,t,s,i=e.length,u=o;for(t=0;t>18&63];r+=u[n>>12&63];r+=u[n>>6&63];r+=u[n&63]}n=(n<<8)+e[t]}s=i%3;if(s===0){r+=u[n>>18&63];r+=u[n>>12&63];r+=u[n>>6&63];r+=u[n&63]}else if(s===2){r+=u[n>>10&63];r+=u[n>>4&63];r+=u[n<<2&63];r+=u[64]}else if(s===1){r+=u[n>>2&63];r+=u[n<<4&63];r+=u[64];r+=u[64]}return r}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}e.exports=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},4993:(e,r,n)=>{"use strict";var t=n(6073);function resolveYamlBoolean(e){if(e===null)return false;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function constructYamlBoolean(e){return e==="true"||e==="True"||e==="TRUE"}function isBoolean(e){return Object.prototype.toString.call(e)==="[object Boolean]"}e.exports=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},2705:(e,r,n)=>{"use strict";var t=n(6829);var o=n(6073);var s=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){if(e===null)return false;if(!s.test(e)||e[e.length-1]==="_"){return false}return true}function constructYamlFloat(e){var r,n;r=e.replace(/_/g,"").toLowerCase();n=r[0]==="-"?-1:1;if("+-".indexOf(r[0])>=0){r=r.slice(1)}if(r===".inf"){return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(r===".nan"){return NaN}return n*parseFloat(r,10)}var i=/^[-+]?[0-9]+e/;function representYamlFloat(e,r){var n;if(isNaN(e)){switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(t.isNegativeZero(e)){return"-0.0"}n=e.toString(10);return i.test(n)?n.replace("e",".e"):n}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||t.isNegativeZero(e))}e.exports=new o("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},1615:(e,r,n)=>{"use strict";var t=n(6829);var o=n(6073);function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(e===null)return false;var r=e.length,n=0,t=false,o;if(!r)return false;o=e[n];if(o==="-"||o==="+"){o=e[++n]}if(o==="0"){if(n+1===r)return true;o=e[++n];if(o==="b"){n++;for(;n=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"]}})},6150:(e,r,n)=>{"use strict";var t=n(6073);e.exports=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})},6104:(e,r,n)=>{"use strict";var t=n(6073);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},721:(e,r,n)=>{"use strict";var t=n(6073);function resolveYamlNull(e){if(e===null)return true;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function constructYamlNull(){return null}function isNull(e){return e===null}e.exports=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},9046:(e,r,n)=>{"use strict";var t=n(6073);var o=Object.prototype.hasOwnProperty;var s=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var r=[],n,t,i,u,c,a=e;for(n=0,t=a.length;n{"use strict";var t=n(6073);var o=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var r,n,t,s,i,u=e;i=new Array(u.length);for(r=0,n=u.length;r{"use strict";var t=n(6073);e.exports=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},9548:(e,r,n)=>{"use strict";var t=n(6073);var o=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var r,n=e;for(r in n){if(o.call(n,r)){if(n[r]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},3619:(e,r,n)=>{"use strict";var t=n(6073);e.exports=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})},9212:(e,r,n)=>{"use strict";var t=n(6073);var o=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var s=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 resolveYamlTimestamp(e){if(e===null)return false;if(o.exec(e)!==null)return true;if(s.exec(e)!==null)return true;return false}function constructYamlTimestamp(e){var r,n,t,i,u,c,a,f=0,l=null,p,h,d;r=o.exec(e);if(r===null)r=s.exec(e);if(r===null)throw new Error("Date resolve error");n=+r[1];t=+r[2]-1;i=+r[3];if(!r[4]){return new Date(Date.UTC(n,t,i))}u=+r[4];c=+r[5];a=+r[6];if(r[7]){f=r[7].slice(0,3);while(f.length<3){f+="0"}f=+f}if(r[9]){p=+r[10];h=+(r[11]||0);l=(p*60+h)*6e4;if(r[9]==="-")l=-l}d=new Date(Date.UTC(n,t,i,u,c,a,f));if(l)d.setTime(d.getTime()-l);return d}function representYamlTimestamp(e){return e.toISOString()}e.exports=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},900:e=>{var r=1e3;var n=r*60;var t=n*60;var o=t*24;var s=o*7;var i=o*365.25;e.exports=function(e,r){r=r||{};var n=typeof e;if(n==="string"&&e.length>0){return parse(e)}else if(n==="number"&&isFinite(e)){return r.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!u){return}var c=parseFloat(u[1]);var a=(u[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*t;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=o){return Math.round(e/o)+"d"}if(s>=t){return Math.round(e/t)+"h"}if(s>=n){return Math.round(e/n)+"m"}if(s>=r){return Math.round(e/r)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=o){return plural(e,s,o,"day")}if(s>=t){return plural(e,s,t,"hour")}if(s>=n){return plural(e,s,n,"minute")}if(s>=r){return plural(e,s,r,"second")}return e+" ms"}function plural(e,r,n,t){var o=r>=n*1.5;return Math.round(e/n)+" "+t+(o?"s":"")}},254:(e,r,n)=>{r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.storage=localstorage();r.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(r){r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;r.splice(1,0,n,"color: inherit");let t=0;let o=0;r[0].replace(/%[a-zA-Z%]/g,e=>{if(e==="%%"){return}t++;if(e==="%c"){o=t}});r.splice(o,0,n)}r.log=console.debug||console.log||(()=>{});function save(e){try{if(e){r.storage.setItem("debug",e)}else{r.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=r.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=n(8867)(r);const{formatters:t}=e.exports;t.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},8867:(e,r,n)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(900);createDebug.destroy=destroy;Object.keys(e).forEach(r=>{createDebug[r]=e[r]});createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let r=0;for(let n=0;n{if(r==="%%"){return"%"}s++;const o=createDebug.formatters[t];if(typeof o==="function"){const t=e[s];r=o.call(n,t);e.splice(s,1);s--}return r});createDebug.formatArgs.call(n,e);const i=n.log||createDebug.log;i.apply(n,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>n===null?createDebug.enabled(e):n,set:e=>{n=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,r){const n=createDebug(this.namespace+(typeof r==="undefined"?":":r)+e);n.log=this.log;return n}function enable(e){createDebug.save(e);createDebug.names=[];createDebug.skips=[];let r;const n=(typeof e==="string"?e:"").split(/[\s,]+/);const t=n.length;for(r=0;r"-"+e)].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let r;let n;for(r=0,n=createDebug.skips.length;r{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=n(254)}else{e.exports=n(675)}},675:(e,r,n)=>{const t=n(3867);const o=n(1669);r.init=init;r.log=log;r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.destroy=o.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");r.colors=[6,2,3,4,5,1];try{const e=n(9318);if(e&&(e.stderr||e).level>=2){r.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}r.inspectOpts=Object.keys(process.env).filter(e=>{return/^debug_/i.test(e)}).reduce((e,r)=>{const n=r.substring(6).toLowerCase().replace(/_([a-z])/g,(e,r)=>{return r.toUpperCase()});let t=process.env[r];if(/^(yes|on|true|enabled)$/i.test(t)){t=true}else if(/^(no|off|false|disabled)$/i.test(t)){t=false}else if(t==="null"){t=null}else{t=Number(t)}e[n]=t;return e},{});function useColors(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):t.isatty(process.stderr.fd)}function formatArgs(r){const{namespace:n,useColors:t}=this;if(t){const t=this.color;const o="[3"+(t<8?t:"8;5;"+t);const s=` ${o};1m${n} `;r[0]=s+r[0].split("\n").join("\n"+s);r.push(o+"m+"+e.exports.humanize(this.diff)+"")}else{r[0]=getDate()+n+" "+r[0]}}function getDate(){if(r.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(o.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const n=Object.keys(r.inspectOpts);for(let t=0;te.trim()).join(" ")};s.O=function(e){this.inspectOpts.colors=this.useColors;return o.inspect(e,this.inspectOpts)}},1949:(e,r,n)=>{const t=n(4966);const{GitConstructError:o}=n(4732);const{createInstanceConfig:s,folderExists:i}=n(847);const u=Object.create(null);for(let e=n(4732),r=Object.keys(e),t=0;t{const{GitExecutor:t}=n(4701);const{Scheduler:o}=n(3421);const{GitLogger:s}=n(7178);const{adhocExecTask:i,configurationErrorTask:u}=n(2815);const{NOOP:c,appendTaskOptions:a,asArray:f,filterArray:l,filterPrimitives:p,filterString:h,filterStringOrStringArray:d,filterType:g,folderExists:m,getTrailingOptions:b,trailingFunctionArgument:v,trailingOptionsArgument:C}=n(847);const{branchTask:O,branchLocalTask:T,deleteBranchesTask:y,deleteBranchTask:E}=n(17);const{taskCallback:S}=n(8850);const{checkIsRepoTask:k}=n(221);const{cloneTask:A,cloneMirrorTask:w}=n(3173);const{addConfigTask:D,listConfigTask:F}=n(7597);const{cleanWithOptionsTask:R,isCleanOptionsArray:M}=n(4386);const{commitTask:P}=n(5494);const{diffSummaryTask:j}=n(9241);const{fetchTask:L}=n(8823);const{hashObjectTask:I}=n(8199);const{initTask:G}=n(6016);const{logTask:B,parseLogOptions:N}=n(8627);const{mergeTask:$}=n(8829);const{moveTask:x}=n(6520);const{pullTask:U}=n(4636);const{pushTagsTask:Y,pushTask:W}=n(1435);const{addRemoteTask:q,getRemotesTask:z,listRemotesTask:V,remoteTask:H,removeRemoteTask:Q}=n(9866);const{getResetMode:J,resetTask:Z}=n(2377);const{stashListTask:X}=n(810);const{statusTask:K}=n(9197);const{addSubModuleTask:_,initSubModuleTask:ee,subModuleTask:re,updateSubModuleTask:ne}=n(8772);const{addAnnotatedTagTask:te,addTagTask:oe,tagListTask:se}=n(8540);const{straightThroughStringTask:ie}=n(2815);const{parseCheckIgnore:ue}=n(9926);const ce=Symbol("ChainedExecutor");function Git(e){this._executor=new t(e.binary,e.baseDir,new o(e.maxConcurrentProcesses));this._logger=new s}Git.prototype._executor=null;Git.prototype._logger=null;Git.prototype.customBinary=function(e){this._executor.binary=e;return this};Git.prototype.env=function(e,r){if(arguments.length===1&&typeof e==="object"){this._executor.env=e}else{(this._executor.env=this._executor.env||{})[e]=r}return this};Git.prototype.cwd=function(e){const r=typeof e!=="string"?u("Git.cwd: workingDirectory must be supplied as a string"):i(()=>{if(!m(e)){throw new Error(`Git.cwd: cannot change to non-directory "${e}"`)}return this._executor.cwd=e});return this._runTask(r,v(arguments)||c)};Git.prototype.outputHandler=function(e){this._executor.outputHandler=e;return this};Git.prototype.init=function(e,r){return this._runTask(G(e===true,this._executor.cwd,b(arguments)),v(arguments))};Git.prototype.status=function(){return this._runTask(K(b(arguments)),v(arguments))};Git.prototype.stashList=function(e){return this._runTask(X(C(arguments)||{},l(e)&&e||[]),v(arguments))};Git.prototype.stash=function(e,r){return this._runTask(ie(["stash",...b(arguments)]),v(arguments))};function createCloneTask(e,r,n,t){if(typeof n!=="string"){return u(`git.${e}() requires a string 'repoPath'`)}return r(n,g(t,h),b(arguments))}Git.prototype.clone=function(){return this._runTask(createCloneTask("clone",A,...arguments),v(arguments))};Git.prototype.mirror=function(){return this._runTask(createCloneTask("mirror",w,...arguments),v(arguments))};Git.prototype.mv=function(e,r){return this._runTask(x(e,r),v(arguments))};Git.prototype.checkoutLatestTag=function(e){var r=this;return this.pull(function(){r.tags(function(n,t){r.checkout(t.latest,e)})})};Git.prototype.add=function(e){return this._run(["add"].concat(e),v(arguments))};Git.prototype.commit=function(e,r,n,t){const o=v(arguments);const s=[];if(d(e)){s.push(...f(e))}else{console.warn("simple-git deprecation notice: git.commit: requires the commit message to be supplied as a string/string[], this will be an error in version 3")}return this._runTask(P(s,f(g(r,d,[])),[...g(n,l,[]),...b(arguments,0,true)]),o)};Git.prototype.pull=function(e,r,n,t){return this._runTask(U(g(e,h),g(r,h),b(arguments)),v(arguments))};Git.prototype.fetch=function(e,r){return this._runTask(L(g(e,h),g(r,h),b(arguments)),v(arguments))};Git.prototype.silent=function(e){this._logger.silent(!!e);return this};Git.prototype.tags=function(e,r){return this._runTask(se(b(arguments)),v(arguments))};Git.prototype.rebase=function(){return this._run(["rebase"].concat(b(arguments)),v(arguments))};Git.prototype.reset=function(e,r){return this._runTask(Z(J(e),b(arguments)),v(arguments))};Git.prototype.revert=function(e){const r=v(arguments);if(typeof e!=="string"){return this._runTask(u("Commit must be a string"),r)}return this._run(["revert",...b(arguments,0,true),e],r)};Git.prototype.addTag=function(e,r){const n=typeof e==="string"?oe(e):u("Git.addTag requires a tag name");return this._runTask(n,v(arguments))};Git.prototype.addAnnotatedTag=function(e,r,n){return this._runTask(te(e,r),v(arguments))};Git.prototype.checkout=function(e,r){const n=["checkout",...b(arguments,true)];return this._runTask(ie(n),v(arguments))};Git.prototype.checkoutBranch=function(e,r,n){return this.checkout(["-b",e,r],v(arguments))};Git.prototype.checkoutLocalBranch=function(e,r){return this.checkout(["-b",e],v(arguments))};Git.prototype.deleteLocalBranch=function(e,r,n){return this._runTask(E(e,typeof r==="boolean"?r:false),v(arguments))};Git.prototype.deleteLocalBranches=function(e,r,n){return this._runTask(y(e,typeof r==="boolean"?r:false),v(arguments))};Git.prototype.branch=function(e,r){return this._runTask(O(b(arguments)),v(arguments))};Git.prototype.branchLocal=function(e){return this._runTask(T(),v(arguments))};Git.prototype.addConfig=function(e,r,n,t){return this._runTask(D(e,r,typeof n==="boolean"?n:false),v(arguments))};Git.prototype.listConfig=function(){return this._runTask(F(),v(arguments))};Git.prototype.raw=function(e){const r=!Array.isArray(e);const n=[].slice.call(r?arguments:e,0);for(let e=0;e{const{gitP:t}=n(941);const{esModuleFactory:o,gitInstanceFactory:s,gitExportFactory:i}=n(1949);e.exports=o(i(s,{gitP:t}))},4732:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.TaskConfigurationError=r.GitResponseError=r.GitError=r.GitConstructError=r.ResetMode=r.CheckRepoActions=r.CleanOptions=void 0;var t=n(4386);Object.defineProperty(r,"CleanOptions",{enumerable:true,get:function(){return t.CleanOptions}});var o=n(221);Object.defineProperty(r,"CheckRepoActions",{enumerable:true,get:function(){return o.CheckRepoActions}});var s=n(2377);Object.defineProperty(r,"ResetMode",{enumerable:true,get:function(){return s.ResetMode}});var i=n(1876);Object.defineProperty(r,"GitConstructError",{enumerable:true,get:function(){return i.GitConstructError}});var u=n(5757);Object.defineProperty(r,"GitError",{enumerable:true,get:function(){return u.GitError}});var c=n(5131);Object.defineProperty(r,"GitResponseError",{enumerable:true,get:function(){return c.GitResponseError}});var a=n(740);Object.defineProperty(r,"TaskConfigurationError",{enumerable:true,get:function(){return a.TaskConfigurationError}})},1876:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.GitConstructError=void 0;const t=n(5757);class GitConstructError extends t.GitError{constructor(e,r){super(undefined,r);this.config=e}}r.GitConstructError=GitConstructError},5757:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.GitError=void 0;class GitError extends Error{constructor(e,r){super(r);this.task=e;Object.setPrototypeOf(this,new.target.prototype)}}r.GitError=GitError},5131:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.GitResponseError=void 0;const t=n(5757);class GitResponseError extends t.GitError{constructor(e,r){super(undefined,r||String(e));this.git=e}}r.GitResponseError=GitResponseError},740:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.TaskConfigurationError=void 0;const t=n(5757);class TaskConfigurationError extends t.GitError{constructor(e){super(undefined,e)}}r.TaskConfigurationError=TaskConfigurationError},7178:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.GitLogger=r.createLogger=r.log=void 0;const t=n(2179);const o=n(847);t.default.formatters.L=(e=>String(o.filterHasLength(e)?e.length:"-"));t.default.formatters.B=(e=>{if(Buffer.isBuffer(e)){return e.toString("utf8")}return o.objectToString(e)});r.log=t.default("simple-git");function prefixedLogger(e,r,n){if(!r||!String(r).replace(/\s*/,"")){return!n?e:(r,...t)=>{e(r,...t);n(r,...t)}}return(t,...o)=>{e(`%s ${t}`,r,...o);if(n){n(t,...o)}}}function childLoggerName(e,r,{namespace:n}){if(typeof e==="string"){return e}const t=r&&r.namespace||"";if(t.startsWith(n)){return t.substr(n.length+1)}return t||n}function createLogger(e,n,t,s=r.log){const i=e&&`[${e}]`||"";const u=[];const c=typeof n==="string"?s.extend(n):n;const a=childLoggerName(o.filterType(n,o.filterString),c,s);return step(t);function destroy(){u.forEach(e=>e.destroy());u.length=0}function child(r){return o.append(u,createLogger(e,c&&c.extend(r)||r))}function sibling(r,n){return o.append(u,createLogger(e,a.replace(/^[^:]+/,r),n,s))}function step(r){const n=r&&`[${r}]`||"";const t=c&&prefixedLogger(c,n)||o.NOOP;const u=prefixedLogger(s,`${i} ${n}`,t);return Object.assign(c?t:u,{key:a,label:e,child:child,sibling:sibling,debug:t,info:u,step:step,destroy:destroy})}}r.createLogger=createLogger;class GitLogger{constructor(e=r.log){this._out=e;this.error=prefixedLogger(e,"[ERROR]");this.warn=prefixedLogger(e,"[WARN]")}silent(e=false){if(e!==this._out.enabled){return}const{namespace:r}=this._out;const n=(process.env.DEBUG||"").split(",").filter(e=>!!e);const s=n.includes(r);const i=n.includes(`-${r}`);if(!e){if(i){o.remove(n,`-${r}`)}else{n.push(r)}}else{if(s){o.remove(n,r)}else{n.push(`-${r}`)}}t.default.enable(n.join(","))}}r.GitLogger=GitLogger},6086:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.hasBranchDeletionError=r.parseBranchDeletions=void 0;const t=n(3755);const o=n(847);const s=/(\S+)\s+\(\S+\s([^)]+)\)/;const i=/^error[^']+'([^']+)'/m;const u=[new o.LineParser(s,(e,[r,n])=>{const o=t.branchDeletionSuccess(r,n);e.all.push(o);e.branches[r]=o}),new o.LineParser(i,(e,[r])=>{const n=t.branchDeletionFailure(r);e.errors.push(n);e.all.push(n);e.branches[r]=n})];const c=e=>{return o.parseStringResponse(new t.BranchDeletionBatch,u,e)};r.parseBranchDeletions=c;function hasBranchDeletionError(e,r){return r===o.ExitCodes.ERROR&&i.test(e)}r.hasBranchDeletionError=hasBranchDeletionError},9264:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseBranchSummary=void 0;const t=n(4446);const o=n(847);const s=[new o.LineParser(/^(\*\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[r,n,t,o])=>{e.push(!!r,true,n,t,o)}),new o.LineParser(/^(\*\s)?(\S+)\s+([a-z0-9]+)\s(.*)$/,(e,[r,n,t,o])=>{e.push(!!r,false,n,t,o)})];function parseBranchSummary(e){return o.parseStringResponse(new t.BranchSummaryResult,s,e)}r.parseBranchSummary=parseBranchSummary},3026:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseCommitResult=void 0;const t=n(847);const o=[new t.LineParser(/\[([^\s]+) ([^\]]+)/,(e,[r,n])=>{e.branch=r;e.commit=n}),new t.LineParser(/\s*Author:\s(.+)/i,(e,[r])=>{const n=r.split("<");const t=n.pop();if(!t||!t.includes("@")){return}e.author={email:t.substr(0,t.length-1),name:n.join("<").trim()}}),new t.LineParser(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[r,n,t])=>{e.summary.changes=parseInt(r,10)||0;e.summary.insertions=parseInt(n,10)||0;e.summary.deletions=parseInt(t,10)||0}),new t.LineParser(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[r,n,t])=>{e.summary.changes=parseInt(r,10)||0;const o=parseInt(n,10)||0;if(t==="-"){e.summary.deletions=o}else if(t==="+"){e.summary.insertions=o}})];function parseCommitResult(e){const r={author:null,branch:"",commit:"",summary:{changes:0,insertions:0,deletions:0}};return t.parseStringResponse(r,o,e)}r.parseCommitResult=parseCommitResult},2024:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseDiffResult=void 0;const t=n(4781);function parseDiffResult(e){const r=e.trim().split("\n");const n=new t.DiffSummary;readSummaryLine(n,r.pop());for(let e=0,t=r.length;e ([0-9.]+) ([a-z]+)$/);if(n){r.push({file:n[1].trim(),before:+n[2],after:+n[3],binary:true});return true}return false}},6254:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseFetchResult=void 0;const t=n(847);const o=[new t.LineParser(/From (.+)$/,(e,[r])=>{e.remote=r}),new t.LineParser(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[r,n])=>{e.branches.push({name:r,tracking:n})}),new t.LineParser(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[r,n])=>{e.tags.push({name:r,tracking:n})})];function parseFetchResult(e,r){const n={raw:e,remote:null,branches:[],tags:[]};return t.parseStringResponse(n,o,e,r)}r.parseFetchResult=parseFetchResult},9729:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createListLogSummaryParser=r.SPLITTER=r.COMMIT_BOUNDARY=r.START_BOUNDARY=void 0;const t=n(847);const o=n(2024);r.START_BOUNDARY="òòòòòò ";r.COMMIT_BOUNDARY=" òò";r.SPLITTER=" ò ";const s=["hash","date","message","refs","author_name","author_email"];function lineBuilder(e,r){return r.reduce((r,n,t)=>{r[n]=e[t]||"";return r},Object.create({diff:null}))}function createListLogSummaryParser(e=r.SPLITTER,n=s){return function(s){const i=t.toLinesWithContent(s,true,r.START_BOUNDARY).map(function(t){const s=t.trim().split(r.COMMIT_BOUNDARY);const i=lineBuilder(s[0].trim().split(e),n);if(s.length>1&&!!s[1].trim()){i.diff=o.parseDiffResult(s[1])}return i});return{all:i,latest:i.length&&i[0]||null,total:i.length}}}r.createListLogSummaryParser=createListLogSummaryParser},6412:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseMergeDetail=r.parseMergeResult=void 0;const t=n(1651);const o=n(847);const s=n(5658);const i=[new o.LineParser(/^Auto-merging\s+(.+)$/,(e,[r])=>{e.merges.push(r)}),new o.LineParser(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[r,n])=>{e.conflicts.push(new t.MergeSummaryConflict(r,n))}),new o.LineParser(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[r,n,o])=>{e.conflicts.push(new t.MergeSummaryConflict(r,n,{deleteRef:o}))}),new o.LineParser(/^CONFLICT\s+\((.+)\):/,(e,[r])=>{e.conflicts.push(new t.MergeSummaryConflict(r,null))}),new o.LineParser(/^Automatic merge failed;\s+(.+)$/,(e,[r])=>{e.result=r})];const u=(e,n)=>{return Object.assign(r.parseMergeDetail(e,n),s.parsePullResult(e,n))};r.parseMergeResult=u;const c=e=>{return o.parseStringResponse(new t.MergeSummaryDetail,i,e)};r.parseMergeDetail=c},7444:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseMoveResult=void 0;const t=n(847);const o=[new t.LineParser(/^Renaming (.+) to (.+)$/,(e,[r,n])=>{e.moves.push({from:r,to:n})})];function parseMoveResult(e){return t.parseStringResponse({moves:[]},o,e)}r.parseMoveResult=parseMoveResult},5658:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parsePullResult=r.parsePullDetail=void 0;const t=n(3567);const o=n(847);const s=n(2661);const i=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/;const u=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/;const c=/^(create|delete) mode \d+ (.+)/;const a=[new o.LineParser(i,(e,[r,n,t])=>{e.files.push(r);if(n){e.insertions[r]=n.length}if(t){e.deletions[r]=t.length}}),new o.LineParser(u,(e,[r,,n,,t])=>{if(n!==undefined||t!==undefined){e.summary.changes=+r||0;e.summary.insertions=+n||0;e.summary.deletions=+t||0;return true}return false}),new o.LineParser(c,(e,[r,n])=>{o.append(e.files,n);o.append(r==="create"?e.created:e.deleted,n)})];const f=(e,r)=>{return o.parseStringResponse(new t.PullSummary,a,e,r)};r.parsePullDetail=f;const l=(e,n)=>{return Object.assign(new t.PullSummary,r.parsePullDetail(e,n),s.parseRemoteMessages(e,n))};r.parsePullResult=l},8530:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parsePushDetail=r.parsePushResult=void 0;const t=n(847);const o=n(2661);function pushResultPushedItem(e,r,n){const t=n.includes("deleted");const o=n.includes("tag")||/^refs\/tags/.test(e);const s=!n.includes("new");return{deleted:t,tag:o,branch:!o,new:!s,alreadyUpdated:s,local:e,remote:r}}const s=[new t.LineParser(/^Pushing to (.+)$/,(e,[r])=>{e.repo=r}),new t.LineParser(/^updating local tracking ref '(.+)'/,(e,[r])=>{e.ref=Object.assign(Object.assign({},e.ref||{}),{local:r})}),new t.LineParser(/^[*-=]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[r,n,t])=>{e.pushed.push(pushResultPushedItem(r,n,t))}),new t.LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[r,n,t])=>{e.branch=Object.assign(Object.assign({},e.branch||{}),{local:r,remote:n,remoteName:t})}),new t.LineParser(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[r,n,t,o])=>{e.update={head:{local:r,remote:n},hash:{from:t,to:o}}})];const i=(e,n)=>{const t=r.parsePushDetail(e,n);const s=o.parseRemoteMessages(e,n);return Object.assign(Object.assign({},t),s)};r.parsePushResult=i;const u=(e,r)=>{return t.parseStringResponse({pushed:[]},s,e,r)};r.parsePushDetail=u},2661:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.RemoteMessageSummary=r.parseRemoteMessages=void 0;const t=n(847);const o=n(3565);const s=[new t.RemoteLineParser(/^remote:\s*(.+)$/,(e,[r])=>{e.remoteMessages.all.push(r.trim());return false}),...o.remoteMessagesObjectParsers,new t.RemoteLineParser([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[r])=>{e.remoteMessages.pullRequestUrl=r}),new t.RemoteLineParser([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[r,n,o])=>{e.remoteMessages.vulnerabilities={count:t.asNumber(r),summary:n,url:o}})];function parseRemoteMessages(e,r){return t.parseStringResponse({remoteMessages:new RemoteMessageSummary},s,r)}r.parseRemoteMessages=parseRemoteMessages;class RemoteMessageSummary{constructor(){this.all=[]}}r.RemoteMessageSummary=RemoteMessageSummary},3565:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.remoteMessagesObjectParsers=void 0;const t=n(847);function objectEnumerationResult(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function asObjectCount(e){const r=/^\s*(\d+)/.exec(e);const n=/delta (\d+)/i.exec(e);return{count:t.asNumber(r&&r[1]||"0"),delta:t.asNumber(n&&n[1]||"0")}}r.remoteMessagesObjectParsers=[new t.RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[r,n])=>{const o=r.toLowerCase();const s=objectEnumerationResult(e.remoteMessages);Object.assign(s,{[o]:t.asNumber(n)})}),new t.RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[r,n])=>{const o=r.toLowerCase();const s=objectEnumerationResult(e.remoteMessages);Object.assign(s,{[o]:t.asNumber(n)})}),new t.RemoteLineParser(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[r,n,o])=>{const s=objectEnumerationResult(e.remoteMessages);s.total=asObjectCount(r);s.reused=asObjectCount(n);s.packReused=t.asNumber(o)})]},3755:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isSingleBranchDeleteFailure=r.branchDeletionFailure=r.branchDeletionSuccess=r.BranchDeletionBatch=void 0;class BranchDeletionBatch{constructor(){this.all=[];this.branches={};this.errors=[]}get success(){return!this.errors.length}}r.BranchDeletionBatch=BranchDeletionBatch;function branchDeletionSuccess(e,r){return{branch:e,hash:r,success:true}}r.branchDeletionSuccess=branchDeletionSuccess;function branchDeletionFailure(e){return{branch:e,hash:null,success:false}}r.branchDeletionFailure=branchDeletionFailure;function isSingleBranchDeleteFailure(e){return e.success}r.isSingleBranchDeleteFailure=isSingleBranchDeleteFailure},4446:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.BranchSummaryResult=void 0;class BranchSummaryResult{constructor(){this.all=[];this.branches={};this.current="";this.detached=false}push(e,r,n,t,o){if(e){this.detached=r;this.current=n}this.all.push(n);this.branches[n]={current:e,name:n,commit:t,label:o}}}r.BranchSummaryResult=BranchSummaryResult},9926:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseCheckIgnore=void 0;const n=e=>{return e.split(/\n/g).map(e=>e.trim()).filter(e=>!!e)};r.parseCheckIgnore=n},5689:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.cleanSummaryParser=r.CleanResponse=void 0;const t=n(847);class CleanResponse{constructor(e){this.dryRun=e;this.paths=[];this.files=[];this.folders=[]}}r.CleanResponse=CleanResponse;const o=/^[a-z]+\s*/i;const s=/^[a-z]+\s+[a-z]+\s*/i;const i=/\/$/;function cleanSummaryParser(e,r){const n=new CleanResponse(e);const u=e?s:o;t.toLinesWithContent(r).forEach(e=>{const r=e.replace(u,"");n.paths.push(r);(i.test(r)?n.folders:n.files).push(r)});return n}r.cleanSummaryParser=cleanSummaryParser},7219:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.configListParser=r.ConfigList=void 0;const t=n(847);class ConfigList{constructor(){this.files=[];this.values=Object.create(null)}get all(){if(!this._all){this._all=this.files.reduce((e,r)=>{return Object.assign(e,this.values[r])},{})}return this._all}addFile(e){if(!(e in this.values)){const r=t.last(this.files);this.values[e]=r?Object.create(this.values[r]):{};this.files.push(e)}return this.values[e]}addValue(e,r,n){const t=this.addFile(e);if(!t.hasOwnProperty(r)){t[r]=n}else if(Array.isArray(t[r])){t[r].push(n)}else{t[r]=[t[r],n]}this._all=undefined}}r.ConfigList=ConfigList;function configListParser(e){const r=new ConfigList;const n=e.split("\0");for(let e=0,o=n.length-1;e{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.DiffSummary=void 0;class DiffSummary{constructor(){this.changed=0;this.deletions=0;this.insertions=0;this.files=[]}}r.DiffSummary=DiffSummary},860:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.FileStatusSummary=r.fromPathRegex=void 0;r.fromPathRegex=/^(.+) -> (.+)$/;class FileStatusSummary{constructor(e,n,t){this.path=e;this.index=n;this.working_dir=t;if("R"===n+t){const n=r.fromPathRegex.exec(e)||[null,e,e];this.from=n[1]||"";this.path=n[2]||""}}}r.FileStatusSummary=FileStatusSummary},9999:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseGetRemotesVerbose=r.parseGetRemotes=void 0;const t=n(847);function parseGetRemotes(e){const r={};forEach(e,([e])=>r[e]={name:e});return Object.values(r)}r.parseGetRemotes=parseGetRemotes;function parseGetRemotesVerbose(e){const r={};forEach(e,([e,n,t])=>{if(!r.hasOwnProperty(e)){r[e]={name:e,refs:{fetch:"",push:""}}}if(t&&n){r[e].refs[t.replace(/[^a-z]/g,"")]=n}});return Object.values(r)}r.parseGetRemotesVerbose=parseGetRemotesVerbose;function forEach(e,r){t.forEachLineWithContent(e,e=>r(e.split(/\s+/)))}},8690:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseInit=r.InitSummary=void 0;class InitSummary{constructor(e,r,n,t){this.bare=e;this.path=r;this.existing=n;this.gitDir=t}}r.InitSummary=InitSummary;const n=/^Init.+ repository in (.+)$/;const t=/^Rein.+ in (.+)$/;function parseInit(e,r,o){const s=String(o).trim();let i;if(i=n.exec(s)){return new InitSummary(e,r,false,i[1])}if(i=t.exec(s)){return new InitSummary(e,r,true,i[1])}let u="";const c=s.split(" ");while(c.length){const e=c.shift();if(e==="in"){u=c.join(" ");break}}return new InitSummary(e,r,/^re/i.test(s),u)}r.parseInit=parseInit},1651:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.MergeSummaryDetail=r.MergeSummaryConflict=void 0;class MergeSummaryConflict{constructor(e,r=null,n){this.reason=e;this.file=r;this.meta=n}toString(){return`${this.file}:${this.reason}`}}r.MergeSummaryConflict=MergeSummaryConflict;class MergeSummaryDetail{constructor(){this.conflicts=[];this.merges=[];this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){if(this.conflicts.length){return`CONFLICTS: ${this.conflicts.join(", ")}`}return"OK"}}r.MergeSummaryDetail=MergeSummaryDetail},3567:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.PullSummary=void 0;class PullSummary{constructor(){this.remoteMessages={all:[]};this.created=[];this.deleted=[];this.files=[];this.deletions={};this.insertions={};this.summary={changes:0,deletions:0,insertions:0}}}r.PullSummary=PullSummary},6790:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseStatusSummary=r.StatusSummary=void 0;const t=n(847);const o=n(860);class StatusSummary{constructor(){this.not_added=[];this.conflicted=[];this.created=[];this.deleted=[];this.modified=[];this.renamed=[];this.files=[];this.staged=[];this.ahead=0;this.behind=0;this.current=null;this.tracking=null}isClean(){return!this.files.length}}r.StatusSummary=StatusSummary;var s;(function(e){e["ADDED"]="A";e["DELETED"]="D";e["MODIFIED"]="M";e["RENAMED"]="R";e["COPIED"]="C";e["UNMERGED"]="U";e["UNTRACKED"]="?";e["IGNORED"]="!";e["NONE"]=" "})(s||(s={}));function renamedFile(e){const r=/^(.+) -> (.+)$/.exec(e);if(!r){return{from:e,to:e}}return{from:String(r[1]),to:String(r[2])}}function parser(e,r,n){return[`${e}${r}`,n]}function conflicts(e,...r){return r.map(r=>parser(e,r,(e,r)=>t.append(e.conflicted,r)))}const i=new Map([parser(s.NONE,s.ADDED,(e,r)=>t.append(e.created,r)),parser(s.NONE,s.DELETED,(e,r)=>t.append(e.deleted,r)),parser(s.NONE,s.MODIFIED,(e,r)=>t.append(e.modified,r)),parser(s.ADDED,s.NONE,(e,r)=>t.append(e.created,r)&&t.append(e.staged,r)),parser(s.ADDED,s.MODIFIED,(e,r)=>t.append(e.created,r)&&t.append(e.staged,r)&&t.append(e.modified,r)),parser(s.DELETED,s.NONE,(e,r)=>t.append(e.deleted,r)&&t.append(e.staged,r)),parser(s.MODIFIED,s.NONE,(e,r)=>t.append(e.modified,r)&&t.append(e.staged,r)),parser(s.MODIFIED,s.MODIFIED,(e,r)=>t.append(e.modified,r)&&t.append(e.staged,r)),parser(s.RENAMED,s.NONE,(e,r)=>{t.append(e.renamed,renamedFile(r))}),parser(s.RENAMED,s.MODIFIED,(e,r)=>{const n=renamedFile(r);t.append(e.renamed,n);t.append(e.modified,n.to)}),parser(s.UNTRACKED,s.UNTRACKED,(e,r)=>t.append(e.not_added,r)),...conflicts(s.ADDED,s.ADDED,s.UNMERGED),...conflicts(s.DELETED,s.DELETED,s.UNMERGED),...conflicts(s.UNMERGED,s.ADDED,s.DELETED,s.UNMERGED),["##",(e,r)=>{const n=/ahead (\d+)/;const t=/behind (\d+)/;const o=/^(.+?(?=(?:\.{3}|\s|$)))/;const s=/\.{3}(\S*)/;const i=/\son\s([\S]+)$/;let u;u=n.exec(r);e.ahead=u&&+u[1]||0;u=t.exec(r);e.behind=u&&+u[1]||0;u=o.exec(r);e.current=u&&u[1];u=s.exec(r);e.tracking=u&&u[1];u=i.exec(r);e.current=u&&u[1]||e.current}]]);const u=function(e){const r=e.trim().split("\n");const n=new StatusSummary;for(let e=0,t=r.length;e{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseTagList=r.TagList=void 0;class TagList{constructor(e,r){this.all=e;this.latest=r}}r.TagList=TagList;const n=function(e,r=false){const n=e.split("\n").map(trimmed).filter(Boolean);if(!r){n.sort(function(e,r){const n=e.split(".");const t=r.split(".");if(n.length===1||t.length===1){return singleSorted(toNumber(n[0]),toNumber(t[0]))}for(let e=0,r=Math.max(n.length,t.length);ee.indexOf(".")>=0);return new TagList(n,t)};r.parseTagList=n;function singleSorted(e,r){const n=isNaN(e);const t=isNaN(r);if(n!==t){return n?1:-1}return n?sorted(e,r):0}function sorted(e,r){return e===r?0:e>r?1:-1}function trimmed(e){return e.trim()}function toNumber(e){if(typeof e==="string"){return parseInt(e.replace(/^\D+/g,""),10)||0}return 0}},8543:function(e,r,n){"use strict";var t=this&&this.__awaiter||function(e,r,n,t){function adopt(e){return e instanceof n?e:new n(function(r){r(e)})}return new(n||(n=Promise))(function(n,o){function fulfilled(e){try{step(t.next(e))}catch(e){o(e)}}function rejected(e){try{step(t["throw"](e))}catch(e){o(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((t=t.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});r.GitExecutorChain=void 0;const o=n(3129);const s=n(4732);const i=n(2815);const u=n(6676);const c=n(847);class GitExecutorChain{constructor(e,r){this._executor=e;this._scheduler=r;this._chain=Promise.resolve();this._queue=new u.TasksPendingQueue}get binary(){return this._executor.binary}get outputHandler(){return this._executor.outputHandler}get cwd(){return this._executor.cwd}get env(){return this._executor.env}push(e){this._queue.push(e);return this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return t(this,void 0,void 0,function*(){const r=yield this._scheduler.next();const n=()=>this._queue.complete(e);try{const{logger:t}=this._queue.attempt(e);return yield i.isEmptyTask(e)?this.attemptEmptyTask(e,t):this.attemptRemoteTask(e,t)}catch(r){throw this.onFatalException(e,r)}finally{n();r()}})}onFatalException(e,r){const n=r instanceof s.GitError?Object.assign(r,{task:e}):new s.GitError(e,r&&String(r));this._chain=Promise.resolve();this._queue.fatal(n);return n}attemptRemoteTask(e,r){return t(this,void 0,void 0,function*(){const n=yield this.gitResponse(this.binary,e.commands,this.outputHandler,r.step("SPAWN"));const t=yield this.handleTaskData(e,n,r.step("HANDLE"));r(`passing response to task's parser as a %s`,e.format);if(i.isBufferTask(e)){return c.callTaskParser(e.parser,t)}return c.callTaskParser(e.parser,t.asStrings())})}attemptEmptyTask(e,r){return t(this,void 0,void 0,function*(){r(`empty task bypassing child process to call to task's parser`);return e.parser()})}handleTaskData({onError:e,concatStdErr:r},{exitCode:n,stdOut:t,stdErr:o},s){return new Promise((i,u)=>{s(`Preparing to handle process response exitCode=%d stdOut=`,n);if(n&&o.length&&e){s.info(`exitCode=%s handling with custom error handler`);s(`concatenate stdErr to stdOut: %j`,r);return e(n,Buffer.concat([...r?t:[],...o]).toString("utf-8"),e=>{s.info(`custom error handler treated as success`);s(`custom error returned a %s`,c.objectToString(e));i(new c.GitOutputStreams(Buffer.isBuffer(e)?e:Buffer.from(String(e)),Buffer.concat(o)))},u)}if(n&&o.length){s.info(`exitCode=%s treated as error when then child process has written to stdErr`);return u(Buffer.concat(o).toString("utf-8"))}if(r){s(`concatenating stdErr onto stdOut before processing`);s(`stdErr: $O`,o);t.push(...o)}s.info(`retrieving task output complete`);i(new c.GitOutputStreams(Buffer.concat(t),Buffer.concat(o)))})}gitResponse(e,r,n,s){return t(this,void 0,void 0,function*(){const t=s.sibling("output");const i={cwd:this.cwd,env:this.env,windowsHide:true};return new Promise(u=>{const c=[];const a=[];let f=false;function attemptClose(e,r="retry"){if(f||a.length||c.length){s.info(`exitCode=%s event=%s`,e,r);u({stdOut:c,stdErr:a,exitCode:e});f=true;t.destroy()}if(!f){f=true;setTimeout(()=>attemptClose(e,"deferred"),50);s("received %s event before content on stdOut/stdErr",r)}}s.info(`%s %o`,e,r);s("%O",i);const l=o.spawn(e,r,i);l.stdout.on("data",onDataReceived(c,"stdOut",s,t.step("stdOut")));l.stderr.on("data",onDataReceived(a,"stdErr",s,t.step("stdErr")));l.on("error",onErrorReceived(a,s));l.on("close",e=>attemptClose(e,"close"));l.on("exit",e=>attemptClose(e,"exit"));if(n){s(`Passing child process stdOut/stdErr to custom outputHandler`);n(e,l.stdout,l.stderr,[...r])}})})}}r.GitExecutorChain=GitExecutorChain;function onErrorReceived(e,r){return n=>{r(`[ERROR] child process exception %o`,n);e.push(Buffer.from(String(n.stack),"ascii"))}}function onDataReceived(e,r,n,t){return o=>{n(`%s received %L bytes`,r,o);t(`%B`,o);e.push(o)}}},4701:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.GitExecutor=void 0;const t=n(8543);class GitExecutor{constructor(e="git",r,n){this.binary=e;this.cwd=r;this._scheduler=n;this._chain=new t.GitExecutorChain(this,this._scheduler)}chain(){return new t.GitExecutorChain(this,this._scheduler)}push(e){return this._chain.push(e)}}r.GitExecutor=GitExecutor},941:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.gitP=void 0;const t=n(5131);const o=["customBinary","env","outputHandler","silent"];const s=["add","addAnnotatedTag","addConfig","addRemote","addTag","binaryCatFile","branch","branchLocal","catFile","checkIgnore","checkIsRepo","checkout","checkoutBranch","checkoutLatestTag","checkoutLocalBranch","clean","clone","commit","cwd","deleteLocalBranch","deleteLocalBranches","diff","diffSummary","exec","fetch","getRemotes","init","listConfig","listRemote","log","merge","mergeFromTo","mirror","mv","pull","push","pushTags","raw","rebase","remote","removeRemote","reset","revert","revparse","rm","rmKeepLocal","show","stash","stashList","status","subModule","submoduleAdd","submoduleInit","submoduleUpdate","tag","tags","updateServerInfo"];const{gitInstanceFactory:i}=n(1949);function gitP(...e){let r;let n=Promise.resolve();try{r=i(...e)}catch(e){n=Promise.reject(e)}function builderReturn(){return t}function chainReturn(){return n}const t=[...o,...s].reduce((e,n)=>{const t=s.includes(n);const o=t?asyncWrapper(n,r):syncWrapper(n,r,e);const i=t?chainReturn:builderReturn;Object.defineProperty(e,n,{enumerable:false,configurable:false,value:r?o:i});return e},{});return t;function asyncWrapper(e,r){return function(...t){if(typeof t[t.length]==="function"){throw new TypeError("Promise interface requires that handlers are not supplied inline, "+"trailing function not allowed in call to "+e)}return n.then(function(){return new Promise(function(n,o){const s=(e,r)=>{if(e){return o(toError(e))}n(r)};t.push(s);r[e].apply(r,t)})})}}function syncWrapper(e,r,n){return(...t)=>{r[e](...t);return n}}}r.gitP=gitP;function toError(e){if(e instanceof Error){return e}if(typeof e==="string"){return new Error(e)}return new t.GitResponseError(e)}},3421:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.Scheduler=void 0;const t=n(847);const o=n(9819);const s=n(7178);const i=s.createLogger("","scheduler");const u=(()=>{let e=0;return()=>{e++;const{promise:r,done:n}=o.createDeferred();return{promise:r,done:n,id:e}}})();class Scheduler{constructor(e=2){this.concurrency=e;this.pending=[];this.running=[];i(`Constructed, concurrency=%s`,e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){i(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`,this.pending.length,this.running.length,this.concurrency);return}const e=t.append(this.running,this.pending.shift());i(`Attempting id=%s`,e.id);e.done(()=>{i(`Completing id=`,e.id);t.remove(this.running,e);this.schedule()})}next(){const{promise:e,id:r}=t.append(this.pending,u());i(`Scheduling id=%s`,r);this.schedule();return e}}r.Scheduler=Scheduler},6676:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.TasksPendingQueue=void 0;const t=n(7178);const o=n(4732);class TasksPendingQueue{constructor(e="GitExecutor"){this.logLabel=e;this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){const r=TasksPendingQueue.getName(e.commands[0]);const n=t.createLogger(this.logLabel,r);return{task:e,logger:n,name:r}}push(e){const r=this.createProgress(e);r.logger("Adding task to the queue, commands = %o",e.commands);this._queue.set(e,r);return r}fatal(e){for(const[r,{logger:n}]of Array.from(this._queue.entries())){if(r===e.task){n.info(`Failed %o`,e);n(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`)}else{n.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`,e.message)}this.complete(r)}if(this._queue.size!==0){throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}}complete(e){const r=this.withProgress(e);if(r){r.logger.destroy();this._queue.delete(e)}}attempt(e){const r=this.withProgress(e);if(!r){throw new o.GitError(undefined,"TasksPendingQueue: attempt called for an unknown task")}r.logger("Starting task");return r}static getName(e="empty"){return`task:${e}:${++TasksPendingQueue.counter}`}}r.TasksPendingQueue=TasksPendingQueue;TasksPendingQueue.counter=0},8850:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.taskCallback=void 0;const t=n(4732);const o=n(847);function taskCallback(e,r,n=o.NOOP){const s=e=>{n(null,e)};const i=r=>{if((r===null||r===void 0?void 0:r.task)===e){if(r instanceof t.GitResponseError){return n(addDeprecationNoticeToError(r))}n(r)}};r.then(s,i)}r.taskCallback=taskCallback;function addDeprecationNoticeToError(e){let r=e=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${e} should be GitResponseError.git.${e}, this will no longer be available in version 3`);r=o.NOOP};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(descriptorReducer,{}));function descriptorReducer(n,t){if(t in e){return n}n[t]={enumerable:false,configurable:false,get(){r(t);return e.git[t]}};return n}}},17:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.deleteBranchTask=r.deleteBranchesTask=r.branchLocalTask=r.branchTask=r.containsDeleteBranchCommand=void 0;const t=n(5131);const o=n(6086);const s=n(9264);function containsDeleteBranchCommand(e){const r=["-d","-D","--delete"];return e.some(e=>r.includes(e))}r.containsDeleteBranchCommand=containsDeleteBranchCommand;function branchTask(e){const r=containsDeleteBranchCommand(e);const n=["branch",...e];if(n.length===1){n.push("-a")}if(!n.includes("-v")){n.splice(1,0,"-v")}return{format:"utf-8",commands:n,parser(e,n){if(r){return o.parseBranchDeletions(e,n).all[0]}return s.parseBranchSummary(e)}}}r.branchTask=branchTask;function branchLocalTask(){const e=s.parseBranchSummary;return{format:"utf-8",commands:["branch","-v"],parser:e}}r.branchLocalTask=branchLocalTask;function deleteBranchesTask(e,r=false){return{format:"utf-8",commands:["branch","-v",r?"-D":"-d",...e],parser(e,r){return o.parseBranchDeletions(e,r)},onError(e,r,n,t){if(!o.hasBranchDeletionError(r,e)){return t(r)}n(r)},concatStdErr:true}}r.deleteBranchesTask=deleteBranchesTask;function deleteBranchTask(e,r=false){const n={format:"utf-8",commands:["branch","-v",r?"-D":"-d",e],parser(r,n){return o.parseBranchDeletions(r,n).branches[e]},onError(e,r,s,i){if(!o.hasBranchDeletionError(r,e)){return i(r)}throw new t.GitResponseError(n.parser(r,""),r)},concatStdErr:true};return n}r.deleteBranchTask=deleteBranchTask},221:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.checkIsBareRepoTask=r.checkIsRepoRootTask=r.checkIsRepoTask=r.CheckRepoActions=void 0;const t=n(847);var o;(function(e){e["BARE"]="bare";e["IN_TREE"]="tree";e["IS_REPO_ROOT"]="root"})(o=r.CheckRepoActions||(r.CheckRepoActions={}));const s=(e,r,n,o)=>{if(e===t.ExitCodes.UNCLEAN&&isNotRepoMessage(r)){return n("false")}o(r)};const i=e=>{return e.trim()==="true"};function checkIsRepoTask(e){switch(e){case o.BARE:return checkIsBareRepoTask();case o.IS_REPO_ROOT:return checkIsRepoRootTask()}const r=["rev-parse","--is-inside-work-tree"];return{commands:r,format:"utf-8",onError:s,parser:i}}r.checkIsRepoTask=checkIsRepoTask;function checkIsRepoRootTask(){const e=["rev-parse","--git-dir"];return{commands:e,format:"utf-8",onError:s,parser(e){return/^\.(git)?$/.test(e.trim())}}}r.checkIsRepoRootTask=checkIsRepoRootTask;function checkIsBareRepoTask(){const e=["rev-parse","--is-bare-repository"];return{commands:e,format:"utf-8",onError:s,parser:i}}r.checkIsBareRepoTask=checkIsBareRepoTask;function isNotRepoMessage(e){return/(Not a git repository|Kein Git-Repository)/i.test(e)}},4386:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isCleanOptionsArray=r.cleanTask=r.cleanWithOptionsTask=r.CleanOptions=r.CONFIG_ERROR_UNKNOWN_OPTION=r.CONFIG_ERROR_MODE_REQUIRED=r.CONFIG_ERROR_INTERACTIVE_MODE=void 0;const t=n(5689);const o=n(847);const s=n(2815);r.CONFIG_ERROR_INTERACTIVE_MODE="Git clean interactive mode is not supported";r.CONFIG_ERROR_MODE_REQUIRED='Git clean mode parameter ("n" or "f") is required';r.CONFIG_ERROR_UNKNOWN_OPTION="Git clean unknown option found in: ";var i;(function(e){e["DRY_RUN"]="n";e["FORCE"]="f";e["IGNORED_INCLUDED"]="x";e["IGNORED_ONLY"]="X";e["EXCLUDING"]="e";e["QUIET"]="q";e["RECURSIVE"]="d"})(i=r.CleanOptions||(r.CleanOptions={}));const u=new Set(["i",...o.asStringArray(Object.values(i))]);function cleanWithOptionsTask(e,n){const{cleanMode:t,options:o,valid:i}=getCleanOptions(e);if(!t){return s.configurationErrorTask(r.CONFIG_ERROR_MODE_REQUIRED)}if(!i.options){return s.configurationErrorTask(r.CONFIG_ERROR_UNKNOWN_OPTION+JSON.stringify(e))}o.push(...n);if(o.some(isInteractiveMode)){return s.configurationErrorTask(r.CONFIG_ERROR_INTERACTIVE_MODE)}return cleanTask(t,o)}r.cleanWithOptionsTask=cleanWithOptionsTask;function cleanTask(e,r){const n=["clean",`-${e}`,...r];return{commands:n,format:"utf-8",parser(r){return t.cleanSummaryParser(e===i.DRY_RUN,r)}}}r.cleanTask=cleanTask;function isCleanOptionsArray(e){return Array.isArray(e)&&e.every(e=>u.has(e))}r.isCleanOptionsArray=isCleanOptionsArray;function getCleanOptions(e){let r;let n=[];let t={cleanMode:false,options:true};e.replace(/[^a-z]i/g,"").split("").forEach(e=>{if(isCleanMode(e)){r=e;t.cleanMode=true}else{t.options=t.options&&isKnownOption(n[n.length]=`-${e}`)}});return{cleanMode:r,options:n,valid:t}}function isCleanMode(e){return e===i.FORCE||e===i.DRY_RUN}function isKnownOption(e){return/^-[a-z]$/i.test(e)&&u.has(e.charAt(1))}function isInteractiveMode(e){if(/^-[^\-]/.test(e)){return e.indexOf("i")>0}return e==="--interactive"}},3173:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.cloneMirrorTask=r.cloneTask=void 0;const t=n(2815);const o=n(847);function cloneTask(e,r,n){const o=["clone",...n];if(typeof e==="string"){o.push(e)}if(typeof r==="string"){o.push(r)}return t.straightThroughStringTask(o)}r.cloneTask=cloneTask;function cloneMirrorTask(e,r,n){o.append(n,"--mirror");return cloneTask(e,r,n)}r.cloneMirrorTask=cloneMirrorTask},5494:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.commitTask=void 0;const t=n(3026);function commitTask(e,r,n){const o=["commit",...e.flatMap(e=>["-m",e]),...r,...n];return{commands:o,format:"utf-8",parser:t.parseCommitResult}}r.commitTask=commitTask},7597:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.listConfigTask=r.addConfigTask=void 0;const t=n(7219);function addConfigTask(e,r,n=false){const t=["config","--local"];if(n){t.push("--add")}t.push(e,r);return{commands:t,format:"utf-8",parser(e){return e}}}r.addConfigTask=addConfigTask;function listConfigTask(){return{commands:["config","--list","--show-origin","--null"],format:"utf-8",parser(e){return t.configListParser(e)}}}r.listConfigTask=listConfigTask},9241:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.diffSummaryTask=void 0;const t=n(2024);function diffSummaryTask(e){return{commands:["diff","--stat=4096",...e],format:"utf-8",parser(e){return t.parseDiffResult(e)}}}r.diffSummaryTask=diffSummaryTask},8823:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.fetchTask=void 0;const t=n(6254);function fetchTask(e,r,n){const o=["fetch",...n];if(e&&r){o.push(e,r)}return{commands:o,format:"utf-8",parser:t.parseFetchResult}}r.fetchTask=fetchTask},8199:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.hashObjectTask=void 0;const t=n(2815);function hashObjectTask(e,r){const n=["hash-object",e];if(r){n.push("-w")}return t.straightThroughStringTask(n,true)}r.hashObjectTask=hashObjectTask},6016:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.initTask=void 0;const t=n(8690);const o="--bare";function hasBareCommand(e){return e.includes(o)}function initTask(e=false,r,n){const s=["init",...n];if(e&&!hasBareCommand(s)){s.splice(1,0,o)}return{commands:s,concatStdErr:false,format:"utf-8",parser(e){return t.parseInit(s.includes("--bare"),r,e)}}}r.initTask=initTask},8627:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.logTask=r.parseLogOptions=void 0;const t=n(9729);const o=n(847);const s=new Set(["--pretty","max-count","maxCount","n","file","format","from","to","splitter","symmetric","multiLine","strictDate"]);function prettyFormat(e,r){const n=[];const t=[];Object.entries(e).forEach(([e,r])=>{n.push(e);t.push(r)});return[n,t.join(r)]}function userOptions(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!s.has(e)))}function parseLogOptions(e={},r=[]){const n=e.splitter||t.SPLITTER;const s=e.format||{hash:"%H",date:e.strictDate===false?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:"%aN",author_email:"%ae"};const[i,u]=prettyFormat(s,n);const c=[];const a=[`--pretty=format:${t.START_BOUNDARY}${u}${t.COMMIT_BOUNDARY}`,...r];const f=e.n||e["max-count"]||e.maxCount;if(f){a.push(`--max-count=${f}`)}if(e.from&&e.to){const r=e.symmetric!==false?"...":"..";c.push(`${e.from}${r}${e.to}`)}if(e.file){c.push("--follow",e.file)}o.appendTaskOptions(userOptions(e),a);return{fields:i,splitter:n,commands:[...a,...c]}}r.parseLogOptions=parseLogOptions;function logTask(e,r,n){return{commands:["log",...n],format:"utf-8",parser:t.createListLogSummaryParser(e,r)}}r.logTask=logTask},8829:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.mergeTask=void 0;const t=n(4732);const o=n(6412);const s=n(2815);function mergeTask(e){if(!e.length){return s.configurationErrorTask("Git.merge requires at least one option")}return{commands:["merge",...e],format:"utf-8",parser(e,r){const n=o.parseMergeResult(e,r);if(n.failed){throw new t.GitResponseError(n)}return n}}}r.mergeTask=mergeTask},6520:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.moveTask=void 0;const t=n(7444);const o=n(847);function moveTask(e,r){return{commands:["mv","-v",...o.asArray(e),r],format:"utf-8",parser:t.parseMoveResult}}r.moveTask=moveTask},4636:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.pullTask=void 0;const t=n(5658);function pullTask(e,r,n){const o=["pull",...n];if(e&&r){o.splice(1,0,e,r)}return{commands:o,format:"utf-8",parser(e,r){return t.parsePullResult(e,r)}}}r.pullTask=pullTask},1435:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.pushTask=r.pushTagsTask=void 0;const t=n(8530);const o=n(847);function pushTagsTask(e={},r){o.append(r,"--tags");return pushTask(e,r)}r.pushTagsTask=pushTagsTask;function pushTask(e={},r){const n=["push",...r];if(e.branch){n.splice(1,0,e.branch)}if(e.remote){n.splice(1,0,e.remote)}o.remove(n,"-v");o.append(n,"--verbose");o.append(n,"--porcelain");return{commands:n,format:"utf-8",parser:t.parsePushResult}}r.pushTask=pushTask},9866:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.removeRemoteTask=r.remoteTask=r.listRemotesTask=r.getRemotesTask=r.addRemoteTask=void 0;const t=n(9999);const o=n(2815);function addRemoteTask(e,r,n=[]){return o.straightThroughStringTask(["remote","add",...n,e,r])}r.addRemoteTask=addRemoteTask;function getRemotesTask(e){const r=["remote"];if(e){r.push("-v")}return{commands:r,format:"utf-8",parser:e?t.parseGetRemotesVerbose:t.parseGetRemotes}}r.getRemotesTask=getRemotesTask;function listRemotesTask(e=[]){const r=[...e];if(r[0]!=="ls-remote"){r.unshift("ls-remote")}return o.straightThroughStringTask(r)}r.listRemotesTask=listRemotesTask;function remoteTask(e=[]){const r=[...e];if(r[0]!=="remote"){r.unshift("remote")}return o.straightThroughStringTask(r)}r.remoteTask=remoteTask;function removeRemoteTask(e){return o.straightThroughStringTask(["remote","remove",e])}r.removeRemoteTask=removeRemoteTask},2377:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getResetMode=r.resetTask=r.ResetMode=void 0;const t=n(2815);var o;(function(e){e["MIXED"]="mixed";e["SOFT"]="soft";e["HARD"]="hard";e["MERGE"]="merge";e["KEEP"]="keep"})(o=r.ResetMode||(r.ResetMode={}));const s=Array.from(Object.values(o));function resetTask(e,r){const n=["reset"];if(isValidResetMode(e)){n.push(`--${e}`)}n.push(...r);return t.straightThroughStringTask(n)}r.resetTask=resetTask;function getResetMode(e){if(isValidResetMode(e)){return e}switch(typeof e){case"string":case"undefined":return o.SOFT}return}r.getResetMode=getResetMode;function isValidResetMode(e){return s.includes(e)}},810:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.stashListTask=void 0;const t=n(9729);const o=n(8627);function stashListTask(e={},r){const n=o.parseLogOptions(e);const s=t.createListLogSummaryParser(n.splitter,n.fields);return{commands:["stash","list",...n.commands,...r],format:"utf-8",parser:s}}r.stashListTask=stashListTask},9197:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.statusTask=void 0;const t=n(6790);function statusTask(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u",...e],parser(e){return t.parseStatusSummary(e)}}}r.statusTask=statusTask},8772:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.updateSubModuleTask=r.subModuleTask=r.initSubModuleTask=r.addSubModuleTask=void 0;const t=n(2815);function addSubModuleTask(e,r){return subModuleTask(["add",e,r])}r.addSubModuleTask=addSubModuleTask;function initSubModuleTask(e){return subModuleTask(["init",...e])}r.initSubModuleTask=initSubModuleTask;function subModuleTask(e){const r=[...e];if(r[0]!=="submodule"){r.unshift("submodule")}return t.straightThroughStringTask(r)}r.subModuleTask=subModuleTask;function updateSubModuleTask(e){return subModuleTask(["update",...e])}r.updateSubModuleTask=updateSubModuleTask},8540:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.addAnnotatedTagTask=r.addTagTask=r.tagListTask=void 0;const t=n(4539);function tagListTask(e=[]){const r=e.some(e=>/^--sort=/.test(e));return{format:"utf-8",commands:["tag","-l",...e],parser(e){return t.parseTagList(e,r)}}}r.tagListTask=tagListTask;function addTagTask(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}r.addTagTask=addTagTask;function addAnnotatedTagTask(e,r){return{format:"utf-8",commands:["tag","-a","-m",r,e],parser(){return{name:e}}}}r.addAnnotatedTagTask=addAnnotatedTagTask},2815:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isEmptyTask=r.isBufferTask=r.straightThroughStringTask=r.configurationErrorTask=r.adhocExecTask=r.EMPTY_COMMANDS=void 0;const t=n(740);r.EMPTY_COMMANDS=[];function adhocExecTask(e){return{commands:r.EMPTY_COMMANDS,format:"utf-8",parser:e}}r.adhocExecTask=adhocExecTask;function configurationErrorTask(e){return{commands:r.EMPTY_COMMANDS,format:"utf-8",parser(){throw typeof e==="string"?new t.TaskConfigurationError(e):e}}}r.configurationErrorTask=configurationErrorTask;function straightThroughStringTask(e,r=false){return{commands:e,format:"utf-8",parser(e){return r?String(e).trim():e}}}r.straightThroughStringTask=straightThroughStringTask;function isBufferTask(e){return e.format==="buffer"}r.isBufferTask=isBufferTask;function isEmptyTask(e){return!e.commands.length}r.isEmptyTask=isEmptyTask},7366:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.filterHasLength=r.filterFunction=r.filterPlainObject=r.filterStringOrStringArray=r.filterStringArray=r.filterString=r.filterPrimitives=r.filterArray=r.filterType=void 0;const t=n(8237);function filterType(e,r,n){if(r(e)){return e}return arguments.length>2?n:undefined}r.filterType=filterType;const o=e=>{return Array.isArray(e)};r.filterArray=o;function filterPrimitives(e,r){return/number|string|boolean/.test(typeof e)&&(!r||!r.includes(typeof e))}r.filterPrimitives=filterPrimitives;const s=e=>{return typeof e==="string"};r.filterString=s;const i=e=>{return Array.isArray(e)&&e.every(r.filterString)};r.filterStringArray=i;const u=e=>{return r.filterString(e)||Array.isArray(e)&&e.every(r.filterString)};r.filterStringOrStringArray=u;function filterPlainObject(e){return!!e&&t.objectToString(e)==="[object Object]"}r.filterPlainObject=filterPlainObject;function filterFunction(e){return typeof e==="function"}r.filterFunction=filterFunction;const c=e=>{if(e==null||"number|boolean|function".includes(typeof e)){return false}return Array.isArray(e)||typeof e==="string"||typeof e.length==="number"};r.filterHasLength=c},2185:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.ExitCodes=void 0;var n;(function(e){e[e["SUCCESS"]=0]="SUCCESS";e[e["ERROR"]=1]="ERROR";e[e["UNCLEAN"]=128]="UNCLEAN"})(n=r.ExitCodes||(r.ExitCodes={}))},6578:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.GitOutputStreams=void 0;class GitOutputStreams{constructor(e,r){this.stdOut=e;this.stdErr=r}asStrings(){return new GitOutputStreams(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}r.GitOutputStreams=GitOutputStreams},847:function(e,r,n){"use strict";var t=this&&this.__createBinding||(Object.create?function(e,r,n,t){if(t===undefined)t=n;Object.defineProperty(e,t,{enumerable:true,get:function(){return r[n]}})}:function(e,r,n,t){if(t===undefined)t=n;e[t]=r[n]});var o=this&&this.__exportStar||function(e,r){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(r,n))t(r,e,n)};Object.defineProperty(r,"__esModule",{value:true});o(n(7366),r);o(n(2185),r);o(n(6578),r);o(n(9536),r);o(n(5218),r);o(n(3546),r);o(n(1351),r);o(n(8237),r)},9536:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.RemoteLineParser=r.LineParser=void 0;class LineParser{constructor(e,r){this.matches=[];this.parse=((e,r)=>{this.resetMatches();if(!this._regExp.every((r,n)=>this.addMatch(r,n,e(n)))){return false}return this.useMatches(r,this.prepareMatches())!==false});this._regExp=Array.isArray(e)?e:[e];if(r){this.useMatches=r}}useMatches(e,r){throw new Error(`LineParser:useMatches not implemented`)}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,r,n){const t=n&&e.exec(n);if(t){this.pushMatch(r,t)}return!!t}pushMatch(e,r){this.matches.push(...r.slice(1))}}r.LineParser=LineParser;class RemoteLineParser extends LineParser{addMatch(e,r,n){return/^remote:\s/.test(String(n))&&super.addMatch(e,r,n)}pushMatch(e,r){if(e>0||r.length>1){super.pushMatch(e,r)}}}r.RemoteLineParser=RemoteLineParser},5218:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createInstanceConfig=void 0;const n={binary:"git",maxConcurrentProcesses:5};function createInstanceConfig(...e){const r=process.cwd();const t=Object.assign(Object.assign({baseDir:r},n),...e.filter(e=>typeof e==="object"&&e));t.baseDir=t.baseDir||r;return t}r.createInstanceConfig=createInstanceConfig},3546:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.trailingFunctionArgument=r.trailingOptionsArgument=r.getTrailingOptions=r.appendTaskOptions=void 0;const t=n(7366);const o=n(8237);function appendTaskOptions(e,r=[]){if(!t.filterPlainObject(e)){return r}return Object.keys(e).reduce((r,n)=>{const o=e[n];if(t.filterPrimitives(o,["boolean"])){r.push(n+"="+o)}else{r.push(n)}return r},r)}r.appendTaskOptions=appendTaskOptions;function getTrailingOptions(e,r=0,n=false){const t=[];for(let n=0,o=r<0?e.length:r;n{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parseStringResponse=r.callTaskParser=void 0;const t=n(8237);function callTaskParser(e,r){return e(r.stdOut,r.stdErr)}r.callTaskParser=callTaskParser;function parseStringResponse(e,r,...n){n.forEach(n=>{for(let o=t.toLinesWithContent(n),s=0,i=o.length;s{if(s+e>=i){return}return o[s+e]};r.some(({parse:r})=>r(n,e))}});return e}r.parseStringResponse=parseStringResponse},8237:(e,r,n)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.asNumber=r.asStringArray=r.asArray=r.objectToString=r.remove=r.append=r.folderExists=r.forEachLineWithContent=r.toLinesWithContent=r.last=r.first=r.splitOn=r.isUserFunction=r.asFunction=r.NOOP=void 0;const t=n(4751);const o=()=>{};r.NOOP=o;function asFunction(e){return typeof e==="function"?e:r.NOOP}r.asFunction=asFunction;function isUserFunction(e){return typeof e==="function"&&e!==r.NOOP}r.isUserFunction=isUserFunction;function splitOn(e,r){const n=e.indexOf(r);if(n<=0){return[e,""]}return[e.substr(0,n),e.substr(n+1)]}r.splitOn=splitOn;function first(e,r=0){return isArrayLike(e)&&e.length>r?e[r]:undefined}r.first=first;function last(e,r=0){if(isArrayLike(e)&&e.length>r){return e[e.length-1-r]}}r.last=last;function isArrayLike(e){return!!(e&&typeof e.length==="number")}function toLinesWithContent(e,r=true,n="\n"){return e.split(n).reduce((e,n)=>{const t=r?n.trim():n;if(t){e.push(t)}return e},[])}r.toLinesWithContent=toLinesWithContent;function forEachLineWithContent(e,r){return toLinesWithContent(e,true).map(e=>r(e))}r.forEachLineWithContent=forEachLineWithContent;function folderExists(e){return t.exists(e,t.FOLDER)}r.folderExists=folderExists;function append(e,r){if(Array.isArray(e)){if(!e.includes(r)){e.push(r)}}else{e.add(r)}return r}r.append=append;function remove(e,r){if(Array.isArray(e)){const n=e.indexOf(r);if(n>=0){e.splice(n,1)}}else{e.delete(r)}return r}r.remove=remove;r.objectToString=Object.prototype.toString.call.bind(Object.prototype.toString);function asArray(e){return Array.isArray(e)?e:[e]}r.asArray=asArray;function asStringArray(e){return asArray(e).map(String)}r.asStringArray=asStringArray;function asNumber(e,r=0){if(e==null){return r}const n=parseInt(e,10);return isNaN(n)?r:n}r.asNumber=asNumber},9318:(e,r,n)=>{"use strict";const t=n(2087);const o=n(3867);const s=n(1621);const{env:i}=process;let u;if(s("no-color")||s("no-colors")||s("color=false")||s("color=never")){u=0}else if(s("color")||s("colors")||s("color=true")||s("color=always")){u=1}if("FORCE_COLOR"in i){if(i.FORCE_COLOR==="true"){u=1}else if(i.FORCE_COLOR==="false"){u=0}else{u=i.FORCE_COLOR.length===0?1:Math.min(parseInt(i.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e,r){if(u===0){return 0}if(s("color=16m")||s("color=full")||s("color=truecolor")){return 3}if(s("color=256")){return 2}if(e&&!r&&u===undefined){return 0}const n=u||0;if(i.TERM==="dumb"){return n}if(process.platform==="win32"){const e=t.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in i){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in i)||i.CI_NAME==="codeship"){return 1}return n}if("TEAMCITY_VERSION"in i){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0}if(i.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(i.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)){return 1}if("COLORTERM"in i){return 1}return n}function getSupportLevel(e){const r=supportsColor(e,e&&e.isTTY);return translateLevel(r)}e.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,o.isatty(1))),stderr:translateLevel(supportsColor(true,o.isatty(2)))}},399:function(e,r,n){"use strict";var t=this&&this.__awaiter||function(e,r,n,t){function adopt(e){return e instanceof n?e:new n(function(r){r(e)})}return new(n||(n=Promise))(function(n,o){function fulfilled(e){try{step(t.next(e))}catch(e){o(e)}}function rejected(e){try{step(t["throw"](e))}catch(e){o(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((t=t.apply(e,r||[])).next())})};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});const s=n(2186);const i=o(n(5622));const u=o(n(1477));const c=o(n(1917));const a=n(2629);const f=i.default.join(process.cwd(),a.getInput("cwd")||"");const l=u.default({baseDir:f});console.log(`Running in ${f}`);(()=>t(void 0,void 0,void 0,function*(){var e;yield checkInputs().catch(s.setFailed);s.startGroup("Internal logs");s.info("> Staging files...");if(a.getInput("add")){s.info("> Adding files...");yield add()}else s.info("> No files to add.");if(a.getInput("remove")){s.info("> Removing files...");yield remove()}else s.info("> No files to remove.");s.info("> Checking for uncommitted changes in the git working tree...");const r=(yield l.diffSummary(["--cached"])).files.length;if(r>0){s.info(`> Found ${r} changed files.`);yield l.addConfig("user.email",a.getInput("author_email"),undefined,a.log).addConfig("user.name",a.getInput("author_name"),undefined,a.log);s.debug("> Current git config\n"+JSON.stringify((yield l.listConfig()).all,null,2));yield l.fetch(["--tags","--force"],a.log);s.info("> Switching/creating branch...");yield l.checkout(a.getInput("branch"),undefined,a.log).catch(()=>l.checkoutLocalBranch(a.getInput("branch"),a.log));if(a.getInput("pull_strategy")=="NO-PULL")s.info("> Not pulling from repo.");else{s.info("> Pulling from remote...");yield l.fetch(undefined,a.log).pull(undefined,undefined,{[a.getInput("pull_strategy")]:null},a.log)}s.info("> Re-staging files...");if(a.getInput("add"))yield add({ignoreErrors:true});if(a.getInput("remove"))yield remove({ignoreErrors:true});s.info("> Creating commit...");yield l.commit(a.getInput("message"),undefined,Object.assign({"--author":`"${a.getInput("author_name")} <${a.getInput("author_email")}>"`},a.getInput("signoff")?{"--signoff":null}:{}),(e,r)=>{if(r)a.setOutput("committed","true");return a.log(e,r)});if(a.getInput("tag")){s.info("> Tagging commit...");yield l.tag(a.matchGitArgs(a.getInput("tag")),(e,r)=>{if(r)a.setOutput("tagged","true");return a.log(e,r)}).then(e=>{a.setOutput("tagged","true");return a.log(null,e)}).catch(e=>s.setFailed(e))}else s.info("> No tag info provided.");const n=(e=a.parseBool(a.getInput("push")))!==null&&e!==void 0?e:a.getInput("push");if(n){s.info("> Pushing commit to repo...");if(n===true){s.debug(`Running: git push origin ${a.getInput("branch")} --set-upstream`);yield l.push("origin",a.getInput("branch"),{"--set-upstream":null},(e,r)=>{if(r)a.setOutput("pushed","true");return a.log(e,r)})}else{s.debug(`Running: git push ${n}`);yield l.push(undefined,undefined,a.matchGitArgs(n),(e,r)=>{if(r)a.setOutput("pushed","true");return a.log(e,r)})}if(a.getInput("tag")){s.info("> Pushing tags to repo...");yield l.pushTags("origin",undefined,(e,r)=>a.log(undefined,e||r)).catch(()=>{s.info("> Tag push failed: deleting remote tag and re-pushing...");return l.push(undefined,undefined,{"--delete":null,origin:null,[a.matchGitArgs(a.getInput("tag")).filter(e=>!e.startsWith("-"))[0]]:null},a.log).pushTags("origin",undefined,a.log)})}else s.info("> No tags to push.")}else s.info("> Not pushing anything.");s.endGroup();s.info("> Task completed.")}else{s.endGroup();s.info("> Working tree clean. Nothing to commit.")}}))().then(logOutputs).catch(e=>{s.endGroup();logOutputs();s.setFailed(e)});function checkInputs(){var e,r,n,o;return t(this,void 0,void 0,function*(){function setInput(e,r){if(r)return process.env[`INPUT_${e.toUpperCase()}`]=r;else return delete process.env[`INPUT_${e.toUpperCase()}`]}function setDefault(e,r){if(!a.getInput(e))setInput(e,r);return a.getInput(e)}const t=process.env.GITHUB_EVENT_PATH,i=t&&require(t),u=(e=process.env.GITHUB_EVENT_NAME)===null||e===void 0?void 0:e.includes("pull_request"),c=u?(n=(r=i===null||i===void 0?void 0:i.pull_request)===null||r===void 0?void 0:r.head)===null||n===void 0?void 0:n.ref:(o=process.env.GITHUB_REF)===null||o===void 0?void 0:o.substring(11);if(!a.getInput("add")&&!a.getInput("remove"))throw new Error("Both 'add' and 'remove' are empty, the action has nothing to do.");if(a.getInput("add")){const e=parseInputArray(a.getInput("add"));if(e.length==1)s.info("Add input parsed as single string, running 1 git add command.");else if(e.length>1)s.info(`Add input parsed as string array, running ${e.length} git add commands.`);else s.setFailed("Add input: array length < 1")}if(a.getInput("remove")){const e=parseInputArray(a.getInput("remove"));if(e.length==1)s.info("Remove input parsed as single string, running 1 git rm command.");else if(e.length>1)s.info(`Remove input parsed as string array, running ${e.length} git rm commands.`);else s.setFailed("Remove input: array length < 1")}setDefault("author_name",`${process.env.GITHUB_ACTOR}`);setDefault("author_email",`${process.env.GITHUB_ACTOR}@users.noreply.github.com`);s.info(`> Using '${a.getInput("author_name")} <${a.getInput("author_email")}>' as author.`);setDefault("message",`Commit from GitHub Actions (${process.env.GITHUB_WORKFLOW})`);s.info(`> Using "${a.getInput("message")}" as commit message.`);const f=setDefault("branch",c||"");if(u)s.info(`> Running for a PR, the action will use '${f}' as ref.`);if(a.getInput("signoff")){const e=a.parseBool(a.getInput("signoff"));if(e===undefined)throw new Error(`"${a.getInput("signoff")}" is not a valid value for the 'signoff' input: only "true" and "false" are allowed.`);if(!e)setInput("signoff",undefined);s.debug(`Current signoff option: ${a.getInput("signoff")} (${typeof a.getInput("signoff")})`)}if(a.getInput("pull_strategy")=="NO-PULL")s.debug("NO-PULL found: won't pull from remote.");if(a.getInput("push")){const e=a.parseBool(a.getInput("push"));s.debug(`Current push option: '${a.getInput("push")}' (parsed as ${typeof e})`)}})}function add({logWarning:e=true,ignoreErrors:r=false}={}){return t(this,void 0,void 0,function*(){const n=a.getInput("add");if(!n)return[];const t=parseInputArray(n);const o=[];for(const n of t){o.push(yield l.add(a.matchGitArgs(n),(e,n)=>a.log(r?null:e,n)).catch(t=>{if(r)return;if(t.message.includes("fatal: pathspec")&&t.message.includes("did not match any files")&&e)s.warning(`Add command did not match any file:\n git add ${n}`);else throw t}))}return o})}function remove({logWarning:e=true,ignoreErrors:r=false}={}){return t(this,void 0,void 0,function*(){const n=a.getInput("remove");if(!n)return[];const t=parseInputArray(n);const o=[];for(const n of t){o.push(yield l.rm(a.matchGitArgs(n),(e,n)=>a.log(r?null:e,n)).catch(t=>{if(r)return;if(t.message.includes("fatal: pathspec")&&t.message.includes("did not match any files"))e&&s.warning(`Remove command did not match any file:\n git rm ${n}`);else throw t}))}return o})}function parseInputArray(e){try{const r=JSON.parse(e);if(r&&Array.isArray(r)&&r.every(e=>typeof e=="string")){s.debug(`Input parsed as JSON array of length ${r.length}`);return r}}catch(e){}try{const r=c.default.load(e);if(r&&Array.isArray(r)&&r.every(e=>typeof e=="string")){s.debug(`Input parsed as YAML array of length ${r.length}`);return r}}catch(e){}s.debug("Input parsed as single string");return[e]}function logOutputs(){s.startGroup("Outputs");for(const e in a.outputs){s.info(`${e}: ${a.outputs[e]}`)}s.endGroup()}},2629:function(e,r,n){"use strict";var t=this&&this.__createBinding||(Object.create?function(e,r,n,t){if(t===undefined)t=n;Object.defineProperty(e,t,{enumerable:true,get:function(){return r[n]}})}:function(e,r,n,t){if(t===undefined)t=n;e[t]=r[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))t(r,e,n);o(r,e);return r};Object.defineProperty(r,"__esModule",{value:true});r.setOutput=r.parseBool=r.matchGitArgs=r.log=r.getInput=r.outputs=void 0;const i=s(n(2186));r.outputs={committed:"false",pushed:"false",tagged:"false"};function getInput(e){return i.getInput(e)}r.getInput=getInput;function log(e,r){if(r)console.log(r);if(e)i.error(e)}r.log=log;function matchGitArgs(e){return e.match(/(?:[^\s"]+|"[^"]*")+/g)||[]}r.matchGitArgs=matchGitArgs;function parseBool(e){try{const r=JSON.parse(e);if(typeof r=="boolean")return r}catch(e){}}r.parseBool=parseBool;function setOutput(e,n){i.debug(`Setting output: ${e}=${n}`);r.outputs[e]=n;return i.setOutput(e,n)}r.setOutput=setOutput;for(const e in r.outputs)setOutput(e,r.outputs[e])},3129:e=>{"use strict";e.exports=require("child_process")},5747:e=>{"use strict";e.exports=require("fs")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},3867:e=>{"use strict";e.exports=require("tty")},1669:e=>{"use strict";e.exports=require("util")}};var r={};function __nccwpck_require__(n){if(r[n]){return r[n].exports}var t=r[n]={exports:{}};var o=true;try{e[n].call(t.exports,t,t.exports,__nccwpck_require__);o=false}finally{if(o)delete r[n]}return t.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(399)})(); \ No newline at end of file +module.exports = +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 7351: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const os = __importStar(__nccwpck_require__(2087)); +const utils_1 = __nccwpck_require__(5278); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 2186: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const command_1 = __nccwpck_require__(7351); +const file_command_1 = __nccwpck_require__(717); +const utils_1 = __nccwpck_require__(5278); +const os = __importStar(__nccwpck_require__(2087)); +const path = __importStar(__nccwpck_require__(5622)); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + const delimiter = '_GitHubActionsFileCommandDelimeter_'; + const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; + file_command_1.issueCommand('ENV', commandValue); + } + else { + command_1.issueCommand('set-env', { name }, convertedVal); + } +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. The value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, value); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + */ +function error(message) { + command_1.issue('error', message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds an warning issue + * @param message warning issue message. Errors will be converted to string via toString() + */ +function warning(message) { + command_1.issue('warning', message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 717: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// For internal use, subject to change. +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(__nccwpck_require__(5747)); +const os = __importStar(__nccwpck_require__(2087)); +const utils_1 = __nccwpck_require__(5278); +function issueCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueCommand = issueCommand; +//# sourceMappingURL=file-command.js.map + +/***/ }), + +/***/ 5278: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 4751: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", ({ value: true })); +__export(__nccwpck_require__(2825)); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 2825: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const fs_1 = __nccwpck_require__(5747); +const debug_1 = __importDefault(__nccwpck_require__(8231)); +const log = debug_1.default('@kwsites/file-exists'); +function check(path, isFile, isDirectory) { + log(`checking %s`, path); + try { + const stat = fs_1.statSync(path); + if (stat.isFile() && isFile) { + log(`[OK] path represents a file`); + return true; + } + if (stat.isDirectory() && isDirectory) { + log(`[OK] path represents a directory`); + return true; + } + log(`[FAIL] path represents something other than a file or directory`); + return false; + } + catch (e) { + if (e.code === 'ENOENT') { + log(`[FAIL] path is not accessible: %o`, e); + return false; + } + log(`[FATAL] %o`, e); + throw e; + } +} +/** + * Synchronous validation of a path existing either as a file or as a directory. + * + * @param {string} path The path to check + * @param {number} type One or both of the exported numeric constants + */ +function exists(path, type = exports.READABLE) { + return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0); +} +exports.exists = exists; +/** + * Constant representing a file + */ +exports.FILE = 1; +/** + * Constant representing a folder + */ +exports.FOLDER = 2; +/** + * Constant representing either a file or a folder + */ +exports.READABLE = exports.FILE + exports.FOLDER; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 9819: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDeferred = exports.deferred = void 0; +/** + * Creates a new `DeferredPromise` + * + * ```typescript + import {deferred} from '@kwsites/promise-deferred`; + ``` + */ +function deferred() { + let done; + let fail; + let status = 'pending'; + const promise = new Promise((_done, _fail) => { + done = _done; + fail = _fail; + }); + return { + promise, + done(result) { + if (status === 'pending') { + status = 'resolved'; + done(result); + } + }, + fail(error) { + if (status === 'pending') { + status = 'rejected'; + fail(error); + } + }, + get fulfilled() { + return status !== 'pending'; + }, + get status() { + return status; + }, + }; +} +exports.deferred = deferred; +/** + * Alias of the exported `deferred` function, to help consumers wanting to use `deferred` as the + * local variable name rather than the factory import name, without needing to rename on import. + * + * ```typescript + import {createDeferred} from '@kwsites/promise-deferred`; + ``` + */ +exports.createDeferred = deferred; +/** + * Default export allows use as: + * + * ```typescript + import deferred from '@kwsites/promise-deferred`; + ``` + */ +exports.default = deferred; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 8222: +/***/ ((module, exports, __nccwpck_require__) => { + +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ +function log(...args) { + // This hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return typeof console === 'object' && + console.log && + console.log(...args); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = __nccwpck_require__(6243)(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; + + +/***/ }), + +/***/ 6243: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = __nccwpck_require__(900); + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * Active `debug` instances. + */ + createDebug.instances = []; + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return match; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; + // Debug.formatArgs = formatArgs; + // debug.rawLog = rawLog; + + // env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + + return debug; + } + + function destroy() { + const index = createDebug.instances.indexOf(this); + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + return false; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + const instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; + + +/***/ }), + +/***/ 8231: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = __nccwpck_require__(8222); +} else { + module.exports = __nccwpck_require__(5332); +} + + +/***/ }), + +/***/ 5332: +/***/ ((module, exports, __nccwpck_require__) => { + +/** + * Module dependencies. + */ + +const tty = __nccwpck_require__(3867); +const util = __nccwpck_require__(1669); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = __nccwpck_require__(9318); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = __nccwpck_require__(6243)(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .replace(/\s*\n\s*/g, ' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + + +/***/ }), + +/***/ 1621: +/***/ ((module) => { + +"use strict"; + + +module.exports = (flag, argv = process.argv) => { + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf('--'); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); +}; + + +/***/ }), + +/***/ 1917: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + + +var loader = __nccwpck_require__(1161); +var dumper = __nccwpck_require__(8866); + + +function renamed(from, to) { + return function () { + throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + + 'Use yaml.' + to + ' instead, which is now safe by default.'); + }; +} + + +module.exports.Type = __nccwpck_require__(6073); +module.exports.Schema = __nccwpck_require__(1082); +module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(8562); +module.exports.JSON_SCHEMA = __nccwpck_require__(1035); +module.exports.CORE_SCHEMA = __nccwpck_require__(2011); +module.exports.DEFAULT_SCHEMA = __nccwpck_require__(8759); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.dump = dumper.dump; +module.exports.YAMLException = __nccwpck_require__(8179); + +// Removed functions from JS-YAML 3.0.x +module.exports.safeLoad = renamed('safeLoad', 'load'); +module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll'); +module.exports.safeDump = renamed('safeDump', 'dump'); + + +/***/ }), + +/***/ 6829: +/***/ ((module) => { + +"use strict"; + + + +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} + + +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} + + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; +} + + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; +} + + +function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; +} + + +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} + + +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; + + +/***/ }), + +/***/ 8866: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/*eslint-disable no-use-before-define*/ + +var common = __nccwpck_require__(6829); +var YAMLException = __nccwpck_require__(8179); +var DEFAULT_SCHEMA = __nccwpck_require__(8759); + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_BOM = 0xFEFF; +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_EQUALS = 0x3D; /* = */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + + +var QUOTING_TYPE_SINGLE = 1, + QUOTING_TYPE_DOUBLE = 2; + +function State(options) { + this.schema = options['schema'] || DEFAULT_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options['forceQuotes'] || false; + this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// [34] ns-char ::= nb-char - s-white +// [27] nb-char ::= c-printable - b-char - c-byte-order-mark +// [26] b-char ::= b-line-feed | b-carriage-return +// Including s-white (for some reason, examples doesn't match specs in this aspect) +// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark +function isNsCharOrWhitespace(c) { + return isPrintable(c) + && c !== CHAR_BOM + // - b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; +} + +// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out +// c = flow-in ⇒ ns-plain-safe-in +// c = block-key ⇒ ns-plain-safe-out +// c = flow-key ⇒ ns-plain-safe-in +// [128] ns-plain-safe-out ::= ns-char +// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator +// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) +// | ( /* An ns-char preceding */ “#” ) +// | ( “:” /* Followed by an ns-plain-safe(c) */ ) +function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return ( + // ns-plain-safe + inblock ? // c = flow-in + cIsNsCharOrWhitespace + : cIsNsCharOrWhitespace + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + ) + // ns-plain-char + && c !== CHAR_SHARP // false on '#' + && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' + || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' + || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part + return isPrintable(c) && c !== CHAR_BOM + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Simplified test for values allowed as the last character in plain style. +function isPlainSafeLast(c) { + // just not whitespace or colon, it will be checked to be plain character later + return !isWhitespace(c) && c !== CHAR_COLON; +} + +// Same as 'string'.codePointAt(pos), but works in older browsers. +function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, + testAmbiguousType, quotingType, forceQuotes, inblock) { + + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(codePointAt(string, 0)) + && isPlainSafeLast(codePointAt(string, string.length - 1)); + + if (singleLineOnly || forceQuotes) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey, inblock) { + state.dump = (function () { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); + } + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, + testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char = 0; + var escapeSeq; + + for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 0x10000) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level, value, false, false) || + (typeof value === 'undefined' && + writeNode(state, level, null, false, false))) { + + if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level + 1, value, true, true, false, true) || + (typeof value === 'undefined' && + writeNode(state, level + 1, null, true, true, false, true))) { + + if (!compact || _result !== '') { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (_result !== '') pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || _result !== '') { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = '?'; + } + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey, inblock); + } + } else if (type === '[object Undefined]') { + return false; + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + // Need to encode all characters except those allowed by the spec: + // + // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ + // [36] ns-hex-digit ::= ns-dec-digit + // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ + // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ + // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” + // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” + // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” + // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” + // + // Also need to encode '!' because it has special meaning (end of tag prefix). + // + tagStr = encodeURI( + state.tag[0] === '!' ? state.tag.slice(1) : state.tag + ).replace(/!/g, '%21'); + + if (state.tag[0] === '!') { + tagStr = '!' + tagStr; + } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { + tagStr = '!!' + tagStr.slice(18); + } else { + tagStr = '!<' + tagStr + '>'; + } + + state.dump = tagStr + ' ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + var value = input; + + if (state.replacer) { + value = state.replacer.call({ '': value }, '', value); + } + + if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; + + return ''; +} + +module.exports.dump = dump; + + +/***/ }), + +/***/ 8179: +/***/ ((module) => { + +"use strict"; +// YAML error class. http://stackoverflow.com/questions/8458984 +// + + + +function formatError(exception, compact) { + var where = '', message = exception.reason || '(unknown reason)'; + + if (!exception.mark) return message; + + if (exception.mark.name) { + where += 'in "' + exception.mark.name + '" '; + } + + where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; + + if (!compact && exception.mark.snippet) { + where += '\n\n' + exception.mark.snippet; + } + + return message + ' ' + where; +} + + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + return this.name + ': ' + formatError(this, compact); +}; + + +module.exports = YAMLException; + + +/***/ }), + +/***/ 1161: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/*eslint-disable max-len,no-use-before-define*/ + +var common = __nccwpck_require__(6829); +var YAMLException = __nccwpck_require__(8179); +var makeSnippet = __nccwpck_require__(6975); +var DEFAULT_SCHEMA = __nccwpck_require__(8759); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_SCHEMA; + this.onWarning = options['onWarning'] || null; + // (Hidden) Remove? makes the loader to expect YAML 1.1 documents + // if such documents have no explicit %YAML directive + this.legacy = options['legacy'] || false; + + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + // position of first leading tab in the current line, + // used to make sure there are no tabs in the indentation + this.firstTabInLine = -1; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + + mark.snippet = makeSnippet(mark); + + return new YAMLException(message, mark); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, 'tag prefix is malformed: ' + prefix); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, + startLine, startLineStart, startPos) { + + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + + // used for this specific key only because Object.defineProperty is slow + if (keyNode === '__proto__') { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _lineStart, + _pos, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = Object.create(null), + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } else if (ch === 0x2C/* , */) { + // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 + throwError(state, "expected the node content, but found ','"); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; // Save the current line. + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _keyLine, + _keyLineStart, + _keyPos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = Object.create(null), + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + // Neither implicit nor explicit notation. + // Reading is done. Go to the epilogue. + break; + } + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, 'tag name is malformed: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + + } else if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "! [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== '!') { + if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + } else { + // looking for multi type + type = null; + typeList = state.typeMap.multi[state.kind || 'fallback']; + + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + + if (!type) { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; + + +/***/ }), + +/***/ 1082: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/*eslint-disable max-len*/ + +var YAMLException = __nccwpck_require__(8179); +var Type = __nccwpck_require__(6073); + + +function compileList(schema, name, result) { + var exclude = []; + + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && + previousType.kind === currentType.kind && + previousType.multi === currentType.multi) { + + exclude.push(previousIndex); + } + }); + + result.push(currentType); + }); + + return result.filter(function (type, index) { + return exclude.indexOf(index) === -1; + }); +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi['fallback'].push(type); + } else { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + return this.extend(definition); +} + + +Schema.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + + if (definition instanceof Type) { + // Schema.extend(type) + explicit.push(definition); + + } else if (Array.isArray(definition)) { + // Schema.extend([ type1, type2, ... ]) + explicit = explicit.concat(definition); + + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + + } else { + throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + + 'or a schema definition ({ implicit: [...], explicit: [...] })'); + } + + implicit.forEach(function (type) { + if (!(type instanceof Type)) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + + if (type.multi) { + throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); + } + }); + + explicit.forEach(function (type) { + if (!(type instanceof Type)) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + }); + + var result = Object.create(Schema.prototype); + + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + + result.compiledImplicit = compileList(result, 'implicit', []); + result.compiledExplicit = compileList(result, 'explicit', []); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + + return result; +}; + + +module.exports = Schema; + + +/***/ }), + +/***/ 2011: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + + + + +module.exports = __nccwpck_require__(1035); + + +/***/ }), + +/***/ 8759: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + + + + +module.exports = __nccwpck_require__(2011).extend({ + implicit: [ + __nccwpck_require__(9212), + __nccwpck_require__(6104) + ], + explicit: [ + __nccwpck_require__(7900), + __nccwpck_require__(9046), + __nccwpck_require__(6860), + __nccwpck_require__(9548) + ] +}); + + +/***/ }), + +/***/ 8562: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + + + + +var Schema = __nccwpck_require__(1082); + + +module.exports = new Schema({ + explicit: [ + __nccwpck_require__(3619), + __nccwpck_require__(7283), + __nccwpck_require__(6150) + ] +}); + + +/***/ }), + +/***/ 1035: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + + + + +module.exports = __nccwpck_require__(8562).extend({ + implicit: [ + __nccwpck_require__(721), + __nccwpck_require__(4993), + __nccwpck_require__(1615), + __nccwpck_require__(2705) + ] +}); + + +/***/ }), + +/***/ 6975: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + + +var common = __nccwpck_require__(6829); + + +// get snippet for a single line, respecting maxLength +function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ''; + var tail = ''; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + + if (position - lineStart > maxHalfLength) { + head = ' ... '; + lineStart = position - maxHalfLength + head.length; + } + + if (lineEnd - position > maxHalfLength) { + tail = ' ...'; + lineEnd = position + maxHalfLength - tail.length; + } + + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, + pos: position - lineStart + head.length // relative position + }; +} + + +function padStart(string, max) { + return common.repeat(' ', max - string.length) + string; +} + + +function makeSnippet(mark, options) { + options = Object.create(options || null); + + if (!mark.buffer) return null; + + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== 'number') options.indent = 1; + if (typeof options.linesBefore !== 'number') options.linesBefore = 3; + if (typeof options.linesAfter !== 'number') options.linesAfter = 2; + + var re = /\r?\n|\r|\0/g; + var lineStarts = [ 0 ]; + var lineEnds = []; + var match; + var foundLineNo = -1; + + while ((match = re.exec(mark.buffer))) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + + var result = '', i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n' + result; + } + + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; + + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + } + + return result.replace(/\n$/, ''); +} + + +module.exports = makeSnippet; + + +/***/ }), + +/***/ 6073: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var YAMLException = __nccwpck_require__(8179); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'multi', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'representName', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.representName = options['representName'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.multi = options['multi'] || false; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; + + +/***/ }), + +/***/ 7900: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/*eslint-disable no-bitwise*/ + + +var Type = __nccwpck_require__(6073); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + return new Uint8Array(result); +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(obj) { + return Object.prototype.toString.call(obj) === '[object Uint8Array]'; +} + +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); + + +/***/ }), + +/***/ 4993: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + + +/***/ }), + +/***/ 2705: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var common = __nccwpck_require__(6829); +var Type = __nccwpck_require__(6073); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + + +/***/ }), + +/***/ 1615: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var common = __nccwpck_require__(6829); +var Type = __nccwpck_require__(6073); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'o') { + // base 8 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + } + + // base 10 (except 0) + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + return true; +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); + if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + + +/***/ }), + +/***/ 6150: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); + + +/***/ }), + +/***/ 6104: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + + +/***/ }), + +/***/ 721: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; }, + empty: function () { return ''; } + }, + defaultStyle: 'lowercase' +}); + + +/***/ }), + +/***/ 9046: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); + + +/***/ }), + +/***/ 6860: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +var _toString = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + + +/***/ }), + +/***/ 7283: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + + +/***/ }), + +/***/ 9548: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + + +/***/ }), + +/***/ 3619: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + + +/***/ }), + +/***/ 9212: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(6073); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + + +/***/ }), + +/***/ 900: +/***/ ((module) => { + +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} + + +/***/ }), + +/***/ 254: +/***/ ((module, exports, __nccwpck_require__) => { + +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ +exports.log = console.debug || console.log || (() => {}); + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = __nccwpck_require__(8867)(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; + + +/***/ }), + +/***/ 8867: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = __nccwpck_require__(900); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; + + +/***/ }), + +/***/ 2179: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = __nccwpck_require__(254); +} else { + module.exports = __nccwpck_require__(675); +} + + +/***/ }), + +/***/ 675: +/***/ ((module, exports, __nccwpck_require__) => { + +/** + * Module dependencies. + */ + +const tty = __nccwpck_require__(3867); +const util = __nccwpck_require__(1669); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = __nccwpck_require__(9318); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = __nccwpck_require__(8867)(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + + +/***/ }), + +/***/ 1949: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Git = __nccwpck_require__(4966); +const {GitConstructError} = __nccwpck_require__(4732); +const {createInstanceConfig, folderExists} = __nccwpck_require__(847); + +const api = Object.create(null); +for (let imported = __nccwpck_require__(4732), keys = Object.keys(imported), i = 0; i < keys.length; i++) { + const name = keys[i]; + if (/^[A-Z]/.test(name)) { + api[name] = imported[name]; + } +} + +/** + * Adds the necessary properties to the supplied object to enable it for use as + * the default export of a module. + * + * Eg: `module.exports = esModuleFactory({ something () {} })` + */ +module.exports.esModuleFactory = function esModuleFactory (defaultExport) { + return Object.defineProperties(defaultExport, { + __esModule: {value: true}, + default: {value: defaultExport}, + }); +} + +module.exports.gitExportFactory = function gitExportFactory (factory, extra) { + return Object.assign(function () { + return factory.apply(null, arguments); + }, + api, + extra || {}, + ); +}; + +module.exports.gitInstanceFactory = function gitInstanceFactory (baseDir, options) { + const config = createInstanceConfig( + baseDir && (typeof baseDir === 'string' ? {baseDir} : baseDir), + options + ); + + if (!folderExists(config.baseDir)) { + throw new GitConstructError(config, `Cannot use simple-git on a directory that does not exist`); + } + + return new Git(config); +}; + + +/***/ }), + +/***/ 4966: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const {GitExecutor} = __nccwpck_require__(4701); + +const {Scheduler} = __nccwpck_require__(3421); +const {GitLogger} = __nccwpck_require__(7178); +const {adhocExecTask, configurationErrorTask} = __nccwpck_require__(2815); +const {NOOP, appendTaskOptions, asArray, filterArray, filterPrimitives, filterString, filterStringOrStringArray, filterType, folderExists, getTrailingOptions, trailingFunctionArgument, trailingOptionsArgument} = __nccwpck_require__(847); +const {branchTask, branchLocalTask, deleteBranchesTask, deleteBranchTask} = __nccwpck_require__(17); +const {taskCallback} = __nccwpck_require__(8850); +const {checkIsRepoTask} = __nccwpck_require__(221); +const {cloneTask, cloneMirrorTask} = __nccwpck_require__(3173); +const {addConfigTask, listConfigTask} = __nccwpck_require__(7597); +const {cleanWithOptionsTask, isCleanOptionsArray} = __nccwpck_require__(4386); +const {commitTask} = __nccwpck_require__(5494); +const {diffSummaryTask} = __nccwpck_require__(9241); +const {fetchTask} = __nccwpck_require__(8823); +const {hashObjectTask} = __nccwpck_require__(8199); +const {initTask} = __nccwpck_require__(6016); +const {logTask, parseLogOptions} = __nccwpck_require__(8627); +const {mergeTask} = __nccwpck_require__(8829); +const {moveTask} = __nccwpck_require__(6520); +const {pullTask} = __nccwpck_require__(4636); +const {pushTagsTask, pushTask} = __nccwpck_require__(1435); +const {addRemoteTask, getRemotesTask, listRemotesTask, remoteTask, removeRemoteTask} = __nccwpck_require__(9866); +const {getResetMode, resetTask} = __nccwpck_require__(2377); +const {stashListTask} = __nccwpck_require__(810); +const {statusTask} = __nccwpck_require__(9197); +const {addSubModuleTask, initSubModuleTask, subModuleTask, updateSubModuleTask} = __nccwpck_require__(8772); +const {addAnnotatedTagTask, addTagTask, tagListTask} = __nccwpck_require__(8540); +const {straightThroughStringTask} = __nccwpck_require__(2815); +const {parseCheckIgnore} = __nccwpck_require__(9926); + +const ChainedExecutor = Symbol('ChainedExecutor'); + +/** + * Git handling for node. All public functions can be chained and all `then` handlers are optional. + * + * @param {SimpleGitOptions} options Configuration settings for this instance + * + * @constructor + */ +function Git (options) { + this._executor = new GitExecutor( + options.binary, options.baseDir, + new Scheduler(options.maxConcurrentProcesses) + ); + this._logger = new GitLogger(); +} + +/** + * The executor that runs each of the added commands + * @type {GitExecutor} + * @private + */ +Git.prototype._executor = null; + +/** + * Logging utility for printing out info or error messages to the user + * @type {GitLogger} + * @private + */ +Git.prototype._logger = null; + +/** + * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on + * the system path, or a fully qualified path to the executable. + * + * @param {string} command + * @returns {Git} + */ +Git.prototype.customBinary = function (command) { + this._executor.binary = command; + return this; +}; + +/** + * Sets an environment variable for the spawned child process, either supply both a name and value as strings or + * a single object to entirely replace the current environment variables. + * + * @param {string|Object} name + * @param {string} [value] + * @returns {Git} + */ +Git.prototype.env = function (name, value) { + if (arguments.length === 1 && typeof name === 'object') { + this._executor.env = name; + } else { + (this._executor.env = this._executor.env || {})[name] = value; + } + + return this; +}; + +/** + * Sets the working directory of the subsequent commands. + */ +Git.prototype.cwd = function (workingDirectory) { + const task = (typeof workingDirectory !== 'string') + ? configurationErrorTask('Git.cwd: workingDirectory must be supplied as a string') + : adhocExecTask(() => { + if (!folderExists(workingDirectory)) { + throw new Error(`Git.cwd: cannot change to non-directory "${ workingDirectory }"`); + } + + return (this._executor.cwd = workingDirectory); + }); + + return this._runTask(task, trailingFunctionArgument(arguments) || NOOP); +}; + +/** + * Sets a handler function to be called whenever a new child process is created, the handler function will be called + * with the name of the command being run and the stdout & stderr streams used by the ChildProcess. + * + * @example + * require('simple-git') + * .outputHandler(function (command, stdout, stderr) { + * stdout.pipe(process.stdout); + * }) + * .checkout('https://github.com/user/repo.git'); + * + * @see https://nodejs.org/api/child_process.html#child_process_class_childprocess + * @see https://nodejs.org/api/stream.html#stream_class_stream_readable + * @param {Function} outputHandler + * @returns {Git} + */ +Git.prototype.outputHandler = function (outputHandler) { + this._executor.outputHandler = outputHandler; + return this; +}; + +/** + * Initialize a git repo + * + * @param {Boolean} [bare=false] + * @param {Function} [then] + */ +Git.prototype.init = function (bare, then) { + return this._runTask( + initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Check the status of the local repo + */ +Git.prototype.status = function () { + return this._runTask( + statusTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * List the stash(s) of the local repo + */ +Git.prototype.stashList = function (options) { + return this._runTask( + stashListTask( + trailingOptionsArgument(arguments) || {}, + filterArray(options) && options || [] + ), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Stash the local repo + * + * @param {Object|Array} [options] + * @param {Function} [then] + */ +Git.prototype.stash = function (options, then) { + return this._runTask( + straightThroughStringTask(['stash', ...getTrailingOptions(arguments)]), + trailingFunctionArgument(arguments), + ); +}; + +function createCloneTask (api, task, repoPath, localPath) { + if (typeof repoPath !== 'string') { + return configurationErrorTask(`git.${ api }() requires a string 'repoPath'`); + } + + return task(repoPath, filterType(localPath, filterString), getTrailingOptions(arguments)); +} + + +/** + * Clone a git repo + */ +Git.prototype.clone = function () { + return this._runTask( + createCloneTask('clone', cloneTask, ...arguments), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Mirror a git repo + */ +Git.prototype.mirror = function () { + return this._runTask( + createCloneTask('mirror', cloneMirrorTask, ...arguments), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Moves one or more files to a new destination. + * + * @see https://git-scm.com/docs/git-mv + * + * @param {string|string[]} from + * @param {string} to + */ +Git.prototype.mv = function (from, to) { + return this._runTask(moveTask(from, to), trailingFunctionArgument(arguments)); +}; + +/** + * Internally uses pull and tags to get the list of tags then checks out the latest tag. + * + * @param {Function} [then] + */ +Git.prototype.checkoutLatestTag = function (then) { + var git = this; + return this.pull(function () { + git.tags(function (err, tags) { + git.checkout(tags.latest, then); + }); + }); +}; + +/** + * Adds one or more files to source control + */ +Git.prototype.add = function (files) { + return this._run( + ['add'].concat(files), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Commits changes in the current working directory - when specific file paths are supplied, only changes on those + * files will be committed. + * + * @param {string|string[]} message + * @param {string|string[]} [files] + * @param {Object} [options] + * @param {Function} [then] + */ +Git.prototype.commit = function (message, files, options, then) { + const next = trailingFunctionArgument(arguments); + const messages = []; + + if (filterStringOrStringArray(message)) { + messages.push(...asArray(message)); + } + else { + console.warn('simple-git deprecation notice: git.commit: requires the commit message to be supplied as a string/string[], this will be an error in version 3'); + } + + return this._runTask( + commitTask( + messages, + asArray(filterType(files, filterStringOrStringArray, [])), + [...filterType(options, filterArray, []), ...getTrailingOptions(arguments, 0, true)] + ), + next + ); +}; + +/** + * Pull the updated contents of the current repo + */ +Git.prototype.pull = function (remote, branch, options, then) { + return this._runTask( + pullTask(filterType(remote, filterString), filterType(branch, filterString), getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Fetch the updated contents of the current repo. + * + * @example + * .fetch('upstream', 'master') // fetches from master on remote named upstream + * .fetch(function () {}) // runs fetch against default remote and branch and calls function + * + * @param {string} [remote] + * @param {string} [branch] + */ +Git.prototype.fetch = function (remote, branch) { + return this._runTask( + fetchTask(filterType(remote, filterString), filterType(branch, filterString), getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in + * a production environment. + * + * @param {boolean} silence + * @returns {Git} + */ +Git.prototype.silent = function (silence) { + this._logger.silent(!!silence); + return this; +}; + +/** + * List all tags. When using git 2.7.0 or above, include an options object with `"--sort": "property-name"` to + * sort the tags by that property instead of using the default semantic versioning sort. + * + * Note, supplying this option when it is not supported by your Git version will cause the operation to fail. + * + * @param {Object} [options] + * @param {Function} [then] + */ +Git.prototype.tags = function (options, then) { + return this._runTask( + tagListTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Rebases the current working copy. Options can be supplied either as an array of string parameters + * to be sent to the `git rebase` command, or a standard options object. + */ +Git.prototype.rebase = function () { + return this._run( + ['rebase'].concat(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments) + ); +}; + +/** + * Reset a repo + * + * @param {string|string[]} [mode=soft] Either an array of arguments supported by the 'git reset' command, or the + * string value 'soft' or 'hard' to set the reset mode. + * @param {Function} [then] + */ +Git.prototype.reset = function (mode, then) { + return this._runTask( + resetTask(getResetMode(mode), getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Revert one or more commits in the local working copy + */ +Git.prototype.revert = function (commit) { + const next = trailingFunctionArgument(arguments); + + if (typeof commit !== 'string') { + return this._runTask( + configurationErrorTask('Commit must be a string'), + next, + ); + } + + return this._run([ + 'revert', + ...getTrailingOptions(arguments, 0, true), + commit + ], next); +}; + +/** + * Add a lightweight tag to the head of the current branch + * + * @param {string} name + * @param {Function} [then] + */ +Git.prototype.addTag = function (name, then) { + const task = (typeof name === 'string') + ? addTagTask(name) + : configurationErrorTask('Git.addTag requires a tag name'); + + return this._runTask(task, trailingFunctionArgument(arguments)); +}; + +/** + * Add an annotated tag to the head of the current branch + * + * @param {string} tagName + * @param {string} tagMessage + * @param {Function} [then] + */ +Git.prototype.addAnnotatedTag = function (tagName, tagMessage, then) { + return this._runTask( + addAnnotatedTagTask(tagName, tagMessage), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Check out a tag or revision, any number of additional arguments can be passed to the `git checkout` command + * by supplying either a string or array of strings as the `what` parameter. + * + * @param {string|string[]} what One or more commands to pass to `git checkout` + * @param {Function} [then] + */ +Git.prototype.checkout = function (what, then) { + const commands = ['checkout', ...getTrailingOptions(arguments, true)]; + return this._runTask( + straightThroughStringTask(commands), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Check out a remote branch + * + * @param {string} branchName name of branch + * @param {string} startPoint (e.g origin/development) + * @param {Function} [then] + */ +Git.prototype.checkoutBranch = function (branchName, startPoint, then) { + return this.checkout(['-b', branchName, startPoint], trailingFunctionArgument(arguments)); +}; + +/** + * Check out a local branch + */ +Git.prototype.checkoutLocalBranch = function (branchName, then) { + return this.checkout(['-b', branchName], trailingFunctionArgument(arguments)); +}; + +/** + * Delete a local branch + */ +Git.prototype.deleteLocalBranch = function (branchName, forceDelete, then) { + return this._runTask( + deleteBranchTask(branchName, typeof forceDelete === "boolean" ? forceDelete : false), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Delete one or more local branches + */ +Git.prototype.deleteLocalBranches = function (branchNames, forceDelete, then) { + return this._runTask( + deleteBranchesTask(branchNames, typeof forceDelete === "boolean" ? forceDelete : false), + trailingFunctionArgument(arguments), + ); +}; + +/** + * List all branches + * + * @param {Object | string[]} [options] + * @param {Function} [then] + */ +Git.prototype.branch = function (options, then) { + return this._runTask( + branchTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Return list of local branches + * + * @param {Function} [then] + */ +Git.prototype.branchLocal = function (then) { + return this._runTask( + branchLocalTask(), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Add config to local git instance + * + * @param {string} key configuration key (e.g user.name) + * @param {string} value for the given key (e.g your name) + * @param {boolean} [append=false] optionally append the key/value pair (equivalent of passing `--add` option). + * @param {Function} [then] + */ +Git.prototype.addConfig = function (key, value, append, then) { + return this._runTask( + addConfigTask(key, value, typeof append === "boolean" ? append : false), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.listConfig = function () { + return this._runTask(listConfigTask(), trailingFunctionArgument(arguments)); +}; + +/** + * Executes any command against the git binary. + */ +Git.prototype.raw = function (commands) { + const createRestCommands = !Array.isArray(commands); + const command = [].slice.call(createRestCommands ? arguments : commands, 0); + + for (let i = 0; i < command.length && createRestCommands; i++) { + if (!filterPrimitives(command[i])) { + command.splice(i, command.length - i); + break; + } + } + + command.push( + ...getTrailingOptions(arguments, 0, true), + ); + + var next = trailingFunctionArgument(arguments); + + if (!command.length) { + return this._runTask( + configurationErrorTask('Raw: must supply one or more command to execute'), + next, + ); + } + + return this._run(command, next); +}; + +Git.prototype.submoduleAdd = function (repo, path, then) { + return this._runTask( + addSubModuleTask(repo, path), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.submoduleUpdate = function (args, then) { + return this._runTask( + updateSubModuleTask(getTrailingOptions(arguments, true)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.submoduleInit = function (args, then) { + return this._runTask( + initSubModuleTask(getTrailingOptions(arguments, true)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.subModule = function (options, then) { + return this._runTask( + subModuleTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.listRemote = function () { + return this._runTask( + listRemotesTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Adds a remote to the list of remotes. + */ +Git.prototype.addRemote = function (remoteName, remoteRepo, then) { + return this._runTask( + addRemoteTask(remoteName, remoteRepo, getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Removes an entry by name from the list of remotes. + */ +Git.prototype.removeRemote = function (remoteName, then) { + return this._runTask( + removeRemoteTask(remoteName), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Gets the currently available remotes, setting the optional verbose argument to true includes additional + * detail on the remotes themselves. + */ +Git.prototype.getRemotes = function (verbose, then) { + return this._runTask( + getRemotesTask(verbose === true), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Compute object ID from a file + */ +Git.prototype.hashObject = function (path, write) { + return this._runTask( + hashObjectTask(path, write === true), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Call any `git remote` function with arguments passed as an array of strings. + * + * @param {string[]} options + * @param {Function} [then] + */ +Git.prototype.remote = function (options, then) { + return this._runTask( + remoteTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Merges from one branch to another, equivalent to running `git merge ${from} $[to}`, the `options` argument can + * either be an array of additional parameters to pass to the command or null / omitted to be ignored. + * + * @param {string} from + * @param {string} to + */ +Git.prototype.mergeFromTo = function (from, to) { + if (!(filterString(from) && filterString(to))) { + return this._runTask(configurationErrorTask( + `Git.mergeFromTo requires that the 'from' and 'to' arguments are supplied as strings` + )); + } + + return this._runTask( + mergeTask([from, to, ...getTrailingOptions(arguments)]), + trailingFunctionArgument(arguments, false), + ); +}; + +/** + * Runs a merge, `options` can be either an array of arguments + * supported by the [`git merge`](https://git-scm.com/docs/git-merge) + * or an options object. + * + * Conflicts during the merge result in an error response, + * the response type whether it was an error or success will be a MergeSummary instance. + * When successful, the MergeSummary has all detail from a the PullSummary + * + * @param {Object | string[]} [options] + * @param {Function} [then] + * @returns {*} + * + * @see ./responses/MergeSummary.js + * @see ./responses/PullSummary.js + */ +Git.prototype.merge = function () { + return this._runTask( + mergeTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Call any `git tag` function with arguments passed as an array of strings. + * + * @param {string[]} options + * @param {Function} [then] + */ +Git.prototype.tag = function (options, then) { + const command = getTrailingOptions(arguments); + + if (command[0] !== 'tag') { + command.unshift('tag'); + } + + return this._run(command, trailingFunctionArgument(arguments)); +}; + +/** + * Updates repository server info + * + * @param {Function} [then] + */ +Git.prototype.updateServerInfo = function (then) { + return this._run(["update-server-info"], trailingFunctionArgument(arguments)); +}; + +/** + * Pushes the current committed changes to a remote, optionally specify the names of the remote and branch to use + * when pushing. Supply multiple options as an array of strings in the first argument - see examples below. + */ +Git.prototype.push = function (remote, branch, then) { + const task = pushTask( + {remote: filterType(remote, filterString), branch: filterType(branch, filterString)}, + getTrailingOptions(arguments), + ); + return this._runTask(task, trailingFunctionArgument(arguments)); +}; + +/** + * Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the + * default configured remote spec. + * + * @param {string} [remote] + * @param {Function} [then] + */ +Git.prototype.pushTags = function (remote, then) { + const task = pushTagsTask({remote: filterType(remote, filterString)}, getTrailingOptions(arguments)); + + return this._runTask(task, trailingFunctionArgument(arguments)); +}; + +/** + * Removes the named files from source control. + * + * @param {string|string[]} files + * @param {Function} [then] + */ +Git.prototype.rm = function (files, then) { + return this._rm(files, '-f', then); +}; + +/** + * Removes the named files from source control but keeps them on disk rather than deleting them entirely. To + * completely remove the files, use `rm`. + * + * @param {string|string[]} files + * @param {Function} [then] + */ +Git.prototype.rmKeepLocal = function (files, then) { + return this._rm(files, '--cached', then); +}; + +/** + * Returns a list of objects in a tree based on commit hash. Passing in an object hash returns the object's content, + * size, and type. + * + * Passing "-p" will instruct cat-file to determine the object type, and display its formatted contents. + * + * @param {string[]} [options] + * @param {Function} [then] + */ +Git.prototype.catFile = function (options, then) { + return this._catFile('utf-8', arguments); +}; + +/** + * Equivalent to `catFile` but will return the native `Buffer` of content from the git command's stdout. + * + * @param {string[]} options + * @param then + */ +Git.prototype.binaryCatFile = function (options, then) { + return this._catFile('buffer', arguments); +}; + +Git.prototype._catFile = function (format, args) { + var handler = trailingFunctionArgument(args); + var command = ['cat-file']; + var options = args[0]; + + if (typeof options === 'string') { + return this._runTask( + configurationErrorTask('Git#catFile: options must be supplied as an array of strings'), + handler, + ); + } + + if (Array.isArray(options)) { + command.push.apply(command, options); + } + + return this._run(command, handler, { + format: format + }); +}; + +Git.prototype.diff = function (options, then) { + const command = ['diff', ...getTrailingOptions(arguments)]; + + if (typeof options === 'string') { + command.splice(1, 0, options); + this._logger.warn('Git#diff: supplying options as a single string is now deprecated, switch to an array of strings'); + } + + return this._runTask( + straightThroughStringTask(command), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.diffSummary = function () { + return this._runTask( + diffSummaryTask(getTrailingOptions(arguments, 1)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.revparse = function () { + const commands = ['rev-parse', ...getTrailingOptions(arguments, true)]; + return this._runTask( + straightThroughStringTask(commands, true), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Show various types of objects, for example the file at a certain commit + * + * @param {string[]} [options] + * @param {Function} [then] + */ +Git.prototype.show = function (options, then) { + return this._runTask( + straightThroughStringTask(['show', ...getTrailingOptions(arguments, 1)]), + trailingFunctionArgument(arguments) + ); +}; + +/** + */ +Git.prototype.clean = function (mode, options, then) { + const usingCleanOptionsArray = isCleanOptionsArray(mode); + const cleanMode = usingCleanOptionsArray && mode.join('') || filterType(mode, filterString) || ''; + const customArgs = getTrailingOptions([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0)); + + return this._runTask( + cleanWithOptionsTask(cleanMode, customArgs), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Call a simple function at the next step in the chain. + * @param {Function} [then] + */ +Git.prototype.exec = function (then) { + const task = { + commands: [], + format: 'utf-8', + parser () { + if (typeof then === 'function') { + then(); + } + } + }; + + return this._runTask(task); +}; + +/** + * Show commit logs from `HEAD` to the first commit. + * If provided between `options.from` and `options.to` tags or branch. + * + * Additionally you can provide options.file, which is the path to a file in your repository. Then only this file will be considered. + * + * To use a custom splitter in the log format, set `options.splitter` to be the string the log should be split on. + * + * Options can also be supplied as a standard options object for adding custom properties supported by the git log command. + * For any other set of options, supply options as an array of strings to be appended to the git log command. + */ +Git.prototype.log = function (options) { + const next = trailingFunctionArgument(arguments); + + if (filterString(arguments[0]) && filterString(arguments[1])) { + return this._runTask( + configurationErrorTask(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`), + next + ); + } + + const parsedOptions = parseLogOptions( + trailingOptionsArgument(arguments) || {}, + filterArray(options) && options || [] + ); + + return this._runTask( + logTask(parsedOptions.splitter, parsedOptions.fields, parsedOptions.commands), + next, + ) +}; + +/** + * Clears the queue of pending commands and returns the wrapper instance for chaining. + * + * @returns {Git} + */ +Git.prototype.clearQueue = function () { + // TODO: + // this._executor.clear(); + return this; +}; + +/** + * Check if a pathname or pathnames are excluded by .gitignore + * + * @param {string|string[]} pathnames + * @param {Function} [then] + */ +Git.prototype.checkIgnore = function (pathnames, then) { + return this._run( + ["check-ignore", ...asArray((filterType(pathnames, filterStringOrStringArray, [])))], + trailingFunctionArgument(arguments), + { + parser: parseCheckIgnore + } + ) +}; + +Git.prototype.checkIsRepo = function (checkType, then) { + return this._runTask( + checkIsRepoTask(filterType(checkType, filterString)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype._rm = function (_files, options, then) { + var files = [].concat(_files); + var args = ['rm', options]; + args.push.apply(args, files); + + return this._run(args, trailingFunctionArgument(arguments)); +}; + +/** + * Schedules the supplied command to be run, the command should not include the name of the git binary and should + * be an array of strings passed as the arguments to the git binary. + * + * @param {string[]} command + * @param {Function} then + * @param {Object} [opt] + * @param {boolean} [opt.concatStdErr=false] Optionally concatenate stderr output into the stdout + * @param {boolean} [opt.format="utf-8"] The format to use when reading the content of stdout + * @param {Function} [opt.onError] Optional error handler for this command - can be used to allow non-clean exits + * without killing the remaining stack of commands + * @param {Function} [opt.parser] Optional parser function + * @param {number} [opt.onError.exitCode] + * @param {string} [opt.onError.stdErr] + * + * @returns {Git} + */ +Git.prototype._run = function (command, then, opt) { + + const task = Object.assign({ + concatStdErr: false, + onError: undefined, + format: 'utf-8', + parser (data) { + return data; + } + }, opt || {}, { + commands: command, + }); + + return this._runTask(task, then); +}; + +Git.prototype._runTask = function (task, then) { + const executor = this[ChainedExecutor] || this._executor.chain(); + const promise = executor.push(task); + + taskCallback( + task, + promise, + then); + + return Object.create(this, { + then: {value: promise.then.bind(promise)}, + catch: {value: promise.catch.bind(promise)}, + [ChainedExecutor]: {value: executor}, + }); +}; + +module.exports = Git; + + +/***/ }), + +/***/ 1477: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +const {gitP} = __nccwpck_require__(941); +const {esModuleFactory, gitInstanceFactory, gitExportFactory} = __nccwpck_require__(1949); + +module.exports = esModuleFactory( + gitExportFactory(gitInstanceFactory, {gitP}) +); + + +/***/ }), + +/***/ 4732: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TaskConfigurationError = exports.GitResponseError = exports.GitError = exports.GitConstructError = exports.ResetMode = exports.CheckRepoActions = exports.CleanOptions = void 0; +var clean_1 = __nccwpck_require__(4386); +Object.defineProperty(exports, "CleanOptions", ({ enumerable: true, get: function () { return clean_1.CleanOptions; } })); +var check_is_repo_1 = __nccwpck_require__(221); +Object.defineProperty(exports, "CheckRepoActions", ({ enumerable: true, get: function () { return check_is_repo_1.CheckRepoActions; } })); +var reset_1 = __nccwpck_require__(2377); +Object.defineProperty(exports, "ResetMode", ({ enumerable: true, get: function () { return reset_1.ResetMode; } })); +var git_construct_error_1 = __nccwpck_require__(1876); +Object.defineProperty(exports, "GitConstructError", ({ enumerable: true, get: function () { return git_construct_error_1.GitConstructError; } })); +var git_error_1 = __nccwpck_require__(5757); +Object.defineProperty(exports, "GitError", ({ enumerable: true, get: function () { return git_error_1.GitError; } })); +var git_response_error_1 = __nccwpck_require__(5131); +Object.defineProperty(exports, "GitResponseError", ({ enumerable: true, get: function () { return git_response_error_1.GitResponseError; } })); +var task_configuration_error_1 = __nccwpck_require__(740); +Object.defineProperty(exports, "TaskConfigurationError", ({ enumerable: true, get: function () { return task_configuration_error_1.TaskConfigurationError; } })); +//# sourceMappingURL=api.js.map + +/***/ }), + +/***/ 1876: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GitConstructError = void 0; +const git_error_1 = __nccwpck_require__(5757); +/** + * The `GitConstructError` is thrown when an error occurs in the constructor + * of the `simple-git` instance itself. Most commonly as a result of using + * a `baseDir` option that points to a folder that either does not exist, + * or cannot be read by the user the node script is running as. + * + * Check the `.message` property for more detail including the properties + * passed to the constructor. + */ +class GitConstructError extends git_error_1.GitError { + constructor(config, message) { + super(undefined, message); + this.config = config; + } +} +exports.GitConstructError = GitConstructError; +//# sourceMappingURL=git-construct-error.js.map + +/***/ }), + +/***/ 5757: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GitError = void 0; +/** + * The `GitError` is thrown when the underlying `git` process throws a + * fatal exception (eg an `ENOENT` exception when attempting to use a + * non-writable directory as the root for your repo), and acts as the + * base class for more specific errors thrown by the parsing of the + * git response or errors in the configuration of the task about to + * be run. + * + * When an exception is thrown, pending tasks in the same instance will + * not be executed. The recommended way to run a series of tasks that + * can independently fail without needing to prevent future tasks from + * running is to catch them individually: + * + * ```typescript + import { gitP, SimpleGit, GitError, PullResult } from 'simple-git'; + + function catchTask (e: GitError) { + return e. + } + + const git = gitP(repoWorkingDir); + const pulled: PullResult | GitError = await git.pull().catch(catchTask); + const pushed: string | GitError = await git.pushTags().catch(catchTask); + ``` + */ +class GitError extends Error { + constructor(task, message) { + super(message); + this.task = task; + Object.setPrototypeOf(this, new.target.prototype); + } +} +exports.GitError = GitError; +//# sourceMappingURL=git-error.js.map + +/***/ }), + +/***/ 5131: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GitResponseError = void 0; +const git_error_1 = __nccwpck_require__(5757); +/** + * The `GitResponseError` is the wrapper for a parsed response that is treated as + * a fatal error, for example attempting a `merge` can leave the repo in a corrupted + * state when there are conflicts so the task will reject rather than resolve. + * + * For example, catching the merge conflict exception: + * + * ```typescript + import { gitP, SimpleGit, GitResponseError, MergeSummary } from 'simple-git'; + + const git = gitP(repoRoot); + const mergeOptions: string[] = ['--no-ff', 'other-branch']; + const mergeSummary: MergeSummary = await git.merge(mergeOptions) + .catch((e: GitResponseError) => e.git); + + if (mergeSummary.failed) { + // deal with the error + } + ``` + */ +class GitResponseError extends git_error_1.GitError { + constructor( + /** + * `.git` access the parsed response that is treated as being an error + */ + git, message) { + super(undefined, message || String(git)); + this.git = git; + } +} +exports.GitResponseError = GitResponseError; +//# sourceMappingURL=git-response-error.js.map + +/***/ }), + +/***/ 740: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TaskConfigurationError = void 0; +const git_error_1 = __nccwpck_require__(5757); +/** + * The `TaskConfigurationError` is thrown when a command was incorrectly + * configured. An error of this kind means that no attempt was made to + * run your command through the underlying `git` binary. + * + * Check the `.message` property for more detail on why your configuration + * resulted in an error. + */ +class TaskConfigurationError extends git_error_1.GitError { + constructor(message) { + super(undefined, message); + } +} +exports.TaskConfigurationError = TaskConfigurationError; +//# sourceMappingURL=task-configuration-error.js.map + +/***/ }), + +/***/ 7178: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GitLogger = exports.createLogger = exports.log = void 0; +const debug_1 = __nccwpck_require__(2179); +const utils_1 = __nccwpck_require__(847); +debug_1.default.formatters.L = (value) => String(utils_1.filterHasLength(value) ? value.length : '-'); +debug_1.default.formatters.B = (value) => { + if (Buffer.isBuffer(value)) { + return value.toString('utf8'); + } + return utils_1.objectToString(value); +}; +/** + * The shared debug logging instance + */ +exports.log = debug_1.default('simple-git'); +function prefixedLogger(to, prefix, forward) { + if (!prefix || !String(prefix).replace(/\s*/, '')) { + return !forward ? to : (message, ...args) => { + to(message, ...args); + forward(message, ...args); + }; + } + return (message, ...args) => { + to(`%s ${message}`, prefix, ...args); + if (forward) { + forward(message, ...args); + } + }; +} +function childLoggerName(name, childDebugger, { namespace: parentNamespace }) { + if (typeof name === 'string') { + return name; + } + const childNamespace = childDebugger && childDebugger.namespace || ''; + if (childNamespace.startsWith(parentNamespace)) { + return childNamespace.substr(parentNamespace.length + 1); + } + return childNamespace || parentNamespace; +} +function createLogger(label, verbose, initialStep, infoDebugger = exports.log) { + const labelPrefix = label && `[${label}]` || ''; + const spawned = []; + const debugDebugger = (typeof verbose === 'string') ? infoDebugger.extend(verbose) : verbose; + const key = childLoggerName(utils_1.filterType(verbose, utils_1.filterString), debugDebugger, infoDebugger); + return step(initialStep); + function destroy() { + spawned.forEach(logger => logger.destroy()); + spawned.length = 0; + } + function child(name) { + return utils_1.append(spawned, createLogger(label, debugDebugger && debugDebugger.extend(name) || name)); + } + function sibling(name, initial) { + return utils_1.append(spawned, createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger)); + } + function step(phase) { + const stepPrefix = phase && `[${phase}]` || ''; + const debug = debugDebugger && prefixedLogger(debugDebugger, stepPrefix) || utils_1.NOOP; + const info = prefixedLogger(infoDebugger, `${labelPrefix} ${stepPrefix}`, debug); + return Object.assign(debugDebugger ? debug : info, { + key, + label, + child, + sibling, + debug, + info, + step, + destroy, + }); + } +} +exports.createLogger = createLogger; +/** + * The `GitLogger` is used by the main `SimpleGit` runner to handle logging + * any warnings or errors. + */ +class GitLogger { + constructor(_out = exports.log) { + this._out = _out; + this.error = prefixedLogger(_out, '[ERROR]'); + this.warn = prefixedLogger(_out, '[WARN]'); + } + silent(silence = false) { + if (silence !== this._out.enabled) { + return; + } + const { namespace } = this._out; + const env = (process.env.DEBUG || '').split(',').filter(s => !!s); + const hasOn = env.includes(namespace); + const hasOff = env.includes(`-${namespace}`); + // enabling the log + if (!silence) { + if (hasOff) { + utils_1.remove(env, `-${namespace}`); + } + else { + env.push(namespace); + } + } + else { + if (hasOn) { + utils_1.remove(env, namespace); + } + else { + env.push(`-${namespace}`); + } + } + debug_1.default.enable(env.join(',')); + } +} +exports.GitLogger = GitLogger; +//# sourceMappingURL=git-logger.js.map + +/***/ }), + +/***/ 6086: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.hasBranchDeletionError = exports.parseBranchDeletions = void 0; +const BranchDeleteSummary_1 = __nccwpck_require__(3755); +const utils_1 = __nccwpck_require__(847); +const deleteSuccessRegex = /(\S+)\s+\(\S+\s([^)]+)\)/; +const deleteErrorRegex = /^error[^']+'([^']+)'/m; +const parsers = [ + new utils_1.LineParser(deleteSuccessRegex, (result, [branch, hash]) => { + const deletion = BranchDeleteSummary_1.branchDeletionSuccess(branch, hash); + result.all.push(deletion); + result.branches[branch] = deletion; + }), + new utils_1.LineParser(deleteErrorRegex, (result, [branch]) => { + const deletion = BranchDeleteSummary_1.branchDeletionFailure(branch); + result.errors.push(deletion); + result.all.push(deletion); + result.branches[branch] = deletion; + }), +]; +const parseBranchDeletions = (stdOut) => { + return utils_1.parseStringResponse(new BranchDeleteSummary_1.BranchDeletionBatch(), parsers, stdOut); +}; +exports.parseBranchDeletions = parseBranchDeletions; +function hasBranchDeletionError(data, processExitCode) { + return processExitCode === utils_1.ExitCodes.ERROR && deleteErrorRegex.test(data); +} +exports.hasBranchDeletionError = hasBranchDeletionError; +//# sourceMappingURL=parse-branch-delete.js.map + +/***/ }), + +/***/ 9264: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseBranchSummary = void 0; +const BranchSummary_1 = __nccwpck_require__(4446); +const utils_1 = __nccwpck_require__(847); +const parsers = [ + new utils_1.LineParser(/^(\*\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => { + result.push(!!current, true, name, commit, label); + }), + new utils_1.LineParser(/^(\*\s)?(\S+)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => { + result.push(!!current, false, name, commit, label); + }) +]; +function parseBranchSummary(stdOut) { + return utils_1.parseStringResponse(new BranchSummary_1.BranchSummaryResult(), parsers, stdOut); +} +exports.parseBranchSummary = parseBranchSummary; +//# sourceMappingURL=parse-branch.js.map + +/***/ }), + +/***/ 3026: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseCommitResult = void 0; +const utils_1 = __nccwpck_require__(847); +const parsers = [ + new utils_1.LineParser(/\[([^\s]+) ([^\]]+)/, (result, [branch, commit]) => { + result.branch = branch; + result.commit = commit; + }), + new utils_1.LineParser(/\s*Author:\s(.+)/i, (result, [author]) => { + const parts = author.split('<'); + const email = parts.pop(); + if (!email || !email.includes('@')) { + return; + } + result.author = { + email: email.substr(0, email.length - 1), + name: parts.join('<').trim() + }; + }), + new utils_1.LineParser(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g, (result, [changes, insertions, deletions]) => { + result.summary.changes = parseInt(changes, 10) || 0; + result.summary.insertions = parseInt(insertions, 10) || 0; + result.summary.deletions = parseInt(deletions, 10) || 0; + }), + new utils_1.LineParser(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/, (result, [changes, lines, direction]) => { + result.summary.changes = parseInt(changes, 10) || 0; + const count = parseInt(lines, 10) || 0; + if (direction === '-') { + result.summary.deletions = count; + } + else if (direction === '+') { + result.summary.insertions = count; + } + }), +]; +function parseCommitResult(stdOut) { + const result = { + author: null, + branch: '', + commit: '', + summary: { + changes: 0, + insertions: 0, + deletions: 0, + }, + }; + return utils_1.parseStringResponse(result, parsers, stdOut); +} +exports.parseCommitResult = parseCommitResult; +//# sourceMappingURL=parse-commit.js.map + +/***/ }), + +/***/ 2024: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseDiffResult = void 0; +const DiffSummary_1 = __nccwpck_require__(4781); +function parseDiffResult(stdOut) { + const lines = stdOut.trim().split('\n'); + const status = new DiffSummary_1.DiffSummary(); + readSummaryLine(status, lines.pop()); + for (let i = 0, max = lines.length; i < max; i++) { + const line = lines[i]; + textFileChange(line, status) || binaryFileChange(line, status); + } + return status; +} +exports.parseDiffResult = parseDiffResult; +function readSummaryLine(status, summary) { + (summary || '') + .trim() + .split(', ') + .forEach(function (text) { + const summary = /(\d+)\s([a-z]+)/.exec(text); + if (!summary) { + return; + } + summaryType(status, summary[2], parseInt(summary[1], 10)); + }); +} +function summaryType(status, key, value) { + const match = (/([a-z]+?)s?\b/.exec(key)); + if (!match || !statusUpdate[match[1]]) { + return; + } + statusUpdate[match[1]](status, value); +} +const statusUpdate = { + file(status, value) { + status.changed = value; + }, + deletion(status, value) { + status.deletions = value; + }, + insertion(status, value) { + status.insertions = value; + } +}; +function textFileChange(input, { files }) { + const line = input.trim().match(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/); + if (line) { + var alterations = (line[3] || '').trim(); + files.push({ + file: line[1].trim(), + changes: parseInt(line[2], 10), + insertions: alterations.replace(/-/g, '').length, + deletions: alterations.replace(/\+/g, '').length, + binary: false + }); + return true; + } + return false; +} +function binaryFileChange(input, { files }) { + const line = input.match(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)$/); + if (line) { + files.push({ + file: line[1].trim(), + before: +line[2], + after: +line[3], + binary: true + }); + return true; + } + return false; +} +//# sourceMappingURL=parse-diff-summary.js.map + +/***/ }), + +/***/ 6254: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseFetchResult = void 0; +const utils_1 = __nccwpck_require__(847); +const parsers = [ + new utils_1.LineParser(/From (.+)$/, (result, [remote]) => { + result.remote = remote; + }), + new utils_1.LineParser(/\* \[new branch]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => { + result.branches.push({ + name, + tracking, + }); + }), + new utils_1.LineParser(/\* \[new tag]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => { + result.tags.push({ + name, + tracking, + }); + }) +]; +function parseFetchResult(stdOut, stdErr) { + const result = { + raw: stdOut, + remote: null, + branches: [], + tags: [], + }; + return utils_1.parseStringResponse(result, parsers, stdOut, stdErr); +} +exports.parseFetchResult = parseFetchResult; +//# sourceMappingURL=parse-fetch.js.map + +/***/ }), + +/***/ 9729: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createListLogSummaryParser = exports.SPLITTER = exports.COMMIT_BOUNDARY = exports.START_BOUNDARY = void 0; +const utils_1 = __nccwpck_require__(847); +const parse_diff_summary_1 = __nccwpck_require__(2024); +exports.START_BOUNDARY = 'òòòòòò '; +exports.COMMIT_BOUNDARY = ' òò'; +exports.SPLITTER = ' ò '; +const defaultFieldNames = ['hash', 'date', 'message', 'refs', 'author_name', 'author_email']; +function lineBuilder(tokens, fields) { + return fields.reduce((line, field, index) => { + line[field] = tokens[index] || ''; + return line; + }, Object.create({ diff: null })); +} +function createListLogSummaryParser(splitter = exports.SPLITTER, fields = defaultFieldNames) { + return function (stdOut) { + const all = utils_1.toLinesWithContent(stdOut, true, exports.START_BOUNDARY) + .map(function (item) { + const lineDetail = item.trim().split(exports.COMMIT_BOUNDARY); + const listLogLine = lineBuilder(lineDetail[0].trim().split(splitter), fields); + if (lineDetail.length > 1 && !!lineDetail[1].trim()) { + listLogLine.diff = parse_diff_summary_1.parseDiffResult(lineDetail[1]); + } + return listLogLine; + }); + return { + all, + latest: all.length && all[0] || null, + total: all.length, + }; + }; +} +exports.createListLogSummaryParser = createListLogSummaryParser; +//# sourceMappingURL=parse-list-log-summary.js.map + +/***/ }), + +/***/ 6412: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseMergeDetail = exports.parseMergeResult = void 0; +const MergeSummary_1 = __nccwpck_require__(1651); +const utils_1 = __nccwpck_require__(847); +const parse_pull_1 = __nccwpck_require__(5658); +const parsers = [ + new utils_1.LineParser(/^Auto-merging\s+(.+)$/, (summary, [autoMerge]) => { + summary.merges.push(autoMerge); + }), + new utils_1.LineParser(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/, (summary, [reason, file]) => { + summary.conflicts.push(new MergeSummary_1.MergeSummaryConflict(reason, file)); + }), + new utils_1.LineParser(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/, (summary, [reason, file, deleteRef]) => { + summary.conflicts.push(new MergeSummary_1.MergeSummaryConflict(reason, file, { deleteRef })); + }), + new utils_1.LineParser(/^CONFLICT\s+\((.+)\):/, (summary, [reason]) => { + summary.conflicts.push(new MergeSummary_1.MergeSummaryConflict(reason, null)); + }), + new utils_1.LineParser(/^Automatic merge failed;\s+(.+)$/, (summary, [result]) => { + summary.result = result; + }), +]; +/** + * Parse the complete response from `git.merge` + */ +const parseMergeResult = (stdOut, stdErr) => { + return Object.assign(exports.parseMergeDetail(stdOut, stdErr), parse_pull_1.parsePullResult(stdOut, stdErr)); +}; +exports.parseMergeResult = parseMergeResult; +/** + * Parse the merge specific detail (ie: not the content also available in the pull detail) from `git.mnerge` + * @param stdOut + */ +const parseMergeDetail = (stdOut) => { + return utils_1.parseStringResponse(new MergeSummary_1.MergeSummaryDetail(), parsers, stdOut); +}; +exports.parseMergeDetail = parseMergeDetail; +//# sourceMappingURL=parse-merge.js.map + +/***/ }), + +/***/ 7444: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseMoveResult = void 0; +const utils_1 = __nccwpck_require__(847); +const parsers = [ + new utils_1.LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => { + result.moves.push({ from, to }); + }), +]; +function parseMoveResult(stdOut) { + return utils_1.parseStringResponse({ moves: [] }, parsers, stdOut); +} +exports.parseMoveResult = parseMoveResult; +//# sourceMappingURL=parse-move.js.map + +/***/ }), + +/***/ 5658: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parsePullResult = exports.parsePullDetail = void 0; +const PullSummary_1 = __nccwpck_require__(3567); +const utils_1 = __nccwpck_require__(847); +const parse_remote_messages_1 = __nccwpck_require__(2661); +const FILE_UPDATE_REGEX = /^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/; +const SUMMARY_REGEX = /(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/; +const ACTION_REGEX = /^(create|delete) mode \d+ (.+)/; +const parsers = [ + new utils_1.LineParser(FILE_UPDATE_REGEX, (result, [file, insertions, deletions]) => { + result.files.push(file); + if (insertions) { + result.insertions[file] = insertions.length; + } + if (deletions) { + result.deletions[file] = deletions.length; + } + }), + new utils_1.LineParser(SUMMARY_REGEX, (result, [changes, , insertions, , deletions]) => { + if (insertions !== undefined || deletions !== undefined) { + result.summary.changes = +changes || 0; + result.summary.insertions = +insertions || 0; + result.summary.deletions = +deletions || 0; + return true; + } + return false; + }), + new utils_1.LineParser(ACTION_REGEX, (result, [action, file]) => { + utils_1.append(result.files, file); + utils_1.append((action === 'create') ? result.created : result.deleted, file); + }), +]; +const parsePullDetail = (stdOut, stdErr) => { + return utils_1.parseStringResponse(new PullSummary_1.PullSummary(), parsers, stdOut, stdErr); +}; +exports.parsePullDetail = parsePullDetail; +const parsePullResult = (stdOut, stdErr) => { + return Object.assign(new PullSummary_1.PullSummary(), exports.parsePullDetail(stdOut, stdErr), parse_remote_messages_1.parseRemoteMessages(stdOut, stdErr)); +}; +exports.parsePullResult = parsePullResult; +//# sourceMappingURL=parse-pull.js.map + +/***/ }), + +/***/ 8530: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parsePushDetail = exports.parsePushResult = void 0; +const utils_1 = __nccwpck_require__(847); +const parse_remote_messages_1 = __nccwpck_require__(2661); +function pushResultPushedItem(local, remote, status) { + const deleted = status.includes('deleted'); + const tag = status.includes('tag') || /^refs\/tags/.test(local); + const alreadyUpdated = !status.includes('new'); + return { + deleted, + tag, + branch: !tag, + new: !alreadyUpdated, + alreadyUpdated, + local, + remote, + }; +} +const parsers = [ + new utils_1.LineParser(/^Pushing to (.+)$/, (result, [repo]) => { + result.repo = repo; + }), + new utils_1.LineParser(/^updating local tracking ref '(.+)'/, (result, [local]) => { + result.ref = Object.assign(Object.assign({}, (result.ref || {})), { local }); + }), + new utils_1.LineParser(/^[*-=]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => { + result.pushed.push(pushResultPushedItem(local, remote, type)); + }), + new utils_1.LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, (result, [local, remote, remoteName]) => { + result.branch = Object.assign(Object.assign({}, (result.branch || {})), { local, + remote, + remoteName }); + }), + new utils_1.LineParser(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/, (result, [local, remote, from, to]) => { + result.update = { + head: { + local, + remote, + }, + hash: { + from, + to, + }, + }; + }), +]; +const parsePushResult = (stdOut, stdErr) => { + const pushDetail = exports.parsePushDetail(stdOut, stdErr); + const responseDetail = parse_remote_messages_1.parseRemoteMessages(stdOut, stdErr); + return Object.assign(Object.assign({}, pushDetail), responseDetail); +}; +exports.parsePushResult = parsePushResult; +const parsePushDetail = (stdOut, stdErr) => { + return utils_1.parseStringResponse({ pushed: [] }, parsers, stdOut, stdErr); +}; +exports.parsePushDetail = parsePushDetail; +//# sourceMappingURL=parse-push.js.map + +/***/ }), + +/***/ 2661: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RemoteMessageSummary = exports.parseRemoteMessages = void 0; +const utils_1 = __nccwpck_require__(847); +const parse_remote_objects_1 = __nccwpck_require__(3565); +const parsers = [ + new utils_1.RemoteLineParser(/^remote:\s*(.+)$/, (result, [text]) => { + result.remoteMessages.all.push(text.trim()); + return false; + }), + ...parse_remote_objects_1.remoteMessagesObjectParsers, + new utils_1.RemoteLineParser([/create a (?:pull|merge) request/i, /\s(https?:\/\/\S+)$/], (result, [pullRequestUrl]) => { + result.remoteMessages.pullRequestUrl = pullRequestUrl; + }), + new utils_1.RemoteLineParser([/found (\d+) vulnerabilities.+\(([^)]+)\)/i, /\s(https?:\/\/\S+)$/], (result, [count, summary, url]) => { + result.remoteMessages.vulnerabilities = { + count: utils_1.asNumber(count), + summary, + url, + }; + }), +]; +function parseRemoteMessages(_stdOut, stdErr) { + return utils_1.parseStringResponse({ remoteMessages: new RemoteMessageSummary() }, parsers, stdErr); +} +exports.parseRemoteMessages = parseRemoteMessages; +class RemoteMessageSummary { + constructor() { + this.all = []; + } +} +exports.RemoteMessageSummary = RemoteMessageSummary; +//# sourceMappingURL=parse-remote-messages.js.map + +/***/ }), + +/***/ 3565: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.remoteMessagesObjectParsers = void 0; +const utils_1 = __nccwpck_require__(847); +function objectEnumerationResult(remoteMessages) { + return (remoteMessages.objects = remoteMessages.objects || { + compressing: 0, + counting: 0, + enumerating: 0, + packReused: 0, + reused: { count: 0, delta: 0 }, + total: { count: 0, delta: 0 } + }); +} +function asObjectCount(source) { + const count = /^\s*(\d+)/.exec(source); + const delta = /delta (\d+)/i.exec(source); + return { + count: utils_1.asNumber(count && count[1] || '0'), + delta: utils_1.asNumber(delta && delta[1] || '0'), + }; +} +exports.remoteMessagesObjectParsers = [ + new utils_1.RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i, (result, [action, count]) => { + const key = action.toLowerCase(); + const enumeration = objectEnumerationResult(result.remoteMessages); + Object.assign(enumeration, { [key]: utils_1.asNumber(count) }); + }), + new utils_1.RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i, (result, [action, count]) => { + const key = action.toLowerCase(); + const enumeration = objectEnumerationResult(result.remoteMessages); + Object.assign(enumeration, { [key]: utils_1.asNumber(count) }); + }), + new utils_1.RemoteLineParser(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i, (result, [total, reused, packReused]) => { + const objects = objectEnumerationResult(result.remoteMessages); + objects.total = asObjectCount(total); + objects.reused = asObjectCount(reused); + objects.packReused = utils_1.asNumber(packReused); + }), +]; +//# sourceMappingURL=parse-remote-objects.js.map + +/***/ }), + +/***/ 3755: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isSingleBranchDeleteFailure = exports.branchDeletionFailure = exports.branchDeletionSuccess = exports.BranchDeletionBatch = void 0; +class BranchDeletionBatch { + constructor() { + this.all = []; + this.branches = {}; + this.errors = []; + } + get success() { + return !this.errors.length; + } +} +exports.BranchDeletionBatch = BranchDeletionBatch; +function branchDeletionSuccess(branch, hash) { + return { + branch, hash, success: true, + }; +} +exports.branchDeletionSuccess = branchDeletionSuccess; +function branchDeletionFailure(branch) { + return { + branch, hash: null, success: false, + }; +} +exports.branchDeletionFailure = branchDeletionFailure; +function isSingleBranchDeleteFailure(test) { + return test.success; +} +exports.isSingleBranchDeleteFailure = isSingleBranchDeleteFailure; +//# sourceMappingURL=BranchDeleteSummary.js.map + +/***/ }), + +/***/ 4446: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BranchSummaryResult = void 0; +class BranchSummaryResult { + constructor() { + this.all = []; + this.branches = {}; + this.current = ''; + this.detached = false; + } + push(current, detached, name, commit, label) { + if (current) { + this.detached = detached; + this.current = name; + } + this.all.push(name); + this.branches[name] = { + current: current, + name: name, + commit: commit, + label: label + }; + } +} +exports.BranchSummaryResult = BranchSummaryResult; +//# sourceMappingURL=BranchSummary.js.map + +/***/ }), + +/***/ 9926: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseCheckIgnore = void 0; +/** + * Parser for the `check-ignore` command - returns each file as a string array + */ +const parseCheckIgnore = (text) => { + return text.split(/\n/g) + .map(line => line.trim()) + .filter(file => !!file); +}; +exports.parseCheckIgnore = parseCheckIgnore; +//# sourceMappingURL=CheckIgnore.js.map + +/***/ }), + +/***/ 5689: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.cleanSummaryParser = exports.CleanResponse = void 0; +const utils_1 = __nccwpck_require__(847); +class CleanResponse { + constructor(dryRun) { + this.dryRun = dryRun; + this.paths = []; + this.files = []; + this.folders = []; + } +} +exports.CleanResponse = CleanResponse; +const removalRegexp = /^[a-z]+\s*/i; +const dryRunRemovalRegexp = /^[a-z]+\s+[a-z]+\s*/i; +const isFolderRegexp = /\/$/; +function cleanSummaryParser(dryRun, text) { + const summary = new CleanResponse(dryRun); + const regexp = dryRun ? dryRunRemovalRegexp : removalRegexp; + utils_1.toLinesWithContent(text).forEach(line => { + const removed = line.replace(regexp, ''); + summary.paths.push(removed); + (isFolderRegexp.test(removed) ? summary.folders : summary.files).push(removed); + }); + return summary; +} +exports.cleanSummaryParser = cleanSummaryParser; +//# sourceMappingURL=CleanSummary.js.map + +/***/ }), + +/***/ 7219: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.configListParser = exports.ConfigList = void 0; +const utils_1 = __nccwpck_require__(847); +class ConfigList { + constructor() { + this.files = []; + this.values = Object.create(null); + } + get all() { + if (!this._all) { + this._all = this.files.reduce((all, file) => { + return Object.assign(all, this.values[file]); + }, {}); + } + return this._all; + } + addFile(file) { + if (!(file in this.values)) { + const latest = utils_1.last(this.files); + this.values[file] = latest ? Object.create(this.values[latest]) : {}; + this.files.push(file); + } + return this.values[file]; + } + addValue(file, key, value) { + const values = this.addFile(file); + if (!values.hasOwnProperty(key)) { + values[key] = value; + } + else if (Array.isArray(values[key])) { + values[key].push(value); + } + else { + values[key] = [values[key], value]; + } + this._all = undefined; + } +} +exports.ConfigList = ConfigList; +function configListParser(text) { + const config = new ConfigList(); + const lines = text.split('\0'); + for (let i = 0, max = lines.length - 1; i < max;) { + const file = configFilePath(lines[i++]); + const [key, value] = utils_1.splitOn(lines[i++], '\n'); + config.addValue(file, key, value); + } + return config; +} +exports.configListParser = configListParser; +function configFilePath(filePath) { + return filePath.replace(/^(file):/, ''); +} +//# sourceMappingURL=ConfigList.js.map + +/***/ }), + +/***/ 4781: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiffSummary = void 0; +/*** + * The DiffSummary is returned as a response to getting `git().status()` + */ +class DiffSummary { + constructor() { + this.changed = 0; + this.deletions = 0; + this.insertions = 0; + this.files = []; + } +} +exports.DiffSummary = DiffSummary; +//# sourceMappingURL=DiffSummary.js.map + +/***/ }), + +/***/ 860: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FileStatusSummary = exports.fromPathRegex = void 0; +exports.fromPathRegex = /^(.+) -> (.+)$/; +class FileStatusSummary { + constructor(path, index, working_dir) { + this.path = path; + this.index = index; + this.working_dir = working_dir; + if ('R' === (index + working_dir)) { + const detail = exports.fromPathRegex.exec(path) || [null, path, path]; + this.from = detail[1] || ''; + this.path = detail[2] || ''; + } + } +} +exports.FileStatusSummary = FileStatusSummary; +//# sourceMappingURL=FileStatusSummary.js.map + +/***/ }), + +/***/ 9999: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseGetRemotesVerbose = exports.parseGetRemotes = void 0; +const utils_1 = __nccwpck_require__(847); +function parseGetRemotes(text) { + const remotes = {}; + forEach(text, ([name]) => remotes[name] = { name }); + return Object.values(remotes); +} +exports.parseGetRemotes = parseGetRemotes; +function parseGetRemotesVerbose(text) { + const remotes = {}; + forEach(text, ([name, url, purpose]) => { + if (!remotes.hasOwnProperty(name)) { + remotes[name] = { + name: name, + refs: { fetch: '', push: '' }, + }; + } + if (purpose && url) { + remotes[name].refs[purpose.replace(/[^a-z]/g, '')] = url; + } + }); + return Object.values(remotes); +} +exports.parseGetRemotesVerbose = parseGetRemotesVerbose; +function forEach(text, handler) { + utils_1.forEachLineWithContent(text, (line) => handler(line.split(/\s+/))); +} +//# sourceMappingURL=GetRemoteSummary.js.map + +/***/ }), + +/***/ 8690: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseInit = exports.InitSummary = void 0; +class InitSummary { + constructor(bare, path, existing, gitDir) { + this.bare = bare; + this.path = path; + this.existing = existing; + this.gitDir = gitDir; + } +} +exports.InitSummary = InitSummary; +const initResponseRegex = /^Init.+ repository in (.+)$/; +const reInitResponseRegex = /^Rein.+ in (.+)$/; +function parseInit(bare, path, text) { + const response = String(text).trim(); + let result; + if ((result = initResponseRegex.exec(response))) { + return new InitSummary(bare, path, false, result[1]); + } + if ((result = reInitResponseRegex.exec(response))) { + return new InitSummary(bare, path, true, result[1]); + } + let gitDir = ''; + const tokens = response.split(' '); + while (tokens.length) { + const token = tokens.shift(); + if (token === 'in') { + gitDir = tokens.join(' '); + break; + } + } + return new InitSummary(bare, path, /^re/i.test(response), gitDir); +} +exports.parseInit = parseInit; +//# sourceMappingURL=InitSummary.js.map + +/***/ }), + +/***/ 1651: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MergeSummaryDetail = exports.MergeSummaryConflict = void 0; +class MergeSummaryConflict { + constructor(reason, file = null, meta) { + this.reason = reason; + this.file = file; + this.meta = meta; + } + toString() { + return `${this.file}:${this.reason}`; + } +} +exports.MergeSummaryConflict = MergeSummaryConflict; +class MergeSummaryDetail { + constructor() { + this.conflicts = []; + this.merges = []; + this.result = 'success'; + } + get failed() { + return this.conflicts.length > 0; + } + get reason() { + return this.result; + } + toString() { + if (this.conflicts.length) { + return `CONFLICTS: ${this.conflicts.join(', ')}`; + } + return 'OK'; + } +} +exports.MergeSummaryDetail = MergeSummaryDetail; +//# sourceMappingURL=MergeSummary.js.map + +/***/ }), + +/***/ 3567: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PullSummary = void 0; +class PullSummary { + constructor() { + this.remoteMessages = { + all: [], + }; + this.created = []; + this.deleted = []; + this.files = []; + this.deletions = {}; + this.insertions = {}; + this.summary = { + changes: 0, + deletions: 0, + insertions: 0, + }; + } +} +exports.PullSummary = PullSummary; +//# sourceMappingURL=PullSummary.js.map + +/***/ }), + +/***/ 6790: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseStatusSummary = exports.StatusSummary = void 0; +const utils_1 = __nccwpck_require__(847); +const FileStatusSummary_1 = __nccwpck_require__(860); +/** + * The StatusSummary is returned as a response to getting `git().status()` + */ +class StatusSummary { + constructor() { + this.not_added = []; + this.conflicted = []; + this.created = []; + this.deleted = []; + this.modified = []; + this.renamed = []; + /** + * All files represented as an array of objects containing the `path` and status in `index` and + * in the `working_dir`. + */ + this.files = []; + this.staged = []; + /** + * Number of commits ahead of the tracked branch + */ + this.ahead = 0; + /** + *Number of commits behind the tracked branch + */ + this.behind = 0; + /** + * Name of the current branch + */ + this.current = null; + /** + * Name of the branch being tracked + */ + this.tracking = null; + } + /** + * Gets whether this StatusSummary represents a clean working branch. + */ + isClean() { + return !this.files.length; + } +} +exports.StatusSummary = StatusSummary; +var PorcelainFileStatus; +(function (PorcelainFileStatus) { + PorcelainFileStatus["ADDED"] = "A"; + PorcelainFileStatus["DELETED"] = "D"; + PorcelainFileStatus["MODIFIED"] = "M"; + PorcelainFileStatus["RENAMED"] = "R"; + PorcelainFileStatus["COPIED"] = "C"; + PorcelainFileStatus["UNMERGED"] = "U"; + PorcelainFileStatus["UNTRACKED"] = "?"; + PorcelainFileStatus["IGNORED"] = "!"; + PorcelainFileStatus["NONE"] = " "; +})(PorcelainFileStatus || (PorcelainFileStatus = {})); +function renamedFile(line) { + const detail = /^(.+) -> (.+)$/.exec(line); + if (!detail) { + return { + from: line, to: line + }; + } + return { + from: String(detail[1]), + to: String(detail[2]), + }; +} +function parser(indexX, indexY, handler) { + return [`${indexX}${indexY}`, handler]; +} +function conflicts(indexX, ...indexY) { + return indexY.map(y => parser(indexX, y, (result, file) => utils_1.append(result.conflicted, file))); +} +const parsers = new Map([ + parser(PorcelainFileStatus.NONE, PorcelainFileStatus.ADDED, (result, file) => utils_1.append(result.created, file)), + parser(PorcelainFileStatus.NONE, PorcelainFileStatus.DELETED, (result, file) => utils_1.append(result.deleted, file)), + parser(PorcelainFileStatus.NONE, PorcelainFileStatus.MODIFIED, (result, file) => utils_1.append(result.modified, file)), + parser(PorcelainFileStatus.ADDED, PorcelainFileStatus.NONE, (result, file) => utils_1.append(result.created, file) && utils_1.append(result.staged, file)), + parser(PorcelainFileStatus.ADDED, PorcelainFileStatus.MODIFIED, (result, file) => utils_1.append(result.created, file) && utils_1.append(result.staged, file) && utils_1.append(result.modified, file)), + parser(PorcelainFileStatus.DELETED, PorcelainFileStatus.NONE, (result, file) => utils_1.append(result.deleted, file) && utils_1.append(result.staged, file)), + parser(PorcelainFileStatus.MODIFIED, PorcelainFileStatus.NONE, (result, file) => utils_1.append(result.modified, file) && utils_1.append(result.staged, file)), + parser(PorcelainFileStatus.MODIFIED, PorcelainFileStatus.MODIFIED, (result, file) => utils_1.append(result.modified, file) && utils_1.append(result.staged, file)), + parser(PorcelainFileStatus.RENAMED, PorcelainFileStatus.NONE, (result, file) => { + utils_1.append(result.renamed, renamedFile(file)); + }), + parser(PorcelainFileStatus.RENAMED, PorcelainFileStatus.MODIFIED, (result, file) => { + const renamed = renamedFile(file); + utils_1.append(result.renamed, renamed); + utils_1.append(result.modified, renamed.to); + }), + parser(PorcelainFileStatus.UNTRACKED, PorcelainFileStatus.UNTRACKED, (result, file) => utils_1.append(result.not_added, file)), + ...conflicts(PorcelainFileStatus.ADDED, PorcelainFileStatus.ADDED, PorcelainFileStatus.UNMERGED), + ...conflicts(PorcelainFileStatus.DELETED, PorcelainFileStatus.DELETED, PorcelainFileStatus.UNMERGED), + ...conflicts(PorcelainFileStatus.UNMERGED, PorcelainFileStatus.ADDED, PorcelainFileStatus.DELETED, PorcelainFileStatus.UNMERGED), + ['##', (result, line) => { + const aheadReg = /ahead (\d+)/; + const behindReg = /behind (\d+)/; + const currentReg = /^(.+?(?=(?:\.{3}|\s|$)))/; + const trackingReg = /\.{3}(\S*)/; + const onEmptyBranchReg = /\son\s([\S]+)$/; + let regexResult; + regexResult = aheadReg.exec(line); + result.ahead = regexResult && +regexResult[1] || 0; + regexResult = behindReg.exec(line); + result.behind = regexResult && +regexResult[1] || 0; + regexResult = currentReg.exec(line); + result.current = regexResult && regexResult[1]; + regexResult = trackingReg.exec(line); + result.tracking = regexResult && regexResult[1]; + regexResult = onEmptyBranchReg.exec(line); + result.current = regexResult && regexResult[1] || result.current; + }] +]); +const parseStatusSummary = function (text) { + const lines = text.trim().split('\n'); + const status = new StatusSummary(); + for (let i = 0, l = lines.length; i < l; i++) { + splitLine(status, lines[i]); + } + return status; +}; +exports.parseStatusSummary = parseStatusSummary; +function splitLine(result, lineStr) { + const trimmed = lineStr.trim(); + switch (' ') { + case trimmed.charAt(2): + return data(trimmed.charAt(0), trimmed.charAt(1), trimmed.substr(3)); + case trimmed.charAt(1): + return data(PorcelainFileStatus.NONE, trimmed.charAt(0), trimmed.substr(2)); + default: + return; + } + function data(index, workingDir, path) { + const raw = `${index}${workingDir}`; + const handler = parsers.get(raw); + if (handler) { + handler(result, path); + } + if (raw !== '##') { + result.files.push(new FileStatusSummary_1.FileStatusSummary(path, index, workingDir)); + } + } +} +//# sourceMappingURL=StatusSummary.js.map + +/***/ }), + +/***/ 4539: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseTagList = exports.TagList = void 0; +class TagList { + constructor(all, latest) { + this.all = all; + this.latest = latest; + } +} +exports.TagList = TagList; +const parseTagList = function (data, customSort = false) { + const tags = data + .split('\n') + .map(trimmed) + .filter(Boolean); + if (!customSort) { + tags.sort(function (tagA, tagB) { + const partsA = tagA.split('.'); + const partsB = tagB.split('.'); + if (partsA.length === 1 || partsB.length === 1) { + return singleSorted(toNumber(partsA[0]), toNumber(partsB[0])); + } + for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) { + const diff = sorted(toNumber(partsA[i]), toNumber(partsB[i])); + if (diff) { + return diff; + } + } + return 0; + }); + } + const latest = customSort ? tags[0] : [...tags].reverse().find((tag) => tag.indexOf('.') >= 0); + return new TagList(tags, latest); +}; +exports.parseTagList = parseTagList; +function singleSorted(a, b) { + const aIsNum = isNaN(a); + const bIsNum = isNaN(b); + if (aIsNum !== bIsNum) { + return aIsNum ? 1 : -1; + } + return aIsNum ? sorted(a, b) : 0; +} +function sorted(a, b) { + return a === b ? 0 : a > b ? 1 : -1; +} +function trimmed(input) { + return input.trim(); +} +function toNumber(input) { + if (typeof input === 'string') { + return parseInt(input.replace(/^\D+/g, ''), 10) || 0; + } + return 0; +} +//# sourceMappingURL=TagList.js.map + +/***/ }), + +/***/ 8543: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GitExecutorChain = void 0; +const child_process_1 = __nccwpck_require__(3129); +const api_1 = __nccwpck_require__(4732); +const task_1 = __nccwpck_require__(2815); +const tasks_pending_queue_1 = __nccwpck_require__(6676); +const utils_1 = __nccwpck_require__(847); +class GitExecutorChain { + constructor(_executor, _scheduler) { + this._executor = _executor; + this._scheduler = _scheduler; + this._chain = Promise.resolve(); + this._queue = new tasks_pending_queue_1.TasksPendingQueue(); + } + get binary() { + return this._executor.binary; + } + get outputHandler() { + return this._executor.outputHandler; + } + get cwd() { + return this._executor.cwd; + } + get env() { + return this._executor.env; + } + push(task) { + this._queue.push(task); + return this._chain = this._chain.then(() => this.attemptTask(task)); + } + attemptTask(task) { + return __awaiter(this, void 0, void 0, function* () { + const onScheduleComplete = yield this._scheduler.next(); + const onQueueComplete = () => this._queue.complete(task); + try { + const { logger } = this._queue.attempt(task); + return yield (task_1.isEmptyTask(task) + ? this.attemptEmptyTask(task, logger) + : this.attemptRemoteTask(task, logger)); + } + catch (e) { + throw this.onFatalException(task, e); + } + finally { + onQueueComplete(); + onScheduleComplete(); + } + }); + } + onFatalException(task, e) { + const gitError = (e instanceof api_1.GitError) ? Object.assign(e, { task }) : new api_1.GitError(task, e && String(e)); + this._chain = Promise.resolve(); + this._queue.fatal(gitError); + return gitError; + } + attemptRemoteTask(task, logger) { + return __awaiter(this, void 0, void 0, function* () { + const raw = yield this.gitResponse(this.binary, task.commands, this.outputHandler, logger.step('SPAWN')); + const outputStreams = yield this.handleTaskData(task, raw, logger.step('HANDLE')); + logger(`passing response to task's parser as a %s`, task.format); + if (task_1.isBufferTask(task)) { + return utils_1.callTaskParser(task.parser, outputStreams); + } + return utils_1.callTaskParser(task.parser, outputStreams.asStrings()); + }); + } + attemptEmptyTask(task, logger) { + return __awaiter(this, void 0, void 0, function* () { + logger(`empty task bypassing child process to call to task's parser`); + return task.parser(); + }); + } + handleTaskData({ onError, concatStdErr }, { exitCode, stdOut, stdErr }, logger) { + return new Promise((done, fail) => { + logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode); + if (exitCode && stdErr.length && onError) { + logger.info(`exitCode=%s handling with custom error handler`); + logger(`concatenate stdErr to stdOut: %j`, concatStdErr); + return onError(exitCode, Buffer.concat([...(concatStdErr ? stdOut : []), ...stdErr]).toString('utf-8'), (result) => { + logger.info(`custom error handler treated as success`); + logger(`custom error returned a %s`, utils_1.objectToString(result)); + done(new utils_1.GitOutputStreams(Buffer.isBuffer(result) ? result : Buffer.from(String(result)), Buffer.concat(stdErr))); + }, fail); + } + if (exitCode && stdErr.length) { + logger.info(`exitCode=%s treated as error when then child process has written to stdErr`); + return fail(Buffer.concat(stdErr).toString('utf-8')); + } + if (concatStdErr) { + logger(`concatenating stdErr onto stdOut before processing`); + logger(`stdErr: $O`, stdErr); + stdOut.push(...stdErr); + } + logger.info(`retrieving task output complete`); + done(new utils_1.GitOutputStreams(Buffer.concat(stdOut), Buffer.concat(stdErr))); + }); + } + gitResponse(command, args, outputHandler, logger) { + return __awaiter(this, void 0, void 0, function* () { + const outputLogger = logger.sibling('output'); + const spawnOptions = { + cwd: this.cwd, + env: this.env, + windowsHide: true, + }; + return new Promise((done) => { + const stdOut = []; + const stdErr = []; + let attempted = false; + function attemptClose(exitCode, event = 'retry') { + // closing when there is content, terminate immediately + if (attempted || stdErr.length || stdOut.length) { + logger.info(`exitCode=%s event=%s`, exitCode, event); + done({ + stdOut, + stdErr, + exitCode, + }); + attempted = true; + outputLogger.destroy(); + } + // first attempt at closing but no content yet, wait briefly for the close/exit that may follow + if (!attempted) { + attempted = true; + setTimeout(() => attemptClose(exitCode, 'deferred'), 50); + logger('received %s event before content on stdOut/stdErr', event); + } + } + logger.info(`%s %o`, command, args); + logger('%O', spawnOptions); + const spawned = child_process_1.spawn(command, args, spawnOptions); + spawned.stdout.on('data', onDataReceived(stdOut, 'stdOut', logger, outputLogger.step('stdOut'))); + spawned.stderr.on('data', onDataReceived(stdErr, 'stdErr', logger, outputLogger.step('stdErr'))); + spawned.on('error', onErrorReceived(stdErr, logger)); + spawned.on('close', (code) => attemptClose(code, 'close')); + spawned.on('exit', (code) => attemptClose(code, 'exit')); + if (outputHandler) { + logger(`Passing child process stdOut/stdErr to custom outputHandler`); + outputHandler(command, spawned.stdout, spawned.stderr, [...args]); + } + }); + }); + } +} +exports.GitExecutorChain = GitExecutorChain; +function onErrorReceived(target, logger) { + return (err) => { + logger(`[ERROR] child process exception %o`, err); + target.push(Buffer.from(String(err.stack), 'ascii')); + }; +} +function onDataReceived(target, name, logger, output) { + return (buffer) => { + logger(`%s received %L bytes`, name, buffer); + output(`%B`, buffer); + target.push(buffer); + }; +} +//# sourceMappingURL=git-executor-chain.js.map + +/***/ }), + +/***/ 4701: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GitExecutor = void 0; +const git_executor_chain_1 = __nccwpck_require__(8543); +class GitExecutor { + constructor(binary = 'git', cwd, _scheduler) { + this.binary = binary; + this.cwd = cwd; + this._scheduler = _scheduler; + this._chain = new git_executor_chain_1.GitExecutorChain(this, this._scheduler); + } + chain() { + return new git_executor_chain_1.GitExecutorChain(this, this._scheduler); + } + push(task) { + return this._chain.push(task); + } +} +exports.GitExecutor = GitExecutor; +//# sourceMappingURL=git-executor.js.map + +/***/ }), + +/***/ 941: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.gitP = void 0; +const git_response_error_1 = __nccwpck_require__(5131); +const functionNamesBuilderApi = [ + 'customBinary', 'env', 'outputHandler', 'silent', +]; +const functionNamesPromiseApi = [ + 'add', + 'addAnnotatedTag', + 'addConfig', + 'addRemote', + 'addTag', + 'binaryCatFile', + 'branch', + 'branchLocal', + 'catFile', + 'checkIgnore', + 'checkIsRepo', + 'checkout', + 'checkoutBranch', + 'checkoutLatestTag', + 'checkoutLocalBranch', + 'clean', + 'clone', + 'commit', + 'cwd', + 'deleteLocalBranch', + 'deleteLocalBranches', + 'diff', + 'diffSummary', + 'exec', + 'fetch', + 'getRemotes', + 'init', + 'listConfig', + 'listRemote', + 'log', + 'merge', + 'mergeFromTo', + 'mirror', + 'mv', + 'pull', + 'push', + 'pushTags', + 'raw', + 'rebase', + 'remote', + 'removeRemote', + 'reset', + 'revert', + 'revparse', + 'rm', + 'rmKeepLocal', + 'show', + 'stash', + 'stashList', + 'status', + 'subModule', + 'submoduleAdd', + 'submoduleInit', + 'submoduleUpdate', + 'tag', + 'tags', + 'updateServerInfo' +]; +const { gitInstanceFactory } = __nccwpck_require__(1949); +function gitP(...args) { + let git; + let chain = Promise.resolve(); + try { + git = gitInstanceFactory(...args); + } + catch (e) { + chain = Promise.reject(e); + } + function builderReturn() { + return promiseApi; + } + function chainReturn() { + return chain; + } + const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce((api, name) => { + const isAsync = functionNamesPromiseApi.includes(name); + const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api); + const alternative = isAsync ? chainReturn : builderReturn; + Object.defineProperty(api, name, { + enumerable: false, + configurable: false, + value: git ? valid : alternative, + }); + return api; + }, {}); + return promiseApi; + function asyncWrapper(fn, git) { + return function (...args) { + if (typeof args[args.length] === 'function') { + throw new TypeError('Promise interface requires that handlers are not supplied inline, ' + + 'trailing function not allowed in call to ' + fn); + } + return chain.then(function () { + return new Promise(function (resolve, reject) { + const callback = (err, result) => { + if (err) { + return reject(toError(err)); + } + resolve(result); + }; + args.push(callback); + git[fn].apply(git, args); + }); + }); + }; + } + function syncWrapper(fn, git, api) { + return (...args) => { + git[fn](...args); + return api; + }; + } +} +exports.gitP = gitP; +function toError(error) { + if (error instanceof Error) { + return error; + } + if (typeof error === 'string') { + return new Error(error); + } + return new git_response_error_1.GitResponseError(error); +} +//# sourceMappingURL=promise-wrapped.js.map + +/***/ }), + +/***/ 3421: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Scheduler = void 0; +const utils_1 = __nccwpck_require__(847); +const promise_deferred_1 = __nccwpck_require__(9819); +const git_logger_1 = __nccwpck_require__(7178); +const logger = git_logger_1.createLogger('', 'scheduler'); +const createScheduledTask = (() => { + let id = 0; + return () => { + id++; + const { promise, done } = promise_deferred_1.createDeferred(); + return { + promise, + done, + id, + }; + }; +})(); +class Scheduler { + constructor(concurrency = 2) { + this.concurrency = concurrency; + this.pending = []; + this.running = []; + logger(`Constructed, concurrency=%s`, concurrency); + } + schedule() { + if (!this.pending.length || this.running.length >= this.concurrency) { + logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`, this.pending.length, this.running.length, this.concurrency); + return; + } + const task = utils_1.append(this.running, this.pending.shift()); + logger(`Attempting id=%s`, task.id); + task.done(() => { + logger(`Completing id=`, task.id); + utils_1.remove(this.running, task); + this.schedule(); + }); + } + next() { + const { promise, id } = utils_1.append(this.pending, createScheduledTask()); + logger(`Scheduling id=%s`, id); + this.schedule(); + return promise; + } +} +exports.Scheduler = Scheduler; +//# sourceMappingURL=scheduler.js.map + +/***/ }), + +/***/ 6676: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TasksPendingQueue = void 0; +const git_logger_1 = __nccwpck_require__(7178); +const api_1 = __nccwpck_require__(4732); +class TasksPendingQueue { + constructor(logLabel = 'GitExecutor') { + this.logLabel = logLabel; + this._queue = new Map(); + } + withProgress(task) { + return this._queue.get(task); + } + createProgress(task) { + const name = TasksPendingQueue.getName(task.commands[0]); + const logger = git_logger_1.createLogger(this.logLabel, name); + return { + task, + logger, + name, + }; + } + push(task) { + const progress = this.createProgress(task); + progress.logger('Adding task to the queue, commands = %o', task.commands); + this._queue.set(task, progress); + return progress; + } + fatal(err) { + for (const [task, { logger }] of Array.from(this._queue.entries())) { + if (task === err.task) { + logger.info(`Failed %o`, err); + logger(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`); + } + else { + logger.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`, err.message); + } + this.complete(task); + } + if (this._queue.size !== 0) { + throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`); + } + } + complete(task) { + const progress = this.withProgress(task); + if (progress) { + progress.logger.destroy(); + this._queue.delete(task); + } + } + attempt(task) { + const progress = this.withProgress(task); + if (!progress) { + throw new api_1.GitError(undefined, 'TasksPendingQueue: attempt called for an unknown task'); + } + progress.logger('Starting task'); + return progress; + } + static getName(name = 'empty') { + return `task:${name}:${++TasksPendingQueue.counter}`; + } +} +exports.TasksPendingQueue = TasksPendingQueue; +TasksPendingQueue.counter = 0; +//# sourceMappingURL=tasks-pending-queue.js.map + +/***/ }), + +/***/ 8850: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.taskCallback = void 0; +const api_1 = __nccwpck_require__(4732); +const utils_1 = __nccwpck_require__(847); +function taskCallback(task, response, callback = utils_1.NOOP) { + const onSuccess = (data) => { + callback(null, data); + }; + const onError = (err) => { + if ((err === null || err === void 0 ? void 0 : err.task) === task) { + if (err instanceof api_1.GitResponseError) { + return callback(addDeprecationNoticeToError(err)); + } + callback(err); + } + }; + response.then(onSuccess, onError); +} +exports.taskCallback = taskCallback; +function addDeprecationNoticeToError(err) { + let log = (name) => { + console.warn(`simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`); + log = utils_1.NOOP; + }; + return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {})); + function descriptorReducer(all, name) { + if (name in err) { + return all; + } + all[name] = { + enumerable: false, + configurable: false, + get() { + log(name); + return err.git[name]; + }, + }; + return all; + } +} +//# sourceMappingURL=task-callback.js.map + +/***/ }), + +/***/ 17: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deleteBranchTask = exports.deleteBranchesTask = exports.branchLocalTask = exports.branchTask = exports.containsDeleteBranchCommand = void 0; +const git_response_error_1 = __nccwpck_require__(5131); +const parse_branch_delete_1 = __nccwpck_require__(6086); +const parse_branch_1 = __nccwpck_require__(9264); +function containsDeleteBranchCommand(commands) { + const deleteCommands = ['-d', '-D', '--delete']; + return commands.some(command => deleteCommands.includes(command)); +} +exports.containsDeleteBranchCommand = containsDeleteBranchCommand; +function branchTask(customArgs) { + const isDelete = containsDeleteBranchCommand(customArgs); + const commands = ['branch', ...customArgs]; + if (commands.length === 1) { + commands.push('-a'); + } + if (!commands.includes('-v')) { + commands.splice(1, 0, '-v'); + } + return { + format: 'utf-8', + commands, + parser(stdOut, stdErr) { + if (isDelete) { + return parse_branch_delete_1.parseBranchDeletions(stdOut, stdErr).all[0]; + } + return parse_branch_1.parseBranchSummary(stdOut); + }, + }; +} +exports.branchTask = branchTask; +function branchLocalTask() { + const parser = parse_branch_1.parseBranchSummary; + return { + format: 'utf-8', + commands: ['branch', '-v'], + parser, + }; +} +exports.branchLocalTask = branchLocalTask; +function deleteBranchesTask(branches, forceDelete = false) { + return { + format: 'utf-8', + commands: ['branch', '-v', forceDelete ? '-D' : '-d', ...branches], + parser(stdOut, stdErr) { + return parse_branch_delete_1.parseBranchDeletions(stdOut, stdErr); + }, + onError(exitCode, error, done, fail) { + if (!parse_branch_delete_1.hasBranchDeletionError(error, exitCode)) { + return fail(error); + } + done(error); + }, + concatStdErr: true, + }; +} +exports.deleteBranchesTask = deleteBranchesTask; +function deleteBranchTask(branch, forceDelete = false) { + const task = { + format: 'utf-8', + commands: ['branch', '-v', forceDelete ? '-D' : '-d', branch], + parser(stdOut, stdErr) { + return parse_branch_delete_1.parseBranchDeletions(stdOut, stdErr).branches[branch]; + }, + onError(exitCode, error, _, fail) { + if (!parse_branch_delete_1.hasBranchDeletionError(error, exitCode)) { + return fail(error); + } + throw new git_response_error_1.GitResponseError(task.parser(error, ''), error); + }, + concatStdErr: true, + }; + return task; +} +exports.deleteBranchTask = deleteBranchTask; +//# sourceMappingURL=branch.js.map + +/***/ }), + +/***/ 221: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkIsBareRepoTask = exports.checkIsRepoRootTask = exports.checkIsRepoTask = exports.CheckRepoActions = void 0; +const utils_1 = __nccwpck_require__(847); +var CheckRepoActions; +(function (CheckRepoActions) { + CheckRepoActions["BARE"] = "bare"; + CheckRepoActions["IN_TREE"] = "tree"; + CheckRepoActions["IS_REPO_ROOT"] = "root"; +})(CheckRepoActions = exports.CheckRepoActions || (exports.CheckRepoActions = {})); +const onError = (exitCode, stdErr, done, fail) => { + if (exitCode === utils_1.ExitCodes.UNCLEAN && isNotRepoMessage(stdErr)) { + return done('false'); + } + fail(stdErr); +}; +const parser = (text) => { + return text.trim() === 'true'; +}; +function checkIsRepoTask(action) { + switch (action) { + case CheckRepoActions.BARE: + return checkIsBareRepoTask(); + case CheckRepoActions.IS_REPO_ROOT: + return checkIsRepoRootTask(); + } + const commands = ['rev-parse', '--is-inside-work-tree']; + return { + commands, + format: 'utf-8', + onError, + parser, + }; +} +exports.checkIsRepoTask = checkIsRepoTask; +function checkIsRepoRootTask() { + const commands = ['rev-parse', '--git-dir']; + return { + commands, + format: 'utf-8', + onError, + parser(path) { + return /^\.(git)?$/.test(path.trim()); + }, + }; +} +exports.checkIsRepoRootTask = checkIsRepoRootTask; +function checkIsBareRepoTask() { + const commands = ['rev-parse', '--is-bare-repository']; + return { + commands, + format: 'utf-8', + onError, + parser, + }; +} +exports.checkIsBareRepoTask = checkIsBareRepoTask; +function isNotRepoMessage(message) { + return /(Not a git repository|Kein Git-Repository)/i.test(message); +} +//# sourceMappingURL=check-is-repo.js.map + +/***/ }), + +/***/ 4386: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isCleanOptionsArray = exports.cleanTask = exports.cleanWithOptionsTask = exports.CleanOptions = exports.CONFIG_ERROR_UNKNOWN_OPTION = exports.CONFIG_ERROR_MODE_REQUIRED = exports.CONFIG_ERROR_INTERACTIVE_MODE = void 0; +const CleanSummary_1 = __nccwpck_require__(5689); +const utils_1 = __nccwpck_require__(847); +const task_1 = __nccwpck_require__(2815); +exports.CONFIG_ERROR_INTERACTIVE_MODE = 'Git clean interactive mode is not supported'; +exports.CONFIG_ERROR_MODE_REQUIRED = 'Git clean mode parameter ("n" or "f") is required'; +exports.CONFIG_ERROR_UNKNOWN_OPTION = 'Git clean unknown option found in: '; +/** + * All supported option switches available for use in a `git.clean` operation + */ +var CleanOptions; +(function (CleanOptions) { + CleanOptions["DRY_RUN"] = "n"; + CleanOptions["FORCE"] = "f"; + CleanOptions["IGNORED_INCLUDED"] = "x"; + CleanOptions["IGNORED_ONLY"] = "X"; + CleanOptions["EXCLUDING"] = "e"; + CleanOptions["QUIET"] = "q"; + CleanOptions["RECURSIVE"] = "d"; +})(CleanOptions = exports.CleanOptions || (exports.CleanOptions = {})); +const CleanOptionValues = new Set(['i', ...utils_1.asStringArray(Object.values(CleanOptions))]); +function cleanWithOptionsTask(mode, customArgs) { + const { cleanMode, options, valid } = getCleanOptions(mode); + if (!cleanMode) { + return task_1.configurationErrorTask(exports.CONFIG_ERROR_MODE_REQUIRED); + } + if (!valid.options) { + return task_1.configurationErrorTask(exports.CONFIG_ERROR_UNKNOWN_OPTION + JSON.stringify(mode)); + } + options.push(...customArgs); + if (options.some(isInteractiveMode)) { + return task_1.configurationErrorTask(exports.CONFIG_ERROR_INTERACTIVE_MODE); + } + return cleanTask(cleanMode, options); +} +exports.cleanWithOptionsTask = cleanWithOptionsTask; +function cleanTask(mode, customArgs) { + const commands = ['clean', `-${mode}`, ...customArgs]; + return { + commands, + format: 'utf-8', + parser(text) { + return CleanSummary_1.cleanSummaryParser(mode === CleanOptions.DRY_RUN, text); + } + }; +} +exports.cleanTask = cleanTask; +function isCleanOptionsArray(input) { + return Array.isArray(input) && input.every(test => CleanOptionValues.has(test)); +} +exports.isCleanOptionsArray = isCleanOptionsArray; +function getCleanOptions(input) { + let cleanMode; + let options = []; + let valid = { cleanMode: false, options: true }; + input.replace(/[^a-z]i/g, '').split('').forEach(char => { + if (isCleanMode(char)) { + cleanMode = char; + valid.cleanMode = true; + } + else { + valid.options = valid.options && isKnownOption(options[options.length] = (`-${char}`)); + } + }); + return { + cleanMode, + options, + valid, + }; +} +function isCleanMode(cleanMode) { + return cleanMode === CleanOptions.FORCE || cleanMode === CleanOptions.DRY_RUN; +} +function isKnownOption(option) { + return /^-[a-z]$/i.test(option) && CleanOptionValues.has(option.charAt(1)); +} +function isInteractiveMode(option) { + if (/^-[^\-]/.test(option)) { + return option.indexOf('i') > 0; + } + return option === '--interactive'; +} +//# sourceMappingURL=clean.js.map + +/***/ }), + +/***/ 3173: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.cloneMirrorTask = exports.cloneTask = void 0; +const task_1 = __nccwpck_require__(2815); +const utils_1 = __nccwpck_require__(847); +function cloneTask(repo, directory, customArgs) { + const commands = ['clone', ...customArgs]; + if (typeof repo === 'string') { + commands.push(repo); + } + if (typeof directory === 'string') { + commands.push(directory); + } + return task_1.straightThroughStringTask(commands); +} +exports.cloneTask = cloneTask; +function cloneMirrorTask(repo, directory, customArgs) { + utils_1.append(customArgs, '--mirror'); + return cloneTask(repo, directory, customArgs); +} +exports.cloneMirrorTask = cloneMirrorTask; +//# sourceMappingURL=clone.js.map + +/***/ }), + +/***/ 5494: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.commitTask = void 0; +const parse_commit_1 = __nccwpck_require__(3026); +function commitTask(message, files, customArgs) { + const commands = [ + 'commit', + ...(message.flatMap(m => ['-m', m])), + ...files, + ...customArgs, + ]; + return { + commands, + format: 'utf-8', + parser: parse_commit_1.parseCommitResult, + }; +} +exports.commitTask = commitTask; +//# sourceMappingURL=commit.js.map + +/***/ }), + +/***/ 7597: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.listConfigTask = exports.addConfigTask = void 0; +const ConfigList_1 = __nccwpck_require__(7219); +function addConfigTask(key, value, append = false) { + const commands = ['config', '--local']; + if (append) { + commands.push('--add'); + } + commands.push(key, value); + return { + commands, + format: 'utf-8', + parser(text) { + return text; + } + }; +} +exports.addConfigTask = addConfigTask; +function listConfigTask() { + return { + commands: ['config', '--list', '--show-origin', '--null'], + format: 'utf-8', + parser(text) { + return ConfigList_1.configListParser(text); + }, + }; +} +exports.listConfigTask = listConfigTask; +//# sourceMappingURL=config.js.map + +/***/ }), + +/***/ 9241: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.diffSummaryTask = void 0; +const parse_diff_summary_1 = __nccwpck_require__(2024); +function diffSummaryTask(customArgs) { + return { + commands: ['diff', '--stat=4096', ...customArgs], + format: 'utf-8', + parser(stdOut) { + return parse_diff_summary_1.parseDiffResult(stdOut); + } + }; +} +exports.diffSummaryTask = diffSummaryTask; +//# sourceMappingURL=diff.js.map + +/***/ }), + +/***/ 8823: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fetchTask = void 0; +const parse_fetch_1 = __nccwpck_require__(6254); +function fetchTask(remote, branch, customArgs) { + const commands = ['fetch', ...customArgs]; + if (remote && branch) { + commands.push(remote, branch); + } + return { + commands, + format: 'utf-8', + parser: parse_fetch_1.parseFetchResult, + }; +} +exports.fetchTask = fetchTask; +//# sourceMappingURL=fetch.js.map + +/***/ }), + +/***/ 8199: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.hashObjectTask = void 0; +const task_1 = __nccwpck_require__(2815); +/** + * Task used by `git.hashObject` + */ +function hashObjectTask(filePath, write) { + const commands = ['hash-object', filePath]; + if (write) { + commands.push('-w'); + } + return task_1.straightThroughStringTask(commands, true); +} +exports.hashObjectTask = hashObjectTask; +//# sourceMappingURL=hash-object.js.map + +/***/ }), + +/***/ 6016: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTask = void 0; +const InitSummary_1 = __nccwpck_require__(8690); +const bareCommand = '--bare'; +function hasBareCommand(command) { + return command.includes(bareCommand); +} +function initTask(bare = false, path, customArgs) { + const commands = ['init', ...customArgs]; + if (bare && !hasBareCommand(commands)) { + commands.splice(1, 0, bareCommand); + } + return { + commands, + concatStdErr: false, + format: 'utf-8', + parser(text) { + return InitSummary_1.parseInit(commands.includes('--bare'), path, text); + } + }; +} +exports.initTask = initTask; +//# sourceMappingURL=init.js.map + +/***/ }), + +/***/ 8627: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logTask = exports.parseLogOptions = void 0; +const parse_list_log_summary_1 = __nccwpck_require__(9729); +const utils_1 = __nccwpck_require__(847); +const excludeOptions = new Set([ + '--pretty', + 'max-count', + 'maxCount', + 'n', + 'file', + 'format', + 'from', + 'to', + 'splitter', + 'symmetric', + 'multiLine', + 'strictDate', +]); +function prettyFormat(format, splitter) { + const fields = []; + const formatStr = []; + Object.entries(format).forEach(([field, format]) => { + fields.push(field); + formatStr.push(format); + }); + return [ + fields, formatStr.join(splitter) + ]; +} +function userOptions(options) { + return Object.fromEntries(Object.entries(options).filter(([key]) => !excludeOptions.has(key))); +} +function parseLogOptions(opt = {}, customArgs = []) { + const splitter = opt.splitter || parse_list_log_summary_1.SPLITTER; + const format = opt.format || { + hash: '%H', + date: opt.strictDate === false ? '%ai' : '%aI', + message: '%s', + refs: '%D', + body: opt.multiLine ? '%B' : '%b', + author_name: '%aN', + author_email: '%ae' + }; + const [fields, formatStr] = prettyFormat(format, splitter); + const suffix = []; + const command = [ + `--pretty=format:${parse_list_log_summary_1.START_BOUNDARY}${formatStr}${parse_list_log_summary_1.COMMIT_BOUNDARY}`, + ...customArgs, + ]; + const maxCount = opt.n || opt['max-count'] || opt.maxCount; + if (maxCount) { + command.push(`--max-count=${maxCount}`); + } + if (opt.from && opt.to) { + const rangeOperator = (opt.symmetric !== false) ? '...' : '..'; + suffix.push(`${opt.from}${rangeOperator}${opt.to}`); + } + if (opt.file) { + suffix.push('--follow', opt.file); + } + utils_1.appendTaskOptions(userOptions(opt), command); + return { + fields, + splitter, + commands: [ + ...command, + ...suffix, + ], + }; +} +exports.parseLogOptions = parseLogOptions; +function logTask(splitter, fields, customArgs) { + return { + commands: ['log', ...customArgs], + format: 'utf-8', + parser: parse_list_log_summary_1.createListLogSummaryParser(splitter, fields), + }; +} +exports.logTask = logTask; +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 8829: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.mergeTask = void 0; +const api_1 = __nccwpck_require__(4732); +const parse_merge_1 = __nccwpck_require__(6412); +const task_1 = __nccwpck_require__(2815); +function mergeTask(customArgs) { + if (!customArgs.length) { + return task_1.configurationErrorTask('Git.merge requires at least one option'); + } + return { + commands: ['merge', ...customArgs], + format: 'utf-8', + parser(stdOut, stdErr) { + const merge = parse_merge_1.parseMergeResult(stdOut, stdErr); + if (merge.failed) { + throw new api_1.GitResponseError(merge); + } + return merge; + } + }; +} +exports.mergeTask = mergeTask; +//# sourceMappingURL=merge.js.map + +/***/ }), + +/***/ 6520: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.moveTask = void 0; +const parse_move_1 = __nccwpck_require__(7444); +const utils_1 = __nccwpck_require__(847); +function moveTask(from, to) { + return { + commands: ['mv', '-v', ...utils_1.asArray(from), to], + format: 'utf-8', + parser: parse_move_1.parseMoveResult, + }; +} +exports.moveTask = moveTask; +//# sourceMappingURL=move.js.map + +/***/ }), + +/***/ 4636: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.pullTask = void 0; +const parse_pull_1 = __nccwpck_require__(5658); +function pullTask(remote, branch, customArgs) { + const commands = ['pull', ...customArgs]; + if (remote && branch) { + commands.splice(1, 0, remote, branch); + } + return { + commands, + format: 'utf-8', + parser(stdOut, stdErr) { + return parse_pull_1.parsePullResult(stdOut, stdErr); + } + }; +} +exports.pullTask = pullTask; +//# sourceMappingURL=pull.js.map + +/***/ }), + +/***/ 1435: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.pushTask = exports.pushTagsTask = void 0; +const parse_push_1 = __nccwpck_require__(8530); +const utils_1 = __nccwpck_require__(847); +function pushTagsTask(ref = {}, customArgs) { + utils_1.append(customArgs, '--tags'); + return pushTask(ref, customArgs); +} +exports.pushTagsTask = pushTagsTask; +function pushTask(ref = {}, customArgs) { + const commands = ['push', ...customArgs]; + if (ref.branch) { + commands.splice(1, 0, ref.branch); + } + if (ref.remote) { + commands.splice(1, 0, ref.remote); + } + utils_1.remove(commands, '-v'); + utils_1.append(commands, '--verbose'); + utils_1.append(commands, '--porcelain'); + return { + commands, + format: 'utf-8', + parser: parse_push_1.parsePushResult, + }; +} +exports.pushTask = pushTask; +//# sourceMappingURL=push.js.map + +/***/ }), + +/***/ 9866: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.removeRemoteTask = exports.remoteTask = exports.listRemotesTask = exports.getRemotesTask = exports.addRemoteTask = void 0; +const GetRemoteSummary_1 = __nccwpck_require__(9999); +const task_1 = __nccwpck_require__(2815); +function addRemoteTask(remoteName, remoteRepo, customArgs = []) { + return task_1.straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]); +} +exports.addRemoteTask = addRemoteTask; +function getRemotesTask(verbose) { + const commands = ['remote']; + if (verbose) { + commands.push('-v'); + } + return { + commands, + format: 'utf-8', + parser: verbose ? GetRemoteSummary_1.parseGetRemotesVerbose : GetRemoteSummary_1.parseGetRemotes, + }; +} +exports.getRemotesTask = getRemotesTask; +function listRemotesTask(customArgs = []) { + const commands = [...customArgs]; + if (commands[0] !== 'ls-remote') { + commands.unshift('ls-remote'); + } + return task_1.straightThroughStringTask(commands); +} +exports.listRemotesTask = listRemotesTask; +function remoteTask(customArgs = []) { + const commands = [...customArgs]; + if (commands[0] !== 'remote') { + commands.unshift('remote'); + } + return task_1.straightThroughStringTask(commands); +} +exports.remoteTask = remoteTask; +function removeRemoteTask(remoteName) { + return task_1.straightThroughStringTask(['remote', 'remove', remoteName]); +} +exports.removeRemoteTask = removeRemoteTask; +//# sourceMappingURL=remote.js.map + +/***/ }), + +/***/ 2377: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getResetMode = exports.resetTask = exports.ResetMode = void 0; +const task_1 = __nccwpck_require__(2815); +var ResetMode; +(function (ResetMode) { + ResetMode["MIXED"] = "mixed"; + ResetMode["SOFT"] = "soft"; + ResetMode["HARD"] = "hard"; + ResetMode["MERGE"] = "merge"; + ResetMode["KEEP"] = "keep"; +})(ResetMode = exports.ResetMode || (exports.ResetMode = {})); +const ResetModes = Array.from(Object.values(ResetMode)); +function resetTask(mode, customArgs) { + const commands = ['reset']; + if (isValidResetMode(mode)) { + commands.push(`--${mode}`); + } + commands.push(...customArgs); + return task_1.straightThroughStringTask(commands); +} +exports.resetTask = resetTask; +function getResetMode(mode) { + if (isValidResetMode(mode)) { + return mode; + } + switch (typeof mode) { + case 'string': + case 'undefined': + return ResetMode.SOFT; + } + return; +} +exports.getResetMode = getResetMode; +function isValidResetMode(mode) { + return ResetModes.includes(mode); +} +//# sourceMappingURL=reset.js.map + +/***/ }), + +/***/ 810: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.stashListTask = void 0; +const parse_list_log_summary_1 = __nccwpck_require__(9729); +const log_1 = __nccwpck_require__(8627); +function stashListTask(opt = {}, customArgs) { + const options = log_1.parseLogOptions(opt); + const parser = parse_list_log_summary_1.createListLogSummaryParser(options.splitter, options.fields); + return { + commands: ['stash', 'list', ...options.commands, ...customArgs], + format: 'utf-8', + parser, + }; +} +exports.stashListTask = stashListTask; +//# sourceMappingURL=stash-list.js.map + +/***/ }), + +/***/ 9197: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.statusTask = void 0; +const StatusSummary_1 = __nccwpck_require__(6790); +function statusTask(customArgs) { + return { + format: 'utf-8', + commands: ['status', '--porcelain', '-b', '-u', ...customArgs], + parser(text) { + return StatusSummary_1.parseStatusSummary(text); + } + }; +} +exports.statusTask = statusTask; +//# sourceMappingURL=status.js.map + +/***/ }), + +/***/ 8772: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.updateSubModuleTask = exports.subModuleTask = exports.initSubModuleTask = exports.addSubModuleTask = void 0; +const task_1 = __nccwpck_require__(2815); +function addSubModuleTask(repo, path) { + return subModuleTask(['add', repo, path]); +} +exports.addSubModuleTask = addSubModuleTask; +function initSubModuleTask(customArgs) { + return subModuleTask(['init', ...customArgs]); +} +exports.initSubModuleTask = initSubModuleTask; +function subModuleTask(customArgs) { + const commands = [...customArgs]; + if (commands[0] !== 'submodule') { + commands.unshift('submodule'); + } + return task_1.straightThroughStringTask(commands); +} +exports.subModuleTask = subModuleTask; +function updateSubModuleTask(customArgs) { + return subModuleTask(['update', ...customArgs]); +} +exports.updateSubModuleTask = updateSubModuleTask; +//# sourceMappingURL=sub-module.js.map + +/***/ }), + +/***/ 8540: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.addAnnotatedTagTask = exports.addTagTask = exports.tagListTask = void 0; +const TagList_1 = __nccwpck_require__(4539); +/** + * Task used by `git.tags` + */ +function tagListTask(customArgs = []) { + const hasCustomSort = customArgs.some((option) => /^--sort=/.test(option)); + return { + format: 'utf-8', + commands: ['tag', '-l', ...customArgs], + parser(text) { + return TagList_1.parseTagList(text, hasCustomSort); + }, + }; +} +exports.tagListTask = tagListTask; +/** + * Task used by `git.addTag` + */ +function addTagTask(name) { + return { + format: 'utf-8', + commands: ['tag', name], + parser() { + return { name }; + } + }; +} +exports.addTagTask = addTagTask; +/** + * Task used by `git.addTag` + */ +function addAnnotatedTagTask(name, tagMessage) { + return { + format: 'utf-8', + commands: ['tag', '-a', '-m', tagMessage, name], + parser() { + return { name }; + } + }; +} +exports.addAnnotatedTagTask = addAnnotatedTagTask; +//# sourceMappingURL=tag.js.map + +/***/ }), + +/***/ 2815: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isEmptyTask = exports.isBufferTask = exports.straightThroughStringTask = exports.configurationErrorTask = exports.adhocExecTask = exports.EMPTY_COMMANDS = void 0; +const task_configuration_error_1 = __nccwpck_require__(740); +exports.EMPTY_COMMANDS = []; +function adhocExecTask(parser) { + return { + commands: exports.EMPTY_COMMANDS, + format: 'utf-8', + parser, + }; +} +exports.adhocExecTask = adhocExecTask; +function configurationErrorTask(error) { + return { + commands: exports.EMPTY_COMMANDS, + format: 'utf-8', + parser() { + throw typeof error === 'string' ? new task_configuration_error_1.TaskConfigurationError(error) : error; + } + }; +} +exports.configurationErrorTask = configurationErrorTask; +function straightThroughStringTask(commands, trimmed = false) { + return { + commands, + format: 'utf-8', + parser(text) { + return trimmed ? String(text).trim() : text; + }, + }; +} +exports.straightThroughStringTask = straightThroughStringTask; +function isBufferTask(task) { + return task.format === 'buffer'; +} +exports.isBufferTask = isBufferTask; +function isEmptyTask(task) { + return !task.commands.length; +} +exports.isEmptyTask = isEmptyTask; +//# sourceMappingURL=task.js.map + +/***/ }), + +/***/ 7366: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.filterHasLength = exports.filterFunction = exports.filterPlainObject = exports.filterStringOrStringArray = exports.filterStringArray = exports.filterString = exports.filterPrimitives = exports.filterArray = exports.filterType = void 0; +const util_1 = __nccwpck_require__(8237); +function filterType(input, filter, def) { + if (filter(input)) { + return input; + } + return (arguments.length > 2) ? def : undefined; +} +exports.filterType = filterType; +const filterArray = (input) => { + return Array.isArray(input); +}; +exports.filterArray = filterArray; +function filterPrimitives(input, omit) { + return /number|string|boolean/.test(typeof input) && (!omit || !omit.includes((typeof input))); +} +exports.filterPrimitives = filterPrimitives; +const filterString = (input) => { + return typeof input === 'string'; +}; +exports.filterString = filterString; +const filterStringArray = (input) => { + return Array.isArray(input) && input.every(exports.filterString); +}; +exports.filterStringArray = filterStringArray; +const filterStringOrStringArray = (input) => { + return exports.filterString(input) || (Array.isArray(input) && input.every(exports.filterString)); +}; +exports.filterStringOrStringArray = filterStringOrStringArray; +function filterPlainObject(input) { + return !!input && util_1.objectToString(input) === '[object Object]'; +} +exports.filterPlainObject = filterPlainObject; +function filterFunction(input) { + return typeof input === 'function'; +} +exports.filterFunction = filterFunction; +const filterHasLength = (input) => { + if (input == null || 'number|boolean|function'.includes(typeof input)) { + return false; + } + return Array.isArray(input) || typeof input === 'string' || typeof input.length === 'number'; +}; +exports.filterHasLength = filterHasLength; +//# sourceMappingURL=argument-filters.js.map + +/***/ }), + +/***/ 2185: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExitCodes = void 0; +/** + * Known process exit codes used by the task parsers to determine whether an error + * was one they can automatically handle + */ +var ExitCodes; +(function (ExitCodes) { + ExitCodes[ExitCodes["SUCCESS"] = 0] = "SUCCESS"; + ExitCodes[ExitCodes["ERROR"] = 1] = "ERROR"; + ExitCodes[ExitCodes["UNCLEAN"] = 128] = "UNCLEAN"; +})(ExitCodes = exports.ExitCodes || (exports.ExitCodes = {})); +//# sourceMappingURL=exit-codes.js.map + +/***/ }), + +/***/ 6578: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GitOutputStreams = void 0; +class GitOutputStreams { + constructor(stdOut, stdErr) { + this.stdOut = stdOut; + this.stdErr = stdErr; + } + asStrings() { + return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8')); + } +} +exports.GitOutputStreams = GitOutputStreams; +//# sourceMappingURL=git-output-streams.js.map + +/***/ }), + +/***/ 847: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(7366), exports); +__exportStar(__nccwpck_require__(2185), exports); +__exportStar(__nccwpck_require__(6578), exports); +__exportStar(__nccwpck_require__(9536), exports); +__exportStar(__nccwpck_require__(5218), exports); +__exportStar(__nccwpck_require__(3546), exports); +__exportStar(__nccwpck_require__(1351), exports); +__exportStar(__nccwpck_require__(8237), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 9536: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RemoteLineParser = exports.LineParser = void 0; +class LineParser { + constructor(regExp, useMatches) { + this.matches = []; + this.parse = (line, target) => { + this.resetMatches(); + if (!this._regExp.every((reg, index) => this.addMatch(reg, index, line(index)))) { + return false; + } + return this.useMatches(target, this.prepareMatches()) !== false; + }; + this._regExp = Array.isArray(regExp) ? regExp : [regExp]; + if (useMatches) { + this.useMatches = useMatches; + } + } + // @ts-ignore + useMatches(target, match) { + throw new Error(`LineParser:useMatches not implemented`); + } + resetMatches() { + this.matches.length = 0; + } + prepareMatches() { + return this.matches; + } + addMatch(reg, index, line) { + const matched = line && reg.exec(line); + if (matched) { + this.pushMatch(index, matched); + } + return !!matched; + } + pushMatch(_index, matched) { + this.matches.push(...matched.slice(1)); + } +} +exports.LineParser = LineParser; +class RemoteLineParser extends LineParser { + addMatch(reg, index, line) { + return /^remote:\s/.test(String(line)) && super.addMatch(reg, index, line); + } + pushMatch(index, matched) { + if (index > 0 || matched.length > 1) { + super.pushMatch(index, matched); + } + } +} +exports.RemoteLineParser = RemoteLineParser; +//# sourceMappingURL=line-parser.js.map + +/***/ }), + +/***/ 5218: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createInstanceConfig = void 0; +const defaultOptions = { + binary: 'git', + maxConcurrentProcesses: 5, +}; +function createInstanceConfig(...options) { + const baseDir = process.cwd(); + const config = Object.assign(Object.assign({ baseDir }, defaultOptions), ...(options.filter(o => typeof o === 'object' && o))); + config.baseDir = config.baseDir || baseDir; + return config; +} +exports.createInstanceConfig = createInstanceConfig; +//# sourceMappingURL=simple-git-options.js.map + +/***/ }), + +/***/ 3546: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.trailingFunctionArgument = exports.trailingOptionsArgument = exports.getTrailingOptions = exports.appendTaskOptions = void 0; +const argument_filters_1 = __nccwpck_require__(7366); +const util_1 = __nccwpck_require__(8237); +function appendTaskOptions(options, commands = []) { + if (!argument_filters_1.filterPlainObject(options)) { + return commands; + } + return Object.keys(options).reduce((commands, key) => { + const value = options[key]; + if (argument_filters_1.filterPrimitives(value, ['boolean'])) { + commands.push(key + '=' + value); + } + else { + commands.push(key); + } + return commands; + }, commands); +} +exports.appendTaskOptions = appendTaskOptions; +function getTrailingOptions(args, initialPrimitive = 0, objectOnly = false) { + const command = []; + for (let i = 0, max = initialPrimitive < 0 ? args.length : initialPrimitive; i < max; i++) { + if ('string|number'.includes(typeof args[i])) { + command.push(String(args[i])); + } + } + appendTaskOptions(trailingOptionsArgument(args), command); + if (!objectOnly) { + command.push(...trailingArrayArgument(args)); + } + return command; +} +exports.getTrailingOptions = getTrailingOptions; +function trailingArrayArgument(args) { + const hasTrailingCallback = typeof util_1.last(args) === 'function'; + return argument_filters_1.filterType(util_1.last(args, hasTrailingCallback ? 1 : 0), argument_filters_1.filterArray, []); +} +/** + * Given any number of arguments, returns the trailing options argument, ignoring a trailing function argument + * if there is one. When not found, the return value is null. + */ +function trailingOptionsArgument(args) { + const hasTrailingCallback = argument_filters_1.filterFunction(util_1.last(args)); + return argument_filters_1.filterType(util_1.last(args, hasTrailingCallback ? 1 : 0), argument_filters_1.filterPlainObject); +} +exports.trailingOptionsArgument = trailingOptionsArgument; +/** + * Returns either the source argument when it is a `Function`, or the default + * `NOOP` function constant + */ +function trailingFunctionArgument(args, includeNoop = true) { + const callback = util_1.asFunction(util_1.last(args)); + return includeNoop || util_1.isUserFunction(callback) ? callback : undefined; +} +exports.trailingFunctionArgument = trailingFunctionArgument; +//# sourceMappingURL=task-options.js.map + +/***/ }), + +/***/ 1351: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseStringResponse = exports.callTaskParser = void 0; +const util_1 = __nccwpck_require__(8237); +function callTaskParser(parser, streams) { + return parser(streams.stdOut, streams.stdErr); +} +exports.callTaskParser = callTaskParser; +function parseStringResponse(result, parsers, ...texts) { + texts.forEach(text => { + for (let lines = util_1.toLinesWithContent(text), i = 0, max = lines.length; i < max; i++) { + const line = (offset = 0) => { + if ((i + offset) >= max) { + return; + } + return lines[i + offset]; + }; + parsers.some(({ parse }) => parse(line, result)); + } + }); + return result; +} +exports.parseStringResponse = parseStringResponse; +//# sourceMappingURL=task-parser.js.map + +/***/ }), + +/***/ 8237: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.asNumber = exports.asStringArray = exports.asArray = exports.objectToString = exports.remove = exports.append = exports.folderExists = exports.forEachLineWithContent = exports.toLinesWithContent = exports.last = exports.first = exports.splitOn = exports.isUserFunction = exports.asFunction = exports.NOOP = void 0; +const file_exists_1 = __nccwpck_require__(4751); +const NOOP = () => { +}; +exports.NOOP = NOOP; +/** + * Returns either the source argument when it is a `Function`, or the default + * `NOOP` function constant + */ +function asFunction(source) { + return typeof source === 'function' ? source : exports.NOOP; +} +exports.asFunction = asFunction; +/** + * Determines whether the supplied argument is both a function, and is not + * the `NOOP` function. + */ +function isUserFunction(source) { + return (typeof source === 'function' && source !== exports.NOOP); +} +exports.isUserFunction = isUserFunction; +function splitOn(input, char) { + const index = input.indexOf(char); + if (index <= 0) { + return [input, '']; + } + return [ + input.substr(0, index), + input.substr(index + 1), + ]; +} +exports.splitOn = splitOn; +function first(input, offset = 0) { + return isArrayLike(input) && input.length > offset ? input[offset] : undefined; +} +exports.first = first; +function last(input, offset = 0) { + if (isArrayLike(input) && input.length > offset) { + return input[input.length - 1 - offset]; + } +} +exports.last = last; +function isArrayLike(input) { + return !!(input && typeof input.length === 'number'); +} +function toLinesWithContent(input, trimmed = true, separator = '\n') { + return input.split(separator) + .reduce((output, line) => { + const lineContent = trimmed ? line.trim() : line; + if (lineContent) { + output.push(lineContent); + } + return output; + }, []); +} +exports.toLinesWithContent = toLinesWithContent; +function forEachLineWithContent(input, callback) { + return toLinesWithContent(input, true).map(line => callback(line)); +} +exports.forEachLineWithContent = forEachLineWithContent; +function folderExists(path) { + return file_exists_1.exists(path, file_exists_1.FOLDER); +} +exports.folderExists = folderExists; +/** + * Adds `item` into the `target` `Array` or `Set` when it is not already present. + */ +function append(target, item) { + if (Array.isArray(target)) { + if (!target.includes(item)) { + target.push(item); + } + } + else { + target.add(item); + } + return item; +} +exports.append = append; +function remove(target, item) { + if (Array.isArray(target)) { + const index = target.indexOf(item); + if (index >= 0) { + target.splice(index, 1); + } + } + else { + target.delete(item); + } + return item; +} +exports.remove = remove; +exports.objectToString = Object.prototype.toString.call.bind(Object.prototype.toString); +function asArray(source) { + return Array.isArray(source) ? source : [source]; +} +exports.asArray = asArray; +function asStringArray(source) { + return asArray(source).map(String); +} +exports.asStringArray = asStringArray; +function asNumber(source, onNaN = 0) { + if (source == null) { + return onNaN; + } + const num = parseInt(source, 10); + return isNaN(num) ? onNaN : num; +} +exports.asNumber = asNumber; +//# sourceMappingURL=util.js.map + +/***/ }), + +/***/ 9318: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const os = __nccwpck_require__(2087); +const tty = __nccwpck_require__(3867); +const hasFlag = __nccwpck_require__(1621); + +const {env} = process; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false') || + hasFlag('color=never')) { + forceColor = 0; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = 1; +} + +if ('FORCE_COLOR' in env) { + if (env.FORCE_COLOR === 'true') { + forceColor = 1; + } else if (env.FORCE_COLOR === 'false') { + forceColor = 0; + } else { + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + } +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(haveStream, streamIsTTY) { + if (forceColor === 0) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (haveStream && !streamIsTTY && forceColor === undefined) { + return 0; + } + + const min = forceColor || 0; + + if (env.TERM === 'dumb') { + return min; + } + + if (process.platform === 'win32') { + // Windows 10 build 10586 is the first Windows release that supports 256 colors. + // Windows 10 build 14931 is the first release that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream, stream && stream.isTTY); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: translateLevel(supportsColor(true, tty.isatty(1))), + stderr: translateLevel(supportsColor(true, tty.isatty(2))) +}; + + +/***/ }), + +/***/ 399: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const core_1 = __nccwpck_require__(2186); +const path_1 = __importDefault(__nccwpck_require__(5622)); +const simple_git_1 = __importDefault(__nccwpck_require__(1477)); +const js_yaml_1 = __importDefault(__nccwpck_require__(1917)); +const util_1 = __nccwpck_require__(2629); +const baseDir = path_1.default.join(process.cwd(), util_1.getInput('cwd') || ''); +const git = simple_git_1.default({ baseDir }); +console.log(`Running in ${baseDir}`); +(() => __awaiter(void 0, void 0, void 0, function* () { + var _a; + yield checkInputs().catch(core_1.setFailed); + core_1.startGroup('Internal logs'); + core_1.info('> Staging files...'); + if (util_1.getInput('add')) { + core_1.info('> Adding files...'); + yield add(); + } + else + core_1.info('> No files to add.'); + if (util_1.getInput('remove')) { + core_1.info('> Removing files...'); + yield remove(); + } + else + core_1.info('> No files to remove.'); + core_1.info('> Checking for uncommitted changes in the git working tree...'); + const changedFiles = (yield git.diffSummary(['--cached'])).files.length; + if (changedFiles > 0) { + core_1.info(`> Found ${changedFiles} changed files.`); + yield git + .addConfig('user.email', util_1.getInput('author_email'), undefined, util_1.log) + .addConfig('user.name', util_1.getInput('author_name'), undefined, util_1.log); + core_1.debug('> Current git config\n' + + JSON.stringify((yield git.listConfig()).all, null, 2)); + yield git.fetch(['--tags', '--force'], util_1.log); + core_1.info('> Switching/creating branch...'); + yield git + .checkout(util_1.getInput('branch'), undefined, util_1.log) + .catch(() => git.checkoutLocalBranch(util_1.getInput('branch'), util_1.log)); + if (util_1.getInput('pull_strategy') == 'NO-PULL') + core_1.info('> Not pulling from repo.'); + else { + core_1.info('> Pulling from remote...'); + yield git.fetch(undefined, util_1.log).pull(undefined, undefined, { + [util_1.getInput('pull_strategy')]: null + }, util_1.log); + } + core_1.info('> Re-staging files...'); + if (util_1.getInput('add')) + yield add({ ignoreErrors: true }); + if (util_1.getInput('remove')) + yield remove({ ignoreErrors: true }); + core_1.info('> Creating commit...'); + yield git.commit(util_1.getInput('message'), undefined, Object.assign({ '--author': `"${util_1.getInput('author_name')} <${util_1.getInput('author_email')}>"` }, (util_1.getInput('signoff') + ? { + '--signoff': null + } + : {})), (err, data) => { + if (data) + util_1.setOutput('committed', 'true'); + return util_1.log(err, data); + }); + if (util_1.getInput('tag')) { + core_1.info('> Tagging commit...'); + yield git + .tag(util_1.matchGitArgs(util_1.getInput('tag')), (err, data) => { + if (data) + util_1.setOutput('tagged', 'true'); + return util_1.log(err, data); + }) + .then((data) => { + util_1.setOutput('tagged', 'true'); + return util_1.log(null, data); + }) + .catch((err) => core_1.setFailed(err)); + } + else + core_1.info('> No tag info provided.'); + const pushOption = (_a = util_1.parseBool(util_1.getInput('push'))) !== null && _a !== void 0 ? _a : util_1.getInput('push'); + if (pushOption) { + // If the options is `true | string`... + core_1.info('> Pushing commit to repo...'); + if (pushOption === true) { + core_1.debug(`Running: git push origin ${util_1.getInput('branch')} --set-upstream`); + yield git.push('origin', util_1.getInput('branch'), { '--set-upstream': null }, (err, data) => { + if (data) + util_1.setOutput('pushed', 'true'); + return util_1.log(err, data); + }); + } + else { + core_1.debug(`Running: git push ${pushOption}`); + yield git.push(undefined, undefined, util_1.matchGitArgs(pushOption), (err, data) => { + if (data) + util_1.setOutput('pushed', 'true'); + return util_1.log(err, data); + }); + } + if (util_1.getInput('tag')) { + core_1.info('> Pushing tags to repo...'); + yield git + .pushTags('origin', undefined, (e, d) => util_1.log(undefined, e || d)) + .catch(() => { + core_1.info('> Tag push failed: deleting remote tag and re-pushing...'); + return git + .push(undefined, undefined, { + '--delete': null, + origin: null, + [util_1.matchGitArgs(util_1.getInput('tag')).filter((w) => !w.startsWith('-'))[0]]: null + }, util_1.log) + .pushTags('origin', undefined, util_1.log); + }); + } + else + core_1.info('> No tags to push.'); + } + else + core_1.info('> Not pushing anything.'); + core_1.endGroup(); + core_1.info('> Task completed.'); + } + else { + core_1.endGroup(); + core_1.info('> Working tree clean. Nothing to commit.'); + } +}))() + .then(logOutputs) + .catch((e) => { + core_1.endGroup(); + logOutputs(); + core_1.setFailed(e); +}); +function checkInputs() { + var _a, _b, _c, _d; + return __awaiter(this, void 0, void 0, function* () { + function setInput(input, value) { + if (value) + return (process.env[`INPUT_${input.toUpperCase()}`] = value); + else + return delete process.env[`INPUT_${input.toUpperCase()}`]; + } + function setDefault(input, value) { + if (!util_1.getInput(input)) + setInput(input, value); + return util_1.getInput(input); + } + const eventPath = process.env.GITHUB_EVENT_PATH, event = eventPath && require(eventPath), isPR = (_a = process.env.GITHUB_EVENT_NAME) === null || _a === void 0 ? void 0 : _a.includes('pull_request'), defaultBranch = isPR + ? (_c = (_b = event === null || event === void 0 ? void 0 : event.pull_request) === null || _b === void 0 ? void 0 : _b.head) === null || _c === void 0 ? void 0 : _c.ref + : (_d = process.env.GITHUB_REF) === null || _d === void 0 ? void 0 : _d.substring(11); + // #region add, remove + if (!util_1.getInput('add') && !util_1.getInput('remove')) + throw new Error("Both 'add' and 'remove' are empty, the action has nothing to do."); + if (util_1.getInput('add')) { + const parsed = parseInputArray(util_1.getInput('add')); + if (parsed.length == 1) + core_1.info('Add input parsed as single string, running 1 git add command.'); + else if (parsed.length > 1) + core_1.info(`Add input parsed as string array, running ${parsed.length} git add commands.`); + else + core_1.setFailed('Add input: array length < 1'); + } + if (util_1.getInput('remove')) { + const parsed = parseInputArray(util_1.getInput('remove')); + if (parsed.length == 1) + core_1.info('Remove input parsed as single string, running 1 git rm command.'); + else if (parsed.length > 1) + core_1.info(`Remove input parsed as string array, running ${parsed.length} git rm commands.`); + else + core_1.setFailed('Remove input: array length < 1'); + } + // #endregion + // #region author_name, author_email + setDefault('author_name', `${process.env.GITHUB_ACTOR}`); + setDefault('author_email', `${process.env.GITHUB_ACTOR}@users.noreply.github.com`); + core_1.info(`> Using '${util_1.getInput('author_name')} <${util_1.getInput('author_email')}>' as author.`); + // #endregion + // #region message + setDefault('message', `Commit from GitHub Actions (${process.env.GITHUB_WORKFLOW})`); + core_1.info(`> Using "${util_1.getInput('message')}" as commit message.`); + // #endregion + // #region branch + const branch = setDefault('branch', defaultBranch || ''); + if (isPR) + core_1.info(`> Running for a PR, the action will use '${branch}' as ref.`); + // #endregion + // #region signoff + if (util_1.getInput('signoff')) { + const parsed = util_1.parseBool(util_1.getInput('signoff')); + if (parsed === undefined) + throw new Error(`"${util_1.getInput('signoff')}" is not a valid value for the 'signoff' input: only "true" and "false" are allowed.`); + if (!parsed) + setInput('signoff', undefined); + core_1.debug(`Current signoff option: ${util_1.getInput('signoff')} (${typeof util_1.getInput('signoff')})`); + } + // #endregion + // #region pull_strategy + if (util_1.getInput('pull_strategy') == 'NO-PULL') + core_1.debug("NO-PULL found: won't pull from remote."); + // #endregion + // #region push + if (util_1.getInput('push')) { + // It has to be either 'true', 'false', or any other string (use as arguments) + const parsed = util_1.parseBool(util_1.getInput('push')); + core_1.debug(`Current push option: '${util_1.getInput('push')}' (parsed as ${typeof parsed})`); + } + }); +} +function add({ logWarning = true, ignoreErrors = false } = {}) { + return __awaiter(this, void 0, void 0, function* () { + const input = util_1.getInput('add'); + if (!input) + return []; + const parsed = parseInputArray(input); + const res = []; + for (const args of parsed) { + res.push( + // Push the result of every git command (which are executed in order) to the array + // If any of them fails, the whole function will return a Promise rejection + yield git + .add(util_1.matchGitArgs(args), (err, data) => util_1.log(ignoreErrors ? null : err, data)) + .catch((e) => { + if (ignoreErrors) + return; + if (e.message.includes('fatal: pathspec') && + e.message.includes('did not match any files') && + logWarning) + core_1.warning(`Add command did not match any file:\n git add ${args}`); + else + throw e; + })); + } + return res; + }); +} +function remove({ logWarning = true, ignoreErrors = false } = {}) { + return __awaiter(this, void 0, void 0, function* () { + const input = util_1.getInput('remove'); + if (!input) + return []; + const parsed = parseInputArray(input); + const res = []; + for (const args of parsed) { + res.push( + // Push the result of every git command (which are executed in order) to the array + // If any of them fails, the whole function will return a Promise rejection + yield git + .rm(util_1.matchGitArgs(args), (e, d) => util_1.log(ignoreErrors ? null : e, d)) + .catch((e) => { + if (ignoreErrors) + return; + if (e.message.includes('fatal: pathspec') && + e.message.includes('did not match any files')) + logWarning && + core_1.warning(`Remove command did not match any file:\n git rm ${args}`); + else + throw e; + })); + } + return res; + }); +} +/** + * Tries to parse a JSON array, then a YAML array. + * If both fail, it returns an array containing the input value as its only element + */ +function parseInputArray(input) { + try { + const json = JSON.parse(input); + if (json && + Array.isArray(json) && + json.every((e) => typeof e == 'string')) { + core_1.debug(`Input parsed as JSON array of length ${json.length}`); + return json; + } + } + catch (_a) { } + try { + const yaml = js_yaml_1.default.load(input); + if (yaml && + Array.isArray(yaml) && + yaml.every((e) => typeof e == 'string')) { + core_1.debug(`Input parsed as YAML array of length ${yaml.length}`); + return yaml; + } + } + catch (_b) { } + core_1.debug('Input parsed as single string'); + return [input]; +} +function logOutputs() { + core_1.startGroup('Outputs'); + for (const key in util_1.outputs) { + core_1.info(`${key}: ${util_1.outputs[key]}`); + } + core_1.endGroup(); +} + + +/***/ }), + +/***/ 2629: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.setOutput = exports.parseBool = exports.matchGitArgs = exports.log = exports.getInput = exports.outputs = void 0; +const core = __importStar(__nccwpck_require__(2186)); +exports.outputs = { + committed: 'false', + pushed: 'false', + tagged: 'false' +}; +function getInput(name) { + return core.getInput(name); +} +exports.getInput = getInput; +function log(err, data) { + if (data) + console.log(data); + if (err) + core.error(err); +} +exports.log = log; +/** + * Matches the different pathspecs and arguments by removing spaces that are not inside quotes + * @example + * ```js + * matchGitArgs(' first second "third" \'fourth\'') => [ 'first', 'second', '"third"', "'fourth'" ] + * matchGitArgs(' ') => [ ] + * ``` + * @returns An array, if there's no match it'll be empty + */ +function matchGitArgs(string) { + return string.match(/(?:[^\s"]+|"[^"]*")+/g) || []; +} +exports.matchGitArgs = matchGitArgs; +function parseBool(value) { + try { + const parsed = JSON.parse(value); + if (typeof parsed == 'boolean') + return parsed; + } + catch (_a) { } +} +exports.parseBool = parseBool; +function setOutput(name, value) { + core.debug(`Setting output: ${name}=${value}`); + exports.outputs[name] = value; + return core.setOutput(name, value); +} +exports.setOutput = setOutput; +for (const key in exports.outputs) + setOutput(key, exports.outputs[key]); + + +/***/ }), + +/***/ 3129: +/***/ ((module) => { + +"use strict"; +module.exports = require("child_process");; + +/***/ }), + +/***/ 5747: +/***/ ((module) => { + +"use strict"; +module.exports = require("fs");; + +/***/ }), + +/***/ 2087: +/***/ ((module) => { + +"use strict"; +module.exports = require("os");; + +/***/ }), + +/***/ 5622: +/***/ ((module) => { + +"use strict"; +module.exports = require("path");; + +/***/ }), + +/***/ 3867: +/***/ ((module) => { + +"use strict"; +module.exports = require("tty");; + +/***/ }), + +/***/ 1669: +/***/ ((module) => { + +"use strict"; +module.exports = require("util");; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(399); +/******/ })() +; \ No newline at end of file