@truebit/cli 1.120.0-beta.131 → 1.120.0-beta.133
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/index.mjs +1 -1
- package/build/index.mjs.map +1 -1
- package/package.json +2 -2
package/build/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ r.version="2.30.1",i(Wn),r.fn=ca,r.min=Qn,r.max=er,r.now=tr,r.utc=h,r.unix=ua,r.
|
|
|
8
8
|
* Copyright(c) 2017 Roger C.
|
|
9
9
|
* MIT Licensed
|
|
10
10
|
*/
|
|
11
|
-
var e=n,t=a,r=po(),i=T,o=f,c={};eo=c;var u=["daily","test","m","h","custom"],l="YYYYMMDDHHmm";function p(t,n){if(t.hash===i.createHash(t.hashType).update(t.name+"LOG_FILE"+t.date).digest("hex"))try{e.existsSync(t.name)&&e.unlinkSync(t.name)}catch(e){n&&console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",t.name)}}c.getFrequency=function(e){var t=e.toLowerCase().match(/^(\d+)([mh])$/);if(t)return function(e,t){if("number"==typeof t){switch(e){case"m":if(t<0||t>60)return!1;break;case"h":if(t<0||t>24)return!1}return{type:e,digit:t}}}(t[2],parseInt(t[1]));var n=function(e){switch(e){case"custom":case"daily":return{type:e,digit:void 0};case"test":return{type:e,digit:0}}return!1}(e);return n||!1},c.parseFileSize=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(t)switch(t[2]){case"k":return 1024*t[1];case"m":return 1024*t[1]*1024;case"g":return 1024*t[1]*1024*1024}}return null},c.getDate=function(e,t,n){t=t||l;let i=n?r.utc():r().local();if(e&&-1!==u.indexOf(e.type))switch(e.type){case"m":var a=Math.floor(i.minutes()/e.digit)*e.digit;return i.minutes(a).format(t);case"h":var s=Math.floor(i.hour()/e.digit)*e.digit;return i.hour(s).format(t);case"daily":case"custom":case"test":return i.format(t)}return i.format(t)},c.setAuditLog=function(n,r,i){var a=null;if(n){var s=n.toString().substr(-1),o=n.toString().match(/^(\d+)/);if(Number(o[1])>0){var c=t.dirname(i.replace(/%DATE%.+/,"_filename"));try{if(r){var u=t.resolve(r);a=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}else{u=t.resolve(c+"/.audit.json");a=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}}catch(e){if("ENOENT"!==e.code)return null;a={keep:{days:!1,amount:Number(o[1])},auditLog:r||c+"/.audit.json",files:[]}}a.keep={days:"d"===s,amount:Number(o[1])}}}return a},c.writeAuditLog=function(t,n){try{d(t.auditLog),e.writeFileSync(t.auditLog,JSON.stringify(t,null,4))}catch(e){n&&console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",t.auditLog,"Error:",e)}},c.addLogToAudit=function(e,t,n,a){if(t&&t.files){var s=t.files.findIndex((function(t){return t.name===e}));if(-1!==s)return t;var o=Date.now();if(t.files.push({date:o,name:e,hash:i.createHash(t.hashType).update(e+"LOG_FILE"+o).digest("hex")}),t.keep.days){var u=r().subtract(t.keep.amount,"days").valueOf(),l=t.files.filter((function(e){return e.date>u||(e.hashType=t.hashType,p(e,a),n.emit("logRemoved",e),!1)}));t.files=l}else{var d=t.files.splice(-t.keep.amount);t.files.length>0&&t.files.filter((function(e){return e.hashType=t.hashType,p(e,a),n.emit("logRemoved",e),!1})),t.files=d}c.writeAuditLog(t,a)}return t},c.getStream=function(n){var i=null,a=null,p=this;if(!n.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;n.frequency&&(i=p.getFrequency(n.frequency));let f=p.setAuditLog(n.max_logs,n.audit_file,n.filename);null!=f&&(f.hashType=void 0!==n.audit_hash_type?n.audit_hash_type:"md5"),p.verbose=void 0===n.verbose||n.verbose;var m=null,y=0,g=0;n.size&&(m=c.parseFileSize(n.size));var b=n.date_format||l;i&&"daily"==i.type&&(n.date_format||(b="YYYY-MM-DD"),r().format(b)==r().endOf("day").format(b)&&r().format(b)!=r().add(1,"day").format(b)||(p.verbose&&console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day"),i.type="custom")),i&&(a=n.frequency?p.getDate(i,b,n.utc):""),n.create_symlink=n.create_symlink||!1,n.extension=n.extension||"";var v=n.filename,w=null,x=v+(a?"."+a:"");if(v.match(/%DATE%/)&&(x=v.replace(/%DATE%/g,a||p.getDate(null,b,n.utc))),m){var _=null,T=x;if(f&&f.files&&f.files instanceof Array&&f.files.length>0){var E=f.files[f.files.length-1].name;if(E.match(T)){var S=E.match(T+"\\.(\\d+)");S&&(T=E,y=S[1])}}for(0==y&&T==x&&(T+=n.extension);e.existsSync(T);)_=T,y++,T=x+"."+y+n.extension;if(_){var k=e.statSync(_);k.size<m&&(T=_,y--,g=k.size)}x=T}else x+=n.extension;p.verbose&&console.log(new Date,"[FileStreamRotator] Logging to: ",x),d(x);var M=n.file_options||{flags:"a"},A=e.createWriteStream(x,M);if(a&&i&&u.indexOf(i.type)>-1||m>0){p.verbose&&console.log(new Date,"[FileStreamRotator] Rotating file: ",i?i.type:"",m?"size: "+m:"");var O,R=new o;return R.auditLog=f,R.end=function(){A.end.apply(A,arguments)},h(A,R),R.on("close",(function(){O&&O.close()})),R.on("new",(function(r){R.auditLog=p.addLogToAudit(r,R.auditLog,R,p.verbose),n.create_symlink&&function(n,r,i){let a=r||"current.log",s=t.dirname(n),o=t.basename(n),c=s+"/"+a;try{e.lstatSync(c).isSymbolicLink()&&(e.unlinkSync(c),e.symlinkSync(o,c))}catch(t){if(t&&"ENOENT"==t.code)try{e.symlinkSync(o,c)}catch(e){i&&console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",c," -> ",o)}}}(r,n.symlink_name,p.verbose),n.watch_log&&R.emit("addWatcher",r)})),R.on("addWatcher",(function(t){O&&O.close(),n.watch_log&&(O=function(t,n,r){if(!t)return null;try{return e.lstatSync(t),e.watch(t,(function(n,i){if("rename"==n)try{e.lstatSync(t)}catch(e){r(e,t)}}))}catch(e){n&&console.log(new Date,"[FileStreamRotator] Could not add watcher for "+t)}}(t,p.verbose,(function(e,t){R.emit("createLog",t)})))})),R.on("createLog",(function(t){try{e.lstatSync(t)}catch(n){A&&"function"==A.end&&A.end(),A=e.createWriteStream(t,M),R.emit("new",t),h(A,R)}})),R.write=function(t,r){var o=i?this.getDate(i,b,n.utc):a;if(o!=a||m&&g>m){var c=v+(a&&i?"."+o:"");v.match(/%DATE%/)&&a&&(c=v.replace(/%DATE%/g,o)),m&&g>m?c+="."+ ++y+n.extension:(y=0,c+=n.extension),g=0,p.verbose&&console.log(new Date,s.format("[FileStreamRotator] Changing logs from %s to %s",x,c)),a=o,w=x,x=c,!0===n.end_stream?A.end():A.destroy(),d(x),A=e.createWriteStream(c,M),R.emit("new",c),R.emit("rotate",w,c),h(A,R)}A.write(t,r),g+=Buffer.byteLength(t,r)}.bind(this),process.nextTick((function(){R.emit("new",x)})),R.emit("new",x),R}return p.verbose&&console.log(new Date,"[FileStreamRotator] File won't be rotated: ",n.frequency,n.size),process.nextTick((function(){A.emit("new",x)})),A};var d=function(n){t.dirname(n).split(t.sep).reduce((function(n,r){if(n+=r+t.sep,!e.existsSync(n))try{e.mkdirSync(n)}catch(e){if("EEXIST"!==e.code)throw e}return n}),"")},h=function(e,t){e.on("close",(function(){t.emit("close")})),e.on("finish",(function(){t.emit("finish")})),e.on("error",(function(e){t.emit("error",e)})),e.on("open",(function(e){t.emit("open",e)}))};return eo}!function(){if(ao)return io;ao=1;const e=Gs(),t=function(){if(ro)return no;ro=1;const e=n,t=l,r=a,i=s,o=m,c=Zs(),u=vt().MESSAGE,d=p.PassThrough,f=Fr(),h={json:!1,colorize:!1,eol:t.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>(new Date).toISOString()},y=function(t){if(t=t||{},f.call(this,t),this.options=Object.assign({},h,t),t.stream)!function(e){Array.prototype.slice.call(arguments,1).forEach((n=>{if(t[n])throw new Error("Cannot set "+n+" and "+e+" together")}))}("stream","filename","maxsize"),this.logStream=new d,this.logStream.pipe(t.stream);else{if(this.filename=t.filename?r.basename(t.filename):"winston.log",this.dirname=t.dirname||r.dirname(t.filename),i=this.filename,/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(i)||(n=this.dirname,/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(n)))throw new Error("Your path or filename contain an invalid character.");this.logStream=fo().getStream({filename:r.join(this.dirname,this.filename),frequency:t.frequency?t.frequency:"custom",date_format:t.datePattern?t.datePattern:"YYYY-MM-DD",verbose:!1,size:function(e){if(e&&"string"==typeof e){if(e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return e}else if(e&&Number.isInteger(e)){const t=Math.round(e/1024);return 0===t?"1k":t+"k"}return null}(t.maxSize),max_logs:t.maxFiles,end_stream:!0,audit_file:t.auditFile?t.auditFile:r.join(this.dirname,"."+c(t)+"-audit.json"),file_options:t.options?t.options:{flags:"a"},utc:!!t.utc&&t.utc,extension:t.extension?t.extension:"",create_symlink:!!t.createSymlink&&t.createSymlink,symlink_name:t.symlinkName?t.symlinkName:"current.log",watch_log:!!t.watchLog&&t.watchLog,audit_hash_type:t.auditHashType?t.auditHashType:"sha256"}),this.logStream.on("new",(e=>{this.emit("new",e)})),this.logStream.on("rotate",((e,t)=>{this.emit("rotate",e,t)})),this.logStream.on("logRemoved",(n=>{if(t.zippedArchive){const t=n.name+".gz";try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("logRemoved",t)}else this.emit("logRemoved",n.name)})),t.zippedArchive&&this.logStream.on("rotate",(t=>{try{if(!e.existsSync(t))return}catch(e){return e.message=`Error occurred while checking existence of ${t}: ${e.message}`,void this.emit("error",e)}try{if(e.existsSync(`${t}.gz`))return}catch(e){return e.message=`Error occurred while checking existence of ${t}.gz: ${e.message}`,void this.emit("error",e)}const n=o.createGzip(),r=e.createReadStream(t);r.on("error",(e=>{e.message=`Error occurred while reading ${t}: ${e.message}`,this.emit("error",e)}));const i=e.createWriteStream(t+".gz");i.on("error",(e=>{e.message=`Error occurred while writing ${t}.gz: ${e.message}`,this.emit("error",e)})),r.pipe(n).pipe(i).on("finish",(()=>{try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("archive",t+".gz")}))})),t.watchLog&&this.logStream.on("addWatcher",(e=>{this.emit("addWatcher",e)}))}var n,i};no=y,i.inherits(y,f),y.prototype.name="dailyRotateFile";const g=function(){};return y.prototype.log=function(e,t){t=t||g,this.logStream.write(e[u]+this.options.eol),this.emit("logged",e),t(null,!0)},y.prototype.close=function(){this.logStream&&this.logStream.end((()=>{this.emit("finish")}))},y.prototype.query=function(t,n){if("function"==typeof t&&(n=t,t={}),!this.options.json)throw new Error("query() may not be used without the json option being set to true");if(!this.filename)throw new Error("query() may not be used when initializing with a stream");let i=[];(t=t||{}).rows=t.rows||t.limit||10,t.start=t.start||0,t.until=t.until||new Date,"object"!=typeof t.until&&(t.until=new Date(t.until)),t.from=t.from||t.until-864e5,"object"!=typeof t.from&&(t.from=new Date(t.from)),t.order=t.order||"desc";const a=(()=>{const t=new RegExp(this.filename.replace("%DATE%",".*"),"i");return e.readdirSync(this.dirname).filter((e=>r.basename(e).match(t)))})();0===a.length&&n&&n(null,i);const s=c=>{if(!c)return;const u=r.join(this.dirname,c);let l,p="";if(c.endsWith(".gz")){l=new d;const t=e.createReadStream(u);t.on("error",(e=>{e.message=`Error occurred while reading ${u}: ${e.message}`,l.emit("error",e)})),t.pipe(o.createGunzip()).pipe(l)}else l=e.createReadStream(u,{encoding:"utf8"});function f(e,n){try{const n=JSON.parse(e);if(!n||"object"!=typeof n)return;const r=new Date(n.timestamp);if(t.from&&r<t.from||t.until&&r>t.until||t.level&&t.level!==n.level)return;i.push(n)}catch(e){n||l.emit("error",e)}}l.on("error",(e=>{if(l.readable&&l.destroy(),n)return"ENOENT"===e.code?n(null,i):n(e)})),l.on("data",(e=>{const t=(e=(p+e).split(/\n+/)).length-1;for(let n=0;n<t;n++)f(e[n]);p=e[t]})),l.on("end",(()=>{if(p&&f(p,!0),a.length)s(a.shift());else if(n){i.sort(((e,t)=>{const n=new Date(e.timestamp).getTime(),r=new Date(t.timestamp).getTime();return n>r?1:n<r?-1:0})),"desc"===t.order&&(i=i.reverse());const e=t.start||0,r=t.limit||i.length;i=i.slice(e,e+r),t.fields&&(i=i.map((e=>{const n={};return t.fields.forEach((t=>{n[t]=e[t]})),n}))),n(null,i)}}))};s(a.shift())},no}();e.transports.DailyRotateFile=t,io=t}(),function(e){e.RUST="rs",e.C="c",e.JS="js",e.API="api",e.PYTHON="py"}(so||(so={})),function(e){e.API="api"}(oo||(oo={})),Object.values(so),function(e){e.JSON="application/json",e.WASM="application/wasm",e.PLAIN_TXT="text/plain",e.JS="application/x-javascript",e.TAR="application/x-tar"}(co||(co={})),function(e){e.JSON="json",e.WASM="wasm",e.PLAIN_TXT="txt",e.JS="js",e.DTA="dta",e.PY="py",e.TAR="tar"}(uo||(uo={}));var ho,mo,yo,go,bo,vo,wo,xo,_o,To,Eo,So,ko,Mo,Ao,Oo,Ro,Io,No,Co,Po,jo,Lo,Do,$o,Uo,zo,Bo,Fo,qo,Ho,Yo,Vo,Ko,Go,Wo,Jo,Zo,Xo,Qo,ec,tc,nc,rc,ic,ac,sc,oc,cc,uc,lc,pc,dc,fc,hc,mc,yc,gc,bc,vc,wc,xc,_c,Tc,Ec,Sc,kc,Mc,Ac,Oc,Rc,Ic,Nc,Cc,Pc,jc,Lc,Dc,$c,Uc,zc,Bc,Fc,qc,Hc,Yc,Vc,Kc,Gc,Wc={exports:{}};function Jc(){if(mo)return ho;mo=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return ho={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Zc(){if(go)return yo;go=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return yo=e}function Xc(){return bo||(bo=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Jc(),a=Zc(),s=(t=e.exports={}).re=[],o=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],l=t.t={};let p=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[d,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=p++;a(e,i,t),l[e]=i,c[i]=t,u[i]=r,s[i]=new RegExp(t,n?"g":void 0),o[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${d}+`),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?`+`(?:${c[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("COERCERTLFULL",c[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Wc,Wc.exports)),Wc.exports}function Qc(){if(wo)return vo;wo=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return vo=n=>n?"object"!=typeof n?e:n:t,vo}function eu(){if(_o)return xo;_o=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return xo={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function tu(){if(Eo)return To;Eo=1;const e=Zc(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Jc(),{safeRe:r,t:i}=Xc(),a=Qc(),{compareIdentifiers:s}=eu();class o{constructor(s,c){if(c=a(c),s instanceof o){if(s.loose===!!c.loose&&s.includePrerelease===!!c.includePrerelease)return s;s=s.version}else if("string"!=typeof s)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof s}".`);if(s.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",s,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const u=s.trim().match(c.loose?r[i.LOOSE]:r[i.FULL]);if(!u)throw new TypeError(`Invalid Version: ${s}`);if(this.raw=s,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof o)){if("string"==typeof t&&t===this.version)return 0;t=new o(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof o||(e=new o(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)}comparePre(t){if(t instanceof o||(t=new o(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}compareBuild(t){t instanceof o||(t=new o(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===s(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return To=o}function nu(){if(ko)return So;ko=1;const e=tu();return So=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}},So}function ru(){if(Ho)return qo;Ho=1;const e=tu();return qo=(t,n,r)=>new e(t,r).compare(new e(n,r))}function iu(){if(Jo)return Wo;Jo=1;const e=tu();return Wo=(t,n,r)=>{const i=new e(t,r),a=new e(n,r);return i.compare(a)||i.compareBuild(a)}}function au(){if(nc)return tc;nc=1;const e=ru();return tc=(t,n,r)=>e(t,n,r)>0}function su(){if(ic)return rc;ic=1;const e=ru();return rc=(t,n,r)=>e(t,n,r)<0}function ou(){if(sc)return ac;sc=1;const e=ru();return ac=(t,n,r)=>0===e(t,n,r)}function cu(){if(cc)return oc;cc=1;const e=ru();return oc=(t,n,r)=>0!==e(t,n,r)}function uu(){if(lc)return uc;lc=1;const e=ru();return uc=(t,n,r)=>e(t,n,r)>=0}function lu(){if(dc)return pc;dc=1;const e=ru();return pc=(t,n,r)=>e(t,n,r)<=0}function pu(){if(hc)return fc;hc=1;const e=ou(),t=cu(),n=au(),r=uu(),i=su(),a=lu();return fc=(s,o,c,u)=>{switch(o){case"===":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s===c;case"!==":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s!==c;case"":case"=":case"==":return e(s,c,u);case"!=":return t(s,c,u);case">":return n(s,c,u);case">=":return r(s,c,u);case"<":return i(s,c,u);case"<=":return a(s,c,u);default:throw new TypeError(`Invalid operator: ${o}`)}}}function du(){if(wc)return vc;wc=1;const e=/\s+/g;class t{constructor(n,r){if(r=i(r),n instanceof t)return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new t(n.raw,r);if(n instanceof a)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&h))+":"+e,n=r.get(t);if(n)return n;const i=this.options.loose,o=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,A(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],l),s("comparator trim",e),e=e.replace(c[u.TILDETRIM],p),s("tilde trim",e),e=e.replace(c[u.CARETTRIM],d),s("caret trim",e);let y=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>M(e,this.options)));i&&(y=y.filter((e=>(s("loose invalid filter",e,this.options),!!e.match(c[u.COMPARATORLOOSE]))))),s("range list",y);const g=new Map,v=y.map((e=>new a(e,this.options)));for(const e of v){if(m(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const w=[...g.values()];return r.set(t,w),w}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>g(t,n)&&e.set.some((e=>g(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}vc=t;const n=(bc||(bc=1,gc=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}),gc),r=new n,i=Qc(),a=fu(),s=Zc(),o=tu(),{safeRe:c,t:u,comparatorTrimReplace:l,tildeTrimReplace:p,caretTrimReplace:d}=Xc(),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:h}=Jc(),m=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},b=(e,t)=>(s("comp",e,t),e=_(e,t),s("caret",e),e=w(e,t),s("tildes",e),e=E(e,t),s("xrange",e),e=k(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,i,a)=>{let o;return s("tilde",e,t,n,r,i,a),v(n)?o="":v(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(s("replaceTilde pr",a),o=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,s("tilde return",o),o}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>T(e,t))).join(" "),T=(e,t)=>{s("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,o)=>{let c;return s("caret",e,t,n,i,a,o),v(n)?c="":v(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(a)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(s("replaceCaret pr",o),c="0"===n?"0"===i?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(s("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),s("caret return",c),c}))},E=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,i,a,o,c)=>{s("xRange",e,n,r,i,a,o,c);const u=v(i),l=u||v(a),p=l||v(o),d=p;return"="===r&&d&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(a=0),o=0,">"===r?(r=">=",l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",l?i=+i+1:a=+a+1),"<"===r&&(c="-0"),n=`${r+i}.${a}.${o}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),s("xRange return",n),n}))},k=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),M=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),A=e=>(t,n,r,i,a,s,o,c,u,l,p,d)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(a)?`>=${r}.${i}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=v(u)?"":v(l)?`<${+u+1}.0.0-0`:v(p)?`<${u}.${+l+1}.0-0`:d?`<=${u}.${l}.${p}-${d}`:e?`<${u}.${l}.${+p+1}-0`:`<=${c}`}`.trim(),O=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return vc}function fu(){if(_c)return xc;_c=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),s("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],a=t.match(n);if(!a)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==a[1]?a[1]:"","="===this.operator&&(this.operator=""),a[2]?this.semver=new o(a[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(s("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new o(t,this.options)}catch(e){return!1}return a(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,r).test(this.value):""===e.operator?""===e.value||new c(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(a(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(a(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}xc=t;const n=Qc(),{safeRe:r,t:i}=Xc(),a=pu(),s=Zc(),o=tu(),c=du();return xc}function hu(){if(Ec)return Tc;Ec=1;const e=du();return Tc=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Tc}function mu(){if(Pc)return Cc;Pc=1;const e=du();return Cc=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},Cc}function yu(){if(Lc)return jc;Lc=1;const e=tu(),t=fu(),{ANY:n}=t,r=du(),i=hu(),a=au(),s=su(),o=lu(),c=uu();return jc=(u,l,p,d)=>{let f,h,m,y,g;switch(u=new e(u,d),l=new r(l,d),p){case">":f=a,h=o,m=s,y=">",g=">=";break;case"<":f=s,h=c,m=a,y="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,l,d))return!1;for(let e=0;e<l.set.length;++e){const r=l.set[e];let i=null,a=null;if(r.forEach((e=>{e.semver===n&&(e=new t(">=0.0.0")),i=i||e,a=a||e,f(e.semver,i.semver,d)?i=e:m(e.semver,a.semver,d)&&(a=e)})),i.operator===y||i.operator===g)return!1;if((!a.operator||a.operator===y)&&h(u,a.semver))return!1;if(a.operator===g&&m(u,a.semver))return!1}return!0},jc}var gu,bu,vu,wu=function(){if(Gc)return Kc;Gc=1;const e=Xc(),t=Jc(),n=tu(),r=eu(),i=nu(),a=function(){if(Ao)return Mo;Ao=1;const e=nu();return Mo=(t,n)=>{const r=e(t,n);return r?r.version:null},Mo}(),s=function(){if(Ro)return Oo;Ro=1;const e=nu();return Oo=(t,n)=>{const r=e(t.trim().replace(/^[=v]+/,""),n);return r?r.version:null},Oo}(),o=function(){if(No)return Io;No=1;const e=tu();return Io=(t,n,r,i,a)=>{"string"==typeof r&&(a=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,a).version}catch(e){return null}},Io}(),c=function(){if(Po)return Co;Po=1;const e=nu();return Co=(t,n)=>{const r=e(t,null,!0),i=e(n,null,!0),a=r.compare(i);if(0===a)return null;const s=a>0,o=s?r:i,c=s?i:r,u=!!o.prerelease.length;if(c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(o))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}}(),u=function(){if(Lo)return jo;Lo=1;const e=tu();return jo=(t,n)=>new e(t,n).major}(),l=function(){if($o)return Do;$o=1;const e=tu();return Do=(t,n)=>new e(t,n).minor}(),p=function(){if(zo)return Uo;zo=1;const e=tu();return Uo=(t,n)=>new e(t,n).patch}(),d=function(){if(Fo)return Bo;Fo=1;const e=nu();return Bo=(t,n)=>{const r=e(t,n);return r&&r.prerelease.length?r.prerelease:null},Bo}(),f=ru(),h=function(){if(Vo)return Yo;Vo=1;const e=ru();return Yo=(t,n,r)=>e(n,t,r)}(),m=function(){if(Go)return Ko;Go=1;const e=ru();return Ko=(t,n)=>e(t,n,!0)}(),y=iu(),g=function(){if(Xo)return Zo;Xo=1;const e=iu();return Zo=(t,n)=>t.sort(((t,r)=>e(t,r,n)))}(),b=function(){if(ec)return Qo;ec=1;const e=iu();return Qo=(t,n)=>t.sort(((t,r)=>e(r,t,n)))}(),v=au(),w=su(),x=ou(),_=cu(),T=uu(),E=lu(),S=pu(),k=function(){if(yc)return mc;yc=1;const e=tu(),t=nu(),{safeRe:n,t:r}=Xc();return mc=(i,a)=>{if(i instanceof e)return i;if("number"==typeof i&&(i=String(i)),"string"!=typeof i)return null;let s=null;if((a=a||{}).rtl){const e=a.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let t;for(;(t=e.exec(i))&&(!s||s.index+s[0].length!==i.length);)s&&t.index+t[0].length===s.index+s[0].length||(s=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else s=i.match(a.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);if(null===s)return null;const o=s[2],c=s[3]||"0",u=s[4]||"0",l=a.includePrerelease&&s[5]?`-${s[5]}`:"",p=a.includePrerelease&&s[6]?`+${s[6]}`:"";return t(`${o}.${c}.${u}${l}${p}`,a)},mc}(),M=fu(),A=du(),O=hu(),R=function(){if(kc)return Sc;kc=1;const e=du();return Sc=(t,n)=>new e(t,n).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),Sc}(),I=function(){if(Ac)return Mc;Ac=1;const e=tu(),t=du();return Mc=(n,r,i)=>{let a=null,s=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(a&&-1!==s.compare(t)||(a=t,s=new e(a,i)))})),a},Mc}(),N=function(){if(Rc)return Oc;Rc=1;const e=tu(),t=du();return Oc=(n,r,i)=>{let a=null,s=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(a&&1!==s.compare(t)||(a=t,s=new e(a,i)))})),a},Oc}(),C=function(){if(Nc)return Ic;Nc=1;const e=tu(),t=du(),n=au();return Ic=(r,i)=>{r=new t(r,i);let a=new e("0.0.0");if(r.test(a))return a;if(a=new e("0.0.0-0"),r.test(a))return a;a=null;for(let t=0;t<r.set.length;++t){const i=r.set[t];let s=null;i.forEach((t=>{const r=new e(t.semver.version);switch(t.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":s&&!n(r,s)||(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!s||a&&!n(a,s)||(a=s)}return a&&r.test(a)?a:null},Ic}(),P=mu(),j=yu(),L=function(){if($c)return Dc;$c=1;const e=yu();return Dc=(t,n,r)=>e(t,n,">",r),Dc}(),D=function(){if(zc)return Uc;zc=1;const e=yu();return Uc=(t,n,r)=>e(t,n,"<",r),Uc}(),$=function(){if(Fc)return Bc;Fc=1;const e=du();return Bc=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r)),Bc}(),U=function(){if(Hc)return qc;Hc=1;const e=hu(),t=ru();return qc=(n,r,i)=>{const a=[];let s=null,o=null;const c=n.sort(((e,n)=>t(e,n,i)));for(const t of c)e(t,r,i)?(o=t,s||(s=t)):(o&&a.push([s,o]),o=null,s=null);s&&a.push([s,null]);const u=[];for(const[e,t]of a)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),p="string"==typeof r.raw?r.raw:String(r);return l.length<p.length?l:r},qc}(),z=function(){if(Vc)return Yc;Vc=1;const e=du(),t=fu(),{ANY:n}=t,r=hu(),i=ru(),a=[new t(">=0.0.0-0")],s=[new t(">=0.0.0")],o=(e,t,o)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=o.includePrerelease?a:s}if(1===t.length&&t[0].semver===n){if(o.includePrerelease)return!0;t=s}const l=new Set;let p,d,f,h,m,y,g;for(const t of e)">"===t.operator||">="===t.operator?p=c(p,t,o):"<"===t.operator||"<="===t.operator?d=u(d,t,o):l.add(t.semver);if(l.size>1)return null;if(p&&d){if(f=i(p.semver,d.semver,o),f>0)return null;if(0===f&&(">="!==p.operator||"<="!==d.operator))return null}for(const e of l){if(p&&!r(e,String(p),o))return null;if(d&&!r(e,String(d),o))return null;for(const n of t)if(!r(e,String(n),o))return!1;return!0}let b=!(!d||o.includePrerelease||!d.semver.prerelease.length)&&d.semver,v=!(!p||o.includePrerelease||!p.semver.prerelease.length)&&p.semver;b&&1===b.prerelease.length&&"<"===d.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,p)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(h=c(p,e,o),h===e&&h!==p)return!1}else if(">="===p.operator&&!r(p.semver,String(e),o))return!1;if(d)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(m=u(d,e,o),m===e&&m!==d)return!1}else if("<="===d.operator&&!r(d.semver,String(e),o))return!1;if(!e.operator&&(d||p)&&0!==f)return!1}return!(p&&y&&!d&&0!==f||d&&g&&!p&&0!==f||v||b)},c=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};return Yc=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;e:for(const e of t.set){for(const t of n.set){const n=o(e,t,r);if(i=i||null!==n,n)continue e}if(i)return!1}return!0},Yc}();return Kc={parse:i,valid:a,clean:s,inc:o,diff:c,major:u,minor:l,patch:p,prerelease:d,compare:f,rcompare:h,compareLoose:m,compareBuild:y,sort:g,rsort:b,gt:v,lt:w,eq:x,neq:_,gte:T,lte:E,cmp:S,coerce:k,Comparator:M,Range:A,satisfies:O,toComparators:R,maxSatisfying:I,minSatisfying:N,minVersion:C,validRange:P,outside:j,gtr:L,ltr:D,intersects:$,simplifyRange:U,subset:z,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}}();!function(e){e.LEDGER="ledger",e.HTTP_ADAPTER="http-adapter",e.EVENTS_ADAPTER="events-adapter",e.FILESYSTEM_ADAPTER="filesystem-adapter",e.WASM_CHECKPOINTER="wasm-checkpointer",e.WASM_INSTRUMENTER="wasm-instrumenter",e.WASM_RUNNER="wasm-runner"}(gu||(gu={})),function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(bu||(bu={})),function(e){e.MINIO="minio",e.S3="s3"}(vu||(vu={}));var xu,_u,Tu,Eu,Su,ku,Mu,Au;!function(e){e.TASK_CREATED="task_created",e.TASK_SOLVED="task_solved",e.FILE_SYSTEM="file_system",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.MESSAGE_SAVED="message_saved",e.COMPUTED_OUTCOME="computed_outcome",e.API_FETCH="api_fetch",e.API_OUTCOME="api_outcome",e.API_SOLVED="api_solved",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.INVOICE="invoice",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check",e.RUNNER_TASK_EXECUTED="runner_task_executed",e.DEPLOYER_EXECUTE_TASK="deployer_execute_task",e.DEPLOYER_TASK_EXECUTED="deployer_task_executed",e.HTTP_ADAPTER_TASK_EXECUTED="http_adapter_task_executed",e.HTTP_ADAPTER_TASK_INSTRUMENTED="http_adapter_task_instrumented",e.HTTP_ADAPTER_TASK_PUSHED="http_adapter_task_pushed",e.HTTP_ADAPTER_TASK_PULLED="http_adapter_task_pulled",e.HTTP_ADAPTER_TASK_CHECKPOINTED="http_adapter_task_checkpointed",e.HTTP_ADAPTER_TASK_CHECKPOINTS_LISTED="http_adapter_task_checkpoints_listed",e.HTTP_ADAPTER_READY_TO_SHUTDOWN="http_adapter_ready_to_shutdown",e.EVENTS_ADAPTER_TASK_EXECUTED="events_adapter_task_executed",e.EVENTS_ADAPTER_TASK_INSTRUMENTED="events_adapter_task_instrumented",e.EVENTS_ADAPTER_TASK_PUSHED="events_adapter_task_pushed",e.EVENTS_ADAPTER_TASK_PULLED="events_adapter_task_pulled",e.EVENTS_ADAPTER_TASK_CHECKPOINTED="events_adapter_task_checkpointed",e.EVENTS_ADAPTER_TASK_CHECKPOINTS_LISTED="events_adapter_task_checkpoints_listed",e.EVENTS_ADAPTER_COMPUTED_OUTCOME="events_adapter_compute_outcome",e.EVENTS_ADAPTER_TASK_CREATED="events_adapter_task_created",e.EVENTS_ADAPTER_NODE_DEREGISTERED="events_adapter_node_deregistered",e.EVENTS_ADAPTER_SERVICE_STARTED_CHECK="events_adapter_service_started_check",e.DISPATCHER_TASK_SOLVED_CLEAR="dispatcher_task_solved_clear",e.DISPATCHER_TASK_CREATED="dispatcher_task_created",e.WASM_INSTRUMENTER_INSTRUMENT_TASK="wasm_instrumenter_instrument_task",e.WASM_INSTRUMENTER_TASK_INSTRUMENTED="wasm_instrumenter_task_instrumented",e.FILESYSTEM_ADAPTER_PUSH_TASK="filesystem_adapter_push_task",e.FILESYSTEM_ADAPTER_TASK_PUSHED="filesystem_adapter_task_pushed",e.FILESYSTEM_ADAPTER_PULL_TASK="filesystem_adapter_pull_task",e.FILESYSTEM_ADAPTER_TASK_PULLED="filesystem_adapter_task_pulled",e.FILESYSTEM_ADAPTER_SERVICE_STARTED_CHECK="filesystem_adapter_service_started_check",e.WASM_CHECKPOINTER_CHECKPOINT_TASK="wasm_checkpointer_checkpoint_task",e.WASM_CHECKPOINTER_LIST_TASK_CHECKPOINTS="wasm_checkpointer_list_task_checkpoints",e.TRANSCRIPT_WRITER_SAVE_MESSAGE="transcript_writer_save_message",e.TRANSCRIPT_WRITER_INVOICE="transcript_writer_save_invoice",e.SEQUENCER_MESSAGE_SAVED="sequencer_message_saved",e.VERIFICATION_MESSAGE_SAVED="verification_message_saved",e.VERIFICATION_VALIDATE_MESSAGE="verification_validate_message",e.VERIFICATION_REVEAL_SOLUTION="verification_reveal_solution",e.VERIFICATION_ERRORS="verification_errors",e.LEDGER_SHUTDOWN="ledger_shutdown",e.LEDGER_SERVICE_STARTED="ledger_service_started"}(xu||(xu={})),function(e){e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.NODE_OUTCOME="node_outcome",e.PLATFORM_ERRORS="errors",e.REVEAL_SOLUTIONS="reveal_solutions",e.SOLUTIONS_REVEALED="solutions_revealed",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.EXECUTION_COMPLETED="execution_completed",e.SERVICE_STARTED="service_started",e.INVOICE="invoice",e.ENTITLEMENT_REQ="entitlement_req",e.ENTITLEMENT_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.EXECUTION_METADATA="execution_metadata"}(_u||(_u={})),function(e){e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check"}(Tu||(Tu={})),function(e){e.ERRORS="errors",e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.SERVICE_STARTED="service_started",e.INVOICES="invoice",e.ENTITLEMENTS_REQ="entitlement_req",e.ENTITLEMENTS_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.DUMMY="DUMMY"}(Eu||(Eu={})),function(e){e.VALIDATION_ERROR="validation_error"}(Su||(Su={})),function(e){e.GAME_PENDING="GamePending",e.READY_FOR_INVOICE="ReadyForInvoice",e.ERROR="Error"}(ku||(ku={})),function(e){!function(e){e.Pay="pay",e.Charge="charge"}(e.Operation||(e.Operation={})),(e.EntitlementOperation||(e.EntitlementOperation={})).IS_USER_REGISTER="isUserRegister"}(Mu||(Mu={})),function(e){e.Pay="pay",e.Charge="charge"}(Au||(Au={})),_u.TASK_SOLVED,_u.TASK_CREATED,_u.API_TASK_CREATED,_u.NODE_OUTCOME,_u.SOLUTIONS_REVEALED,_u.REVEAL_SOLUTIONS,_u.API_OUTCOME,_u.EXECUTION_COMPLETED,_u.EXECUTION_METADATA;var Ou=function(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=null==e?void 0:e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)},Ru=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach((function(n){e.properties[n].forEach((function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},a={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new Ou(a))}))})),t},e}();function Iu(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0}var Nu=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Cu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s},Pu=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ju=function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;(new Ru).transform(e).forEach((function(e){return t.addValidationMetadata(e)}))},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach((function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)})),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var a,s,o=function(e){return void 0!==e.always?e.always:(!e.groups||!e.groups.length)&&n},c=function(e){return!(!r||i&&i.length||!e.groups||!e.groups.length)},u=(this.validationMetadatas.get(e)||[]).filter((function(n){return(n.target===e||n.target===t)&&(!!o(n)||!c(n)&&(!(i&&i.length>0)||n.groups&&!!n.groups.find((function(e){return-1!==i.indexOf(e)}))))})),l=[];try{for(var p=Nu(this.validationMetadatas.entries()),d=p.next();!d.done;d=p.next()){var f=Cu(d.value,2),h=f[0],m=f[1];e.prototype instanceof h&&l.push.apply(l,Pu([],Cu(m),!1))}}catch(e){a={error:e}}finally{try{d&&!d.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}var y=l.filter((function(t){return"string"!=typeof t.target&&(t.target!==e&&((!(t.target instanceof Function)||e.prototype instanceof t.target)&&(!!o(t)||!c(t)&&(!(i&&i.length>0)||t.groups&&!!t.groups.find((function(e){return-1!==i.indexOf(e)}))))))})),g=y.filter((function(e){return!u.find((function(t){return t.propertyName===e.propertyName&&t.type===e.type}))}));return u.concat(g)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e}();function Lu(){var e=Iu();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new ju),e.classValidatorMetadataStorage}var Du=function(){function e(){}return e.isValid=function(e){var t=this;return"isValid"!==e&&"getMessage"!==e&&-1!==Object.keys(this).map((function(e){return t[e]})).indexOf(e)},e.CUSTOM_VALIDATION="customValidation",e.NESTED_VALIDATION="nestedValidation",e.PROMISE_VALIDATION="promiseValidation",e.CONDITIONAL_VALIDATION="conditionalValidation",e.WHITELIST="whitelistValidation",e.IS_DEFINED="isDefined",e}(),$u=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find((function(t){return t.type===e}));return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}());function Uu(e){return $u.get(e)}function zu(e){return function(t,n){var r={type:Du.WHITELIST,target:t.constructor,propertyName:n,validationOptions:e};Lu().addValidationMetadata(new Ou(r))}}var Bu=function(){function e(e,t,n){void 0===n&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return Uu(this.target)},enumerable:!1,configurable:!0}),e}();function Fu(e){var t;if(e.validator instanceof Function){if(t=e.validator,Uu(ju).getTargetValidatorConstraints(e.validator).length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name,":").concat(e.propertyName)}else{var n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):""},e}(),Lu().addConstraintMetadata(new Bu(t,e.name,e.async))}var r={type:e.name&&Du.isValid(e.name)?e.name:Du.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};Lu().addValidationMetadata(new Ou(r))}function qu(e,t){return function(n){var r=t&&t.each?"each value in ":"";return e(r,n)}}function Hu(e,t){return function(n,r){Fu({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}function Yu(e){return function(t,n){var r={type:Du.CONDITIONAL_VALIDATION,name:"isOptional",target:t.constructor,propertyName:n,constraints:[function(e,t){return null!==e[n]&&void 0!==e[n]}],validationOptions:e};Lu().addValidationMetadata(new Ou(r))}}var Vu=function(){return Vu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Vu.apply(this,arguments)};function Ku(e){var t=Vu({},e),n=t.each?"each value in ":"";return t.message=t.message||n+"nested property $property must be either object or array",function(e,n){var r={type:Du.NESTED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};Lu().addValidationMetadata(new Ou(r))}}var Gu,Wu={exports:{}};function Ju(){return Gu||(Gu=1,function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="string"==typeof e||e instanceof String;if(!t){var r=n(e);throw null===e?r="null":"object"===r&&(r=e.constructor.name),new TypeError("Expected a string but received a ".concat(r))}},e.exports=t.default,e.exports.default=t.default}(Wu,Wu.exports)),Wu.exports}function Zu(e){return Hu({name:"isNotEmpty",validator:{validate:function(e,t){return function(e){return""!==e&&null!=e}(e)},defaultMessage:qu((function(e){return e+"$property should not be empty"}),e)}},e)}function Xu(e,t){return Hu({name:"min",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&e>=t}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must not be less than $constraint1"}),t)}},t)}var Qu,el={exports:{}};function tl(){return Qu||(Qu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),null==t&&(t="all");return t in i&&i[t].test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};e.exports=t.default,e.exports.default=t.default}(el,el.exports)),el.exports}var nl=xe(tl());function rl(e,t){return Hu({name:"isUuid",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&nl(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must be a UUID"}),t)}},t)}var il,al={exports:{}};function sl(){return il||(il=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e);var n=new RegExp("^[a-fA-F0-9]{".concat(i[t],"}$"));return n.test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};e.exports=t.default,e.exports.default=t.default}(al,al.exports)),al.exports}var ol=xe(sl());function cl(e,t){return Hu({name:"isHash",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&ol(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must be a hash of type $constraint1"}),t)}},t)}var ul,ll={exports:{}};function pl(){return ul||(ul=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e),i.test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default}(ll,ll.exports)),ll.exports}var dl=xe(pl());function fl(e){return Hu({name:"isEthereumAddress",validator:{validate:function(e,t){return function(e){return"string"==typeof e&&dl(e)}(e)},defaultMessage:qu((function(e){return e+"$property must be an Ethereum address"}),e)}},e)}function hl(e,t){return void 0===e&&(e={}),Hu({name:"isNumber",constraints:[e],validator:{validate:function(e,t){return function(e,t){if(void 0===t&&(t={}),"number"!=typeof e)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(void 0!==t.maxDecimalPlaces){var n=0;if(e%1!=0&&(n=e.toString().split(".")[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must be a number conforming to the specified constraints"}),t)}},t)}var ml=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s};function yl(e){return Object.entries(e).filter((function(e){var t=ml(e,2),n=t[0];return t[1],isNaN(parseInt(n))})).map((function(e){var t=ml(e,2);return t[0],t[1]}))}function gl(e,t){return Hu({name:"isEnum",constraints:[e,yl(e)],validator:{validate:function(e,t){return function(e,t){return Object.keys(t).map((function(e){return t[e]})).includes(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must be one of the following values: $constraint2"}),t)}},t)}function bl(e){return Hu({name:"isString",validator:{validate:function(e,t){return function(e){return e instanceof String||"string"==typeof e}(e)},defaultMessage:qu((function(e){return e+"$property must be a string"}),e)}},e)}function vl(){return function(e,t){Fu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>16725312e5}}})}}function wl(){return function(e,t){Fu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>1672531200}}})}}var xl,_l,Tl={};
|
|
11
|
+
var e=n,t=a,r=po(),i=T,o=f,c={};eo=c;var u=["daily","test","m","h","custom"],l="YYYYMMDDHHmm";function p(t,n){if(t.hash===i.createHash(t.hashType).update(t.name+"LOG_FILE"+t.date).digest("hex"))try{e.existsSync(t.name)&&e.unlinkSync(t.name)}catch(e){n&&console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",t.name)}}c.getFrequency=function(e){var t=e.toLowerCase().match(/^(\d+)([mh])$/);if(t)return function(e,t){if("number"==typeof t){switch(e){case"m":if(t<0||t>60)return!1;break;case"h":if(t<0||t>24)return!1}return{type:e,digit:t}}}(t[2],parseInt(t[1]));var n=function(e){switch(e){case"custom":case"daily":return{type:e,digit:void 0};case"test":return{type:e,digit:0}}return!1}(e);return n||!1},c.parseFileSize=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(t)switch(t[2]){case"k":return 1024*t[1];case"m":return 1024*t[1]*1024;case"g":return 1024*t[1]*1024*1024}}return null},c.getDate=function(e,t,n){t=t||l;let i=n?r.utc():r().local();if(e&&-1!==u.indexOf(e.type))switch(e.type){case"m":var a=Math.floor(i.minutes()/e.digit)*e.digit;return i.minutes(a).format(t);case"h":var s=Math.floor(i.hour()/e.digit)*e.digit;return i.hour(s).format(t);case"daily":case"custom":case"test":return i.format(t)}return i.format(t)},c.setAuditLog=function(n,r,i){var a=null;if(n){var s=n.toString().substr(-1),o=n.toString().match(/^(\d+)/);if(Number(o[1])>0){var c=t.dirname(i.replace(/%DATE%.+/,"_filename"));try{if(r){var u=t.resolve(r);a=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}else{u=t.resolve(c+"/.audit.json");a=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}}catch(e){if("ENOENT"!==e.code)return null;a={keep:{days:!1,amount:Number(o[1])},auditLog:r||c+"/.audit.json",files:[]}}a.keep={days:"d"===s,amount:Number(o[1])}}}return a},c.writeAuditLog=function(t,n){try{d(t.auditLog),e.writeFileSync(t.auditLog,JSON.stringify(t,null,4))}catch(e){n&&console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",t.auditLog,"Error:",e)}},c.addLogToAudit=function(e,t,n,a){if(t&&t.files){var s=t.files.findIndex((function(t){return t.name===e}));if(-1!==s)return t;var o=Date.now();if(t.files.push({date:o,name:e,hash:i.createHash(t.hashType).update(e+"LOG_FILE"+o).digest("hex")}),t.keep.days){var u=r().subtract(t.keep.amount,"days").valueOf(),l=t.files.filter((function(e){return e.date>u||(e.hashType=t.hashType,p(e,a),n.emit("logRemoved",e),!1)}));t.files=l}else{var d=t.files.splice(-t.keep.amount);t.files.length>0&&t.files.filter((function(e){return e.hashType=t.hashType,p(e,a),n.emit("logRemoved",e),!1})),t.files=d}c.writeAuditLog(t,a)}return t},c.getStream=function(n){var i=null,a=null,p=this;if(!n.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;n.frequency&&(i=p.getFrequency(n.frequency));let f=p.setAuditLog(n.max_logs,n.audit_file,n.filename);null!=f&&(f.hashType=void 0!==n.audit_hash_type?n.audit_hash_type:"md5"),p.verbose=void 0===n.verbose||n.verbose;var m=null,y=0,g=0;n.size&&(m=c.parseFileSize(n.size));var b=n.date_format||l;i&&"daily"==i.type&&(n.date_format||(b="YYYY-MM-DD"),r().format(b)==r().endOf("day").format(b)&&r().format(b)!=r().add(1,"day").format(b)||(p.verbose&&console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day"),i.type="custom")),i&&(a=n.frequency?p.getDate(i,b,n.utc):""),n.create_symlink=n.create_symlink||!1,n.extension=n.extension||"";var v=n.filename,w=null,x=v+(a?"."+a:"");if(v.match(/%DATE%/)&&(x=v.replace(/%DATE%/g,a||p.getDate(null,b,n.utc))),m){var _=null,T=x;if(f&&f.files&&f.files instanceof Array&&f.files.length>0){var E=f.files[f.files.length-1].name;if(E.match(T)){var S=E.match(T+"\\.(\\d+)");S&&(T=E,y=S[1])}}for(0==y&&T==x&&(T+=n.extension);e.existsSync(T);)_=T,y++,T=x+"."+y+n.extension;if(_){var k=e.statSync(_);k.size<m&&(T=_,y--,g=k.size)}x=T}else x+=n.extension;p.verbose&&console.log(new Date,"[FileStreamRotator] Logging to: ",x),d(x);var M=n.file_options||{flags:"a"},A=e.createWriteStream(x,M);if(a&&i&&u.indexOf(i.type)>-1||m>0){p.verbose&&console.log(new Date,"[FileStreamRotator] Rotating file: ",i?i.type:"",m?"size: "+m:"");var O,R=new o;return R.auditLog=f,R.end=function(){A.end.apply(A,arguments)},h(A,R),R.on("close",(function(){O&&O.close()})),R.on("new",(function(r){R.auditLog=p.addLogToAudit(r,R.auditLog,R,p.verbose),n.create_symlink&&function(n,r,i){let a=r||"current.log",s=t.dirname(n),o=t.basename(n),c=s+"/"+a;try{e.lstatSync(c).isSymbolicLink()&&(e.unlinkSync(c),e.symlinkSync(o,c))}catch(t){if(t&&"ENOENT"==t.code)try{e.symlinkSync(o,c)}catch(e){i&&console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",c," -> ",o)}}}(r,n.symlink_name,p.verbose),n.watch_log&&R.emit("addWatcher",r)})),R.on("addWatcher",(function(t){O&&O.close(),n.watch_log&&(O=function(t,n,r){if(!t)return null;try{return e.lstatSync(t),e.watch(t,(function(n,i){if("rename"==n)try{e.lstatSync(t)}catch(e){r(e,t)}}))}catch(e){n&&console.log(new Date,"[FileStreamRotator] Could not add watcher for "+t)}}(t,p.verbose,(function(e,t){R.emit("createLog",t)})))})),R.on("createLog",(function(t){try{e.lstatSync(t)}catch(n){A&&"function"==A.end&&A.end(),A=e.createWriteStream(t,M),R.emit("new",t),h(A,R)}})),R.write=function(t,r){var o=i?this.getDate(i,b,n.utc):a;if(o!=a||m&&g>m){var c=v+(a&&i?"."+o:"");v.match(/%DATE%/)&&a&&(c=v.replace(/%DATE%/g,o)),m&&g>m?c+="."+ ++y+n.extension:(y=0,c+=n.extension),g=0,p.verbose&&console.log(new Date,s.format("[FileStreamRotator] Changing logs from %s to %s",x,c)),a=o,w=x,x=c,!0===n.end_stream?A.end():A.destroy(),d(x),A=e.createWriteStream(c,M),R.emit("new",c),R.emit("rotate",w,c),h(A,R)}A.write(t,r),g+=Buffer.byteLength(t,r)}.bind(this),process.nextTick((function(){R.emit("new",x)})),R.emit("new",x),R}return p.verbose&&console.log(new Date,"[FileStreamRotator] File won't be rotated: ",n.frequency,n.size),process.nextTick((function(){A.emit("new",x)})),A};var d=function(n){t.dirname(n).split(t.sep).reduce((function(n,r){if(n+=r+t.sep,!e.existsSync(n))try{e.mkdirSync(n)}catch(e){if("EEXIST"!==e.code)throw e}return n}),"")},h=function(e,t){e.on("close",(function(){t.emit("close")})),e.on("finish",(function(){t.emit("finish")})),e.on("error",(function(e){t.emit("error",e)})),e.on("open",(function(e){t.emit("open",e)}))};return eo}!function(){if(ao)return io;ao=1;const e=Gs(),t=function(){if(ro)return no;ro=1;const e=n,t=l,r=a,i=s,o=m,c=Zs(),u=vt().MESSAGE,d=p.PassThrough,f=Fr(),h={json:!1,colorize:!1,eol:t.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>(new Date).toISOString()},y=function(t){if(t=t||{},f.call(this,t),this.options=Object.assign({},h,t),t.stream)!function(e){Array.prototype.slice.call(arguments,1).forEach((n=>{if(t[n])throw new Error("Cannot set "+n+" and "+e+" together")}))}("stream","filename","maxsize"),this.logStream=new d,this.logStream.pipe(t.stream);else{if(this.filename=t.filename?r.basename(t.filename):"winston.log",this.dirname=t.dirname||r.dirname(t.filename),i=this.filename,/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(i)||(n=this.dirname,/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(n)))throw new Error("Your path or filename contain an invalid character.");this.logStream=fo().getStream({filename:r.join(this.dirname,this.filename),frequency:t.frequency?t.frequency:"custom",date_format:t.datePattern?t.datePattern:"YYYY-MM-DD",verbose:!1,size:function(e){if(e&&"string"==typeof e){if(e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return e}else if(e&&Number.isInteger(e)){const t=Math.round(e/1024);return 0===t?"1k":t+"k"}return null}(t.maxSize),max_logs:t.maxFiles,end_stream:!0,audit_file:t.auditFile?t.auditFile:r.join(this.dirname,"."+c(t)+"-audit.json"),file_options:t.options?t.options:{flags:"a"},utc:!!t.utc&&t.utc,extension:t.extension?t.extension:"",create_symlink:!!t.createSymlink&&t.createSymlink,symlink_name:t.symlinkName?t.symlinkName:"current.log",watch_log:!!t.watchLog&&t.watchLog,audit_hash_type:t.auditHashType?t.auditHashType:"sha256"}),this.logStream.on("new",(e=>{this.emit("new",e)})),this.logStream.on("rotate",((e,t)=>{this.emit("rotate",e,t)})),this.logStream.on("logRemoved",(n=>{if(t.zippedArchive){const t=n.name+".gz";try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("logRemoved",t)}else this.emit("logRemoved",n.name)})),t.zippedArchive&&this.logStream.on("rotate",(t=>{try{if(!e.existsSync(t))return}catch(e){return e.message=`Error occurred while checking existence of ${t}: ${e.message}`,void this.emit("error",e)}try{if(e.existsSync(`${t}.gz`))return}catch(e){return e.message=`Error occurred while checking existence of ${t}.gz: ${e.message}`,void this.emit("error",e)}const n=o.createGzip(),r=e.createReadStream(t);r.on("error",(e=>{e.message=`Error occurred while reading ${t}: ${e.message}`,this.emit("error",e)}));const i=e.createWriteStream(t+".gz");i.on("error",(e=>{e.message=`Error occurred while writing ${t}.gz: ${e.message}`,this.emit("error",e)})),r.pipe(n).pipe(i).on("finish",(()=>{try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("archive",t+".gz")}))})),t.watchLog&&this.logStream.on("addWatcher",(e=>{this.emit("addWatcher",e)}))}var n,i};no=y,i.inherits(y,f),y.prototype.name="dailyRotateFile";const g=function(){};return y.prototype.log=function(e,t){t=t||g,this.logStream.write(e[u]+this.options.eol),this.emit("logged",e),t(null,!0)},y.prototype.close=function(){this.logStream&&this.logStream.end((()=>{this.emit("finish")}))},y.prototype.query=function(t,n){if("function"==typeof t&&(n=t,t={}),!this.options.json)throw new Error("query() may not be used without the json option being set to true");if(!this.filename)throw new Error("query() may not be used when initializing with a stream");let i=[];(t=t||{}).rows=t.rows||t.limit||10,t.start=t.start||0,t.until=t.until||new Date,"object"!=typeof t.until&&(t.until=new Date(t.until)),t.from=t.from||t.until-864e5,"object"!=typeof t.from&&(t.from=new Date(t.from)),t.order=t.order||"desc";const a=(()=>{const t=new RegExp(this.filename.replace("%DATE%",".*"),"i");return e.readdirSync(this.dirname).filter((e=>r.basename(e).match(t)))})();0===a.length&&n&&n(null,i);const s=c=>{if(!c)return;const u=r.join(this.dirname,c);let l,p="";if(c.endsWith(".gz")){l=new d;const t=e.createReadStream(u);t.on("error",(e=>{e.message=`Error occurred while reading ${u}: ${e.message}`,l.emit("error",e)})),t.pipe(o.createGunzip()).pipe(l)}else l=e.createReadStream(u,{encoding:"utf8"});function f(e,n){try{const n=JSON.parse(e);if(!n||"object"!=typeof n)return;const r=new Date(n.timestamp);if(t.from&&r<t.from||t.until&&r>t.until||t.level&&t.level!==n.level)return;i.push(n)}catch(e){n||l.emit("error",e)}}l.on("error",(e=>{if(l.readable&&l.destroy(),n)return"ENOENT"===e.code?n(null,i):n(e)})),l.on("data",(e=>{const t=(e=(p+e).split(/\n+/)).length-1;for(let n=0;n<t;n++)f(e[n]);p=e[t]})),l.on("end",(()=>{if(p&&f(p,!0),a.length)s(a.shift());else if(n){i.sort(((e,t)=>{const n=new Date(e.timestamp).getTime(),r=new Date(t.timestamp).getTime();return n>r?1:n<r?-1:0})),"desc"===t.order&&(i=i.reverse());const e=t.start||0,r=t.limit||i.length;i=i.slice(e,e+r),t.fields&&(i=i.map((e=>{const n={};return t.fields.forEach((t=>{n[t]=e[t]})),n}))),n(null,i)}}))};s(a.shift())},no}();e.transports.DailyRotateFile=t,io=t}(),process.setMaxListeners(0),function(e){e.RUST="rs",e.C="c",e.JS="js",e.API="api",e.PYTHON="py"}(so||(so={})),function(e){e.API="api"}(oo||(oo={})),Object.values(so),function(e){e.JSON="application/json",e.WASM="application/wasm",e.PLAIN_TXT="text/plain",e.JS="application/x-javascript",e.TAR="application/x-tar"}(co||(co={})),function(e){e.JSON="json",e.WASM="wasm",e.PLAIN_TXT="txt",e.JS="js",e.DTA="dta",e.PY="py",e.TAR="tar"}(uo||(uo={}));var ho,mo,yo,go,bo,vo,wo,xo,_o,To,Eo,So,ko,Mo,Ao,Oo,Ro,Io,No,Co,Po,jo,Lo,Do,$o,Uo,zo,Bo,Fo,qo,Ho,Yo,Vo,Ko,Go,Wo,Jo,Zo,Xo,Qo,ec,tc,nc,rc,ic,ac,sc,oc,cc,uc,lc,pc,dc,fc,hc,mc,yc,gc,bc,vc,wc,xc,_c,Tc,Ec,Sc,kc,Mc,Ac,Oc,Rc,Ic,Nc,Cc,Pc,jc,Lc,Dc,$c,Uc,zc,Bc,Fc,qc,Hc,Yc,Vc,Kc,Gc,Wc={exports:{}};function Jc(){if(mo)return ho;mo=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return ho={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Zc(){if(go)return yo;go=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return yo=e}function Xc(){return bo||(bo=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Jc(),a=Zc(),s=(t=e.exports={}).re=[],o=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],l=t.t={};let p=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[d,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=p++;a(e,i,t),l[e]=i,c[i]=t,u[i]=r,s[i]=new RegExp(t,n?"g":void 0),o[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${d}+`),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?`+`(?:${c[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("COERCERTLFULL",c[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Wc,Wc.exports)),Wc.exports}function Qc(){if(wo)return vo;wo=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return vo=n=>n?"object"!=typeof n?e:n:t,vo}function eu(){if(_o)return xo;_o=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return xo={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function tu(){if(Eo)return To;Eo=1;const e=Zc(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Jc(),{safeRe:r,t:i}=Xc(),a=Qc(),{compareIdentifiers:s}=eu();class o{constructor(s,c){if(c=a(c),s instanceof o){if(s.loose===!!c.loose&&s.includePrerelease===!!c.includePrerelease)return s;s=s.version}else if("string"!=typeof s)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof s}".`);if(s.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",s,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const u=s.trim().match(c.loose?r[i.LOOSE]:r[i.FULL]);if(!u)throw new TypeError(`Invalid Version: ${s}`);if(this.raw=s,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof o)){if("string"==typeof t&&t===this.version)return 0;t=new o(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof o||(e=new o(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)}comparePre(t){if(t instanceof o||(t=new o(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}compareBuild(t){t instanceof o||(t=new o(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===s(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return To=o}function nu(){if(ko)return So;ko=1;const e=tu();return So=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}},So}function ru(){if(Ho)return qo;Ho=1;const e=tu();return qo=(t,n,r)=>new e(t,r).compare(new e(n,r))}function iu(){if(Jo)return Wo;Jo=1;const e=tu();return Wo=(t,n,r)=>{const i=new e(t,r),a=new e(n,r);return i.compare(a)||i.compareBuild(a)}}function au(){if(nc)return tc;nc=1;const e=ru();return tc=(t,n,r)=>e(t,n,r)>0}function su(){if(ic)return rc;ic=1;const e=ru();return rc=(t,n,r)=>e(t,n,r)<0}function ou(){if(sc)return ac;sc=1;const e=ru();return ac=(t,n,r)=>0===e(t,n,r)}function cu(){if(cc)return oc;cc=1;const e=ru();return oc=(t,n,r)=>0!==e(t,n,r)}function uu(){if(lc)return uc;lc=1;const e=ru();return uc=(t,n,r)=>e(t,n,r)>=0}function lu(){if(dc)return pc;dc=1;const e=ru();return pc=(t,n,r)=>e(t,n,r)<=0}function pu(){if(hc)return fc;hc=1;const e=ou(),t=cu(),n=au(),r=uu(),i=su(),a=lu();return fc=(s,o,c,u)=>{switch(o){case"===":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s===c;case"!==":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s!==c;case"":case"=":case"==":return e(s,c,u);case"!=":return t(s,c,u);case">":return n(s,c,u);case">=":return r(s,c,u);case"<":return i(s,c,u);case"<=":return a(s,c,u);default:throw new TypeError(`Invalid operator: ${o}`)}}}function du(){if(wc)return vc;wc=1;const e=/\s+/g;class t{constructor(n,r){if(r=i(r),n instanceof t)return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new t(n.raw,r);if(n instanceof a)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&h))+":"+e,n=r.get(t);if(n)return n;const i=this.options.loose,o=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,A(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],l),s("comparator trim",e),e=e.replace(c[u.TILDETRIM],p),s("tilde trim",e),e=e.replace(c[u.CARETTRIM],d),s("caret trim",e);let y=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>M(e,this.options)));i&&(y=y.filter((e=>(s("loose invalid filter",e,this.options),!!e.match(c[u.COMPARATORLOOSE]))))),s("range list",y);const g=new Map,v=y.map((e=>new a(e,this.options)));for(const e of v){if(m(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const w=[...g.values()];return r.set(t,w),w}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>g(t,n)&&e.set.some((e=>g(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}vc=t;const n=(bc||(bc=1,gc=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}),gc),r=new n,i=Qc(),a=fu(),s=Zc(),o=tu(),{safeRe:c,t:u,comparatorTrimReplace:l,tildeTrimReplace:p,caretTrimReplace:d}=Xc(),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:h}=Jc(),m=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},b=(e,t)=>(s("comp",e,t),e=_(e,t),s("caret",e),e=w(e,t),s("tildes",e),e=E(e,t),s("xrange",e),e=k(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,i,a)=>{let o;return s("tilde",e,t,n,r,i,a),v(n)?o="":v(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(s("replaceTilde pr",a),o=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,s("tilde return",o),o}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>T(e,t))).join(" "),T=(e,t)=>{s("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,o)=>{let c;return s("caret",e,t,n,i,a,o),v(n)?c="":v(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(a)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(s("replaceCaret pr",o),c="0"===n?"0"===i?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(s("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),s("caret return",c),c}))},E=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,i,a,o,c)=>{s("xRange",e,n,r,i,a,o,c);const u=v(i),l=u||v(a),p=l||v(o),d=p;return"="===r&&d&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(a=0),o=0,">"===r?(r=">=",l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",l?i=+i+1:a=+a+1),"<"===r&&(c="-0"),n=`${r+i}.${a}.${o}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),s("xRange return",n),n}))},k=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),M=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),A=e=>(t,n,r,i,a,s,o,c,u,l,p,d)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(a)?`>=${r}.${i}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=v(u)?"":v(l)?`<${+u+1}.0.0-0`:v(p)?`<${u}.${+l+1}.0-0`:d?`<=${u}.${l}.${p}-${d}`:e?`<${u}.${l}.${+p+1}-0`:`<=${c}`}`.trim(),O=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return vc}function fu(){if(_c)return xc;_c=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),s("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],a=t.match(n);if(!a)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==a[1]?a[1]:"","="===this.operator&&(this.operator=""),a[2]?this.semver=new o(a[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(s("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new o(t,this.options)}catch(e){return!1}return a(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,r).test(this.value):""===e.operator?""===e.value||new c(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(a(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(a(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}xc=t;const n=Qc(),{safeRe:r,t:i}=Xc(),a=pu(),s=Zc(),o=tu(),c=du();return xc}function hu(){if(Ec)return Tc;Ec=1;const e=du();return Tc=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Tc}function mu(){if(Pc)return Cc;Pc=1;const e=du();return Cc=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},Cc}function yu(){if(Lc)return jc;Lc=1;const e=tu(),t=fu(),{ANY:n}=t,r=du(),i=hu(),a=au(),s=su(),o=lu(),c=uu();return jc=(u,l,p,d)=>{let f,h,m,y,g;switch(u=new e(u,d),l=new r(l,d),p){case">":f=a,h=o,m=s,y=">",g=">=";break;case"<":f=s,h=c,m=a,y="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,l,d))return!1;for(let e=0;e<l.set.length;++e){const r=l.set[e];let i=null,a=null;if(r.forEach((e=>{e.semver===n&&(e=new t(">=0.0.0")),i=i||e,a=a||e,f(e.semver,i.semver,d)?i=e:m(e.semver,a.semver,d)&&(a=e)})),i.operator===y||i.operator===g)return!1;if((!a.operator||a.operator===y)&&h(u,a.semver))return!1;if(a.operator===g&&m(u,a.semver))return!1}return!0},jc}var gu,bu,vu,wu=function(){if(Gc)return Kc;Gc=1;const e=Xc(),t=Jc(),n=tu(),r=eu(),i=nu(),a=function(){if(Ao)return Mo;Ao=1;const e=nu();return Mo=(t,n)=>{const r=e(t,n);return r?r.version:null},Mo}(),s=function(){if(Ro)return Oo;Ro=1;const e=nu();return Oo=(t,n)=>{const r=e(t.trim().replace(/^[=v]+/,""),n);return r?r.version:null},Oo}(),o=function(){if(No)return Io;No=1;const e=tu();return Io=(t,n,r,i,a)=>{"string"==typeof r&&(a=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,a).version}catch(e){return null}},Io}(),c=function(){if(Po)return Co;Po=1;const e=nu();return Co=(t,n)=>{const r=e(t,null,!0),i=e(n,null,!0),a=r.compare(i);if(0===a)return null;const s=a>0,o=s?r:i,c=s?i:r,u=!!o.prerelease.length;if(c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(o))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}}(),u=function(){if(Lo)return jo;Lo=1;const e=tu();return jo=(t,n)=>new e(t,n).major}(),l=function(){if($o)return Do;$o=1;const e=tu();return Do=(t,n)=>new e(t,n).minor}(),p=function(){if(zo)return Uo;zo=1;const e=tu();return Uo=(t,n)=>new e(t,n).patch}(),d=function(){if(Fo)return Bo;Fo=1;const e=nu();return Bo=(t,n)=>{const r=e(t,n);return r&&r.prerelease.length?r.prerelease:null},Bo}(),f=ru(),h=function(){if(Vo)return Yo;Vo=1;const e=ru();return Yo=(t,n,r)=>e(n,t,r)}(),m=function(){if(Go)return Ko;Go=1;const e=ru();return Ko=(t,n)=>e(t,n,!0)}(),y=iu(),g=function(){if(Xo)return Zo;Xo=1;const e=iu();return Zo=(t,n)=>t.sort(((t,r)=>e(t,r,n)))}(),b=function(){if(ec)return Qo;ec=1;const e=iu();return Qo=(t,n)=>t.sort(((t,r)=>e(r,t,n)))}(),v=au(),w=su(),x=ou(),_=cu(),T=uu(),E=lu(),S=pu(),k=function(){if(yc)return mc;yc=1;const e=tu(),t=nu(),{safeRe:n,t:r}=Xc();return mc=(i,a)=>{if(i instanceof e)return i;if("number"==typeof i&&(i=String(i)),"string"!=typeof i)return null;let s=null;if((a=a||{}).rtl){const e=a.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let t;for(;(t=e.exec(i))&&(!s||s.index+s[0].length!==i.length);)s&&t.index+t[0].length===s.index+s[0].length||(s=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else s=i.match(a.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);if(null===s)return null;const o=s[2],c=s[3]||"0",u=s[4]||"0",l=a.includePrerelease&&s[5]?`-${s[5]}`:"",p=a.includePrerelease&&s[6]?`+${s[6]}`:"";return t(`${o}.${c}.${u}${l}${p}`,a)},mc}(),M=fu(),A=du(),O=hu(),R=function(){if(kc)return Sc;kc=1;const e=du();return Sc=(t,n)=>new e(t,n).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),Sc}(),I=function(){if(Ac)return Mc;Ac=1;const e=tu(),t=du();return Mc=(n,r,i)=>{let a=null,s=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(a&&-1!==s.compare(t)||(a=t,s=new e(a,i)))})),a},Mc}(),N=function(){if(Rc)return Oc;Rc=1;const e=tu(),t=du();return Oc=(n,r,i)=>{let a=null,s=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(a&&1!==s.compare(t)||(a=t,s=new e(a,i)))})),a},Oc}(),C=function(){if(Nc)return Ic;Nc=1;const e=tu(),t=du(),n=au();return Ic=(r,i)=>{r=new t(r,i);let a=new e("0.0.0");if(r.test(a))return a;if(a=new e("0.0.0-0"),r.test(a))return a;a=null;for(let t=0;t<r.set.length;++t){const i=r.set[t];let s=null;i.forEach((t=>{const r=new e(t.semver.version);switch(t.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":s&&!n(r,s)||(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!s||a&&!n(a,s)||(a=s)}return a&&r.test(a)?a:null},Ic}(),P=mu(),j=yu(),L=function(){if($c)return Dc;$c=1;const e=yu();return Dc=(t,n,r)=>e(t,n,">",r),Dc}(),D=function(){if(zc)return Uc;zc=1;const e=yu();return Uc=(t,n,r)=>e(t,n,"<",r),Uc}(),$=function(){if(Fc)return Bc;Fc=1;const e=du();return Bc=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r)),Bc}(),U=function(){if(Hc)return qc;Hc=1;const e=hu(),t=ru();return qc=(n,r,i)=>{const a=[];let s=null,o=null;const c=n.sort(((e,n)=>t(e,n,i)));for(const t of c)e(t,r,i)?(o=t,s||(s=t)):(o&&a.push([s,o]),o=null,s=null);s&&a.push([s,null]);const u=[];for(const[e,t]of a)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),p="string"==typeof r.raw?r.raw:String(r);return l.length<p.length?l:r},qc}(),z=function(){if(Vc)return Yc;Vc=1;const e=du(),t=fu(),{ANY:n}=t,r=hu(),i=ru(),a=[new t(">=0.0.0-0")],s=[new t(">=0.0.0")],o=(e,t,o)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=o.includePrerelease?a:s}if(1===t.length&&t[0].semver===n){if(o.includePrerelease)return!0;t=s}const l=new Set;let p,d,f,h,m,y,g;for(const t of e)">"===t.operator||">="===t.operator?p=c(p,t,o):"<"===t.operator||"<="===t.operator?d=u(d,t,o):l.add(t.semver);if(l.size>1)return null;if(p&&d){if(f=i(p.semver,d.semver,o),f>0)return null;if(0===f&&(">="!==p.operator||"<="!==d.operator))return null}for(const e of l){if(p&&!r(e,String(p),o))return null;if(d&&!r(e,String(d),o))return null;for(const n of t)if(!r(e,String(n),o))return!1;return!0}let b=!(!d||o.includePrerelease||!d.semver.prerelease.length)&&d.semver,v=!(!p||o.includePrerelease||!p.semver.prerelease.length)&&p.semver;b&&1===b.prerelease.length&&"<"===d.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,p)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(h=c(p,e,o),h===e&&h!==p)return!1}else if(">="===p.operator&&!r(p.semver,String(e),o))return!1;if(d)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(m=u(d,e,o),m===e&&m!==d)return!1}else if("<="===d.operator&&!r(d.semver,String(e),o))return!1;if(!e.operator&&(d||p)&&0!==f)return!1}return!(p&&y&&!d&&0!==f||d&&g&&!p&&0!==f||v||b)},c=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};return Yc=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;e:for(const e of t.set){for(const t of n.set){const n=o(e,t,r);if(i=i||null!==n,n)continue e}if(i)return!1}return!0},Yc}();return Kc={parse:i,valid:a,clean:s,inc:o,diff:c,major:u,minor:l,patch:p,prerelease:d,compare:f,rcompare:h,compareLoose:m,compareBuild:y,sort:g,rsort:b,gt:v,lt:w,eq:x,neq:_,gte:T,lte:E,cmp:S,coerce:k,Comparator:M,Range:A,satisfies:O,toComparators:R,maxSatisfying:I,minSatisfying:N,minVersion:C,validRange:P,outside:j,gtr:L,ltr:D,intersects:$,simplifyRange:U,subset:z,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}}();!function(e){e.LEDGER="ledger",e.HTTP_ADAPTER="http-adapter",e.EVENTS_ADAPTER="events-adapter",e.FILESYSTEM_ADAPTER="filesystem-adapter",e.WASM_CHECKPOINTER="wasm-checkpointer",e.WASM_INSTRUMENTER="wasm-instrumenter",e.WASM_RUNNER="wasm-runner"}(gu||(gu={})),function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(bu||(bu={})),function(e){e.MINIO="minio",e.S3="s3"}(vu||(vu={}));var xu,_u,Tu,Eu,Su,ku,Mu,Au;!function(e){e.TASK_CREATED="task_created",e.TASK_SOLVED="task_solved",e.FILE_SYSTEM="file_system",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.MESSAGE_SAVED="message_saved",e.COMPUTED_OUTCOME="computed_outcome",e.API_FETCH="api_fetch",e.API_OUTCOME="api_outcome",e.API_SOLVED="api_solved",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.INVOICE="invoice",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check",e.RUNNER_TASK_EXECUTED="runner_task_executed",e.DEPLOYER_EXECUTE_TASK="deployer_execute_task",e.DEPLOYER_TASK_EXECUTED="deployer_task_executed",e.HTTP_ADAPTER_TASK_EXECUTED="http_adapter_task_executed",e.HTTP_ADAPTER_TASK_INSTRUMENTED="http_adapter_task_instrumented",e.HTTP_ADAPTER_TASK_PUSHED="http_adapter_task_pushed",e.HTTP_ADAPTER_TASK_PULLED="http_adapter_task_pulled",e.HTTP_ADAPTER_TASK_CHECKPOINTED="http_adapter_task_checkpointed",e.HTTP_ADAPTER_TASK_CHECKPOINTS_LISTED="http_adapter_task_checkpoints_listed",e.HTTP_ADAPTER_READY_TO_SHUTDOWN="http_adapter_ready_to_shutdown",e.EVENTS_ADAPTER_TASK_EXECUTED="events_adapter_task_executed",e.EVENTS_ADAPTER_TASK_INSTRUMENTED="events_adapter_task_instrumented",e.EVENTS_ADAPTER_TASK_PUSHED="events_adapter_task_pushed",e.EVENTS_ADAPTER_TASK_PULLED="events_adapter_task_pulled",e.EVENTS_ADAPTER_TASK_CHECKPOINTED="events_adapter_task_checkpointed",e.EVENTS_ADAPTER_TASK_CHECKPOINTS_LISTED="events_adapter_task_checkpoints_listed",e.EVENTS_ADAPTER_COMPUTED_OUTCOME="events_adapter_compute_outcome",e.EVENTS_ADAPTER_TASK_CREATED="events_adapter_task_created",e.EVENTS_ADAPTER_NODE_DEREGISTERED="events_adapter_node_deregistered",e.EVENTS_ADAPTER_SERVICE_STARTED_CHECK="events_adapter_service_started_check",e.DISPATCHER_TASK_SOLVED_CLEAR="dispatcher_task_solved_clear",e.DISPATCHER_TASK_CREATED="dispatcher_task_created",e.WASM_INSTRUMENTER_INSTRUMENT_TASK="wasm_instrumenter_instrument_task",e.WASM_INSTRUMENTER_TASK_INSTRUMENTED="wasm_instrumenter_task_instrumented",e.FILESYSTEM_ADAPTER_PUSH_TASK="filesystem_adapter_push_task",e.FILESYSTEM_ADAPTER_TASK_PUSHED="filesystem_adapter_task_pushed",e.FILESYSTEM_ADAPTER_PULL_TASK="filesystem_adapter_pull_task",e.FILESYSTEM_ADAPTER_TASK_PULLED="filesystem_adapter_task_pulled",e.FILESYSTEM_ADAPTER_SERVICE_STARTED_CHECK="filesystem_adapter_service_started_check",e.WASM_CHECKPOINTER_CHECKPOINT_TASK="wasm_checkpointer_checkpoint_task",e.WASM_CHECKPOINTER_LIST_TASK_CHECKPOINTS="wasm_checkpointer_list_task_checkpoints",e.TRANSCRIPT_WRITER_SAVE_MESSAGE="transcript_writer_save_message",e.TRANSCRIPT_WRITER_INVOICE="transcript_writer_save_invoice",e.SEQUENCER_MESSAGE_SAVED="sequencer_message_saved",e.VERIFICATION_MESSAGE_SAVED="verification_message_saved",e.VERIFICATION_VALIDATE_MESSAGE="verification_validate_message",e.VERIFICATION_REVEAL_SOLUTION="verification_reveal_solution",e.VERIFICATION_ERRORS="verification_errors",e.LEDGER_SHUTDOWN="ledger_shutdown",e.LEDGER_SERVICE_STARTED="ledger_service_started"}(xu||(xu={})),function(e){e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.NODE_OUTCOME="node_outcome",e.PLATFORM_ERRORS="errors",e.REVEAL_SOLUTIONS="reveal_solutions",e.SOLUTIONS_REVEALED="solutions_revealed",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.EXECUTION_COMPLETED="execution_completed",e.SERVICE_STARTED="service_started",e.INVOICE="invoice",e.ENTITLEMENT_REQ="entitlement_req",e.ENTITLEMENT_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.EXECUTION_METADATA="execution_metadata"}(_u||(_u={})),function(e){e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check"}(Tu||(Tu={})),function(e){e.ERRORS="errors",e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.SERVICE_STARTED="service_started",e.INVOICES="invoice",e.ENTITLEMENTS_REQ="entitlement_req",e.ENTITLEMENTS_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.DUMMY="DUMMY"}(Eu||(Eu={})),function(e){e.VALIDATION_ERROR="validation_error"}(Su||(Su={})),function(e){e.GAME_PENDING="GamePending",e.READY_FOR_INVOICE="ReadyForInvoice",e.ERROR="Error"}(ku||(ku={})),function(e){!function(e){e.Pay="pay",e.Charge="charge"}(e.Operation||(e.Operation={})),(e.EntitlementOperation||(e.EntitlementOperation={})).IS_USER_REGISTER="isUserRegister"}(Mu||(Mu={})),function(e){e.Pay="pay",e.Charge="charge"}(Au||(Au={})),_u.TASK_SOLVED,_u.TASK_CREATED,_u.API_TASK_CREATED,_u.NODE_OUTCOME,_u.SOLUTIONS_REVEALED,_u.REVEAL_SOLUTIONS,_u.API_OUTCOME,_u.EXECUTION_COMPLETED,_u.EXECUTION_METADATA;var Ou=function(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=null==e?void 0:e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)},Ru=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach((function(n){e.properties[n].forEach((function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},a={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new Ou(a))}))})),t},e}();function Iu(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0}var Nu=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Cu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s},Pu=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ju=function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;(new Ru).transform(e).forEach((function(e){return t.addValidationMetadata(e)}))},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach((function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)})),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var a,s,o=function(e){return void 0!==e.always?e.always:(!e.groups||!e.groups.length)&&n},c=function(e){return!(!r||i&&i.length||!e.groups||!e.groups.length)},u=(this.validationMetadatas.get(e)||[]).filter((function(n){return(n.target===e||n.target===t)&&(!!o(n)||!c(n)&&(!(i&&i.length>0)||n.groups&&!!n.groups.find((function(e){return-1!==i.indexOf(e)}))))})),l=[];try{for(var p=Nu(this.validationMetadatas.entries()),d=p.next();!d.done;d=p.next()){var f=Cu(d.value,2),h=f[0],m=f[1];e.prototype instanceof h&&l.push.apply(l,Pu([],Cu(m),!1))}}catch(e){a={error:e}}finally{try{d&&!d.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}var y=l.filter((function(t){return"string"!=typeof t.target&&(t.target!==e&&((!(t.target instanceof Function)||e.prototype instanceof t.target)&&(!!o(t)||!c(t)&&(!(i&&i.length>0)||t.groups&&!!t.groups.find((function(e){return-1!==i.indexOf(e)}))))))})),g=y.filter((function(e){return!u.find((function(t){return t.propertyName===e.propertyName&&t.type===e.type}))}));return u.concat(g)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e}();function Lu(){var e=Iu();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new ju),e.classValidatorMetadataStorage}var Du=function(){function e(){}return e.isValid=function(e){var t=this;return"isValid"!==e&&"getMessage"!==e&&-1!==Object.keys(this).map((function(e){return t[e]})).indexOf(e)},e.CUSTOM_VALIDATION="customValidation",e.NESTED_VALIDATION="nestedValidation",e.PROMISE_VALIDATION="promiseValidation",e.CONDITIONAL_VALIDATION="conditionalValidation",e.WHITELIST="whitelistValidation",e.IS_DEFINED="isDefined",e}(),$u=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find((function(t){return t.type===e}));return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}());function Uu(e){return $u.get(e)}function zu(e){return function(t,n){var r={type:Du.WHITELIST,target:t.constructor,propertyName:n,validationOptions:e};Lu().addValidationMetadata(new Ou(r))}}var Bu=function(){function e(e,t,n){void 0===n&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return Uu(this.target)},enumerable:!1,configurable:!0}),e}();function Fu(e){var t;if(e.validator instanceof Function){if(t=e.validator,Uu(ju).getTargetValidatorConstraints(e.validator).length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name,":").concat(e.propertyName)}else{var n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):""},e}(),Lu().addConstraintMetadata(new Bu(t,e.name,e.async))}var r={type:e.name&&Du.isValid(e.name)?e.name:Du.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};Lu().addValidationMetadata(new Ou(r))}function qu(e,t){return function(n){var r=t&&t.each?"each value in ":"";return e(r,n)}}function Hu(e,t){return function(n,r){Fu({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}function Yu(e){return function(t,n){var r={type:Du.CONDITIONAL_VALIDATION,name:"isOptional",target:t.constructor,propertyName:n,constraints:[function(e,t){return null!==e[n]&&void 0!==e[n]}],validationOptions:e};Lu().addValidationMetadata(new Ou(r))}}var Vu=function(){return Vu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Vu.apply(this,arguments)};function Ku(e){var t=Vu({},e),n=t.each?"each value in ":"";return t.message=t.message||n+"nested property $property must be either object or array",function(e,n){var r={type:Du.NESTED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};Lu().addValidationMetadata(new Ou(r))}}var Gu,Wu={exports:{}};function Ju(){return Gu||(Gu=1,function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="string"==typeof e||e instanceof String;if(!t){var r=n(e);throw null===e?r="null":"object"===r&&(r=e.constructor.name),new TypeError("Expected a string but received a ".concat(r))}},e.exports=t.default,e.exports.default=t.default}(Wu,Wu.exports)),Wu.exports}function Zu(e){return Hu({name:"isNotEmpty",validator:{validate:function(e,t){return function(e){return""!==e&&null!=e}(e)},defaultMessage:qu((function(e){return e+"$property should not be empty"}),e)}},e)}function Xu(e,t){return Hu({name:"min",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&e>=t}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must not be less than $constraint1"}),t)}},t)}var Qu,el={exports:{}};function tl(){return Qu||(Qu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),null==t&&(t="all");return t in i&&i[t].test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};e.exports=t.default,e.exports.default=t.default}(el,el.exports)),el.exports}var nl=xe(tl());function rl(e,t){return Hu({name:"isUuid",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&nl(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must be a UUID"}),t)}},t)}var il,al={exports:{}};function sl(){return il||(il=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e);var n=new RegExp("^[a-fA-F0-9]{".concat(i[t],"}$"));return n.test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};e.exports=t.default,e.exports.default=t.default}(al,al.exports)),al.exports}var ol=xe(sl());function cl(e,t){return Hu({name:"isHash",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&ol(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must be a hash of type $constraint1"}),t)}},t)}var ul,ll={exports:{}};function pl(){return ul||(ul=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e),i.test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default}(ll,ll.exports)),ll.exports}var dl=xe(pl());function fl(e){return Hu({name:"isEthereumAddress",validator:{validate:function(e,t){return function(e){return"string"==typeof e&&dl(e)}(e)},defaultMessage:qu((function(e){return e+"$property must be an Ethereum address"}),e)}},e)}function hl(e,t){return void 0===e&&(e={}),Hu({name:"isNumber",constraints:[e],validator:{validate:function(e,t){return function(e,t){if(void 0===t&&(t={}),"number"!=typeof e)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(void 0!==t.maxDecimalPlaces){var n=0;if(e%1!=0&&(n=e.toString().split(".")[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must be a number conforming to the specified constraints"}),t)}},t)}var ml=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s};function yl(e){return Object.entries(e).filter((function(e){var t=ml(e,2),n=t[0];return t[1],isNaN(parseInt(n))})).map((function(e){var t=ml(e,2);return t[0],t[1]}))}function gl(e,t){return Hu({name:"isEnum",constraints:[e,yl(e)],validator:{validate:function(e,t){return function(e,t){return Object.keys(t).map((function(e){return t[e]})).includes(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:qu((function(e){return e+"$property must be one of the following values: $constraint2"}),t)}},t)}function bl(e){return Hu({name:"isString",validator:{validate:function(e,t){return function(e){return e instanceof String||"string"==typeof e}(e)},defaultMessage:qu((function(e){return e+"$property must be a string"}),e)}},e)}function vl(){return function(e,t){Fu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>16725312e5}}})}}function wl(){return function(e,t){Fu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>1672531200}}})}}var xl,_l,Tl={};
|
|
12
12
|
/*! *****************************************************************************
|
|
13
13
|
Copyright (C) Microsoft. All rights reserved.
|
|
14
14
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|