isomorphic-git
Version:
A pure JavaScript reimplementation of git for node and browsers
8 lines • 196 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.git=e():t.git=e()}(self,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=225)}([,function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));class n extends Error{constructor(t){super(t),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(t){const e=new n(t.message);return e.code=t.code,e.data=t.data,e.caller=t.caller,e.stack=t.stack,e}get isIsomorphicGitError(){return!0}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1);class i extends n.a{constructor(t){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${t}`),this.code=this.name=i.code,this.data={message:t}}}i.code="InternalError"},,function(t,e,r){"use strict";var n=r(26),i=r.n(n),o=r(35),a=r(79),s=r(8);class u{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let e=null;this.parsedConfig=t.trim().split("\n").map(t=>{if(/^\s*#/.test(t))return{line:t,comment:!0};const r=t.indexOf(" ");if(t.startsWith("^")){const r=t.slice(1);return this.refs.set(e+"^{}",r),{line:t,ref:e,peeled:r}}{const n=t.slice(0,r);return e=t.slice(r+1),this.refs.set(e,n),{line:t,ref:e,oid:n}}})}return this}static from(t){return new u(t)}delete(t){this.parsedConfig=this.parsedConfig.filter(e=>e.ref!==t),this.refs.delete(t)}toString(){return this.parsedConfig.map(({line:t})=>t).join("\n")+"\n"}}var c=r(107);function f(t,e){const r=t.replace(/\^\{\}$/,""),n=e.replace(/\^\{\}$/,""),i=-(r<n)||+(r>n);return 0===i?t.endsWith("^{}")?1:-1:i}var l=r(12),h=r(11);function d(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){d(o,n,i,a,s,"next",t)}function s(t){d(o,n,i,a,s,"throw",t)}a(void 0)}))}}r.d(e,"a",(function(){return b}));const y=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],g=["config","description","index","shallow","commondir"];let m;function v(t,e){return _.apply(this,arguments)}function _(){return(_=p((function*(t,e){return void 0===m&&(m=new i.a),m.acquire(t,e)}))).apply(this,arguments)}class b{static updateRemoteRefs({fs:t,gitdir:e,remote:r,refs:n,symrefs:i,tags:s,refspecs:u,prune:f=!1,pruneTags:d=!1}){return p((function*(){for(const t of n.values())if(!t.match(/[0-9a-f]{40}/))throw new o.a(t);const y=yield h.a.get({fs:t,gitdir:e});if(!u){if(0===(u=yield y.getall(`remote.${r}.fetch`)).length)throw new a.a(r);u.unshift(`+HEAD:refs/remotes/${r}/HEAD`)}const g=c.a.from(u),m=new Map;if(d){const r=yield b.listRefs({fs:t,gitdir:e,filepath:"refs/tags"});yield b.deleteRefs({fs:t,gitdir:e,refs:r.map(t=>`refs/tags/${t}`)})}if(s)for(const r of n.keys())if(r.startsWith("refs/tags")&&!r.endsWith("^{}")&&!(yield b.exists({fs:t,gitdir:e,ref:r}))){const t=n.get(r);m.set(r,t)}const _=g.translate([...n.keys()]);for(const[t,e]of _){const r=n.get(t);m.set(e,r)}const w=g.translate([...i.keys()]);for(const[t,e]of w){const r=i.get(t),n=g.translateOne(r);n&&m.set(e,`ref: ${n}`)}const x=[];if(f){for(const r of g.localNamespaces()){const n=(yield b.listRefs({fs:t,gitdir:e,filepath:r})).map(t=>`${r}/${t}`);for(const t of n)m.has(t)||x.push(t)}x.length>0&&(yield b.deleteRefs({fs:t,gitdir:e,refs:x}))}for(const[r,n]of m)yield v(r,p((function*(){return t.write(Object(l.join)(e,r),`${n.trim()}\n`,"utf8")})));return{pruned:x}}))()}static writeRef({fs:t,gitdir:e,ref:r,value:n}){return p((function*(){if(!n.match(/[0-9a-f]{40}/))throw new o.a(n);yield v(r,p((function*(){return t.write(Object(l.join)(e,r),`${n.trim()}\n`,"utf8")})))}))()}static writeSymbolicRef({fs:t,gitdir:e,ref:r,value:n}){return p((function*(){yield v(r,p((function*(){return t.write(Object(l.join)(e,r),"ref: "+`${n.trim()}\n`,"utf8")})))}))()}static deleteRef({fs:t,gitdir:e,ref:r}){return p((function*(){return b.deleteRefs({fs:t,gitdir:e,refs:[r]})}))()}static deleteRefs({fs:t,gitdir:e,refs:r}){return p((function*(){yield Promise.all(r.map(r=>t.rm(Object(l.join)(e,r))));let n=yield v("packed-refs",p((function*(){return t.read(`${e}/packed-refs`,{encoding:"utf8"})})));const i=u.from(n),o=i.refs.size;for(const t of r)i.refs.has(t)&&i.delete(t);i.refs.size<o&&(n=i.toString(),yield v("packed-refs",p((function*(){return t.write(`${e}/packed-refs`,n,{encoding:"utf8"})}))))}))()}static resolve({fs:t,gitdir:e,ref:r,depth:n}){return p((function*(){if(void 0!==n&&-1===--n)return r;if(r.startsWith("ref: "))return r=r.slice("ref: ".length),b.resolve({fs:t,gitdir:e,ref:r,depth:n});if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const i=yield b.packedRefs({fs:t,gitdir:e}),o=y(r).filter(t=>!g.includes(t));for(const r of o){const o=yield v(r,p((function*(){return(yield t.read(`${e}/${r}`,{encoding:"utf8"}))||i.get(r)})));if(o)return b.resolve({fs:t,gitdir:e,ref:o.trim(),depth:n})}throw new s.a(r)}))()}static exists({fs:t,gitdir:e,ref:r}){return p((function*(){try{return yield b.expand({fs:t,gitdir:e,ref:r}),!0}catch(t){return!1}}))()}static expand({fs:t,gitdir:e,ref:r}){return p((function*(){if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const n=yield b.packedRefs({fs:t,gitdir:e}),i=y(r);for(const r of i){if(yield v(r,p((function*(){return t.exists(`${e}/${r}`)}))))return r;if(n.has(r))return r}throw new s.a(r)}))()}static expandAgainstMap({ref:t,map:e}){return p((function*(){const r=y(t);for(const t of r)if(yield e.has(t))return t;throw new s.a(t)}))()}static resolveAgainstMap({ref:t,fullref:e=t,depth:r,map:n}){if(void 0!==r&&-1===--r)return{fullref:e,oid:t};if(t.startsWith("ref: "))return t=t.slice("ref: ".length),b.resolveAgainstMap({ref:t,fullref:e,depth:r,map:n});if(40===t.length&&/[0-9a-f]{40}/.test(t))return{fullref:e,oid:t};const i=y(t);for(const t of i){const e=n.get(t);if(e)return b.resolveAgainstMap({ref:e.trim(),fullref:t,depth:r,map:n})}throw new s.a(t)}static packedRefs({fs:t,gitdir:e}){return p((function*(){const r=yield v("packed-refs",p((function*(){return t.read(`${e}/packed-refs`,{encoding:"utf8"})})));return u.from(r).refs}))()}static listRefs({fs:t,gitdir:e,filepath:r}){return p((function*(){const n=b.packedRefs({fs:t,gitdir:e});let i=null;try{i=yield t.readdirDeep(`${e}/${r}`),i=i.map(t=>t.replace(`${e}/${r}/`,""))}catch(t){i=[]}for(let t of(yield n).keys())t.startsWith(r)&&(t=t.replace(r+"/",""),i.includes(t)||i.push(t));return i.sort(f),i}))()}static listBranches({fs:t,gitdir:e,remote:r}){return p((function*(){return r?b.listRefs({fs:t,gitdir:e,filepath:`refs/remotes/${r}`}):b.listRefs({fs:t,gitdir:e,filepath:"refs/heads"})}))()}static listTags({fs:t,gitdir:e}){return p((function*(){return(yield b.listRefs({fs:t,gitdir:e,filepath:"refs/tags"})).filter(t=>!t.endsWith("^{}"))}))()}}},,,function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return h}));var n=r(2),i=r(8),o=r(22),a=r(85),s=r(108),u=r(65),c=r(15);function f(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function h(t){return d.apply(this,arguments)}function d(){return(d=l((function*({fs:e,cache:r,gitdir:f,oid:l,format:d="content"}){const p=t=>h({fs:e,cache:r,gitdir:f,oid:t});let y;if("4b825dc642cb6eb9a060e54bf8d69288fbee4904"===l&&(y={format:"wrapped",object:t.from("tree 0\0")}),y||(y=yield Object(a.a)({fs:e,gitdir:f,oid:l})),!y){if(y=yield Object(s.a)({fs:e,cache:r,gitdir:f,oid:l,getExternalRefDelta:p}),!y)throw new i.a(l);return y}if("deflated"===d)return y;if("deflated"===y.format&&(y.object=t.from(yield Object(u.a)(y.object)),y.format="wrapped"),"wrapped"===d)return y;const g=yield Object(c.a)(y.object);if(g!==l)throw new n.a(`SHA check failed! Expected ${l}, computed ${g}`);const{object:m,type:v}=o.a.unwrap(y.object);if(y.type=v,y.object=m,y.format="content","content"===d)return y;throw new n.a(`invalid requested format "${d}"`)}))).apply(this,arguments)}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1);class i extends n.a{constructor(t){super(`Could not find ${t}.`),this.code=this.name=i.code,this.data={what:t}}}i.code="NotFoundError"},function(t,e,r){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var n=r(142),i=r(143),o=r(144);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|d(e.length);return 0===(t=s(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|d(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(n)return D(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,e,r);case"utf8":case"utf-8":return P(this,e,r);case"ascii":return S(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function _(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function b(t,e,r,n){return L(D(e,t.length-r),t,r,n)}function w(t,e,r,n){return L(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function x(t,e,r,n){return w(t,e,r,n)}function A(t,e,r,n){return L(F(e),t,r,n)}function E(t,e,r,n){return L(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function P(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):y.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=t.slice(e,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function j(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=N(t[o]);return i}function B(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function T(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function $(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(t,e,r,n,o){return o||$(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,o){return o||$(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):U(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);I(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);I(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):U(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=u.isBuffer(t)?t:D(new u(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function L(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(71))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var n=r(64),i=r(53);function o(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}class a{static flush(){return t.from("0000","utf8")}static delim(){return t.from("0001","utf8")}static encode(e){"string"==typeof e&&(e=t.from(e));const r=e.length+4,n=Object(i.a)(4,r);return t.concat([t.from(n,"utf8"),e])}static streamReader(t){const e=new n.a(t);return(function(){var r,n=(r=function*(){try{let t=yield e.read(4);if(null==t)return!0;if(t=parseInt(t.toString("utf8"),16),0===t)return null;if(1===t)return null;const r=yield e.read(t-4);return null==r||r}catch(e){return t.error=e,!0}},function(){var t=this,e=arguments;return new Promise((function(n,i){var a=r.apply(t,e);function s(t){o(a,n,i,s,u,"next",t)}function u(t){o(a,n,i,s,u,"throw",t)}s(void 0)}))});return function(){return n.apply(this,arguments)}}())}}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(106);function i(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,u,"next",t)}function u(t){i(a,n,o,s,u,"throw",t)}s(void 0)}))}}class a{static get({fs:t,gitdir:e}){return o((function*(){const r=yield t.read(`${e}/config`,{encoding:"utf8"});return n.a.from(r)}))()}static save({fs:t,gitdir:e,config:r}){return o((function*(){yield t.write(`${e}/config`,r.toString(),{encoding:"utf8"})}))()}}},function(t,e,r){"use strict";(function(e){function r(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var r,n="",i=0,o=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)r=t.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,s):n=t.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var i={resolve:function(){for(var t,i="",o=!1,a=arguments.length-1;a>=-1&&!o;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=e.cwd()),s=t),r(s),0!==s.length&&(i=s+"/"+i,o=47===s.charCodeAt(0))}return i=n(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(t){if(r(t),0===t.length)return".";var e=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!e)).length||e||(t="."),t.length>0&&i&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return r(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];r(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":i.normalize(t)},relative:function(t,e){if(r(t),r(e),t===e)return"";if((t=i.resolve(t))===(e=i.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,a=o-n,s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var u=e.length-s,c=a<u?a:u,f=-1,l=0;l<=c;++l){if(l===c){if(u>c){if(47===e.charCodeAt(s+l))return e.slice(s+l+1);if(0===l)return e.slice(s+l)}else a>c&&(47===t.charCodeAt(n+l)?f=l:0===l&&(f=0));break}var h=t.charCodeAt(n+l);if(h!==e.charCodeAt(s+l))break;47===h&&(f=l)}var d="";for(l=n+f+1;l<=o;++l)l!==o&&47!==t.charCodeAt(l)||(0===d.length?d+="..":d+="/..");return d.length>0?d+e.slice(s+f):(s+=f,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(r(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');r(t);var n,i=0,o=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,u=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!a){i=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(c===e.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=u))}return i===o?o=u:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){r(t);for(var e=-1,n=0,i=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var u=t.charCodeAt(s);if(47!==u)-1===i&&(o=!1,i=s+1),46===u?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!o){n=s+1;break}}return-1===e||-1===i||0===a||1===a&&e===i-1&&e===n+1?"":t.slice(e,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+t+n:n}("/",t)},parse:function(t){r(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,i=t.charCodeAt(0),o=47===i;o?(e.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,c=!0,f=t.length-1,l=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===u&&(c=!1,u=f+1),46===i?-1===a?a=f:1!==l&&(l=1):-1!==a&&(l=-1);else if(!c){s=f+1;break}return-1===a||-1===u||0===l||1===l&&a===u-1&&a===s+1?-1!==u&&(e.base=e.name=0===s&&o?t.slice(1,u):t.slice(s,u)):(0===s&&o?(e.name=t.slice(1,a),e.base=t.slice(1,u)):(e.name=t.slice(s,a),e.base=t.slice(s,u)),e.ext=t.slice(a,u)),s>0?e.dir=t.slice(0,s-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}).call(this,r(56))},function(t,e,r){"use strict";r.d(e,"a",(function(){return p}));var n=r(26),i=r.n(n),o=r(83),a=r(104),s=r(54);function u(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)}))}}let f=null;const l=Symbol("IndexCache");function h(){return(h=c((function*(t,e,r){const[n,i]=yield Promise.all([t.lstat(e),t.read(e)]),o=yield a.a.from(i);r.map.set(e,o),r.stats.set(e,n)}))).apply(this,arguments)}function d(){return(d=c((function*(t,e,r){const n=r.stats.get(e);if(void 0===n)return!0;if(null===n)return!1;const i=yield t.lstat(e);return null!==i&&Object(s.a)(n,i)}))).apply(this,arguments)}class p{static acquire({fs:t,gitdir:e,cache:r,allowUnmerged:n=!0},a){return c((function*(){r[l]||(r[l]={map:new Map,stats:new Map});const s=`${e}/index`;let u;null===f&&(f=new i.a({maxPending:1/0}));let p=[];return yield f.acquire(s,c((function*(){const e=r[l];(yield function(t,e,r){return d.apply(this,arguments)}(t,s,e))&&(yield function(t,e,r){return h.apply(this,arguments)}(t,s,e));const i=e.map.get(s);if(p=i.unmergedPaths,p.length&&!n)throw new o.a(p);if(u=yield a(i),i._dirty){const r=yield i.toObject();yield t.write(s,r),e.stats.set(s,yield t.lstat(s)),i._dirty=!1}}))),u}))()}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(2),i=r(43),o=r(51),a=r(133);function s(t){switch(t){case"040000":return"tree";case"100644":case"100755":case"120000":return"blob";case"160000":return"commit"}throw new n.a(`Unexpected GitTree entry mode: ${t}`)}function u(t){return!t.oid&&t.sha&&(t.oid=t.sha),t.mode=function(t){if("number"==typeof t&&(t=t.toString(8)),t.match(/^0?4.*/))return"040000";if(t.match(/^1006.*/))return"100644";if(t.match(/^1007.*/))return"100755";if(t.match(/^120.*/))return"120000";if(t.match(/^160.*/))return"160000";throw new n.a(`Could not understand file mode: ${t}`)}(t.mode),t.type||(t.type=s(t.mode)),t}class c{constructor(e){if(t.isBuffer(e))this._entries=function(t){const e=[];let r=0;for(;r<t.length;){const o=t.indexOf(32,r);if(-1===o)throw new n.a(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next space character.`);const a=t.indexOf(0,r);if(-1===a)throw new n.a(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next null character.`);let u=t.slice(r,o).toString("utf8");"40000"===u&&(u="040000");const c=s(u),f=t.slice(o+1,a).toString("utf8");if(f.includes("\\")||f.includes("/"))throw new i.a(f);const l=t.slice(a+1,a+21).toString("hex");r=a+21,e.push({mode:u,path:f,oid:l,type:c})}return e}(e);else{if(!Array.isArray(e))throw new n.a("invalid type passed to GitTree constructor");this._entries=e.map(u)}this._entries.sort(o.a)}static from(t){return new c(t)}render(){return this._entries.map(t=>`${t.mode} ${t.type} ${t.oid} ${t.path}`).join("\n")}toObject(){const e=[...this._entries];return e.sort(a.a),t.concat(e.map(e=>{const r=t.from(e.mode.replace(/^0/,"")),n=t.from(" "),i=t.from(e.path,"utf8"),o=t.from([0]),a=t.from(e.oid,"hex");return t.concat([r,n,i,o,a])}))}entries(){return this._entries}*[Symbol.iterator](){for(const t of this._entries)yield t}}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";var n=r(84),i=r.n(n);function o(t){let e="";for(const r of new Uint8Array(t))r<16&&(e+="0"),e+=r.toString(16);return e}function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}r.d(e,"a",(function(){return c}));let u=null;function c(t){return f.apply(this,arguments)}function f(){return(f=s((function*(t){return null===u&&(u=yield p()),u?h(t):l(t)}))).apply(this,arguments)}function l(t){return(new i.a).update(t).digest("hex")}function h(t){return d.apply(this,arguments)}function d(){return(d=s((function*(t){return o(yield crypto.subtle.digest("SHA-1",t))}))).apply(this,arguments)}function p(){return y.apply(this,arguments)}function y(){return(y=s((function*(){try{return"da39a3ee5e6b4b0d3255bfef95601890afd80709"===(yield h(new Uint8Array([])))}catch(t){}return!1}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));class n{constructor(t){this.buffer=t,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(t){this._start=t}slice(t){const e=this.buffer.slice(this._start,this._start+t);return this._start+=t,e}toString(t,e){const r=this.buffer.toString(t,this._start,this._start+e);return this._start+=e,r}write(t,e,r){const n=this.buffer.write(t,this._start,e,r);return this._start+=e,n}copy(t,e,r){const n=t.copy(this.buffer,this._start,e,r);return this._start+=n,n}readUInt8(){const t=this.buffer.readUInt8(this._start);return this._start+=1,t}writeUInt8(t){const e=this.buffer.writeUInt8(t,this._start);return this._start+=1,e}readUInt16BE(){const t=this.buffer.readUInt16BE(this._start);return this._start+=2,t}writeUInt16BE(t){const e=this.buffer.writeUInt16BE(t,this._start);return this._start+=2,e}readUInt32BE(){const t=this.buffer.readUInt32BE(this._start);return this._start+=4,t}writeUInt32BE(t){const e=this.buffer.writeUInt32BE(t,this._start);return this._start+=4,e}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return f}));var n=r(2),i=r(50),o=r(69),a=r(21),s=r(137),u=r(39);function c(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}class f{constructor(e){if("string"==typeof e)this._commit=e;else if(t.isBuffer(e))this._commit=e.toString("utf8");else{if("object"!=typeof e)throw new n.a("invalid type passed to GitCommit constructor");this._commit=f.render(e)}}static fromPayloadSignature({payload:t,signature:e}){const r=f.justHeaders(t),n=f.justMessage(t),i=Object(a.a)(r+"\ngpgsig"+Object(o.a)(e)+"\n"+n);return new f(i)}static from(t){return new f(t)}toObject(){return t.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return f.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return Object(a.a)(t.slice(t.indexOf("\n\n")+2))}static justHeaders(t){return t.slice(0,t.indexOf("\n\n"))}parseHeaders(){const t=f.justHeaders(this._commit).split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={parent:[]};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.author&&(r.author=Object(u.a)(r.author)),r.committer&&(r.committer=Object(u.a)(r.committer)),r}static renderHeaders(t){let e="";if(t.tree?e+=`tree ${t.tree}\n`:e+="tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n",t.parent){if(void 0===t.parent.length)throw new n.a("commit 'parent' property should be an array");for(const r of t.parent)e+=`parent ${r}\n`}const r=t.author;e+=`author ${Object(i.a)(r)}\n`;const a=t.committer||t.author;return e+=`committer ${Object(i.a)(a)}\n`,t.gpgsig&&(e+="gpgsig"+Object(o.a)(t.gpgsig)),e}static render(t){return f.renderHeaders(t)+"\n"+Object(a.a)(t.message)}render(){return this._commit}withoutSignature(){const t=Object(a.a)(this._commit);if(-1===t.indexOf("\ngpgsig"))return t;const e=t.slice(0,t.indexOf("\ngpgsig")),r=t.slice(t.indexOf("-----END PGP SIGNATURE-----\n")+"-----END PGP SIGNATURE-----\n".length);return Object(a.a)(e+"\n"+r)}isolateSignature(){const t=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+"-----END PGP SIGNATURE-----".length);return Object(s.a)(t)}static sign(t,e,r){return(n=function*(){const n=t.withoutSignature(),i=f.justMessage(t._commit);let{signature:s}=yield e({payload:n,secretKey:r});s=Object(a.a)(s);const u=f.justHeaders(t._commit)+"\ngpgsig"+Object(o.a)(s)+"\n"+i;return f.from(u)},function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){c(o,r,i,a,s,"next",t)}function s(t){c(o,r,i,a,s,"throw",t)}a(void 0)}))})();var n}}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(22),i=r(140),o=r(87),a=r(15);function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t){return f.apply(this,arguments)}function f(){return(f=u((function*({fs:e,gitdir:r,type:s,object:u,format:c="content",oid:f,dryRun:l=!1}){return"deflated"!==c&&("wrapped"!==c&&(u=n.a.wrap({type:s,object:u})),f=yield Object(a.a)(u),u=t.from(yield Object(o.a)(u))),l||(yield Object(i.a)({fs:e,gitdir:r,object:u,format:"deflated",oid:f})),f}))).apply(this,arguments)}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1);class i extends n.a{constructor(t,e,r,n){super(`Object ${t} ${n?`at ${n}`:""}was anticipated to be a ${r} but it is a ${e}.`),this.code=this.name=i.code,this.data={oid:t,actual:e,expected:r,filepath:n}}}i.code="ObjectTypeError"},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(2),i=r(50),o=r(21),a=r(39);function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}class u{constructor(e){if("string"==typeof e)this._tag=e;else if(t.isBuffer(e))this._tag=e.toString("utf8");else{if("object"!=typeof e)throw new n.a("invalid type passed to GitAnnotatedTag constructor");this._tag=u.render(e)}}static from(t){return new u(t)}static render(t){return`object ${t.object}\ntype ${t.type}\ntag ${t.tag}\ntagger ${Object(i.a)(t.tagger)}\n\n${t.message}\n${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf("\n\n"))}message(){const t=this.withoutSignature();return t.slice(t.indexOf("\n\n")+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){const t=this.justHeaders().split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.tagger&&(r.tagger=Object(a.a)(r.tagger)),r.committer&&(r.committer=Object(a.a)(r.committer)),r}withoutSignature(){const t=Object(o.a)(this._tag);return-1===t.indexOf("\n-----BEGIN PGP SIGNATURE-----")?t:t.slice(0,t.lastIndexOf("\n-----BEGIN PGP SIGNATURE-----"))}gpgsig(){if(-1===this._tag.indexOf("\n-----BEGIN PGP SIGNATURE-----"))return;const t=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+"-----END PGP SIGNATURE-----".length);return Object(o.a)(t)}payload(){return this.withoutSignature()+"\n"}toObject(){return t.from(this._tag,"utf8")}static sign(t,e,r){return(n=function*(){const n=t.payload();let{signature:i}=yield e({payload:n,secretKey:r});i=Object(o.a)(i);const a=n+i;return u.from(a)},function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))})();var n}}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";function n(t){return t=(t=(t=t.replace(/\r/g,"")).replace(/^\n+/,"")).replace(/\n+$/,"")+"\n"}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return i}));var n=r(2);class i{static wrap({type:t,object:e}){const r=`${t} ${e.length}\0`,n=r.length,i=n+e.length,o=new Uint8Array(i);for(let t=0;t<n;t++)o[t]=r.charCodeAt(t);return o.set(e,n),o}static unwrap(e){const r=e.indexOf(32),i=e.indexOf(0),o=e.slice(0,r).toString("utf8"),a=e.slice(r+1,i).toString("utf8"),s=e.length-(i+1);if(parseInt(a)!==s)throw new n.a(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:o,object:t.from(e.slice(i+1))}}}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";function n(t){const e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return-1===e?".":0===e?"/":t.slice(0,e)}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(63);function i(t,e,r,n){if(void 0!==t&&void 0!==e)return[t,e];void 0===r&&(r=n.valueOf());const i=Math.floor(r/1e3);return[i,1e6*(r-1e3*i)]}function o(t){const[e,r]=i(t.ctimeSeconds,t.ctimeNanoseconds,t.ctimeMs,t.ctime),[o,a]=i(t.mtimeSeconds,t.mtimeNanoseconds,t.mtimeMs,t.mtime);return{ctimeSeconds:e%2**32,ctimeNanoseconds:r%2**32,mtimeSeconds:o%2**32,mtimeNanoseconds:a%2**32,dev:t.dev%2**32,ino:t.ino%2**32,mode:Object(n.a)(t.mode%2**32),uid:t.uid%2**32,gid:t.gid%2**32,size:t.size>-1?t.size%2**32:0}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1);class i extends n.a{constructor(t){super(`No name was provided for ${t} in the argument or in the .git/config file.`),this.code=this.name=i.code,this.data={role:t}}}i.code="MissingNameError"},function(t,e,r){"use strict";t.exports=r(160)},function(t,e,r){"use strict";var n=r(8),i=r(19),o=r(4),a=r(14),s=r(7),u=r(12),c=r(63),f=r(52);function l(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}class d{constructor({fs:t,gitdir:e,ref:r,cache:i}){var a=this;this.fs=t,this.cache=i,this.gitdir=e,this.mapPromise=h((function*(){const i=new Map;let s;try{s=yield o.a.resolve({fs:t,gitdir:e,ref:r})}catch(t){t instanceof n.a&&(s="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}const u=yield Object(f.a)({fs:t,cache:a.cache,gitdir:e,oid:s});return u.type="tree",u.mode="40000",i.set(".",u),i}))();const s=this;this.ConstructEntry=class{constructor(t){this._fullpath=t,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}type(){var t=this;return h((function*(){return s.type(t)}))()}mode(){var t=this;return h((function*(){return s.mode(t)}))()}stat(){var t=this;return h((function*(){return s.stat(t)}))()}content(){var t=this;return h((function*(){return s.content(t)}))()}oid(){var t=this;return h((function*(){return s.oid(t)}))()}}}readdir(t){var e=this;return h((function*(){const r=t._fullpath,{fs:n,cache:o,gitdir:c}=e,f=yield e.mapPromise,l=f.get(r);if(!l)throw new Error(`No obj for ${r}`);const h=l.oid;if(!h)throw new Error(`No oid for obj ${JSON.stringify(l)}`);if("tree"!==l.