titanfiber 1.0.114 → 1.0.115
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/build.min.js +1 -1
- package/build.pkg.js +1 -1
- package/cli.pkg.js +1 -1
- package/package.json +1 -1
- package/script.pkg.js +1 -1
package/build.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("./build.pkg.js"),args=t.env.parseArgs(),dir=globalThis.dir??".";try{packageJSON=t.node.loadPackageJSON(dir)}catch(a){console.warn("No package.json found in "+dir)}packageJSON&&(main=mainFile=packageJSON.main),require("./script.min.js");
|
|
1
|
+
require("./build.pkg.js"),args=t.env.parseArgs(),pause=t.node.pause,dir=globalThis.dir??".";try{packageJSON=t.node.loadPackageJSON(dir)}catch(a){console.warn("No package.json found in "+dir)}packageJSON&&(main=mainFile=packageJSON.main),require("./script.min.js");
|
package/build.pkg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var n=function(n){var e,r=!1;return function(){return r||(r=!0,e=n.apply(this,arguments)),e}},e=n((function(){return process.argv.slice(2)})),r=e,i=function(n){return"string"==typeof n},u=function(n){return class extends n{constructor(n,e){super(n,e);var r=this.constructor.name;r&&(this.name=r)}}},o=u(globalThis.Error),c=class extends o{constructor(n,e){super(n??"Not yet implemented",e)}},s=function(n){return"function"==typeof n},a=function(n,e,r,i){var u=n[e];if(void 0===u){var o=r;!1!==i&&s(o)&&(o=o(n,e)),n[e]=u=o}return u},l=function(n,e,r,i){return n||(n={}),a(n,e,r,i),n},f=function(n,e){return l(n,"fromFn",e,!1)},p=function(n,e){return new c(n,f(e,p))},h=function(){throw p()},v=function(n,e){return e<0?n.length+e:e},d=function(n,e,r,i){return e=null==e?0:v(n,e),r=null==r?n.length:v(n,r),i&&(0==i.inclusiveStart&&e++,i.inclusiveEnd&&r++),[e,r]},y=function(n,e,r,i){[r,i]=d(n,r,i);for(var u=r;u<i;u++){var o=e(n[u],u,n);void 0!==o&&(n[u]=o)}return n},g=function(n){h();for(var e=[],r=0,i=string.length,u=0;u<i;u++){var o=string[u];o===splitBy?(e.push(string.slice(r,u)),r=u+1):o===quoteChar&&string[u-1]}string=string.split(" "),y(quotes,(n=>n.slice(1,-1))),string=string.split(" "),y(quotes,(n=>n.slice(1,-1)))},m=function(n){for(var e,u=[],o=!1,c=(e=null==(a=n)?r():i(a)?g():a).length,s=0;s<c;s++){var a=e[s];if(!o){var l=a[0];let n;if("-"===l)if("-"===a[1]){if(2===a.length){o=!0;continue}n=2}else n=1;else"/"===l&&(n=1);if(n){var f,p,h=a.slice(n),v=h.indexOf("=");if(-1!==v)f=h.slice(0,v),p=h.slice(v+1);else{f=h;var d=e[s+1];null==d||"-"===d[0]?p=!0:(p=d,s++)}u[f]=p;continue}}u.push(a)}return u},b=m,w=b,O=w,E=n((function(){return"undefined"==typeof window})),j=function(n){return require("node:"+n)},x=function(e){return n((()=>j(e)))},F=x("path"),A=function(n,e){return null!=n&&n.constructor===e},S=A,I=function(n){return S(n,RegExp)},N=function(n){return n[n.length-1]},P=function(n){return A(n,Object)},T=function(n){return new Set(n)},k=function(n){var e={};if(n){var r=T(n);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},C=function(n){var e="";return n.global&&(e+="g"),(n.caseInsensitive||0==n.caseSensitive)&&(e+="i"),n.sticky&&(e+="y"),e},M=function(n,e){var r=k(n);return C(Object.assign(r,e))},L=function(n,e){var r=e,u=void 0;return i(r)?u=r:P(r)&&(u=M(n.flags,r)),new RegExp(n,u)},_=v,q=function(n,e,r){return n=L(n,{global:!0}),null!=r&&(e=_(r,e)),n.lastIndex=e,n},K=function(n){return Array.isArray(n)},J=function(n){return K(n)?n:[n]},z=function(n){return n instanceof Promise},B=function(n,e){var r=n;return z(r)?r.then(e):e(r)},D=function(n){return s(n)&&null==n.prototype},R=D,W=function(n){return function(){return n.apply(this,arguments)}},U=function(n,e){var r;return r=e?function(){this.super=e;var r=n.apply(this,arguments);return B(r,(()=>(delete this.super,r)))}:R(n)?W(n):n,r._isConstructor=!0,r},Y=function(n,e){return n._isConstructor?n:U(n,e)},$=function(){return this},G=function(n,e,r){var i=new o(n,r);return e&&Object.assign(i,e),i},H=function(n){var e=typeof n;return"object"!==e&&"function"!==e||null===n},V=function(n){return!H(n)},Q=function(n,e,r){return Object.defineProperty(n,e,{value:r,writable:!0,enumerable:!1,configurable:!0}),r},X=Q,Z=function(n,e){Object.defineProperty(n,"name",{value:e,configurable:!0}),X(n,"displayName",e)},nn=Z,en=function(n,e){return Object.assign(n,e)},tn=E()?require("util").inspect.custom:Symbol("Display"),rn=function(n,e){n.prototype[tn]=e},un=function(n,e,r,u,o,c){c||(c={}),i(e)&&(e=null);var s,a,l,f=r;if(f)if(K(f)){if([a,l]=f,a)if(K(a)){if(!e)throw G("Bare args array for instanceFn is only valid when extending a class.");var h=a;a=null,s=U((function(){this.super.apply(this,h)}),e)}else a=Y(a)}else s=Y(f,e);var v=c.bareFn;c.singleton&&(v=function(){return null==g.default&&(g.default=new g(...arguments)),g.default});var d,y=a||s||e||$;function g(){if(!new.target&&v&&!(this instanceof g))return v.apply(this,arguments);var n=this;return B(y.apply(n,arguments),(r=>{if(r&&V(r)&&(n=r,a)){if(!new.target)throw p('Prototype repair is NYI for class instantiation without "new".');if(!e)throw p("instanceFn is not yet supported when extendsClass is null.");var i=Object.getPrototypeOf(this);Object.getPrototypeOf(n)!==i&&Object.setPrototypeOf(n,i)}return l?B(l.apply(n,arguments),(()=>n)):n}))}return n&&nn(g,n),u?(d=u,e&&Object.setPrototypeOf(u,e.prototype)):d=e?Object.create(e.prototype):{},X(d,"constructor",g),g.prototype=d,o&&en(g,o),c.display&&rn(g,c.display),c.implements&&J(c.implements).forEach((n=>n(g))),g},on=function(n,e){Object.defineProperty(n,e,{enumerable:!1})},cn=on,sn=function(n,e,r,i,u){var o=Symbol();return un(n,Function,[function(){var n=function(){return n[o].apply(this,arguments)};return n},function(){var n=e.apply(this,arguments);if(!n)throw new Error("Constructor must return a function.");this[o]=n,cn(this,o)}],r,i,u)},an=function(n,e,r,i){var u=e;if([r,i]=d(n,r,i),s(u))for(var o=r;o<i;o++)n[o]=u(o,n);else n.fill(u,r,i);return n},ln=function(n,e){var r=new Array(n||0);return arguments.length>1&&an(r,e),r},fn=function(n,e){return ln(e.length,(r=>n[e[r]]))},pn=function(n,e){return n[e]},hn=function(n,e,r){return n[e]=r},vn=function(n,e,r){var i=n;return s(i)?i.apply(r,e):i},dn=function(n,e,r,i,u){i||(i=pn);var o=i(n,e);return void 0===o&&(o=vn(r,[n,e]),u||(u=hn),u(n,e,o)),o},yn=function(n,e){return n.get(e)},gn=function(n,e,r){return n.set(e,r)},mn=function(n,e,r){return dn(n,e,r,yn,gn)},bn=class{constructor(){this.store=new Map}get(n,e){return mn(this.store,n,e)}remove(n){return this.store.delete(n)}delete(n){return this.remove(n)}},wn=function(n,e){return n.push(e),n},On=wn,En=function(n){var e=n;return Array.isArray(e)?e:Array.from(e)},jn=Symbol("Value"),xn=function(){return{}},Fn=function(n){return[n.slice(0,-1),n[n.length-1]]},An=Fn,Sn=function(n,e,r,i,u,o){r||(r=pn),null==i&&(i=xn),null==u&&(u=hn),null==o&&(o=r);for(var[c,s]=An(e),a=n,l=c.length,f=0;f<l;f++){var p=c[f],h=r(a,p);if(void 0===h){if(!i)return;h=dn(a,p,i,r,u)}a=h}if(o)return o(a,s,u)},In=function(n,e,r,i,u,o){return Sn(n,e,i,u,o,((n,e)=>dn(n,e,r,i,o)))},Nn=function(){return new Map},Pn=function(n,e,r){return In(n,e,r,yn,Nn,gn)},Tn=function(n,e){return delete n[e],n},kn=function(n,e,r,i){return Sn(n,e,r,!1,!1,i||Tn)},Cn=function(n,e){return n.delete(e)},Mn=function(n,e){return kn(n,e,yn,Cn)},Ln=class{constructor(){this.store=new Map}get(n,e){return n=On(En(n),jn),Pn(this.store,n,e)}remove(n){return n=On(En(n),jn),Mn(this.store,n)}delete(n){return this.remove(n)}},_n=sn("MemoizedFunction",(function(n,e){if(this.base=n,null!=e)if(1===(e=J(e)).length){this.cache=new bn;var r=e[0];this._cacheKeyFormatter=n=>n[r]}else this.cache=new Ln,this._cacheKeyFormatter=n=>fn(n,e);else this.cache=new Ln,this._cacheKeyFormatter=n=>n;var i=this;return function(){var e=i._cacheKeyFormatter(arguments);return i.cache.get(e,(()=>n.apply(this,arguments)))}}),{remove(n){return this.cache.remove(this._cacheKeyFormatter(n))}}),qn=function(n,e){return new _n(n,e)},Kn=function(n,e){return L(n,n.flags+e)},Jn=function(n){return Kn(n,"g")},zn=qn((function(n){return n.global?n:Jn(n)}),0),Bn=function(n,e,r){return n=null!=r?q(n,r,e):zn(n),Array.from(e.matchAll(n))},Dn=function(n,e,r){return null!=r&&(e=e.slice(0,r)),N(Bn(n,e))||null},Rn=function(n,e){var r=Dn(n,e);return r&&e.length===r.index+r[0].length?r:null},Wn=u(globalThis.TypeError),Un=function(n){return null==n?n:n.constructor},Yn=x("util"),$n=function(n,e){return e||(e={}),null==e.colors&&(e.colors=!0),Yn().inspect(n,e)},Gn=v,Hn=function(n,e,r,i){return void 0!==e&&(null===e||0===e?e=void 0:(e=Gn(n,e),i&&0==i.inclusiveStart&&e++)),void 0!==r&&(null===r||r===n.length?r=void 0:(r=Gn(n,r),i&&i.inclusiveEnd&&r++)),[e,r]},Vn=function(n,e,r,i,u,o){if(r||null!=i){[r,i]=Hn(n,r,i,o);var c=n.slice(r,i),s=e(c);return u?u(s,r,i,c,n):s}return e(n)},Qn=function(n,e,r,i,u){return Vn(n,e,r,i,((e,r,i)=>(void 0!==r?n.slice(0,r):"")+(e||"")+(void 0!==i?n.slice(i):"")),u)},Xn=function(n){var e=n;return null==e?void 0:i(e)?e:C(e)},Zn=function(n,e){return new RegExp(n,Xn(e))},ne=function(n){return n.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},ee=function(n,e){return Zn(ne(n),e)},te=function(n,e,r,u,o,c){return Qn(n,(function(n){return n.replaceAll?(I(e)&&(e=zn(e)),n.replaceAll(e,r)):(e=i(e)?ee(e,"g"):zn(e),this.replace(e,r))}),u,o,c)},re=function(n,e,r){return te(n,e,(r??"\\")+e)},ie=function(n,e,r){return null==e&&(e='"'),!1!==r&&(n=re(n,e,r)),e+n+e},ue=function(n){return ie(n,'"')},oe=P,ce=function(n){return oe(n)?he(n):String(n)},se=function(n,e){return e||(e=ae),"["+n.reduce((function(n,r){return n+e(r)+", "}),"").slice(0,-2)+"]"},ae=function(n){return i(n)?ue(n):K(n)?se(n):ce(n)},le=function(n,e){return(e?Object.getOwnPropertyNames:Object.keys)(n)},fe=function(n,e,r){le(n,r).forEach(((r,i,u)=>e(r,n[r],i,u)))},pe=function(n,e,r,i){var u=null!=r?r:"";return fe(n,(function(){u=e.call(this,u,...arguments)}),i),u},he=function(n,e){return e||(e=ae),"{"+pe(n,(function(n,r,i){return n+r+":"+e(i)+", "}),"",!0).slice(0,-2)+"}"},ve=function(n,e){return null==e&&(e=1),e<=0?"[object Object]":he(n,(n=>ye(n,e-1)))},de=function(n,e){return null==e&&(e=1),e<=0?"[object Array]":se(n,(n=>ye(n,e-1)))},ye=function(n,e){return void 0===n?"undefined":null===n?"null":E()?$n(n,e):P(n)?ve(n,maxNumLevels):K(n)?de(n,maxNumLevels):ce(n)},ge=function(n,e,r,i){if(0===arguments.length)return new Wn("Unexpected type received");i||(i={});var u,{type:o,expected:c}=i;return null==o&&(o=Un(n)),o&&o.name&&(o=o.name),c?(c.name&&(c=c.name),u="Expected "+c+", received "):u="Unexpected type received (",u+=o,null!=n&&(u+=" ("+ye(n)+")"),c||(u+=")"),r&&(u+=' for "'+r+'"'),null!=e&&(u+=" (index "+e+")"),i.fromFn||(i.fromFn=ge),new Wn(u,i)},me=function(n,e){if(i(e))return n.endsWith(n);if(I(e))return!!Rn(e,n);throw ge(e,1,"matchThis")},be=/\/|\\/,we=function(n){return me(n,be)?n:n+"/"},Oe=function(n,e,r){if(E()){var i=F().join(n,e);return r?we(i):i}throw p()},Ee=x("fs"),je=function(n){return!!Ee().lstatSync(n,{throwIfNoEntry:!1})},xe=function(n){return Ee().readFileSync(n,"utf8")},Fe=xe,Ae=function(n){return JSON.parse(Fe(n))},Se={env:{parseArgs:O,args:r},node:{parseArgs:w,args:e,loadPackageJSON:function(n){var e=n??"./";return e.endsWith("package.json")||(e=Oe(e,"package.json")),je(e)?Ae(e):{}},is:E,path:F,_builtInModule:x,requireBuiltIn:j,display:$n,util:Yn,fs:Ee},shell:{parseArgs:b},cli:{parseArgs:m,splitArgs:g},f:{one:n,is:s,memoize:qn,MemoizedFunction:_n,createClass:sn,createConstructor:U,isArrowFn:R,isArrow:D,wrap:W,ensureConstructor:Y,retThis:$,setName:Z},s:{is:i,dfaParse:h,endsWith:me,chars:T,resolveIndex:_,toLiteral:ue,quote:ie,escape:re,replaceAll:te,apply:Qn,withIndices:Vn,from:ce},err:{nyi:p,NYIError:c,Error:o,Enhanced:u,defaultFromFn:f,create:G,type:ge,TypeError:Wn},o:{safeEnsure:l,ensure:a,constructorMatches:S,is:P,isAny:V,setHidden:X,addNonEnumerable:Q,hideKey:cn,makeNonEnumerable:on,ensureCustom:dn,get:pn,set:hn,createEmpty:xn,remove:Tn,display:ve,toLiteral:he,isPure:oe,reduce:pe,each:fe,keys:le},a:{apply:y,resolveIndices:d,resolveIndex:v,last:N,is:K,ensure:J,pick:fn,create:ln,fill:an,push:On,add:wn,splitLast:An,splitTail:Fn,wrapIndices:Hn,wrapIndex:Gn,toLiteral:se,display:de},path:{join:Oe,ensureTrailingSlash:we},macro:{config:function(n){}},re:{is:I,matchEnd:Rn,matchLast:Dn,matchAll:Bn,setStartIndex:q,copy:L,updateFlagString:M,parseFlagString:k,createFlagString:C,ensureGlobal:zn,global:Jn,addFlag:Kn,createEscaped:ee,create:Zn,resolveFlags:Xn,escape:ne,slash:be},v:{constructorMatches:A,isPrimitive:H,resolve:vn,type:Un,display:ye,toLiteral:ae},class:{create:un,setName:nn,addStatics:en,setDisplay:rn},p:{asyncJoint:B,is:z},sym:{display:tn,value:jn},map:{Cache:bn,ensure:mn,get:yn,set:gn,MultiCache:Ln,diveEnsure:Pn,createEmpty:Nn,diveDelete:Mn,remove:Cn},args:{ensureArray:En},tree:{ensure:In,dive:Sn,remove:kn},fs:{exists:je,loadJSON:Ae,loadText:Fe,load:xe}};globalThis.t?Object.keys(Se).forEach((function(n){if(t[n]){var e=Se[n];Object.keys(e).forEach((function(r){t[n][r]=e[r]}))}else t[n]=Se[n]})):globalThis.t=Object.assign({},Se),globalThis.exports&&(exports.default=globalThis.t);
|
|
1
|
+
var e=function(e){var n,r=!1;return function(){return r||(r=!0,n=e.apply(this,arguments)),n}},n=e((function(){return process.argv.slice(2)})),r=n,u=function(e){return"string"==typeof e},i=function(e){const n=[];let r="",u="outside",i=!1;for(let o=0;o<e.length;o++){const s=e[o];switch(u){case"outside":'"'===s?i?(r+=s,i=!1):u="insideQuote":"\\"===s?i=!0:" "===s?(r.length>0&&(n.push(r),r=""),i=!1):(r+=s,i=!1);break;case"insideQuote":'"'!==s||i?"\\"!==s||i?(r+=s,i=!1):i=!0:u="outside"}}return r.length>0&&n.push(r),n},o=function(e){for(var n,o=[],s=!1,c=(n=null==(a=e)?r():u(a)?i(a):a).length,l=0;l<c;l++){var a=n[l];if(!s){var f=a[0];let e;if("-"===f)if("-"===a[1]){if(2===a.length){s=!0;continue}e=2}else e=1;else"/"===f&&(e=1);if(e){var p,d,h=a.slice(e),v=h.indexOf("=");if(-1!==v)p=h.slice(0,v),d=h.slice(v+1);else{p=h;var m=n[l+1];null==m||"-"===m[0]?d=!0:(d=m,l++)}o[p]=d;continue}}o.push(a)}return o},s=o,c=s,l=c,a=function(e){return require(e)},f=function(e){return!!e.startsWith("node:")||a("node:module").isBuiltin(e)},p=function(e){return e.startsWith(".")},d=function(e){return Array.isArray(e)},h=function(e){return class extends e{constructor(e,n){super(e,n);var r=this.constructor.name;r&&(this.name=r)}}},v=h(globalThis.Error),m=class extends v{constructor(e,n){super(e??"Unexpected value",n)}},g=e((function(){return"undefined"==typeof window})),y=function(e){return require("node:"+e)},w=function(n){return e((()=>y(n)))},b=w("util"),x=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),b().inspect(e,n)},E=function(e,n){return null!=e&&e.constructor===n},F=function(e){return E(e,Object)},A=function(e,n){return n<0?e.length+n:n},O=A,S=function(e,n,r,u){return void 0!==n&&(null===n||0===n?n=void 0:(n=O(e,n),u&&0==u.inclusiveStart&&n++)),void 0!==r&&(null===r||r===e.length?r=void 0:(r=O(e,r),u&&u.inclusiveEnd&&r++)),[n,r]},_=function(e,n,r,u,i,o){if(r||null!=u){[r,u]=S(e,r,u,o);var s=e.slice(r,u),c=n(s);return i?i(c,r,u,s,e):c}return n(e)},I=function(e,n,r,u,i){return _(e,n,r,u,((n,r,u)=>(void 0!==r?e.slice(0,r):"")+(n||"")+(void 0!==u?e.slice(u):"")),i)},j=E,k=function(e){return j(e,RegExp)},N=function(e){return d(e)?e:[e]},q=function(e){return e instanceof Promise},T=function(e,n){var r=e;return q(r)?r.then(n):n(r)},C=function(e){return"function"==typeof e},R=function(e){return C(e)&&null==e.prototype},M=R,P=function(e){return function(){return e.apply(this,arguments)}},L=function(e,n){var r;return r=n?function(){this.super=n;var r=e.apply(this,arguments);return T(r,(()=>(delete this.super,r)))}:M(e)?P(e):e,r._isConstructor=!0,r},D=function(e,n){return e._isConstructor?e:L(e,n)},W=function(){return this},K=function(e,n,r){var u=new v(e,r);return n&&Object.assign(u,n),u},B=class extends v{constructor(e,n){super(e??"Not yet implemented",n)}},U=function(e,n,r,u){var i=e[n];if(void 0===i){var o=r;!1!==u&&C(o)&&(o=o(e,n)),e[n]=i=o}return i},Y=function(e,n,r,u){return e||(e={}),U(e,n,r,u),e},z=function(e,n){return Y(e,"fromFn",n,!1)},J=function(e,n){return new B(e,z(n,J))},G=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},Q=function(e){return!G(e)},V=function(e,n,r){return Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!1,configurable:!0}),r},$=V,H=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),$(e,"displayName",n)},X=H,Z=function(e,n){return Object.assign(e,n)},ee=g()?require("util").inspect.custom:Symbol("Display"),ne=function(e,n){e.prototype[ee]=n},re=function(e,n,r,i,o,s){s||(s={}),u(n)&&(n=null);var c,l,a,f=r;if(f)if(d(f)){if([l,a]=f,l)if(d(l)){if(!n)throw K("Bare args array for instanceFn is only valid when extending a class.");var p=l;l=null,c=L((function(){this.super.apply(this,p)}),n)}else l=D(l)}else c=D(f,n);var h=s.bareFn;s.singleton&&(h=function(){return null==g.default&&(g.default=new g(...arguments)),g.default});var v,m=l||c||n||W;function g(){if(!new.target&&h&&!(this instanceof g))return h.apply(this,arguments);var e=this;return T(m.apply(e,arguments),(r=>{if(r&&Q(r)&&(e=r,l)){if(!new.target)throw J('Prototype repair is NYI for class instantiation without "new".');if(!n)throw J("instanceFn is not yet supported when extendsClass is null.");var u=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==u&&Object.setPrototypeOf(e,u)}return a?T(a.apply(e,arguments),(()=>e)):e}))}return e&&X(g,e),i?(v=i,n&&Object.setPrototypeOf(i,n.prototype)):v=n?Object.create(n.prototype):{},$(v,"constructor",g),g.prototype=v,o&&Z(g,o),s.display&&ne(g,s.display),s.implements&&N(s.implements).forEach((e=>e(g))),g},te=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},ue=te,ie=function(e,n,r,u,i){var o=Symbol();return re(e,Function,[function(){var e=function(){return e[o].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[o]=e,ue(this,o)}],r,u,i)},oe=function(e,n,r,u){return n=null==n?0:A(e,n),r=null==r?e.length:A(e,r),u&&(0==u.inclusiveStart&&n++,u.inclusiveEnd&&r++),[n,r]},se=function(e,n,r,u){var i=n;if([r,u]=oe(e,r,u),C(i))for(var o=r;o<u;o++)e[o]=i(o,e);else e.fill(i,r,u);return e},ce=function(e,n){var r=new Array(e||0);return arguments.length>1&&se(r,n),r},le=function(e,n){return ce(n.length,(r=>e[n[r]]))},ae=function(e,n){return e[n]},fe=function(e,n,r){return e[n]=r},pe=function(e,n,r){var u=e;return C(u)?u.apply(r,n):u},de=function(e,n,r,u,i){u||(u=ae);var o=u(e,n);return void 0===o&&(o=pe(r,[e,n]),i||(i=fe),i(e,n,o)),o},he=function(e,n){return e.get(n)},ve=function(e,n,r){return e.set(n,r)},me=function(e,n,r){return de(e,n,r,he,ve)},ge=class{constructor(){this.store=new Map}get(e,n){return me(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},ye=function(e,n){return e.push(n),e},we=ye,be=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},xe=Symbol("Value"),Ee=function(){return{}},Fe=function(e){return[e.slice(0,-1),e[e.length-1]]},Ae=Fe,Oe=function(e,n,r,u,i,o){r||(r=ae),null==u&&(u=Ee),null==i&&(i=fe),null==o&&(o=r);for(var[s,c]=Ae(n),l=e,a=s.length,f=0;f<a;f++){var p=s[f],d=r(l,p);if(void 0===d){if(!u)return;d=de(l,p,u,r,i)}l=d}if(o)return o(l,c,i)},Se=function(e,n,r,u,i,o){return Oe(e,n,u,i,o,((e,n)=>de(e,n,r,u,o)))},_e=function(){return new Map},Ie=function(e,n,r){return Se(e,n,r,he,_e,ve)},je=function(e,n){return delete e[n],e},ke=function(e,n,r,u){return Oe(e,n,r,!1,!1,u||je)},Ne=function(e,n){return e.delete(n)},qe=function(e,n){return ke(e,n,he,Ne)},Te=class{constructor(){this.store=new Map}get(e,n){return e=we(be(e),xe),Ie(this.store,e,n)}remove(e){return e=we(be(e),xe),qe(this.store,e)}delete(e){return this.remove(e)}},Ce=ie("MemoizedFunction",(function(e,n){if(this.base=e,null!=n)if(1===(n=N(n)).length){this.cache=new ge;var r=n[0];this._cacheKeyFormatter=e=>e[r]}else this.cache=new Te,this._cacheKeyFormatter=e=>le(e,n);else this.cache=new Te,this._cacheKeyFormatter=e=>e;var u=this;return function(){var n=u._cacheKeyFormatter(arguments);return u.cache.get(n,(()=>e.apply(this,arguments)))}}),{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),Re=function(e,n){return new Ce(e,n)},Me=function(e){return new Set(e)},Pe=function(e){var n={};if(e){var r=Me(e);r.has("g")&&(n.global=!0),r.has("i")&&(n.caseInsensitive=!0),r.has("y")&&(n.sticky=!0)}return n},Le=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},De=function(e,n){var r=Pe(e);return Le(Object.assign(r,n))},We=function(e,n){var r=n,i=void 0;return u(r)?i=r:F(r)&&(i=De(e.flags,r)),new RegExp(e,i)},Ke=function(e,n){return We(e,e.flags+n)},Be=function(e){return Ke(e,"g")},Ue=Re((function(e){return e.global?e:Be(e)}),0),Ye=function(e){var n=e;return null==n?void 0:u(n)?n:Le(n)},ze=function(e,n){return new RegExp(e,Ye(n))},Je=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},Ge=function(e,n){return ze(Je(e),n)},Qe=function(e,n,r,i,o,s){return I(e,(function(e){return e.replaceAll?(k(n)&&(n=Ue(n)),e.replaceAll(n,r)):(n=u(n)?Ge(n,"g"):Ue(n),this.replace(n,r))}),i,o,s)},Ve=function(e,n,r){return Qe(e,n,(r??"\\")+n)},$e=function(e,n,r){return null==n&&(n='"'),!1!==r&&(e=Ve(e,n,r)),n+e+n},He=function(e){return $e(e,'"')},Xe=F,Ze=function(e){return Xe(e)?sn(e):String(e)},en=function(e,n){return n||(n=nn),"["+e.reduce((function(e,r){return e+n(r)+", "}),"").slice(0,-2)+"]"},nn=function(e){return u(e)?He(e):d(e)?en(e):Ze(e)},rn=function(e){return Reflect.ownKeys(e)},tn=function(e,n){return(n?rn:Object.keys)(e)},un=function(e,n,r){tn(e,r).forEach(((r,u,i)=>n(r,e[r],u,i)))},on=function(e,n,r,u){var i=null!=r?r:"";return un(e,(function(){i=n.call(this,i,...arguments)}),u),i},sn=function(e,n){return n||(n=nn),"{"+on(e,(function(e,r,u){return e+r+":"+n(u)+", "}),"",!0).slice(0,-2)+"}"},cn=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":sn(e,(e=>an(e,n-1)))},ln=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":en(e,(e=>an(e,n-1)))},an=function(e,n){return void 0===e?"undefined":null===e?"null":g()?x(e,n):F(e)?cn(e,maxNumLevels):d(e)?ln(e,maxNumLevels):Ze(e)},fn=function(e,n,r,u){if(0===arguments.length)return new m("Unexpected value received");u||(u={});var i,{expected:o}=u;return i=o?"Received "+an(e)+", expected one of "+an(o):"Unexpected value received: "+an(e),r&&(i+=' for "'+r+'"'),null!=n&&(i+=" (index "+n+")"),u.fromFn||(u.fromFn=fn),new m(i,u)},pn=h(globalThis.TypeError),dn=function(e){return null==e?e:e.constructor},hn=function(e,n,r,u){if(0===arguments.length)return new pn("Unexpected type received");u||(u={});var i,{type:o,expected:s}=u;return null==o&&(o=dn(e)),o&&o.name&&(o=o.name),s?(s.name&&(s=s.name),i="Expected "+s+", received "):i="Unexpected type received (",i+=o,null!=e&&(i+=" ("+an(e)+")"),s||(i+=")"),r&&(i+=' for "'+r+'"'),null!=n&&(i+=" (index "+n+")"),u.fromFn||(u.fromFn=hn),new pn(i,u)},vn=function(e){var n=e.stdio;if(n){if(!d(n)){if(!u(n))throw hn(n,"stdio");if("pipe"===n)n=["pipe","pipe","pipe"];else if("inherit"===n)n=["inherit","inherit","inherit"];else if("ignore"===n)n=["ignore","ignore","ignore"];else{if("overlapped"!==n)throw fn(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},mn=function(e,n){var r=n.length;e.length=r;for(var u=0;u<r;u++)e[u]=n[u];return e},gn=function(e){return function(){return!e.apply(this,arguments)}},yn=function(e,n){return mn(e,e.filter(gn(n)))},wn=function(e){return yn(e,(e=>null==e))},bn=w("child_process"),xn=e((function(){return"win32"===process.platform})),En=function(e,n,r){if(r||(r={}),n(e))throw e;if(r.nullOnErr&&(r.err=null),void 0!==r.err)return r.err;if(r.onErr)return r.onErr(e,e.stderr);throw e},Fn=function(e,n,r){r||(r={}),r.dir&&(r.cwd=r.dir);var u=vn(r);if(null==u[0]){var i=r.allowInput,o=r.input;if(i&&o)throw K("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");i&&(u[0]="inherit")}if(null==u[1]){var s=r.captureOutput??!1,c=r.showOutput;if(s&&c)throw K("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");s?u[1]="pipe":(null==c&&(c=!0),u[1]=c?"inherit":"ignore")}if(null==u[2]){var l=r.captureErr??!1,a=r.showErr;if(l&&a)throw K("captureErr and showErr cannot be used simultaneously for synchronous child processes.");l?u[2]="pipe":(null==a&&(a=!0),u[2]=a?"inherit":"ignore")}r.encoding||(r.encoding="utf8"),n&&wn(n);try{var f=bn().execFileSync(e,n,r);null!=f&&(f=f.trim());var p=r.map??r.mapFn;return p&&(f=p(f)),f}catch(e){if(xn())return En(e,(e=>"ENOENT"===e.code),r);throw e}},An=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,Fn("npm",e,n)},On=function(e,n,r){return An(["install",e,n?"-g":null],r)},Sn=w("path"),_n=function(e,n){var r=Sn().resolve;return n?r(n,e):r(e)},In=function(e){return require(_n(e))},jn=class{constructor(){this.store={}}get(e,n){return U(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},kn=new jn,Nn=w("module"),qn=function(e){return e.endsWith("\\node_modules")||(e+="\\node_modules"),Nn().createRequire(e)},Tn=function(e,n){return kn.get(e,(()=>qn(e)))(n)},Cn=function(e,n,r){return Object.keys(n).forEach((u=>U(e,u,n[u],r))),e},Rn=function(e,n,r){return n?Cn(e,n,r):e},Mn=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},Pn=function(e){return e[e.length-1]},Ln=A,Dn=function(e,n,r){return e=We(e,{global:!0}),null!=r&&(n=Ln(r,n)),e.lastIndex=n,e},Wn=function(e,n,r){return e=null!=r?Dn(e,r,n):Ue(e),Array.from(n.matchAll(e))},Kn=function(e,n,r){return null!=r&&(n=n.slice(0,r)),Pn(Wn(e,n))||null},Bn=function(e,n){var r=Kn(e,n);return r&&n.length===r.index+r[0].length?r:null},Un=function(e,n){var r=Bn(n,e);return r?e.slice(0,r.index):e},Yn=function(e,n){if(u(n))return Mn(e,n);if(k(n))return Un(e,n);throw hn(n,1)},zn=Yn,Jn=function(e,n){return[e.slice(0,n),e.slice(n)]},Gn=function(e){e=zn(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Jn(e,n+1)},Qn=function(e,n){return e.startsWith(n)?e:n+e},Vn=function(e){var[n,r]=Gn(e);return n+Qn(r.trim(),"return ")},$n=function(e){return vt("node-repl-await").processTopLevelAwait(e)},Hn=function(e){return $n(e)??e},Xn=Qe,Zn=function(e,n){if(u(n))return e.endsWith(e);if(k(n))return!!Bn(n,e);throw hn(n,1,"matchThis")},er=/\/|\\/,nr=function(e){return Zn(e,er)?e:e+"/"},rr=function(e,n){return""===e?e:(null==n&&(n=!0),e=Xn(e,"\\","/"),n?nr(e):e)},tr=function(){return process.mainModule?.filename??null},ur=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},ir=function(e){return e.split(".")[0]},or=function(e){return Sn().win32.basename(e)},sr=function(e){return ir(or(e))},cr=function(e,n,r,u){e||(e=tr()??"_console.js");var i=ur(sr(e));return n&&(i+="_repl"),i+(r&&u?.dynamic?".dypkg.json":".pkg.js")},lr=function(e,n){return e=Sn().dirname(e),!1===n?e:nr(e)},ar=function(e,n,r,u){var i,o=cr(e,n,r,u);return i=e?lr(e):"./",_n(i+o)},fr=function(e){return'require("'+rr(ar(),!1)+'");\n'+e},pr=function(e,n){return Qe(e,n,"")},dr=function(e,n){return n.forEach((n=>e=pr(e,n))),e},hr=function(e){return dr(e,["\r","\n"])},vr=function(e,n){return vt("astring").generate(e,n)},mr=function(e,n){return e.stack=n+"\n"+e.stack,e},gr=function(e,n,r){r||(r={}),!1!==n&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0);var u=vt("acorn-node");try{return u.parse(e,r)}catch(n){throw mr(n,"Acorn parsing error: "+e)}},yr=function(e,n,r){return vr(gr(e,n,r))},wr=function(e){return hr(yr(e))},br=function(e,n,r){return(n||r)&&(n||(n={}),r&&Rn(n,r),n.ensureReturn&&(e=Vn(e)),n.topLevelAwait&&(e=Hn(e)),n.useTitan&&(e=fr(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=wr(e))),e},xr=function(e){return u(e)?e:Ze(e)},Er=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},Fr=function(e,n,r,u,i){return _(e,n,r,u,((n,r)=>null===n?null:(n.input=e,void 0!==r&&(n.index+=r),n)),i)},Ar=function(e,n){return e.splice(e.length,0,...n),n},Or=function(e,n){return Ar(e,n),e},Sr=Or,_r=class extends Array{constructor(e,n,r,u,i){if(-1===n)throw K("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw K("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,u&&Sr(this,u),this.index=n,this.input=r,i&&(this.groups=i)}fromParts(e){var n=e;return new _r(n.match,n.index,n.input,n.captures,n.groups)}},Ir=function(e,n,r,u,i){return new _r(e,n,r,u,i)},jr=function(e,n,r,u,i){return-1===n||null==e?null:Ir(e,n,r,u,i)},kr=pr,Nr=function(e,n){return We(e,kr(e.flags,n))},qr=function(e){return Nr(e,"g")},Tr=Re((function(e){return e.global?qr(e):e}),0),Cr=function(e,n,r){return(e=null!=r?Dn(e,r,n):Tr(e)).exec(n)},Rr=function(e,n,r,i,o){return Fr(e,(e=>{if(u(n)){var r=e.indexOf(n);return jr(n,r,e)}return Cr(n,e)}),r,i,o)},Mr=function(e){return e.index+e[0].length},Pr=function(e,n){var r=Rr(e,n);return null===r[0]?null:e.slice(Mr(r))},Lr=function(e,n){return e.startsWith(n)?e.substring(n.length):e},Dr=function(e,n){var r=Cr(e,n);return r&&0===r.index?r:null},Wr=function(e,n){var r=Dr(n,e);return r?e.slice(r[0].length):e},Kr=function(e,n){if(u(n))return Lr(e,n);if(k(n))return Wr(e,n);throw hn(n,1)},Br=Kr,Ur=function(e){var n=Pr(e,"=>").trim();return Br(zn(n,"}"),"{")},Yr=function(e){return Pr(e,"{").slice(0,-1)},zr=function(e){var n=xr(e);return Er(n)?Ur(n):Yr(n)},Jr=function(e){return null==e?"":u(e)?e:C(e)?zr(e):String(e)},Gr=function(e,n){var r=n?.basic?null:{topLevelAwait:!0,useTitan:!0},u=br(Jr(e),n,r);return Fn("node",["-e",u],n)},Qr=function(e,n,r,u){var i="Required argument";return r&&(i+=' "'+r+'"'),null!=n&&(i+=" (index "+n+")"),i+=" missing",arguments.length>0&&(i+=" (received "+an(e)+")"),K(i,null,z(u,Qr))},Vr=function(e,n,r){if(null==e)throw Qr(e,n,r,{fromFn:Vr});return e},$r=function(e,n){return process.kill(e,Vr(n,0,"signalName"))},Hr=function(e){return $r(e,"SIGINT")},Xr=function(){return Hr(process.pid)},Zr=Xr,et=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw fn(e,0,"char")},nt=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=Gr((function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",(e=>{var r=e.toUpperCase();"Y"===r||"N"===r?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))}))}),{basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),Zr(),K("Prompt was cancelled via interrupt.");return console.log(n),et(n)},rt=function(e){return d(e)?e:u(e)?e.split("."):[e]},tt=function(e,n,r,u,i,o){var s=r;return Oe(e,n,u,i,o,((e,n,r)=>r(e,n,pe(s))))},ut=function(e,n){var r=n,u=globalThis.config;u||(u=globalThis.config={});var i,o=rt(e);return o.length>1?i=tt(u,o,r):(i=pe(r),u[o[0]]=i),i},it=function(e,n){return ut("node.require.customDirs",(r=>(r||(r=[]),!1!==n&&(e.endsWith("node_modules")||(e+="\\node_modules")),r.includes(e)||r.push(e),r))),e},ot=it,st=Oe,ct=function(e){var n=globalThis.config;if(n){var r=rt(e);return r.length>1?st(n,r):n[r[0]]}},lt=function(e,n,r){if(null!=e)return e;var u=ct(n);return null!=u?u:r},at=w("fs"),ft=function(e){return!!at().lstatSync(e,{throwIfNoEntry:!1})},pt=function(e){var n=lr(e,!1);return ft(n)||(n!==e&&pt(n),at().mkdirSync(n)),e},dt=function(e){return pt(e),at().mkdirSync(e),e},ht=function(e){return ft(e)?e:dt(e)},vt=function(e,n){if(f(e))return require(e);if(p(e))return In(e);try{return require(e)}catch(e){}var r=__dirname,u=process.mainModule?.path;if(u!==r)try{return Tn(u,e)}catch(e){}var i=process.cwd();if(i!==u&&i!==r)try{return Tn(i,e)}catch(e){}var o=ct("node.require.customDirs");if(o)for(var s of o)try{return Tn(s,e)}catch(e){}var c=lt(n?.autoInstall,"node.require.autoInstall"),l=lt(n?.promptInstall,"node.require.promptInstall",!0);if(c||l){var a=c||l;!0===a&&(a="./node_modules"),a=_n(a);var d=!1;if(c?(d=!0,console.log('Auto-installing "'+e+'" from npm to "'+a+'"...')):(d=nt('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+a+'"...'),d){a=ht(a),On(e,!1,{cwd:a});try{return ot(a),Tn(a,e)}catch(e){console.error("Failed to load from auto-install dir: ",a)}}}throw K('Module not found: "'+e+'"',{checked:{moduleDir:r,scriptDir:u,cwd:i}})},mt=function(e,n,r){if(g()){var u=Sn().join(e,n);return r?nr(u):u}throw J()},gt=function(e){return at().readFileSync(e,"utf8")},yt=gt,wt=function(e){return JSON.parse(yt(e))},bt={env:{parseArgs:l,args:r,setConfig:ut,getConfig:ct,resolveConfig:lt},node:{parseArgs:c,args:n,pause:function(e){vt("press-any-key-sync")(e)},require:vt,_basicRequire:a,is:g,display:x,util:b,_builtInModule:w,requireBuiltIn:y,child_process:bn,requireLocal:In,path:Sn,_requireFromDir:Tn,_requireDirCache:kn,_createRequire:qn,module:Nn,promptYNSync:nt,run:Gr,getScriptPath:tr,sigint:Zr,interrupt:Xr,ensureRequireDir:ot,addRequireDir:it,fs:at,loadPackageJSON:function(e){var n=e??"./";return n.endsWith("package.json")||(n=mt(n,"package.json")),ft(n)?wt(n):{}}},shell:{parseArgs:s,_handleError:En},cli:{parseArgs:o,splitArgs:i},f:{one:e,memoize:Re,MemoizedFunction:Ce,createClass:ie,createConstructor:L,isArrowFn:M,isArrow:R,is:C,wrap:P,ensureConstructor:D,retThis:W,setName:H,not:gn,body:zr,isArrowString:Er,_getArrowFnBody:Ur,_getNormalFnBody:Yr},s:{is:u,toLiteral:He,quote:$e,escape:Ve,replaceAll:Qe,apply:I,withIndices:_,chars:Me,from:Ze,removeTrailing:zn,removeFromEnd:Yn,_removeStringFromEnd:Mn,_removeRegexFromEnd:Un,resolveIndex:Ln,splitAtIndex:Jn,ensureStartsWith:Qn,replace:Xn,endsWith:Zn,decapitalize:ur,removeLineBreaks:hr,removeMulti:dr,removeAll:pr,resolve:Jr,ensure:xr,after:Pr,match:Rr,_matchWithIndices:Fr,remove:kr,removeLeading:Br,removeFromStart:Kr,_removeStringFromStart:Lr,_removeRegexFromStart:Wr},npm:{isBuiltIn:f,isFile:p,install:On,_runCommand:An},os:{run:Fn,_resolveStdio:vn},a:{is:d,wrapIndices:S,wrapIndex:O,resolveIndex:A,ensure:N,pick:le,create:ce,fill:se,resolveIndices:oe,push:we,add:ye,splitLast:Ae,splitTail:Fe,toLiteral:en,display:ln,removeNullish:wn,removeByFilter:yn,replaceContents:mn,last:Pn,pushMulti:Sr,addMulti:Or,pushThroughMulti:Ar},err:{value:fn,ValueError:m,Error:v,Enhanced:h,create:K,nyi:J,NYIError:B,defaultFromFn:z,type:hn,TypeError:pn,prepend:mr,req:Qr},v:{display:an,constructorMatches:E,toLiteral:nn,isPrimitive:G,resolve:pe,type:dn,req:Vr},macro:{config:function(e){}},o:{is:F,display:cn,toLiteral:sn,constructorMatches:j,safeEnsure:Y,ensure:U,isAny:Q,setHidden:$,addNonEnumerable:V,hideKey:ue,makeNonEnumerable:te,ensureCustom:de,get:ae,set:fe,createEmpty:Ee,remove:je,isPure:Xe,reduce:on,each:un,keys:tn,allKeys:rn,Cache:jn,setDefaults:Rn,ensureMulti:Cn,resolveKeys:rt,diveGet:st},re:{is:k,ensureGlobal:Ue,global:Be,addFlag:Ke,copy:We,updateFlagString:De,parseFlagString:Pe,createFlagString:Le,createEscaped:Ge,create:ze,resolveFlags:Ye,escape:Je,matchEnd:Bn,matchLast:Kn,matchAll:Wn,setStartIndex:Dn,slash:er,safeCreateResult:jr,createResult:Ir,RegexResult:_r,match:Cr,ensureLocal:Tr,local:qr,removeFlag:Nr,resultEndIndex:Mr,matchStart:Dr},class:{create:re,setName:X,addStatics:Z,setDisplay:ne},p:{asyncJoint:T,is:q},sym:{display:ee,value:xe},map:{Cache:ge,ensure:me,get:he,set:ve,MultiCache:Te,diveEnsure:Ie,createEmpty:_e,diveDelete:qe,remove:Ne},args:{ensureArray:be},tree:{ensure:Se,dive:Oe,remove:ke,setCustom:tt},win:{is:xn},path:{abs:_n,fws:rr,ensureTrailingSlash:nr,baseName:sr,_removeExtsFromFile:ir,file:or,dir:lr,join:mt},js:{enhance:br,ensureReturn:Vn,splitLastExpression:Gn,enableAwait:Hn,_nodeEnableAwait:$n,useTitan:fr,inline:wr,removeComments:yr,fromAST:vr,parse:gr},titan:{getPackagePath:ar,getPackageName:cr},proc:{interrupt:Hr,signal:$r},bool:{fromYN:et},fs:{ensureDir:ht,exists:ft,mkdir:dt,ensureParent:pt,loadJSON:wt,loadText:yt,load:gt}};globalThis.t?Object.keys(bt).forEach((function(e){if(t[e]){var n=bt[e];Object.keys(n).forEach((function(r){t[e][r]=n[r]}))}else t[e]=bt[e]})):globalThis.t=Object.assign({},bt),globalThis.exports&&(exports.default=globalThis.t);
|
package/cli.pkg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=function(e,n){return n(e)},n=function(e){return"string"==typeof e},r=function(e){return Array.isArray(e)},i=function(e){return r(e)?e:[e]},u=function(e){return e instanceof Promise},o=function(e,n){var r=e;return u(r)?r.then(n):n(r)},s=function(e){return"function"==typeof e},a=function(e){return s(e)&&null==e.prototype},l=a,c=function(e){return function(){return e.apply(this,arguments)}},f=function(e,n){var r;return r=n?function(){this.super=n;var r=e.apply(this,arguments);return o(r,(()=>(delete this.super,r)))}:l(e)?c(e):e,r._isConstructor=!0,r},h=function(e,n){return e._isConstructor?e:f(e,n)},p=function(){return this},d=function(e){return class extends e{constructor(e,n){super(e,n);var r=this.constructor.name;r&&(this.name=r)}}},v=d(globalThis.Error),m=function(e,n,r){var i=new v(e,r);return n&&Object.assign(i,n),i},y=class extends v{constructor(e,n){super(e??"Not yet implemented",n)}},g=function(e,n,r,i){var u=e[n];if(void 0===u){var o=r;!1!==i&&s(o)&&(o=o(e,n)),e[n]=u=o}return u},w=function(e,n,r,i){return e||(e={}),g(e,n,r,i),e},b=function(e,n){return w(e,"fromFn",n,!1)},E=function(e,n){return new y(e,b(n,E))},x=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},_=function(e){return!x(e)},k=function(e,n,r){return Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!1,configurable:!0}),r},L=k,O=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),L(e,"displayName",n)},F=O,T=function(e,n){return Object.assign(e,n)},A=function(e){var n,r=!1;return function(){return r||(r=!0,n=e.apply(this,arguments)),n}},S=A((function(){return"undefined"==typeof window})),C=S()?require("util").inspect.custom:Symbol("Display"),I=function(e,n){e.prototype[C]=n},j=function(e,u,s,a,l,c){c||(c={}),n(u)&&(u=null);var d,v,y,g=s;if(g)if(r(g)){if([v,y]=g,v)if(r(v)){if(!u)throw m("Bare args array for instanceFn is only valid when extending a class.");var w=v;v=null,d=f((function(){this.super.apply(this,w)}),u)}else v=h(v)}else d=h(g,u);var b=c.bareFn;c.singleton&&(b=function(){return null==O.default&&(O.default=new O(...arguments)),O.default});var x,k=v||d||u||p;function O(){if(!new.target&&b&&!(this instanceof O))return b.apply(this,arguments);var e=this;return o(k.apply(e,arguments),(n=>{if(n&&_(n)&&(e=n,v)){if(!new.target)throw E('Prototype repair is NYI for class instantiation without "new".');if(!u)throw E("instanceFn is not yet supported when extendsClass is null.");var r=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==r&&Object.setPrototypeOf(e,r)}return y?o(y.apply(e,arguments),(()=>e)):e}))}return e&&F(O,e),a?(x=a,u&&Object.setPrototypeOf(a,u.prototype)):x=u?Object.create(u.prototype):{},L(x,"constructor",O),O.prototype=x,l&&T(O,l),c.display&&I(O,c.display),c.implements&&i(c.implements).forEach((e=>e(O))),O},P=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},N=P,q=function(e,n,r,i,u){var o=Symbol();return j(e,Function,[function(){var e=function(){return e[o].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[o]=e,N(this,o)}],r,i,u)},R=function(e){return n=>n===e},M=function(e){return e instanceof Set},B=function(e){return M(e)?e:r(e)?new Set(e):new Set([e])},D=B,W=function(e,n){var r=[],i=[];return e.forEach(((u,o)=>(n(u,o,e)?r:i).push(u))),[r,i]},H=function(e,n,r){var i={};for(var u of n)Object.hasOwn(e,u)&&(i[u]=e[u],!0===r&&delete e[u]);return i},K=function(e,n,r){var i=n;if(s(i))throw E();var u=D(i),[o,a]=W(Object.keys(e),(e=>u.has(e)));return[H(e,o,r),!0===r?e:H(e,a,!1)]},U=function(e,n){var r=Object.keys(e).filter((r=>n(e[r],r,e)));return K(e,r,!1)},Y=function(e,n){return n<e?n:e},z=function(e,n){return Y(e,n)},V=function*(e,n){null==e&&(e=0),n=null==n?this.length:z(n,this.length);for(var r=e;r<n;r++)yield this[r]},G=function(e,n,r){return null==n&&null==r?e[Symbol.iterator].call(e):V.call(e,n,r)},J=function(e,n){return n<0?e.length+n:n},$=function(e,n,r,i){return n=null==n?0:J(e,n),r=null==r?e.length:J(e,r),i&&(0==i.inclusiveStart&&n++,i.inclusiveEnd&&r++),[n,r]},Q=function(e,n,r,i){[r,i]=$(e,r,i);for(var u=r;u<i;u++){var o=n(e[u],u,e);void 0!==o&&(e[u]=o)}return e},X=function(e,n){return(n?Object.getOwnPropertyNames:Object.keys)(e)},Z=function(e,n){return n?Q(X(e,n),(n=>[n,e[n]])):Object.entries(e)},ee=function(e){return G(Z(this,e))},te=function(e){return(e[Symbol.iterator]||ee).call(e)},ne=function(e,n){return null!=e&&e.constructor===n},re=function(e){return ne(e,Object)},ie=re,ue=function(e,n,r){Object.defineProperty(e,n,{get:r,enumerable:!0,configurable:!0})},oe=function(e,n,r){Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0})},se=function(e,n,r){ue(e,n,(function(){if(this===e)return null;var i=r.call(this);return oe(this,n,i),i}))},ae=class extends v{constructor(e,n){super(e??"Unexpected value",n)}},le=function(e){return require("node:"+e)},ce=function(e){return A((()=>le(e)))},fe=ce("util"),he=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),fe().inspect(e,n)},pe=J,de=function(e,n,r,i){return void 0!==n&&(null===n||0===n?n=void 0:(n=pe(e,n),i&&0==i.inclusiveStart&&n++)),void 0!==r&&(null===r||r===e.length?r=void 0:(r=pe(e,r),i&&i.inclusiveEnd&&r++)),[n,r]},ve=function(e,n,r,i,u,o){if(r||null!=i){[r,i]=de(e,r,i,o);var s=e.slice(r,i),a=n(s);return u?u(a,r,i,s,e):a}return n(e)},me=function(e,n,r,i,u){return ve(e,n,r,i,((n,r,i)=>(void 0!==r?e.slice(0,r):"")+(n||"")+(void 0!==i?e.slice(i):"")),u)},ye=ne,ge=function(e){return ye(e,RegExp)},we=function(e,n,r,i){var u=n;if([r,i]=$(e,r,i),s(u))for(var o=r;o<i;o++)e[o]=u(o,e);else e.fill(u,r,i);return e},be=function(e,n){var r=new Array(e||0);return arguments.length>1&&we(r,n),r},Ee=function(e,n){return be(n.length,(r=>e[n[r]]))},xe=function(e,n){return e[n]},_e=function(e,n,r){return e[n]=r},ke=function(e,n,r){var i=e;return s(i)?i.apply(r,n):i},Le=function(e,n,r,i,u){i||(i=xe);var o=i(e,n);return void 0===o&&(o=ke(r,[e,n]),u||(u=_e),u(e,n,o)),o},Oe=function(e,n){return e.get(n)},Fe=function(e,n,r){return e.set(n,r)},Te=function(e,n,r){return Le(e,n,r,Oe,Fe)},Ae=class{constructor(){this.store=new Map}get(e,n){return Te(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},Se=function(e,n){return e.push(n),e},Ce=Se,Ie=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},je=Symbol("Value"),Pe=function(){return{}},Ne=function(e){return[e.slice(0,-1),e[e.length-1]]},qe=Ne,Re=function(e,n,r,i,u,o){r||(r=xe),null==i&&(i=Pe),null==u&&(u=_e),null==o&&(o=r);for(var[s,a]=qe(n),l=e,c=s.length,f=0;f<c;f++){var h=s[f],p=r(l,h);if(void 0===p){if(!i)return;p=Le(l,h,i,r,u)}l=p}if(o)return o(l,a,u)},Me=function(e,n,r,i,u,o){return Re(e,n,i,u,o,((e,n)=>Le(e,n,r,i,o)))},Be=function(){return new Map},De=function(e,n,r){return Me(e,n,r,Oe,Be,Fe)},We=function(e,n){return delete e[n],e},He=function(e,n,r,i){return Re(e,n,r,!1,!1,i||We)},Ke=function(e,n){return e.delete(n)},Ue=function(e,n){return He(e,n,Oe,Ke)},Ye=class{constructor(){this.store=new Map}get(e,n){return e=Ce(Ie(e),je),De(this.store,e,n)}remove(e){return e=Ce(Ie(e),je),Ue(this.store,e)}delete(e){return this.remove(e)}},ze=q("MemoizedFunction",(function(e,n){if(this.base=e,null!=n)if(1===(n=i(n)).length){this.cache=new Ae;var r=n[0];this._cacheKeyFormatter=e=>e[r]}else this.cache=new Ye,this._cacheKeyFormatter=e=>Ee(e,n);else this.cache=new Ye,this._cacheKeyFormatter=e=>e;var u=this;return function(){var n=u._cacheKeyFormatter(arguments);return u.cache.get(n,(()=>e.apply(this,arguments)))}}),{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),Ve=function(e,n){return new ze(e,n)},Ge=function(e){return new Set(e)},Je=function(e){var n={};if(e){var r=Ge(e);r.has("g")&&(n.global=!0),r.has("i")&&(n.caseInsensitive=!0),r.has("y")&&(n.sticky=!0)}return n},$e=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},Qe=function(e,n){var r=Je(e);return $e(Object.assign(r,n))},Xe=function(e,r){var i=r,u=void 0;return n(i)?u=i:re(i)&&(u=Qe(e.flags,i)),new RegExp(e,u)},Ze=function(e,n){return Xe(e,e.flags+n)},et=function(e){return Ze(e,"g")},tt=Ve((function(e){return e.global?e:et(e)}),0),nt=function(e){var r=e;return null==r?void 0:n(r)?r:$e(r)},rt=function(e,n){return new RegExp(e,nt(n))},it=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},ut=function(e,n){return rt(it(e),n)},ot=function(e,r,i,u,o,s){return me(e,(function(e){return e.replaceAll?(ge(r)&&(r=tt(r)),e.replaceAll(r,i)):(r=n(r)?ut(r,"g"):tt(r),this.replace(r,i))}),u,o,s)},st=function(e,n,r){return ot(e,n,(r??"\\")+n)},at=function(e,n,r){return null==n&&(n='"'),!1!==r&&(e=st(e,n,r)),n+e+n},lt=function(e){return at(e,'"')},ct=function(e){return ie(e)?vt(e):String(e)},ft=function(e,n){return n||(n=ht),"["+e.reduce((function(e,r){return e+n(r)+", "}),"").slice(0,-2)+"]"},ht=function(e){return n(e)?lt(e):r(e)?ft(e):ct(e)},pt=function(e,n,r){X(e,r).forEach(((r,i,u)=>n(r,e[r],i,u)))},dt=function(e,n,r,i){var u=null!=r?r:"";return pt(e,(function(){u=n.call(this,u,...arguments)}),i),u},vt=function(e,n){return n||(n=ht),"{"+dt(e,(function(e,r,i){return e+r+":"+n(i)+", "}),"",!0).slice(0,-2)+"}"},mt=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":vt(e,(e=>gt(e,n-1)))},yt=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":ft(e,(e=>gt(e,n-1)))},gt=function(e,n){return void 0===e?"undefined":null===e?"null":S()?he(e,n):re(e)?mt(e,maxNumLevels):r(e)?yt(e,maxNumLevels):ct(e)},wt=function(e,n,r,i){if(0===arguments.length)return new ae("Unexpected value received");i||(i={});var u,{expected:o}=i;return u=o?"Received "+gt(e)+", expected one of "+gt(o):"Unexpected value received: "+gt(e),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),i.fromFn||(i.fromFn=wt),new ae(u,i)},bt=function*(e,n){yield*e,yield*n},Et=function(e){return e?" "+e:""},xt=q("Interface",(function(e,n,r){r||(r={}),O(this,e),[this.stubs,this.defaults]=U(n,R(!0));var u=r.implements?i(r.implements):null,o=this;return function(e){var n=e;return u&&u.forEach((e=>e(n))),o.decorate(n),o.assert(n),n}}),{decorate(e){var n,r,i=e;for(var[u,o]of(i.prototype?(n=i.prototype,r=!0):(n=i,r=!1),te(this.defaults)))if(void 0===n[u])if(ie(o))if(o.value)n[u]=o.value;else{if(!o.setup)throw wt(o,null,"defaultVal");if(!r)throw o.setup(),E("setupFn is NYI for instances");se(n,u,o.setup)}else n[u]=o;return i},assert(e){var n=e,r=null!=n.prototype,i=n.prototype||n,u=bt(te(this.stubs),te(this.defaults));for(var[o]of u){var s;if(void 0===i[o])throw s=r?"Class"+Et(n.name):"Object "+gt(n),s+=" does not satisfy interface "+this.name+' (missing key "'+o+'")',m(s)}return n},validate(e){try{return this.assert(e),!0}catch(e){return!1}}},{is(e){return e instanceof this}}),kt=function(e,n,r){return new xt(e,n,r)},Lt=Symbol("Cleanup"),Ot=kt("Handle",{remove:!0,[Lt](){this.remove()}}),Ft=e(class{constructor(e){this.handles=e}remove(){this.handles.forEach((e=>e.remove()))}add(e){return this.handles.push(e),this}},Ot),Tt=function(e){return 1===e.length&&r(e[0])?e[0]:array},At=function(...e){return new Ft(Tt(e))},St=At,Ct=St,It=function(e){var n,r,i=e;return null!=i&&(n=i.detail??i.data??i,_(i)&&(r=i)),[n,r,i]},jt=function(e){return xt.is(e)},Pt=jt,Nt=d(globalThis.TypeError),qt=function(e){return null==e?e:e.constructor},Rt=function(e,n,r,i){if(0===arguments.length)return new Nt("Unexpected type received");i||(i={});var u,{type:o,expected:s}=i;return null==o&&(o=qt(e)),o&&o.name&&(o=o.name),s?(s.name&&(s=s.name),u="Expected "+s+", received "):u="Unexpected type received (",u+=o,null!=e&&(u+=" ("+gt(e)+")"),s||(u+=")"),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),i.fromFn||(i.fromFn=Rt),new Nt(u,i)},Mt=function(e,n,r){if(!Pt(n))throw Rt(n,1);return n.decorate(e),r&&r.call(e,e,n),n.assert(e),e},Bt=kt,Dt=Symbol("EventTarget"),Wt=function(e){return require(e)},Ht=function(e){return!!e.startsWith("node:")||Wt("node:module").isBuiltin(e)},Kt=function(e){return e.startsWith(".")},Ut=function(e){var i=e.stdio;if(i){if(!r(i)){if(!n(i))throw Rt(i,"stdio");if("pipe"===i)i=["pipe","pipe","pipe"];else if("inherit"===i)i=["inherit","inherit","inherit"];else if("ignore"===i)i=["ignore","ignore","ignore"];else{if("overlapped"!==i)throw wt(i,"stdio");i=["overlapped","overlapped","overlapped"]}e.stdio=i}}else i=e.stdio=[null,null,null];return i},Yt=function(e,n){var r=n.length;e.length=r;for(var i=0;i<r;i++)e[i]=n[i];return e},zt=function(e){return function(){return!e.apply(this,arguments)}},Vt=function(e,n){return Yt(e,e.filter(zt(n)))},Gt=function(e){return Vt(e,(e=>null==e))},Jt=ce("child_process"),$t=A((function(){return"win32"===process.platform})),Qt=function(e,n,r){if(r||(r={}),n(e))throw e;if(r.nullOnErr&&(r.err=null),void 0!==r.err)return r.err;if(r.onErr)return r.onErr(e,e.stderr);throw e},Xt=function(e,n,r){r||(r={}),r.dir&&(r.cwd=r.dir);var i=Ut(r);if(null==i[0]){var u=r.allowInput,o=r.input;if(u&&o)throw m("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");u&&(i[0]="inherit")}if(null==i[1]){var s=r.captureOutput??!1,a=r.showOutput;if(s&&a)throw m("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");s?i[1]="pipe":(null==a&&(a=!0),i[1]=a?"inherit":"ignore")}if(null==i[2]){var l=r.captureErr??!1,c=r.showErr;if(l&&c)throw m("captureErr and showErr cannot be used simultaneously for synchronous child processes.");l?i[2]="pipe":(null==c&&(c=!0),i[2]=c?"inherit":"ignore")}r.encoding||(r.encoding="utf8"),n&&Gt(n);try{var f=Jt().execFileSync(e,n,r);null!=f&&(f=f.trim());var h=r.map??r.mapFn;return h&&(f=h(f)),f}catch(e){if($t())return Qt(e,(e=>"ENOENT"===e.code),r);throw e}},Zt=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,Xt("npm",e,n)},en=function(e,n,r){return Zt(["install",e,n?"-g":null],r)},tn=ce("path"),nn=function(e,n){var r=tn().resolve;return n?r(n,e):r(e)},rn=function(e){return require(nn(e))},un=class{constructor(){this.store={}}get(e,n){return g(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},on=new un,sn=ce("module"),an=function(e){return e.endsWith("\\node_modules")||(e+="\\node_modules"),sn().createRequire(e)},ln=function(e,n){return on.get(e,(()=>an(e)))(n)},cn=function(e,n,r){return Object.keys(n).forEach((i=>g(e,i,n[i],r))),e},fn=function(e,n,r){return n?cn(e,n,r):e},hn=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},pn=function(e){return e[e.length-1]},dn=J,vn=function(e,n,r){return e=Xe(e,{global:!0}),null!=r&&(n=dn(r,n)),e.lastIndex=n,e},mn=function(e,n,r){return e=null!=r?vn(e,r,n):tt(e),Array.from(n.matchAll(e))},yn=function(e,n,r){return null!=r&&(n=n.slice(0,r)),pn(mn(e,n))||null},gn=function(e,n){var r=yn(e,n);return r&&n.length===r.index+r[0].length?r:null},wn=function(e,n){var r=gn(n,e);return r?e.slice(0,r.index):e},bn=function(e,r){if(n(r))return hn(e,r);if(ge(r))return wn(e,r);throw Rt(r,1)},En=bn,xn=function(e,n){return[e.slice(0,n),e.slice(n)]},_n=function(e){e=En(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return xn(e,n+1)},kn=function(e,n){return e.startsWith(n)?e:n+e},Ln=function(e){var[n,r]=_n(e);return n+kn(r.trim(),"return ")},On=function(e){return Yr("node-repl-await").processTopLevelAwait(e)},Fn=function(e){return On(e)??e},Tn=ot,An=function(e,r){if(n(r))return e.endsWith(e);if(ge(r))return!!gn(r,e);throw Rt(r,1,"matchThis")},Sn=/\/|\\/,Cn=function(e){return An(e,Sn)?e:e+"/"},In=function(e,n){return""===e?e:(null==n&&(n=!0),e=Tn(e,"\\","/"),n?Cn(e):e)},jn=function(){return process.mainModule?.filename??null},Pn=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},Nn=function(e){return e.split(".")[0]},qn=function(e){return tn().win32.basename(e)},Rn=function(e){return Nn(qn(e))},Mn=function(e,n,r,i){e||(e=jn()??"_console.js");var u=Pn(Rn(e));return n&&(u+="_repl"),u+(r&&i?.dynamic?".dypkg.json":".pkg.js")},Bn=function(e,n){return e=tn().dirname(e),!1===n?e:Cn(e)},Dn=function(e,n,r,i){var u,o=Mn(e,n,r,i);return u=e?Bn(e):"./",nn(u+o)},Wn=function(e){return'require("'+In(Dn(),!1)+'");\n'+e},Hn=function(e,n){return ot(e,n,"")},Kn=function(e,n){return n.forEach((n=>e=Hn(e,n))),e},Un=function(e){return Kn(e,["\r","\n"])},Yn=function(e,n){return Yr("astring").generate(e,n)},zn=function(e,n){return e.stack=n+"\n"+e.stack,e},Vn=function(e,n,r){r||(r={}),!1!==n&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0);var i=Yr("acorn-node");try{return i.parse(e,r)}catch(n){throw zn(n,"Acorn parsing error: "+e)}},Gn=function(e,n,r){return Yn(Vn(e,n,r))},Jn=function(e){return Un(Gn(e))},$n=function(e,n,r){return(n||r)&&(n||(n={}),r&&fn(n,r),n.ensureReturn&&(e=Ln(e)),n.topLevelAwait&&(e=Fn(e)),n.useTitan&&(e=Wn(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=Jn(e))),e},Qn=function(e){return n(e)?e:ct(e)},Xn=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},Zn=function(e,n,r,i,u){return ve(e,n,r,i,((n,r)=>null===n?null:(n.input=e,void 0!==r&&(n.index+=r),n)),u)},er=function(e,n){return e.splice(e.length,0,...n),n},tr=function(e,n){return er(e,n),e},nr=tr,rr=class extends Array{constructor(e,n,r,i,u){if(-1===n)throw m("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw m("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,i&&nr(this,i),this.index=n,this.input=r,u&&(this.groups=u)}fromParts(e){var n=e;return new rr(n.match,n.index,n.input,n.captures,n.groups)}},ir=function(e,n,r,i,u){return new rr(e,n,r,i,u)},ur=function(e,n,r,i,u){return-1===n||null==e?null:ir(e,n,r,i,u)},or=Hn,sr=function(e,n){return Xe(e,or(e.flags,n))},ar=function(e){return sr(e,"g")},lr=Ve((function(e){return e.global?ar(e):e}),0),cr=function(e,n,r){return(e=null!=r?vn(e,r,n):lr(e)).exec(n)},fr=function(e,r,i,u,o){return Zn(e,(e=>{if(n(r)){var i=e.indexOf(r);return ur(r,i,e)}return cr(r,e)}),i,u,o)},hr=function(e){return e.index+e[0].length},pr=function(e,n){var r=fr(e,n);return null===r[0]?null:e.slice(hr(r))},dr=function(e,n){return e.startsWith(n)?e.substring(n.length):e},vr=function(e,n){var r=cr(e,n);return r&&0===r.index?r:null},mr=function(e,n){var r=vr(n,e);return r?e.slice(r[0].length):e},yr=function(e,r){if(n(r))return dr(e,r);if(ge(r))return mr(e,r);throw Rt(r,1)},gr=yr,wr=function(e){var n=pr(e,"=>").trim();return gr(En(n,"}"),"{")},br=function(e){return pr(e,"{").slice(0,-1)},Er=function(e){var n=Qn(e);return Xn(n)?wr(n):br(n)},xr=function(e){return null==e?"":n(e)?e:s(e)?Er(e):String(e)},_r=function(e,n){var r=n?.basic?null:{topLevelAwait:!0,useTitan:!0},i=$n(xr(e),n,r);return Xt("node",["-e",i],n)},kr=function(e,n,r,i){var u="Required argument";return r&&(u+=' "'+r+'"'),null!=n&&(u+=" (index "+n+")"),u+=" missing",arguments.length>0&&(u+=" (received "+gt(e)+")"),m(u,null,b(i,kr))},Lr=function(e,n,r){if(null==e)throw kr(e,n,r,{fromFn:Lr});return e},Or=function(e,n){return process.kill(e,Lr(n,0,"signalName"))},Fr=function(e){return Or(e,"SIGINT")},Tr=function(){return Fr(process.pid)},Ar=Tr,Sr=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw wt(e,0,"char")},Cr=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=_r((function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",(e=>{var r=e.toUpperCase();"Y"===r||"N"===r?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))}))}),{basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),Ar(),m("Prompt was cancelled via interrupt.");return console.log(n),Sr(n)},Ir=function(e){return r(e)?e:n(e)?e.split("."):[e]},jr=function(e,n,r,i,u,o){var s=r;return Re(e,n,i,u,o,((e,n,r)=>r(e,n,ke(s))))},Pr=function(e,n){var r=n,i=globalThis.config;i||(i=globalThis.config={});var u,o=Ir(e);return o.length>1?u=jr(i,o,r):(u=ke(r),i[o[0]]=u),u},Nr=function(e,n){return Pr("node.require.customDirs",(r=>(r||(r=[]),!1!==n&&(e.endsWith("node_modules")||(e+="\\node_modules")),r.includes(e)||r.push(e),r))),e},qr=Nr,Rr=Re,Mr=function(e){var n=globalThis.config;if(n){var r=Ir(e);return r.length>1?Rr(n,r):n[r[0]]}},Br=function(e,n,r){if(null!=e)return e;var i=Mr(n);return null!=i?i:r},Dr=ce("fs"),Wr=function(e){return!!Dr().lstatSync(e,{throwIfNoEntry:!1})},Hr=function(e){var n=Bn(e,!1);return Wr(n)||(n!==e&&Hr(n),Dr().mkdirSync(n)),e},Kr=function(e){return Hr(e),Dr().mkdirSync(e),e},Ur=function(e){return Wr(e)?e:Kr(e)},Yr=function(e,n){if(Ht(e))return require(e);if(Kt(e))return rn(e);try{return require(e)}catch(e){}var r=__dirname,i=process.mainModule?.path;if(i!==r)try{return ln(i,e)}catch(e){}var u=process.cwd();if(u!==i&&u!==r)try{return ln(u,e)}catch(e){}var o=Mr("node.require.customDirs");if(o)for(var s of o)try{return ln(s,e)}catch(e){}var a=Br(n?.autoInstall,"node.require.autoInstall"),l=Br(n?.promptInstall,"node.require.promptInstall",!0);if(a||l){var c=a||l;!0===c&&(c="./node_modules"),c=nn(c);var f=!1;if(a?(f=!0,console.log('Auto-installing "'+e+'" from npm to "'+c+'"...')):(f=Cr('Npm package "'+e+'" is required. Install now?'))&&console.log('Installing "'+e+'" from npm to "'+c+'"...'),f){c=Ur(c),en(e,!1,{cwd:c});try{return qr(c),ln(c,e)}catch(e){console.error("Failed to load from auto-install dir: ",c)}}}throw m('Module not found: "'+e+'"',{checked:{moduleDir:r,scriptDir:i,cwd:u}})},zr=A((function(){if(!globalThis.CustomEvent||!globalThis.EventTarget||!globalThis.Event){var e=Yr("event-target-shim");globalThis.Event||(globalThis.Event=e.Event),globalThis.CustomEvent||(globalThis.CustomEvent=class extends globalThis.Event{constructor(e,n){super(e,n),n?.detail&&(this.detail=n.detail)}}),globalThis.EventTarget||(globalThis.EventTarget=e.EventTarget)}return{Event:Event,CustomEvent:CustomEvent,EventTarget:EventTarget}})),Vr=zr().EventTarget,Gr=function(e){var n=Dt,r=e[n];return void 0===r&&(r=new Vr,L(e,n,r)),r},Jr=Bt("EventInterface",{addEventListener(e,n,r){Gr(this).addEventListener(e,n,r)},on(e,n){this.addEventListener(e,n)},removeEventListener(e,n){Gr(this).removeEventListener(e,n)},off(e,n){this.removeEventListener(e,n)},dispatchEvent(e){return Gr(this).dispatchEvent(e)}}),$r=Jr,Qr=function(e){return Mt(e,$r)},Xr=function(e){return!(!e.addEventListener&&!e.on)},Zr=function(e){return Xr(e)||Qr(e),e},ei=function(e,n,r){return e[n]=r,e},ti=function(e,n,r){return ei(e||{},n,r)},ni=function(e,n,r,i){return pi(e,n,r,ti(i,"once",!0))},ri=function(e,n){return function(){var r=n.apply(this,arguments);return e.apply(this,arguments),r}},ii=ri,ui=function(e,n,r){return e[n]=ii(e[n],r)},oi=e(class{constructor(e){this._remover=e}remove(){this._remover()}removeOn(e,n,r){r&&Zr(e);var i=ni(target,n,(()=>this.remove()));return ui(this,"remove",(()=>i.remove())),this}},Ot),si=class extends oi{constructor(e,n){super(e),this.handleEvent=n}},ai=function(e,n){return new si(e,n)},li=function(e,n,r){(e.removeEventListener||e.off).call(e,n,r)},ci=function(e,n,r){for(var i=e.length-1;i>=n;i--)e[i+1]=e[i];return e[n]=r,e.length++,e},fi=function(e,n){return ci(e,0,n)},hi=fi,pi=function(e,n,r,i){if(i?.valueFirst){var u=r;r=function(e){var[n,r]=It(e);return hi(arguments,n),arguments[1]=r,u.apply(this,arguments)}}var o=e.addEventListener;return o||(e.on?o=i?.once?e.once:e.on:(Qr(e),o=e.addEventListener)),o.call(e,n,r,i),ai((()=>li(e,n,r)),r)},di=function(e,n,r,i){return Ct(n.map((n=>pi(e,n,r,i))))},vi=A((function(){return process.argv.slice(2)})),mi=vi,yi=function(){throw E()},gi=function(e){yi();for(var n=[],r=0,i=string.length,u=0;u<i;u++){var o=string[u];o===splitBy?(n.push(string.slice(r,u)),r=u+1):o===quoteChar&&string[u-1]}string=string.split(" "),Q(quotes,(e=>e.slice(1,-1))),string=string.split(" "),Q(quotes,(e=>e.slice(1,-1)))},wi=function(){return globalThis.repl?.repl},bi=function(e,n){return null==n&&(n=1),function(){var r=Array.from(arguments),i=r.pop(),u=e.apply(this,r);0===n?(u.then((e=>i(null,e))),u.catch(i)):(u.then(i),u.catch((e=>i.apply(null,ei([],n,e)))))}},Ei=async function(){}.constructor,xi=function(e){return ne(e,Ei)},_i=function(e){return xi(e)?e:async function(){return e.apply(this,arguments)}},ki=A((function(){return Yr("node:stream")})),Li=S()&&ki().Writable,Oi=function(e,n){return n||(n={}),null==n.objectMode&&(n.objectMode=!0),e?n.write=bi(_i(e),0):n.write||(n.write=(e,n,r)=>r()),new Li(n)},Fi=function(){},Ti=async function(e){var n=wi();if(n){var r,i=n.eval,u=n.output;n.output=Oi(Fi),n.eval=Fi;try{n.quickDisableHistory?await n.quickDisableHistory((async function(){r=await e(),n._line()})):r=await e()}finally{n.output=u,n.eval=i}return r}return e()},Ai=ce("readline"),Si=/\r?\n/,Ci=function(e){return null==e||void 0!==e.length&&0===e.length},Ii=function(e,n){return Vt(e,Ci)},ji=function(e,n){return e.splice(n,1),e},Pi=function(e,n,r){for(var i={},u=e.length,o=0;o<u;o++){var s=n(e[o],o,e);if(s){var[a,l]=s;r?(i[a]||(i[a]=[]),i[a].push(l)):i[a]=l}}return i},Ni=function(e,n,r,i){return[n,r]=$(e,n,r,i),e.slice(n,r)},qi=function(e,n){return be(n,e).join("")},Ri=function(e){return e?e[0]:null},Mi=function(e,n){var r=null==n?-1:n.index;if(-1===r)return[e];var i=xn(e,r);return i[1]=i[1].slice(n[0].length),i},Bi=function(e,n,r,i,u){return Mi(e,fr(e,n,r,i,u))},Di=function(e){return isNaN(e)?null:e},Wi=function(e){return null==e?null:Di(Number(e))},Hi=Wi,Ki=function(e){return Hi(e)??e},Ui=function(e,n){null==n&&(n="=");var r={};return e.forEach((function(e){var[i,u]=Bi(e,n);null!=u&&(u=Ki(u.trim())),r[i.trim()]=u})),r},Yi=w,zi=class extends Array{constructor(e){var i,u=e;null!=u&&(r(u)?i=u:n(u)&&(i=u.split(Si))),i?(super(i.length),Object.assign(this,i)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply((e=>e.trim()))}removeEmpty(){return Ii(this)}removeComments(e){for(var n=0;n<this.length;n++){var r=this[n],i=r.indexOf(e);-1!==i&&(""===(r=r.slice(0,i)).trim()?(ji(this,n),n--):this[n]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return Q(this,e)}join(){return super.join("\n")}toObj(e){return Ui(this,e)}mapToObj(e,n){return Pi(this,e,n)}between(e,n,r){return r=Yi(r,"inclusiveEnd",!0),Ni(this,e,n,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===pn(this).trim()&&this.pop(),this.length>0))){var e=this.find((e=>""!==e.trim())),n=Ri(cr(/^\s*/,e));if(n){var r=n.length;this.apply((e=>{if(e.startsWith(n))return e.slice(r)}))}}return this}deindent(e,n,r){throw E()}indent(e,n){var r=qi(n??"\t",e??1);return this.apply((e=>r+e))}static is(e){return ne(e,this)}static fromChunks(e){return e.map((e=>En(e,Si))).flatMap((e=>Gi(e,!1)))}},Vi=function(e,n){var r=new zi(e);return n&&r.condense(),r},Gi=function(e,n,r){var i=e.split(Si);return n?Vi(i,r):i},Ji=function(e){return Dr().readFileSync(e,"utf8")},$i=Ji,Qi=function(e,n){return Gi($i(e),!0,n)},Xi=function(e){return"number"==typeof e},Zi=function(e){return e instanceof Buffer},eu=function(e){return ArrayBuffer.isView(e)},tu=eu,nu=function(e){return Zi(e)||tu(e)||n(e)},ru=function(e){return e.constructor===ArrayBuffer},iu=function(e){return nu(e)?e:ru(e)?Buffer.from(e):ct(e)},uu=function(e){return Xi(e)?String(e):iu(e)},ou=function(e,n){return Hr(e),Dr().appendFileSync(e,uu(n)),e},su=function(e,n){return ou(e,"\n"+n)},au=su,lu=function(e){return ot(e,"\n","\\n")},cu=lu,fu=function(e,n){if(0===e)return n[0];for(var r=n.length,i="";e>0;){var u=e%r;i=n.charAt(u)+i,e=Math.floor(e/r)}return i},hu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",pu=function(e){return fu(e,hu)},du=function(e,n){for(var r=Qn(e),i=n.length,u=0,o=0;o<r.length;o++){var s=r[o],a=n.indexOf(s);if(-1===a)throw'Error: "'+s+'" not found in base charset "'+n+'"';u=u*i+a}return u},vu=function(e){return du(e,hu)},mu=function(e,n){return Object.keys(e).map(((r,i)=>n(r,e[r],i,e)))},yu=function(e){return e.slice()},gu=function(e,n){return e.includes(n)||e.push(n),e},wu=class{constructor(e,n,i,u){(n=r(n)?yu(n):[n]).forEach(u),e&&gu(n,e),this.members=n,this._enableFn=i,this._disableFn=u}enable(e){this.members.forEach((n=>{n!==e&&this._disableFn(n)})),this._enableFn(e)}disableAll(){this.members.forEach((e=>this._disableFn(e)))}},bu=function(e,n,r,i){return new wu(e,n,r,i)},Eu=function(e,n,r){return new Promise((function(i,u){var o=Ct([ni(e,n||"load",(e=>{o.remove(),i(e)})),ni(e,r||"error",(e=>{o.remove(),u(e)}))])}))},xu=j("CLI",S()&&Ai().Interface,[function(e){if(e||(e={}),e.input||(e.input=process.stdin),e.output||null==e.output&&(e.output=process.stdout),null==e.terminal&&(e.terminal=!0),e.historyPath){var n=Wr(e.historyPath)?Qi(e.historyPath):[];e.history=n.reverse()}var r={inputWasRaw:e.input.isRaw},i=Ai().createInterface(e);return i.options=e,i.internal=r,i},function(){var e=this.options;this.rl=Ai(),e.historyPath&&this.on("history",(n=>au(e.historyPath,n[0]))),e.disabled&&this.disable()}],{prompt(e){this._muted||(this._isPrompt=!0,null!=e&&this.setPrompt(e),super.prompt.apply(this,arguments),delete this._isPrompt)},_refreshLine(){this._muted||(this._isRefresh=!0,super._refreshLine(...arguments),delete this._isRefresh)},_ttyWrite(e,n){(!this._blockExcept||n&&this._blockExcept.includes(n.name))&&super._ttyWrite.apply(this,arguments)},_addHistory(){return this._historyDisabled||null!=this._mask||super._addHistory(),this.line},_writeToOutput(e){if(!this._muted){var n=this._mask;if(null!=n){if(this._isRefresh){var r=this._prompt;e.startsWith(r)&&(super._writeToOutput(r),e=e.slice(r.length))}this._isPrompt||(e=Tn(e,/[^\r\n]/,n))}super._writeToOutput(e)}},async promptLine(e){return this.prompt(e),this.awaitLine()},async prefillPrompt(e,n){var r=n,i=await ke(r);return this.prompt(e),i&&this.write(cu(Qn(i))),this.awaitLine()},async promptMultiline(e,r,i,u){if(null==r&&(r="... "),null==i)i=e=>""===e,u||(u=e=>(e.pop(),e));else if(n(i)){var o=i;i=e=>e.endsWith(o)}for(var s=await this.promptLine(e),a=[s];!i(s,a.length,a);)s=await this.promptLine(r),a.push(s);return u&&u(a),a.join("\n")},async promptKey(e,n){this.prompt(e);var r=await this.quickBlockExcept(n,!1,(()=>this.awaitKey(n)));return this.newLine(),r},async promptYN(e){return"y"===(await this.promptKey(e,["y","n"])).toLowerCase()},async promptSelect(e,n,i){var u=n;i||(i={});var o=0;function a(){return o++,pu(o)}if(ie(u))u=mu(u,((e,n,r)=>[a(),e,n]));else{if(!r(u))throw Rt(u);u=u.map(((e,n)=>{if(null==e)return null;if(r(e)){var i=e[0];if(null==i)i=a();else if((i=Qn(i)).length>1)throw m("Input key must be a single character:",e);var u=e.length;if(1===u)return[i,i,i];if(2===u){var o=e[1];return[i,o,o]}if(3===u)return[i,e[1],e[2]];throw m("Unexpected array length in choices: "+u)}return[a(),e,e]})),Gt(u)}if(u.length>35)throw m("promptSelect only supports up to 35 options.");var l=i.displayFn||((e,n)=>"["+e+"] "+n);this.quickDisableHistory((()=>{for(var e=0;e<u.length;e++){var[n,r,i]=u[e];this.write(l(n,r,i,u)+"\n")}}));var c=Pi(u,(e=>[e[0],e])),f=await this.promptKey(e,Object.keys(c)),h=c[f];if(null==h)throw wt(h,"choice");var p=h[2];return s(p)&&(p=await p(h)),i.asObj?{key:f,name:h[1],value:p}:i.asIndex?vu(f)-1:p},blockExcept(e,n){e=i(e).map((e=>String(e).toLowerCase())),0!=n&&gu(e,"return"),this._blockExcept=e},unblock(){delete this._blockExcept},async quickBlockExcept(e,n,r){var i=this._blockExcept;this.blockExcept(e,n);var u=await r();return i?this.blockExcept(i):this.unblock(),u},disable(){this.pause(),this.mute()},enable(){this._mutex?this._mutex.enable(this):this._enable()},_enable(){this.resume(),this.unmute()},mutex(e){var n=bu(this,e,(e=>e._enable()),(e=>e.disable()));this.pause(),this.resume(),n.members.forEach((e=>e._mutex=n))},mask(e){this._mask=e},unmask(){delete this._mask},mute(){this._muted=!0},unmute(){delete this._muted},disableHistory(){this._historyDisabled=!0,this._historyPrev=Fi,this._historyNext=Fi},enableHistory(){delete this._historyDisabled,delete this._historyPrev,delete this._historyNext},async quickDisableHistory(e){var n=this._historyDisabled;this.disableHistory();try{var r=await e()}finally{return n||this.enableHistory(),r}},awaitLine(){return Eu(this,"line")},newLine(){this.write("\n")},newline(){return this.newLine()},onKey(e,n,i){var u=e,o=this.input;if(this.rl.emitKeypressEvents(o),o.isTTY&&o.setRawMode(!0),u){var s=n;if(r(u)){var a=u.map((e=>String(e).toLowerCase()));n=(e,n)=>{e||(e=n.name),a.includes(e.toLowerCase())&&s.call(this,e,n)}}else{var l=String(u).toLowerCase();n=(e,n)=>{e||(e=n.name),e.toLowerCase()===l&&s.call(this,e,n)}}}return pi(o,"keypress",n,i)},async awaitKey(e){return new Promise((n=>{var r=this.onKey(e,(e=>{r.remove(),n(e)}))}))},moveCursor(e,n){return this._moveCursor(e,n)},cursorLeft(e){return this.moveCursor(-e)},cursorRight(e){return this.moveCursor(e)},cursorUp(e){return this.moveCursor(null,-e)},cursorDown(e){return this.moveCursor(null,e)},close(){super.close(),this.input.setRawMode(this.internal.inputWasRaw)}}),_u=function(e,n){return Ti((async function(){var r=new xu(n);try{var i=await e(r)}finally{r.close()}return i}))},ku=function(e,n){return _u((n=>n.promptLine(e)),n)},Lu=async function(e,n,r){for(var i={},u=n.length,o=0;o<u;o++){var s,a=n[o];if(a.endsWith("?")&&(a=a.slice(0,-1),s=!0),void 0===(l=e[a])){var l=e[o];if(void 0===l&&!s&&(!1!==r?.prompt&&(l=await ku(a+": ")),!l))throw Lr(void 0,o,a)}i[a]=l}return i},Ou={node:{onError:function(e){return di(process,["uncaughtException","unhandledRejection"],e)},is:S,display:he,util:fe,_builtInModule:ce,requireBuiltIn:le,require:Yr,_basicRequire:Wt,child_process:Jt,requireLocal:rn,path:tn,_requireFromDir:ln,_requireDirCache:on,_createRequire:an,module:sn,promptYNSync:Cr,run:_r,getScriptPath:jn,sigint:Ar,interrupt:Tr,ensureRequireDir:qr,addRequireDir:Nr,fs:Dr,pause:function(e){Yr("press-any-key-sync")(e)},beforeExit:function(e){return pi(process,"beforeExit",e)},args:vi,prompt:ku,quickCLI:_u,quickDisableREPL:Ti,getREPL:wi,CLI:xu,readline:Ai},ev:{onAny:di,multiHandle:Ct,on:pi,resolveValue:It,enable:Qr,EventInterface:$r,Interface:Jr,_ensureHasTarget:Gr,targetSym:Dt,EventTarget:Vr,polyfill:zr,handle:ai,ListenerHandle:si,ensureEnabled:Zr,can:Xr,once:ni,off:li,promise:Eu},o:{multiHandle:St,safeEnsure:w,ensure:g,isAny:_,setHidden:L,addNonEnumerable:k,hideKey:N,makeNonEnumerable:P,filterSplit:U,split:K,pick:H,iterate:te,iterator:ee,entries:Z,keys:X,isPure:ie,is:re,setProtoLazy:se,setGetter:ue,forceSet:oe,display:mt,toLiteral:vt,constructorMatches:ye,ensureCustom:Le,get:xe,set:_e,createEmpty:Pe,remove:We,reduce:dt,each:pt,addInterface:Mt,Cache:un,setDefaults:fn,ensureMulti:cn,resolveKeys:Ir,diveGet:Rr,safeSet:ti,touch:ei,fromLines:Ui,safeDefault:Yi,mapArr:mu,mutex:bu,_Mutex:wu},handle:{createMulti:At,MultiHandle:Ft,HandleInterface:Ot,Handle:oi},class:{addInterface:e,create:j,setName:F,addStatics:T,setDisplay:I,isInterface:Pt,interface:Bt},ifc:{create:kt,Interface:xt,is:jt},f:{createClass:q,createConstructor:f,isArrowFn:l,isArrow:a,is:s,wrap:c,ensureConstructor:h,retThis:p,setName:O,one:A,eq:R,memoize:Ve,MemoizedFunction:ze,not:zt,body:Er,isArrowString:Xn,_getArrowFnBody:wr,_getNormalFnBody:br,hookAfterMethod:ui,hookAfter:ii,injectAfter:ri,callbackify:bi,ensureAsync:_i,isAsync:xi,AsyncFunction:Ei,noop:Fi},s:{is:n,toLiteral:lt,quote:at,escape:st,replaceAll:ot,apply:me,withIndices:ve,chars:Ge,from:ct,spaceBefore:Et,removeTrailing:En,removeFromEnd:bn,_removeStringFromEnd:hn,_removeRegexFromEnd:wn,resolveIndex:dn,splitAtIndex:xn,ensureStartsWith:kn,replace:Tn,endsWith:An,decapitalize:Pn,removeLineBreaks:Un,removeMulti:Kn,removeAll:Hn,resolve:xr,ensure:Qn,after:pr,match:fr,_matchWithIndices:Zn,remove:or,removeLeading:gr,removeFromStart:yr,_removeStringFromStart:dr,_removeRegexFromStart:mr,dfaParse:yi,splitLines:Gi,lines:Vi,LinesArray:zi,repeat:qi,splitFirst:Bi,_splitByMatch:Mi,escapeLineBreaks:cu,escapeNewLines:lu},a:{is:r,ensure:i,filterSplit:W,iterate:G,iterator:V,apply:Q,resolveIndices:$,resolveIndex:J,wrapIndices:de,wrapIndex:pe,pick:Ee,create:be,fill:we,push:Ce,add:Se,splitLast:qe,splitTail:Ne,toLiteral:ft,display:yt,unboxArgs:Tt,removeNullish:Gt,removeByFilter:Vt,replaceContents:Yt,last:pn,pushMulti:nr,addMulti:tr,pushThroughMulti:er,removeEmpty:Ii,removeIndex:ji,mapToObj:Pi,slice:Ni,copy:yu,ensureContains:gu},p:{asyncJoint:o,is:u},err:{create:m,Error:v,Enhanced:d,nyi:E,NYIError:y,defaultFromFn:b,value:wt,ValueError:ae,type:Rt,TypeError:Nt,prepend:zn,req:kr},v:{isPrimitive:x,constructorMatches:ne,display:gt,toLiteral:ht,resolve:ke,type:qt,req:Lr,isEmpty:Ci,nullIfNaN:Di},sym:{display:C,value:je,cleanup:Lt},macro:{config:function(e){}},set:{resolve:D,ensure:B,is:M},n:{cap:z,least:Y,tryCoerce:Ki,tryParse:Hi,ensure:Wi,is:Xi,toBase36:pu,toCustomBase:fu,_base36Digits:hu,fromBase36:vu,fromCustomBase:du},re:{is:ge,ensureGlobal:tt,global:et,addFlag:Ze,copy:Xe,updateFlagString:Qe,parseFlagString:Je,createFlagString:$e,createEscaped:ut,create:rt,resolveFlags:nt,escape:it,matchEnd:gn,matchLast:yn,matchAll:mn,setStartIndex:vn,slash:Sn,safeCreateResult:ur,createResult:ir,RegexResult:rr,match:cr,ensureLocal:lr,local:ar,removeFlag:sr,resultEndIndex:hr,matchStart:vr,newline:Si,text:Ri},map:{Cache:Ae,ensure:Te,get:Oe,set:Fe,MultiCache:Ye,diveEnsure:De,createEmpty:Be,diveDelete:Ue,remove:Ke},args:{ensureArray:Ie,unshift:hi,prepend:fi,insert:ci},tree:{ensure:Me,dive:Re,remove:He,setCustom:jr},gen:{join:bt},npm:{isBuiltIn:Ht,isFile:Kt,install:en,_runCommand:Zt},os:{run:Xt,_resolveStdio:Ut},win:{is:$t},shell:{_handleError:Qt},path:{abs:nn,fws:In,ensureTrailingSlash:Cn,baseName:Rn,_removeExtsFromFile:Nn,file:qn,dir:Bn},js:{enhance:$n,ensureReturn:Ln,splitLastExpression:_n,enableAwait:Fn,_nodeEnableAwait:On,useTitan:Wn,inline:Jn,removeComments:Gn,fromAST:Yn,parse:Vn},titan:{getPackagePath:Dn,getPackageName:Mn},proc:{interrupt:Fr,signal:Or},bool:{fromYN:Sr},env:{setConfig:Pr,getConfig:Mr,resolveConfig:Br,args:mi},fs:{ensureDir:Ur,exists:Wr,mkdir:Kr,ensureParent:Hr,loadLines:Qi,loadText:$i,load:Ji,appendLine:au,addLine:su,append:ou,formatRaw:uu},cli:{parseArgs:function(e){for(var r,i=[],u=!1,o=(r=null==(a=e)?mi():n(a)?gi():a).length,s=0;s<o;s++){var a=r[s];if(!u){var l=a[0];let e;if("-"===l)if("-"===a[1]){if(2===a.length){u=!0;continue}e=2}else e=1;else"/"===l&&(e=1);if(e){var c,f,h=a.slice(e),p=h.indexOf("=");if(-1!==p)c=h.slice(0,p),f=h.slice(p+1);else{c=h;var d=r[s+1];null==d||"-"===d[0]?f=!0:(f=d,s++)}i[c]=f;continue}}i.push(a)}return i},splitArgs:gi,paramFn:function(e,n){return async function(...r){var i=await Lu(e,r,n);Object.assign(globalThis,i)}},validateParams:Lu},stream:{nodeWritable:Oi,NodeWritableStream:Li,_useNode:ki},bin:{ensureByteSafe:iu,isByteSafe:nu,isNodeBuffer:Zi,isTA:tu},ab:{isTA:eu,is:ru}};globalThis.t?Object.keys(Ou).forEach((function(e){if(t[e]){var n=Ou[e];Object.keys(n).forEach((function(r){t[e][r]=n[r]}))}else t[e]=Ou[e]})):globalThis.t=Object.assign({},Ou),globalThis.exports&&(exports.default=globalThis.t);
|
|
1
|
+
var e=function(e,n){return n(e)},n=function(e){return"string"==typeof e},r=function(e){return Array.isArray(e)},i=function(e){return r(e)?e:[e]},u=function(e){return e instanceof Promise},o=function(e,n){var r=e;return u(r)?r.then(n):n(r)},s=function(e){return"function"==typeof e},a=function(e){return s(e)&&null==e.prototype},l=a,c=function(e){return function(){return e.apply(this,arguments)}},f=function(e,n){var r;return r=n?function(){this.super=n;var r=e.apply(this,arguments);return o(r,(()=>(delete this.super,r)))}:l(e)?c(e):e,r._isConstructor=!0,r},h=function(e,n){return e._isConstructor?e:f(e,n)},p=function(){return this},d=function(e){return class extends e{constructor(e,n){super(e,n);var r=this.constructor.name;r&&(this.name=r)}}},v=d(globalThis.Error),m=function(e,n,r){var i=new v(e,r);return n&&Object.assign(i,n),i},y=class extends v{constructor(e,n){super(e??"Not yet implemented",n)}},g=function(e,n,r,i){var u=e[n];if(void 0===u){var o=r;!1!==i&&s(o)&&(o=o(e,n)),e[n]=u=o}return u},w=function(e,n,r,i){return e||(e={}),g(e,n,r,i),e},b=function(e,n){return w(e,"fromFn",n,!1)},E=function(e,n){return new y(e,b(n,E))},x=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},_=function(e){return!x(e)},k=function(e,n,r){return Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!1,configurable:!0}),r},L=k,F=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),L(e,"displayName",n)},A=F,O=function(e,n){return Object.assign(e,n)},S=function(e){var n,r=!1;return function(){return r||(r=!0,n=e.apply(this,arguments)),n}},T=S((function(){return"undefined"==typeof window})),C=T()?require("util").inspect.custom:Symbol("Display"),I=function(e,n){e.prototype[C]=n},j=function(e,u,s,a,l,c){c||(c={}),n(u)&&(u=null);var d,v,y,g=s;if(g)if(r(g)){if([v,y]=g,v)if(r(v)){if(!u)throw m("Bare args array for instanceFn is only valid when extending a class.");var w=v;v=null,d=f((function(){this.super.apply(this,w)}),u)}else v=h(v)}else d=h(g,u);var b=c.bareFn;c.singleton&&(b=function(){return null==F.default&&(F.default=new F(...arguments)),F.default});var x,k=v||d||u||p;function F(){if(!new.target&&b&&!(this instanceof F))return b.apply(this,arguments);var e=this;return o(k.apply(e,arguments),(n=>{if(n&&_(n)&&(e=n,v)){if(!new.target)throw E('Prototype repair is NYI for class instantiation without "new".');if(!u)throw E("instanceFn is not yet supported when extendsClass is null.");var r=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==r&&Object.setPrototypeOf(e,r)}return y?o(y.apply(e,arguments),(()=>e)):e}))}return e&&A(F,e),a?(x=a,u&&Object.setPrototypeOf(a,u.prototype)):x=u?Object.create(u.prototype):{},L(x,"constructor",F),F.prototype=x,l&&O(F,l),c.display&&I(F,c.display),c.implements&&i(c.implements).forEach((e=>e(F))),F},P=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},N=P,R=function(e,n,r,i,u){var o=Symbol();return j(e,Function,[function(){var e=function(){return e[o].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[o]=e,N(this,o)}],r,i,u)},q=function(e){return n=>n===e},M=function(e){return Reflect.ownKeys(e)},D=function(e,n){return(n?M:Object.keys)(e)},B=function(e,n,r){var i={};for(var u of n)Object.hasOwn(e,u)&&(i[u]=e[u],!0===r&&delete e[u]);return i},W=function(e){return e instanceof Set},H=function(e){return W(e)?e:r(e)?new Set(e):new Set([e])},K=H,Y=function(e,n){var r=[],i=[];return e.forEach(((u,o)=>(n(u,o,e)?r:i).push(u))),[r,i]},U=function(e,n,r,i){var u=n;if(s(u))throw E();var o=D(e,i),a=K(u),[l,c]=Y(o,(e=>a.has(e)));return[B(e,l,r),!0===r?e:B(e,c,!1)]},z=function(e,n,r){var i=D(e,r).filter((r=>n(e[r],r,e)));return U(e,i,!1,r)},V=function(e,n){return n<e?n:e},G=function(e,n){return V(e,n)},Q=function*(e,n){null==e&&(e=0),n=null==n?this.length:G(n,this.length);for(var r=e;r<n;r++)yield this[r]},J=function(e,n,r){return null==n&&null==r?e[Symbol.iterator].call(e):Q.call(e,n,r)},$=function(e,n){return n<0?e.length+n:n},X=function(e,n,r,i){return n=null==n?0:$(e,n),r=null==r?e.length:$(e,r),i&&(0==i.inclusiveStart&&n++,i.inclusiveEnd&&r++),[n,r]},Z=function(e,n,r,i){[r,i]=X(e,r,i);for(var u=r;u<i;u++){var o=n(e[u],u,e);void 0!==o&&(e[u]=o)}return e},ee=function(e,n){return n?Z(D(e,n),(n=>[n,e[n]])):Object.entries(e)},te=function(e){return J(ee(this,e))},ne=function(e,n){var r=e[Symbol.iterator];return r?r.call(e):te.call(e,n)},re=function(e){return ne(e,!0)},ie=function(e,n){return null!=e&&e.constructor===n},ue=function(e){return ie(e,Object)},oe=ue,se=function(e,n,r){Object.defineProperty(e,n,{get:r,enumerable:!0,configurable:!0})},ae=function(e,n,r){Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0})},le=function(e,n,r){se(e,n,(function(){if(this===e)return null;var i=r.call(this);return ae(this,n,i),i}))},ce=class extends v{constructor(e,n){super(e??"Unexpected value",n)}},fe=function(e){return require("node:"+e)},he=function(e){return S((()=>fe(e)))},pe=he("util"),de=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),pe().inspect(e,n)},ve=$,me=function(e,n,r,i){return void 0!==n&&(null===n||0===n?n=void 0:(n=ve(e,n),i&&0==i.inclusiveStart&&n++)),void 0!==r&&(null===r||r===e.length?r=void 0:(r=ve(e,r),i&&i.inclusiveEnd&&r++)),[n,r]},ye=function(e,n,r,i,u,o){if(r||null!=i){[r,i]=me(e,r,i,o);var s=e.slice(r,i),a=n(s);return u?u(a,r,i,s,e):a}return n(e)},ge=function(e,n,r,i,u){return ye(e,n,r,i,((n,r,i)=>(void 0!==r?e.slice(0,r):"")+(n||"")+(void 0!==i?e.slice(i):"")),u)},we=ie,be=function(e){return we(e,RegExp)},Ee=function(e,n,r,i){var u=n;if([r,i]=X(e,r,i),s(u))for(var o=r;o<i;o++)e[o]=u(o,e);else e.fill(u,r,i);return e},xe=function(e,n){var r=new Array(e||0);return arguments.length>1&&Ee(r,n),r},_e=function(e,n){return xe(n.length,(r=>e[n[r]]))},ke=function(e,n){return e[n]},Le=function(e,n,r){return e[n]=r},Fe=function(e,n,r){var i=e;return s(i)?i.apply(r,n):i},Ae=function(e,n,r,i,u){i||(i=ke);var o=i(e,n);return void 0===o&&(o=Fe(r,[e,n]),u||(u=Le),u(e,n,o)),o},Oe=function(e,n){return e.get(n)},Se=function(e,n,r){return e.set(n,r)},Te=function(e,n,r){return Ae(e,n,r,Oe,Se)},Ce=class{constructor(){this.store=new Map}get(e,n){return Te(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},Ie=function(e,n){return e.push(n),e},je=Ie,Pe=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},Ne=Symbol("Value"),Re=function(){return{}},qe=function(e){return[e.slice(0,-1),e[e.length-1]]},Me=qe,De=function(e,n,r,i,u,o){r||(r=ke),null==i&&(i=Re),null==u&&(u=Le),null==o&&(o=r);for(var[s,a]=Me(n),l=e,c=s.length,f=0;f<c;f++){var h=s[f],p=r(l,h);if(void 0===p){if(!i)return;p=Ae(l,h,i,r,u)}l=p}if(o)return o(l,a,u)},Be=function(e,n,r,i,u,o){return De(e,n,i,u,o,((e,n)=>Ae(e,n,r,i,o)))},We=function(){return new Map},He=function(e,n,r){return Be(e,n,r,Oe,We,Se)},Ke=function(e,n){return delete e[n],e},Ye=function(e,n,r,i){return De(e,n,r,!1,!1,i||Ke)},Ue=function(e,n){return e.delete(n)},ze=function(e,n){return Ye(e,n,Oe,Ue)},Ve=class{constructor(){this.store=new Map}get(e,n){return e=je(Pe(e),Ne),He(this.store,e,n)}remove(e){return e=je(Pe(e),Ne),ze(this.store,e)}delete(e){return this.remove(e)}},Ge=R("MemoizedFunction",(function(e,n){if(this.base=e,null!=n)if(1===(n=i(n)).length){this.cache=new Ce;var r=n[0];this._cacheKeyFormatter=e=>e[r]}else this.cache=new Ve,this._cacheKeyFormatter=e=>_e(e,n);else this.cache=new Ve,this._cacheKeyFormatter=e=>e;var u=this;return function(){var n=u._cacheKeyFormatter(arguments);return u.cache.get(n,(()=>e.apply(this,arguments)))}}),{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),Qe=function(e,n){return new Ge(e,n)},Je=function(e){return new Set(e)},$e=function(e){var n={};if(e){var r=Je(e);r.has("g")&&(n.global=!0),r.has("i")&&(n.caseInsensitive=!0),r.has("y")&&(n.sticky=!0)}return n},Xe=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},Ze=function(e,n){var r=$e(e);return Xe(Object.assign(r,n))},et=function(e,r){var i=r,u=void 0;return n(i)?u=i:ue(i)&&(u=Ze(e.flags,i)),new RegExp(e,u)},tt=function(e,n){return et(e,e.flags+n)},nt=function(e){return tt(e,"g")},rt=Qe((function(e){return e.global?e:nt(e)}),0),it=function(e){var r=e;return null==r?void 0:n(r)?r:Xe(r)},ut=function(e,n){return new RegExp(e,it(n))},ot=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},st=function(e,n){return ut(ot(e),n)},at=function(e,r,i,u,o,s){return ge(e,(function(e){return e.replaceAll?(be(r)&&(r=rt(r)),e.replaceAll(r,i)):(r=n(r)?st(r,"g"):rt(r),this.replace(r,i))}),u,o,s)},lt=function(e,n,r){return at(e,n,(r??"\\")+n)},ct=function(e,n,r){return null==n&&(n='"'),!1!==r&&(e=lt(e,n,r)),n+e+n},ft=function(e){return ct(e,'"')},ht=function(e){return oe(e)?yt(e):String(e)},pt=function(e,n){return n||(n=dt),"["+e.reduce((function(e,r){return e+n(r)+", "}),"").slice(0,-2)+"]"},dt=function(e){return n(e)?ft(e):r(e)?pt(e):ht(e)},vt=function(e,n,r){D(e,r).forEach(((r,i,u)=>n(r,e[r],i,u)))},mt=function(e,n,r,i){var u=null!=r?r:"";return vt(e,(function(){u=n.call(this,u,...arguments)}),i),u},yt=function(e,n){return n||(n=dt),"{"+mt(e,(function(e,r,i){return e+r+":"+n(i)+", "}),"",!0).slice(0,-2)+"}"},gt=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":yt(e,(e=>bt(e,n-1)))},wt=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":pt(e,(e=>bt(e,n-1)))},bt=function(e,n){return void 0===e?"undefined":null===e?"null":T()?de(e,n):ue(e)?gt(e,maxNumLevels):r(e)?wt(e,maxNumLevels):ht(e)},Et=function(e,n,r,i){if(0===arguments.length)return new ce("Unexpected value received");i||(i={});var u,{expected:o}=i;return u=o?"Received "+bt(e)+", expected one of "+bt(o):"Unexpected value received: "+bt(e),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),i.fromFn||(i.fromFn=Et),new ce(u,i)},xt=function*(e,n){yield*e,yield*n},kt=function(e){return e?" "+e:""},Lt=function(e){return n(e)?e:e.toString()},Ft=R("Interface",(function(e,n,r){r||(r={}),F(this,e),n?[this.stubs,this.defaults]=z(n,q(!0),!0):(this.stubs={},this.defaults={});var u=r.implements?i(r.implements):null,o=this;return function(e){var n=e;return u&&u.forEach((e=>e(n))),o.decorate(n),o.assert(n),n}}),{decorate(e){var n,r,i=e;for(var[u,o]of(i.prototype?(n=i.prototype,r=!0):(n=i,r=!1),re(this.defaults)))if(void 0===n[u])if(oe(o))if(o.value)n[u]=o.value;else{if(!o.setup)throw Et(o,null,"defaultVal");if(!r)throw o.setup(),E("setupFn is NYI for instances");le(n,u,o.setup)}else n[u]=o;return i},assert(e){var n=e,r=null!=n.prototype,i=n.prototype||n,u=xt(re(this.stubs),re(this.defaults));for(var[o]of u){var s;if(void 0===i[o])throw s=r?"Class"+kt(n.name):"Object "+bt(n),s+=" does not satisfy interface "+this.name+' (missing key "'+Lt(o)+'")',m(s)}return n},validate(e){try{return this.assert(e),!0}catch(e){return!1}}},{is(e){return e instanceof this}}),At=function(e,n,r){return new Ft(e,n,r)},Ot=Symbol("Cleanup"),St=At("Handle",{remove:!0,[Ot](){this.remove()}}),Tt=e(class{constructor(e){this.handles=e}remove(){this.handles.forEach((e=>e.remove()))}add(e){return this.handles.push(e),this}},St),Ct=function(e){return 1===e.length&&r(e[0])?e[0]:array},It=function(...e){return new Tt(Ct(e))},jt=It,Pt=jt,Nt=function(e){var n,r,i=e;return null!=i&&(n=i.detail??i.data??i,_(i)&&(r=i)),[n,r,i]},Rt=function(e){return Ft.is(e)},qt=Rt,Mt=d(globalThis.TypeError),Dt=function(e){return null==e?e:e.constructor},Bt=function(e,n,r,i){if(0===arguments.length)return new Mt("Unexpected type received");i||(i={});var u,{type:o,expected:s}=i;return null==o&&(o=Dt(e)),o&&o.name&&(o=o.name),s?(s.name&&(s=s.name),u="Expected "+s+", received "):u="Unexpected type received (",u+=o,null!=e&&(u+=" ("+bt(e)+")"),s||(u+=")"),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),i.fromFn||(i.fromFn=Bt),new Mt(u,i)},Wt=function(e,n,r){if(!qt(n))throw Bt(n,1);return n.decorate(e),r&&r.call(e,e,n),n.assert(e),e},Ht=At,Kt=Symbol("EventTarget"),Yt=function(e){return require(e)},Ut=function(e){return!!e.startsWith("node:")||Yt("node:module").isBuiltin(e)},zt=function(e){return e.startsWith(".")},Vt=function(e){var i=e.stdio;if(i){if(!r(i)){if(!n(i))throw Bt(i,"stdio");if("pipe"===i)i=["pipe","pipe","pipe"];else if("inherit"===i)i=["inherit","inherit","inherit"];else if("ignore"===i)i=["ignore","ignore","ignore"];else{if("overlapped"!==i)throw Et(i,"stdio");i=["overlapped","overlapped","overlapped"]}e.stdio=i}}else i=e.stdio=[null,null,null];return i},Gt=function(e,n){var r=n.length;e.length=r;for(var i=0;i<r;i++)e[i]=n[i];return e},Qt=function(e){return function(){return!e.apply(this,arguments)}},Jt=function(e,n){return Gt(e,e.filter(Qt(n)))},$t=function(e){return Jt(e,(e=>null==e))},Xt=he("child_process"),Zt=S((function(){return"win32"===process.platform})),en=function(e,n,r){if(r||(r={}),n(e))throw e;if(r.nullOnErr&&(r.err=null),void 0!==r.err)return r.err;if(r.onErr)return r.onErr(e,e.stderr);throw e},tn=function(e,n,r){r||(r={}),r.dir&&(r.cwd=r.dir);var i=Vt(r);if(null==i[0]){var u=r.allowInput,o=r.input;if(u&&o)throw m("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");u&&(i[0]="inherit")}if(null==i[1]){var s=r.captureOutput??!1,a=r.showOutput;if(s&&a)throw m("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");s?i[1]="pipe":(null==a&&(a=!0),i[1]=a?"inherit":"ignore")}if(null==i[2]){var l=r.captureErr??!1,c=r.showErr;if(l&&c)throw m("captureErr and showErr cannot be used simultaneously for synchronous child processes.");l?i[2]="pipe":(null==c&&(c=!0),i[2]=c?"inherit":"ignore")}r.encoding||(r.encoding="utf8"),n&&$t(n);try{var f=Xt().execFileSync(e,n,r);null!=f&&(f=f.trim());var h=r.map??r.mapFn;return h&&(f=h(f)),f}catch(e){if(Zt())return en(e,(e=>"ENOENT"===e.code),r);throw e}},nn=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,tn("npm",e,n)},rn=function(e,n,r){return nn(["install",e,n?"-g":null],r)},un=he("path"),on=function(e,n){var r=un().resolve;return n?r(n,e):r(e)},sn=function(e){return require(on(e))},an=class{constructor(){this.store={}}get(e,n){return g(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},ln=new an,cn=he("module"),fn=function(e){return e.endsWith("\\node_modules")||(e+="\\node_modules"),cn().createRequire(e)},hn=function(e,n){return ln.get(e,(()=>fn(e)))(n)},pn=function(e,n,r){return Object.keys(n).forEach((i=>g(e,i,n[i],r))),e},dn=function(e,n,r){return n?pn(e,n,r):e},vn=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},mn=function(e){return e[e.length-1]},yn=$,gn=function(e,n,r){return e=et(e,{global:!0}),null!=r&&(n=yn(r,n)),e.lastIndex=n,e},wn=function(e,n,r){return e=null!=r?gn(e,r,n):rt(e),Array.from(n.matchAll(e))},bn=function(e,n,r){return null!=r&&(n=n.slice(0,r)),mn(wn(e,n))||null},En=function(e,n){var r=bn(e,n);return r&&n.length===r.index+r[0].length?r:null},xn=function(e,n){var r=En(n,e);return r?e.slice(0,r.index):e},_n=function(e,r){if(n(r))return vn(e,r);if(be(r))return xn(e,r);throw Bt(r,1)},kn=_n,Ln=function(e,n){return[e.slice(0,n),e.slice(n)]},Fn=function(e){e=kn(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Ln(e,n+1)},An=function(e,n){return e.startsWith(n)?e:n+e},On=function(e){var[n,r]=Fn(e);return n+An(r.trim(),"return ")},Sn=function(e){return Gr("node-repl-await").processTopLevelAwait(e)},Tn=function(e){return Sn(e)??e},Cn=at,In=function(e,r){if(n(r))return e.endsWith(e);if(be(r))return!!En(r,e);throw Bt(r,1,"matchThis")},jn=/\/|\\/,Pn=function(e){return In(e,jn)?e:e+"/"},Nn=function(e,n){return""===e?e:(null==n&&(n=!0),e=Cn(e,"\\","/"),n?Pn(e):e)},Rn=function(){return process.mainModule?.filename??null},qn=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},Mn=function(e){return e.split(".")[0]},Dn=function(e){return un().win32.basename(e)},Bn=function(e){return Mn(Dn(e))},Wn=function(e,n,r,i){e||(e=Rn()??"_console.js");var u=qn(Bn(e));return n&&(u+="_repl"),u+(r&&i?.dynamic?".dypkg.json":".pkg.js")},Hn=function(e,n){return e=un().dirname(e),!1===n?e:Pn(e)},Kn=function(e,n,r,i){var u,o=Wn(e,n,r,i);return u=e?Hn(e):"./",on(u+o)},Yn=function(e){return'require("'+Nn(Kn(),!1)+'");\n'+e},Un=function(e,n){return at(e,n,"")},zn=function(e,n){return n.forEach((n=>e=Un(e,n))),e},Vn=function(e){return zn(e,["\r","\n"])},Gn=function(e,n){return Gr("astring").generate(e,n)},Qn=function(e,n){return e.stack=n+"\n"+e.stack,e},Jn=function(e,n,r){r||(r={}),!1!==n&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0);var i=Gr("acorn-node");try{return i.parse(e,r)}catch(n){throw Qn(n,"Acorn parsing error: "+e)}},$n=function(e,n,r){return Gn(Jn(e,n,r))},Xn=function(e){return Vn($n(e))},Zn=function(e,n,r){return(n||r)&&(n||(n={}),r&&dn(n,r),n.ensureReturn&&(e=On(e)),n.topLevelAwait&&(e=Tn(e)),n.useTitan&&(e=Yn(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=Xn(e))),e},er=function(e){return n(e)?e:ht(e)},tr=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},nr=function(e,n,r,i,u){return ye(e,n,r,i,((n,r)=>null===n?null:(n.input=e,void 0!==r&&(n.index+=r),n)),u)},rr=function(e,n){return e.splice(e.length,0,...n),n},ir=function(e,n){return rr(e,n),e},ur=ir,or=class extends Array{constructor(e,n,r,i,u){if(-1===n)throw m("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw m("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,i&&ur(this,i),this.index=n,this.input=r,u&&(this.groups=u)}fromParts(e){var n=e;return new or(n.match,n.index,n.input,n.captures,n.groups)}},sr=function(e,n,r,i,u){return new or(e,n,r,i,u)},ar=function(e,n,r,i,u){return-1===n||null==e?null:sr(e,n,r,i,u)},lr=Un,cr=function(e,n){return et(e,lr(e.flags,n))},fr=function(e){return cr(e,"g")},hr=Qe((function(e){return e.global?fr(e):e}),0),pr=function(e,n,r){return(e=null!=r?gn(e,r,n):hr(e)).exec(n)},dr=function(e,r,i,u,o){return nr(e,(e=>{if(n(r)){var i=e.indexOf(r);return ar(r,i,e)}return pr(r,e)}),i,u,o)},vr=function(e){return e.index+e[0].length},mr=function(e,n){var r=dr(e,n);return null===r[0]?null:e.slice(vr(r))},yr=function(e,n){return e.startsWith(n)?e.substring(n.length):e},gr=function(e,n){var r=pr(e,n);return r&&0===r.index?r:null},wr=function(e,n){var r=gr(n,e);return r?e.slice(r[0].length):e},br=function(e,r){if(n(r))return yr(e,r);if(be(r))return wr(e,r);throw Bt(r,1)},Er=br,xr=function(e){var n=mr(e,"=>").trim();return Er(kn(n,"}"),"{")},_r=function(e){return mr(e,"{").slice(0,-1)},kr=function(e){var n=er(e);return tr(n)?xr(n):_r(n)},Lr=function(e){return null==e?"":n(e)?e:s(e)?kr(e):String(e)},Fr=function(e,n){var r=n?.basic?null:{topLevelAwait:!0,useTitan:!0},i=Zn(Lr(e),n,r);return tn("node",["-e",i],n)},Ar=function(e,n,r,i){var u="Required argument";return r&&(u+=' "'+r+'"'),null!=n&&(u+=" (index "+n+")"),u+=" missing",arguments.length>0&&(u+=" (received "+bt(e)+")"),m(u,null,b(i,Ar))},Or=function(e,n,r){if(null==e)throw Ar(e,n,r,{fromFn:Or});return e},Sr=function(e,n){return process.kill(e,Or(n,0,"signalName"))},Tr=function(e){return Sr(e,"SIGINT")},Cr=function(){return Tr(process.pid)},Ir=Cr,jr=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw Et(e,0,"char")},Pr=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=Fr((function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",(e=>{var r=e.toUpperCase();"Y"===r||"N"===r?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))}))}),{basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),Ir(),m("Prompt was cancelled via interrupt.");return console.log(n),jr(n)},Nr=function(e){return r(e)?e:n(e)?e.split("."):[e]},Rr=function(e,n,r,i,u,o){var s=r;return De(e,n,i,u,o,((e,n,r)=>r(e,n,Fe(s))))},qr=function(e,n){var r=n,i=globalThis.config;i||(i=globalThis.config={});var u,o=Nr(e);return o.length>1?u=Rr(i,o,r):(u=Fe(r),i[o[0]]=u),u},Mr=function(e,n){return qr("node.require.customDirs",(r=>(r||(r=[]),!1!==n&&(e.endsWith("node_modules")||(e+="\\node_modules")),r.includes(e)||r.push(e),r))),e},Dr=Mr,Br=De,Wr=function(e){var n=globalThis.config;if(n){var r=Nr(e);return r.length>1?Br(n,r):n[r[0]]}},Hr=function(e,n,r){if(null!=e)return e;var i=Wr(n);return null!=i?i:r},Kr=he("fs"),Yr=function(e){return!!Kr().lstatSync(e,{throwIfNoEntry:!1})},Ur=function(e){var n=Hn(e,!1);return Yr(n)||(n!==e&&Ur(n),Kr().mkdirSync(n)),e},zr=function(e){return Ur(e),Kr().mkdirSync(e),e},Vr=function(e){return Yr(e)?e:zr(e)},Gr=function(e,n){if(Ut(e))return require(e);if(zt(e))return sn(e);try{return require(e)}catch(e){}var r=__dirname,i=process.mainModule?.path;if(i!==r)try{return hn(i,e)}catch(e){}var u=process.cwd();if(u!==i&&u!==r)try{return hn(u,e)}catch(e){}var o=Wr("node.require.customDirs");if(o)for(var s of o)try{return hn(s,e)}catch(e){}var a=Hr(n?.autoInstall,"node.require.autoInstall"),l=Hr(n?.promptInstall,"node.require.promptInstall",!0);if(a||l){var c=a||l;!0===c&&(c="./node_modules"),c=on(c);var f=!1;if(a?(f=!0,console.log('Auto-installing "'+e+'" from npm to "'+c+'"...')):(f=Pr('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+c+'"...'),f){c=Vr(c),rn(e,!1,{cwd:c});try{return Dr(c),hn(c,e)}catch(e){console.error("Failed to load from auto-install dir: ",c)}}}throw m('Module not found: "'+e+'"',{checked:{moduleDir:r,scriptDir:i,cwd:u}})},Qr=S((function(){if(!globalThis.CustomEvent||!globalThis.EventTarget||!globalThis.Event){var e=Gr("event-target-shim");globalThis.Event||(globalThis.Event=e.Event),globalThis.CustomEvent||(globalThis.CustomEvent=class extends globalThis.Event{constructor(e,n){super(e,n),n?.detail&&(this.detail=n.detail)}}),globalThis.EventTarget||(globalThis.EventTarget=e.EventTarget)}return{Event:Event,CustomEvent:CustomEvent,EventTarget:EventTarget}})),Jr=Qr().EventTarget,$r=function(e){var n=Kt,r=e[n];return void 0===r&&(r=new Jr,L(e,n,r)),r},Xr=Ht("EventInterface",{addEventListener(e,n,r){$r(this).addEventListener(e,n,r)},on(e,n){this.addEventListener(e,n)},removeEventListener(e,n){$r(this).removeEventListener(e,n)},off(e,n){this.removeEventListener(e,n)},dispatchEvent(e){return $r(this).dispatchEvent(e)}}),Zr=Xr,ei=function(e){return Wt(e,Zr)},ti=function(e){return!(!e.addEventListener&&!e.on)},ni=function(e){return ti(e)||ei(e),e},ri=function(e,n,r){return e[n]=r,e},ii=function(e,n,r){return ri(e||{},n,r)},ui=function(e,n,r,i){return mi(e,n,r,ii(i,"once",!0))},oi=function(e,n){return function(){var r=n.apply(this,arguments);return e.apply(this,arguments),r}},si=oi,ai=function(e,n,r){return e[n]=si(e[n],r)},li=e(class{constructor(e){this._remover=e}remove(){this._remover()}removeOn(e,n,r){r&&ni(e);var i=ui(target,n,(()=>this.remove()));return ai(this,"remove",(()=>i.remove())),this}},St),ci=class extends li{constructor(e,n){super(e),this.handleEvent=n}},fi=function(e,n){return new ci(e,n)},hi=function(e,n,r){(e.removeEventListener||e.off).call(e,n,r)},pi=function(e,n,r){for(var i=e.length-1;i>=n;i--)e[i+1]=e[i];return e[n]=r,e.length++,e},di=function(e,n){return pi(e,0,n)},vi=di,mi=function(e,n,r,i){if(i?.valueFirst){var u=r;r=function(e){var[n,r]=Nt(e);return vi(arguments,n),arguments[1]=r,u.apply(this,arguments)}}var o=e.addEventListener;return o||(e.on?o=i?.once?e.once:e.on:(ei(e),o=e.addEventListener)),o.call(e,n,r,i),fi((()=>hi(e,n,r)),r)},yi=function(e,n,r,i){return Pt(n.map((n=>mi(e,n,r,i))))},gi=S((function(){return process.argv.slice(2)})),wi=gi,bi=function(e){const n=[];let r="",i="outside",u=!1;for(let o=0;o<e.length;o++){const s=e[o];switch(i){case"outside":'"'===s?u?(r+=s,u=!1):i="insideQuote":"\\"===s?u=!0:" "===s?(r.length>0&&(n.push(r),r=""),u=!1):(r+=s,u=!1);break;case"insideQuote":'"'!==s||u?"\\"!==s||u?(r+=s,u=!1):u=!0:i="outside"}}return r.length>0&&n.push(r),n},Ei=function(){return globalThis.repl?.repl},xi=function(e,n){return null==n&&(n=1),function(){var r=Array.from(arguments),i=r.pop(),u=e.apply(this,r);0===n?(u.then((e=>i(null,e))),u.catch(i)):(u.then(i),u.catch((e=>i.apply(null,ri([],n,e)))))}},_i=async function(){}.constructor,ki=function(e){return ie(e,_i)},Li=function(e){return ki(e)?e:async function(){return e.apply(this,arguments)}},Fi=S((function(){return Gr("node:stream")})),Ai=T()&&Fi().Writable,Oi=function(e,n){return n||(n={}),null==n.objectMode&&(n.objectMode=!0),e?n.write=xi(Li(e),0):n.write||(n.write=(e,n,r)=>r()),new Ai(n)},Si=function(){},Ti=async function(e){var n=Ei();if(n){var r,i=n.eval,u=n.output;n.output=Oi(Si),n.eval=Si;try{n.quickDisableHistory?await n.quickDisableHistory((async function(){r=await e(),n._line()})):r=await e()}finally{n.output=u,n.eval=i}return r}return e()},Ci=he("readline"),Ii=/\r?\n/,ji=function(e){return null==e||void 0!==e.length&&0===e.length},Pi=function(e,n){return Jt(e,ji)},Ni=function(e,n){return e.splice(n,1),e},Ri=function(e,n,r){for(var i={},u=e.length,o=0;o<u;o++){var s=n(e[o],o,e);if(s){var[a,l]=s;r?(i[a]||(i[a]=[]),i[a].push(l)):i[a]=l}}return i},qi=function(e,n,r,i){return[n,r]=X(e,n,r,i),e.slice(n,r)},Mi=function(e,n){return xe(n,e).join("")},Di=function(e){return e?e[0]:null},Bi=function(e,n){var r=null==n?-1:n.index;if(-1===r)return[e];var i=Ln(e,r);return i[1]=i[1].slice(n[0].length),i},Wi=function(e,n,r,i,u){return Bi(e,dr(e,n,r,i,u))},Hi=function(e){return isNaN(e)?null:e},Ki=function(e){return null==e?null:Hi(Number(e))},Yi=Ki,Ui=function(e){return Yi(e)??e},zi=function(e,n){null==n&&(n="=");var r={};return e.forEach((function(e){var[i,u]=Wi(e,n);null!=u&&(u=Ui(u.trim())),r[i.trim()]=u})),r},Vi=w,Gi=class extends Array{constructor(e){var i,u=e;null!=u&&(r(u)?i=u:n(u)&&(i=u.split(Ii))),i?(super(i.length),Object.assign(this,i)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply((e=>e.trim()))}removeEmpty(){return Pi(this)}removeComments(e){for(var n=0;n<this.length;n++){var r=this[n],i=r.indexOf(e);-1!==i&&(""===(r=r.slice(0,i)).trim()?(Ni(this,n),n--):this[n]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return Z(this,e)}join(){return super.join("\n")}toObj(e){return zi(this,e)}mapToObj(e,n){return Ri(this,e,n)}between(e,n,r){return r=Vi(r,"inclusiveEnd",!0),qi(this,e,n,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===mn(this).trim()&&this.pop(),this.length>0))){var e=this.find((e=>""!==e.trim())),n=Di(pr(/^\s*/,e));if(n){var r=n.length;this.apply((e=>{if(e.startsWith(n))return e.slice(r)}))}}return this}deindent(e,n,r){throw E()}indent(e,n){var r=Mi(n??"\t",e??1);return this.apply((e=>r+e))}static is(e){return ie(e,this)}static fromChunks(e){return e.map((e=>kn(e,Ii))).flatMap((e=>Ji(e,!1)))}},Qi=function(e,n){var r=new Gi(e);return n&&r.condense(),r},Ji=function(e,n,r){var i=e.split(Ii);return n?Qi(i,r):i},$i=function(e){return Kr().readFileSync(e,"utf8")},Xi=$i,Zi=function(e,n){return Ji(Xi(e),!0,n)},eu=function(e){return"number"==typeof e},tu=function(e){return e instanceof Buffer},nu=function(e){return ArrayBuffer.isView(e)},ru=nu,iu=function(e){return tu(e)||ru(e)||n(e)},uu=function(e){return e.constructor===ArrayBuffer},ou=function(e){return iu(e)?e:uu(e)?Buffer.from(e):ht(e)},su=function(e){return eu(e)?String(e):ou(e)},au=function(e,n){return Ur(e),Kr().appendFileSync(e,su(n)),e},lu=function(e,n){return au(e,"\n"+n)},cu=lu,fu=function(e){return at(e,"\n","\\n")},hu=fu,pu=function(e,n){if(0===e)return n[0];for(var r=n.length,i="";e>0;){var u=e%r;i=n.charAt(u)+i,e=Math.floor(e/r)}return i},du="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",vu=function(e){return pu(e,du)},mu=function(e,n){for(var r=er(e),i=n.length,u=0,o=0;o<r.length;o++){var s=r[o],a=n.indexOf(s);if(-1===a)throw'Error: "'+s+'" not found in base charset "'+n+'"';u=u*i+a}return u},yu=function(e){return mu(e,du)},gu=function(e,n){return Object.keys(e).map(((r,i)=>n(r,e[r],i,e)))},wu=function(e){return e.slice()},bu=function(e,n){return e.includes(n)||e.push(n),e},Eu=class{constructor(e,n,i,u){(n=r(n)?wu(n):[n]).forEach(u),e&&bu(n,e),this.members=n,this._enableFn=i,this._disableFn=u}enable(e){this.members.forEach((n=>{n!==e&&this._disableFn(n)})),this._enableFn(e)}disableAll(){this.members.forEach((e=>this._disableFn(e)))}},xu=function(e,n,r,i){return new Eu(e,n,r,i)},_u=function(e,n,r){return new Promise((function(i,u){var o=Pt([ui(e,n||"load",(e=>{o.remove(),i(e)})),ui(e,r||"error",(e=>{o.remove(),u(e)}))])}))},ku=j("CLI",T()&&Ci().Interface,[function(e){if(e||(e={}),e.input||(e.input=process.stdin),e.output||null==e.output&&(e.output=process.stdout),null==e.terminal&&(e.terminal=!0),e.historyPath){var n=Yr(e.historyPath)?Zi(e.historyPath):[];e.history=n.reverse()}var r={inputWasRaw:e.input.isRaw},i=Ci().createInterface(e);return i.options=e,i.internal=r,i},function(){var e=this.options;this.rl=Ci(),e.historyPath&&this.on("history",(n=>cu(e.historyPath,n[0]))),e.disabled&&this.disable()}],{prompt(e){this._muted||(this._isPrompt=!0,null!=e&&this.setPrompt(e),super.prompt.apply(this,arguments),delete this._isPrompt)},_refreshLine(){this._muted||(this._isRefresh=!0,super._refreshLine(...arguments),delete this._isRefresh)},_ttyWrite(e,n){(!this._blockExcept||n&&this._blockExcept.includes(n.name))&&super._ttyWrite.apply(this,arguments)},_addHistory(){return this._historyDisabled||null!=this._mask||super._addHistory(),this.line},_writeToOutput(e){if(!this._muted){var n=this._mask;if(null!=n){if(this._isRefresh){var r=this._prompt;e.startsWith(r)&&(super._writeToOutput(r),e=e.slice(r.length))}this._isPrompt||(e=Cn(e,/[^\r\n]/,n))}super._writeToOutput(e)}},async promptLine(e){return this.prompt(e),this.awaitLine()},async prefillPrompt(e,n){var r=n,i=await Fe(r);return this.prompt(e),i&&this.write(hu(er(i))),this.awaitLine()},async promptMultiline(e,r,i,u){if(null==r&&(r="... "),null==i)i=e=>""===e,u||(u=e=>(e.pop(),e));else if(n(i)){var o=i;i=e=>e.endsWith(o)}for(var s=await this.promptLine(e),a=[s];!i(s,a.length,a);)s=await this.promptLine(r),a.push(s);return u&&u(a),a.join("\n")},async promptKey(e,n){this.prompt(e);var r=await this.quickBlockExcept(n,!1,(()=>this.awaitKey(n)));return this.newLine(),r},async promptYN(e){return"y"===(await this.promptKey(e,["y","n"])).toLowerCase()},async promptSelect(e,n,i){var u=n;i||(i={});var o=0;function a(){return o++,vu(o)}if(oe(u))u=gu(u,((e,n,r)=>[a(),e,n]));else{if(!r(u))throw Bt(u);u=u.map(((e,n)=>{if(null==e)return null;if(r(e)){var i=e[0];if(null==i)i=a();else if((i=er(i)).length>1)throw m("Input key must be a single character:",e);var u=e.length;if(1===u)return[i,i,i];if(2===u){var o=e[1];return[i,o,o]}if(3===u)return[i,e[1],e[2]];throw m("Unexpected array length in choices: "+u)}return[a(),e,e]})),$t(u)}if(u.length>35)throw m("promptSelect only supports up to 35 options.");var l=i.displayFn||((e,n)=>"["+e+"] "+n);this.quickDisableHistory((()=>{for(var e=0;e<u.length;e++){var[n,r,i]=u[e];this.write(l(n,r,i,u)+"\n")}}));var c=Ri(u,(e=>[e[0],e])),f=await this.promptKey(e,Object.keys(c)),h=c[f];if(null==h)throw Et(h,"choice");var p=h[2];return s(p)&&(p=await p(h)),i.asObj?{key:f,name:h[1],value:p}:i.asIndex?yu(f)-1:p},blockExcept(e,n){e=i(e).map((e=>String(e).toLowerCase())),0!=n&&bu(e,"return"),this._blockExcept=e},unblock(){delete this._blockExcept},async quickBlockExcept(e,n,r){var i=this._blockExcept;this.blockExcept(e,n);var u=await r();return i?this.blockExcept(i):this.unblock(),u},disable(){this.pause(),this.mute()},enable(){this._mutex?this._mutex.enable(this):this._enable()},_enable(){this.resume(),this.unmute()},mutex(e){var n=xu(this,e,(e=>e._enable()),(e=>e.disable()));this.pause(),this.resume(),n.members.forEach((e=>e._mutex=n))},mask(e){this._mask=e},unmask(){delete this._mask},mute(){this._muted=!0},unmute(){delete this._muted},disableHistory(){this._historyDisabled=!0,this._historyPrev=Si,this._historyNext=Si},enableHistory(){delete this._historyDisabled,delete this._historyPrev,delete this._historyNext},async quickDisableHistory(e){var n=this._historyDisabled;this.disableHistory();try{var r=await e()}finally{return n||this.enableHistory(),r}},awaitLine(){return _u(this,"line")},newLine(){this.write("\n")},newline(){return this.newLine()},onKey(e,n,i){var u=e,o=this.input;if(this.rl.emitKeypressEvents(o),o.isTTY&&o.setRawMode(!0),u){var s=n;if(r(u)){var a=u.map((e=>String(e).toLowerCase()));n=(e,n)=>{e||(e=n.name),a.includes(e.toLowerCase())&&s.call(this,e,n)}}else{var l=String(u).toLowerCase();n=(e,n)=>{e||(e=n.name),e.toLowerCase()===l&&s.call(this,e,n)}}}return mi(o,"keypress",n,i)},async awaitKey(e){return new Promise((n=>{var r=this.onKey(e,(e=>{r.remove(),n(e)}))}))},moveCursor(e,n){return this._moveCursor(e,n)},cursorLeft(e){return this.moveCursor(-e)},cursorRight(e){return this.moveCursor(e)},cursorUp(e){return this.moveCursor(null,-e)},cursorDown(e){return this.moveCursor(null,e)},close(){super.close(),this.input.setRawMode(this.internal.inputWasRaw)}}),Lu=function(e,n){return Ti((async function(){var r=new ku(n);try{var i=await e(r)}finally{r.close()}return i}))},Fu=function(e,n){return Lu((n=>n.promptLine(e)),n)},Au=async function(e,n,r){for(var i={},u=n.length,o=0;o<u;o++){var s,a=n[o];if(a.endsWith("?")&&(a=a.slice(0,-1),s=!0),void 0===(l=e[a])){var l=e[o];if(void 0===l&&!s&&(!1!==r?.prompt&&(l=await Fu(a+": ")),!l))throw Or(void 0,o,a)}i[a]=l}return i},Ou={node:{onError:function(e){return yi(process,["uncaughtException","unhandledRejection"],e)},is:T,display:de,util:pe,_builtInModule:he,requireBuiltIn:fe,require:Gr,_basicRequire:Yt,child_process:Xt,requireLocal:sn,path:un,_requireFromDir:hn,_requireDirCache:ln,_createRequire:fn,module:cn,promptYNSync:Pr,run:Fr,getScriptPath:Rn,sigint:Ir,interrupt:Cr,ensureRequireDir:Dr,addRequireDir:Mr,fs:Kr,pause:function(e){Gr("press-any-key-sync")(e)},beforeExit:function(e){return mi(process,"beforeExit",e)},args:gi,prompt:Fu,quickCLI:Lu,quickDisableREPL:Ti,getREPL:Ei,CLI:ku,readline:Ci},ev:{onAny:yi,multiHandle:Pt,on:mi,resolveValue:Nt,enable:ei,EventInterface:Zr,Interface:Xr,_ensureHasTarget:$r,targetSym:Kt,EventTarget:Jr,polyfill:Qr,handle:fi,ListenerHandle:ci,ensureEnabled:ni,can:ti,once:ui,off:hi,promise:_u},o:{multiHandle:jt,safeEnsure:w,ensure:g,isAny:_,setHidden:L,addNonEnumerable:k,hideKey:N,makeNonEnumerable:P,filterSplit:z,keys:D,allKeys:M,split:U,pick:B,iterateAll:re,iterate:ne,iterator:te,entries:ee,isPure:oe,is:ue,setProtoLazy:le,setGetter:se,forceSet:ae,display:gt,toLiteral:yt,constructorMatches:we,ensureCustom:Ae,get:ke,set:Le,createEmpty:Re,remove:Ke,reduce:mt,each:vt,addInterface:Wt,Cache:an,setDefaults:dn,ensureMulti:pn,resolveKeys:Nr,diveGet:Br,safeSet:ii,touch:ri,fromLines:zi,safeDefault:Vi,mapArr:gu,mutex:xu,_Mutex:Eu},handle:{createMulti:It,MultiHandle:Tt,HandleInterface:St,Handle:li},class:{addInterface:e,create:j,setName:A,addStatics:O,setDisplay:I,isInterface:qt,interface:Ht},ifc:{create:At,Interface:Ft,is:Rt},f:{createClass:R,createConstructor:f,isArrowFn:l,isArrow:a,is:s,wrap:c,ensureConstructor:h,retThis:p,setName:F,one:S,eq:q,memoize:Qe,MemoizedFunction:Ge,not:Qt,body:kr,isArrowString:tr,_getArrowFnBody:xr,_getNormalFnBody:_r,hookAfterMethod:ai,hookAfter:si,injectAfter:oi,callbackify:xi,ensureAsync:Li,isAsync:ki,AsyncFunction:_i,noop:Si},s:{is:n,toLiteral:ft,quote:ct,escape:lt,replaceAll:at,apply:ge,withIndices:ye,chars:Je,from:ht,spaceBefore:kt,fromKey:Lt,removeTrailing:kn,removeFromEnd:_n,_removeStringFromEnd:vn,_removeRegexFromEnd:xn,resolveIndex:yn,splitAtIndex:Ln,ensureStartsWith:An,replace:Cn,endsWith:In,decapitalize:qn,removeLineBreaks:Vn,removeMulti:zn,removeAll:Un,resolve:Lr,ensure:er,after:mr,match:dr,_matchWithIndices:nr,remove:lr,removeLeading:Er,removeFromStart:br,_removeStringFromStart:yr,_removeRegexFromStart:wr,splitLines:Ji,lines:Qi,LinesArray:Gi,repeat:Mi,splitFirst:Wi,_splitByMatch:Bi,escapeLineBreaks:hu,escapeNewLines:fu},a:{is:r,ensure:i,filterSplit:Y,iterate:J,iterator:Q,apply:Z,resolveIndices:X,resolveIndex:$,wrapIndices:me,wrapIndex:ve,pick:_e,create:xe,fill:Ee,push:je,add:Ie,splitLast:Me,splitTail:qe,toLiteral:pt,display:wt,unboxArgs:Ct,removeNullish:$t,removeByFilter:Jt,replaceContents:Gt,last:mn,pushMulti:ur,addMulti:ir,pushThroughMulti:rr,removeEmpty:Pi,removeIndex:Ni,mapToObj:Ri,slice:qi,copy:wu,ensureContains:bu},p:{asyncJoint:o,is:u},err:{create:m,Error:v,Enhanced:d,nyi:E,NYIError:y,defaultFromFn:b,value:Et,ValueError:ce,type:Bt,TypeError:Mt,prepend:Qn,req:Ar},v:{isPrimitive:x,constructorMatches:ie,display:bt,toLiteral:dt,resolve:Fe,type:Dt,req:Or,isEmpty:ji,nullIfNaN:Hi},sym:{display:C,value:Ne,cleanup:Ot},macro:{config:function(e){}},set:{resolve:K,ensure:H,is:W},n:{cap:G,least:V,tryCoerce:Ui,tryParse:Yi,ensure:Ki,is:eu,toBase36:vu,toCustomBase:pu,_base36Digits:du,fromBase36:yu,fromCustomBase:mu},re:{is:be,ensureGlobal:rt,global:nt,addFlag:tt,copy:et,updateFlagString:Ze,parseFlagString:$e,createFlagString:Xe,createEscaped:st,create:ut,resolveFlags:it,escape:ot,matchEnd:En,matchLast:bn,matchAll:wn,setStartIndex:gn,slash:jn,safeCreateResult:ar,createResult:sr,RegexResult:or,match:pr,ensureLocal:hr,local:fr,removeFlag:cr,resultEndIndex:vr,matchStart:gr,newline:Ii,text:Di},map:{Cache:Ce,ensure:Te,get:Oe,set:Se,MultiCache:Ve,diveEnsure:He,createEmpty:We,diveDelete:ze,remove:Ue},args:{ensureArray:Pe,unshift:vi,prepend:di,insert:pi},tree:{ensure:Be,dive:De,remove:Ye,setCustom:Rr},gen:{join:xt},npm:{isBuiltIn:Ut,isFile:zt,install:rn,_runCommand:nn},os:{run:tn,_resolveStdio:Vt},win:{is:Zt},shell:{_handleError:en},path:{abs:on,fws:Nn,ensureTrailingSlash:Pn,baseName:Bn,_removeExtsFromFile:Mn,file:Dn,dir:Hn},js:{enhance:Zn,ensureReturn:On,splitLastExpression:Fn,enableAwait:Tn,_nodeEnableAwait:Sn,useTitan:Yn,inline:Xn,removeComments:$n,fromAST:Gn,parse:Jn},titan:{getPackagePath:Kn,getPackageName:Wn},proc:{interrupt:Tr,signal:Sr},bool:{fromYN:jr},env:{setConfig:qr,getConfig:Wr,resolveConfig:Hr,args:wi},fs:{ensureDir:Vr,exists:Yr,mkdir:zr,ensureParent:Ur,loadLines:Zi,loadText:Xi,load:$i,appendLine:cu,addLine:lu,append:au,formatRaw:su},cli:{parseArgs:function(e){for(var r,i=[],u=!1,o=(r=null==(a=e)?wi():n(a)?bi(a):a).length,s=0;s<o;s++){var a=r[s];if(!u){var l=a[0];let e;if("-"===l)if("-"===a[1]){if(2===a.length){u=!0;continue}e=2}else e=1;else"/"===l&&(e=1);if(e){var c,f,h=a.slice(e),p=h.indexOf("=");if(-1!==p)c=h.slice(0,p),f=h.slice(p+1);else{c=h;var d=r[s+1];null==d||"-"===d[0]?f=!0:(f=d,s++)}i[c]=f;continue}}i.push(a)}return i},splitArgs:bi,paramFn:function(e,n){return async function(...r){var i=await Au(e,r,n);Object.assign(globalThis,i)}},validateParams:Au},stream:{nodeWritable:Oi,NodeWritableStream:Ai,_useNode:Fi},bin:{ensureByteSafe:ou,isByteSafe:iu,isNodeBuffer:tu,isTA:ru},ab:{isTA:nu,is:uu}};globalThis.t?Object.keys(Ou).forEach((function(e){if(t[e]){var n=Ou[e];Object.keys(n).forEach((function(r){t[e][r]=n[r]}))}else t[e]=Ou[e]})):globalThis.t=Object.assign({},Ou),globalThis.exports&&(exports.default=globalThis.t);
|
package/package.json
CHANGED
package/script.pkg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=function(){return process.mainModule?.filename??null},n=function(e){var n,r=!1;return function(){return r||(r=!0,n=e.apply(this,arguments)),n}},r=function(e){return require("node:"+e)},i=function(e){return n((()=>r(e)))},u=i("fs"),o=function(e){return u().readFileSync(e,"utf8")},a=o,s=function(e,n,r){null==n&&(n=!0);const i=u();return(n?i.statSync:i.lstatSync)(e,r)},l=function(e,n){return s(e,n).ino},c=function(e){return!!u().lstatSync(e,{throwIfNoEntry:!1})},f=function(e){return e?"C:/Users/"+e+"/":process.env.USERPROFILE+"\\"},p=function(e,n){return n<0?e.length+n:n},d=p,h=function(e,n,r,i){return void 0!==n&&(null===n||0===n?n=void 0:(n=d(e,n),i&&0==i.inclusiveStart&&n++)),void 0!==r&&(null===r||r===e.length?r=void 0:(r=d(e,r),i&&i.inclusiveEnd&&r++)),[n,r]},v=function(e,n,r,i,u,o){if(r||null!=i){[r,i]=h(e,r,i,o);var a=e.slice(r,i),s=n(a);return u?u(s,r,i,a,e):s}return n(e)},m=function(e,n,r,i,u){return v(e,n,r,i,((n,r,i)=>(void 0!==r?e.slice(0,r):"")+(n||"")+(void 0!==i?e.slice(i):"")),u)},g=function(e){return"string"==typeof e},y=function(e,n){return null!=e&&e.constructor===n},b=y,w=function(e){return b(e,RegExp)},x=function(e){return Array.isArray(e)},O=function(e){return x(e)?e:[e]},T=function(e){return e instanceof Promise},E=function(e,n){var r=e;return T(r)?r.then(n):n(r)},S=function(e){return"function"==typeof e},j=function(e){return S(e)&&null==e.prototype},A=j,N=function(e){return function(){return e.apply(this,arguments)}},F=function(e,n){var r;return r=n?function(){this.super=n;var r=e.apply(this,arguments);return E(r,(()=>(delete this.super,r)))}:A(e)?N(e):e,r._isConstructor=!0,r},k=function(e,n){return e._isConstructor?e:F(e,n)},D=function(){return this},_=function(e){return class extends e{constructor(e,n){super(e,n);var r=this.constructor.name;r&&(this.name=r)}}},I=_(globalThis.Error),P=function(e,n,r){var i=new I(e,r);return n&&Object.assign(i,n),i},C=class extends I{constructor(e,n){super(e??"Not yet implemented",n)}},L=function(e,n,r,i){var u=e[n];if(void 0===u){var o=r;!1!==i&&S(o)&&(o=o(e,n)),e[n]=u=o}return u},M=function(e,n,r,i){return e||(e={}),L(e,n,r,i),e},R=function(e,n){return M(e,"fromFn",n,!1)},q=function(e,n){return new C(e,R(n,q))},G=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},B=function(e){return!G(e)},W=function(e,n,r){return Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!1,configurable:!0}),r},K=W,U=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),K(e,"displayName",n)},J=U,Y=function(e,n){return Object.assign(e,n)},z=function(e){},H=n((function(){return z("node.is")??"undefined"==typeof window})),V=H()?require("util").inspect.custom:Symbol("Display"),$=function(e,n){e.prototype[V]=n},Q=function(e,n,r,i,u,o){o||(o={}),g(n)&&(n=null);var a,s,l,c=r;if(c)if(x(c)){if([s,l]=c,s)if(x(s)){if(!n)throw P("Bare args array for instanceFn is only valid when extending a class.");var f=s;s=null,a=F((function(){this.super.apply(this,f)}),n)}else s=k(s)}else a=k(c,n);var p=o.bareFn;o.singleton&&(p=function(){return null==v.default&&(v.default=new v(...arguments)),v.default});var d,h=s||a||n||D;function v(){if(!new.target&&p&&!(this instanceof v))return p.apply(this,arguments);var e=this;return E(h.apply(e,arguments),(r=>{if(r&&B(r)&&(e=r,s)){if(!new.target)throw q('Prototype repair is NYI for class instantiation without "new".');if(!n)throw q("instanceFn is not yet supported when extendsClass is null.");var i=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==i&&Object.setPrototypeOf(e,i)}return l?E(l.apply(e,arguments),(()=>e)):e}))}return e&&J(v,e),i?(d=i,n&&Object.setPrototypeOf(i,n.prototype)):d=n?Object.create(n.prototype):{},K(d,"constructor",v),v.prototype=d,u&&Y(v,u),o.display&&$(v,o.display),o.implements&&O(o.implements).forEach((e=>e(v))),v},X=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},Z=X,ee=function(e,n,r,i,u){var o=Symbol();return Q(e,Function,[function(){var e=function(){return e[o].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[o]=e,Z(this,o)}],r,i,u)},ne=function(e,n,r,i){return n=null==n?0:p(e,n),r=null==r?e.length:p(e,r),i&&(0==i.inclusiveStart&&n++,i.inclusiveEnd&&r++),[n,r]},re=function(e,n,r,i){var u=n;if([r,i]=ne(e,r,i),S(u))for(var o=r;o<i;o++)e[o]=u(o,e);else e.fill(u,r,i);return e},te=function(e,n){var r=new Array(e||0);return arguments.length>1&&re(r,n),r},ie=function(e,n){return te(n.length,(r=>e[n[r]]))},ue=function(e,n){return e[n]},oe=function(e,n,r){return e[n]=r},ae=function(e,n,r){var i=e;return S(i)?i.apply(r,n):i},se=function(e,n,r,i,u){i||(i=ue);var o=i(e,n);return void 0===o&&(o=ae(r,[e,n]),u||(u=oe),u(e,n,o)),o},le=function(e,n){return e.get(n)},ce=function(e,n,r){return e.set(n,r)},fe=function(e,n,r){return se(e,n,r,le,ce)},pe=class{constructor(){this.store=new Map}get(e,n){return fe(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},de=function(e,n){return e.push(n),e},he=de,ve=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},me=Symbol("Value"),ge=function(){return{}},ye=function(e){return[e.slice(0,-1),e[e.length-1]]},be=ye,we=function(e,n,r,i,u,o){r||(r=ue),null==i&&(i=ge),null==u&&(u=oe),null==o&&(o=r);for(var[a,s]=be(n),l=e,c=a.length,f=0;f<c;f++){var p=a[f],d=r(l,p);if(void 0===d){if(!i)return;d=se(l,p,i,r,u)}l=d}if(o)return o(l,s,u)},xe=function(e,n,r,i,u,o){return we(e,n,i,u,o,((e,n)=>se(e,n,r,i,o)))},Oe=function(){return new Map},Te=function(e,n,r){return xe(e,n,r,le,Oe,ce)},Ee=function(e,n){return delete e[n],e},Se=function(e,n,r,i){return we(e,n,r,!1,!1,i||Ee)},je=function(e,n){return e.delete(n)},Ae=function(e,n){return Se(e,n,le,je)},Ne=class{constructor(){this.store=new Map}get(e,n){return e=he(ve(e),me),Te(this.store,e,n)}remove(e){return e=he(ve(e),me),Ae(this.store,e)}delete(e){return this.remove(e)}},Fe=ee("MemoizedFunction",(function(e,n){if(this.base=e,null!=n)if(1===(n=O(n)).length){this.cache=new pe;var r=n[0];this._cacheKeyFormatter=e=>e[r]}else this.cache=new Ne,this._cacheKeyFormatter=e=>ie(e,n);else this.cache=new Ne,this._cacheKeyFormatter=e=>e;var i=this;return function(){var n=i._cacheKeyFormatter(arguments);return i.cache.get(n,(()=>e.apply(this,arguments)))}}),{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),ke=function(e,n){return new Fe(e,n)},De=function(e){return y(e,Object)},_e=function(e){return new Set(e)},Ie=function(e){var n={};if(e){var r=_e(e);r.has("g")&&(n.global=!0),r.has("i")&&(n.caseInsensitive=!0),r.has("y")&&(n.sticky=!0)}return n},Pe=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},Ce=function(e,n){var r=Ie(e);return Pe(Object.assign(r,n))},Le=function(e,n){var r=n,i=void 0;return g(r)?i=r:De(r)&&(i=Ce(e.flags,r)),new RegExp(e,i)},Me=function(e,n){return Le(e,e.flags+n)},Re=function(e){return Me(e,"g")},qe=ke((function(e){return e.global?e:Re(e)}),0),Ge=function(e){var n=e;return null==n?void 0:g(n)?n:Pe(n)},Be=function(e,n){return new RegExp(e,Ge(n))},We=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},Ke=function(e,n){return Be(We(e),n)},Ue=function(e,n,r,i,u,o){return m(e,(function(e){return e.replaceAll?(w(n)&&(n=qe(n)),e.replaceAll(n,r)):(n=g(n)?Ke(n,"g"):qe(n),this.replace(n,r))}),i,u,o)},Je=Ue,Ye=function(e){return e[e.length-1]},ze=p,He=function(e,n,r){return e=Le(e,{global:!0}),null!=r&&(n=ze(r,n)),e.lastIndex=n,e},Ve=function(e,n,r){return e=null!=r?He(e,r,n):qe(e),Array.from(n.matchAll(e))},$e=function(e,n,r){return null!=r&&(n=n.slice(0,r)),Ye(Ve(e,n))||null},Qe=function(e,n){var r=$e(e,n);return r&&n.length===r.index+r[0].length?r:null},Xe=_(globalThis.TypeError),Ze=function(e){return null==e?e:e.constructor},en=i("util"),nn=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),en().inspect(e,n)},rn=function(e,n,r){return Ue(e,n,(r??"\\")+n)},tn=function(e,n,r){return null==n&&(n='"'),!1!==r&&(e=rn(e,n,r)),n+e+n},un=function(e){return tn(e,'"')},on=De,an=function(e){return on(e)?dn(e):String(e)},sn=function(e,n){return n||(n=ln),"["+e.reduce((function(e,r){return e+n(r)+", "}),"").slice(0,-2)+"]"},ln=function(e){return g(e)?un(e):x(e)?sn(e):an(e)},cn=function(e,n){return(n?Object.getOwnPropertyNames:Object.keys)(e)},fn=function(e,n,r){cn(e,r).forEach(((r,i,u)=>n(r,e[r],i,u)))},pn=function(e,n,r,i){var u=null!=r?r:"";return fn(e,(function(){u=n.call(this,u,...arguments)}),i),u},dn=function(e,n){return n||(n=ln),"{"+pn(e,(function(e,r,i){return e+r+":"+n(i)+", "}),"",!0).slice(0,-2)+"}"},hn=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":dn(e,(e=>mn(e,n-1)))},vn=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":sn(e,(e=>mn(e,n-1)))},mn=function(e,n){return void 0===e?"undefined":null===e?"null":H()?nn(e,n):De(e)?hn(e,maxNumLevels):x(e)?vn(e,maxNumLevels):an(e)},gn=function(e,n,r,i){if(0===arguments.length)return new Xe("Unexpected type received");i||(i={});var u,{type:o,expected:a}=i;return null==o&&(o=Ze(e)),o&&o.name&&(o=o.name),a?(a.name&&(a=a.name),u="Expected "+a+", received "):u="Unexpected type received (",u+=o,null!=e&&(u+=" ("+mn(e)+")"),a||(u+=")"),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),i.fromFn||(i.fromFn=gn),new Xe(u,i)},yn=function(e,n){if(g(n))return e.endsWith(e);if(w(n))return!!Qe(n,e);throw gn(n,1,"matchThis")},bn=/\/|\\/,wn=function(e){return yn(e,bn)?e:e+"/"},xn=function(e,n){return""===e?e:(null==n&&(n=!0),e=Je(e,"\\","/"),n?wn(e):e)},On=function(e){return e?f(e)+"AppData/Local/":xn(process.env.LOCALAPPDATA)},Tn=function(){return process.env.TEMP+"\\"},En=function(e){return e?On(e)+"Temp/":Tn()},Sn=function(){return En()+"Titan/"},jn=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},An=function(e){return e.split(".")[0]},Nn=i("path"),Fn=function(e){return Nn().win32.basename(e)},kn=function(e){return An(Fn(e))},Dn=function(n,r,i,u){n||(n=e()??"_console.js");var o=jn(kn(n));return r&&(o+="_repl"),o+(i&&u?.dynamic?".dypkg.json":".pkg.js")},_n=function(e,n){return e=Nn().dirname(e),!1===n?e:wn(e)},In=function(e,n){var r=Nn().resolve;return n?r(n,e):r(e)},Pn=function(e,n,r,i){var u,o=Dn(e,n,r,i);return u=e?_n(e):"./",In(u+o)},Cn=n((function(){var e=process.env.TITAN_PATH;if(!e)throw P("Environment variable TITAN_PATH is not set.");return wn(e)})),Ln=n((function(){return Cn()+"Compiled/"})),Mn=function(){return new Date},Rn=function(e,n,r,i){var u="Required argument";return r&&(u+=' "'+r+'"'),null!=n&&(u+=" (index "+n+")"),u+=" missing",arguments.length>0&&(u+=" (received "+mn(e)+")"),P(u,null,R(i,Rn))},qn=function(e){return new Date(e.getTime())},Gn=function(e){return new Date(e,null)},Bn=function(e){var n=new Date(e);return isNaN(n.getTime())?null:n},Wn=function(e){return isNaN(e)?null:e},Kn=function(e){return null==e?null:Wn(Number(e))},Un=Kn,Jn=function(e){return"number"==typeof e},Yn=function(e,n){if(null==e)throw Rn(e,0);if(e.constructor===Date)return n?qn(e):e;if(g(e)){var r=Un(e);return null!=r?Gn(r):Bn(e)||null}return Jn(e)?Gn(e):void 0},zn=function(e,n){return null==e?Mn():Yn(e,n)},Hn=function(e){return zn(e,!0)},Vn=Hn,$n=function(){var e=Ln()+"LastCompileTime.txt";return c(e)?Vn(o(e)):null},Qn=function(e){return s(e).mtime},Xn=function(e,n,r){return e=Yn(e),n=Yn(n),!1===r?e<n:e<=n},Zn=function(e){var n=$n();if(n){var r=Qn(e);if(Xn(r,n))return!0}return!1},er=function(e){var n=process.mainModule?.path;return null==n?null:!1!==e?wn(n):n},nr=function(e){return JSON.parse(a(e))},rr=function(e,n,r,i){Object.defineProperty(e,n,{get:r,set:i,enumerable:!0,configurable:!0})},tr=rr,ir=function(e,n,r){arguments.length<3&&(r=e[n]),Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0})},ur=ir,or=function(e,n,r){tr(e,n,(function(){var i=r(n,e);return this[n]=i,i}),(function(e){ur(this,n,e)}))},ar=function(e,n){var r=e.globals,i=e.shortNamesToGlobals;Object.keys(i).forEach((e=>{for(var u=i[e],o=u.length,a=0;a<o;a++){var s=u[a],l=globalThis[s];l||(l=globalThis[s]={});var c=r[s];Object.keys(c).forEach((r=>{var i=n[e][r];l[r]=i}))}})),n._meta||(n._meta={}),n._meta.globals=e.globals},sr=function n(r,i,u){const o=Nn();if(r)r=o.resolve(er(),r);else{var a=e();if(!a)throw new Error("Cannot find package name because scriptPath does not exist.");var s=o.dirname(a),l=o.basename(a).split(".")[0];l=l[0].toLowerCase()+l.slice(1),r=o.join(s,l+".pkg.json")}for(var c=nr(r),f=or,p=c.itemsInOrder,d=p.length,h=0;h<d;h++){let e=p[h],[n,r,u]=e,o=i[n];o||(o=i[n]={}),Object.hasOwn(o,r)||f(o,r,(function(){let t=i;return eval("("+u+")")}))}c.globals&&ar(c,i)},lr=function(e){return require(e)},cr=function(e){return!!e.startsWith("node:")||lr("node:module").isBuiltin(e)},fr=function(e){return e.startsWith(".")},pr=class extends I{constructor(e,n){super(e??"Unexpected value",n)}},dr=function(e,n,r,i){if(0===arguments.length)return new pr("Unexpected value received");i||(i={});var u,{expected:o}=i;return u=o?"Received "+mn(e)+", expected one of "+mn(o):"Unexpected value received: "+mn(e),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),i.fromFn||(i.fromFn=dr),new pr(u,i)},hr=function(e){var n=e.stdio;if(n){if(!x(n)){if(!g(n))throw gn(n,"stdio");if("pipe"===n)n=["pipe","pipe","pipe"];else if("inherit"===n)n=["inherit","inherit","inherit"];else if("ignore"===n)n=["ignore","ignore","ignore"];else{if("overlapped"!==n)throw dr(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},vr=function(e,n){var r=n.length;e.length=r;for(var i=0;i<r;i++)e[i]=n[i];return e},mr=function(e){return function(){return!e.apply(this,arguments)}},gr=function(e,n){return vr(e,e.filter(mr(n)))},yr=function(e){return gr(e,(e=>null==e))},br=i("child_process"),wr=n((function(){return"win32"===process.platform})),xr=function(e,n,r){if(r||(r={}),n(e))throw e;if(r.nullOnErr&&(r.err=null),void 0!==r.err)return r.err;if(r.onErr)return r.onErr(e,e.stderr);throw e},Or=function(e,n,r){r||(r={}),r.dir&&(r.cwd=r.dir);var i=hr(r);if(null==i[0]){var u=r.allowInput,o=r.input;if(u&&o)throw P("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");u&&(i[0]="inherit")}if(null==i[1]){var a=r.captureOutput??!1,s=r.showOutput;if(a&&s)throw P("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");a?i[1]="pipe":(null==s&&(s=!0),i[1]=s?"inherit":"ignore")}if(null==i[2]){var l=r.captureErr??!1,c=r.showErr;if(l&&c)throw P("captureErr and showErr cannot be used simultaneously for synchronous child processes.");l?i[2]="pipe":(null==c&&(c=!0),i[2]=c?"inherit":"ignore")}r.encoding||(r.encoding="utf8"),n&&yr(n);try{var f=br().execFileSync(e,n,r);null!=f&&(f=f.trim());var p=r.map??r.mapFn;return p&&(f=p(f)),f}catch(e){if(wr())return xr(e,(e=>"ENOENT"===e.code),r);throw e}},Tr=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,Or("npm",e,n)},Er=function(e,n,r){return Tr(["install",e,n?"-g":null],r)},Sr=function(e){return require(In(e))},jr=class{constructor(){this.store={}}get(e,n){return L(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},Ar=new jr,Nr=i("module"),Fr=function(e){return e.endsWith("\\node_modules")||(e+="\\node_modules"),Nr().createRequire(e)},kr=function(e,n){return Ar.get(e,(()=>Fr(e)))(n)},Dr=function(e,n,r){return Object.keys(n).forEach((i=>L(e,i,n[i],r))),e},_r=function(e,n,r){return n?Dr(e,n,r):e},Ir=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},Pr=function(e,n){var r=Qe(n,e);return r?e.slice(0,r.index):e},Cr=function(e,n){if(g(n))return Ir(e,n);if(w(n))return Pr(e,n);throw gn(n,1)},Lr=Cr,Mr=function(e,n){return[e.slice(0,n),e.slice(n)]},Rr=function(e){e=Lr(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Mr(e,n+1)},qr=function(e,n){return e.startsWith(n)?e:n+e},Gr=function(e){var[n,r]=Rr(e);return n+qr(r.trim(),"return ")},Br=function(e){return Bt("node-repl-await").processTopLevelAwait(e)},Wr=function(e){return Br(e)??e},Kr=function(e){return'require("'+xn(Pn(),!1)+'");\n'+e},Ur=function(e,n){return Ue(e,n,"")},Jr=function(e,n){return n.forEach((n=>e=Ur(e,n))),e},Yr=function(e){return Jr(e,["\r","\n"])},zr=function(e){return Yr(Jt(e))},Hr=function(e,n,r){return(n||r)&&(n||(n={}),r&&_r(n,r),n.ensureReturn&&(e=Gr(e)),n.topLevelAwait&&(e=Wr(e)),n.useTitan&&(e=Kr(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=zr(e))),e},Vr=function(e){return g(e)?e:an(e)},$r=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},Qr=function(e,n,r,i,u){return v(e,n,r,i,((n,r)=>null===n?null:(n.input=e,void 0!==r&&(n.index+=r),n)),u)},Xr=function(e,n){return e.splice(e.length,0,...n),n},Zr=function(e,n){return Xr(e,n),e},et=Zr,nt=class extends Array{constructor(e,n,r,i,u){if(-1===n)throw P("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw P("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,i&&et(this,i),this.index=n,this.input=r,u&&(this.groups=u)}fromParts(e){var n=e;return new nt(n.match,n.index,n.input,n.captures,n.groups)}},rt=function(e,n,r,i,u){return new nt(e,n,r,i,u)},tt=function(e,n,r,i,u){return-1===n||null==e?null:rt(e,n,r,i,u)},it=Ur,ut=function(e,n){return Le(e,it(e.flags,n))},ot=function(e){return ut(e,"g")},at=ke((function(e){return e.global?ot(e):e}),0),st=function(e,n,r){return(e=null!=r?He(e,r,n):at(e)).exec(n)},lt=function(e,n,r,i,u){return Qr(e,(e=>{if(g(n)){var r=e.indexOf(n);return tt(n,r,e)}return st(n,e)}),r,i,u)},ct=function(e){return e.index+e[0].length},ft=function(e,n){var r=lt(e,n);return null===r[0]?null:e.slice(ct(r))},pt=function(e,n){return e.startsWith(n)?e.substring(n.length):e},dt=function(e,n){var r=st(e,n);return r&&0===r.index?r:null},ht=function(e,n){var r=dt(n,e);return r?e.slice(r[0].length):e},vt=function(e,n){if(g(n))return pt(e,n);if(w(n))return ht(e,n);throw gn(n,1)},mt=vt,gt=function(e){var n=ft(e,"=>").trim();return mt(Lr(n,"}"),"{")},yt=function(e){return ft(e,"{").slice(0,-1)},bt=function(e){var n=Vr(e);return $r(n)?gt(n):yt(n)},wt=function(e){return null==e?"":g(e)?e:S(e)?bt(e):String(e)},xt=function(e,n){var r=n?.basic?null:{topLevelAwait:!0,useTitan:!0},i=Hr(wt(e),n,r);return Or("node",["-e",i],n)},Ot=function(e,n,r){if(null==e)throw Rn(e,n,r,{fromFn:Ot});return e},Tt=function(e,n){return process.kill(e,Ot(n,0,"signalName"))},Et=function(e){return Tt(e,"SIGINT")},St=function(){return Et(process.pid)},jt=St,At=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw dr(e,0,"char")},Nt=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=xt((function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",(e=>{var r=e.toUpperCase();"Y"===r||"N"===r?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))}))}),{basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),jt(),P("Prompt was cancelled via interrupt.");return console.log(n),At(n)},Ft=function(e){return x(e)?e:g(e)?e.split("."):[e]},kt=function(e,n,r,i,u,o){var a=r;return we(e,n,i,u,o,((e,n,r)=>r(e,n,ae(a))))},Dt=function(e,n){var r=n,i=globalThis.config;i||(i=globalThis.config={});var u,o=Ft(e);return o.length>1?u=kt(i,o,r):(u=ae(r),i[o[0]]=u),u},It=function(e,n){return Dt("node.require.customDirs",(r=>(r||(r=[]),!1!==n&&(e.endsWith("node_modules")||(e+="\\node_modules")),r.includes(e)||r.push(e),r))),e},Pt=It,Ct=we,Lt=function(e){var n=globalThis.config;if(n){var r=Ft(e);return r.length>1?Ct(n,r):n[r[0]]}},Mt=function(e,n,r){if(null!=e)return e;var i=Lt(n);return null!=i?i:r},Rt=function(e){var n=_n(e,!1);return c(n)||(n!==e&&Rt(n),u().mkdirSync(n)),e},qt=function(e){return Rt(e),u().mkdirSync(e),e},Gt=function(e){return c(e)?e:qt(e)},Bt=function(e,n){if(cr(e))return require(e);if(fr(e))return Sr(e);try{return require(e)}catch(e){}var r=__dirname,i=process.mainModule?.path;if(i!==r)try{return kr(i,e)}catch(e){}var u=process.cwd();if(u!==i&&u!==r)try{return kr(u,e)}catch(e){}var o=Lt("node.require.customDirs");if(o)for(var a of o)try{return kr(a,e)}catch(e){}var s=Mt(n?.autoInstall,"node.require.autoInstall"),l=Mt(n?.promptInstall,"node.require.promptInstall",!0);if(s||l){var c=s||l;!0===c&&(c="./node_modules"),c=In(c);var f=!1;if(s?(f=!0,console.log('Auto-installing "'+e+'" from npm to "'+c+'"...')):(f=Nt('Npm package "'+e+'" is required. Install now?'))&&console.log('Installing "'+e+'" from npm to "'+c+'"...'),f){c=Gt(c),Er(e,!1,{cwd:c});try{return Pt(c),kr(c,e)}catch(e){console.error("Failed to load from auto-install dir: ",c)}}}throw P('Module not found: "'+e+'"',{checked:{moduleDir:r,scriptDir:i,cwd:u}})},Wt=function(e,n){return Bt("astring").generate(e,n)},Kt=function(e,n){return e.stack=n+"\n"+e.stack,e},Ut=function(e,n,r){r||(r={}),!1!==n&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0);var i=Bt("acorn-node");try{return i.parse(e,r)}catch(n){throw Kt(n,"Acorn parsing error: "+e)}},Jt=function(e,n,r){return Wt(Ut(e,n,r))},Yt=/(['"])(.*?)\1/,zt=Re(Yt),Ht=function(e){return e.replace(zt,"")},Vt=Ht,$t=function(e){return globalThis.structuredClone(e)},Qt=$t,Xt=ke,Zt=/\r?\n/,ei=function(e){return null==e||void 0!==e.length&&0===e.length},ni=function(e,n){return gr(e,ei)},ri=function(e,n){return e.splice(n,1),e},ti=function(e,n,r,i){[r,i]=ne(e,r,i);for(var u=r;u<i;u++){var o=n(e[u],u,e);void 0!==o&&(e[u]=o)}return e},ii=function(e,n,r){for(var i={},u=e.length,o=0;o<u;o++){var a=n(e[o],o,e);if(a){var[s,l]=a;r?(i[s]||(i[s]=[]),i[s].push(l)):i[s]=l}}return i},ui=function(e,n,r,i){return[n,r]=ne(e,n,r,i),e.slice(n,r)},oi=function(e,n){return te(n,e).join("")},ai=function(e){return e?e[0]:null},si=function(e,n){var r=null==n?-1:n.index;if(-1===r)return[e];var i=Mr(e,r);return i[1]=i[1].slice(n[0].length),i},li=function(e,n,r,i,u){return si(e,lt(e,n,r,i,u))},ci=Kn,fi=function(e){return ci(e)??e},pi=function(e,n){null==n&&(n="=");var r={};return e.forEach((function(e){var[i,u]=li(e,n);null!=u&&(u=fi(u.trim())),r[i.trim()]=u})),r},di=M,hi=class extends Array{constructor(e){var n,r=e;null!=r&&(x(r)?n=r:g(r)&&(n=r.split(Zt))),n?(super(n.length),Object.assign(this,n)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply((e=>e.trim()))}removeEmpty(){return ni(this)}removeComments(e){for(var n=0;n<this.length;n++){var r=this[n],i=r.indexOf(e);-1!==i&&(""===(r=r.slice(0,i)).trim()?(ri(this,n),n--):this[n]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return ti(this,e)}join(){return super.join("\n")}toObj(e){return pi(this,e)}mapToObj(e,n){return ii(this,e,n)}between(e,n,r){return r=di(r,"inclusiveEnd",!0),ui(this,e,n,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===Ye(this).trim()&&this.pop(),this.length>0))){var e=this.find((e=>""!==e.trim())),n=ai(st(/^\s*/,e));if(n){var r=n.length;this.apply((e=>{if(e.startsWith(n))return e.slice(r)}))}}return this}deindent(e,n,r){throw q()}indent(e,n){var r=oi(n??"\t",e??1);return this.apply((e=>r+e))}static is(e){return y(e,this)}static fromChunks(e){return e.map((e=>Lr(e,Zt))).flatMap((e=>mi(e,!1)))}},vi=function(e,n){var r=new hi(e);return n&&r.condense(),r},mi=function(e,n,r){var i=e.split(Zt);return n?vi(i,r):i},gi=function(e,n){return mi(a(e),!0,n)},yi=function(e,n){return at(e).test(n)},bi=function(e,n){return w(n)?yi(n,e):e.includes(n)},wi=function(e,n,r,i){null==e&&(e=""),null==n&&(n="");var u={},o=(r,i)=>u[e+r+n]=i;return i&&fn(i,o),r&&fn(r,o),u},xi=function(e,n){return fn(n,((n,r)=>e=Ue(e,n,r))),e},Oi=function(e,n,r,i){var u,o;if(n)if(g(n)){if(!bi(e,n))return e;u=n}else{if(!x(n))throw gn(n,1,"paramIdentifier");if([u,o]=n,!bi(e,u)&&!bi(e,o))return e}var a=wi(u,o,r,i);return xi(e,a)},Ti=function(e){return String(e)},Ei=globalThis.process?.env.windir,Si=function(e){return f(e)+"Desktop/"},ji={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Ei,SYSTEM32:Ei&&Ei+"System32",TEMP:Tn(),DESKTOP:Si()},Ai=function(e,n){return Oi(Ti(e),"$",n,ji)},Ni=function(){return Cn()+"Source/SourceMap.txt"},Fi=function(e){return e?Ai(e,{TITAN:Cn()}):Ni()},ki=function(e,n,r,i,u){return v(e,n,r,i,((e,n)=>-1===e?-1:void 0===n?e:n+e),u)},Di=function(e,n){return Array.prototype.findIndex.call(e,n)},_i=function(e,n,r,i,u){var o=g(n);return o&&null==i&&!u?e.indexOf(n,r):ki(e,(e=>o?e.indexOf(n):w(n)?e.search(n):Di(e,n)),r,i,u)},Ii=function(e,n,r,i,u){var o=_i(e,n,r,i,u);return-1===o?null:e.slice(r,o)},Pi=function(e){var n=e[0];return n===n.toUpperCase()},Ci=function(e,n){var r=[],i=[];return e.forEach(((u,o)=>(n(u,o,e)?r:i).push(u))),[r,i]},Li=Xt((function(e){var n=gi(Fi(e),!0),r={};return n.forEach((e=>{var n=Ii(e,"=").split(",").map((e=>e.trim())),[i,u]=Ci(n,(e=>!Pi(e))),o=i[0];if(!o)throw P('No shortName in SourceMap line: "'+e+'"');u.forEach((e=>{r[e]=o}))})),r}),0),Mi=n((function(e){var n=Object.keys(e);return Be("\\b("+n.join("|")+")\\.(\\w+)","g")})),Ri=/\bt\.(\w+)\.(\w+)/g,qi=function(e,n){n||(n={});var r={},i=r.t={};if(n.enableGlobals){var u;u=n.additionalGlobals?Qt(n.additionalGlobals):{},r.globals=u;var o=Li(),a=Mi(o),s=Ve(a,e).filter((n=>{var r=n[1],i=n[2],u=e[n.index-1];if("."===u||"_"===u)return!1;var o=globalThis[r];return!o||void 0===o[i]}));for(var[l,c,f]of s)u[c]||(u[c]={}),u[c][f]=!0;var p=s.map((([e,n,r])=>{var i=o[n];if(!i)throw P("No short name found for global: "+n);return"t."+i+"."+r+";"})).join(" ");e+="\n"+p}for(var[l,d,f]of s=e.matchAll(Ri))i[d]||(i[d]={}),i[d][f]=!0;return r},Gi=function(e,n){return e=Jt(e),e=Vt(e),qi(e,n)},Bi=function(e,n){return qi(e,n)},Wi=function(e,n,r){if(n){if("js"===(n=n.toLowerCase()))return Gi(e,r);if("html"===n)return Bi(e,r)}return qi(e,r)},Ki=function(e,n){return n in e},Ui=Ki,Ji=function(e,n){for(var r of(Ot(n,1),Object.keys(e))){if(!Ui(n,r))return!1;var i=e[r];if(i&&i.constructor===Object&&!Ji(i,n[r]))return!1}return!0},Yi=function(e,n){if(!Ji(n.t,e))return!0;if(n.globals){var r=e._meta?.globals;if(!r)return!0;if(!Ji(n.globals,r))return!0}return!1},zi=function(e,n,r,i){var u,o,s,l;i||(i={}),e&&(e=In(e)),u=i.packagePath?In(i.packagePath):Pn(e,!1,!0,i);var f,p=c(u);p?(o=Zn(u))?s="New compile":(null==n&&(n=a(e)),l=Wi(n,"js",i),(f=Yi(r,l))&&(s="New deps")):s="No package";var d={needsPack:!!s,scriptPath:e,packagePath:u};return s&&(d.reasonText=s),null!=p&&(d.exists=p),null!=o&&(d.newCompile=o),null!=f&&(d.newDeps=f),n&&(d.sourceText=n),l&&(d.shallowDeps=l),d},Hi=function(e){return yn(e,bn)},Vi=function(e,n){var r=$e(e,n);return r?r.index:-1},$i=bn,Qi=function(e){var n=Vi($i,e);return-1===n?null:e.slice(0,n+1)},Xi=function(e,n,r){if(Hi(e))return r?[e,null]:e;var i,u,o=Qi(e),a=n(Fn(e),o,e);return r?[i,u]=a:i=a,null!=i&&(e=o?o+i:i),r?[e,u]:e},Zi=function(e,n,r,i,u){return Qr(e,(e=>{if(w(n))return $e(n,e);if(g(n)){var r=e.lastIndexOf(n);return-1!==r?new nt(n,r):null}throw gn(n,1)}),r,i,u)},eu=function(e,n,r,i,u){return si(e,Zi(e,n,r,i,u))},nu=function(e){return Xi(e,(e=>eu(e,".")),!0)},ru=function(e,n){var r=nu(e)[1];return r?!1!==n?r.toLowerCase():r:null},tu={},iu=function(e,n,r){if(H()){var i=Nn().join(e,n);return r?wn(i):i}throw q()},uu=Xt((function(e){e=Fi(e);var n=_n(e)+"../Compiled/",r=gi(e,"//"),i=tu;for(var u of r){var o=u.indexOf("="),a=u.slice(0,o).trim();a=a.split(",").map((e=>e.trim())).filter((e=>!Pi(e)));var s=u.slice(o+1).trim(),l=iu(n,s).replaceAll("\\","/");for(var c of a)i[c]=l}return i}),0),ou=function(e,n){var r=n?.fileType;if(r){if("js"===(r=r.toLowerCase()))return Gi(e,n);if("html"===r)return Bi(e,n)}return qi(e,n)},au=function*(e,n){var r=0;for(var i of e)n(i,r++,e)&&(yield i)},su=function(e){return e.slice()},lu=function(e,n,r){for(var i=e.length-1;i>=n;i--)e[i+1]=e[i];return e[n]=r,e.length++,e},cu=function(e,n){return lu(e,e.length,n)},fu=cu,pu=function(e,n){return e.call(this,...n,(function n(){return Ye(arguments)!==n&&fu(arguments,n),e.apply(this,arguments)}))},du=function(e){e||(e={});var n=e.getKeys;n||(n=function(e){return Object.keys(e)});var r=e.recurseIf;if(!r){var i=this.constructor;r=e=>y(e,i)||on(e)||x(e)}var u=e.leavesOnly??e.leafsOnly??!1,o=this;return pu((function*(e,i,a,s){var l=n(e,i,a);if(l)for(var c=l.length,f=0;f<c;f++){var p=l[f],d=e[p],h=su(i);h.push(p);var v=null,m={value:d,key:p,object:e,path:h,level:a,isLeaf:v,root:o},g=r(d,m);m.isLeaf=v=!g,u&&!v||(yield m),g&&(yield*s(d,h,a+1,s))}}),[this,[],0])},hu=function(e,n){return du.call(e,n)},vu=function(e,n){1===arguments.length&&(n=!0);var r={};for(var i of e)r[i]=n;return r},mu=function(e,n,r,i){var u=Ut(e,n,i);Bt("acorn-walk").full(u,r)},gu=function(e,n,r,i){var u;if(g(r))u=e=>e.type===r;else if(x(r)){var o=vu(r);u=e=>o[e.type]}else u=r;var a=[];return mu(e,n,(function(e){u.apply(this,arguments)&&a.push(e)}),i),a},yu=Wt,bu=function(e){var n,r,i,u=e,o=g(u)?Ut(u).body[0]:u,a=o.type;if("VariableDeclaration"===a){n="variable";var s=o.declarations[0];r=s.id.name,i=s.init?s.init.raw??Wt(s.init):"undefined"}else"FunctionDeclaration"===a?n="function":"ClassDeclaration"===a&&(n="class"),r=o.id.name;var l={type:n,name:r};return i&&(l.value=i),l.text=yu(o),l.node=o,l},wu=function(e){return gu(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map((function(e){var n=e.declaration;if(n){var r=bu(n);return r.node=e,r}return{node:e}}))},xu=function(e,n){n||(n={});var r=n.enableGlobals,i=uu(n.sourceMap),u={},a=[];return function e(n,s,l){var f=au(hu(n),(e=>e.isLeaf));for(var p of f){var[d,h]=p.path,v=u[d];if(v||(v=u[d]={}),null==v[h]){var m=i[d];if(m){var g=xn(m)+h+".js";if(!c(g)){var y='Titan compiled value "t.'+d+"."+h+'" does not exist';throw l&&(y+=' (called by "t.'+s+"."+l+'")'),P(y+=".")}var b=o(g),w=wu(b)[0];v[h]=w,e(ou(b,{fileType:"js",enableGlobals:r}).t,d,h),a.push([d,h])}else console.log('Skipping unmapped module "'+d+'"'),v[h]=!1}}}(e.t),{t:u,globals:e.globals,order:a}},Ou=function(e,n){n||(n={});var r=n.deps??Wi(e,n.fileType,n),{t:i,globals:u,order:o}=xu(r,n),a={};if(a.t=r.t,u&&n.enableGlobals){a.globals=u;var s=Li(),l=Object.keys(u),c=ii(l,(e=>[s[e],e]),!0);a.shortNamesToGlobals=c}return a.itemsInOrder=o.map((([e,n])=>{var r=i[e][n];return[e,n,"variable"===r.type?r.value:"("+r.text+")"]})),a},Tu=function(e,n,r){return null==r&&(r=!0),pu((function(e,n,i){fn(e,(function(e,u){if(Ui(n,e)){var o=n[e];r?De(o)&&De(u)?i(u,o):n[e]=u:De(o)&&i(u,o)}else n[e]=u}))}),[e,n]),n},Eu=Tu,Su=function(e){return Object.assign({},e)},ju=function(e,n){if(n){var r={};return e.forEach(((e,i,u)=>r[n(e,i,u)]=!0)),r}return Su(e)},Au=function(e,n){Eu(n.t,e.t,!1);var r=n.globals;if(r){var i=e.globals;i?Eu(r,i,!1):e.globals=r,e.shortNamesToGlobals=n.shortNamesToGlobals}var u=ju(e.itemsInOrder,(e=>e[0]+"."+e[1]));return n.itemsInOrder.forEach((n=>{u[n[0]+"."+n[1]]||e.itemsInOrder.push(n)})),e},Nu=function(e){return e instanceof Buffer},Fu=function(e){return ArrayBuffer.isView(e)},ku=Fu,Du=function(e){return Nu(e)||ku(e)||g(e)},_u=function(e){return e.constructor===ArrayBuffer},Iu=function(e){return Du(e)?e:_u(e)?Buffer.from(e):an(e)},Pu=function(e){return Jn(e)?String(e):Iu(e)},Cu=function(e,n){return Rt(e),u().writeFileSync(e,Pu(n)),e},Lu=function(e,n){var r;return n||(n={}),r=n.condensed?0:null!=n.whitespace?n.whitespace:"\t",JSON.stringify(e,n.replacer,r)},Mu=function(e,n,r){return Cu(e,Lu(n,r))},Ru=function(e,n,r){r||(r={}),r.deps||r.fileType||!n||(r.fileType=ru(n));var i=Ou(e,r),u=r.packagePath||Pn(n,r.repl,!0,r);if(r.dynamic&&(r.packageExists??c(u))&&!(r.newCompile??Zn(u))){var o=nr(u);i=Au(o,i)}return Mu(u,i),u},qu=function(e,n,r,i){var u=zi(e,n,r,i);return u.needsPack&&(i.onPack&&i.onPack(u.reasonText),n=u.sourceText??a(e),i.packagePath=u.packagePath,i.packageExists=u.exists,i.newCompile=u.newCompile,i.deps=u.shallowDeps,Ru(n,e,i),sr(u.packagePath,r,i)),r},Gu={node:{getScriptPath:e,fs:u,_builtInModule:i,requireBuiltIn:r,is:H,display:nn,util:en,path:Nn,getScriptDir:er,require:Bt,_basicRequire:lr,child_process:br,requireLocal:Sr,_requireFromDir:kr,_requireDirCache:Ar,_createRequire:Fr,module:Nr,promptYNSync:Nt,run:xt,sigint:jt,interrupt:St,ensureRequireDir:Pt,addRequireDir:It},fs:{loadText:a,load:o,getID:l,stat:s,exists:c,getModifiedDate:Qn,loadJSON:nr,ensureDir:Gt,mkdir:qt,ensureParent:Rt,loadLines:gi,writeJSON:Mu,write:Cu,formatRaw:Pu},f:{one:n,memoize:ke,MemoizedFunction:Fe,createClass:ee,createConstructor:F,isArrowFn:A,isArrow:j,is:S,wrap:N,ensureConstructor:k,retThis:D,setName:U,not:mr,body:bt,isArrowString:$r,_getArrowFnBody:gt,_getNormalFnBody:yt,cache:Xt,recurse:pu},titan:{getTempDir:Sn,getPackagePath:Pn,getPackageName:Dn,hasNewCompile:Zn,getLastCompileTime:$n,getCompiledDir:Ln,locate:Cn,_loadDynamicDeps:sr,_trackGlobals:ar,autoPackAndLoadJSON:qu,needsToPack:zi,getShallowDeps:Wi,getDepsFromJS:Gi,_getDepsBasic:qi,loadGlobalsMap:Li,_resolveSourceMapPath:Fi,locateSourceMap:Ni,_getGlobalsRegex:Mi,depsRegex:Ri,getDepsFromHTML:Bi,jsonHasNewDeps:Yi,packTextToJSONFile:Ru,packTextToJSON:Ou,_getAllDeps:xu,loadSourceMap:uu,sourceMap:tu,getDeps:ou,addNewItemsToJSON:Au},path:{getTempDir:En,getLocalData:On,getUserDir:f,fws:xn,ensureTrailingSlash:wn,_getDefaultTempDir:Tn,baseName:kn,_removeExtsFromFile:An,file:Fn,dir:_n,abs:In,resolveVars:Ai,string:Ti,_defaultParams:ji,windir:Ei,getDesktop:Si,ext:ru,splitExt:nu,ignoreDir:Xi,isDir:Hi,dirPart:Qi,slash:$i,join:iu},s:{replace:Je,replaceAll:Ue,apply:m,withIndices:v,is:g,chars:_e,endsWith:yn,resolveIndex:ze,toLiteral:un,quote:tn,escape:rn,from:an,decapitalize:jn,removeTrailing:Lr,removeFromEnd:Cr,_removeStringFromEnd:Ir,_removeRegexFromEnd:Pr,splitAtIndex:Mr,ensureStartsWith:qr,removeLineBreaks:Yr,removeMulti:Jr,removeAll:Ur,resolve:wt,ensure:Vr,after:ft,match:lt,_matchWithIndices:Qr,remove:it,removeLeading:mt,removeFromStart:vt,_removeStringFromStart:pt,_removeRegexFromStart:ht,removeQuotes:Ht,splitLines:mi,lines:vi,LinesArray:hi,repeat:oi,splitFirst:li,_splitByMatch:si,replaceParams:Oi,contains:bi,_createParamsObj:wi,_replaceByObj:xi,before:Ii,index:_i,_indexWithIndices:ki,indexOfFn:Di,isCapitalized:Pi,splitLast:eu,matchLast:Zi},a:{wrapIndices:h,wrapIndex:d,resolveIndex:p,is:x,ensure:O,pick:ie,create:te,fill:re,resolveIndices:ne,push:he,add:de,splitLast:be,splitTail:ye,last:Ye,toLiteral:sn,display:vn,removeNullish:yr,removeByFilter:gr,replaceContents:vr,pushMulti:et,addMulti:Zr,pushThroughMulti:Xr,removeEmpty:ni,removeIndex:ri,apply:ti,mapToObj:ii,slice:ui,filterSplit:Ci,copy:su,toObj:ju},re:{is:w,ensureGlobal:qe,global:Re,addFlag:Me,copy:Le,updateFlagString:Ce,parseFlagString:Ie,createFlagString:Pe,createEscaped:Ke,create:Be,resolveFlags:Ge,escape:We,matchEnd:Qe,matchLast:$e,matchAll:Ve,setStartIndex:He,slash:bn,safeCreateResult:tt,createResult:rt,RegexResult:nt,match:st,ensureLocal:at,local:ot,removeFlag:ut,resultEndIndex:ct,matchStart:dt,quotes:zt,quote:Yt,newline:Zt,text:ai,test:yi,lastIndex:Vi},o:{constructorMatches:b,safeEnsure:M,ensure:L,isAny:B,setHidden:K,addNonEnumerable:W,hideKey:Z,makeNonEnumerable:X,ensureCustom:se,get:ue,set:oe,createEmpty:ge,remove:Ee,is:De,display:hn,toLiteral:dn,isPure:on,reduce:pn,each:fn,keys:cn,setLazy:or,setGetterAndSetter:tr,addGetterAndSetter:rr,removeGetterAndSetter:ur,removeGetter:ir,Cache:jr,setDefaults:_r,ensureMulti:Dr,resolveKeys:Ft,diveGet:Ct,deepCopy:Qt,fromLines:pi,safeDefault:di,hasKey:Ui,has:Ki,fromKeys:vu,fromArray:Su},v:{constructorMatches:y,isPrimitive:G,resolve:ae,type:Ze,display:mn,toLiteral:ln,nullIfNaN:Wn,req:Ot,isEmpty:ei},class:{create:Q,setName:J,addStatics:Y,setDisplay:$},p:{asyncJoint:E,is:T},err:{create:P,Error:I,Enhanced:_,nyi:q,NYIError:C,defaultFromFn:R,type:gn,TypeError:Xe,req:Rn,value:dr,ValueError:pr,prepend:Kt},sym:{display:V,value:me},macro:{config:z},map:{Cache:pe,ensure:fe,get:le,set:ce,MultiCache:Ne,diveEnsure:Te,createEmpty:Oe,diveDelete:Ae,remove:je},args:{ensureArray:ve,push:fu,append:cu,insert:lu},tree:{ensure:xe,dive:we,remove:Se,setCustom:kt,copy:$t,isSubsetOf:Ji,iterate:hu,iterator:du,merge:Eu,join:Tu},d:{from:Vn,create:Hn,resolve:zn,now:Mn,ensure:Yn,copy:qn,fromYear:Gn,_resolveNative:Bn,isBefore:Xn},n:{fromString:Un,ensure:Kn,is:Jn,tryCoerce:fi,tryParse:ci},js:{removeComments:Jt,fromAST:Wt,enhance:Hr,ensureReturn:Gr,splitLastExpression:Rr,enableAwait:Wr,_nodeEnableAwait:Br,useTitan:Kr,inline:zr,parse:Ut,removeQuotes:Vt,getExports:wu,getNodes:gu,eachNode:mu,parseDeclaration:bu,fromASTNode:yu},npm:{isBuiltIn:cr,isFile:fr,install:Er,_runCommand:Tr},os:{run:Or,_resolveStdio:hr},win:{is:wr},shell:{_handleError:xr},proc:{interrupt:Et,signal:Tt},bool:{fromYN:At},env:{setConfig:Dt,getConfig:Lt,resolveConfig:Mt},gen:{filter:au},bin:{ensureByteSafe:Iu,isByteSafe:Du,isNodeBuffer:Nu,isTA:ku},ab:{isTA:Fu,is:_u},json:{stringify:Lu}};globalThis.t?Object.keys(Gu).forEach((function(e){if(t[e]){var n=Gu[e];Object.keys(n).forEach((function(r){t[e][r]=n[r]}))}else t[e]=Gu[e]})):globalThis.t=Object.assign({},Gu),globalThis.exports&&(exports.default=globalThis.t);
|
|
1
|
+
var e=function(){return process.mainModule?.filename??null},n=function(e){var n,r=!1;return function(){return r||(r=!0,n=e.apply(this,arguments)),n}},r=function(e){return require("node:"+e)},i=function(e){return n((()=>r(e)))},u=i("fs"),o=function(e){return u().readFileSync(e,"utf8")},a=o,s=function(e,n,r){null==n&&(n=!0);const i=u();return(n?i.statSync:i.lstatSync)(e,r)},l=function(e,n){return s(e,n).ino},c=function(e){return!!u().lstatSync(e,{throwIfNoEntry:!1})},f=function(e){return e?"C:/Users/"+e+"/":process.env.USERPROFILE+"\\"},p=function(e,n){return n<0?e.length+n:n},d=p,h=function(e,n,r,i){return void 0!==n&&(null===n||0===n?n=void 0:(n=d(e,n),i&&0==i.inclusiveStart&&n++)),void 0!==r&&(null===r||r===e.length?r=void 0:(r=d(e,r),i&&i.inclusiveEnd&&r++)),[n,r]},v=function(e,n,r,i,u,o){if(r||null!=i){[r,i]=h(e,r,i,o);var a=e.slice(r,i),s=n(a);return u?u(s,r,i,a,e):s}return n(e)},m=function(e,n,r,i,u){return v(e,n,r,i,((n,r,i)=>(void 0!==r?e.slice(0,r):"")+(n||"")+(void 0!==i?e.slice(i):"")),u)},g=function(e){return"string"==typeof e},y=function(e,n){return null!=e&&e.constructor===n},b=y,w=function(e){return b(e,RegExp)},x=function(e){return Array.isArray(e)},O=function(e){return x(e)?e:[e]},T=function(e){return e instanceof Promise},E=function(e,n){var r=e;return T(r)?r.then(n):n(r)},S=function(e){return"function"==typeof e},A=function(e){return S(e)&&null==e.prototype},N=A,j=function(e){return function(){return e.apply(this,arguments)}},F=function(e,n){var r;return r=n?function(){this.super=n;var r=e.apply(this,arguments);return E(r,(()=>(delete this.super,r)))}:N(e)?j(e):e,r._isConstructor=!0,r},k=function(e,n){return e._isConstructor?e:F(e,n)},D=function(){return this},_=function(e){return class extends e{constructor(e,n){super(e,n);var r=this.constructor.name;r&&(this.name=r)}}},I=_(globalThis.Error),C=function(e,n,r){var i=new I(e,r);return n&&Object.assign(i,n),i},P=class extends I{constructor(e,n){super(e??"Not yet implemented",n)}},L=function(e,n,r,i){var u=e[n];if(void 0===u){var o=r;!1!==i&&S(o)&&(o=o(e,n)),e[n]=u=o}return u},M=function(e,n,r,i){return e||(e={}),L(e,n,r,i),e},R=function(e,n){return M(e,"fromFn",n,!1)},q=function(e,n){return new P(e,R(n,q))},G=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},B=function(e){return!G(e)},W=function(e,n,r){return Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!1,configurable:!0}),r},K=W,U=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),K(e,"displayName",n)},J=U,Y=function(e,n){return Object.assign(e,n)},z=function(e){},H=n((function(){return z("node.is")??"undefined"==typeof window})),V=H()?require("util").inspect.custom:Symbol("Display"),$=function(e,n){e.prototype[V]=n},Q=function(e,n,r,i,u,o){o||(o={}),g(n)&&(n=null);var a,s,l,c=r;if(c)if(x(c)){if([s,l]=c,s)if(x(s)){if(!n)throw C("Bare args array for instanceFn is only valid when extending a class.");var f=s;s=null,a=F((function(){this.super.apply(this,f)}),n)}else s=k(s)}else a=k(c,n);var p=o.bareFn;o.singleton&&(p=function(){return null==v.default&&(v.default=new v(...arguments)),v.default});var d,h=s||a||n||D;function v(){if(!new.target&&p&&!(this instanceof v))return p.apply(this,arguments);var e=this;return E(h.apply(e,arguments),(r=>{if(r&&B(r)&&(e=r,s)){if(!new.target)throw q('Prototype repair is NYI for class instantiation without "new".');if(!n)throw q("instanceFn is not yet supported when extendsClass is null.");var i=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==i&&Object.setPrototypeOf(e,i)}return l?E(l.apply(e,arguments),(()=>e)):e}))}return e&&J(v,e),i?(d=i,n&&Object.setPrototypeOf(i,n.prototype)):d=n?Object.create(n.prototype):{},K(d,"constructor",v),v.prototype=d,u&&Y(v,u),o.display&&$(v,o.display),o.implements&&O(o.implements).forEach((e=>e(v))),v},X=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},Z=X,ee=function(e,n,r,i,u){var o=Symbol();return Q(e,Function,[function(){var e=function(){return e[o].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[o]=e,Z(this,o)}],r,i,u)},ne=function(e,n,r,i){return n=null==n?0:p(e,n),r=null==r?e.length:p(e,r),i&&(0==i.inclusiveStart&&n++,i.inclusiveEnd&&r++),[n,r]},re=function(e,n,r,i){var u=n;if([r,i]=ne(e,r,i),S(u))for(var o=r;o<i;o++)e[o]=u(o,e);else e.fill(u,r,i);return e},te=function(e,n){var r=new Array(e||0);return arguments.length>1&&re(r,n),r},ie=function(e,n){return te(n.length,(r=>e[n[r]]))},ue=function(e,n){return e[n]},oe=function(e,n,r){return e[n]=r},ae=function(e,n,r){var i=e;return S(i)?i.apply(r,n):i},se=function(e,n,r,i,u){i||(i=ue);var o=i(e,n);return void 0===o&&(o=ae(r,[e,n]),u||(u=oe),u(e,n,o)),o},le=function(e,n){return e.get(n)},ce=function(e,n,r){return e.set(n,r)},fe=function(e,n,r){return se(e,n,r,le,ce)},pe=class{constructor(){this.store=new Map}get(e,n){return fe(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},de=function(e,n){return e.push(n),e},he=de,ve=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},me=Symbol("Value"),ge=function(){return{}},ye=function(e){return[e.slice(0,-1),e[e.length-1]]},be=ye,we=function(e,n,r,i,u,o){r||(r=ue),null==i&&(i=ge),null==u&&(u=oe),null==o&&(o=r);for(var[a,s]=be(n),l=e,c=a.length,f=0;f<c;f++){var p=a[f],d=r(l,p);if(void 0===d){if(!i)return;d=se(l,p,i,r,u)}l=d}if(o)return o(l,s,u)},xe=function(e,n,r,i,u,o){return we(e,n,i,u,o,((e,n)=>se(e,n,r,i,o)))},Oe=function(){return new Map},Te=function(e,n,r){return xe(e,n,r,le,Oe,ce)},Ee=function(e,n){return delete e[n],e},Se=function(e,n,r,i){return we(e,n,r,!1,!1,i||Ee)},Ae=function(e,n){return e.delete(n)},Ne=function(e,n){return Se(e,n,le,Ae)},je=class{constructor(){this.store=new Map}get(e,n){return e=he(ve(e),me),Te(this.store,e,n)}remove(e){return e=he(ve(e),me),Ne(this.store,e)}delete(e){return this.remove(e)}},Fe=ee("MemoizedFunction",(function(e,n){if(this.base=e,null!=n)if(1===(n=O(n)).length){this.cache=new pe;var r=n[0];this._cacheKeyFormatter=e=>e[r]}else this.cache=new je,this._cacheKeyFormatter=e=>ie(e,n);else this.cache=new je,this._cacheKeyFormatter=e=>e;var i=this;return function(){var n=i._cacheKeyFormatter(arguments);return i.cache.get(n,(()=>e.apply(this,arguments)))}}),{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),ke=function(e,n){return new Fe(e,n)},De=function(e){return y(e,Object)},_e=function(e){return new Set(e)},Ie=function(e){var n={};if(e){var r=_e(e);r.has("g")&&(n.global=!0),r.has("i")&&(n.caseInsensitive=!0),r.has("y")&&(n.sticky=!0)}return n},Ce=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},Pe=function(e,n){var r=Ie(e);return Ce(Object.assign(r,n))},Le=function(e,n){var r=n,i=void 0;return g(r)?i=r:De(r)&&(i=Pe(e.flags,r)),new RegExp(e,i)},Me=function(e,n){return Le(e,e.flags+n)},Re=function(e){return Me(e,"g")},qe=ke((function(e){return e.global?e:Re(e)}),0),Ge=function(e){var n=e;return null==n?void 0:g(n)?n:Ce(n)},Be=function(e,n){return new RegExp(e,Ge(n))},We=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},Ke=function(e,n){return Be(We(e),n)},Ue=function(e,n,r,i,u,o){return m(e,(function(e){return e.replaceAll?(w(n)&&(n=qe(n)),e.replaceAll(n,r)):(n=g(n)?Ke(n,"g"):qe(n),this.replace(n,r))}),i,u,o)},Je=Ue,Ye=function(e){return e[e.length-1]},ze=p,He=function(e,n,r){return e=Le(e,{global:!0}),null!=r&&(n=ze(r,n)),e.lastIndex=n,e},Ve=function(e,n,r){return e=null!=r?He(e,r,n):qe(e),Array.from(n.matchAll(e))},$e=function(e,n,r){return null!=r&&(n=n.slice(0,r)),Ye(Ve(e,n))||null},Qe=function(e,n){var r=$e(e,n);return r&&n.length===r.index+r[0].length?r:null},Xe=_(globalThis.TypeError),Ze=function(e){return null==e?e:e.constructor},en=i("util"),nn=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),en().inspect(e,n)},rn=function(e,n,r){return Ue(e,n,(r??"\\")+n)},tn=function(e,n,r){return null==n&&(n='"'),!1!==r&&(e=rn(e,n,r)),n+e+n},un=function(e){return tn(e,'"')},on=De,an=function(e){return on(e)?hn(e):String(e)},sn=function(e,n){return n||(n=ln),"["+e.reduce((function(e,r){return e+n(r)+", "}),"").slice(0,-2)+"]"},ln=function(e){return g(e)?un(e):x(e)?sn(e):an(e)},cn=function(e){return Reflect.ownKeys(e)},fn=function(e,n){return(n?cn:Object.keys)(e)},pn=function(e,n,r){fn(e,r).forEach(((r,i,u)=>n(r,e[r],i,u)))},dn=function(e,n,r,i){var u=null!=r?r:"";return pn(e,(function(){u=n.call(this,u,...arguments)}),i),u},hn=function(e,n){return n||(n=ln),"{"+dn(e,(function(e,r,i){return e+r+":"+n(i)+", "}),"",!0).slice(0,-2)+"}"},vn=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":hn(e,(e=>gn(e,n-1)))},mn=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":sn(e,(e=>gn(e,n-1)))},gn=function(e,n){return void 0===e?"undefined":null===e?"null":H()?nn(e,n):De(e)?vn(e,maxNumLevels):x(e)?mn(e,maxNumLevels):an(e)},yn=function(e,n,r,i){if(0===arguments.length)return new Xe("Unexpected type received");i||(i={});var u,{type:o,expected:a}=i;return null==o&&(o=Ze(e)),o&&o.name&&(o=o.name),a?(a.name&&(a=a.name),u="Expected "+a+", received "):u="Unexpected type received (",u+=o,null!=e&&(u+=" ("+gn(e)+")"),a||(u+=")"),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),i.fromFn||(i.fromFn=yn),new Xe(u,i)},bn=function(e,n){if(g(n))return e.endsWith(e);if(w(n))return!!Qe(n,e);throw yn(n,1,"matchThis")},wn=/\/|\\/,xn=function(e){return bn(e,wn)?e:e+"/"},On=function(e,n){return""===e?e:(null==n&&(n=!0),e=Je(e,"\\","/"),n?xn(e):e)},Tn=function(e){return e?f(e)+"AppData/Local/":On(process.env.LOCALAPPDATA)},En=function(){return process.env.TEMP+"\\"},Sn=function(e){return e?Tn(e)+"Temp/":En()},An=function(){return Sn()+"Titan/"},Nn=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},jn=function(e){return e.split(".")[0]},Fn=i("path"),kn=function(e){return Fn().win32.basename(e)},Dn=function(e){return jn(kn(e))},_n=function(n,r,i,u){n||(n=e()??"_console.js");var o=Nn(Dn(n));return r&&(o+="_repl"),o+(i&&u?.dynamic?".dypkg.json":".pkg.js")},In=function(e,n){return e=Fn().dirname(e),!1===n?e:xn(e)},Cn=function(e,n){var r=Fn().resolve;return n?r(n,e):r(e)},Pn=function(e,n,r,i){var u,o=_n(e,n,r,i);return u=e?In(e):"./",Cn(u+o)},Ln=n((function(){var e=process.env.TITAN_PATH;if(!e)throw C("Environment variable TITAN_PATH is not set.");return xn(e)})),Mn=n((function(){return Ln()+"Compiled/"})),Rn=function(){return new Date},qn=function(e,n,r,i){var u="Required argument";return r&&(u+=' "'+r+'"'),null!=n&&(u+=" (index "+n+")"),u+=" missing",arguments.length>0&&(u+=" (received "+gn(e)+")"),C(u,null,R(i,qn))},Gn=function(e){return new Date(e.getTime())},Bn=function(e){return new Date(e,null)},Wn=function(e){var n=new Date(e);return isNaN(n.getTime())?null:n},Kn=function(e){return isNaN(e)?null:e},Un=function(e){return null==e?null:Kn(Number(e))},Jn=Un,Yn=function(e){return"number"==typeof e},zn=function(e,n){if(null==e)throw qn(e,0);if(e.constructor===Date)return n?Gn(e):e;if(g(e)){var r=Jn(e);return null!=r?Bn(r):Wn(e)||null}return Yn(e)?Bn(e):void 0},Hn=function(e,n){return null==e?Rn():zn(e,n)},Vn=function(e){return Hn(e,!0)},$n=Vn,Qn=function(){var e=Mn()+"LastCompileTime.txt";return c(e)?$n(o(e)):null},Xn=function(e){return s(e).mtime},Zn=function(e,n,r){return e=zn(e),n=zn(n),!1===r?e<n:e<=n},er=function(e){var n=Qn();if(n){var r=Xn(e);if(Zn(r,n))return!0}return!1},nr=function(e){var n=process.mainModule?.path;return null==n?null:!1!==e?xn(n):n},rr=function(e){return JSON.parse(a(e))},tr=function(e,n,r,i){Object.defineProperty(e,n,{get:r,set:i,enumerable:!0,configurable:!0})},ir=tr,ur=function(e,n,r){arguments.length<3&&(r=e[n]),Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0})},or=ur,ar=function(e,n,r){ir(e,n,(function(){var i=r(n,e);return this[n]=i,i}),(function(e){or(this,n,e)}))},sr=function(e,n){var r=e.globals,i=e.shortNamesToGlobals;Object.keys(i).forEach((e=>{for(var u=i[e],o=u.length,a=0;a<o;a++){var s=u[a],l=globalThis[s];l||(l=globalThis[s]={});var c=r[s];Object.keys(c).forEach((r=>{var i=n[e][r];l[r]=i}))}})),n._meta||(n._meta={}),n._meta.globals=e.globals},lr=function n(r,i,u){const o=Fn();if(r)r=o.resolve(nr(),r);else{var a=e();if(!a)throw new Error("Cannot find package name because scriptPath does not exist.");var s=o.dirname(a),l=o.basename(a).split(".")[0];l=l[0].toLowerCase()+l.slice(1),r=o.join(s,l+".pkg.json")}for(var c=rr(r),f=ar,p=c.itemsInOrder,d=p.length,h=0;h<d;h++){let e=p[h],[n,r,u]=e,o=i[n];o||(o=i[n]={}),Object.hasOwn(o,r)||f(o,r,(function(){let t=i;return eval("("+u+")")}))}c.globals&&sr(c,i)},cr=function(e){return require(e)},fr=function(e){return!!e.startsWith("node:")||cr("node:module").isBuiltin(e)},pr=function(e){return e.startsWith(".")},dr=class extends I{constructor(e,n){super(e??"Unexpected value",n)}},hr=function(e,n,r,i){if(0===arguments.length)return new dr("Unexpected value received");i||(i={});var u,{expected:o}=i;return u=o?"Received "+gn(e)+", expected one of "+gn(o):"Unexpected value received: "+gn(e),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),i.fromFn||(i.fromFn=hr),new dr(u,i)},vr=function(e){var n=e.stdio;if(n){if(!x(n)){if(!g(n))throw yn(n,"stdio");if("pipe"===n)n=["pipe","pipe","pipe"];else if("inherit"===n)n=["inherit","inherit","inherit"];else if("ignore"===n)n=["ignore","ignore","ignore"];else{if("overlapped"!==n)throw hr(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},mr=function(e,n){var r=n.length;e.length=r;for(var i=0;i<r;i++)e[i]=n[i];return e},gr=function(e){return function(){return!e.apply(this,arguments)}},yr=function(e,n){return mr(e,e.filter(gr(n)))},br=function(e){return yr(e,(e=>null==e))},wr=i("child_process"),xr=n((function(){return"win32"===process.platform})),Or=function(e,n,r){if(r||(r={}),n(e))throw e;if(r.nullOnErr&&(r.err=null),void 0!==r.err)return r.err;if(r.onErr)return r.onErr(e,e.stderr);throw e},Tr=function(e,n,r){r||(r={}),r.dir&&(r.cwd=r.dir);var i=vr(r);if(null==i[0]){var u=r.allowInput,o=r.input;if(u&&o)throw C("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");u&&(i[0]="inherit")}if(null==i[1]){var a=r.captureOutput??!1,s=r.showOutput;if(a&&s)throw C("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");a?i[1]="pipe":(null==s&&(s=!0),i[1]=s?"inherit":"ignore")}if(null==i[2]){var l=r.captureErr??!1,c=r.showErr;if(l&&c)throw C("captureErr and showErr cannot be used simultaneously for synchronous child processes.");l?i[2]="pipe":(null==c&&(c=!0),i[2]=c?"inherit":"ignore")}r.encoding||(r.encoding="utf8"),n&&br(n);try{var f=wr().execFileSync(e,n,r);null!=f&&(f=f.trim());var p=r.map??r.mapFn;return p&&(f=p(f)),f}catch(e){if(xr())return Or(e,(e=>"ENOENT"===e.code),r);throw e}},Er=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,Tr("npm",e,n)},Sr=function(e,n,r){return Er(["install",e,n?"-g":null],r)},Ar=function(e){return require(Cn(e))},Nr=class{constructor(){this.store={}}get(e,n){return L(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},jr=new Nr,Fr=i("module"),kr=function(e){return e.endsWith("\\node_modules")||(e+="\\node_modules"),Fr().createRequire(e)},Dr=function(e,n){return jr.get(e,(()=>kr(e)))(n)},_r=function(e,n,r){return Object.keys(n).forEach((i=>L(e,i,n[i],r))),e},Ir=function(e,n,r){return n?_r(e,n,r):e},Cr=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},Pr=function(e,n){var r=Qe(n,e);return r?e.slice(0,r.index):e},Lr=function(e,n){if(g(n))return Cr(e,n);if(w(n))return Pr(e,n);throw yn(n,1)},Mr=Lr,Rr=function(e,n){return[e.slice(0,n),e.slice(n)]},qr=function(e){e=Mr(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Rr(e,n+1)},Gr=function(e,n){return e.startsWith(n)?e:n+e},Br=function(e){var[n,r]=qr(e);return n+Gr(r.trim(),"return ")},Wr=function(e){return Wt("node-repl-await").processTopLevelAwait(e)},Kr=function(e){return Wr(e)??e},Ur=function(e){return'require("'+On(Pn(),!1)+'");\n'+e},Jr=function(e,n){return Ue(e,n,"")},Yr=function(e,n){return n.forEach((n=>e=Jr(e,n))),e},zr=function(e){return Yr(e,["\r","\n"])},Hr=function(e){return zr(Yt(e))},Vr=function(e,n,r){return(n||r)&&(n||(n={}),r&&Ir(n,r),n.ensureReturn&&(e=Br(e)),n.topLevelAwait&&(e=Kr(e)),n.useTitan&&(e=Ur(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=Hr(e))),e},$r=function(e){return g(e)?e:an(e)},Qr=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},Xr=function(e,n,r,i,u){return v(e,n,r,i,((n,r)=>null===n?null:(n.input=e,void 0!==r&&(n.index+=r),n)),u)},Zr=function(e,n){return e.splice(e.length,0,...n),n},et=function(e,n){return Zr(e,n),e},nt=et,rt=class extends Array{constructor(e,n,r,i,u){if(-1===n)throw C("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw C("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,i&&nt(this,i),this.index=n,this.input=r,u&&(this.groups=u)}fromParts(e){var n=e;return new rt(n.match,n.index,n.input,n.captures,n.groups)}},tt=function(e,n,r,i,u){return new rt(e,n,r,i,u)},it=function(e,n,r,i,u){return-1===n||null==e?null:tt(e,n,r,i,u)},ut=Jr,ot=function(e,n){return Le(e,ut(e.flags,n))},at=function(e){return ot(e,"g")},st=ke((function(e){return e.global?at(e):e}),0),lt=function(e,n,r){return(e=null!=r?He(e,r,n):st(e)).exec(n)},ct=function(e,n,r,i,u){return Xr(e,(e=>{if(g(n)){var r=e.indexOf(n);return it(n,r,e)}return lt(n,e)}),r,i,u)},ft=function(e){return e.index+e[0].length},pt=function(e,n){var r=ct(e,n);return null===r[0]?null:e.slice(ft(r))},dt=function(e,n){return e.startsWith(n)?e.substring(n.length):e},ht=function(e,n){var r=lt(e,n);return r&&0===r.index?r:null},vt=function(e,n){var r=ht(n,e);return r?e.slice(r[0].length):e},mt=function(e,n){if(g(n))return dt(e,n);if(w(n))return vt(e,n);throw yn(n,1)},gt=mt,yt=function(e){var n=pt(e,"=>").trim();return gt(Mr(n,"}"),"{")},bt=function(e){return pt(e,"{").slice(0,-1)},wt=function(e){var n=$r(e);return Qr(n)?yt(n):bt(n)},xt=function(e){return null==e?"":g(e)?e:S(e)?wt(e):String(e)},Ot=function(e,n){var r=n?.basic?null:{topLevelAwait:!0,useTitan:!0},i=Vr(xt(e),n,r);return Tr("node",["-e",i],n)},Tt=function(e,n,r){if(null==e)throw qn(e,n,r,{fromFn:Tt});return e},Et=function(e,n){return process.kill(e,Tt(n,0,"signalName"))},St=function(e){return Et(e,"SIGINT")},At=function(){return St(process.pid)},Nt=At,jt=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw hr(e,0,"char")},Ft=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=Ot((function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",(e=>{var r=e.toUpperCase();"Y"===r||"N"===r?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))}))}),{basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),Nt(),C("Prompt was cancelled via interrupt.");return console.log(n),jt(n)},kt=function(e){return x(e)?e:g(e)?e.split("."):[e]},Dt=function(e,n,r,i,u,o){var a=r;return we(e,n,i,u,o,((e,n,r)=>r(e,n,ae(a))))},It=function(e,n){var r=n,i=globalThis.config;i||(i=globalThis.config={});var u,o=kt(e);return o.length>1?u=Dt(i,o,r):(u=ae(r),i[o[0]]=u),u},Ct=function(e,n){return It("node.require.customDirs",(r=>(r||(r=[]),!1!==n&&(e.endsWith("node_modules")||(e+="\\node_modules")),r.includes(e)||r.push(e),r))),e},Pt=Ct,Lt=we,Mt=function(e){var n=globalThis.config;if(n){var r=kt(e);return r.length>1?Lt(n,r):n[r[0]]}},Rt=function(e,n,r){if(null!=e)return e;var i=Mt(n);return null!=i?i:r},qt=function(e){var n=In(e,!1);return c(n)||(n!==e&&qt(n),u().mkdirSync(n)),e},Gt=function(e){return qt(e),u().mkdirSync(e),e},Bt=function(e){return c(e)?e:Gt(e)},Wt=function(e,n){if(fr(e))return require(e);if(pr(e))return Ar(e);try{return require(e)}catch(e){}var r=__dirname,i=process.mainModule?.path;if(i!==r)try{return Dr(i,e)}catch(e){}var u=process.cwd();if(u!==i&&u!==r)try{return Dr(u,e)}catch(e){}var o=Mt("node.require.customDirs");if(o)for(var a of o)try{return Dr(a,e)}catch(e){}var s=Rt(n?.autoInstall,"node.require.autoInstall"),l=Rt(n?.promptInstall,"node.require.promptInstall",!0);if(s||l){var c=s||l;!0===c&&(c="./node_modules"),c=Cn(c);var f=!1;if(s?(f=!0,console.log('Auto-installing "'+e+'" from npm to "'+c+'"...')):(f=Ft('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+c+'"...'),f){c=Bt(c),Sr(e,!1,{cwd:c});try{return Pt(c),Dr(c,e)}catch(e){console.error("Failed to load from auto-install dir: ",c)}}}throw C('Module not found: "'+e+'"',{checked:{moduleDir:r,scriptDir:i,cwd:u}})},Kt=function(e,n){return Wt("astring").generate(e,n)},Ut=function(e,n){return e.stack=n+"\n"+e.stack,e},Jt=function(e,n,r){r||(r={}),!1!==n&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0);var i=Wt("acorn-node");try{return i.parse(e,r)}catch(n){throw Ut(n,"Acorn parsing error: "+e)}},Yt=function(e,n,r){return Kt(Jt(e,n,r))},zt=/(['"])(.*?)\1/,Ht=Re(zt),Vt=function(e){return e.replace(Ht,"")},$t=Vt,Qt=function(e){return globalThis.structuredClone(e)},Xt=Qt,Zt=ke,ei=/\r?\n/,ni=function(e){return null==e||void 0!==e.length&&0===e.length},ri=function(e,n){return yr(e,ni)},ti=function(e,n){return e.splice(n,1),e},ii=function(e,n,r,i){[r,i]=ne(e,r,i);for(var u=r;u<i;u++){var o=n(e[u],u,e);void 0!==o&&(e[u]=o)}return e},ui=function(e,n,r){for(var i={},u=e.length,o=0;o<u;o++){var a=n(e[o],o,e);if(a){var[s,l]=a;r?(i[s]||(i[s]=[]),i[s].push(l)):i[s]=l}}return i},oi=function(e,n,r,i){return[n,r]=ne(e,n,r,i),e.slice(n,r)},ai=function(e,n){return te(n,e).join("")},si=function(e){return e?e[0]:null},li=function(e,n){var r=null==n?-1:n.index;if(-1===r)return[e];var i=Rr(e,r);return i[1]=i[1].slice(n[0].length),i},ci=function(e,n,r,i,u){return li(e,ct(e,n,r,i,u))},fi=Un,pi=function(e){return fi(e)??e},di=function(e,n){null==n&&(n="=");var r={};return e.forEach((function(e){var[i,u]=ci(e,n);null!=u&&(u=pi(u.trim())),r[i.trim()]=u})),r},hi=M,vi=class extends Array{constructor(e){var n,r=e;null!=r&&(x(r)?n=r:g(r)&&(n=r.split(ei))),n?(super(n.length),Object.assign(this,n)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply((e=>e.trim()))}removeEmpty(){return ri(this)}removeComments(e){for(var n=0;n<this.length;n++){var r=this[n],i=r.indexOf(e);-1!==i&&(""===(r=r.slice(0,i)).trim()?(ti(this,n),n--):this[n]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return ii(this,e)}join(){return super.join("\n")}toObj(e){return di(this,e)}mapToObj(e,n){return ui(this,e,n)}between(e,n,r){return r=hi(r,"inclusiveEnd",!0),oi(this,e,n,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===Ye(this).trim()&&this.pop(),this.length>0))){var e=this.find((e=>""!==e.trim())),n=si(lt(/^\s*/,e));if(n){var r=n.length;this.apply((e=>{if(e.startsWith(n))return e.slice(r)}))}}return this}deindent(e,n,r){throw q()}indent(e,n){var r=ai(n??"\t",e??1);return this.apply((e=>r+e))}static is(e){return y(e,this)}static fromChunks(e){return e.map((e=>Mr(e,ei))).flatMap((e=>gi(e,!1)))}},mi=function(e,n){var r=new vi(e);return n&&r.condense(),r},gi=function(e,n,r){var i=e.split(ei);return n?mi(i,r):i},yi=function(e,n){return gi(a(e),!0,n)},bi=function(e,n){return st(e).test(n)},wi=function(e,n){return w(n)?bi(n,e):e.includes(n)},xi=function(e,n,r,i){null==e&&(e=""),null==n&&(n="");var u={},o=(r,i)=>u[e+r+n]=i;return i&&pn(i,o),r&&pn(r,o),u},Oi=function(e,n){return pn(n,((n,r)=>e=Ue(e,n,r))),e},Ti=function(e,n,r,i){var u,o;if(n)if(g(n)){if(!wi(e,n))return e;u=n}else{if(!x(n))throw yn(n,1,"paramIdentifier");if([u,o]=n,!wi(e,u)&&!wi(e,o))return e}var a=xi(u,o,r,i);return Oi(e,a)},Ei=function(e){return String(e)},Si=globalThis.process?.env.windir,Ai=function(e){return f(e)+"Desktop/"},Ni={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Si,SYSTEM32:Si&&Si+"System32",TEMP:En(),DESKTOP:Ai()},ji=function(e,n){return Ti(Ei(e),"$",n,Ni)},Fi=function(){return Ln()+"Source/SourceMap.txt"},ki=function(e){return e?ji(e,{TITAN:Ln()}):Fi()},Di=function(e,n,r,i,u){return v(e,n,r,i,((e,n)=>-1===e?-1:void 0===n?e:n+e),u)},_i=function(e,n){return Array.prototype.findIndex.call(e,n)},Ii=function(e,n,r,i,u){var o=g(n);return o&&null==i&&!u?e.indexOf(n,r):Di(e,(e=>o?e.indexOf(n):w(n)?e.search(n):_i(e,n)),r,i,u)},Ci=function(e,n,r,i,u){var o=Ii(e,n,r,i,u);return-1===o?null:e.slice(r,o)},Pi=function(e){var n=e[0];return n===n.toUpperCase()},Li=function(e,n){var r=[],i=[];return e.forEach(((u,o)=>(n(u,o,e)?r:i).push(u))),[r,i]},Mi=Zt((function(e){var n=yi(ki(e),!0),r={};return n.forEach((e=>{var n=Ci(e,"=").split(",").map((e=>e.trim())),[i,u]=Li(n,(e=>!Pi(e))),o=i[0];if(!o)throw C('No shortName in SourceMap line: "'+e+'"');u.forEach((e=>{r[e]=o}))})),r}),0),Ri=n((function(e){var n=Object.keys(e);return Be("\\b("+n.join("|")+")\\.(\\w+)","g")})),qi=/\bt\.(\w+)\.(\w+)/g,Gi=function(e,n){n||(n={});var r={},i=r.t={};if(n.enableGlobals){var u;u=n.additionalGlobals?Xt(n.additionalGlobals):{},r.globals=u;var o=Mi(),a=Ri(o),s=Ve(a,e).filter((n=>{var r=n[1],i=n[2],u=e[n.index-1];if("."===u||"_"===u)return!1;var o=globalThis[r];return!o||void 0===o[i]}));for(var[l,c,f]of s)u[c]||(u[c]={}),u[c][f]=!0;var p=s.map((([e,n,r])=>{var i=o[n];if(!i)throw C("No short name found for global: "+n);return"t."+i+"."+r+";"})).join(" ");e+="\n"+p}for(var[l,d,f]of s=e.matchAll(qi))i[d]||(i[d]={}),i[d][f]=!0;return r},Bi=function(e,n){return e=Yt(e),e=$t(e),Gi(e,n)},Wi=function(e,n){return Gi(e,n)},Ki=function(e,n,r){if(n){if("js"===(n=n.toLowerCase()))return Bi(e,r);if("html"===n)return Wi(e,r)}return Gi(e,r)},Ui=function(e,n){return n in e},Ji=Ui,Yi=function(e,n){for(var r of(Tt(n,1),Object.keys(e))){if(!Ji(n,r))return!1;var i=e[r];if(i&&i.constructor===Object&&!Yi(i,n[r]))return!1}return!0},zi=function(e,n){if(!Yi(n.t,e))return!0;if(n.globals){var r=e._meta?.globals;if(!r)return!0;if(!Yi(n.globals,r))return!0}return!1},Hi=function(e,n,r,i){var u,o,s,l;i||(i={}),e&&(e=Cn(e)),u=i.packagePath?Cn(i.packagePath):Pn(e,!1,!0,i);var f,p=c(u);p?(o=er(u))?s="New compile":(null==n&&(n=a(e)),l=Ki(n,"js",i),(f=zi(r,l))&&(s="New deps")):s="No package";var d={needsPack:!!s,scriptPath:e,packagePath:u};return s&&(d.reasonText=s),null!=p&&(d.exists=p),null!=o&&(d.newCompile=o),null!=f&&(d.newDeps=f),n&&(d.sourceText=n),l&&(d.shallowDeps=l),d},Vi=function(e){return bn(e,wn)},$i=function(e,n){var r=$e(e,n);return r?r.index:-1},Qi=wn,Xi=function(e){var n=$i(Qi,e);return-1===n?null:e.slice(0,n+1)},Zi=function(e,n,r){if(Vi(e))return r?[e,null]:e;var i,u,o=Xi(e),a=n(kn(e),o,e);return r?[i,u]=a:i=a,null!=i&&(e=o?o+i:i),r?[e,u]:e},eu=function(e,n,r,i,u){return Xr(e,(e=>{if(w(n))return $e(n,e);if(g(n)){var r=e.lastIndexOf(n);return-1!==r?new rt(n,r):null}throw yn(n,1)}),r,i,u)},nu=function(e,n,r,i,u){return li(e,eu(e,n,r,i,u))},ru=function(e){return Zi(e,(e=>nu(e,".")),!0)},tu=function(e,n){var r=ru(e)[1];return r?!1!==n?r.toLowerCase():r:null},iu={},uu=function(e,n,r){if(H()){var i=Fn().join(e,n);return r?xn(i):i}throw q()},ou=Zt((function(e){e=ki(e);var n=In(e)+"../Compiled/",r=yi(e,"//"),i=iu;for(var u of r){var o=u.indexOf("="),a=u.slice(0,o).trim();a=a.split(",").map((e=>e.trim())).filter((e=>!Pi(e)));var s=u.slice(o+1).trim(),l=uu(n,s).replaceAll("\\","/");for(var c of a)i[c]=l}return i}),0),au=function(e,n){var r=n?.fileType;if(r){if("js"===(r=r.toLowerCase()))return Bi(e,n);if("html"===r)return Wi(e,n)}return Gi(e,n)},su=function*(e,n){var r=0;for(var i of e)n(i,r++,e)&&(yield i)},lu=function(e){return e.slice()},cu=function(e,n,r){for(var i=e.length-1;i>=n;i--)e[i+1]=e[i];return e[n]=r,e.length++,e},fu=function(e,n){return cu(e,e.length,n)},pu=fu,du=function(e,n){return e.call(this,...n,(function n(){return Ye(arguments)!==n&&pu(arguments,n),e.apply(this,arguments)}))},hu=function(e){e||(e={});var n=e.getKeys;n||(n=function(e){return Object.keys(e)});var r=e.recurseIf;if(!r){var i=this.constructor;r=e=>y(e,i)||on(e)||x(e)}var u=e.leavesOnly??e.leafsOnly??!1,o=this;return du((function*(e,i,a,s){var l=n(e,i,a);if(l)for(var c=l.length,f=0;f<c;f++){var p=l[f],d=e[p],h=lu(i);h.push(p);var v=null,m={value:d,key:p,object:e,path:h,level:a,isLeaf:v,root:o},g=r(d,m);m.isLeaf=v=!g,u&&!v||(yield m),g&&(yield*s(d,h,a+1,s))}}),[this,[],0])},vu=function(e,n){return hu.call(e,n)},mu=function(e,n){1===arguments.length&&(n=!0);var r={};for(var i of e)r[i]=n;return r},gu=function(e,n,r,i){var u=Jt(e,n,i);Wt("acorn-walk").full(u,r)},yu=function(e,n,r,i){var u;if(g(r))u=e=>e.type===r;else if(x(r)){var o=mu(r);u=e=>o[e.type]}else u=r;var a=[];return gu(e,n,(function(e){u.apply(this,arguments)&&a.push(e)}),i),a},bu=Kt,wu=function(e){var n,r,i,u=e,o=g(u)?Jt(u).body[0]:u,a=o.type;if("VariableDeclaration"===a){n="variable";var s=o.declarations[0];r=s.id.name,i=s.init?s.init.raw??Kt(s.init):"undefined"}else"FunctionDeclaration"===a?n="function":"ClassDeclaration"===a&&(n="class"),r=o.id.name;var l={type:n,name:r};return i&&(l.value=i),l.text=bu(o),l.node=o,l},xu=function(e){return yu(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map((function(e){var n=e.declaration;if(n){var r=wu(n);return r.node=e,r}return{node:e}}))},Ou=function(e,n){n||(n={});var r=n.enableGlobals,i=ou(n.sourceMap),u={},a=[];return function e(n,s,l){var f=su(vu(n),(e=>e.isLeaf));for(var p of f){var[d,h]=p.path,v=u[d];if(v||(v=u[d]={}),null==v[h]){var m=i[d];if(m){var g=On(m)+h+".js";if(!c(g)){var y='Titan compiled value "t.'+d+"."+h+'" does not exist';throw l&&(y+=' (called by "t.'+s+"."+l+'")'),C(y+=".")}var b=o(g),w=xu(b)[0];v[h]=w,e(au(b,{fileType:"js",enableGlobals:r}).t,d,h),a.push([d,h])}else console.log('Skipping unmapped module "'+d+'"'),v[h]=!1}}}(e.t),{t:u,globals:e.globals,order:a}},Tu=function(e,n){n||(n={});var r=n.deps??Ki(e,n.fileType,n),{t:i,globals:u,order:o}=Ou(r,n),a={};if(a.t=r.t,u&&n.enableGlobals){a.globals=u;var s=Mi(),l=Object.keys(u),c=ui(l,(e=>[s[e],e]),!0);a.shortNamesToGlobals=c}return a.itemsInOrder=o.map((([e,n])=>{var r=i[e][n];return[e,n,"variable"===r.type?r.value:"("+r.text+")"]})),a},Eu=function(e,n,r){return null==r&&(r=!0),du((function(e,n,i){pn(e,(function(e,u){if(Ji(n,e)){var o=n[e];r?De(o)&&De(u)?i(u,o):n[e]=u:De(o)&&i(u,o)}else n[e]=u}))}),[e,n]),n},Su=Eu,Au=function(e){return Object.assign({},e)},Nu=function(e,n){if(n){var r={};return e.forEach(((e,i,u)=>r[n(e,i,u)]=!0)),r}return Au(e)},ju=function(e,n){Su(n.t,e.t,!1);var r=n.globals;if(r){var i=e.globals;i?Su(r,i,!1):e.globals=r,e.shortNamesToGlobals=n.shortNamesToGlobals}var u=Nu(e.itemsInOrder,(e=>e[0]+"."+e[1]));return n.itemsInOrder.forEach((n=>{u[n[0]+"."+n[1]]||e.itemsInOrder.push(n)})),e},Fu=function(e){return e instanceof Buffer},ku=function(e){return ArrayBuffer.isView(e)},Du=ku,_u=function(e){return Fu(e)||Du(e)||g(e)},Iu=function(e){return e.constructor===ArrayBuffer},Cu=function(e){return _u(e)?e:Iu(e)?Buffer.from(e):an(e)},Pu=function(e){return Yn(e)?String(e):Cu(e)},Lu=function(e,n){return qt(e),u().writeFileSync(e,Pu(n)),e},Mu=function(e,n){var r;return n||(n={}),r=n.condensed?0:null!=n.whitespace?n.whitespace:"\t",JSON.stringify(e,n.replacer,r)},Ru=function(e,n,r){return Lu(e,Mu(n,r))},qu=function(e,n,r){r||(r={}),r.deps||r.fileType||!n||(r.fileType=tu(n));var i=Tu(e,r),u=r.packagePath||Pn(n,r.repl,!0,r);if(r.dynamic&&(r.packageExists??c(u))&&!(r.newCompile??er(u))){var o=rr(u);i=ju(o,i)}return Ru(u,i),u},Gu=function(e,n,r,i){var u=Hi(e,n,r,i);return u.needsPack&&(i.onPack&&i.onPack(u.reasonText),n=u.sourceText??a(e),i.packagePath=u.packagePath,i.packageExists=u.exists,i.newCompile=u.newCompile,i.deps=u.shallowDeps,qu(n,e,i),lr(u.packagePath,r,i)),r},Bu={node:{getScriptPath:e,fs:u,_builtInModule:i,requireBuiltIn:r,is:H,display:nn,util:en,path:Fn,getScriptDir:nr,require:Wt,_basicRequire:cr,child_process:wr,requireLocal:Ar,_requireFromDir:Dr,_requireDirCache:jr,_createRequire:kr,module:Fr,promptYNSync:Ft,run:Ot,sigint:Nt,interrupt:At,ensureRequireDir:Pt,addRequireDir:Ct},fs:{loadText:a,load:o,getID:l,stat:s,exists:c,getModifiedDate:Xn,loadJSON:rr,ensureDir:Bt,mkdir:Gt,ensureParent:qt,loadLines:yi,writeJSON:Ru,write:Lu,formatRaw:Pu},f:{one:n,memoize:ke,MemoizedFunction:Fe,createClass:ee,createConstructor:F,isArrowFn:N,isArrow:A,is:S,wrap:j,ensureConstructor:k,retThis:D,setName:U,not:gr,body:wt,isArrowString:Qr,_getArrowFnBody:yt,_getNormalFnBody:bt,cache:Zt,recurse:du},titan:{getTempDir:An,getPackagePath:Pn,getPackageName:_n,hasNewCompile:er,getLastCompileTime:Qn,getCompiledDir:Mn,locate:Ln,_loadDynamicDeps:lr,_trackGlobals:sr,autoPackAndLoadJSON:Gu,needsToPack:Hi,getShallowDeps:Ki,getDepsFromJS:Bi,_getDepsBasic:Gi,loadGlobalsMap:Mi,_resolveSourceMapPath:ki,locateSourceMap:Fi,_getGlobalsRegex:Ri,depsRegex:qi,getDepsFromHTML:Wi,jsonHasNewDeps:zi,packTextToJSONFile:qu,packTextToJSON:Tu,_getAllDeps:Ou,loadSourceMap:ou,sourceMap:iu,getDeps:au,addNewItemsToJSON:ju},path:{getTempDir:Sn,getLocalData:Tn,getUserDir:f,fws:On,ensureTrailingSlash:xn,_getDefaultTempDir:En,baseName:Dn,_removeExtsFromFile:jn,file:kn,dir:In,abs:Cn,resolveVars:ji,string:Ei,_defaultParams:Ni,windir:Si,getDesktop:Ai,ext:tu,splitExt:ru,ignoreDir:Zi,isDir:Vi,dirPart:Xi,slash:Qi,join:uu},s:{replace:Je,replaceAll:Ue,apply:m,withIndices:v,is:g,chars:_e,endsWith:bn,resolveIndex:ze,toLiteral:un,quote:tn,escape:rn,from:an,decapitalize:Nn,removeTrailing:Mr,removeFromEnd:Lr,_removeStringFromEnd:Cr,_removeRegexFromEnd:Pr,splitAtIndex:Rr,ensureStartsWith:Gr,removeLineBreaks:zr,removeMulti:Yr,removeAll:Jr,resolve:xt,ensure:$r,after:pt,match:ct,_matchWithIndices:Xr,remove:ut,removeLeading:gt,removeFromStart:mt,_removeStringFromStart:dt,_removeRegexFromStart:vt,removeQuotes:Vt,splitLines:gi,lines:mi,LinesArray:vi,repeat:ai,splitFirst:ci,_splitByMatch:li,replaceParams:Ti,contains:wi,_createParamsObj:xi,_replaceByObj:Oi,before:Ci,index:Ii,_indexWithIndices:Di,indexOfFn:_i,isCapitalized:Pi,splitLast:nu,matchLast:eu},a:{wrapIndices:h,wrapIndex:d,resolveIndex:p,is:x,ensure:O,pick:ie,create:te,fill:re,resolveIndices:ne,push:he,add:de,splitLast:be,splitTail:ye,last:Ye,toLiteral:sn,display:mn,removeNullish:br,removeByFilter:yr,replaceContents:mr,pushMulti:nt,addMulti:et,pushThroughMulti:Zr,removeEmpty:ri,removeIndex:ti,apply:ii,mapToObj:ui,slice:oi,filterSplit:Li,copy:lu,toObj:Nu},re:{is:w,ensureGlobal:qe,global:Re,addFlag:Me,copy:Le,updateFlagString:Pe,parseFlagString:Ie,createFlagString:Ce,createEscaped:Ke,create:Be,resolveFlags:Ge,escape:We,matchEnd:Qe,matchLast:$e,matchAll:Ve,setStartIndex:He,slash:wn,safeCreateResult:it,createResult:tt,RegexResult:rt,match:lt,ensureLocal:st,local:at,removeFlag:ot,resultEndIndex:ft,matchStart:ht,quotes:Ht,quote:zt,newline:ei,text:si,test:bi,lastIndex:$i},o:{constructorMatches:b,safeEnsure:M,ensure:L,isAny:B,setHidden:K,addNonEnumerable:W,hideKey:Z,makeNonEnumerable:X,ensureCustom:se,get:ue,set:oe,createEmpty:ge,remove:Ee,is:De,display:vn,toLiteral:hn,isPure:on,reduce:dn,each:pn,keys:fn,allKeys:cn,setLazy:ar,setGetterAndSetter:ir,addGetterAndSetter:tr,removeGetterAndSetter:or,removeGetter:ur,Cache:Nr,setDefaults:Ir,ensureMulti:_r,resolveKeys:kt,diveGet:Lt,deepCopy:Xt,fromLines:di,safeDefault:hi,hasKey:Ji,has:Ui,fromKeys:mu,fromArray:Au},v:{constructorMatches:y,isPrimitive:G,resolve:ae,type:Ze,display:gn,toLiteral:ln,nullIfNaN:Kn,req:Tt,isEmpty:ni},class:{create:Q,setName:J,addStatics:Y,setDisplay:$},p:{asyncJoint:E,is:T},err:{create:C,Error:I,Enhanced:_,nyi:q,NYIError:P,defaultFromFn:R,type:yn,TypeError:Xe,req:qn,value:hr,ValueError:dr,prepend:Ut},sym:{display:V,value:me},macro:{config:z},map:{Cache:pe,ensure:fe,get:le,set:ce,MultiCache:je,diveEnsure:Te,createEmpty:Oe,diveDelete:Ne,remove:Ae},args:{ensureArray:ve,push:pu,append:fu,insert:cu},tree:{ensure:xe,dive:we,remove:Se,setCustom:Dt,copy:Qt,isSubsetOf:Yi,iterate:vu,iterator:hu,merge:Su,join:Eu},d:{from:$n,create:Vn,resolve:Hn,now:Rn,ensure:zn,copy:Gn,fromYear:Bn,_resolveNative:Wn,isBefore:Zn},n:{fromString:Jn,ensure:Un,is:Yn,tryCoerce:pi,tryParse:fi},js:{removeComments:Yt,fromAST:Kt,enhance:Vr,ensureReturn:Br,splitLastExpression:qr,enableAwait:Kr,_nodeEnableAwait:Wr,useTitan:Ur,inline:Hr,parse:Jt,removeQuotes:$t,getExports:xu,getNodes:yu,eachNode:gu,parseDeclaration:wu,fromASTNode:bu},npm:{isBuiltIn:fr,isFile:pr,install:Sr,_runCommand:Er},os:{run:Tr,_resolveStdio:vr},win:{is:xr},shell:{_handleError:Or},proc:{interrupt:St,signal:Et},bool:{fromYN:jt},env:{setConfig:It,getConfig:Mt,resolveConfig:Rt},gen:{filter:su},bin:{ensureByteSafe:Cu,isByteSafe:_u,isNodeBuffer:Fu,isTA:Du},ab:{isTA:ku,is:Iu},json:{stringify:Mu}};globalThis.t?Object.keys(Bu).forEach((function(e){if(t[e]){var n=Bu[e];Object.keys(n).forEach((function(r){t[e][r]=n[r]}))}else t[e]=Bu[e]})):globalThis.t=Object.assign({},Bu),globalThis.exports&&(exports.default=globalThis.t);
|