codemod 0.18.7 → 0.18.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -674,7 +674,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);return new yI(t,e).found}f
|
|
|
674
674
|
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof yI))return new yI(t,e);if(K3i(this,t,e),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var i=0;i<n;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}yI.prototype._finish=function(){if(Nnr.ok(this instanceof yI),this.realpath){var t=this;this.matches.forEach(function(e,n){var i=t.matches[n]=Object.create(null);for(var s in e)try{s=t._makeAbs(s);var o=H3i.realpathSync(s,t.realpathCache);i[o]=!0}catch(f){if(f.syscall==="stat")i[t._makeAbs(s)]=!0;else throw f}})}eAe.finish(this)};yI.prototype._process=function(t,e,n){Nnr.ok(this instanceof yI);for(var i=0;typeof t[i]=="string";)i++;var s;switch(i){case t.length:this._processSimple(t.join("/"),e);return;case 0:s=null;break;default:s=t.slice(0,i).join("/");break}var o=t.slice(i),f;s===null?f=".":((GEt(s)||GEt(t.map(function(x){return typeof x=="string"?x:"[*]"}).join("/")))&&(!s||!GEt(s))&&(s="/"+s),f=s);var h=this._makeAbs(f);if(!J3i(this,f)){var _=o[0]===Pnr.GLOBSTAR;_?this._processGlobStar(s,f,h,o,e,n):this._processReaddir(s,f,h,o,e,n)}};yI.prototype._processReaddir=function(t,e,n,i,s,o){var f=this._readdir(n,o);if(f){for(var h=i[0],_=!!this.minimatch.negate,x=h._glob,v=this.dot||x.charAt(0)===".",T=[],A=0;A<f.length;A++){var w=f[A];if(w.charAt(0)!=="."||v){var N;_&&!t?N=!w.match(h):N=w.match(h),N&&T.push(w)}}var P=T.length;if(P!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[s]||(this.matches[s]=Object.create(null));for(var A=0;A<P;A++){var w=T[A];t&&(t.slice(-1)!=="/"?w=t+"/"+w:w=t+w),w.charAt(0)==="/"&&!this.nomount&&(w=Jln.join(this.root,w)),this._emitMatch(s,w)}return}i.shift();for(var A=0;A<P;A++){var w=T[A],F;t?F=[t,w]:F=[w],this._process(F.concat(i),s,o)}}}};yI.prototype._emitMatch=function(t,e){if(!$3i(this,e)){var n=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=n),!this.matches[t][e]){if(this.nodir){var i=this.cache[n];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}};yI.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,n,i;try{n=this.fs.lstatSync(t)}catch(o){if(o.code==="ENOENT")return null}var s=n&&n.isSymbolicLink();return this.symlinks[t]=s,!s&&n&&!n.isDirectory()?this.cache[t]="FILE":e=this._readdir(t,!1),e};yI.prototype._readdir=function(t,e){var n;if(e&&!$ln(this.symlinks,t))return this._readdirInGlobStar(t);if($ln(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(s){return this._readdirError(t,s),null}};yI.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];t==="/"?i=t+i:i=t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,e};yI.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(t);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=e.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};yI.prototype._processGlobStar=function(t,e,n,i,s,o){var f=this._readdir(n,o);if(f){var h=i.slice(1),_=t?[t]:[],x=_.concat(h);this._process(x,s,!1);var v=f.length,T=this.symlinks[n];if(!(T&&o))for(var A=0;A<v;A++){var w=f[A];if(!(w.charAt(0)==="."&&!this.dot)){var N=_.concat(f[A],h);this._process(N,s,!0);var P=_.concat(f[A],i);this._process(P,s,!0)}}}};yI.prototype._processSimple=function(t,e){var n=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!n){if(t&&GEt(t)&&!this.nomount){var i=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=Jln.join(this.root,t):(t=Jln.resolve(this.root,t),i&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}};yI.prototype._stat=function(t){var e=this._makeAbs(t),n=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&$ln(this.cache,e)){var f=this.cache[e];if(Array.isArray(f)&&(f="DIR"),!n||f==="DIR")return f;if(n&&f==="FILE")return!1}var i,s=this.statCache[e];if(!s){var o;try{o=this.fs.lstatSync(e)}catch(h){if(h&&(h.code==="ENOENT"||h.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(o&&o.isSymbolicLink())try{s=this.fs.statSync(e)}catch{s=o}else s=o}this.statCache[e]=s;var f=!0;return s&&(f=s.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||f,n&&f==="FILE"?!1:f};yI.prototype._mark=function(t){return eAe.mark(this,t)};yI.prototype._makeAbs=function(t){return eAe.makeAbs(this,t)}});var Yln=le((T9a,Mnr)=>{Mnr.exports=Lnr;function Lnr(t,e){if(t&&e)return Lnr(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(i){n[i]=t[i]}),n;function n(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];var o=t.apply(this,i),f=i[i.length-1];return typeof o=="function"&&o!==f&&Object.keys(f).forEach(function(h){o[h]=f[h]}),o}}});var Zln=le((D9a,Qln)=>{var Fnr=Yln();Qln.exports=Fnr(UEt);Qln.exports.strict=Fnr(Bnr);UEt.proto=UEt(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return UEt(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Bnr(this)},configurable:!0})});function UEt(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function Bnr(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}});var jnr=le((A9a,Wnr)=>{var X3i=Yln(),Ket=Object.create(null),Y3i=Zln();Wnr.exports=X3i(Q3i);function Q3i(t,e){return Ket[t]?(Ket[t].push(e),null):(Ket[t]=[e],Z3i(t))}function Z3i(t){return Y3i(function e(){var n=Ket[t],i=n.length,s=eFi(arguments);try{for(var o=0;o<i;o++)n[o].apply(null,s)}finally{n.length>i?(n.splice(0,i),process.nextTick(function(){e.apply(null,s)})):delete Ket[t]}})}function eFi(t){for(var e=t.length,n=[],i=0;i<e;i++)n[i]=t[i];return n}});var Xln=le((I9a,Gnr)=>{Gnr.exports=tAe;var tFi=jln(),znr=WEt(),C9a=znr.Minimatch,nFi=j2(),rFi=require("events").EventEmitter,ecn=require("path"),tcn=require("assert"),Jet=zEt(),rcn=Onr(),nAe=Kln(),iFi=nAe.setopts,ncn=nAe.ownProp,icn=jnr(),w9a=require("util"),sFi=nAe.childrenIgnored,aFi=nAe.isIgnored,oFi=Zln();function tAe(t,e,n){if(typeof e=="function"&&(n=e,e={}),e||(e={}),e.sync){if(n)throw new TypeError("callback provided to sync glob");return rcn(t,e)}return new lv(t,e,n)}tAe.sync=rcn;var lFi=tAe.GlobSync=rcn.GlobSync;tAe.glob=tAe;function cFi(t,e){if(e===null||typeof e!="object")return t;for(var n=Object.keys(e),i=n.length;i--;)t[n[i]]=e[n[i]];return t}tAe.hasMagic=function(t,e){var n=cFi({},e);n.noprocess=!0;var i=new lv(t,n),s=i.minimatch.set;if(!t)return!1;if(s.length>1)return!0;for(var o=0;o<s[0].length;o++)if(typeof s[0][o]!="string")return!0;return!1};tAe.Glob=lv;nFi(lv,rFi);function lv(t,e,n){if(typeof e=="function"&&(n=e,e=null),e&&e.sync){if(n)throw new TypeError("callback provided to sync glob");return new lFi(t,e)}if(!(this instanceof lv))return new lv(t,e,n);iFi(this,t,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof n=="function"&&(n=oFi(n),this.on("error",n),this.on("end",function(_){n(null,_)}));var s=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return h();for(var o=!0,f=0;f<i;f++)this._process(this.minimatch.set[f],f,!1,h);o=!1;function h(){--s._processing,s._processing<=0&&(o?process.nextTick(function(){s._finish()}):s._finish())}}lv.prototype._finish=function(){if(tcn(this instanceof lv),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();nAe.finish(this),this.emit("end",this.found)}};lv.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var t=this.matches.length;if(t===0)return this._finish();for(var e=this,n=0;n<this.matches.length;n++)this._realpathSet(n,i);function i(){--t===0&&e._finish()}};lv.prototype._realpathSet=function(t,e){var n=this.matches[t];if(!n)return e();var i=Object.keys(n),s=this,o=i.length;if(o===0)return e();var f=this.matches[t]=Object.create(null);i.forEach(function(h,_){h=s._makeAbs(h),tFi.realpath(h,s.realpathCache,function(x,v){x?x.syscall==="stat"?f[h]=!0:s.emit("error",x):f[v]=!0,--o===0&&(s.matches[t]=f,e())})})};lv.prototype._mark=function(t){return nAe.mark(this,t)};lv.prototype._makeAbs=function(t){return nAe.makeAbs(this,t)};lv.prototype.abort=function(){this.aborted=!0,this.emit("abort")};lv.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};lv.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var n=t[e];this._emitMatch(n[0],n[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<i.length;e++){var s=i[e];this._processing--,this._process(s[0],s[1],s[2],s[3])}}}};lv.prototype._process=function(t,e,n,i){if(tcn(this instanceof lv),tcn(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([t,e,n,i]);return}for(var s=0;typeof t[s]=="string";)s++;var o;switch(s){case t.length:this._processSimple(t.join("/"),e,i);return;case 0:o=null;break;default:o=t.slice(0,s).join("/");break}var f=t.slice(s),h;o===null?h=".":((Jet(o)||Jet(t.map(function(v){return typeof v=="string"?v:"[*]"}).join("/")))&&(!o||!Jet(o))&&(o="/"+o),h=o);var _=this._makeAbs(h);if(sFi(this,h))return i();var x=f[0]===znr.GLOBSTAR;x?this._processGlobStar(o,h,_,f,e,n,i):this._processReaddir(o,h,_,f,e,n,i)}};lv.prototype._processReaddir=function(t,e,n,i,s,o,f){var h=this;this._readdir(n,o,function(_,x){return h._processReaddir2(t,e,n,i,s,o,x,f)})};lv.prototype._processReaddir2=function(t,e,n,i,s,o,f,h){if(!f)return h();for(var _=i[0],x=!!this.minimatch.negate,v=_._glob,T=this.dot||v.charAt(0)===".",A=[],w=0;w<f.length;w++){var N=f[w];if(N.charAt(0)!=="."||T){var P;x&&!t?P=!N.match(_):P=N.match(_),P&&A.push(N)}}var F=A.length;if(F===0)return h();if(i.length===1&&!this.mark&&!this.stat){this.matches[s]||(this.matches[s]=Object.create(null));for(var w=0;w<F;w++){var N=A[w];t&&(t!=="/"?N=t+"/"+N:N=t+N),N.charAt(0)==="/"&&!this.nomount&&(N=ecn.join(this.root,N)),this._emitMatch(s,N)}return h()}i.shift();for(var w=0;w<F;w++){var N=A[w],j;t&&(t!=="/"?N=t+"/"+N:N=t+N),this._process([N].concat(i),s,o,h)}h()};lv.prototype._emitMatch=function(t,e){if(!this.aborted&&!aFi(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var n=Jet(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=n),!this.matches[t][e]){if(this.nodir){var i=this.cache[n];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0;var s=this.statCache[n];s&&this.emit("stat",e,s),this.emit("match",e)}}};lv.prototype._readdirInGlobStar=function(t,e){if(this.aborted)return;if(this.follow)return this._readdir(t,!1,e);var n="lstat\0"+t,i=this,s=icn(n,o);s&&i.fs.lstat(t,s);function o(f,h){if(f&&f.code==="ENOENT")return e();var _=h&&h.isSymbolicLink();i.symlinks[t]=_,!_&&h&&!h.isDirectory()?(i.cache[t]="FILE",e()):i._readdir(t,!1,e)}};lv.prototype._readdir=function(t,e,n){if(!this.aborted&&(n=icn("readdir\0"+t+"\0"+e,n),!!n)){if(e&&!ncn(this.symlinks,t))return this._readdirInGlobStar(t,n);if(ncn(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return n();if(Array.isArray(i))return n(null,i)}var s=this;s.fs.readdir(t,uFi(this,t,n))}};function uFi(t,e,n){return function(i,s){i?t._readdirError(e,i,n):t._readdirEntries(e,s,n)}}lv.prototype._readdirEntries=function(t,e,n){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<e.length;i++){var s=e[i];t==="/"?s=t+s:s=t+"/"+s,this.cache[s]=!0}return this.cache[t]=e,n(null,e)}};lv.prototype._readdirError=function(t,e,n){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(t);if(this.cache[i]="FILE",i===this.cwdAbs){var s=new Error(e.code+" invalid cwd "+this.cwd);s.path=this.cwd,s.code=e.code,this.emit("error",s),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return n()}};lv.prototype._processGlobStar=function(t,e,n,i,s,o,f){var h=this;this._readdir(n,o,function(_,x){h._processGlobStar2(t,e,n,i,s,o,x,f)})};lv.prototype._processGlobStar2=function(t,e,n,i,s,o,f,h){if(!f)return h();var _=i.slice(1),x=t?[t]:[],v=x.concat(_);this._process(v,s,!1,h);var T=this.symlinks[n],A=f.length;if(T&&o)return h();for(var w=0;w<A;w++){var N=f[w];if(!(N.charAt(0)==="."&&!this.dot)){var P=x.concat(f[w],_);this._process(P,s,!0,h);var F=x.concat(f[w],i);this._process(F,s,!0,h)}}h()};lv.prototype._processSimple=function(t,e,n){var i=this;this._stat(t,function(s,o){i._processSimple2(t,e,s,o,n)})};lv.prototype._processSimple2=function(t,e,n,i,s){if(this.matches[e]||(this.matches[e]=Object.create(null)),!i)return s();if(t&&Jet(t)&&!this.nomount){var o=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=ecn.join(this.root,t):(t=ecn.resolve(this.root,t),o&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),s()};lv.prototype._stat=function(t,e){var n=this._makeAbs(t),i=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&ncn(this.cache,n)){var s=this.cache[n];if(Array.isArray(s)&&(s="DIR"),!i||s==="DIR")return e(null,s);if(i&&s==="FILE")return e()}var o,f=this.statCache[n];if(f!==void 0){if(f===!1)return e(null,f);var h=f.isDirectory()?"DIR":"FILE";return i&&h==="FILE"?e():e(null,h,f)}var _=this,x=icn("stat\0"+n,v);x&&_.fs.lstat(n,x);function v(T,A){if(A&&A.isSymbolicLink())return _.fs.stat(n,function(w,N){w?_._stat2(t,n,null,A,e):_._stat2(t,n,w,N,e)});_._stat2(t,n,T,A,e)}};lv.prototype._stat2=function(t,e,n,i,s){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return this.statCache[e]=!1,s();var o=t.slice(-1)==="/";if(this.statCache[e]=i,e.slice(-1)==="/"&&i&&!i.isDirectory())return s(null,!1,i);var f=!0;return i&&(f=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||f,o&&f==="FILE"?s():s(null,f,i)}});var lcn=le((P9a,Xnr)=>{Xnr.exports=ocn;ocn.sync=$nr;var Oy=require("assert"),Hnr=require("path"),Unr=require("fs"),M8e=void 0;try{M8e=Xln()}catch{}var Knr=parseInt("666",8),fFi={nosort:!0,silent:!0},scn=0,$et=process.platform==="win32";function Jnr(t){var e=["unlink","chmod","stat","lstat","rmdir","readdir"];if(e.forEach(function(n){t[n]=t[n]||Unr[n],n=n+"Sync",t[n]=t[n]||Unr[n]}),t.maxBusyTries=t.maxBusyTries||3,t.emfileWait=t.emfileWait||1e3,t.glob===!1&&(t.disableGlob=!0),t.disableGlob!==!0&&M8e===void 0)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");t.disableGlob=t.disableGlob||!1,t.glob=t.glob||fFi}function ocn(t,e,n){typeof e=="function"&&(n=e,e={}),Oy(t,"rimraf: missing path"),Oy.equal(typeof t,"string","rimraf: path should be a string"),Oy.equal(typeof n,"function","rimraf: callback function required"),Oy(e,"rimraf: invalid options argument provided"),Oy.equal(typeof e,"object","rimraf: options should be object"),Jnr(e);var i=0,s=null,o=0;if(e.disableGlob||!M8e.hasMagic(t))return h(null,[t]);e.lstat(t,function(_,x){if(!_)return h(null,[t]);M8e(t,e.glob,h)});function f(_){s=s||_,--o===0&&n(s)}function h(_,x){if(_)return n(_);if(o=x.length,o===0)return n();x.forEach(function(v){acn(v,e,function T(A){if(A){if((A.code==="EBUSY"||A.code==="ENOTEMPTY"||A.code==="EPERM")&&i<e.maxBusyTries){i++;var w=i*100;return setTimeout(function(){acn(v,e,T)},w)}if(A.code==="EMFILE"&&scn<e.emfileWait)return setTimeout(function(){acn(v,e,T)},scn++);A.code==="ENOENT"&&(A=null)}scn=0,f(A)})})}}function acn(t,e,n){Oy(t),Oy(e),Oy(typeof n=="function"),e.lstat(t,function(i,s){if(i&&i.code==="ENOENT")return n(null);if(i&&i.code==="EPERM"&&$et&&Vnr(t,e,i,n),s&&s.isDirectory())return VEt(t,e,i,n);e.unlink(t,function(o){if(o){if(o.code==="ENOENT")return n(null);if(o.code==="EPERM")return $et?Vnr(t,e,o,n):VEt(t,e,o,n);if(o.code==="EISDIR")return VEt(t,e,o,n)}return n(o)})})}function Vnr(t,e,n,i){Oy(t),Oy(e),Oy(typeof i=="function"),n&&Oy(n instanceof Error),e.chmod(t,Knr,function(s){s?i(s.code==="ENOENT"?null:n):e.stat(t,function(o,f){o?i(o.code==="ENOENT"?null:n):f.isDirectory()?VEt(t,e,n,i):e.unlink(t,i)})})}function qnr(t,e,n){Oy(t),Oy(e),n&&Oy(n instanceof Error);try{e.chmodSync(t,Knr)}catch(s){if(s.code==="ENOENT")return;throw n}try{var i=e.statSync(t)}catch(s){if(s.code==="ENOENT")return;throw n}i.isDirectory()?qEt(t,e,n):e.unlinkSync(t)}function VEt(t,e,n,i){Oy(t),Oy(e),n&&Oy(n instanceof Error),Oy(typeof i=="function"),e.rmdir(t,function(s){s&&(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM")?dFi(t,e,i):s&&s.code==="ENOTDIR"?i(n):i(s)})}function dFi(t,e,n){Oy(t),Oy(e),Oy(typeof n=="function"),e.readdir(t,function(i,s){if(i)return n(i);var o=s.length;if(o===0)return e.rmdir(t,n);var f;s.forEach(function(h){ocn(Hnr.join(t,h),e,function(_){if(!f){if(_)return n(f=_);--o===0&&e.rmdir(t,n)}})})})}function $nr(t,e){e=e||{},Jnr(e),Oy(t,"rimraf: missing path"),Oy.equal(typeof t,"string","rimraf: path should be a string"),Oy(e,"rimraf: missing options"),Oy.equal(typeof e,"object","rimraf: options should be object");var n;if(e.disableGlob||!M8e.hasMagic(t))n=[t];else try{e.lstatSync(t),n=[t]}catch{n=M8e.sync(t,e.glob)}if(n.length)for(var i=0;i<n.length;i++){var t=n[i];try{var s=e.lstatSync(t)}catch(f){if(f.code==="ENOENT")return;f.code==="EPERM"&&$et&&qnr(t,e,f)}try{s&&s.isDirectory()?qEt(t,e,null):e.unlinkSync(t)}catch(f){if(f.code==="ENOENT")return;if(f.code==="EPERM")return $et?qnr(t,e,f):qEt(t,e,f);if(f.code!=="EISDIR")throw f;qEt(t,e,f)}}}function qEt(t,e,n){Oy(t),Oy(e),n&&Oy(n instanceof Error);try{e.rmdirSync(t)}catch(i){if(i.code==="ENOENT")return;if(i.code==="ENOTDIR")throw n;(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")&&pFi(t,e)}}function pFi(t,e){Oy(t),Oy(e),e.readdirSync(t).forEach(function(f){$nr(Hnr.join(t,f),e)});var n=$et?100:1,i=0;do{var s=!0;try{var o=e.rmdirSync(t,e);return s=!1,o}finally{if(++i<n&&s)continue}}while(!0)}});var ccn=le((N9a,Znr)=>{var Xet=require("path"),Ynr=require("fs"),Qnr=parseInt("0777",8);Znr.exports=F8e.mkdirp=F8e.mkdirP=F8e;function F8e(t,e,n,i){typeof e=="function"?(n=e,e={}):(!e||typeof e!="object")&&(e={mode:e});var s=e.mode,o=e.fs||Ynr;s===void 0&&(s=Qnr),i||(i=null);var f=n||function(){};t=Xet.resolve(t),o.mkdir(t,s,function(h){if(!h)return i=i||t,f(null,i);switch(h.code){case"ENOENT":if(Xet.dirname(t)===t)return f(h);F8e(Xet.dirname(t),e,function(_,x){_?f(_,x):F8e(t,e,f,x)});break;default:o.stat(t,function(_,x){_||!x.isDirectory()?f(h,i):f(null,i)});break}})}F8e.sync=function t(e,n,i){(!n||typeof n!="object")&&(n={mode:n});var s=n.mode,o=n.fs||Ynr;s===void 0&&(s=Qnr),i||(i=null),e=Xet.resolve(e);try{o.mkdirSync(e,s),i=i||e}catch(h){switch(h.code){case"ENOENT":i=t(Xet.dirname(e),n,i),t(e,n,i);break;default:var f;try{f=o.statSync(e)}catch{throw h}if(!f.isDirectory())throw h;break}}return i}});var HEt=le((k9a,err)=>{err.exports=ucn;function ucn(t){if(t._collected)return;if(t._paused)return t.on("resume",ucn.bind(null,t));t._collected=!0,t.pause(),t.on("data",n),t.on("end",n);var e=[];function n(f){typeof f=="string"&&(f=new Buffer(f)),!(Buffer.isBuffer(f)&&!f.length)&&e.push(f)}t.on("entry",s);var i=[];function s(f){ucn(f),i.push(f)}t.on("proxy",o);function o(f){f.pause()}t.pipe=function(f){return function(h){var _=0;(function v(){var T=i[_++];if(!T)return x();T.on("end",v),h?h.add(T):t.emit("entry",T)})();function x(){t.removeListener("entry",s),t.removeListener("data",n),t.removeListener("end",n),t.pipe=f,h&&t.pipe(h),e.forEach(function(v){v?t.emit("data",v):t.emit("end")}),t.resume()}return h}}(t.pipe)}});var fcn=le((R9a,nrr)=>{nrr.exports=m_e;var KEt=B8e(),hFi=j2(),mFi=ccn(),trr=require("path"),_Fi=HEt();hFi(m_e,KEt);function m_e(t){var e=this;e instanceof m_e||e.error("DirWriter must be called as constructor.",null,!0),(t.type!=="Directory"||!t.Directory)&&e.error("Non-directory type "+t.type+" "+JSON.stringify(t),null,!0),KEt.call(this,t)}m_e.prototype._create=function(){var t=this;mFi(t._path,KEt.dirmode,function(e){if(e)return t.error(e);t.ready=!0,t.emit("ready"),t._process()})};m_e.prototype.write=function(){return!0};m_e.prototype.end=function(){this._ended=!0,this._process()};m_e.prototype.add=function(t){var e=this;return _Fi(t),!e.ready||e._currentEntry?(e._buffer.push(t),!1):e._ended?e.error("add after end"):(e._buffer.push(t),e._process(),this._buffer.length===0)};m_e.prototype._process=function(){var t=this;if(t._processing)return;var e=t._buffer.shift();if(!e){t.emit("drain"),t._ended&&t._finish();return}t._processing=!0,t.emit("entry",e);var n=e,i;do{if(i=n._path||n.path,i===t.root._path||i===t._path||i&&i.indexOf(t._path)===0)return t._processing=!1,e._collected&&e.pipe(),t._process();n=n.parent}while(n);var s={parent:t,root:t.root||t,type:e.type,depth:t.depth+1};i=e._path||e.path||e.props.path,e.parent&&(i=i.substr(e.parent._path.length+1)),s.path=trr.join(t.path,trr.join("/",i)),s.filter=t.filter,Object.keys(e.props).forEach(function(_){s.hasOwnProperty(_)||(s[_]=e.props[_])});var o=t._currentChild=new KEt(s);o.on("ready",function(){e.pipe(o),e.resume()}),o.on("error",function(_){o._swallowErrors?(t.warn(_),o.emit("end"),o.emit("close")):t.emit("error",_)}),o.on("close",h);var f=!1;function h(){f||(f=!0,t._currentChild=null,t._processing=!1,t._process())}}});var dcn=le((O9a,orr)=>{orr.exports=Yet;var irr=$ee(),srr=B8e(),gFi=j2(),xFi=require("path"),yFi=lcn();gFi(Yet,srr);function Yet(t){var e=this;if(!(e instanceof Yet))throw new Error("LinkWriter must be called as constructor.");if(!(t.type==="Link"&&t.Link||t.type==="SymbolicLink"&&t.SymbolicLink))throw new Error("Non-link type "+t.type);t.linkpath===""&&(t.linkpath="."),t.linkpath||e.error("Need linkpath property to create "+t.type),srr.call(this,t)}Yet.prototype._create=function(){var t=this,e=t.type==="Link"||process.platform==="win32",n=e?"link":"symlink",i=e?xFi.resolve(t.dirname,t.linkpath):t.linkpath;if(e)return rrr(t,i,n);irr.readlink(t._path,function(s,o){if(o&&o===i)return arr(t);rrr(t,i,n)})};function rrr(t,e,n){yFi(t._path,function(i){if(i)return t.error(i);vFi(t,e,n)})}function vFi(t,e,n){irr[n](e,t._path,function(i){if(i)if((i.code==="ENOENT"||i.code==="EACCES"||i.code==="EPERM")&&process.platform==="win32")t.ready=!0,t.emit("ready"),t.emit("end"),t.emit("close"),t.end=t._finish=function(){};else return t.error(i);arr(t)})}function arr(t){t.ready=!0,t.emit("ready"),t._ended&&!t._finished&&t._finish()}Yet.prototype.end=function(){this._ended=!0,this.ready&&(this._finished=!0,this._finish())}});var pcn=le((L9a,crr)=>{crr.exports=rAe;var bFi=$ee(),JEt=B8e(),EFi=j2(),lrr={};EFi(rAe,JEt);function rAe(t){var e=this;if(!(e instanceof rAe))throw new Error("FileWriter must be called as constructor.");if(t.type!=="File"||!t.File)throw new Error("Non-file type "+t.type);e._buffer=[],e._bytesWritten=0,JEt.call(this,t)}rAe.prototype._create=function(){var t=this;if(!t._stream){var e={};t.props.flags&&(e.flags=t.props.flags),e.mode=JEt.filemode,t._old&&t._old.blksize&&(e.bufferSize=t._old.blksize),t._stream=bFi.createWriteStream(t._path,e),t._stream.on("open",function(){t.ready=!0,t._buffer.forEach(function(n){n===lrr?t._stream.end():t._stream.write(n)}),t.emit("ready"),t.emit("drain")}),t._stream.on("error",function(n){t.emit("error",n)}),t._stream.on("drain",function(){t.emit("drain")}),t._stream.on("close",function(){t._finish()})}};rAe.prototype.write=function(t){var e=this;if(e._bytesWritten+=t.length,!e.ready){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new Error("invalid write data");return e._buffer.push(t),!1}var n=e._stream.write(t);return n===!1&&e._stream._queue?e._stream._queue.length<=2:n};rAe.prototype.end=function(t){var e=this;return t&&e.write(t),e.ready?e._stream.end():(e._buffer.push(lrr),!1)};rAe.prototype._finish=function(){var t=this;typeof t.size=="number"&&t._bytesWritten!==t.size&&t.error(`Did not get expected byte count.
|
|
675
675
|
expect: `+t.size+`
|
|
676
676
|
actual: `+t._bytesWritten),JEt.prototype._finish.call(t)}});var mcn=le((M9a,urr)=>{urr.exports=__e;var hcn=B8e(),SFi=zet(),TFi=j2(),DFi=HEt(),AFi=require("fs");TFi(__e,hcn);function __e(t){var e=this;if(!(e instanceof __e))throw new Error("ProxyWriter must be called as constructor.");e.props=t,e._needDrain=!1,hcn.call(e,t)}__e.prototype._stat=function(){var t=this,e=t.props,n=e.follow?"stat":"lstat";AFi[n](e.path,function(i,s){var o;i||!s?o="File":o=SFi(s),e[o]=!0,e.type=t.type=o,t._old=s,t._addProxy(hcn(e,s))})};__e.prototype._addProxy=function(t){var e=this;if(e._proxy)return e.error("proxy already set");e._proxy=t,["ready","error","close","pipe","drain","warn"].forEach(function(i){t.on(i,e.emit.bind(e,i))}),e.emit("proxy",t);var n=e._buffer;n.forEach(function(i){t[i[0]].apply(t,i[1])}),e._buffer.length=0,e._needsDrain&&e.emit("drain")};__e.prototype.add=function(t){return DFi(t),this._proxy?this._proxy.add(t):(this._buffer.push(["add",[t]]),this._needDrain=!0,!1)};__e.prototype.write=function(t){return this._proxy?this._proxy.write(t):(this._buffer.push(["write",[t]]),this._needDrain=!0,!1)};__e.prototype.end=function(t){return this._proxy?this._proxy.end(t):(this._buffer.push(["end",[t]]),!1)}});var B8e=le((F9a,yrr)=>{yrr.exports=uU;var cU=$ee(),CFi=j2(),wFi=lcn(),IFi=ccn(),Qet=require("path"),drr=process.platform==="win32"?0:process.umask(),prr=zet(),hrr=PEt();CFi(uU,hrr);uU.dirmode=parseInt("0777",8)&~drr;uU.filemode=parseInt("0666",8)&~drr;var PFi=fcn(),NFi=dcn(),kFi=pcn(),RFi=mcn();function uU(t,e){var n=this;typeof t=="string"&&(t={path:t});var i=prr(t),s=uU;switch(i){case"Directory":s=PFi;break;case"File":s=kFi;break;case"Link":case"SymbolicLink":s=NFi;break;case null:default:s=RFi;break}if(!(n instanceof s))return new s(t);hrr.call(n),t.path||n.error("Must provide a path",null,!0),n.type=t.type,n.props=t,n.depth=t.depth||0,n.clobber=t.clobber===!1?t.clobber:!0,n.parent=t.parent||null,n.root=t.root||t.parent&&t.parent.root||n,n._path=n.path=Qet.resolve(t.path),process.platform==="win32"&&(n.path=n._path=n.path.replace(/\?/g,"_"),n._path.length>=260&&(n._swallowErrors=!0,n._path="\\\\?\\"+n.path.replace(/\//g,"\\"))),n.basename=Qet.basename(t.path),n.dirname=Qet.dirname(t.path),n.linkpath=t.linkpath||null,t.parent=t.root=null,n.size=t.size,typeof t.mode=="string"&&(t.mode=parseInt(t.mode,8)),n.readable=!1,n.writable=!0,n._buffer=[],n.ready=!1,n.filter=typeof t.filter=="function"?t.filter:null,n._stat(e)}uU.prototype._create=function(){var t=this;cU[t.props.follow?"stat":"lstat"](t._path,function(e){if(e)return t.warn("Cannot create "+t._path+`
|
|
677
|
-
Unsupported type: `+t.type,"ENOTSUP");t._finish()})};uU.prototype._stat=function(t){var e=this,n=e.props,i=n.follow?"stat":"lstat",s=e._proxy||e;t?o(null,t):cU[i](e._path,o);function o(f,h){if(e.filter&&!e.filter.call(s,s,h)){e._aborted=!0,e.emit("end"),e.emit("close");return}if(f||!h)return _cn(e);e._old=h;var _=prr(h);if(_!==e.type||e.type==="File"&&h.nlink>1)return wFi(e._path,function(x){if(x)return e.error(x);e._old=null,_cn(e)});_cn(e)}};function _cn(t){IFi(Qet.dirname(t._path),uU.dirmode,function(e,n){return e?t.error(e):(t._madeDir=n,t._create())})}function mrr(t,e,n,i,s){var o=e.mode,f=e.follow||t.type!=="SymbolicLink"?"chmod":"lchmod";if(!cU[f]||typeof o!="number")return s();var h=n.mode&parseInt("0777",8);if(o=o&parseInt("0777",8),o===h)return s();cU[f](i,o,s)}function _rr(t,e,n,i,s){if(process.platform==="win32"||!process.getuid||process.getuid()!==0||typeof e.uid!="number"&&typeof e.gid!="number"||n.uid===e.uid&&n.gid===e.gid)return s();var o=t.props.follow||t.type!=="SymbolicLink"?"chown":"lchown";if(!cU[o])return s();typeof e.uid!="number"&&(e.uid=n.uid),typeof e.gid!="number"&&(e.gid=n.gid),cU[o](i,e.uid,e.gid,s)}function grr(t,e,n,i,s){if(!cU.utimes||process.platform==="win32")return s();var o=e.follow||t.type!=="SymbolicLink"?"utimes":"lutimes";if(o==="lutimes"&&!cU[o]&&(o="utimes"),!cU[o])return s();var f=n.atime,h=n.mtime,_=e.atime,x=e.mtime;if(_===void 0&&(_=f),x===void 0&&(x=h),frr(_)||(_=new Date(_)),frr(x)||(_=new Date(x)),_.getTime()===f.getTime()&&x.getTime()===h.getTime())return s();cU[o](i,_,x,s)}uU.prototype._finish=function(){var t=this;if(t._finishing)return;t._finishing=!0;var e=0,n=null,i=!1;if(t._old)t._old.atime=new Date(0),t._old.mtime=new Date(0),o(t._old);else{var s=t.props.follow?"stat":"lstat";cU[s](t._path,function(h,_){if(h)if(h.code==="ENOENT"&&(t.type==="Link"||t.type==="SymbolicLink")&&process.platform==="win32"){t.ready=!0,t.emit("ready"),t.emit("end"),t.emit("close"),t.end=t._finish=function(){};return}else return t.error(h);o(t._old=_)})}return;function o(h){e+=3,mrr(t,t.props,h,t._path,f("chmod")),_rr(t,t.props,h,t._path,f("chown")),grr(t,t.props,h,t._path,f("utimes"))}function f(h){return function(_){if(n)return;if(_)return _.fstream_finish_call=h,t.error(n=_);if(--e>0||i)return;if(i=!0,t._madeDir)xrr(t,t._path,x);else return x();function x(v){if(v)return v.fstream_finish_call="setupMadeDir",t.error(v);t.emit("end"),t.emit("close")}}}};function xrr(t,e,n){var i=t._madeDir,s=Qet.dirname(e);OFi(t,s,function(o){if(o)return n(o);if(s===i)return n();xrr(t,s,n)})}function OFi(t,e,n){var i={};Object.keys(t.props).forEach(function(h){i[h]=t.props[h],h==="mode"&&t.type!=="Directory"&&(i[h]=i[h]|parseInt("0111",8))});var s=3,o=null;cU.stat(e,function(h,_){if(h)return n(o=h);mrr(t,i,_,e,f),_rr(t,i,_,e,f),grr(t,i,_,e,f)});function f(h){if(!o){if(h)return n(o=h);if(--s===0)return n()}}}uU.prototype.pipe=function(){this.error("Can't pipe from writable stream")};uU.prototype.add=function(){this.error("Can't add to non-Directory type")};uU.prototype.write=function(){return!0};function LFi(t){return Object.prototype.toString.call(t)}function frr(t){return typeof t=="object"&&LFi(t)==="[object Date]"}});var gcn=le(Tx=>{Tx.Abstract=PEt();Tx.Reader=XDe();Tx.Writer=B8e();Tx.File={Reader:Nln(),Writer:pcn()};Tx.Dir={Reader:Pln(),Writer:fcn()};Tx.Link={Reader:wln(),Writer:dcn()};Tx.Proxy={Reader:Rln(),Writer:mcn()};Tx.Reader.Dir=Tx.DirReader=Tx.Dir.Reader;Tx.Reader.File=Tx.FileReader=Tx.File.Reader;Tx.Reader.Link=Tx.LinkReader=Tx.Link.Reader;Tx.Reader.Proxy=Tx.ProxyReader=Tx.Proxy.Reader;Tx.Writer.Dir=Tx.DirWriter=Tx.Dir.Writer;Tx.Writer.File=Tx.FileWriter=Tx.File.Writer;Tx.Writer.Link=Tx.LinkWriter=Tx.Link.Writer;Tx.Writer.Proxy=Tx.ProxyWriter=Tx.Proxy.Writer;Tx.collect=HEt()});var brr=le((W9a,vrr)=>{vrr.exports=zFi;var MFi=xEt(),FFi=gcn().Writer,xcn=require("path"),BFi=require("stream"),WFi=vln(),jFi=a_e();function zFi(t){t.path=xcn.resolve(xcn.normalize(t.path));var e=new MFi(t),n=new BFi.Writable({objectMode:!0});n._write=function(s,o,f){if(s.type=="Directory")return f();var h=xcn.join(t.path,s.path.replace(/\\/g,"/"));if(h.indexOf(t.path)!=0)return f();let _=t.getWriter?t.getWriter({path:h}):FFi({path:h});s.pipe(_).on("error",f).on("close",f)};var i=WFi(e,n);return e.once("crx-header",function(s){i.crxHeader=s}),e.pipe(n).on("finish",function(){i.emit("close")}),i.promise=function(){return new jFi(function(s,o){i.on("close",s),i.on("error",o)})},i}});var Err=le((j9a,$Et)=>{var vI=function(t){"use strict";var e=1e7,n=7,i=9007199254740992,s=A(i),o="0123456789abcdefghijklmnopqrstuvwxyz",f=typeof BigInt=="function";function h(it,Yt,Qt,On){return typeof it>"u"?h[0]:typeof Yt<"u"?+Yt==10&&!Qt?jr(it):Fr(it,Yt,Qt,On):jr(it)}function _(it,Yt){this.value=it,this.sign=Yt,this.isSmall=!1}_.prototype=Object.create(h.prototype);function x(it){this.value=it,this.sign=it<0,this.isSmall=!0}x.prototype=Object.create(h.prototype);function v(it){this.value=it}v.prototype=Object.create(h.prototype);function T(it){return-i<it&&it<i}function A(it){return it<1e7?[it]:it<1e14?[it%1e7,Math.floor(it/1e7)]:[it%1e7,Math.floor(it/1e7)%1e7,Math.floor(it/1e14)]}function w(it){N(it);var Yt=it.length;if(Yt<4&&tn(it,s)<0)switch(Yt){case 0:return 0;case 1:return it[0];case 2:return it[0]+it[1]*e;default:return it[0]+(it[1]+it[2]*e)*e}return it}function N(it){for(var Yt=it.length;it[--Yt]===0;);it.length=Yt+1}function P(it){for(var Yt=new Array(it),Qt=-1;++Qt<it;)Yt[Qt]=0;return Yt}function F(it){return it>0?Math.floor(it):Math.ceil(it)}function j(it,Yt){var Qt=it.length,On=Yt.length,lt=new Array(Qt),er=0,gi=e,dr,xi;for(xi=0;xi<On;xi++)dr=it[xi]+Yt[xi]+er,er=dr>=gi?1:0,lt[xi]=dr-er*gi;for(;xi<Qt;)dr=it[xi]+er,er=dr===gi?1:0,lt[xi++]=dr-er*gi;return er>0&<.push(er),lt}function X(it,Yt){return it.length>=Yt.length?j(it,Yt):j(Yt,it)}function oe(it,Yt){var Qt=it.length,On=new Array(Qt),lt=e,er,gi;for(gi=0;gi<Qt;gi++)er=it[gi]-lt+Yt,Yt=Math.floor(er/lt),On[gi]=er-Yt*lt,Yt+=1;for(;Yt>0;)On[gi++]=Yt%lt,Yt=Math.floor(Yt/lt);return On}_.prototype.add=function(it){var Yt=jr(it);if(this.sign!==Yt.sign)return this.subtract(Yt.negate());var Qt=this.value,On=Yt.value;return Yt.isSmall?new _(oe(Qt,Math.abs(On)),this.sign):new _(X(Qt,On),this.sign)},_.prototype.plus=_.prototype.add,x.prototype.add=function(it){var Yt=jr(it),Qt=this.value;if(Qt<0!==Yt.sign)return this.subtract(Yt.negate());var On=Yt.value;if(Yt.isSmall){if(T(Qt+On))return new x(Qt+On);On=A(Math.abs(On))}return new _(oe(On,Math.abs(Qt)),Qt<0)},x.prototype.plus=x.prototype.add,v.prototype.add=function(it){return new v(this.value+jr(it).value)},v.prototype.plus=v.prototype.add;function ee(it,Yt){var Qt=it.length,On=Yt.length,lt=new Array(Qt),er=0,gi=e,dr,xi;for(dr=0;dr<On;dr++)xi=it[dr]-er-Yt[dr],xi<0?(xi+=gi,er=1):er=0,lt[dr]=xi;for(dr=On;dr<Qt;dr++){if(xi=it[dr]-er,xi<0)xi+=gi;else{lt[dr++]=xi;break}lt[dr]=xi}for(;dr<Qt;dr++)lt[dr]=it[dr];return N(lt),lt}function ge(it,Yt,Qt){var On;return tn(it,Yt)>=0?On=ee(it,Yt):(On=ee(Yt,it),Qt=!Qt),On=w(On),typeof On=="number"?(Qt&&(On=-On),new x(On)):new _(On,Qt)}function Le(it,Yt,Qt){var On=it.length,lt=new Array(On),er=-Yt,gi=e,dr,xi;for(dr=0;dr<On;dr++)xi=it[dr]+er,er=Math.floor(xi/gi),xi%=gi,lt[dr]=xi<0?xi+gi:xi;return lt=w(lt),typeof lt=="number"?(Qt&&(lt=-lt),new x(lt)):new _(lt,Qt)}_.prototype.subtract=function(it){var Yt=jr(it);if(this.sign!==Yt.sign)return this.add(Yt.negate());var Qt=this.value,On=Yt.value;return Yt.isSmall?Le(Qt,Math.abs(On),this.sign):ge(Qt,On,this.sign)},_.prototype.minus=_.prototype.subtract,x.prototype.subtract=function(it){var Yt=jr(it),Qt=this.value;if(Qt<0!==Yt.sign)return this.add(Yt.negate());var On=Yt.value;return Yt.isSmall?new x(Qt-On):Le(On,Math.abs(Qt),Qt>=0)},x.prototype.minus=x.prototype.subtract,v.prototype.subtract=function(it){return new v(this.value-jr(it).value)},v.prototype.minus=v.prototype.subtract,_.prototype.negate=function(){return new _(this.value,!this.sign)},x.prototype.negate=function(){var it=this.sign,Yt=new x(-this.value);return Yt.sign=!it,Yt},v.prototype.negate=function(){return new v(-this.value)},_.prototype.abs=function(){return new _(this.value,!1)},x.prototype.abs=function(){return new x(Math.abs(this.value))},v.prototype.abs=function(){return new v(this.value>=0?this.value:-this.value)};function xe(it,Yt){var Qt=it.length,On=Yt.length,lt=Qt+On,er=P(lt),gi=e,dr,xi,Ys,Ml,hl;for(Ys=0;Ys<Qt;++Ys){Ml=it[Ys];for(var Wc=0;Wc<On;++Wc)hl=Yt[Wc],dr=Ml*hl+er[Ys+Wc],xi=Math.floor(dr/gi),er[Ys+Wc]=dr-xi*gi,er[Ys+Wc+1]+=xi}return N(er),er}function Se(it,Yt){var Qt=it.length,On=new Array(Qt),lt=e,er=0,gi,dr;for(dr=0;dr<Qt;dr++)gi=it[dr]*Yt+er,er=Math.floor(gi/lt),On[dr]=gi-er*lt;for(;er>0;)On[dr++]=er%lt,er=Math.floor(er/lt);return On}function Ve(it,Yt){for(var Qt=[];Yt-- >0;)Qt.push(0);return Qt.concat(it)}function Xe(it,Yt){var Qt=Math.max(it.length,Yt.length);if(Qt<=30)return xe(it,Yt);Qt=Math.ceil(Qt/2);var On=it.slice(Qt),lt=it.slice(0,Qt),er=Yt.slice(Qt),gi=Yt.slice(0,Qt),dr=Xe(lt,gi),xi=Xe(On,er),Ys=Xe(X(lt,On),X(gi,er)),Ml=X(X(dr,Ve(ee(ee(Ys,dr),xi),Qt)),Ve(xi,2*Qt));return N(Ml),Ml}function Ne(it,Yt){return-.012*it-.012*Yt+15e-6*it*Yt>0}_.prototype.multiply=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt=this.sign!==Yt.sign,er;if(Yt.isSmall){if(On===0)return h[0];if(On===1)return this;if(On===-1)return this.negate();if(er=Math.abs(On),er<e)return new _(Se(Qt,er),lt);On=A(er)}return Ne(Qt.length,On.length)?new _(Xe(Qt,On),lt):new _(xe(Qt,On),lt)},_.prototype.times=_.prototype.multiply;function tt(it,Yt,Qt){return it<e?new _(Se(Yt,it),Qt):new _(xe(Yt,A(it)),Qt)}x.prototype._multiplyBySmall=function(it){return T(it.value*this.value)?new x(it.value*this.value):tt(Math.abs(it.value),A(Math.abs(this.value)),this.sign!==it.sign)},_.prototype._multiplyBySmall=function(it){return it.value===0?h[0]:it.value===1?this:it.value===-1?this.negate():tt(Math.abs(it.value),this.value,this.sign!==it.sign)},x.prototype.multiply=function(it){return jr(it)._multiplyBySmall(this)},x.prototype.times=x.prototype.multiply,v.prototype.multiply=function(it){return new v(this.value*jr(it).value)},v.prototype.times=v.prototype.multiply;function zt(it){var Yt=it.length,Qt=P(Yt+Yt),On=e,lt,er,gi,dr,xi;for(gi=0;gi<Yt;gi++){dr=it[gi],er=0-dr*dr;for(var Ys=gi;Ys<Yt;Ys++)xi=it[Ys],lt=2*(dr*xi)+Qt[gi+Ys]+er,er=Math.floor(lt/On),Qt[gi+Ys]=lt-er*On;Qt[gi+Yt]=er}return N(Qt),Qt}_.prototype.square=function(){return new _(zt(this.value),!1)},x.prototype.square=function(){var it=this.value*this.value;return T(it)?new x(it):new _(zt(A(Math.abs(this.value))),!1)},v.prototype.square=function(it){return new v(this.value*this.value)};function yt(it,Yt){var Qt=it.length,On=Yt.length,lt=e,er=P(Yt.length),gi=Yt[On-1],dr=Math.ceil(lt/(2*gi)),xi=Se(it,dr),Ys=Se(Yt,dr),Ml,hl,Wc,Ed,rp,Cf,cs;for(xi.length<=Qt&&xi.push(0),Ys.push(0),gi=Ys[On-1],hl=Qt-On;hl>=0;hl--){for(Ml=lt-1,xi[hl+On]!==gi&&(Ml=Math.floor((xi[hl+On]*lt+xi[hl+On-1])/gi)),Wc=0,Ed=0,Cf=Ys.length,rp=0;rp<Cf;rp++)Wc+=Ml*Ys[rp],cs=Math.floor(Wc/lt),Ed+=xi[hl+rp]-(Wc-cs*lt),Wc=cs,Ed<0?(xi[hl+rp]=Ed+lt,Ed=-1):(xi[hl+rp]=Ed,Ed=0);for(;Ed!==0;){for(Ml-=1,Wc=0,rp=0;rp<Cf;rp++)Wc+=xi[hl+rp]-lt+Ys[rp],Wc<0?(xi[hl+rp]=Wc+lt,Wc=0):(xi[hl+rp]=Wc,Wc=1);Ed+=Wc}er[hl]=Ml}return xi=dt(xi,dr)[0],[w(er),w(xi)]}function nn(it,Yt){for(var Qt=it.length,On=Yt.length,lt=[],er=[],gi=e,dr,xi,Ys,Ml,hl;Qt;){if(er.unshift(it[--Qt]),N(er),tn(er,Yt)<0){lt.push(0);continue}xi=er.length,Ys=er[xi-1]*gi+er[xi-2],Ml=Yt[On-1]*gi+Yt[On-2],xi>On&&(Ys=(Ys+1)*gi),dr=Math.ceil(Ys/Ml);do{if(hl=Se(Yt,dr),tn(hl,er)<=0)break;dr--}while(dr);lt.push(dr),er=ee(er,hl)}return lt.reverse(),[w(lt),w(er)]}function dt(it,Yt){var Qt=it.length,On=P(Qt),lt=e,er,gi,dr,xi;for(dr=0,er=Qt-1;er>=0;--er)xi=dr*lt+it[er],gi=F(xi/Yt),dr=xi-gi*Yt,On[er]=gi|0;return[On,dr|0]}function Ht(it,Yt){var Qt,On=jr(Yt);if(f)return[new v(it.value/On.value),new v(it.value%On.value)];var lt=it.value,er=On.value,gi;if(er===0)throw new Error("Cannot divide by zero");if(it.isSmall)return On.isSmall?[new x(F(lt/er)),new x(lt%er)]:[h[0],it];if(On.isSmall){if(er===1)return[it,h[0]];if(er==-1)return[it.negate(),h[0]];var dr=Math.abs(er);if(dr<e){Qt=dt(lt,dr),gi=w(Qt[0]);var xi=Qt[1];return it.sign&&(xi=-xi),typeof gi=="number"?(it.sign!==On.sign&&(gi=-gi),[new x(gi),new x(xi)]):[new _(gi,it.sign!==On.sign),new x(xi)]}er=A(dr)}var Ys=tn(lt,er);if(Ys===-1)return[h[0],it];if(Ys===0)return[h[it.sign===On.sign?1:-1],h[0]];lt.length+er.length<=200?Qt=yt(lt,er):Qt=nn(lt,er),gi=Qt[0];var Ml=it.sign!==On.sign,hl=Qt[1],Wc=it.sign;return typeof gi=="number"?(Ml&&(gi=-gi),gi=new x(gi)):gi=new _(gi,Ml),typeof hl=="number"?(Wc&&(hl=-hl),hl=new x(hl)):hl=new _(hl,Wc),[gi,hl]}_.prototype.divmod=function(it){var Yt=Ht(this,it);return{quotient:Yt[0],remainder:Yt[1]}},v.prototype.divmod=x.prototype.divmod=_.prototype.divmod,_.prototype.divide=function(it){return Ht(this,it)[0]},v.prototype.over=v.prototype.divide=function(it){return new v(this.value/jr(it).value)},x.prototype.over=x.prototype.divide=_.prototype.over=_.prototype.divide,_.prototype.mod=function(it){return Ht(this,it)[1]},v.prototype.mod=v.prototype.remainder=function(it){return new v(this.value%jr(it).value)},x.prototype.remainder=x.prototype.mod=_.prototype.remainder=_.prototype.mod,_.prototype.pow=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt,er,gi;if(On===0)return h[1];if(Qt===0)return h[0];if(Qt===1)return h[1];if(Qt===-1)return Yt.isEven()?h[1]:h[-1];if(Yt.sign)return h[0];if(!Yt.isSmall)throw new Error("The exponent "+Yt.toString()+" is too large.");if(this.isSmall&&T(lt=Math.pow(Qt,On)))return new x(F(lt));for(er=this,gi=h[1];On&!0&&(gi=gi.times(er),--On),On!==0;)On/=2,er=er.square();return gi},x.prototype.pow=_.prototype.pow,v.prototype.pow=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt=BigInt(0),er=BigInt(1),gi=BigInt(2);if(On===lt)return h[1];if(Qt===lt)return h[0];if(Qt===er)return h[1];if(Qt===BigInt(-1))return Yt.isEven()?h[1]:h[-1];if(Yt.isNegative())return new v(lt);for(var dr=this,xi=h[1];(On&er)===er&&(xi=xi.times(dr),--On),On!==lt;)On/=gi,dr=dr.square();return xi},_.prototype.modPow=function(it,Yt){if(it=jr(it),Yt=jr(Yt),Yt.isZero())throw new Error("Cannot take modPow with modulus 0");var Qt=h[1],On=this.mod(Yt);for(it.isNegative()&&(it=it.multiply(h[-1]),On=On.modInv(Yt));it.isPositive();){if(On.isZero())return h[0];it.isOdd()&&(Qt=Qt.multiply(On).mod(Yt)),it=it.divide(2),On=On.square().mod(Yt)}return Qt},v.prototype.modPow=x.prototype.modPow=_.prototype.modPow;function tn(it,Yt){if(it.length!==Yt.length)return it.length>Yt.length?1:-1;for(var Qt=it.length-1;Qt>=0;Qt--)if(it[Qt]!==Yt[Qt])return it[Qt]>Yt[Qt]?1:-1;return 0}_.prototype.compareAbs=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value;return Yt.isSmall?1:tn(Qt,On)},x.prototype.compareAbs=function(it){var Yt=jr(it),Qt=Math.abs(this.value),On=Yt.value;return Yt.isSmall?(On=Math.abs(On),Qt===On?0:Qt>On?1:-1):-1},v.prototype.compareAbs=function(it){var Yt=this.value,Qt=jr(it).value;return Yt=Yt>=0?Yt:-Yt,Qt=Qt>=0?Qt:-Qt,Yt===Qt?0:Yt>Qt?1:-1},_.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=jr(it),Qt=this.value,On=Yt.value;return this.sign!==Yt.sign?Yt.sign?1:-1:Yt.isSmall?this.sign?-1:1:tn(Qt,On)*(this.sign?-1:1)},_.prototype.compareTo=_.prototype.compare,x.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=jr(it),Qt=this.value,On=Yt.value;return Yt.isSmall?Qt==On?0:Qt>On?1:-1:Qt<0!==Yt.sign?Qt<0?-1:1:Qt<0?1:-1},x.prototype.compareTo=x.prototype.compare,v.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=this.value,Qt=jr(it).value;return Yt===Qt?0:Yt>Qt?1:-1},v.prototype.compareTo=v.prototype.compare,_.prototype.equals=function(it){return this.compare(it)===0},v.prototype.eq=v.prototype.equals=x.prototype.eq=x.prototype.equals=_.prototype.eq=_.prototype.equals,_.prototype.notEquals=function(it){return this.compare(it)!==0},v.prototype.neq=v.prototype.notEquals=x.prototype.neq=x.prototype.notEquals=_.prototype.neq=_.prototype.notEquals,_.prototype.greater=function(it){return this.compare(it)>0},v.prototype.gt=v.prototype.greater=x.prototype.gt=x.prototype.greater=_.prototype.gt=_.prototype.greater,_.prototype.lesser=function(it){return this.compare(it)<0},v.prototype.lt=v.prototype.lesser=x.prototype.lt=x.prototype.lesser=_.prototype.lt=_.prototype.lesser,_.prototype.greaterOrEquals=function(it){return this.compare(it)>=0},v.prototype.geq=v.prototype.greaterOrEquals=x.prototype.geq=x.prototype.greaterOrEquals=_.prototype.geq=_.prototype.greaterOrEquals,_.prototype.lesserOrEquals=function(it){return this.compare(it)<=0},v.prototype.leq=v.prototype.lesserOrEquals=x.prototype.leq=x.prototype.lesserOrEquals=_.prototype.leq=_.prototype.lesserOrEquals,_.prototype.isEven=function(){return(this.value[0]&1)===0},x.prototype.isEven=function(){return(this.value&1)===0},v.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},_.prototype.isOdd=function(){return(this.value[0]&1)===1},x.prototype.isOdd=function(){return(this.value&1)===1},v.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},_.prototype.isPositive=function(){return!this.sign},x.prototype.isPositive=function(){return this.value>0},v.prototype.isPositive=x.prototype.isPositive,_.prototype.isNegative=function(){return this.sign},x.prototype.isNegative=function(){return this.value<0},v.prototype.isNegative=x.prototype.isNegative,_.prototype.isUnit=function(){return!1},x.prototype.isUnit=function(){return Math.abs(this.value)===1},v.prototype.isUnit=function(){return this.abs().value===BigInt(1)},_.prototype.isZero=function(){return!1},x.prototype.isZero=function(){return this.value===0},v.prototype.isZero=function(){return this.value===BigInt(0)},_.prototype.isDivisibleBy=function(it){var Yt=jr(it);return Yt.isZero()?!1:Yt.isUnit()?!0:Yt.compareAbs(2)===0?this.isEven():this.mod(Yt).isZero()},v.prototype.isDivisibleBy=x.prototype.isDivisibleBy=_.prototype.isDivisibleBy;function Or(it){var Yt=it.abs();if(Yt.isUnit())return!1;if(Yt.equals(2)||Yt.equals(3)||Yt.equals(5))return!0;if(Yt.isEven()||Yt.isDivisibleBy(3)||Yt.isDivisibleBy(5))return!1;if(Yt.lesser(49))return!0}function Kt(it,Yt){for(var Qt=it.prev(),On=Qt,lt=0,er,gi,dr,xi;On.isEven();)On=On.divide(2),lt++;e:for(dr=0;dr<Yt.length;dr++)if(!it.lesser(Yt[dr])&&(xi=vI(Yt[dr]).modPow(On,it),!(xi.isUnit()||xi.equals(Qt)))){for(er=lt-1;er!=0;er--){if(xi=xi.square().mod(it),xi.isUnit())return!1;if(xi.equals(Qt))continue e}return!1}return!0}_.prototype.isPrime=function(it){var Yt=Or(this);if(Yt!==t)return Yt;var Qt=this.abs(),On=Qt.bitLength();if(On<=64)return Kt(Qt,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var lt=Math.log(2)*On.toJSNumber(),er=Math.ceil(it===!0?2*Math.pow(lt,2):lt),gi=[],dr=0;dr<er;dr++)gi.push(vI(dr+2));return Kt(Qt,gi)},v.prototype.isPrime=x.prototype.isPrime=_.prototype.isPrime,_.prototype.isProbablePrime=function(it,Yt){var Qt=Or(this);if(Qt!==t)return Qt;for(var On=this.abs(),lt=it===t?5:it,er=[],gi=0;gi<lt;gi++)er.push(vI.randBetween(2,On.minus(2),Yt));return Kt(On,er)},v.prototype.isProbablePrime=x.prototype.isProbablePrime=_.prototype.isProbablePrime,_.prototype.modInv=function(it){for(var Yt=vI.zero,Qt=vI.one,On=jr(it),lt=this.abs(),er,gi,dr;!lt.isZero();)er=On.divide(lt),gi=Yt,dr=On,Yt=Qt,On=lt,Qt=gi.subtract(er.multiply(Qt)),lt=dr.subtract(er.multiply(lt));if(!On.isUnit())throw new Error(this.toString()+" and "+it.toString()+" are not co-prime");return Yt.compare(0)===-1&&(Yt=Yt.add(it)),this.isNegative()?Yt.negate():Yt},v.prototype.modInv=x.prototype.modInv=_.prototype.modInv,_.prototype.next=function(){var it=this.value;return this.sign?Le(it,1,this.sign):new _(oe(it,1),this.sign)},x.prototype.next=function(){var it=this.value;return it+1<i?new x(it+1):new _(s,!1)},v.prototype.next=function(){return new v(this.value+BigInt(1))},_.prototype.prev=function(){var it=this.value;return this.sign?new _(oe(it,1),!0):Le(it,1,this.sign)},x.prototype.prev=function(){var it=this.value;return it-1>-i?new x(it-1):new _(s,!0)},v.prototype.prev=function(){return new v(this.value-BigInt(1))};for(var Gn=[1];2*Gn[Gn.length-1]<=e;)Gn.push(2*Gn[Gn.length-1]);var En=Gn.length,At=Gn[En-1];function Un(it){return Math.abs(it)<=e}_.prototype.shiftLeft=function(it){var Yt=jr(it).toJSNumber();if(!Un(Yt))throw new Error(String(Yt)+" is too large for shifting.");if(Yt<0)return this.shiftRight(-Yt);var Qt=this;if(Qt.isZero())return Qt;for(;Yt>=En;)Qt=Qt.multiply(At),Yt-=En-1;return Qt.multiply(Gn[Yt])},v.prototype.shiftLeft=x.prototype.shiftLeft=_.prototype.shiftLeft,_.prototype.shiftRight=function(it){var Yt,Qt=jr(it).toJSNumber();if(!Un(Qt))throw new Error(String(Qt)+" is too large for shifting.");if(Qt<0)return this.shiftLeft(-Qt);for(var On=this;Qt>=En;){if(On.isZero()||On.isNegative()&&On.isUnit())return On;Yt=Ht(On,At),On=Yt[1].isNegative()?Yt[0].prev():Yt[0],Qt-=En-1}return Yt=Ht(On,Gn[Qt]),Yt[1].isNegative()?Yt[0].prev():Yt[0]},v.prototype.shiftRight=x.prototype.shiftRight=_.prototype.shiftRight;function Hr(it,Yt,Qt){Yt=jr(Yt);for(var On=it.isNegative(),lt=Yt.isNegative(),er=On?it.not():it,gi=lt?Yt.not():Yt,dr=0,xi=0,Ys=null,Ml=null,hl=[];!er.isZero()||!gi.isZero();)Ys=Ht(er,At),dr=Ys[1].toJSNumber(),On&&(dr=At-1-dr),Ml=Ht(gi,At),xi=Ml[1].toJSNumber(),lt&&(xi=At-1-xi),er=Ys[0],gi=Ml[0],hl.push(Qt(dr,xi));for(var Wc=Qt(On?1:0,lt?1:0)!==0?vI(-1):vI(0),Ed=hl.length-1;Ed>=0;Ed-=1)Wc=Wc.multiply(At).add(vI(hl[Ed]));return Wc}_.prototype.not=function(){return this.negate().prev()},v.prototype.not=x.prototype.not=_.prototype.not,_.prototype.and=function(it){return Hr(this,it,function(Yt,Qt){return Yt&Qt})},v.prototype.and=x.prototype.and=_.prototype.and,_.prototype.or=function(it){return Hr(this,it,function(Yt,Qt){return Yt|Qt})},v.prototype.or=x.prototype.or=_.prototype.or,_.prototype.xor=function(it){return Hr(this,it,function(Yt,Qt){return Yt^Qt})},v.prototype.xor=x.prototype.xor=_.prototype.xor;var Kr=1<<30,Ur=(e&-e)*(e&-e)|Kr;function Gi(it){var Yt=it.value,Qt=typeof Yt=="number"?Yt|Kr:typeof Yt=="bigint"?Yt|BigInt(Kr):Yt[0]+Yt[1]*e|Ur;return Qt&-Qt}function $i(it,Yt){if(Yt.compareTo(it)<=0){var Qt=$i(it,Yt.square(Yt)),On=Qt.p,lt=Qt.e,er=On.multiply(Yt);return er.compareTo(it)<=0?{p:er,e:lt*2+1}:{p:On,e:lt*2}}return{p:vI(1),e:0}}_.prototype.bitLength=function(){var it=this;return it.compareTo(vI(0))<0&&(it=it.negate().subtract(vI(1))),it.compareTo(vI(0))===0?vI(0):vI($i(it,vI(2)).e).add(vI(1))},v.prototype.bitLength=x.prototype.bitLength=_.prototype.bitLength;function Ta(it,Yt){return it=jr(it),Yt=jr(Yt),it.greater(Yt)?it:Yt}function Rt(it,Yt){return it=jr(it),Yt=jr(Yt),it.lesser(Yt)?it:Yt}function Fa(it,Yt){if(it=jr(it).abs(),Yt=jr(Yt).abs(),it.equals(Yt))return it;if(it.isZero())return Yt;if(Yt.isZero())return it;for(var Qt=h[1],On,lt;it.isEven()&&Yt.isEven();)On=Rt(Gi(it),Gi(Yt)),it=it.divide(On),Yt=Yt.divide(On),Qt=Qt.multiply(On);for(;it.isEven();)it=it.divide(Gi(it));do{for(;Yt.isEven();)Yt=Yt.divide(Gi(Yt));it.greater(Yt)&&(lt=Yt,Yt=it,it=lt),Yt=Yt.subtract(it)}while(!Yt.isZero());return Qt.isUnit()?it:it.multiply(Qt)}function ls(it,Yt){return it=jr(it).abs(),Yt=jr(Yt).abs(),it.divide(Fa(it,Yt)).multiply(Yt)}function Kl(it,Yt,Qt){it=jr(it),Yt=jr(Yt);var On=Qt||Math.random,lt=Rt(it,Yt),er=Ta(it,Yt),gi=er.subtract(lt).add(1);if(gi.isSmall)return lt.add(Math.floor(On()*gi));for(var dr=ws(gi,e).value,xi=[],Ys=!0,Ml=0;Ml<dr.length;Ml++){var hl=Ys?dr[Ml]+(Ml+1<dr.length?dr[Ml+1]/e:0):e,Wc=F(On()*hl);xi.push(Wc),Wc<dr[Ml]&&(Ys=!1)}return lt.add(h.fromArray(xi,e,!1))}var Fr=function(it,Yt,Qt,On){Qt=Qt||o,it=String(it),On||(it=it.toLowerCase(),Qt=Qt.toLowerCase());var lt=it.length,er,gi=Math.abs(Yt),dr={};for(er=0;er<Qt.length;er++)dr[Qt[er]]=er;for(er=0;er<lt;er++){var xi=it[er];if(xi!=="-"&&xi in dr&&dr[xi]>=gi){if(xi==="1"&&gi===1)continue;throw new Error(xi+" is not a valid digit in base "+Yt+".")}}Yt=jr(Yt);var Ys=[],Ml=it[0]==="-";for(er=Ml?1:0;er<it.length;er++){var xi=it[er];if(xi in dr)Ys.push(jr(dr[xi]));else if(xi==="<"){var hl=er;do er++;while(it[er]!==">"&&er<it.length);Ys.push(jr(it.slice(hl+1,er)))}else throw new Error(xi+" is not a valid character")}return Hi(Ys,Yt,Ml)};function Hi(it,Yt,Qt){var On=h[0],lt=h[1],er;for(er=it.length-1;er>=0;er--)On=On.add(it[er].times(lt)),lt=lt.times(Yt);return Qt?On.negate():On}function yo(it,Yt){return Yt=Yt||o,it<Yt.length?Yt[it]:"<"+it+">"}function ws(it,Yt){if(Yt=vI(Yt),Yt.isZero()){if(it.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(Yt.equals(-1)){if(it.isZero())return{value:[0],isNegative:!1};if(it.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-it.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var Qt=Array.apply(null,Array(it.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return Qt.unshift([1]),{value:[].concat.apply([],Qt),isNegative:!1}}var On=!1;if(it.isNegative()&&Yt.isPositive()&&(On=!0,it=it.abs()),Yt.isUnit())return it.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(it.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:On};for(var lt=[],er=it,gi;er.isNegative()||er.compareAbs(Yt)>=0;){gi=er.divmod(Yt),er=gi.quotient;var dr=gi.remainder;dr.isNegative()&&(dr=Yt.minus(dr).abs(),er=er.next()),lt.push(dr.toJSNumber())}return lt.push(er.toJSNumber()),{value:lt.reverse(),isNegative:On}}function Mr(it,Yt,Qt){var On=ws(it,Yt);return(On.isNegative?"-":"")+On.value.map(function(lt){return yo(lt,Qt)}).join("")}_.prototype.toArray=function(it){return ws(this,it)},x.prototype.toArray=function(it){return ws(this,it)},v.prototype.toArray=function(it){return ws(this,it)},_.prototype.toString=function(it,Yt){if(it===t&&(it=10),it!==10||Yt)return Mr(this,it,Yt);for(var Qt=this.value,On=Qt.length,lt=String(Qt[--On]),er="0000000",gi;--On>=0;)gi=String(Qt[On]),lt+=er.slice(gi.length)+gi;var dr=this.sign?"-":"";return dr+lt},x.prototype.toString=function(it,Yt){return it===t&&(it=10),it!=10||Yt?Mr(this,it,Yt):String(this.value)},v.prototype.toString=x.prototype.toString,v.prototype.toJSON=_.prototype.toJSON=x.prototype.toJSON=function(){return this.toString()},_.prototype.valueOf=function(){return parseInt(this.toString(),10)},_.prototype.toJSNumber=_.prototype.valueOf,x.prototype.valueOf=function(){return this.value},x.prototype.toJSNumber=x.prototype.valueOf,v.prototype.valueOf=v.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function Yi(it){if(T(+it)){var Yt=+it;if(Yt===F(Yt))return f?new v(BigInt(Yt)):new x(Yt);throw new Error("Invalid integer: "+it)}var Qt=it[0]==="-";Qt&&(it=it.slice(1));var On=it.split(/e/i);if(On.length>2)throw new Error("Invalid integer: "+On.join("e"));if(On.length===2){var lt=On[1];if(lt[0]==="+"&&(lt=lt.slice(1)),lt=+lt,lt!==F(lt)||!T(lt))throw new Error("Invalid integer: "+lt+" is not a valid exponent.");var er=On[0],gi=er.indexOf(".");if(gi>=0&&(lt-=er.length-gi-1,er=er.slice(0,gi)+er.slice(gi+1)),lt<0)throw new Error("Cannot include negative exponent part for integers");er+=new Array(lt+1).join("0"),it=er}var dr=/^([0-9][0-9]*)$/.test(it);if(!dr)throw new Error("Invalid integer: "+it);if(f)return new v(BigInt(Qt?"-"+it:it));for(var xi=[],Ys=it.length,Ml=n,hl=Ys-Ml;Ys>0;)xi.push(+it.slice(hl,Ys)),hl-=Ml,hl<0&&(hl=0),Ys-=Ml;return N(xi),new _(xi,Qt)}function Lr(it){if(f)return new v(BigInt(it));if(T(it)){if(it!==F(it))throw new Error(it+" is not an integer.");return new x(it)}return Yi(it.toString())}function jr(it){return typeof it=="number"?Lr(it):typeof it=="string"?Yi(it):typeof it=="bigint"?new v(it):it}for(var lr=0;lr<1e3;lr++)h[lr]=jr(lr),lr>0&&(h[-lr]=jr(-lr));return h.one=h[1],h.zero=h[0],h.minusOne=h[-1],h.max=Ta,h.min=Rt,h.gcd=Fa,h.lcm=ls,h.isInstance=function(it){return it instanceof _||it instanceof x||it instanceof v},h.randBetween=Kl,h.fromArray=function(it,Yt,Qt){return Hi(it.map(jr),jr(Yt||10),Qt)},h}();typeof $Et<"u"&&$Et.hasOwnProperty("exports")&&($Et.exports=vI);typeof define=="function"&&define.amd&&define(function(){return vI})});var Drr=le((z9a,Trr)=>{var g_e=Err(),GFi=require("stream"),XEt;function UFi(){var t=3988292384,e,n,i;for(XEt=[],n=0;n<256;n++){for(e=n,i=0;i<8;i++)e=e&1?t^e>>>1:e=e>>>1;XEt[n]=e>>>0}}function Srr(t,e){return XEt||UFi(),t.charCodeAt&&(t=t.charCodeAt(0)),g_e(e).shiftRight(8).and(16777215).xor(XEt[g_e(e).xor(t).and(255)]).value}function W8e(){if(!(this instanceof W8e))return new W8e;this.key0=305419896,this.key1=591751049,this.key2=878082192}W8e.prototype.update=function(t){this.key0=Srr(t,this.key0),this.key1=g_e(this.key0).and(255).and(4294967295).add(this.key1),this.key1=g_e(this.key1).multiply(134775813).add(1).and(4294967295).value,this.key2=Srr(g_e(this.key1).shiftRight(24).and(255),this.key2)};W8e.prototype.decryptByte=function(t){var e=g_e(this.key2).or(2);return t=t^g_e(e).multiply(g_e(e^1)).shiftRight(8).and(255),this.update(t),t};W8e.prototype.stream=function(){var t=GFi.Transform(),e=this;return t._transform=function(n,i,s){for(var o=0;o<n.length;o++)n[o]=e.decryptByte(n[o]);this.push(n),s()},t};Trr.exports=W8e});var wrr=le((G9a,Crr)=>{var VFi=a_e(),qFi=Drr(),HFi=hEt(),Arr=require("stream"),KFi=require("zlib"),JFi=_Et(),$Fi=gEt(),XFi=Pet();Crr.exports=function(e,n,i,s,o){var f=HFi(),h=Arr.PassThrough(),_=e.stream(n,o);return _.pipe(f).on("error",function(x){h.emit("error",x)}),h.vars=f.pull(30).then(function(x){var v=XFi.parse(x,[["signature",4],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2]]);return v.lastModifiedDateTime=$Fi(v.lastModifiedDate,v.lastModifiedTime),f.pull(v.fileNameLength).then(function(T){return v.fileName=T.toString("utf8"),f.pull(v.extraFieldLength)}).then(function(T){var A;return v.extra=JFi(T,v),s&&s.compressedSize&&(v=s),v.flags&1&&(A=f.pull(12).then(function(w){if(!i)throw new Error("MISSING_PASSWORD");var N=qFi();String(i).split("").forEach(function(j){N.update(j)});for(var P=0;P<w.length;P++)w[P]=N.decryptByte(w[P]);v.decrypt=N,v.compressedSize-=12;var F=v.flags&8?v.lastModifiedTime>>8&255:v.crc32>>24&255;if(w[11]!==F)throw new Error("BAD_PASSWORD");return v})),VFi.resolve(A).then(function(){return h.emit("vars",v),v})})}),h.vars.then(function(x){var v=!(x.flags&8)||x.compressedSize>0,T,A=x.compressionMethod?KFi.createInflateRaw():Arr.PassThrough();v?(h.size=x.uncompressedSize,T=x.compressedSize):(T=Buffer.alloc(4),T.writeUInt32LE(134695760,0));var w=f.stream(T);x.decrypt&&(w=w.pipe(x.decrypt.stream())),w.pipe(A).on("error",function(N){h.emit("error",N)}).pipe(h).on("finish",function(){_.destroy?_.destroy():_.abort?_.abort():_.close?_.close():_.push?_.push():console.log("warning - unable to close stream")})}).catch(function(x){h.emit("error",x)}),h}});var Nrr=le((U9a,Prr)=>{var ett=hEt(),YFi=wrr(),Zet=a_e(),QFi=mEt(),ZFi=_Et(),ycn=require("path"),e8i=gcn().Writer,t8i=gEt(),ttt=Pet(),Irr=Buffer.alloc(4);Irr.writeUInt32LE(101010256,0);function n8i(t){var e=t.stream(0).pipe(ett());return e.pull(4).then(function(n){var i=n.readUInt32LE(0);if(i===875721283){var s;return e.pull(12).then(function(o){s=ttt.parse(o,[["version",4],["pubKeyLength",4],["signatureLength",4]])}).then(function(){return e.pull(s.pubKeyLength+s.signatureLength)}).then(function(o){return s.publicKey=o.slice(0,s.pubKeyLength),s.signature=o.slice(s.pubKeyLength),s.size=16+s.pubKeyLength+s.signatureLength,s})}})}function r8i(t,e){var n=ttt.parse(e,[["signature",4],["diskNumber",4],["offsetToStartOfCentralDirectory",8],["numberOfDisks",4]]);if(n.signature!=117853008)throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+n.signature.toString(16));var i=ett();return t.stream(n.offsetToStartOfCentralDirectory).pipe(i),i.pull(56)}function i8i(t){var e=ttt.parse(t,[["signature",4],["sizeOfCentralDirectory",8],["version",2],["versionsNeededToExtract",2],["diskNumber",4],["diskStart",4],["numberOfRecordsOnDisk",8],["numberOfRecords",8],["sizeOfCentralDirectory",8],["offsetToStartOfCentralDirectory",8]]);if(e.signature!=101075792)throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+e.signature.toString(16));return e}Prr.exports=function(e,n){var i=ett(),s=ett(),o=n&&n.tailSize||80,f,h,_,x;return n&&n.crx&&(h=n8i(e)),e.size().then(function(v){return f=v,e.stream(Math.max(0,v-o)).on("error",function(T){i.emit("error",T)}).pipe(i),i.pull(Irr)}).then(function(){return Zet.props({directory:i.pull(22),crxHeader:h})}).then(function(v){var T=v.directory;if(_=v.crxHeader&&v.crxHeader.size||0,x=ttt.parse(T,[["signature",4],["diskNumber",2],["diskStart",2],["numberOfRecordsOnDisk",2],["numberOfRecords",2],["sizeOfCentralDirectory",4],["offsetToStartOfCentralDirectory",4],["commentLength",2]]),x.numberOfRecords==65535||x.numberOfRecords==65535||x.offsetToStartOfCentralDirectory==4294967295){let w=f-(o-i.match+20),N=ett();return e.stream(w).pipe(N),N.pull(20).then(function(P){return r8i(e,P)}).then(function(P){x=i8i(P)})}else x.offsetToStartOfCentralDirectory+=_}).then(function(){if(x.commentLength)return i.pull(x.commentLength).then(function(v){x.comment=v.toString("utf8")})}).then(function(){return e.stream(x.offsetToStartOfCentralDirectory).pipe(s),x.extract=function(v){if(!v||!v.path)throw new Error("PATH_MISSING");return v.path=ycn.resolve(ycn.normalize(v.path)),x.files.then(function(T){return Zet.map(T,function(A){if(A.type!="Directory"){var w=ycn.join(v.path,A.path);if(w.indexOf(v.path)==0){var N=v.getWriter?v.getWriter({path:w}):e8i({path:w});return new Zet(function(P,F){A.stream(v.password).on("error",F).pipe(N).on("close",P).on("error",F)})}}},{concurrency:v.concurrency>1?v.concurrency:1})})},x.files=Zet.mapSeries(Array(x.numberOfRecords),function(){return s.pull(46).then(function(v){var T=T=ttt.parse(v,[["signature",4],["versionMadeBy",2],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2],["fileCommentLength",2],["diskNumber",2],["internalFileAttributes",2],["externalFileAttributes",4],["offsetToLocalFileHeader",4]]);return T.offsetToLocalFileHeader+=_,T.lastModifiedDateTime=t8i(T.lastModifiedDate,T.lastModifiedTime),s.pull(T.fileNameLength).then(function(A){return T.pathBuffer=A,T.path=A.toString("utf8"),T.isUnicode=(T.flags&2048)!=0,s.pull(T.extraFieldLength)}).then(function(A){return T.extra=ZFi(A,T),s.pull(T.fileCommentLength)}).then(function(A){T.comment=A,T.type=T.uncompressedSize===0&&/[\/\\]$/.test(T.path)?"Directory":"File";var w=n&&n.padding||1e3;return T.stream=function(N){var P=30+w+(T.extraFieldLength||0)+(T.fileNameLength||0)+T.compressedSize;return YFi(e,T.offsetToLocalFileHeader,N,T,P)},T.buffer=function(N){return QFi(T.stream(N))},T})})}),Zet.props(x)})}});var Orr=le((V9a,Rrr)=>{var krr=$ee(),YEt=a_e(),ntt=Nrr(),s8i=require("stream");Rrr.exports={buffer:function(t,e){var n={stream:function(i,s){var o=s8i.PassThrough(),f=s?i+s:void 0;return o.end(t.slice(i,f)),o},size:function(){return YEt.resolve(t.length)}};return ntt(n,e)},file:function(t,e){var n={stream:function(i,s){var o=s?i+s:void 0;return krr.createReadStream(t,{start:i,end:o})},size:function(){return new YEt(function(i,s){krr.stat(t,function(o,f){o?s(o):i(f.size)})})}};return ntt(n,e)},url:function(t,e,n){if(typeof e=="string"&&(e={url:e}),!e.url)throw"URL missing";e.headers=e.headers||{};var i={stream:function(s,o){var f=Object.create(e),h=o?s+o:"";return f.headers=Object.create(e.headers),f.headers.range="bytes="+s+"-"+h,t(f)},size:function(){return new YEt(function(s,o){var f=t(e);f.on("response",function(h){f.abort(),h.headers["content-length"]?s(h.headers["content-length"]):o(new Error("Missing content length header"))}).on("error",o)})}};return ntt(i,n)},s3:function(t,e,n){var i={size:function(){return new YEt(function(s,o){t.headObject(e,function(f,h){f?o(f):s(h.ContentLength)})})},stream:function(s,o){var f={};for(var h in e)f[h]=e[h];var _=o?s+o:"";return f.Range="bytes="+s+"-"+_,t.getObject(f).createReadStream()}};return ntt(i,n)},custom:function(t,e){return ntt(t,e)}}});var Lrr=le(rtt=>{"use strict";rtt.Parse=xEt();rtt.ParseOne=Ptr();rtt.Extract=brr();rtt.Open=Orr()});var a8i,vcn,bcn,Mrr,Yee,Frr,Brr,Wrr,jrr,zrr=Ct(()=>{"use strict";a8i=jo(CKn(),1);JJn();vcn=jo($Yn(),1),bcn=jo(XQn(),1),Mrr=jo(Lrr(),1),Yee=require("node:fs/promises"),Frr=async(t,e)=>{await(0,Yee.access)(t,Yee.constants.F_OK).catch(()=>{throw new Error(`[Archiver]: source ${t} does not exist`)}),await(0,Yee.access)(e,Yee.constants.F_OK).catch(()=>(0,Yee.mkdir)(e,{recursive:!0}))},Brr=async(t,e)=>(await Frr(t,e),vcn.x({file:t,cwd:e})),Wrr=async(t,e)=>(await Frr(t,e),await Mrr.default.Open.file(t).then(n=>n.extract({path:e,concurrency:5})),e),jrr=async t=>{let e=bcn.pack();for(let{name:s,data:o}of Object.values(t))e.entry({name:s},o);e.finalize();let n=[];return e.on("data",s=>n.push(s)),await new Promise((s,o)=>{e.on("end",s),e.on("error",o)}),Buffer.from(KJn.gzip(Buffer.concat(n)))}});async function Qee(t){let{source:e,throwOnNotFound:n=!1}=t,i=await(0,Grr.readFile)((0,Urr.join)(e,".codemodrc.json"),{encoding:"utf-8"}).catch(()=>null);if(i===null){let o=`Could not locate the .codemodrc.json file at ${e}`;if(n)throw new Error(o);return{config:null,error:o}}let s;try{s=Eme(JSON.parse(i))}catch{let f=`Failed to parse the .codemodrc.json file at ${e}`;if(n)throw new Error(f);return{config:null,error:f}}return{config:s,error:null}}async function xle(t){let{source:e,throwOnNotFound:n}=t,{config:i,error:s}=await Qee({source:e,throwOnNotFound:!1});if(i===null){if(n)throw new Error(s);return{path:null,error:s}}let o;switch(i.engine){case"ast-grep":o="**/rule.yaml";break;default:o="src/index.{ts,js}";break}let f=i.entry?`Make sure the entry point path under ${tb("entry")} key is correct in .codemodrc.json`:`Could not find an entry point under ${tb(o)}. Either create it or provide a path at ${tb("entry")} key in .codemodrc.json`,_=(await n3(i.entry??o,{absolute:!0,cwd:e,nodir:!0})).at(0)??null;if(_===null){if(n)throw new Error(f);return{path:null,error:f}}return{path:_,error:null}}var Grr,Urr,Vrr=Ct(()=>{"use strict";Grr=require("node:fs/promises"),Urr=require("node:path");wme();SQe();i1t()});var qrr=Ct(()=>{"use strict"});var Hrr=Ct(()=>{"use strict"});var Krr=Ct(()=>{"use strict"});var Jrr,$rr,OC,Xrr,Ecn=Ct(()=>{"use strict";Jrr=require("node:child_process"),$rr=require("node:util"),OC=(0,$rr.promisify)(Jrr.exec),Xrr=async t=>{let e=t(),{done:n}=await e.next();return n}});async function QEt(t,e=!1){let n=null,i=null;try{let{stdout:o}=await OC("git rev-parse --show-toplevel",{cwd:t}),f=o.trim();if(f.length&&(i=f,e))return{rootPath:i}}catch{}if(i===null){let o=t;for(;;){try{await(0,cJ.access)((0,iAe.join)(o,".git"),cJ.constants.R_OK|cJ.constants.W_OK);let h=(0,iAe.join)(o,"package.json");await(0,cJ.access)(h,cJ.constants.R_OK|cJ.constants.W_OK),i=o}catch{}if(i){if(e)return{rootPath:i};break}let f=(0,iAe.dirname)(o);if(f===o)break;o=f}}let s=t;for(;;){for(let f of Object.keys(Yrr))try{await(0,cJ.access)((0,iAe.join)(s,f),cJ.constants.R_OK|cJ.constants.W_OK),n=Yrr[f],i===null&&(i=s);break}catch{}if(i){if(e)return{rootPath:i};break}let o=(0,iAe.dirname)(s);if(o===s)break;s=o}return{rootPath:i,detectedPackageManager:n}}var cJ,iAe,Yrr,Qrr=Ct(()=>{"use strict";cJ=require("node:fs/promises"),iAe=require("node:path");Ecn();Yrr={"package-lock.json":"npm","yarn.lock":"yarn","pnpm-lock.yaml":"pnpm","bun.lockb":"bun"}});var o8i,itt,Zrr,Scn=Ct(()=>{"use strict";lR();o8i=O_({engine:Lf("jscodeshift"),parser:Py([Lf("babel"),Lf("babylon"),Lf("flow"),Lf("ts"),Lf("tsx")])}),itt=Py([o8i]),Zrr=t=>{let e=oR(itt,t);return e.success?e.output:null}});var eir,Tcn,Dcn,tir,Acn,nir,stt,sAe,rir,iir=Ct(()=>{"use strict";lR();a1t();SQe();Scn();eir=O_({$schema:Zd(ep()),path:ep(),source:Py([Lf("local"),Lf("remote")]),type:Py([Lf("standalone"),Lf("package")]),safeArgumentRecord:Zd(s1t,{}),engineOptions:Zd(rQe(itt),null)}),Tcn=O_({...eir.entries,...O_({config:mtn}).entries}),Dcn=O_({...eir.entries,...O_({config:_tn,codemods:Zd(_I(Tcn),[])}).entries}),tir=Py([Tcn,Dcn]),Acn=t=>oR(Tcn,t),nir=t=>oR(Dcn,t),stt=t=>Een(Dcn,t),sAe=t=>eL(tir,t),rir=t=>oR(tir,t)});var sir=Ct(()=>{"use strict"});var cWa,uWa,air=Ct(()=>{"use strict";lR();cWa=O_({codemodSource:ep(),codemodEngine:Py([Lf("jscodeshift"),Lf("ts-morph"),Lf("workflow")]),codemodArguments:Zd(ep()),repoUrl:Zd(ep()),branch:Zd(ep()),persistent:Zd(M2())}),uWa=O_({jobId:ep()})});var yR=Ct(()=>{"use strict";IBn();Gjn();YHn();zrr();Vrr();qrr();Hrr();i1t();Krr();Ecn();Qrr();$en();a1t();SQe();iir();Scn();sir();air()});var l8i,oir,lir=Ct(()=>{"use strict";lR();yR();l8i=Py([O_({kind:Lf("initialization"),path:ep(),codemodSource:ep(),engine:Py([Lf("jscodeshift"),Lf("ts-morph"),Lf("ast-grep"),Lf("workflow")]),format:M2(),safeArgumentRecord:s1t,engineOptions:rQe(itt)}),O_({kind:Lf("exit")}),O_({kind:Lf("runCodemod"),path:ep(),data:ep()})]),oir=t=>eL(l8i,t)});var cir=Ct(()=>{"use strict"});var c8i,uir,fir=Ct(()=>{"use strict";lR();Aen();c8i=Py([O_({kind:Lf("commands"),commands:Den(),path:Zd(ep())}),O_({kind:Lf("error"),message:ep(),path:Zd(ep())}),O_({kind:Lf("console"),consoleKind:wBn,message:ep()})]),uir=t=>eL(c8i,t)});var dA=Ct(()=>{"use strict";aR();f5n();xBn();TBn();Aen();lir();cir();fir()});var uJ,att=Ct(()=>{uJ="0.18.7"});var dir,pir,Ccn,fJ,wcn,HWa,ott=Ct(()=>{"use strict";dir=jo(require("node:os"),1),pir=require("node:path");dA();Ccn=process.stdout.write,fJ=(0,pir.join)(dir.homedir(),".codemod"),wcn=Ai.green("\u2714"),HWa=Ai.red("\u2716")});var Icn,j8e,Pcn,ZEt,eSt,Ncn=Ct(()=>{"use strict";Icn=jo(require("node:fs"),1),j8e=jo(require("node:os"),1),Pcn=require("node:path");dA();yR();att();ott();ZEt=(0,Pcn.join)(fJ,"logs"),eSt=async t=>{let{prefix:e,content:n,fatal:i}=t,s=(0,Pcn.join)(ZEt,`${i?"FATAL-":""}${new Date().toISOString()}-error.log`),o=`- CLI version: ${uJ}
|
|
677
|
+
Unsupported type: `+t.type,"ENOTSUP");t._finish()})};uU.prototype._stat=function(t){var e=this,n=e.props,i=n.follow?"stat":"lstat",s=e._proxy||e;t?o(null,t):cU[i](e._path,o);function o(f,h){if(e.filter&&!e.filter.call(s,s,h)){e._aborted=!0,e.emit("end"),e.emit("close");return}if(f||!h)return _cn(e);e._old=h;var _=prr(h);if(_!==e.type||e.type==="File"&&h.nlink>1)return wFi(e._path,function(x){if(x)return e.error(x);e._old=null,_cn(e)});_cn(e)}};function _cn(t){IFi(Qet.dirname(t._path),uU.dirmode,function(e,n){return e?t.error(e):(t._madeDir=n,t._create())})}function mrr(t,e,n,i,s){var o=e.mode,f=e.follow||t.type!=="SymbolicLink"?"chmod":"lchmod";if(!cU[f]||typeof o!="number")return s();var h=n.mode&parseInt("0777",8);if(o=o&parseInt("0777",8),o===h)return s();cU[f](i,o,s)}function _rr(t,e,n,i,s){if(process.platform==="win32"||!process.getuid||process.getuid()!==0||typeof e.uid!="number"&&typeof e.gid!="number"||n.uid===e.uid&&n.gid===e.gid)return s();var o=t.props.follow||t.type!=="SymbolicLink"?"chown":"lchown";if(!cU[o])return s();typeof e.uid!="number"&&(e.uid=n.uid),typeof e.gid!="number"&&(e.gid=n.gid),cU[o](i,e.uid,e.gid,s)}function grr(t,e,n,i,s){if(!cU.utimes||process.platform==="win32")return s();var o=e.follow||t.type!=="SymbolicLink"?"utimes":"lutimes";if(o==="lutimes"&&!cU[o]&&(o="utimes"),!cU[o])return s();var f=n.atime,h=n.mtime,_=e.atime,x=e.mtime;if(_===void 0&&(_=f),x===void 0&&(x=h),frr(_)||(_=new Date(_)),frr(x)||(_=new Date(x)),_.getTime()===f.getTime()&&x.getTime()===h.getTime())return s();cU[o](i,_,x,s)}uU.prototype._finish=function(){var t=this;if(t._finishing)return;t._finishing=!0;var e=0,n=null,i=!1;if(t._old)t._old.atime=new Date(0),t._old.mtime=new Date(0),o(t._old);else{var s=t.props.follow?"stat":"lstat";cU[s](t._path,function(h,_){if(h)if(h.code==="ENOENT"&&(t.type==="Link"||t.type==="SymbolicLink")&&process.platform==="win32"){t.ready=!0,t.emit("ready"),t.emit("end"),t.emit("close"),t.end=t._finish=function(){};return}else return t.error(h);o(t._old=_)})}return;function o(h){e+=3,mrr(t,t.props,h,t._path,f("chmod")),_rr(t,t.props,h,t._path,f("chown")),grr(t,t.props,h,t._path,f("utimes"))}function f(h){return function(_){if(n)return;if(_)return _.fstream_finish_call=h,t.error(n=_);if(--e>0||i)return;if(i=!0,t._madeDir)xrr(t,t._path,x);else return x();function x(v){if(v)return v.fstream_finish_call="setupMadeDir",t.error(v);t.emit("end"),t.emit("close")}}}};function xrr(t,e,n){var i=t._madeDir,s=Qet.dirname(e);OFi(t,s,function(o){if(o)return n(o);if(s===i)return n();xrr(t,s,n)})}function OFi(t,e,n){var i={};Object.keys(t.props).forEach(function(h){i[h]=t.props[h],h==="mode"&&t.type!=="Directory"&&(i[h]=i[h]|parseInt("0111",8))});var s=3,o=null;cU.stat(e,function(h,_){if(h)return n(o=h);mrr(t,i,_,e,f),_rr(t,i,_,e,f),grr(t,i,_,e,f)});function f(h){if(!o){if(h)return n(o=h);if(--s===0)return n()}}}uU.prototype.pipe=function(){this.error("Can't pipe from writable stream")};uU.prototype.add=function(){this.error("Can't add to non-Directory type")};uU.prototype.write=function(){return!0};function LFi(t){return Object.prototype.toString.call(t)}function frr(t){return typeof t=="object"&&LFi(t)==="[object Date]"}});var gcn=le(Tx=>{Tx.Abstract=PEt();Tx.Reader=XDe();Tx.Writer=B8e();Tx.File={Reader:Nln(),Writer:pcn()};Tx.Dir={Reader:Pln(),Writer:fcn()};Tx.Link={Reader:wln(),Writer:dcn()};Tx.Proxy={Reader:Rln(),Writer:mcn()};Tx.Reader.Dir=Tx.DirReader=Tx.Dir.Reader;Tx.Reader.File=Tx.FileReader=Tx.File.Reader;Tx.Reader.Link=Tx.LinkReader=Tx.Link.Reader;Tx.Reader.Proxy=Tx.ProxyReader=Tx.Proxy.Reader;Tx.Writer.Dir=Tx.DirWriter=Tx.Dir.Writer;Tx.Writer.File=Tx.FileWriter=Tx.File.Writer;Tx.Writer.Link=Tx.LinkWriter=Tx.Link.Writer;Tx.Writer.Proxy=Tx.ProxyWriter=Tx.Proxy.Writer;Tx.collect=HEt()});var brr=le((W9a,vrr)=>{vrr.exports=zFi;var MFi=xEt(),FFi=gcn().Writer,xcn=require("path"),BFi=require("stream"),WFi=vln(),jFi=a_e();function zFi(t){t.path=xcn.resolve(xcn.normalize(t.path));var e=new MFi(t),n=new BFi.Writable({objectMode:!0});n._write=function(s,o,f){if(s.type=="Directory")return f();var h=xcn.join(t.path,s.path.replace(/\\/g,"/"));if(h.indexOf(t.path)!=0)return f();let _=t.getWriter?t.getWriter({path:h}):FFi({path:h});s.pipe(_).on("error",f).on("close",f)};var i=WFi(e,n);return e.once("crx-header",function(s){i.crxHeader=s}),e.pipe(n).on("finish",function(){i.emit("close")}),i.promise=function(){return new jFi(function(s,o){i.on("close",s),i.on("error",o)})},i}});var Err=le((j9a,$Et)=>{var vI=function(t){"use strict";var e=1e7,n=7,i=9007199254740992,s=A(i),o="0123456789abcdefghijklmnopqrstuvwxyz",f=typeof BigInt=="function";function h(it,Yt,Qt,On){return typeof it>"u"?h[0]:typeof Yt<"u"?+Yt==10&&!Qt?jr(it):Fr(it,Yt,Qt,On):jr(it)}function _(it,Yt){this.value=it,this.sign=Yt,this.isSmall=!1}_.prototype=Object.create(h.prototype);function x(it){this.value=it,this.sign=it<0,this.isSmall=!0}x.prototype=Object.create(h.prototype);function v(it){this.value=it}v.prototype=Object.create(h.prototype);function T(it){return-i<it&&it<i}function A(it){return it<1e7?[it]:it<1e14?[it%1e7,Math.floor(it/1e7)]:[it%1e7,Math.floor(it/1e7)%1e7,Math.floor(it/1e14)]}function w(it){N(it);var Yt=it.length;if(Yt<4&&tn(it,s)<0)switch(Yt){case 0:return 0;case 1:return it[0];case 2:return it[0]+it[1]*e;default:return it[0]+(it[1]+it[2]*e)*e}return it}function N(it){for(var Yt=it.length;it[--Yt]===0;);it.length=Yt+1}function P(it){for(var Yt=new Array(it),Qt=-1;++Qt<it;)Yt[Qt]=0;return Yt}function F(it){return it>0?Math.floor(it):Math.ceil(it)}function j(it,Yt){var Qt=it.length,On=Yt.length,lt=new Array(Qt),er=0,gi=e,dr,xi;for(xi=0;xi<On;xi++)dr=it[xi]+Yt[xi]+er,er=dr>=gi?1:0,lt[xi]=dr-er*gi;for(;xi<Qt;)dr=it[xi]+er,er=dr===gi?1:0,lt[xi++]=dr-er*gi;return er>0&<.push(er),lt}function X(it,Yt){return it.length>=Yt.length?j(it,Yt):j(Yt,it)}function oe(it,Yt){var Qt=it.length,On=new Array(Qt),lt=e,er,gi;for(gi=0;gi<Qt;gi++)er=it[gi]-lt+Yt,Yt=Math.floor(er/lt),On[gi]=er-Yt*lt,Yt+=1;for(;Yt>0;)On[gi++]=Yt%lt,Yt=Math.floor(Yt/lt);return On}_.prototype.add=function(it){var Yt=jr(it);if(this.sign!==Yt.sign)return this.subtract(Yt.negate());var Qt=this.value,On=Yt.value;return Yt.isSmall?new _(oe(Qt,Math.abs(On)),this.sign):new _(X(Qt,On),this.sign)},_.prototype.plus=_.prototype.add,x.prototype.add=function(it){var Yt=jr(it),Qt=this.value;if(Qt<0!==Yt.sign)return this.subtract(Yt.negate());var On=Yt.value;if(Yt.isSmall){if(T(Qt+On))return new x(Qt+On);On=A(Math.abs(On))}return new _(oe(On,Math.abs(Qt)),Qt<0)},x.prototype.plus=x.prototype.add,v.prototype.add=function(it){return new v(this.value+jr(it).value)},v.prototype.plus=v.prototype.add;function ee(it,Yt){var Qt=it.length,On=Yt.length,lt=new Array(Qt),er=0,gi=e,dr,xi;for(dr=0;dr<On;dr++)xi=it[dr]-er-Yt[dr],xi<0?(xi+=gi,er=1):er=0,lt[dr]=xi;for(dr=On;dr<Qt;dr++){if(xi=it[dr]-er,xi<0)xi+=gi;else{lt[dr++]=xi;break}lt[dr]=xi}for(;dr<Qt;dr++)lt[dr]=it[dr];return N(lt),lt}function ge(it,Yt,Qt){var On;return tn(it,Yt)>=0?On=ee(it,Yt):(On=ee(Yt,it),Qt=!Qt),On=w(On),typeof On=="number"?(Qt&&(On=-On),new x(On)):new _(On,Qt)}function Le(it,Yt,Qt){var On=it.length,lt=new Array(On),er=-Yt,gi=e,dr,xi;for(dr=0;dr<On;dr++)xi=it[dr]+er,er=Math.floor(xi/gi),xi%=gi,lt[dr]=xi<0?xi+gi:xi;return lt=w(lt),typeof lt=="number"?(Qt&&(lt=-lt),new x(lt)):new _(lt,Qt)}_.prototype.subtract=function(it){var Yt=jr(it);if(this.sign!==Yt.sign)return this.add(Yt.negate());var Qt=this.value,On=Yt.value;return Yt.isSmall?Le(Qt,Math.abs(On),this.sign):ge(Qt,On,this.sign)},_.prototype.minus=_.prototype.subtract,x.prototype.subtract=function(it){var Yt=jr(it),Qt=this.value;if(Qt<0!==Yt.sign)return this.add(Yt.negate());var On=Yt.value;return Yt.isSmall?new x(Qt-On):Le(On,Math.abs(Qt),Qt>=0)},x.prototype.minus=x.prototype.subtract,v.prototype.subtract=function(it){return new v(this.value-jr(it).value)},v.prototype.minus=v.prototype.subtract,_.prototype.negate=function(){return new _(this.value,!this.sign)},x.prototype.negate=function(){var it=this.sign,Yt=new x(-this.value);return Yt.sign=!it,Yt},v.prototype.negate=function(){return new v(-this.value)},_.prototype.abs=function(){return new _(this.value,!1)},x.prototype.abs=function(){return new x(Math.abs(this.value))},v.prototype.abs=function(){return new v(this.value>=0?this.value:-this.value)};function xe(it,Yt){var Qt=it.length,On=Yt.length,lt=Qt+On,er=P(lt),gi=e,dr,xi,Ys,Ml,hl;for(Ys=0;Ys<Qt;++Ys){Ml=it[Ys];for(var Wc=0;Wc<On;++Wc)hl=Yt[Wc],dr=Ml*hl+er[Ys+Wc],xi=Math.floor(dr/gi),er[Ys+Wc]=dr-xi*gi,er[Ys+Wc+1]+=xi}return N(er),er}function Se(it,Yt){var Qt=it.length,On=new Array(Qt),lt=e,er=0,gi,dr;for(dr=0;dr<Qt;dr++)gi=it[dr]*Yt+er,er=Math.floor(gi/lt),On[dr]=gi-er*lt;for(;er>0;)On[dr++]=er%lt,er=Math.floor(er/lt);return On}function Ve(it,Yt){for(var Qt=[];Yt-- >0;)Qt.push(0);return Qt.concat(it)}function Xe(it,Yt){var Qt=Math.max(it.length,Yt.length);if(Qt<=30)return xe(it,Yt);Qt=Math.ceil(Qt/2);var On=it.slice(Qt),lt=it.slice(0,Qt),er=Yt.slice(Qt),gi=Yt.slice(0,Qt),dr=Xe(lt,gi),xi=Xe(On,er),Ys=Xe(X(lt,On),X(gi,er)),Ml=X(X(dr,Ve(ee(ee(Ys,dr),xi),Qt)),Ve(xi,2*Qt));return N(Ml),Ml}function Ne(it,Yt){return-.012*it-.012*Yt+15e-6*it*Yt>0}_.prototype.multiply=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt=this.sign!==Yt.sign,er;if(Yt.isSmall){if(On===0)return h[0];if(On===1)return this;if(On===-1)return this.negate();if(er=Math.abs(On),er<e)return new _(Se(Qt,er),lt);On=A(er)}return Ne(Qt.length,On.length)?new _(Xe(Qt,On),lt):new _(xe(Qt,On),lt)},_.prototype.times=_.prototype.multiply;function tt(it,Yt,Qt){return it<e?new _(Se(Yt,it),Qt):new _(xe(Yt,A(it)),Qt)}x.prototype._multiplyBySmall=function(it){return T(it.value*this.value)?new x(it.value*this.value):tt(Math.abs(it.value),A(Math.abs(this.value)),this.sign!==it.sign)},_.prototype._multiplyBySmall=function(it){return it.value===0?h[0]:it.value===1?this:it.value===-1?this.negate():tt(Math.abs(it.value),this.value,this.sign!==it.sign)},x.prototype.multiply=function(it){return jr(it)._multiplyBySmall(this)},x.prototype.times=x.prototype.multiply,v.prototype.multiply=function(it){return new v(this.value*jr(it).value)},v.prototype.times=v.prototype.multiply;function zt(it){var Yt=it.length,Qt=P(Yt+Yt),On=e,lt,er,gi,dr,xi;for(gi=0;gi<Yt;gi++){dr=it[gi],er=0-dr*dr;for(var Ys=gi;Ys<Yt;Ys++)xi=it[Ys],lt=2*(dr*xi)+Qt[gi+Ys]+er,er=Math.floor(lt/On),Qt[gi+Ys]=lt-er*On;Qt[gi+Yt]=er}return N(Qt),Qt}_.prototype.square=function(){return new _(zt(this.value),!1)},x.prototype.square=function(){var it=this.value*this.value;return T(it)?new x(it):new _(zt(A(Math.abs(this.value))),!1)},v.prototype.square=function(it){return new v(this.value*this.value)};function yt(it,Yt){var Qt=it.length,On=Yt.length,lt=e,er=P(Yt.length),gi=Yt[On-1],dr=Math.ceil(lt/(2*gi)),xi=Se(it,dr),Ys=Se(Yt,dr),Ml,hl,Wc,Ed,rp,Cf,cs;for(xi.length<=Qt&&xi.push(0),Ys.push(0),gi=Ys[On-1],hl=Qt-On;hl>=0;hl--){for(Ml=lt-1,xi[hl+On]!==gi&&(Ml=Math.floor((xi[hl+On]*lt+xi[hl+On-1])/gi)),Wc=0,Ed=0,Cf=Ys.length,rp=0;rp<Cf;rp++)Wc+=Ml*Ys[rp],cs=Math.floor(Wc/lt),Ed+=xi[hl+rp]-(Wc-cs*lt),Wc=cs,Ed<0?(xi[hl+rp]=Ed+lt,Ed=-1):(xi[hl+rp]=Ed,Ed=0);for(;Ed!==0;){for(Ml-=1,Wc=0,rp=0;rp<Cf;rp++)Wc+=xi[hl+rp]-lt+Ys[rp],Wc<0?(xi[hl+rp]=Wc+lt,Wc=0):(xi[hl+rp]=Wc,Wc=1);Ed+=Wc}er[hl]=Ml}return xi=dt(xi,dr)[0],[w(er),w(xi)]}function nn(it,Yt){for(var Qt=it.length,On=Yt.length,lt=[],er=[],gi=e,dr,xi,Ys,Ml,hl;Qt;){if(er.unshift(it[--Qt]),N(er),tn(er,Yt)<0){lt.push(0);continue}xi=er.length,Ys=er[xi-1]*gi+er[xi-2],Ml=Yt[On-1]*gi+Yt[On-2],xi>On&&(Ys=(Ys+1)*gi),dr=Math.ceil(Ys/Ml);do{if(hl=Se(Yt,dr),tn(hl,er)<=0)break;dr--}while(dr);lt.push(dr),er=ee(er,hl)}return lt.reverse(),[w(lt),w(er)]}function dt(it,Yt){var Qt=it.length,On=P(Qt),lt=e,er,gi,dr,xi;for(dr=0,er=Qt-1;er>=0;--er)xi=dr*lt+it[er],gi=F(xi/Yt),dr=xi-gi*Yt,On[er]=gi|0;return[On,dr|0]}function Ht(it,Yt){var Qt,On=jr(Yt);if(f)return[new v(it.value/On.value),new v(it.value%On.value)];var lt=it.value,er=On.value,gi;if(er===0)throw new Error("Cannot divide by zero");if(it.isSmall)return On.isSmall?[new x(F(lt/er)),new x(lt%er)]:[h[0],it];if(On.isSmall){if(er===1)return[it,h[0]];if(er==-1)return[it.negate(),h[0]];var dr=Math.abs(er);if(dr<e){Qt=dt(lt,dr),gi=w(Qt[0]);var xi=Qt[1];return it.sign&&(xi=-xi),typeof gi=="number"?(it.sign!==On.sign&&(gi=-gi),[new x(gi),new x(xi)]):[new _(gi,it.sign!==On.sign),new x(xi)]}er=A(dr)}var Ys=tn(lt,er);if(Ys===-1)return[h[0],it];if(Ys===0)return[h[it.sign===On.sign?1:-1],h[0]];lt.length+er.length<=200?Qt=yt(lt,er):Qt=nn(lt,er),gi=Qt[0];var Ml=it.sign!==On.sign,hl=Qt[1],Wc=it.sign;return typeof gi=="number"?(Ml&&(gi=-gi),gi=new x(gi)):gi=new _(gi,Ml),typeof hl=="number"?(Wc&&(hl=-hl),hl=new x(hl)):hl=new _(hl,Wc),[gi,hl]}_.prototype.divmod=function(it){var Yt=Ht(this,it);return{quotient:Yt[0],remainder:Yt[1]}},v.prototype.divmod=x.prototype.divmod=_.prototype.divmod,_.prototype.divide=function(it){return Ht(this,it)[0]},v.prototype.over=v.prototype.divide=function(it){return new v(this.value/jr(it).value)},x.prototype.over=x.prototype.divide=_.prototype.over=_.prototype.divide,_.prototype.mod=function(it){return Ht(this,it)[1]},v.prototype.mod=v.prototype.remainder=function(it){return new v(this.value%jr(it).value)},x.prototype.remainder=x.prototype.mod=_.prototype.remainder=_.prototype.mod,_.prototype.pow=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt,er,gi;if(On===0)return h[1];if(Qt===0)return h[0];if(Qt===1)return h[1];if(Qt===-1)return Yt.isEven()?h[1]:h[-1];if(Yt.sign)return h[0];if(!Yt.isSmall)throw new Error("The exponent "+Yt.toString()+" is too large.");if(this.isSmall&&T(lt=Math.pow(Qt,On)))return new x(F(lt));for(er=this,gi=h[1];On&!0&&(gi=gi.times(er),--On),On!==0;)On/=2,er=er.square();return gi},x.prototype.pow=_.prototype.pow,v.prototype.pow=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt=BigInt(0),er=BigInt(1),gi=BigInt(2);if(On===lt)return h[1];if(Qt===lt)return h[0];if(Qt===er)return h[1];if(Qt===BigInt(-1))return Yt.isEven()?h[1]:h[-1];if(Yt.isNegative())return new v(lt);for(var dr=this,xi=h[1];(On&er)===er&&(xi=xi.times(dr),--On),On!==lt;)On/=gi,dr=dr.square();return xi},_.prototype.modPow=function(it,Yt){if(it=jr(it),Yt=jr(Yt),Yt.isZero())throw new Error("Cannot take modPow with modulus 0");var Qt=h[1],On=this.mod(Yt);for(it.isNegative()&&(it=it.multiply(h[-1]),On=On.modInv(Yt));it.isPositive();){if(On.isZero())return h[0];it.isOdd()&&(Qt=Qt.multiply(On).mod(Yt)),it=it.divide(2),On=On.square().mod(Yt)}return Qt},v.prototype.modPow=x.prototype.modPow=_.prototype.modPow;function tn(it,Yt){if(it.length!==Yt.length)return it.length>Yt.length?1:-1;for(var Qt=it.length-1;Qt>=0;Qt--)if(it[Qt]!==Yt[Qt])return it[Qt]>Yt[Qt]?1:-1;return 0}_.prototype.compareAbs=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value;return Yt.isSmall?1:tn(Qt,On)},x.prototype.compareAbs=function(it){var Yt=jr(it),Qt=Math.abs(this.value),On=Yt.value;return Yt.isSmall?(On=Math.abs(On),Qt===On?0:Qt>On?1:-1):-1},v.prototype.compareAbs=function(it){var Yt=this.value,Qt=jr(it).value;return Yt=Yt>=0?Yt:-Yt,Qt=Qt>=0?Qt:-Qt,Yt===Qt?0:Yt>Qt?1:-1},_.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=jr(it),Qt=this.value,On=Yt.value;return this.sign!==Yt.sign?Yt.sign?1:-1:Yt.isSmall?this.sign?-1:1:tn(Qt,On)*(this.sign?-1:1)},_.prototype.compareTo=_.prototype.compare,x.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=jr(it),Qt=this.value,On=Yt.value;return Yt.isSmall?Qt==On?0:Qt>On?1:-1:Qt<0!==Yt.sign?Qt<0?-1:1:Qt<0?1:-1},x.prototype.compareTo=x.prototype.compare,v.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=this.value,Qt=jr(it).value;return Yt===Qt?0:Yt>Qt?1:-1},v.prototype.compareTo=v.prototype.compare,_.prototype.equals=function(it){return this.compare(it)===0},v.prototype.eq=v.prototype.equals=x.prototype.eq=x.prototype.equals=_.prototype.eq=_.prototype.equals,_.prototype.notEquals=function(it){return this.compare(it)!==0},v.prototype.neq=v.prototype.notEquals=x.prototype.neq=x.prototype.notEquals=_.prototype.neq=_.prototype.notEquals,_.prototype.greater=function(it){return this.compare(it)>0},v.prototype.gt=v.prototype.greater=x.prototype.gt=x.prototype.greater=_.prototype.gt=_.prototype.greater,_.prototype.lesser=function(it){return this.compare(it)<0},v.prototype.lt=v.prototype.lesser=x.prototype.lt=x.prototype.lesser=_.prototype.lt=_.prototype.lesser,_.prototype.greaterOrEquals=function(it){return this.compare(it)>=0},v.prototype.geq=v.prototype.greaterOrEquals=x.prototype.geq=x.prototype.greaterOrEquals=_.prototype.geq=_.prototype.greaterOrEquals,_.prototype.lesserOrEquals=function(it){return this.compare(it)<=0},v.prototype.leq=v.prototype.lesserOrEquals=x.prototype.leq=x.prototype.lesserOrEquals=_.prototype.leq=_.prototype.lesserOrEquals,_.prototype.isEven=function(){return(this.value[0]&1)===0},x.prototype.isEven=function(){return(this.value&1)===0},v.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},_.prototype.isOdd=function(){return(this.value[0]&1)===1},x.prototype.isOdd=function(){return(this.value&1)===1},v.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},_.prototype.isPositive=function(){return!this.sign},x.prototype.isPositive=function(){return this.value>0},v.prototype.isPositive=x.prototype.isPositive,_.prototype.isNegative=function(){return this.sign},x.prototype.isNegative=function(){return this.value<0},v.prototype.isNegative=x.prototype.isNegative,_.prototype.isUnit=function(){return!1},x.prototype.isUnit=function(){return Math.abs(this.value)===1},v.prototype.isUnit=function(){return this.abs().value===BigInt(1)},_.prototype.isZero=function(){return!1},x.prototype.isZero=function(){return this.value===0},v.prototype.isZero=function(){return this.value===BigInt(0)},_.prototype.isDivisibleBy=function(it){var Yt=jr(it);return Yt.isZero()?!1:Yt.isUnit()?!0:Yt.compareAbs(2)===0?this.isEven():this.mod(Yt).isZero()},v.prototype.isDivisibleBy=x.prototype.isDivisibleBy=_.prototype.isDivisibleBy;function Or(it){var Yt=it.abs();if(Yt.isUnit())return!1;if(Yt.equals(2)||Yt.equals(3)||Yt.equals(5))return!0;if(Yt.isEven()||Yt.isDivisibleBy(3)||Yt.isDivisibleBy(5))return!1;if(Yt.lesser(49))return!0}function Kt(it,Yt){for(var Qt=it.prev(),On=Qt,lt=0,er,gi,dr,xi;On.isEven();)On=On.divide(2),lt++;e:for(dr=0;dr<Yt.length;dr++)if(!it.lesser(Yt[dr])&&(xi=vI(Yt[dr]).modPow(On,it),!(xi.isUnit()||xi.equals(Qt)))){for(er=lt-1;er!=0;er--){if(xi=xi.square().mod(it),xi.isUnit())return!1;if(xi.equals(Qt))continue e}return!1}return!0}_.prototype.isPrime=function(it){var Yt=Or(this);if(Yt!==t)return Yt;var Qt=this.abs(),On=Qt.bitLength();if(On<=64)return Kt(Qt,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var lt=Math.log(2)*On.toJSNumber(),er=Math.ceil(it===!0?2*Math.pow(lt,2):lt),gi=[],dr=0;dr<er;dr++)gi.push(vI(dr+2));return Kt(Qt,gi)},v.prototype.isPrime=x.prototype.isPrime=_.prototype.isPrime,_.prototype.isProbablePrime=function(it,Yt){var Qt=Or(this);if(Qt!==t)return Qt;for(var On=this.abs(),lt=it===t?5:it,er=[],gi=0;gi<lt;gi++)er.push(vI.randBetween(2,On.minus(2),Yt));return Kt(On,er)},v.prototype.isProbablePrime=x.prototype.isProbablePrime=_.prototype.isProbablePrime,_.prototype.modInv=function(it){for(var Yt=vI.zero,Qt=vI.one,On=jr(it),lt=this.abs(),er,gi,dr;!lt.isZero();)er=On.divide(lt),gi=Yt,dr=On,Yt=Qt,On=lt,Qt=gi.subtract(er.multiply(Qt)),lt=dr.subtract(er.multiply(lt));if(!On.isUnit())throw new Error(this.toString()+" and "+it.toString()+" are not co-prime");return Yt.compare(0)===-1&&(Yt=Yt.add(it)),this.isNegative()?Yt.negate():Yt},v.prototype.modInv=x.prototype.modInv=_.prototype.modInv,_.prototype.next=function(){var it=this.value;return this.sign?Le(it,1,this.sign):new _(oe(it,1),this.sign)},x.prototype.next=function(){var it=this.value;return it+1<i?new x(it+1):new _(s,!1)},v.prototype.next=function(){return new v(this.value+BigInt(1))},_.prototype.prev=function(){var it=this.value;return this.sign?new _(oe(it,1),!0):Le(it,1,this.sign)},x.prototype.prev=function(){var it=this.value;return it-1>-i?new x(it-1):new _(s,!0)},v.prototype.prev=function(){return new v(this.value-BigInt(1))};for(var Gn=[1];2*Gn[Gn.length-1]<=e;)Gn.push(2*Gn[Gn.length-1]);var En=Gn.length,At=Gn[En-1];function Un(it){return Math.abs(it)<=e}_.prototype.shiftLeft=function(it){var Yt=jr(it).toJSNumber();if(!Un(Yt))throw new Error(String(Yt)+" is too large for shifting.");if(Yt<0)return this.shiftRight(-Yt);var Qt=this;if(Qt.isZero())return Qt;for(;Yt>=En;)Qt=Qt.multiply(At),Yt-=En-1;return Qt.multiply(Gn[Yt])},v.prototype.shiftLeft=x.prototype.shiftLeft=_.prototype.shiftLeft,_.prototype.shiftRight=function(it){var Yt,Qt=jr(it).toJSNumber();if(!Un(Qt))throw new Error(String(Qt)+" is too large for shifting.");if(Qt<0)return this.shiftLeft(-Qt);for(var On=this;Qt>=En;){if(On.isZero()||On.isNegative()&&On.isUnit())return On;Yt=Ht(On,At),On=Yt[1].isNegative()?Yt[0].prev():Yt[0],Qt-=En-1}return Yt=Ht(On,Gn[Qt]),Yt[1].isNegative()?Yt[0].prev():Yt[0]},v.prototype.shiftRight=x.prototype.shiftRight=_.prototype.shiftRight;function Hr(it,Yt,Qt){Yt=jr(Yt);for(var On=it.isNegative(),lt=Yt.isNegative(),er=On?it.not():it,gi=lt?Yt.not():Yt,dr=0,xi=0,Ys=null,Ml=null,hl=[];!er.isZero()||!gi.isZero();)Ys=Ht(er,At),dr=Ys[1].toJSNumber(),On&&(dr=At-1-dr),Ml=Ht(gi,At),xi=Ml[1].toJSNumber(),lt&&(xi=At-1-xi),er=Ys[0],gi=Ml[0],hl.push(Qt(dr,xi));for(var Wc=Qt(On?1:0,lt?1:0)!==0?vI(-1):vI(0),Ed=hl.length-1;Ed>=0;Ed-=1)Wc=Wc.multiply(At).add(vI(hl[Ed]));return Wc}_.prototype.not=function(){return this.negate().prev()},v.prototype.not=x.prototype.not=_.prototype.not,_.prototype.and=function(it){return Hr(this,it,function(Yt,Qt){return Yt&Qt})},v.prototype.and=x.prototype.and=_.prototype.and,_.prototype.or=function(it){return Hr(this,it,function(Yt,Qt){return Yt|Qt})},v.prototype.or=x.prototype.or=_.prototype.or,_.prototype.xor=function(it){return Hr(this,it,function(Yt,Qt){return Yt^Qt})},v.prototype.xor=x.prototype.xor=_.prototype.xor;var Kr=1<<30,Ur=(e&-e)*(e&-e)|Kr;function Gi(it){var Yt=it.value,Qt=typeof Yt=="number"?Yt|Kr:typeof Yt=="bigint"?Yt|BigInt(Kr):Yt[0]+Yt[1]*e|Ur;return Qt&-Qt}function $i(it,Yt){if(Yt.compareTo(it)<=0){var Qt=$i(it,Yt.square(Yt)),On=Qt.p,lt=Qt.e,er=On.multiply(Yt);return er.compareTo(it)<=0?{p:er,e:lt*2+1}:{p:On,e:lt*2}}return{p:vI(1),e:0}}_.prototype.bitLength=function(){var it=this;return it.compareTo(vI(0))<0&&(it=it.negate().subtract(vI(1))),it.compareTo(vI(0))===0?vI(0):vI($i(it,vI(2)).e).add(vI(1))},v.prototype.bitLength=x.prototype.bitLength=_.prototype.bitLength;function Ta(it,Yt){return it=jr(it),Yt=jr(Yt),it.greater(Yt)?it:Yt}function Rt(it,Yt){return it=jr(it),Yt=jr(Yt),it.lesser(Yt)?it:Yt}function Fa(it,Yt){if(it=jr(it).abs(),Yt=jr(Yt).abs(),it.equals(Yt))return it;if(it.isZero())return Yt;if(Yt.isZero())return it;for(var Qt=h[1],On,lt;it.isEven()&&Yt.isEven();)On=Rt(Gi(it),Gi(Yt)),it=it.divide(On),Yt=Yt.divide(On),Qt=Qt.multiply(On);for(;it.isEven();)it=it.divide(Gi(it));do{for(;Yt.isEven();)Yt=Yt.divide(Gi(Yt));it.greater(Yt)&&(lt=Yt,Yt=it,it=lt),Yt=Yt.subtract(it)}while(!Yt.isZero());return Qt.isUnit()?it:it.multiply(Qt)}function ls(it,Yt){return it=jr(it).abs(),Yt=jr(Yt).abs(),it.divide(Fa(it,Yt)).multiply(Yt)}function Kl(it,Yt,Qt){it=jr(it),Yt=jr(Yt);var On=Qt||Math.random,lt=Rt(it,Yt),er=Ta(it,Yt),gi=er.subtract(lt).add(1);if(gi.isSmall)return lt.add(Math.floor(On()*gi));for(var dr=ws(gi,e).value,xi=[],Ys=!0,Ml=0;Ml<dr.length;Ml++){var hl=Ys?dr[Ml]+(Ml+1<dr.length?dr[Ml+1]/e:0):e,Wc=F(On()*hl);xi.push(Wc),Wc<dr[Ml]&&(Ys=!1)}return lt.add(h.fromArray(xi,e,!1))}var Fr=function(it,Yt,Qt,On){Qt=Qt||o,it=String(it),On||(it=it.toLowerCase(),Qt=Qt.toLowerCase());var lt=it.length,er,gi=Math.abs(Yt),dr={};for(er=0;er<Qt.length;er++)dr[Qt[er]]=er;for(er=0;er<lt;er++){var xi=it[er];if(xi!=="-"&&xi in dr&&dr[xi]>=gi){if(xi==="1"&&gi===1)continue;throw new Error(xi+" is not a valid digit in base "+Yt+".")}}Yt=jr(Yt);var Ys=[],Ml=it[0]==="-";for(er=Ml?1:0;er<it.length;er++){var xi=it[er];if(xi in dr)Ys.push(jr(dr[xi]));else if(xi==="<"){var hl=er;do er++;while(it[er]!==">"&&er<it.length);Ys.push(jr(it.slice(hl+1,er)))}else throw new Error(xi+" is not a valid character")}return Hi(Ys,Yt,Ml)};function Hi(it,Yt,Qt){var On=h[0],lt=h[1],er;for(er=it.length-1;er>=0;er--)On=On.add(it[er].times(lt)),lt=lt.times(Yt);return Qt?On.negate():On}function yo(it,Yt){return Yt=Yt||o,it<Yt.length?Yt[it]:"<"+it+">"}function ws(it,Yt){if(Yt=vI(Yt),Yt.isZero()){if(it.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(Yt.equals(-1)){if(it.isZero())return{value:[0],isNegative:!1};if(it.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-it.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var Qt=Array.apply(null,Array(it.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return Qt.unshift([1]),{value:[].concat.apply([],Qt),isNegative:!1}}var On=!1;if(it.isNegative()&&Yt.isPositive()&&(On=!0,it=it.abs()),Yt.isUnit())return it.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(it.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:On};for(var lt=[],er=it,gi;er.isNegative()||er.compareAbs(Yt)>=0;){gi=er.divmod(Yt),er=gi.quotient;var dr=gi.remainder;dr.isNegative()&&(dr=Yt.minus(dr).abs(),er=er.next()),lt.push(dr.toJSNumber())}return lt.push(er.toJSNumber()),{value:lt.reverse(),isNegative:On}}function Mr(it,Yt,Qt){var On=ws(it,Yt);return(On.isNegative?"-":"")+On.value.map(function(lt){return yo(lt,Qt)}).join("")}_.prototype.toArray=function(it){return ws(this,it)},x.prototype.toArray=function(it){return ws(this,it)},v.prototype.toArray=function(it){return ws(this,it)},_.prototype.toString=function(it,Yt){if(it===t&&(it=10),it!==10||Yt)return Mr(this,it,Yt);for(var Qt=this.value,On=Qt.length,lt=String(Qt[--On]),er="0000000",gi;--On>=0;)gi=String(Qt[On]),lt+=er.slice(gi.length)+gi;var dr=this.sign?"-":"";return dr+lt},x.prototype.toString=function(it,Yt){return it===t&&(it=10),it!=10||Yt?Mr(this,it,Yt):String(this.value)},v.prototype.toString=x.prototype.toString,v.prototype.toJSON=_.prototype.toJSON=x.prototype.toJSON=function(){return this.toString()},_.prototype.valueOf=function(){return parseInt(this.toString(),10)},_.prototype.toJSNumber=_.prototype.valueOf,x.prototype.valueOf=function(){return this.value},x.prototype.toJSNumber=x.prototype.valueOf,v.prototype.valueOf=v.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function Yi(it){if(T(+it)){var Yt=+it;if(Yt===F(Yt))return f?new v(BigInt(Yt)):new x(Yt);throw new Error("Invalid integer: "+it)}var Qt=it[0]==="-";Qt&&(it=it.slice(1));var On=it.split(/e/i);if(On.length>2)throw new Error("Invalid integer: "+On.join("e"));if(On.length===2){var lt=On[1];if(lt[0]==="+"&&(lt=lt.slice(1)),lt=+lt,lt!==F(lt)||!T(lt))throw new Error("Invalid integer: "+lt+" is not a valid exponent.");var er=On[0],gi=er.indexOf(".");if(gi>=0&&(lt-=er.length-gi-1,er=er.slice(0,gi)+er.slice(gi+1)),lt<0)throw new Error("Cannot include negative exponent part for integers");er+=new Array(lt+1).join("0"),it=er}var dr=/^([0-9][0-9]*)$/.test(it);if(!dr)throw new Error("Invalid integer: "+it);if(f)return new v(BigInt(Qt?"-"+it:it));for(var xi=[],Ys=it.length,Ml=n,hl=Ys-Ml;Ys>0;)xi.push(+it.slice(hl,Ys)),hl-=Ml,hl<0&&(hl=0),Ys-=Ml;return N(xi),new _(xi,Qt)}function Lr(it){if(f)return new v(BigInt(it));if(T(it)){if(it!==F(it))throw new Error(it+" is not an integer.");return new x(it)}return Yi(it.toString())}function jr(it){return typeof it=="number"?Lr(it):typeof it=="string"?Yi(it):typeof it=="bigint"?new v(it):it}for(var lr=0;lr<1e3;lr++)h[lr]=jr(lr),lr>0&&(h[-lr]=jr(-lr));return h.one=h[1],h.zero=h[0],h.minusOne=h[-1],h.max=Ta,h.min=Rt,h.gcd=Fa,h.lcm=ls,h.isInstance=function(it){return it instanceof _||it instanceof x||it instanceof v},h.randBetween=Kl,h.fromArray=function(it,Yt,Qt){return Hi(it.map(jr),jr(Yt||10),Qt)},h}();typeof $Et<"u"&&$Et.hasOwnProperty("exports")&&($Et.exports=vI);typeof define=="function"&&define.amd&&define(function(){return vI})});var Drr=le((z9a,Trr)=>{var g_e=Err(),GFi=require("stream"),XEt;function UFi(){var t=3988292384,e,n,i;for(XEt=[],n=0;n<256;n++){for(e=n,i=0;i<8;i++)e=e&1?t^e>>>1:e=e>>>1;XEt[n]=e>>>0}}function Srr(t,e){return XEt||UFi(),t.charCodeAt&&(t=t.charCodeAt(0)),g_e(e).shiftRight(8).and(16777215).xor(XEt[g_e(e).xor(t).and(255)]).value}function W8e(){if(!(this instanceof W8e))return new W8e;this.key0=305419896,this.key1=591751049,this.key2=878082192}W8e.prototype.update=function(t){this.key0=Srr(t,this.key0),this.key1=g_e(this.key0).and(255).and(4294967295).add(this.key1),this.key1=g_e(this.key1).multiply(134775813).add(1).and(4294967295).value,this.key2=Srr(g_e(this.key1).shiftRight(24).and(255),this.key2)};W8e.prototype.decryptByte=function(t){var e=g_e(this.key2).or(2);return t=t^g_e(e).multiply(g_e(e^1)).shiftRight(8).and(255),this.update(t),t};W8e.prototype.stream=function(){var t=GFi.Transform(),e=this;return t._transform=function(n,i,s){for(var o=0;o<n.length;o++)n[o]=e.decryptByte(n[o]);this.push(n),s()},t};Trr.exports=W8e});var wrr=le((G9a,Crr)=>{var VFi=a_e(),qFi=Drr(),HFi=hEt(),Arr=require("stream"),KFi=require("zlib"),JFi=_Et(),$Fi=gEt(),XFi=Pet();Crr.exports=function(e,n,i,s,o){var f=HFi(),h=Arr.PassThrough(),_=e.stream(n,o);return _.pipe(f).on("error",function(x){h.emit("error",x)}),h.vars=f.pull(30).then(function(x){var v=XFi.parse(x,[["signature",4],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2]]);return v.lastModifiedDateTime=$Fi(v.lastModifiedDate,v.lastModifiedTime),f.pull(v.fileNameLength).then(function(T){return v.fileName=T.toString("utf8"),f.pull(v.extraFieldLength)}).then(function(T){var A;return v.extra=JFi(T,v),s&&s.compressedSize&&(v=s),v.flags&1&&(A=f.pull(12).then(function(w){if(!i)throw new Error("MISSING_PASSWORD");var N=qFi();String(i).split("").forEach(function(j){N.update(j)});for(var P=0;P<w.length;P++)w[P]=N.decryptByte(w[P]);v.decrypt=N,v.compressedSize-=12;var F=v.flags&8?v.lastModifiedTime>>8&255:v.crc32>>24&255;if(w[11]!==F)throw new Error("BAD_PASSWORD");return v})),VFi.resolve(A).then(function(){return h.emit("vars",v),v})})}),h.vars.then(function(x){var v=!(x.flags&8)||x.compressedSize>0,T,A=x.compressionMethod?KFi.createInflateRaw():Arr.PassThrough();v?(h.size=x.uncompressedSize,T=x.compressedSize):(T=Buffer.alloc(4),T.writeUInt32LE(134695760,0));var w=f.stream(T);x.decrypt&&(w=w.pipe(x.decrypt.stream())),w.pipe(A).on("error",function(N){h.emit("error",N)}).pipe(h).on("finish",function(){_.destroy?_.destroy():_.abort?_.abort():_.close?_.close():_.push?_.push():console.log("warning - unable to close stream")})}).catch(function(x){h.emit("error",x)}),h}});var Nrr=le((U9a,Prr)=>{var ett=hEt(),YFi=wrr(),Zet=a_e(),QFi=mEt(),ZFi=_Et(),ycn=require("path"),e8i=gcn().Writer,t8i=gEt(),ttt=Pet(),Irr=Buffer.alloc(4);Irr.writeUInt32LE(101010256,0);function n8i(t){var e=t.stream(0).pipe(ett());return e.pull(4).then(function(n){var i=n.readUInt32LE(0);if(i===875721283){var s;return e.pull(12).then(function(o){s=ttt.parse(o,[["version",4],["pubKeyLength",4],["signatureLength",4]])}).then(function(){return e.pull(s.pubKeyLength+s.signatureLength)}).then(function(o){return s.publicKey=o.slice(0,s.pubKeyLength),s.signature=o.slice(s.pubKeyLength),s.size=16+s.pubKeyLength+s.signatureLength,s})}})}function r8i(t,e){var n=ttt.parse(e,[["signature",4],["diskNumber",4],["offsetToStartOfCentralDirectory",8],["numberOfDisks",4]]);if(n.signature!=117853008)throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+n.signature.toString(16));var i=ett();return t.stream(n.offsetToStartOfCentralDirectory).pipe(i),i.pull(56)}function i8i(t){var e=ttt.parse(t,[["signature",4],["sizeOfCentralDirectory",8],["version",2],["versionsNeededToExtract",2],["diskNumber",4],["diskStart",4],["numberOfRecordsOnDisk",8],["numberOfRecords",8],["sizeOfCentralDirectory",8],["offsetToStartOfCentralDirectory",8]]);if(e.signature!=101075792)throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+e.signature.toString(16));return e}Prr.exports=function(e,n){var i=ett(),s=ett(),o=n&&n.tailSize||80,f,h,_,x;return n&&n.crx&&(h=n8i(e)),e.size().then(function(v){return f=v,e.stream(Math.max(0,v-o)).on("error",function(T){i.emit("error",T)}).pipe(i),i.pull(Irr)}).then(function(){return Zet.props({directory:i.pull(22),crxHeader:h})}).then(function(v){var T=v.directory;if(_=v.crxHeader&&v.crxHeader.size||0,x=ttt.parse(T,[["signature",4],["diskNumber",2],["diskStart",2],["numberOfRecordsOnDisk",2],["numberOfRecords",2],["sizeOfCentralDirectory",4],["offsetToStartOfCentralDirectory",4],["commentLength",2]]),x.numberOfRecords==65535||x.numberOfRecords==65535||x.offsetToStartOfCentralDirectory==4294967295){let w=f-(o-i.match+20),N=ett();return e.stream(w).pipe(N),N.pull(20).then(function(P){return r8i(e,P)}).then(function(P){x=i8i(P)})}else x.offsetToStartOfCentralDirectory+=_}).then(function(){if(x.commentLength)return i.pull(x.commentLength).then(function(v){x.comment=v.toString("utf8")})}).then(function(){return e.stream(x.offsetToStartOfCentralDirectory).pipe(s),x.extract=function(v){if(!v||!v.path)throw new Error("PATH_MISSING");return v.path=ycn.resolve(ycn.normalize(v.path)),x.files.then(function(T){return Zet.map(T,function(A){if(A.type!="Directory"){var w=ycn.join(v.path,A.path);if(w.indexOf(v.path)==0){var N=v.getWriter?v.getWriter({path:w}):e8i({path:w});return new Zet(function(P,F){A.stream(v.password).on("error",F).pipe(N).on("close",P).on("error",F)})}}},{concurrency:v.concurrency>1?v.concurrency:1})})},x.files=Zet.mapSeries(Array(x.numberOfRecords),function(){return s.pull(46).then(function(v){var T=T=ttt.parse(v,[["signature",4],["versionMadeBy",2],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2],["fileCommentLength",2],["diskNumber",2],["internalFileAttributes",2],["externalFileAttributes",4],["offsetToLocalFileHeader",4]]);return T.offsetToLocalFileHeader+=_,T.lastModifiedDateTime=t8i(T.lastModifiedDate,T.lastModifiedTime),s.pull(T.fileNameLength).then(function(A){return T.pathBuffer=A,T.path=A.toString("utf8"),T.isUnicode=(T.flags&2048)!=0,s.pull(T.extraFieldLength)}).then(function(A){return T.extra=ZFi(A,T),s.pull(T.fileCommentLength)}).then(function(A){T.comment=A,T.type=T.uncompressedSize===0&&/[\/\\]$/.test(T.path)?"Directory":"File";var w=n&&n.padding||1e3;return T.stream=function(N){var P=30+w+(T.extraFieldLength||0)+(T.fileNameLength||0)+T.compressedSize;return YFi(e,T.offsetToLocalFileHeader,N,T,P)},T.buffer=function(N){return QFi(T.stream(N))},T})})}),Zet.props(x)})}});var Orr=le((V9a,Rrr)=>{var krr=$ee(),YEt=a_e(),ntt=Nrr(),s8i=require("stream");Rrr.exports={buffer:function(t,e){var n={stream:function(i,s){var o=s8i.PassThrough(),f=s?i+s:void 0;return o.end(t.slice(i,f)),o},size:function(){return YEt.resolve(t.length)}};return ntt(n,e)},file:function(t,e){var n={stream:function(i,s){var o=s?i+s:void 0;return krr.createReadStream(t,{start:i,end:o})},size:function(){return new YEt(function(i,s){krr.stat(t,function(o,f){o?s(o):i(f.size)})})}};return ntt(n,e)},url:function(t,e,n){if(typeof e=="string"&&(e={url:e}),!e.url)throw"URL missing";e.headers=e.headers||{};var i={stream:function(s,o){var f=Object.create(e),h=o?s+o:"";return f.headers=Object.create(e.headers),f.headers.range="bytes="+s+"-"+h,t(f)},size:function(){return new YEt(function(s,o){var f=t(e);f.on("response",function(h){f.abort(),h.headers["content-length"]?s(h.headers["content-length"]):o(new Error("Missing content length header"))}).on("error",o)})}};return ntt(i,n)},s3:function(t,e,n){var i={size:function(){return new YEt(function(s,o){t.headObject(e,function(f,h){f?o(f):s(h.ContentLength)})})},stream:function(s,o){var f={};for(var h in e)f[h]=e[h];var _=o?s+o:"";return f.Range="bytes="+s+"-"+_,t.getObject(f).createReadStream()}};return ntt(i,n)},custom:function(t,e){return ntt(t,e)}}});var Lrr=le(rtt=>{"use strict";rtt.Parse=xEt();rtt.ParseOne=Ptr();rtt.Extract=brr();rtt.Open=Orr()});var a8i,vcn,bcn,Mrr,Yee,Frr,Brr,Wrr,jrr,zrr=Ct(()=>{"use strict";a8i=jo(CKn(),1);JJn();vcn=jo($Yn(),1),bcn=jo(XQn(),1),Mrr=jo(Lrr(),1),Yee=require("node:fs/promises"),Frr=async(t,e)=>{await(0,Yee.access)(t,Yee.constants.F_OK).catch(()=>{throw new Error(`[Archiver]: source ${t} does not exist`)}),await(0,Yee.access)(e,Yee.constants.F_OK).catch(()=>(0,Yee.mkdir)(e,{recursive:!0}))},Brr=async(t,e)=>(await Frr(t,e),vcn.x({file:t,cwd:e})),Wrr=async(t,e)=>(await Frr(t,e),await Mrr.default.Open.file(t).then(n=>n.extract({path:e,concurrency:5})),e),jrr=async t=>{let e=bcn.pack();for(let{name:s,data:o}of Object.values(t))e.entry({name:s},o);e.finalize();let n=[];return e.on("data",s=>n.push(s)),await new Promise((s,o)=>{e.on("end",s),e.on("error",o)}),Buffer.from(KJn.gzip(Buffer.concat(n)))}});async function Qee(t){let{source:e,throwOnNotFound:n=!1}=t,i=await(0,Grr.readFile)((0,Urr.join)(e,".codemodrc.json"),{encoding:"utf-8"}).catch(()=>null);if(i===null){let o=`Could not locate the .codemodrc.json file at ${e}`;if(n)throw new Error(o);return{config:null,error:o}}let s;try{s=Eme(JSON.parse(i))}catch{let f=`Failed to parse the .codemodrc.json file at ${e}`;if(n)throw new Error(f);return{config:null,error:f}}return{config:s,error:null}}async function xle(t){let{source:e,throwOnNotFound:n}=t,{config:i,error:s}=await Qee({source:e,throwOnNotFound:!1});if(i===null){if(n)throw new Error(s);return{path:null,error:s}}let o;switch(i.engine){case"ast-grep":o="**/rule.yaml";break;default:o="src/index.{ts,js}";break}let f=i.entry?`Make sure the entry point path under ${tb("entry")} key is correct in .codemodrc.json`:`Could not find an entry point under ${tb(o)}. Either create it or provide a path at ${tb("entry")} key in .codemodrc.json`,_=(await n3(i.entry??o,{absolute:!0,cwd:e,nodir:!0})).at(0)??null;if(_===null){if(n)throw new Error(f);return{path:null,error:f}}return{path:_,error:null}}var Grr,Urr,Vrr=Ct(()=>{"use strict";Grr=require("node:fs/promises"),Urr=require("node:path");wme();SQe();i1t()});var qrr=Ct(()=>{"use strict"});var Hrr=Ct(()=>{"use strict"});var Krr=Ct(()=>{"use strict"});var Jrr,$rr,OC,Xrr,Ecn=Ct(()=>{"use strict";Jrr=require("node:child_process"),$rr=require("node:util"),OC=(0,$rr.promisify)(Jrr.exec),Xrr=async t=>{let e=t(),{done:n}=await e.next();return n}});async function QEt(t,e=!1){let n=null,i=null;try{let{stdout:o}=await OC("git rev-parse --show-toplevel",{cwd:t}),f=o.trim();if(f.length&&(i=f,e))return{rootPath:i}}catch{}if(i===null){let o=t;for(;;){try{await(0,cJ.access)((0,iAe.join)(o,".git"),cJ.constants.R_OK|cJ.constants.W_OK);let h=(0,iAe.join)(o,"package.json");await(0,cJ.access)(h,cJ.constants.R_OK|cJ.constants.W_OK),i=o}catch{}if(i){if(e)return{rootPath:i};break}let f=(0,iAe.dirname)(o);if(f===o)break;o=f}}let s=t;for(;;){for(let f of Object.keys(Yrr))try{await(0,cJ.access)((0,iAe.join)(s,f),cJ.constants.R_OK|cJ.constants.W_OK),n=Yrr[f],i===null&&(i=s);break}catch{}if(i){if(e)return{rootPath:i};break}let o=(0,iAe.dirname)(s);if(o===s)break;s=o}return{rootPath:i,detectedPackageManager:n}}var cJ,iAe,Yrr,Qrr=Ct(()=>{"use strict";cJ=require("node:fs/promises"),iAe=require("node:path");Ecn();Yrr={"package-lock.json":"npm","yarn.lock":"yarn","pnpm-lock.yaml":"pnpm","bun.lockb":"bun"}});var o8i,itt,Zrr,Scn=Ct(()=>{"use strict";lR();o8i=O_({engine:Lf("jscodeshift"),parser:Py([Lf("babel"),Lf("babylon"),Lf("flow"),Lf("ts"),Lf("tsx")])}),itt=Py([o8i]),Zrr=t=>{let e=oR(itt,t);return e.success?e.output:null}});var eir,Tcn,Dcn,tir,Acn,nir,stt,sAe,rir,iir=Ct(()=>{"use strict";lR();a1t();SQe();Scn();eir=O_({$schema:Zd(ep()),path:ep(),source:Py([Lf("local"),Lf("remote")]),type:Py([Lf("standalone"),Lf("package")]),safeArgumentRecord:Zd(s1t,{}),engineOptions:Zd(rQe(itt),null)}),Tcn=O_({...eir.entries,...O_({config:mtn}).entries}),Dcn=O_({...eir.entries,...O_({config:_tn,codemods:Zd(_I(Tcn),[])}).entries}),tir=Py([Tcn,Dcn]),Acn=t=>oR(Tcn,t),nir=t=>oR(Dcn,t),stt=t=>Een(Dcn,t),sAe=t=>eL(tir,t),rir=t=>oR(tir,t)});var sir=Ct(()=>{"use strict"});var cWa,uWa,air=Ct(()=>{"use strict";lR();cWa=O_({codemodSource:ep(),codemodEngine:Py([Lf("jscodeshift"),Lf("ts-morph"),Lf("workflow")]),codemodArguments:Zd(ep()),repoUrl:Zd(ep()),branch:Zd(ep()),persistent:Zd(M2())}),uWa=O_({jobId:ep()})});var yR=Ct(()=>{"use strict";IBn();Gjn();YHn();zrr();Vrr();qrr();Hrr();i1t();Krr();Ecn();Qrr();$en();a1t();SQe();iir();Scn();sir();air()});var l8i,oir,lir=Ct(()=>{"use strict";lR();yR();l8i=Py([O_({kind:Lf("initialization"),path:ep(),codemodSource:ep(),engine:Py([Lf("jscodeshift"),Lf("ts-morph"),Lf("ast-grep"),Lf("workflow")]),format:M2(),safeArgumentRecord:s1t,engineOptions:rQe(itt)}),O_({kind:Lf("exit")}),O_({kind:Lf("runCodemod"),path:ep(),data:ep()})]),oir=t=>eL(l8i,t)});var cir=Ct(()=>{"use strict"});var c8i,uir,fir=Ct(()=>{"use strict";lR();Aen();c8i=Py([O_({kind:Lf("commands"),commands:Den(),path:Zd(ep())}),O_({kind:Lf("error"),message:ep(),path:Zd(ep())}),O_({kind:Lf("console"),consoleKind:wBn,message:ep()})]),uir=t=>eL(c8i,t)});var dA=Ct(()=>{"use strict";aR();f5n();xBn();TBn();Aen();lir();cir();fir()});var uJ,att=Ct(()=>{uJ="0.18.8"});var dir,pir,Ccn,fJ,wcn,HWa,ott=Ct(()=>{"use strict";dir=jo(require("node:os"),1),pir=require("node:path");dA();Ccn=process.stdout.write,fJ=(0,pir.join)(dir.homedir(),".codemod"),wcn=Ai.green("\u2714"),HWa=Ai.red("\u2716")});var Icn,j8e,Pcn,ZEt,eSt,Ncn=Ct(()=>{"use strict";Icn=jo(require("node:fs"),1),j8e=jo(require("node:os"),1),Pcn=require("node:path");dA();yR();att();ott();ZEt=(0,Pcn.join)(fJ,"logs"),eSt=async t=>{let{prefix:e,content:n,fatal:i}=t,s=(0,Pcn.join)(ZEt,`${i?"FATAL-":""}${new Date().toISOString()}-error.log`),o=`- CLI version: ${uJ}
|
|
678
678
|
- Node version: ${process.versions.node}
|
|
679
679
|
- OS: ${j8e.type()} ${j8e.release()} ${j8e.arch()}
|
|
680
680
|
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"imports": {
|
|
5
5
|
"#*": "./src/*"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.18.
|
|
7
|
+
"version": "0.18.8",
|
|
8
8
|
"description": "A codemod engine for Node.js libraries (jscodeshift, ts-morph, etc.)",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"exports": null,
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@codemod-com/api-types": "1.0.1",
|
|
64
64
|
"@codemod-com/filemod": "2.1.0",
|
|
65
65
|
"@codemod-com/printer": "1.0.1",
|
|
66
|
-
"@codemod-com/telemetry": "1.1.0",
|
|
67
66
|
"@codemod-com/runner": "1.3.8",
|
|
67
|
+
"@codemod-com/telemetry": "1.1.0",
|
|
68
68
|
"@codemod-com/utilities": "1.2.1"
|
|
69
69
|
},
|
|
70
70
|
"engines": {
|