@famibee/skynovel 1.40.0 → 1.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/appMain.js CHANGED
@@ -1,16 +1,16 @@
1
- "use strict";var Ji=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var oe=(e,t,r)=>(Ji(e,t,"read from private field"),r?r.call(e):t.get(e)),Fe=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ze=(e,t,r,n)=>(Ji(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Rr=(e,t,r)=>(Ji(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("electron"),Qr=require("fs"),Mf=require("constants"),kf=require("stream"),Ri=require("util"),Oc=require("assert"),Ie=require("path"),Tc=require("crypto"),Uf=require("events"),Vf=require("os"),Dc=require("zlib");var Zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_r={},Xe={};Xe.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((r,n)=>{e.call(this,...t,(i,s)=>i!=null?n(i):r(s))})},"name",{value:e.name})};Xe.fromPromise=function(e){return Object.defineProperty(function(...t){const r=t[t.length-1];if(typeof r!="function")return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:e.name})};var xt=Mf,zf=process.cwd,fi=null,xf=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return fi||(fi=zf.call(process)),fi};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var oa=process.chdir;process.chdir=function(e){fi=null,oa.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,oa)}var Gf=Bf;function Bf(e){xt.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=c(e.stat),e.fstat=c(e.fstat),e.lstat=c(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(a,l,E){E&&process.nextTick(E)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(a,l,E,h){h&&process.nextTick(h)},e.lchownSync=function(){}),xf==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(a){function l(E,h,d){var v=Date.now(),p=0;a(E,h,function f($){if($&&($.code==="EACCES"||$.code==="EPERM")&&Date.now()-v<6e4){setTimeout(function(){e.stat(h,function(_,D){_&&_.code==="ENOENT"?a(E,h,f):d($)})},p),p<100&&(p+=10);return}d&&d($)})}return Object.setPrototypeOf&&Object.setPrototypeOf(l,a),l}(e.rename)),e.read=typeof e.read!="function"?e.read:function(a){function l(E,h,d,v,p,f){var $;if(f&&typeof f=="function"){var _=0;$=function(D,z,T){if(D&&D.code==="EAGAIN"&&_<10)return _++,a.call(e,E,h,d,v,p,$);f.apply(this,arguments)}}return a.call(e,E,h,d,v,p,$)}return Object.setPrototypeOf&&Object.setPrototypeOf(l,a),l}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(a){return function(l,E,h,d,v){for(var p=0;;)try{return a.call(e,l,E,h,d,v)}catch(f){if(f.code==="EAGAIN"&&p<10){p++;continue}throw f}}}(e.readSync);function t(a){a.lchmod=function(l,E,h){a.open(l,xt.O_WRONLY|xt.O_SYMLINK,E,function(d,v){if(d){h&&h(d);return}a.fchmod(v,E,function(p){a.close(v,function(f){h&&h(p||f)})})})},a.lchmodSync=function(l,E){var h=a.openSync(l,xt.O_WRONLY|xt.O_SYMLINK,E),d=!0,v;try{v=a.fchmodSync(h,E),d=!1}finally{if(d)try{a.closeSync(h)}catch{}else a.closeSync(h)}return v}}function r(a){xt.hasOwnProperty("O_SYMLINK")&&a.futimes?(a.lutimes=function(l,E,h,d){a.open(l,xt.O_SYMLINK,function(v,p){if(v){d&&d(v);return}a.futimes(p,E,h,function(f){a.close(p,function($){d&&d(f||$)})})})},a.lutimesSync=function(l,E,h){var d=a.openSync(l,xt.O_SYMLINK),v,p=!0;try{v=a.futimesSync(d,E,h),p=!1}finally{if(p)try{a.closeSync(d)}catch{}else a.closeSync(d)}return v}):a.futimes&&(a.lutimes=function(l,E,h,d){d&&process.nextTick(d)},a.lutimesSync=function(){})}function n(a){return a&&function(l,E,h){return a.call(e,l,E,function(d){m(d)&&(d=null),h&&h.apply(this,arguments)})}}function i(a){return a&&function(l,E){try{return a.call(e,l,E)}catch(h){if(!m(h))throw h}}}function s(a){return a&&function(l,E,h,d){return a.call(e,l,E,h,function(v){m(v)&&(v=null),d&&d.apply(this,arguments)})}}function o(a){return a&&function(l,E,h){try{return a.call(e,l,E,h)}catch(d){if(!m(d))throw d}}}function c(a){return a&&function(l,E,h){typeof E=="function"&&(h=E,E=null);function d(v,p){p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),h&&h.apply(this,arguments)}return E?a.call(e,l,E,d):a.call(e,l,d)}}function u(a){return a&&function(l,E){var h=E?a.call(e,l,E):a.call(e,l);return h&&(h.uid<0&&(h.uid+=4294967296),h.gid<0&&(h.gid+=4294967296)),h}}function m(a){if(!a||a.code==="ENOSYS")return!0;var l=!process.getuid||process.getuid()!==0;return!!(l&&(a.code==="EINVAL"||a.code==="EPERM"))}}var aa=kf.Stream,Hf=qf;function qf(e){return{ReadStream:t,WriteStream:r};function t(n,i){if(!(this instanceof t))return new t(n,i);aa.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),c=0,u=o.length;c<u;c++){var m=o[c];this[m]=i[m]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}e.open(this.path,this.flags,this.mode,function(a,l){if(a){s.emit("error",a),s.readable=!1;return}s.fd=l,s.emit("open",l),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);aa.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),o=0,c=s.length;o<c;o++){var u=s[o];this[u]=i[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}var Kf=Zf,Wf=Object.getPrototypeOf||function(e){return e.__proto__};function Zf(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Wf(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}var Se=Qr,Xf=Gf,Jf=Hf,Yf=Kf,Xn=Ri,Ue,gi;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ue=Symbol.for("graceful-fs.queue"),gi=Symbol.for("graceful-fs.previous")):(Ue="___graceful-fs.queue",gi="___graceful-fs.previous");function Qf(){}function Cc(e,t){Object.defineProperty(e,Ue,{get:function(){return t}})}var vr=Qf;Xn.debuglog?vr=Xn.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(vr=function(){var e=Xn.format.apply(Xn,arguments);e="GFS4: "+e.split(/\n/).join(`
2
- GFS4: `),console.error(e)});if(!Se[Ue]){var el=Zt[Ue]||[];Cc(Se,el),Se.close=function(e){function t(r,n){return e.call(Se,r,function(i){i||ca(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,gi,{value:e}),t}(Se.close),Se.closeSync=function(e){function t(r){e.apply(Se,arguments),ca()}return Object.defineProperty(t,gi,{value:e}),t}(Se.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){vr(Se[Ue]),Oc.equal(Se[Ue].length,0)})}Zt[Ue]||Cc(Zt,Se[Ue]);var nt=As(Yf(Se));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Se.__patched&&(nt=As(Se),Se.__patched=!0);function As(e){Xf(e),e.gracefulify=As,e.createReadStream=z,e.createWriteStream=T;var t=e.readFile;e.readFile=r;function r(P,x,M){return typeof x=="function"&&(M=x,x=null),A(P,x,M);function A(H,G,q,K){return t(H,G,function(B){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Pr([A,[H,G,q],B,K||Date.now(),Date.now()]):typeof q=="function"&&q.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=i;function i(P,x,M,A){return typeof M=="function"&&(A=M,M=null),H(P,x,M,A);function H(G,q,K,B,b){return n(G,q,K,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Pr([H,[G,q,K,B],k,b||Date.now(),Date.now()]):typeof B=="function"&&B.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=o);function o(P,x,M,A){return typeof M=="function"&&(A=M,M=null),H(P,x,M,A);function H(G,q,K,B,b){return s(G,q,K,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Pr([H,[G,q,K,B],k,b||Date.now(),Date.now()]):typeof B=="function"&&B.apply(this,arguments)})}}var c=e.copyFile;c&&(e.copyFile=u);function u(P,x,M,A){return typeof M=="function"&&(A=M,M=0),H(P,x,M,A);function H(G,q,K,B,b){return c(G,q,K,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Pr([H,[G,q,K,B],k,b||Date.now(),Date.now()]):typeof B=="function"&&B.apply(this,arguments)})}}var m=e.readdir;e.readdir=l;var a=/^v[0-5]\./;function l(P,x,M){typeof x=="function"&&(M=x,x=null);var A=a.test(process.version)?function(q,K,B,b){return m(q,H(q,K,B,b))}:function(q,K,B,b){return m(q,K,H(q,K,B,b))};return A(P,x,M);function H(G,q,K,B){return function(b,k){b&&(b.code==="EMFILE"||b.code==="ENFILE")?Pr([A,[G,q,K],b,B||Date.now(),Date.now()]):(k&&k.sort&&k.sort(),typeof K=="function"&&K.call(this,b,k))}}}if(process.version.substr(0,4)==="v0.8"){var E=Jf(e);f=E.ReadStream,_=E.WriteStream}var h=e.ReadStream;h&&(f.prototype=Object.create(h.prototype),f.prototype.open=$);var d=e.WriteStream;d&&(_.prototype=Object.create(d.prototype),_.prototype.open=D),Object.defineProperty(e,"ReadStream",{get:function(){return f},set:function(P){f=P},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return _},set:function(P){_=P},enumerable:!0,configurable:!0});var v=f;Object.defineProperty(e,"FileReadStream",{get:function(){return v},set:function(P){v=P},enumerable:!0,configurable:!0});var p=_;Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(P){p=P},enumerable:!0,configurable:!0});function f(P,x){return this instanceof f?(h.apply(this,arguments),this):f.apply(Object.create(f.prototype),arguments)}function $(){var P=this;V(P.path,P.flags,P.mode,function(x,M){x?(P.autoClose&&P.destroy(),P.emit("error",x)):(P.fd=M,P.emit("open",M),P.read())})}function _(P,x){return this instanceof _?(d.apply(this,arguments),this):_.apply(Object.create(_.prototype),arguments)}function D(){var P=this;V(P.path,P.flags,P.mode,function(x,M){x?(P.destroy(),P.emit("error",x)):(P.fd=M,P.emit("open",M))})}function z(P,x){return new e.ReadStream(P,x)}function T(P,x){return new e.WriteStream(P,x)}var C=e.open;e.open=V;function V(P,x,M,A){return typeof M=="function"&&(A=M,M=null),H(P,x,M,A);function H(G,q,K,B,b){return C(G,q,K,function(k,O){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Pr([H,[G,q,K,B],k,b||Date.now(),Date.now()]):typeof B=="function"&&B.apply(this,arguments)})}}return e}function Pr(e){vr("ENQUEUE",e[0].name,e[1]),Se[Ue].push(e),bs()}var Jn;function ca(){for(var e=Date.now(),t=0;t<Se[Ue].length;++t)Se[Ue][t].length>2&&(Se[Ue][t][3]=e,Se[Ue][t][4]=e);bs()}function bs(){if(clearTimeout(Jn),Jn=void 0,Se[Ue].length!==0){var e=Se[Ue].shift(),t=e[0],r=e[1],n=e[2],i=e[3],s=e[4];if(i===void 0)vr("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){vr("TIMEOUT",t.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var c=Date.now()-s,u=Math.max(s-i,1),m=Math.min(u*1.2,100);c>=m?(vr("RETRY",t.name,r),t.apply(null,r.concat([i]))):Se[Ue].push(e)}Jn===void 0&&(Jn=setTimeout(bs,0))}}(function(e){const t=Xe.fromCallback,r=nt,n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(i=>typeof r[i]=="function");Object.assign(e,r),n.forEach(i=>{e[i]=t(r[i])}),e.exists=function(i,s){return typeof s=="function"?r.exists(i,s):new Promise(o=>r.exists(i,o))},e.read=function(i,s,o,c,u,m){return typeof m=="function"?r.read(i,s,o,c,u,m):new Promise((a,l)=>{r.read(i,s,o,c,u,(E,h,d)=>{if(E)return l(E);a({bytesRead:h,buffer:d})})})},e.write=function(i,s,...o){return typeof o[o.length-1]=="function"?r.write(i,s,...o):new Promise((c,u)=>{r.write(i,s,...o,(m,a,l)=>{if(m)return u(m);c({bytesWritten:a,buffer:l})})})},e.readv=function(i,s,...o){return typeof o[o.length-1]=="function"?r.readv(i,s,...o):new Promise((c,u)=>{r.readv(i,s,...o,(m,a,l)=>{if(m)return u(m);c({bytesRead:a,buffers:l})})})},e.writev=function(i,s,...o){return typeof o[o.length-1]=="function"?r.writev(i,s,...o):new Promise((c,u)=>{r.writev(i,s,...o,(m,a,l)=>{if(m)return u(m);c({bytesWritten:a,buffers:l})})})},typeof r.realpath.native=="function"?e.realpath.native=t(r.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")})(_r);var Ls={},Rc={};const tl=Ie;Rc.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(tl.parse(t).root,""))){const n=new Error(`Path contains invalid characters: ${t}`);throw n.code="EINVAL",n}};const Pc=_r,{checkPath:Ac}=Rc,bc=e=>{const t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};Ls.makeDir=async(e,t)=>(Ac(e),Pc.mkdir(e,{mode:bc(t),recursive:!0}));Ls.makeDirSync=(e,t)=>(Ac(e),Pc.mkdirSync(e,{mode:bc(t),recursive:!0}));const rl=Xe.fromPromise,{makeDir:nl,makeDirSync:Yi}=Ls,Qi=rl(nl);var bt={mkdirs:Qi,mkdirsSync:Yi,mkdirp:Qi,mkdirpSync:Yi,ensureDir:Qi,ensureDirSync:Yi};const il=Xe.fromPromise,Lc=_r;function sl(e){return Lc.access(e).then(()=>!0).catch(()=>!1)}var Sr={pathExists:il(sl),pathExistsSync:Lc.existsSync};const Vr=nt;function ol(e,t,r,n){Vr.open(e,"r+",(i,s)=>{if(i)return n(i);Vr.futimes(s,t,r,o=>{Vr.close(s,c=>{n&&n(o||c)})})})}function al(e,t,r){const n=Vr.openSync(e,"r+");return Vr.futimesSync(n,t,r),Vr.closeSync(n)}var Fc={utimesMillis:ol,utimesMillisSync:al};const Kr=_r,Le=Ie,cl=Ri;function ul(e,t,r){const n=r.dereference?i=>Kr.stat(i,{bigint:!0}):i=>Kr.lstat(i,{bigint:!0});return Promise.all([n(e),n(t).catch(i=>{if(i.code==="ENOENT")return null;throw i})]).then(([i,s])=>({srcStat:i,destStat:s}))}function fl(e,t,r){let n;const i=r.dereference?o=>Kr.statSync(o,{bigint:!0}):o=>Kr.lstatSync(o,{bigint:!0}),s=i(e);try{n=i(t)}catch(o){if(o.code==="ENOENT")return{srcStat:s,destStat:null};throw o}return{srcStat:s,destStat:n}}function ll(e,t,r,n,i){cl.callbackify(ul)(e,t,n,(s,o)=>{if(s)return i(s);const{srcStat:c,destStat:u}=o;if(u){if(Vn(c,u)){const m=Le.basename(e),a=Le.basename(t);return r==="move"&&m!==a&&m.toLowerCase()===a.toLowerCase()?i(null,{srcStat:c,destStat:u,isChangingCase:!0}):i(new Error("Source and destination must not be the same."))}if(c.isDirectory()&&!u.isDirectory())return i(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!c.isDirectory()&&u.isDirectory())return i(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return c.isDirectory()&&Fs(e,t)?i(new Error(Pi(e,t,r))):i(null,{srcStat:c,destStat:u})})}function dl(e,t,r,n){const{srcStat:i,destStat:s}=fl(e,t,n);if(s){if(Vn(i,s)){const o=Le.basename(e),c=Le.basename(t);if(r==="move"&&o!==c&&o.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(i.isDirectory()&&Fs(e,t))throw new Error(Pi(e,t,r));return{srcStat:i,destStat:s}}function jc(e,t,r,n,i){const s=Le.resolve(Le.dirname(e)),o=Le.resolve(Le.dirname(r));if(o===s||o===Le.parse(o).root)return i();Kr.stat(o,{bigint:!0},(c,u)=>c?c.code==="ENOENT"?i():i(c):Vn(t,u)?i(new Error(Pi(e,r,n))):jc(e,t,o,n,i))}function Mc(e,t,r,n){const i=Le.resolve(Le.dirname(e)),s=Le.resolve(Le.dirname(r));if(s===i||s===Le.parse(s).root)return;let o;try{o=Kr.statSync(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return;throw c}if(Vn(t,o))throw new Error(Pi(e,r,n));return Mc(e,t,s,n)}function Vn(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Fs(e,t){const r=Le.resolve(e).split(Le.sep).filter(i=>i),n=Le.resolve(t).split(Le.sep).filter(i=>i);return r.reduce((i,s,o)=>i&&n[o]===s,!0)}function Pi(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}var en={checkPaths:ll,checkPathsSync:dl,checkParentPaths:jc,checkParentPathsSync:Mc,isSrcSubdir:Fs,areIdentical:Vn};const rt=nt,Cn=Ie,hl=bt.mkdirs,ml=Sr.pathExists,pl=Fc.utimesMillis,Rn=en;function yl(e,t,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
1
+ "use strict";var cs=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var oe=(e,t,r)=>(cs(e,t,"read from private field"),r?r.call(e):t.get(e)),Fe=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ze=(e,t,r,n)=>(cs(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Pr=(e,t,r)=>(cs(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("electron"),en=require("fs"),kf=require("constants"),Uf=require("stream"),xi=require("util"),Oc=require("assert"),Ie=require("path"),Tc=require("crypto"),Vf=require("events"),zf=require("os"),Dc=require("zlib");var Xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Sr={},Xe={};Xe.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((r,n)=>{e.call(this,...t,(i,s)=>i!=null?n(i):r(s))})},"name",{value:e.name})};Xe.fromPromise=function(e){return Object.defineProperty(function(...t){const r=t[t.length-1];if(typeof r!="function")return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:e.name})};var Gt=kf,xf=process.cwd,di=null,Gf=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return di||(di=xf.call(process)),di};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var aa=process.chdir;process.chdir=function(e){di=null,aa.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,aa)}var Bf=Hf;function Hf(e){Gt.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=c(e.stat),e.fstat=c(e.fstat),e.lstat=c(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(a,l,E){E&&process.nextTick(E)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(a,l,E,h){h&&process.nextTick(h)},e.lchownSync=function(){}),Gf==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(a){function l(E,h,d){var y=Date.now(),p=0;a(E,h,function f($){if($&&($.code==="EACCES"||$.code==="EPERM")&&Date.now()-y<6e4){setTimeout(function(){e.stat(h,function(_,D){_&&_.code==="ENOENT"?a(E,h,f):d($)})},p),p<100&&(p+=10);return}d&&d($)})}return Object.setPrototypeOf&&Object.setPrototypeOf(l,a),l}(e.rename)),e.read=typeof e.read!="function"?e.read:function(a){function l(E,h,d,y,p,f){var $;if(f&&typeof f=="function"){var _=0;$=function(D,z,T){if(D&&D.code==="EAGAIN"&&_<10)return _++,a.call(e,E,h,d,y,p,$);f.apply(this,arguments)}}return a.call(e,E,h,d,y,p,$)}return Object.setPrototypeOf&&Object.setPrototypeOf(l,a),l}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(a){return function(l,E,h,d,y){for(var p=0;;)try{return a.call(e,l,E,h,d,y)}catch(f){if(f.code==="EAGAIN"&&p<10){p++;continue}throw f}}}(e.readSync);function t(a){a.lchmod=function(l,E,h){a.open(l,Gt.O_WRONLY|Gt.O_SYMLINK,E,function(d,y){if(d){h&&h(d);return}a.fchmod(y,E,function(p){a.close(y,function(f){h&&h(p||f)})})})},a.lchmodSync=function(l,E){var h=a.openSync(l,Gt.O_WRONLY|Gt.O_SYMLINK,E),d=!0,y;try{y=a.fchmodSync(h,E),d=!1}finally{if(d)try{a.closeSync(h)}catch{}else a.closeSync(h)}return y}}function r(a){Gt.hasOwnProperty("O_SYMLINK")&&a.futimes?(a.lutimes=function(l,E,h,d){a.open(l,Gt.O_SYMLINK,function(y,p){if(y){d&&d(y);return}a.futimes(p,E,h,function(f){a.close(p,function($){d&&d(f||$)})})})},a.lutimesSync=function(l,E,h){var d=a.openSync(l,Gt.O_SYMLINK),y,p=!0;try{y=a.futimesSync(d,E,h),p=!1}finally{if(p)try{a.closeSync(d)}catch{}else a.closeSync(d)}return y}):a.futimes&&(a.lutimes=function(l,E,h,d){d&&process.nextTick(d)},a.lutimesSync=function(){})}function n(a){return a&&function(l,E,h){return a.call(e,l,E,function(d){m(d)&&(d=null),h&&h.apply(this,arguments)})}}function i(a){return a&&function(l,E){try{return a.call(e,l,E)}catch(h){if(!m(h))throw h}}}function s(a){return a&&function(l,E,h,d){return a.call(e,l,E,h,function(y){m(y)&&(y=null),d&&d.apply(this,arguments)})}}function o(a){return a&&function(l,E,h){try{return a.call(e,l,E,h)}catch(d){if(!m(d))throw d}}}function c(a){return a&&function(l,E,h){typeof E=="function"&&(h=E,E=null);function d(y,p){p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),h&&h.apply(this,arguments)}return E?a.call(e,l,E,d):a.call(e,l,d)}}function u(a){return a&&function(l,E){var h=E?a.call(e,l,E):a.call(e,l);return h&&(h.uid<0&&(h.uid+=4294967296),h.gid<0&&(h.gid+=4294967296)),h}}function m(a){if(!a||a.code==="ENOSYS")return!0;var l=!process.getuid||process.getuid()!==0;return!!(l&&(a.code==="EINVAL"||a.code==="EPERM"))}}var ca=Uf.Stream,qf=Kf;function Kf(e){return{ReadStream:t,WriteStream:r};function t(n,i){if(!(this instanceof t))return new t(n,i);ca.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),c=0,u=o.length;c<u;c++){var m=o[c];this[m]=i[m]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}e.open(this.path,this.flags,this.mode,function(a,l){if(a){s.emit("error",a),s.readable=!1;return}s.fd=l,s.emit("open",l),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);ca.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),o=0,c=s.length;o<c;o++){var u=s[o];this[u]=i[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}var Zf=Xf,Wf=Object.getPrototypeOf||function(e){return e.__proto__};function Xf(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Wf(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}var Se=en,Jf=Bf,Yf=qf,Qf=Zf,Yn=xi,Ue,_i;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ue=Symbol.for("graceful-fs.queue"),_i=Symbol.for("graceful-fs.previous")):(Ue="___graceful-fs.queue",_i="___graceful-fs.previous");function el(){}function Cc(e,t){Object.defineProperty(e,Ue,{get:function(){return t}})}var vr=el;Yn.debuglog?vr=Yn.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(vr=function(){var e=Yn.format.apply(Yn,arguments);e="GFS4: "+e.split(/\n/).join(`
2
+ GFS4: `),console.error(e)});if(!Se[Ue]){var tl=Xt[Ue]||[];Cc(Se,tl),Se.close=function(e){function t(r,n){return e.call(Se,r,function(i){i||ua(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,_i,{value:e}),t}(Se.close),Se.closeSync=function(e){function t(r){e.apply(Se,arguments),ua()}return Object.defineProperty(t,_i,{value:e}),t}(Se.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){vr(Se[Ue]),Oc.equal(Se[Ue].length,0)})}Xt[Ue]||Cc(Xt,Se[Ue]);var nt=zs(Qf(Se));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Se.__patched&&(nt=zs(Se),Se.__patched=!0);function zs(e){Jf(e),e.gracefulify=zs,e.createReadStream=z,e.createWriteStream=T;var t=e.readFile;e.readFile=r;function r(P,x,M){return typeof x=="function"&&(M=x,x=null),A(P,x,M);function A(H,G,q,K){return t(H,G,function(B){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Ar([A,[H,G,q],B,K||Date.now(),Date.now()]):typeof q=="function"&&q.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=i;function i(P,x,M,A){return typeof M=="function"&&(A=M,M=null),H(P,x,M,A);function H(G,q,K,B,b){return n(G,q,K,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Ar([H,[G,q,K,B],k,b||Date.now(),Date.now()]):typeof B=="function"&&B.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=o);function o(P,x,M,A){return typeof M=="function"&&(A=M,M=null),H(P,x,M,A);function H(G,q,K,B,b){return s(G,q,K,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Ar([H,[G,q,K,B],k,b||Date.now(),Date.now()]):typeof B=="function"&&B.apply(this,arguments)})}}var c=e.copyFile;c&&(e.copyFile=u);function u(P,x,M,A){return typeof M=="function"&&(A=M,M=0),H(P,x,M,A);function H(G,q,K,B,b){return c(G,q,K,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Ar([H,[G,q,K,B],k,b||Date.now(),Date.now()]):typeof B=="function"&&B.apply(this,arguments)})}}var m=e.readdir;e.readdir=l;var a=/^v[0-5]\./;function l(P,x,M){typeof x=="function"&&(M=x,x=null);var A=a.test(process.version)?function(q,K,B,b){return m(q,H(q,K,B,b))}:function(q,K,B,b){return m(q,K,H(q,K,B,b))};return A(P,x,M);function H(G,q,K,B){return function(b,k){b&&(b.code==="EMFILE"||b.code==="ENFILE")?Ar([A,[G,q,K],b,B||Date.now(),Date.now()]):(k&&k.sort&&k.sort(),typeof K=="function"&&K.call(this,b,k))}}}if(process.version.substr(0,4)==="v0.8"){var E=Yf(e);f=E.ReadStream,_=E.WriteStream}var h=e.ReadStream;h&&(f.prototype=Object.create(h.prototype),f.prototype.open=$);var d=e.WriteStream;d&&(_.prototype=Object.create(d.prototype),_.prototype.open=D),Object.defineProperty(e,"ReadStream",{get:function(){return f},set:function(P){f=P},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return _},set:function(P){_=P},enumerable:!0,configurable:!0});var y=f;Object.defineProperty(e,"FileReadStream",{get:function(){return y},set:function(P){y=P},enumerable:!0,configurable:!0});var p=_;Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(P){p=P},enumerable:!0,configurable:!0});function f(P,x){return this instanceof f?(h.apply(this,arguments),this):f.apply(Object.create(f.prototype),arguments)}function $(){var P=this;V(P.path,P.flags,P.mode,function(x,M){x?(P.autoClose&&P.destroy(),P.emit("error",x)):(P.fd=M,P.emit("open",M),P.read())})}function _(P,x){return this instanceof _?(d.apply(this,arguments),this):_.apply(Object.create(_.prototype),arguments)}function D(){var P=this;V(P.path,P.flags,P.mode,function(x,M){x?(P.destroy(),P.emit("error",x)):(P.fd=M,P.emit("open",M))})}function z(P,x){return new e.ReadStream(P,x)}function T(P,x){return new e.WriteStream(P,x)}var C=e.open;e.open=V;function V(P,x,M,A){return typeof M=="function"&&(A=M,M=null),H(P,x,M,A);function H(G,q,K,B,b){return C(G,q,K,function(k,O){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Ar([H,[G,q,K,B],k,b||Date.now(),Date.now()]):typeof B=="function"&&B.apply(this,arguments)})}}return e}function Ar(e){vr("ENQUEUE",e[0].name,e[1]),Se[Ue].push(e),xs()}var Qn;function ua(){for(var e=Date.now(),t=0;t<Se[Ue].length;++t)Se[Ue][t].length>2&&(Se[Ue][t][3]=e,Se[Ue][t][4]=e);xs()}function xs(){if(clearTimeout(Qn),Qn=void 0,Se[Ue].length!==0){var e=Se[Ue].shift(),t=e[0],r=e[1],n=e[2],i=e[3],s=e[4];if(i===void 0)vr("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){vr("TIMEOUT",t.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var c=Date.now()-s,u=Math.max(s-i,1),m=Math.min(u*1.2,100);c>=m?(vr("RETRY",t.name,r),t.apply(null,r.concat([i]))):Se[Ue].push(e)}Qn===void 0&&(Qn=setTimeout(xs,0))}}(function(e){const t=Xe.fromCallback,r=nt,n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(i=>typeof r[i]=="function");Object.assign(e,r),n.forEach(i=>{e[i]=t(r[i])}),e.exists=function(i,s){return typeof s=="function"?r.exists(i,s):new Promise(o=>r.exists(i,o))},e.read=function(i,s,o,c,u,m){return typeof m=="function"?r.read(i,s,o,c,u,m):new Promise((a,l)=>{r.read(i,s,o,c,u,(E,h,d)=>{if(E)return l(E);a({bytesRead:h,buffer:d})})})},e.write=function(i,s,...o){return typeof o[o.length-1]=="function"?r.write(i,s,...o):new Promise((c,u)=>{r.write(i,s,...o,(m,a,l)=>{if(m)return u(m);c({bytesWritten:a,buffer:l})})})},e.readv=function(i,s,...o){return typeof o[o.length-1]=="function"?r.readv(i,s,...o):new Promise((c,u)=>{r.readv(i,s,...o,(m,a,l)=>{if(m)return u(m);c({bytesRead:a,buffers:l})})})},e.writev=function(i,s,...o){return typeof o[o.length-1]=="function"?r.writev(i,s,...o):new Promise((c,u)=>{r.writev(i,s,...o,(m,a,l)=>{if(m)return u(m);c({bytesWritten:a,buffers:l})})})},typeof r.realpath.native=="function"?e.realpath.native=t(r.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")})(Sr);var Gs={},Rc={};const rl=Ie;Rc.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(rl.parse(t).root,""))){const n=new Error(`Path contains invalid characters: ${t}`);throw n.code="EINVAL",n}};const Pc=Sr,{checkPath:Ac}=Rc,bc=e=>{const t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};Gs.makeDir=async(e,t)=>(Ac(e),Pc.mkdir(e,{mode:bc(t),recursive:!0}));Gs.makeDirSync=(e,t)=>(Ac(e),Pc.mkdirSync(e,{mode:bc(t),recursive:!0}));const nl=Xe.fromPromise,{makeDir:il,makeDirSync:us}=Gs,fs=nl(il);var bt={mkdirs:fs,mkdirsSync:us,mkdirp:fs,mkdirpSync:us,ensureDir:fs,ensureDirSync:us};const sl=Xe.fromPromise,Lc=Sr;function ol(e){return Lc.access(e).then(()=>!0).catch(()=>!1)}var wr={pathExists:sl(ol),pathExistsSync:Lc.existsSync};const zr=nt;function al(e,t,r,n){zr.open(e,"r+",(i,s)=>{if(i)return n(i);zr.futimes(s,t,r,o=>{zr.close(s,c=>{n&&n(o||c)})})})}function cl(e,t,r){const n=zr.openSync(e,"r+");return zr.futimesSync(n,t,r),zr.closeSync(n)}var Fc={utimesMillis:al,utimesMillisSync:cl};const Zr=Sr,Le=Ie,ul=xi;function fl(e,t,r){const n=r.dereference?i=>Zr.stat(i,{bigint:!0}):i=>Zr.lstat(i,{bigint:!0});return Promise.all([n(e),n(t).catch(i=>{if(i.code==="ENOENT")return null;throw i})]).then(([i,s])=>({srcStat:i,destStat:s}))}function ll(e,t,r){let n;const i=r.dereference?o=>Zr.statSync(o,{bigint:!0}):o=>Zr.lstatSync(o,{bigint:!0}),s=i(e);try{n=i(t)}catch(o){if(o.code==="ENOENT")return{srcStat:s,destStat:null};throw o}return{srcStat:s,destStat:n}}function dl(e,t,r,n,i){ul.callbackify(fl)(e,t,n,(s,o)=>{if(s)return i(s);const{srcStat:c,destStat:u}=o;if(u){if(xn(c,u)){const m=Le.basename(e),a=Le.basename(t);return r==="move"&&m!==a&&m.toLowerCase()===a.toLowerCase()?i(null,{srcStat:c,destStat:u,isChangingCase:!0}):i(new Error("Source and destination must not be the same."))}if(c.isDirectory()&&!u.isDirectory())return i(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!c.isDirectory()&&u.isDirectory())return i(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return c.isDirectory()&&Bs(e,t)?i(new Error(Gi(e,t,r))):i(null,{srcStat:c,destStat:u})})}function hl(e,t,r,n){const{srcStat:i,destStat:s}=ll(e,t,n);if(s){if(xn(i,s)){const o=Le.basename(e),c=Le.basename(t);if(r==="move"&&o!==c&&o.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(i.isDirectory()&&Bs(e,t))throw new Error(Gi(e,t,r));return{srcStat:i,destStat:s}}function jc(e,t,r,n,i){const s=Le.resolve(Le.dirname(e)),o=Le.resolve(Le.dirname(r));if(o===s||o===Le.parse(o).root)return i();Zr.stat(o,{bigint:!0},(c,u)=>c?c.code==="ENOENT"?i():i(c):xn(t,u)?i(new Error(Gi(e,r,n))):jc(e,t,o,n,i))}function Mc(e,t,r,n){const i=Le.resolve(Le.dirname(e)),s=Le.resolve(Le.dirname(r));if(s===i||s===Le.parse(s).root)return;let o;try{o=Zr.statSync(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return;throw c}if(xn(t,o))throw new Error(Gi(e,r,n));return Mc(e,t,s,n)}function xn(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Bs(e,t){const r=Le.resolve(e).split(Le.sep).filter(i=>i),n=Le.resolve(t).split(Le.sep).filter(i=>i);return r.reduce((i,s,o)=>i&&n[o]===s,!0)}function Gi(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}var tn={checkPaths:dl,checkPathsSync:hl,checkParentPaths:jc,checkParentPathsSync:Mc,isSrcSubdir:Bs,areIdentical:xn};const rt=nt,Cn=Ie,ml=bt.mkdirs,pl=wr.pathExists,yl=Fc.utimesMillis,Rn=tn;function vl(e,t,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
3
3
 
4
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),Rn.checkPaths(e,t,"copy",r,(i,s)=>{if(i)return n(i);const{srcStat:o,destStat:c}=s;Rn.checkParentPaths(e,o,t,"copy",u=>{if(u)return n(u);kc(e,t,r,(m,a)=>{if(m)return n(m);if(!a)return n();vl(c,e,t,r,n)})})})}function vl(e,t,r,n,i){const s=Cn.dirname(r);ml(s,(o,c)=>{if(o)return i(o);if(c)return vs(e,t,r,n,i);hl(s,u=>u?i(u):vs(e,t,r,n,i))})}function kc(e,t,r,n){if(!r.filter)return n(null,!0);Promise.resolve(r.filter(e,t)).then(i=>n(null,i),i=>n(i))}function vs(e,t,r,n,i){(n.dereference?rt.stat:rt.lstat)(t,(o,c)=>o?i(o):c.isDirectory()?Nl(c,e,t,r,n,i):c.isFile()||c.isCharacterDevice()||c.isBlockDevice()?El(c,e,t,r,n,i):c.isSymbolicLink()?Tl(e,t,r,n,i):c.isSocket()?i(new Error(`Cannot copy a socket file: ${t}`)):c.isFIFO()?i(new Error(`Cannot copy a FIFO pipe: ${t}`)):i(new Error(`Unknown file: ${t}`)))}function El(e,t,r,n,i,s){return t?gl(e,r,n,i,s):Uc(e,r,n,i,s)}function gl(e,t,r,n,i){if(n.overwrite)rt.unlink(r,s=>s?i(s):Uc(e,t,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Uc(e,t,r,n,i){rt.copyFile(t,r,s=>s?i(s):n.preserveTimestamps?$l(e.mode,t,r,i):Ai(r,e.mode,i))}function $l(e,t,r,n){return _l(e)?Sl(r,e,i=>i?n(i):ua(e,t,r,n)):ua(e,t,r,n)}function _l(e){return(e&128)===0}function Sl(e,t,r){return Ai(e,t|128,r)}function ua(e,t,r,n){wl(t,r,i=>i?n(i):Ai(r,e,n))}function Ai(e,t,r){return rt.chmod(e,t,r)}function wl(e,t,r){rt.stat(e,(n,i)=>n?r(n):pl(t,i.atime,i.mtime,r))}function Nl(e,t,r,n,i,s){return t?Vc(r,n,i,s):Il(e.mode,r,n,i,s)}function Il(e,t,r,n,i){rt.mkdir(r,s=>{if(s)return i(s);Vc(t,r,n,o=>o?i(o):Ai(r,e,i))})}function Vc(e,t,r,n){rt.readdir(e,(i,s)=>i?n(i):Es(s,e,t,r,n))}function Es(e,t,r,n,i){const s=e.pop();return s?Ol(e,s,t,r,n,i):i()}function Ol(e,t,r,n,i,s){const o=Cn.join(r,t),c=Cn.join(n,t);kc(o,c,i,(u,m)=>{if(u)return s(u);if(!m)return Es(e,r,n,i,s);Rn.checkPaths(o,c,"copy",i,(a,l)=>{if(a)return s(a);const{destStat:E}=l;vs(E,o,c,i,h=>h?s(h):Es(e,r,n,i,s))})})}function Tl(e,t,r,n,i){rt.readlink(t,(s,o)=>{if(s)return i(s);if(n.dereference&&(o=Cn.resolve(process.cwd(),o)),e)rt.readlink(r,(c,u)=>c?c.code==="EINVAL"||c.code==="UNKNOWN"?rt.symlink(o,r,i):i(c):(n.dereference&&(u=Cn.resolve(process.cwd(),u)),Rn.isSrcSubdir(o,u)?i(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${u}'.`)):Rn.isSrcSubdir(u,o)?i(new Error(`Cannot overwrite '${u}' with '${o}'.`)):Dl(o,r,i)));else return rt.symlink(o,r,i)})}function Dl(e,t,r){rt.unlink(t,n=>n?r(n):rt.symlink(e,t,r))}var Cl=yl;const We=nt,Pn=Ie,Rl=bt.mkdirsSync,Pl=Fc.utimesMillisSync,An=en;function Al(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
4
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),Rn.checkPaths(e,t,"copy",r,(i,s)=>{if(i)return n(i);const{srcStat:o,destStat:c}=s;Rn.checkParentPaths(e,o,t,"copy",u=>{if(u)return n(u);kc(e,t,r,(m,a)=>{if(m)return n(m);if(!a)return n();El(c,e,t,r,n)})})})}function El(e,t,r,n,i){const s=Cn.dirname(r);pl(s,(o,c)=>{if(o)return i(o);if(c)return Ds(e,t,r,n,i);ml(s,u=>u?i(u):Ds(e,t,r,n,i))})}function kc(e,t,r,n){if(!r.filter)return n(null,!0);Promise.resolve(r.filter(e,t)).then(i=>n(null,i),i=>n(i))}function Ds(e,t,r,n,i){(n.dereference?rt.stat:rt.lstat)(t,(o,c)=>o?i(o):c.isDirectory()?Il(c,e,t,r,n,i):c.isFile()||c.isCharacterDevice()||c.isBlockDevice()?gl(c,e,t,r,n,i):c.isSymbolicLink()?Dl(e,t,r,n,i):c.isSocket()?i(new Error(`Cannot copy a socket file: ${t}`)):c.isFIFO()?i(new Error(`Cannot copy a FIFO pipe: ${t}`)):i(new Error(`Unknown file: ${t}`)))}function gl(e,t,r,n,i,s){return t?$l(e,r,n,i,s):Uc(e,r,n,i,s)}function $l(e,t,r,n,i){if(n.overwrite)rt.unlink(r,s=>s?i(s):Uc(e,t,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Uc(e,t,r,n,i){rt.copyFile(t,r,s=>s?i(s):n.preserveTimestamps?_l(e.mode,t,r,i):Bi(r,e.mode,i))}function _l(e,t,r,n){return Sl(e)?wl(r,e,i=>i?n(i):fa(e,t,r,n)):fa(e,t,r,n)}function Sl(e){return(e&128)===0}function wl(e,t,r){return Bi(e,t|128,r)}function fa(e,t,r,n){Nl(t,r,i=>i?n(i):Bi(r,e,n))}function Bi(e,t,r){return rt.chmod(e,t,r)}function Nl(e,t,r){rt.stat(e,(n,i)=>n?r(n):yl(t,i.atime,i.mtime,r))}function Il(e,t,r,n,i,s){return t?Vc(r,n,i,s):Ol(e.mode,r,n,i,s)}function Ol(e,t,r,n,i){rt.mkdir(r,s=>{if(s)return i(s);Vc(t,r,n,o=>o?i(o):Bi(r,e,i))})}function Vc(e,t,r,n){rt.readdir(e,(i,s)=>i?n(i):Cs(s,e,t,r,n))}function Cs(e,t,r,n,i){const s=e.pop();return s?Tl(e,s,t,r,n,i):i()}function Tl(e,t,r,n,i,s){const o=Cn.join(r,t),c=Cn.join(n,t);kc(o,c,i,(u,m)=>{if(u)return s(u);if(!m)return Cs(e,r,n,i,s);Rn.checkPaths(o,c,"copy",i,(a,l)=>{if(a)return s(a);const{destStat:E}=l;Ds(E,o,c,i,h=>h?s(h):Cs(e,r,n,i,s))})})}function Dl(e,t,r,n,i){rt.readlink(t,(s,o)=>{if(s)return i(s);if(n.dereference&&(o=Cn.resolve(process.cwd(),o)),e)rt.readlink(r,(c,u)=>c?c.code==="EINVAL"||c.code==="UNKNOWN"?rt.symlink(o,r,i):i(c):(n.dereference&&(u=Cn.resolve(process.cwd(),u)),Rn.isSrcSubdir(o,u)?i(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${u}'.`)):Rn.isSrcSubdir(u,o)?i(new Error(`Cannot overwrite '${u}' with '${o}'.`)):Cl(o,r,i)));else return rt.symlink(o,r,i)})}function Cl(e,t,r){rt.unlink(t,n=>n?r(n):rt.symlink(e,t,r))}var Rl=vl;const Ze=nt,Pn=Ie,Pl=bt.mkdirsSync,Al=Fc.utimesMillisSync,An=tn;function bl(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
5
5
 
6
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");const{srcStat:n,destStat:i}=An.checkPathsSync(e,t,"copy",r);if(An.checkParentPathsSync(e,n,t,"copy"),r.filter&&!r.filter(e,t))return;const s=Pn.dirname(t);return We.existsSync(s)||Rl(s),zc(i,e,t,r)}function zc(e,t,r,n){const s=(n.dereference?We.statSync:We.lstatSync)(t);if(s.isDirectory())return Ul(s,e,t,r,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return bl(s,e,t,r,n);if(s.isSymbolicLink())return xl(e,t,r,n);throw s.isSocket()?new Error(`Cannot copy a socket file: ${t}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}function bl(e,t,r,n,i){return t?Ll(e,r,n,i):xc(e,r,n,i)}function Ll(e,t,r,n){if(n.overwrite)return We.unlinkSync(r),xc(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function xc(e,t,r,n){return We.copyFileSync(t,r),n.preserveTimestamps&&Fl(e.mode,t,r),js(r,e.mode)}function Fl(e,t,r){return jl(e)&&Ml(r,e),kl(t,r)}function jl(e){return(e&128)===0}function Ml(e,t){return js(e,t|128)}function js(e,t){return We.chmodSync(e,t)}function kl(e,t){const r=We.statSync(e);return Pl(t,r.atime,r.mtime)}function Ul(e,t,r,n,i){return t?Gc(r,n,i):Vl(e.mode,r,n,i)}function Vl(e,t,r,n){return We.mkdirSync(r),Gc(t,r,n),js(r,e)}function Gc(e,t,r){We.readdirSync(e).forEach(n=>zl(n,e,t,r))}function zl(e,t,r,n){const i=Pn.join(t,e),s=Pn.join(r,e);if(n.filter&&!n.filter(i,s))return;const{destStat:o}=An.checkPathsSync(i,s,"copy",n);return zc(o,i,s,n)}function xl(e,t,r,n){let i=We.readlinkSync(t);if(n.dereference&&(i=Pn.resolve(process.cwd(),i)),e){let s;try{s=We.readlinkSync(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return We.symlinkSync(i,r);throw o}if(n.dereference&&(s=Pn.resolve(process.cwd(),s)),An.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(An.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return Gl(i,r)}else return We.symlinkSync(i,r)}function Gl(e,t){return We.unlinkSync(t),We.symlinkSync(e,t)}var Bl=Al;const Hl=Xe.fromCallback;var Ms={copy:Hl(Cl),copySync:Bl};const Bc=nt,ql=Xe.fromCallback;function Kl(e,t){Bc.rm(e,{recursive:!0,force:!0},t)}function Wl(e){Bc.rmSync(e,{recursive:!0,force:!0})}var bi={remove:ql(Kl),removeSync:Wl};const Zl=Xe.fromPromise,Hc=_r,qc=Ie,Kc=bt,Wc=bi,fa=Zl(async function(t){let r;try{r=await Hc.readdir(t)}catch{return Kc.mkdirs(t)}return Promise.all(r.map(n=>Wc.remove(qc.join(t,n))))});function la(e){let t;try{t=Hc.readdirSync(e)}catch{return Kc.mkdirsSync(e)}t.forEach(r=>{r=qc.join(e,r),Wc.removeSync(r)})}var Xl={emptyDirSync:la,emptydirSync:la,emptyDir:fa,emptydir:fa};const Jl=Xe.fromCallback,Zc=Ie,Xt=nt,Xc=bt;function Yl(e,t){function r(){Xt.writeFile(e,"",n=>{if(n)return t(n);t()})}Xt.stat(e,(n,i)=>{if(!n&&i.isFile())return t();const s=Zc.dirname(e);Xt.stat(s,(o,c)=>{if(o)return o.code==="ENOENT"?Xc.mkdirs(s,u=>{if(u)return t(u);r()}):t(o);c.isDirectory()?r():Xt.readdir(s,u=>{if(u)return t(u)})})})}function Ql(e){let t;try{t=Xt.statSync(e)}catch{}if(t&&t.isFile())return;const r=Zc.dirname(e);try{Xt.statSync(r).isDirectory()||Xt.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")Xc.mkdirsSync(r);else throw n}Xt.writeFileSync(e,"")}var ed={createFile:Jl(Yl),createFileSync:Ql};const td=Xe.fromCallback,Jc=Ie,Ht=nt,Yc=bt,rd=Sr.pathExists,{areIdentical:Qc}=en;function nd(e,t,r){function n(i,s){Ht.link(i,s,o=>{if(o)return r(o);r(null)})}Ht.lstat(t,(i,s)=>{Ht.lstat(e,(o,c)=>{if(o)return o.message=o.message.replace("lstat","ensureLink"),r(o);if(s&&Qc(c,s))return r(null);const u=Jc.dirname(t);rd(u,(m,a)=>{if(m)return r(m);if(a)return n(e,t);Yc.mkdirs(u,l=>{if(l)return r(l);n(e,t)})})})})}function id(e,t){let r;try{r=Ht.lstatSync(t)}catch{}try{const s=Ht.lstatSync(e);if(r&&Qc(s,r))return}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}const n=Jc.dirname(t);return Ht.existsSync(n)||Yc.mkdirsSync(n),Ht.linkSync(e,t)}var sd={createLink:td(nd),createLinkSync:id};const Jt=Ie,_n=nt,od=Sr.pathExists;function ad(e,t,r){if(Jt.isAbsolute(e))return _n.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{const n=Jt.dirname(t),i=Jt.join(n,e);return od(i,(s,o)=>s?r(s):o?r(null,{toCwd:i,toDst:e}):_n.lstat(e,c=>c?(c.message=c.message.replace("lstat","ensureSymlink"),r(c)):r(null,{toCwd:e,toDst:Jt.relative(n,e)})))}}function cd(e,t){let r;if(Jt.isAbsolute(e)){if(r=_n.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{const n=Jt.dirname(t),i=Jt.join(n,e);if(r=_n.existsSync(i),r)return{toCwd:i,toDst:e};if(r=_n.existsSync(e),!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:Jt.relative(n,e)}}}var ud={symlinkPaths:ad,symlinkPathsSync:cd};const eu=nt;function fd(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);eu.lstat(e,(n,i)=>{if(n)return r(null,"file");t=i&&i.isDirectory()?"dir":"file",r(null,t)})}function ld(e,t){let r;if(t)return t;try{r=eu.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}var dd={symlinkType:fd,symlinkTypeSync:ld};const hd=Xe.fromCallback,tu=Ie,vt=_r,ru=bt,md=ru.mkdirs,pd=ru.mkdirsSync,nu=ud,yd=nu.symlinkPaths,vd=nu.symlinkPathsSync,iu=dd,Ed=iu.symlinkType,gd=iu.symlinkTypeSync,$d=Sr.pathExists,{areIdentical:su}=en;function _d(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,vt.lstat(t,(i,s)=>{!i&&s.isSymbolicLink()?Promise.all([vt.stat(e),vt.stat(t)]).then(([o,c])=>{if(su(o,c))return n(null);da(e,t,r,n)}):da(e,t,r,n)})}function da(e,t,r,n){yd(e,t,(i,s)=>{if(i)return n(i);e=s.toDst,Ed(s.toCwd,r,(o,c)=>{if(o)return n(o);const u=tu.dirname(t);$d(u,(m,a)=>{if(m)return n(m);if(a)return vt.symlink(e,t,c,n);md(u,l=>{if(l)return n(l);vt.symlink(e,t,c,n)})})})})}function Sd(e,t,r){let n;try{n=vt.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const c=vt.statSync(e),u=vt.statSync(t);if(su(c,u))return}const i=vd(e,t);e=i.toDst,r=gd(i.toCwd,r);const s=tu.dirname(t);return vt.existsSync(s)||pd(s),vt.symlinkSync(e,t,r)}var wd={createSymlink:hd(_d),createSymlinkSync:Sd};const{createFile:ha,createFileSync:ma}=ed,{createLink:pa,createLinkSync:ya}=sd,{createSymlink:va,createSymlinkSync:Ea}=wd;var Nd={createFile:ha,createFileSync:ma,ensureFile:ha,ensureFileSync:ma,createLink:pa,createLinkSync:ya,ensureLink:pa,ensureLinkSync:ya,createSymlink:va,createSymlinkSync:Ea,ensureSymlink:va,ensureSymlinkSync:Ea};function Id(e,{EOL:t=`
7
- `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){const s=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+s}function Od(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}var ks={stringify:Id,stripBom:Od};let Wr;try{Wr=nt}catch{Wr=Qr}const Li=Xe,{stringify:ou,stripBom:au}=ks;async function Td(e,t={}){typeof t=="string"&&(t={encoding:t});const r=t.fs||Wr,n="throws"in t?t.throws:!0;let i=await Li.fromCallback(r.readFile)(e,t);i=au(i);let s;try{s=JSON.parse(i,t?t.reviver:null)}catch(o){if(n)throw o.message=`${e}: ${o.message}`,o;return null}return s}const Dd=Li.fromPromise(Td);function Cd(e,t={}){typeof t=="string"&&(t={encoding:t});const r=t.fs||Wr,n="throws"in t?t.throws:!0;try{let i=r.readFileSync(e,t);return i=au(i),JSON.parse(i,t.reviver)}catch(i){if(n)throw i.message=`${e}: ${i.message}`,i;return null}}async function Rd(e,t,r={}){const n=r.fs||Wr,i=ou(t,r);await Li.fromCallback(n.writeFile)(e,i,r)}const Pd=Li.fromPromise(Rd);function Ad(e,t,r={}){const n=r.fs||Wr,i=ou(t,r);return n.writeFileSync(e,i,r)}const bd={readFile:Dd,readFileSync:Cd,writeFile:Pd,writeFileSync:Ad};var Ld=bd;const Yn=Ld;var Fd={readJson:Yn.readFile,readJsonSync:Yn.readFileSync,writeJson:Yn.writeFile,writeJsonSync:Yn.writeFileSync};const jd=Xe.fromCallback,Sn=nt,cu=Ie,uu=bt,Md=Sr.pathExists;function kd(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");const i=cu.dirname(e);Md(i,(s,o)=>{if(s)return n(s);if(o)return Sn.writeFile(e,t,r,n);uu.mkdirs(i,c=>{if(c)return n(c);Sn.writeFile(e,t,r,n)})})}function Ud(e,...t){const r=cu.dirname(e);if(Sn.existsSync(r))return Sn.writeFileSync(e,...t);uu.mkdirsSync(r),Sn.writeFileSync(e,...t)}var Us={outputFile:jd(kd),outputFileSync:Ud};const{stringify:Vd}=ks,{outputFile:zd}=Us;async function xd(e,t,r={}){const n=Vd(t,r);await zd(e,n,r)}var Gd=xd;const{stringify:Bd}=ks,{outputFileSync:Hd}=Us;function qd(e,t,r){const n=Bd(t,r);Hd(e,n,r)}var Kd=qd;const Wd=Xe.fromPromise,Ze=Fd;Ze.outputJson=Wd(Gd);Ze.outputJsonSync=Kd;Ze.outputJSON=Ze.outputJson;Ze.outputJSONSync=Ze.outputJsonSync;Ze.writeJSON=Ze.writeJson;Ze.writeJSONSync=Ze.writeJsonSync;Ze.readJSON=Ze.readJson;Ze.readJSONSync=Ze.readJsonSync;var Zd=Ze;const Xd=nt,gs=Ie,Jd=Ms.copy,fu=bi.remove,Yd=bt.mkdirp,Qd=Sr.pathExists,ga=en;function eh(e,t,r,n){typeof r=="function"&&(n=r,r={}),r=r||{};const i=r.overwrite||r.clobber||!1;ga.checkPaths(e,t,"move",r,(s,o)=>{if(s)return n(s);const{srcStat:c,isChangingCase:u=!1}=o;ga.checkParentPaths(e,c,t,"move",m=>{if(m)return n(m);if(th(t))return $a(e,t,i,u,n);Yd(gs.dirname(t),a=>a?n(a):$a(e,t,i,u,n))})})}function th(e){const t=gs.dirname(e);return gs.parse(t).root===t}function $a(e,t,r,n,i){if(n)return es(e,t,r,i);if(r)return fu(t,s=>s?i(s):es(e,t,r,i));Qd(t,(s,o)=>s?i(s):o?i(new Error("dest already exists.")):es(e,t,r,i))}function es(e,t,r,n){Xd.rename(e,t,i=>i?i.code!=="EXDEV"?n(i):rh(e,t,r,n):n())}function rh(e,t,r,n){Jd(e,t,{overwrite:r,errorOnExist:!0},s=>s?n(s):fu(e,n))}var nh=eh;const lu=nt,$s=Ie,ih=Ms.copySync,du=bi.removeSync,sh=bt.mkdirpSync,_a=en;function oh(e,t,r){r=r||{};const n=r.overwrite||r.clobber||!1,{srcStat:i,isChangingCase:s=!1}=_a.checkPathsSync(e,t,"move",r);return _a.checkParentPathsSync(e,i,t,"move"),ah(t)||sh($s.dirname(t)),ch(e,t,n,s)}function ah(e){const t=$s.dirname(e);return $s.parse(t).root===t}function ch(e,t,r,n){if(n)return ts(e,t,r);if(r)return du(t),ts(e,t,r);if(lu.existsSync(t))throw new Error("dest already exists.");return ts(e,t,r)}function ts(e,t,r){try{lu.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return uh(e,t,r)}}function uh(e,t,r){return ih(e,t,{overwrite:r,errorOnExist:!0}),du(e)}var fh=oh;const lh=Xe.fromCallback;var dh={move:lh(nh),moveSync:fh},lt={..._r,...Ms,...Xl,...Nd,...Zd,...bt,...dh,...Us,...Sr,...bi},_s={exports:{}},hh=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")};const ar=hh,mh=new Set(["__proto__","prototype","constructor"]),ph=e=>!e.some(t=>mh.has(t));function Qn(e){const t=e.split("."),r=[];for(let n=0;n<t.length;n++){let i=t[n];for(;i[i.length-1]==="\\"&&t[n+1]!==void 0;)i=i.slice(0,-1)+".",i+=t[++n];r.push(i)}return ph(r)?r:[]}var yh={get(e,t,r){if(!ar(e)||typeof t!="string")return r===void 0?e:r;const n=Qn(t);if(n.length!==0){for(let i=0;i<n.length;i++)if(e=e[n[i]],e==null){if(i!==n.length-1)return r;break}return e===void 0?r:e}},set(e,t,r){if(!ar(e)||typeof t!="string")return e;const n=e,i=Qn(t);for(let s=0;s<i.length;s++){const o=i[s];ar(e[o])||(e[o]={}),s===i.length-1&&(e[o]=r),e=e[o]}return n},delete(e,t){if(!ar(e)||typeof t!="string")return!1;const r=Qn(t);for(let n=0;n<r.length;n++){const i=r[n];if(n===r.length-1)return delete e[i],!0;if(e=e[i],!ar(e))return!1}},has(e,t){if(!ar(e)||typeof t!="string")return!1;const r=Qn(t);if(r.length===0)return!1;for(let n=0;n<r.length;n++)if(ar(e)){if(!(r[n]in e))return!1;e=e[r[n]]}else return!1;return!0}},Vs={exports:{}},zs={exports:{}},xs={exports:{}},Gs={exports:{}};const hu=Qr;Gs.exports=e=>new Promise(t=>{hu.access(e,r=>{t(!r)})});Gs.exports.sync=e=>{try{return hu.accessSync(e),!0}catch{return!1}};var Bs={exports:{}},Hs={exports:{}};const mu=(e,...t)=>new Promise(r=>{r(e(...t))});Hs.exports=mu;Hs.exports.default=mu;const vh=Hs.exports,pu=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const t=[];let r=0;const n=()=>{r--,t.length>0&&t.shift()()},i=(c,u,...m)=>{r++;const a=vh(c,...m);u(a),a.then(n,n)},s=(c,u,...m)=>{r<e?i(c,u,...m):t.push(i.bind(null,c,u,...m))},o=(c,...u)=>new Promise(m=>s(c,m,...u));return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}}),o};Bs.exports=pu;Bs.exports.default=pu;const Sa=Bs.exports;class yu extends Error{constructor(t){super(),this.value=t}}const Eh=(e,t)=>Promise.resolve(e).then(t),gh=e=>Promise.all(e).then(t=>t[1]===!0&&Promise.reject(new yu(t[0])));var $h=(e,t,r)=>{r=Object.assign({concurrency:1/0,preserveOrder:!0},r);const n=Sa(r.concurrency),i=[...e].map(o=>[o,n(Eh,o,t)]),s=Sa(r.preserveOrder?1:1/0);return Promise.all(i.map(o=>s(gh,o))).then(()=>{}).catch(o=>o instanceof yu?o.value:Promise.reject(o))};const vu=Ie,Eu=Gs.exports,_h=$h;xs.exports=(e,t)=>(t=Object.assign({cwd:process.cwd()},t),_h(e,r=>Eu(vu.resolve(t.cwd,r)),t));xs.exports.sync=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);for(const r of e)if(Eu.sync(vu.resolve(t.cwd,r)))return r};const Yt=Ie,gu=xs.exports;zs.exports=(e,t={})=>{const r=Yt.resolve(t.cwd||""),{root:n}=Yt.parse(r),i=[].concat(e);return new Promise(s=>{(function o(c){gu(i,{cwd:c}).then(u=>{u?s(Yt.join(c,u)):c===n?s(null):o(Yt.dirname(c))})})(r)})};zs.exports.sync=(e,t={})=>{let r=Yt.resolve(t.cwd||"");const{root:n}=Yt.parse(r),i=[].concat(e);for(;;){const s=gu.sync(i,{cwd:r});if(s)return Yt.join(r,s);if(r===n)return null;r=Yt.dirname(r)}};const $u=zs.exports;Vs.exports=async({cwd:e}={})=>$u("package.json",{cwd:e});Vs.exports.sync=({cwd:e}={})=>$u.sync("package.json",{cwd:e});var qs={exports:{}};const we=Ie,_u=Vf,qt=_u.homedir(),Ks=_u.tmpdir(),{env:kr}=process,Sh=e=>{const t=we.join(qt,"Library");return{data:we.join(t,"Application Support",e),config:we.join(t,"Preferences",e),cache:we.join(t,"Caches",e),log:we.join(t,"Logs",e),temp:we.join(Ks,e)}},wh=e=>{const t=kr.APPDATA||we.join(qt,"AppData","Roaming"),r=kr.LOCALAPPDATA||we.join(qt,"AppData","Local");return{data:we.join(r,e,"Data"),config:we.join(t,e,"Config"),cache:we.join(r,e,"Cache"),log:we.join(r,e,"Log"),temp:we.join(Ks,e)}},Nh=e=>{const t=we.basename(qt);return{data:we.join(kr.XDG_DATA_HOME||we.join(qt,".local","share"),e),config:we.join(kr.XDG_CONFIG_HOME||we.join(qt,".config"),e),cache:we.join(kr.XDG_CACHE_HOME||we.join(qt,".cache"),e),log:we.join(kr.XDG_STATE_HOME||we.join(qt,".local","state"),e),temp:we.join(Ks,t,e)}},Su=(e,t)=>{if(typeof e!="string")throw new TypeError(`Expected string, got ${typeof e}`);return t=Object.assign({suffix:"nodejs"},t),t.suffix&&(e+=`-${t.suffix}`),process.platform==="darwin"?Sh(e):process.platform==="win32"?wh(e):Nh(e)};qs.exports=Su;qs.exports.default=Su;var Pt={},he={};Object.defineProperty(he,"__esModule",{value:!0});he.NOOP=he.LIMIT_FILES_DESCRIPTORS=he.LIMIT_BASENAME_LENGTH=he.IS_USER_ROOT=he.IS_POSIX=he.DEFAULT_TIMEOUT_SYNC=he.DEFAULT_TIMEOUT_ASYNC=he.DEFAULT_WRITE_OPTIONS=he.DEFAULT_READ_OPTIONS=he.DEFAULT_FOLDER_MODE=he.DEFAULT_FILE_MODE=he.DEFAULT_ENCODING=void 0;const Ih="utf8";he.DEFAULT_ENCODING=Ih;const Oh=438;he.DEFAULT_FILE_MODE=Oh;const Th=511;he.DEFAULT_FOLDER_MODE=Th;const Dh={};he.DEFAULT_READ_OPTIONS=Dh;const Ch={};he.DEFAULT_WRITE_OPTIONS=Ch;const Rh=5e3;he.DEFAULT_TIMEOUT_ASYNC=Rh;const Ph=100;he.DEFAULT_TIMEOUT_SYNC=Ph;const Ah=!!process.getuid;he.IS_POSIX=Ah;const bh=process.getuid?!process.getuid():!1;he.IS_USER_ROOT=bh;const Lh=128;he.LIMIT_BASENAME_LENGTH=Lh;const Fh=1e4;he.LIMIT_FILES_DESCRIPTORS=Fh;const jh=()=>{};he.NOOP=jh;var Fi={},Zr={};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.attemptifySync=Zr.attemptifyAsync=void 0;const wu=he,Mh=(e,t=wu.NOOP)=>function(){return e.apply(void 0,arguments).catch(t)};Zr.attemptifyAsync=Mh;const kh=(e,t=wu.NOOP)=>function(){try{return e.apply(void 0,arguments)}catch(r){return t(r)}};Zr.attemptifySync=kh;var Ws={};Object.defineProperty(Ws,"__esModule",{value:!0});const Uh=he,Nu={isChangeErrorOk:e=>{const{code:t}=e;return t==="ENOSYS"||!Uh.IS_USER_ROOT&&(t==="EINVAL"||t==="EPERM")},isRetriableError:e=>{const{code:t}=e;return t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCS"||t==="EPERM"},onChangeError:e=>{if(!Nu.isChangeErrorOk(e))throw e}};Ws.default=Nu;var Xr={},Zs={};Object.defineProperty(Zs,"__esModule",{value:!0});const Vh=he,ye={interval:25,intervalId:void 0,limit:Vh.LIMIT_FILES_DESCRIPTORS,queueActive:new Set,queueWaiting:new Set,init:()=>{ye.intervalId||(ye.intervalId=setInterval(ye.tick,ye.interval))},reset:()=>{!ye.intervalId||(clearInterval(ye.intervalId),delete ye.intervalId)},add:e=>{ye.queueWaiting.add(e),ye.queueActive.size<ye.limit/2?ye.tick():ye.init()},remove:e=>{ye.queueWaiting.delete(e),ye.queueActive.delete(e)},schedule:()=>new Promise(e=>{const t=()=>ye.remove(r),r=()=>e(t);ye.add(r)}),tick:()=>{if(!(ye.queueActive.size>=ye.limit)){if(!ye.queueWaiting.size)return ye.reset();for(const e of ye.queueWaiting){if(ye.queueActive.size>=ye.limit)break;ye.queueWaiting.delete(e),ye.queueActive.add(e),e()}}}};Zs.default=ye;Object.defineProperty(Xr,"__esModule",{value:!0});Xr.retryifySync=Xr.retryifyAsync=void 0;const zh=Zs,xh=(e,t)=>function(r){return function n(){return zh.default.schedule().then(i=>e.apply(void 0,arguments).then(s=>(i(),s),s=>{if(i(),Date.now()>=r)throw s;if(t(s)){const o=Math.round(100+400*Math.random());return new Promise(u=>setTimeout(u,o)).then(()=>n.apply(void 0,arguments))}throw s}))}};Xr.retryifyAsync=xh;const Gh=(e,t)=>function(r){return function n(){try{return e.apply(void 0,arguments)}catch(i){if(Date.now()>r)throw i;if(t(i))return n.apply(void 0,arguments);throw i}}};Xr.retryifySync=Gh;Object.defineProperty(Fi,"__esModule",{value:!0});const me=Qr,Be=Ri,He=Zr,Ae=Ws,Qe=Xr,Bh={chmodAttempt:He.attemptifyAsync(Be.promisify(me.chmod),Ae.default.onChangeError),chownAttempt:He.attemptifyAsync(Be.promisify(me.chown),Ae.default.onChangeError),closeAttempt:He.attemptifyAsync(Be.promisify(me.close)),fsyncAttempt:He.attemptifyAsync(Be.promisify(me.fsync)),mkdirAttempt:He.attemptifyAsync(Be.promisify(me.mkdir)),realpathAttempt:He.attemptifyAsync(Be.promisify(me.realpath)),statAttempt:He.attemptifyAsync(Be.promisify(me.stat)),unlinkAttempt:He.attemptifyAsync(Be.promisify(me.unlink)),closeRetry:Qe.retryifyAsync(Be.promisify(me.close),Ae.default.isRetriableError),fsyncRetry:Qe.retryifyAsync(Be.promisify(me.fsync),Ae.default.isRetriableError),openRetry:Qe.retryifyAsync(Be.promisify(me.open),Ae.default.isRetriableError),readFileRetry:Qe.retryifyAsync(Be.promisify(me.readFile),Ae.default.isRetriableError),renameRetry:Qe.retryifyAsync(Be.promisify(me.rename),Ae.default.isRetriableError),statRetry:Qe.retryifyAsync(Be.promisify(me.stat),Ae.default.isRetriableError),writeRetry:Qe.retryifyAsync(Be.promisify(me.write),Ae.default.isRetriableError),chmodSyncAttempt:He.attemptifySync(me.chmodSync,Ae.default.onChangeError),chownSyncAttempt:He.attemptifySync(me.chownSync,Ae.default.onChangeError),closeSyncAttempt:He.attemptifySync(me.closeSync),mkdirSyncAttempt:He.attemptifySync(me.mkdirSync),realpathSyncAttempt:He.attemptifySync(me.realpathSync),statSyncAttempt:He.attemptifySync(me.statSync),unlinkSyncAttempt:He.attemptifySync(me.unlinkSync),closeSyncRetry:Qe.retryifySync(me.closeSync,Ae.default.isRetriableError),fsyncSyncRetry:Qe.retryifySync(me.fsyncSync,Ae.default.isRetriableError),openSyncRetry:Qe.retryifySync(me.openSync,Ae.default.isRetriableError),readFileSyncRetry:Qe.retryifySync(me.readFileSync,Ae.default.isRetriableError),renameSyncRetry:Qe.retryifySync(me.renameSync,Ae.default.isRetriableError),statSyncRetry:Qe.retryifySync(me.statSync,Ae.default.isRetriableError),writeSyncRetry:Qe.retryifySync(me.writeSync,Ae.default.isRetriableError)};Fi.default=Bh;var Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});const Hh={isFunction:e=>typeof e=="function",isString:e=>typeof e=="string",isUndefined:e=>typeof e>"u"};Xs.default=Hh;var Js={};Object.defineProperty(Js,"__esModule",{value:!0});const ei={},Ss={next:e=>{const t=ei[e];if(!t)return;t.shift();const r=t[0];r?r(()=>Ss.next(e)):delete ei[e]},schedule:e=>new Promise(t=>{let r=ei[e];r||(r=ei[e]=[]),r.push(t),!(r.length>1)&&t(()=>Ss.next(e))})};Js.default=Ss;var Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});const qh=Ie,wa=he,Na=Fi,ot={store:{},create:e=>{const t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),r=Date.now().toString().slice(-10),n="tmp-",i=`.${n}${r}${t}`;return`${e}${i}`},get:(e,t,r=!0)=>{const n=ot.truncate(t(e));return n in ot.store?ot.get(e,t,r):(ot.store[n]=r,[n,()=>delete ot.store[n]])},purge:e=>{!ot.store[e]||(delete ot.store[e],Na.default.unlinkAttempt(e))},purgeSync:e=>{!ot.store[e]||(delete ot.store[e],Na.default.unlinkSyncAttempt(e))},purgeSyncAll:()=>{for(const e in ot.store)ot.purgeSync(e)},truncate:e=>{const t=qh.basename(e);if(t.length<=wa.LIMIT_BASENAME_LENGTH)return e;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;const n=t.length-wa.LIMIT_BASENAME_LENGTH;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};process.on("exit",ot.purgeSyncAll);Ys.default=ot;Object.defineProperty(Pt,"__esModule",{value:!0});Pt.writeFileSync=Pt.writeFile=Pt.readFileSync=Pt.readFile=void 0;const Iu=Ie,Me=he,de=Fi,at=Xs,Kh=Js,Qt=Ys;function Ou(e,t=Me.DEFAULT_READ_OPTIONS){var r;if(at.default.isString(t))return Ou(e,{encoding:t});const n=Date.now()+((r=t.timeout)!==null&&r!==void 0?r:Me.DEFAULT_TIMEOUT_ASYNC);return de.default.readFileRetry(n)(e,t)}Pt.readFile=Ou;function Tu(e,t=Me.DEFAULT_READ_OPTIONS){var r;if(at.default.isString(t))return Tu(e,{encoding:t});const n=Date.now()+((r=t.timeout)!==null&&r!==void 0?r:Me.DEFAULT_TIMEOUT_SYNC);return de.default.readFileSyncRetry(n)(e,t)}Pt.readFileSync=Tu;const Du=(e,t,r,n)=>{if(at.default.isFunction(r))return Du(e,t,Me.DEFAULT_WRITE_OPTIONS,r);const i=Cu(e,t,r);return n&&i.then(n,n),i};Pt.writeFile=Du;const Cu=async(e,t,r=Me.DEFAULT_WRITE_OPTIONS)=>{var n;if(at.default.isString(r))return Cu(e,t,{encoding:r});const i=Date.now()+((n=r.timeout)!==null&&n!==void 0?n:Me.DEFAULT_TIMEOUT_ASYNC);let s=null,o=null,c=null,u=null,m=null;try{r.schedule&&(s=await r.schedule(e)),o=await Kh.default.schedule(e),e=await de.default.realpathAttempt(e)||e,[u,c]=Qt.default.get(e,r.tmpCreate||Qt.default.create,r.tmpPurge!==!1);const a=Me.IS_POSIX&&at.default.isUndefined(r.chown),l=at.default.isUndefined(r.mode);if(a||l){const h=await de.default.statAttempt(e);h&&(r={...r},a&&(r.chown={uid:h.uid,gid:h.gid}),l&&(r.mode=h.mode))}const E=Iu.dirname(e);await de.default.mkdirAttempt(E,{mode:Me.DEFAULT_FOLDER_MODE,recursive:!0}),m=await de.default.openRetry(i)(u,"w",r.mode||Me.DEFAULT_FILE_MODE),r.tmpCreated&&r.tmpCreated(u),at.default.isString(t)?await de.default.writeRetry(i)(m,t,0,r.encoding||Me.DEFAULT_ENCODING):at.default.isUndefined(t)||await de.default.writeRetry(i)(m,t,0,t.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?await de.default.fsyncRetry(i)(m):de.default.fsyncAttempt(m)),await de.default.closeRetry(i)(m),m=null,r.chown&&await de.default.chownAttempt(u,r.chown.uid,r.chown.gid),r.mode&&await de.default.chmodAttempt(u,r.mode);try{await de.default.renameRetry(i)(u,e)}catch(h){if(h.code!=="ENAMETOOLONG")throw h;await de.default.renameRetry(i)(u,Qt.default.truncate(e))}c(),u=null}finally{m&&await de.default.closeAttempt(m),u&&Qt.default.purge(u),s&&s(),o&&o()}},Ru=(e,t,r=Me.DEFAULT_WRITE_OPTIONS)=>{var n;if(at.default.isString(r))return Ru(e,t,{encoding:r});const i=Date.now()+((n=r.timeout)!==null&&n!==void 0?n:Me.DEFAULT_TIMEOUT_SYNC);let s=null,o=null,c=null;try{e=de.default.realpathSyncAttempt(e)||e,[o,s]=Qt.default.get(e,r.tmpCreate||Qt.default.create,r.tmpPurge!==!1);const u=Me.IS_POSIX&&at.default.isUndefined(r.chown),m=at.default.isUndefined(r.mode);if(u||m){const l=de.default.statSyncAttempt(e);l&&(r={...r},u&&(r.chown={uid:l.uid,gid:l.gid}),m&&(r.mode=l.mode))}const a=Iu.dirname(e);de.default.mkdirSyncAttempt(a,{mode:Me.DEFAULT_FOLDER_MODE,recursive:!0}),c=de.default.openSyncRetry(i)(o,"w",r.mode||Me.DEFAULT_FILE_MODE),r.tmpCreated&&r.tmpCreated(o),at.default.isString(t)?de.default.writeSyncRetry(i)(c,t,0,r.encoding||Me.DEFAULT_ENCODING):at.default.isUndefined(t)||de.default.writeSyncRetry(i)(c,t,0,t.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?de.default.fsyncSyncRetry(i)(c):de.default.fsyncAttempt(c)),de.default.closeSyncRetry(i)(c),c=null,r.chown&&de.default.chownSyncAttempt(o,r.chown.uid,r.chown.gid),r.mode&&de.default.chmodSyncAttempt(o,r.mode);try{de.default.renameSyncRetry(i)(o,e)}catch(l){if(l.code!=="ENAMETOOLONG")throw l;de.default.renameSyncRetry(i)(o,Qt.default.truncate(e))}s(),o=null}finally{c&&de.default.closeSyncAttempt(c),o&&Qt.default.purge(o)}};Pt.writeFileSync=Ru;var $i={exports:{}},Pu={},gt={},Jr={},zn={},re={},bn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor($){if(super(),!e.IDENTIFIER.test($))throw new Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor($){super(),this._items=typeof $=="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((_,D)=>`${_}${D}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((_,D)=>(D instanceof r&&(_[D.str]=(_[D.str]||0)+1),_),{})}}e._Code=n,e.nil=new n("");function i(f,...$){const _=[f[0]];let D=0;for(;D<$.length;)c(_,$[D]),_.push(f[++D]);return new n(_)}e._=i;const s=new n("+");function o(f,...$){const _=[h(f[0])];let D=0;for(;D<$.length;)_.push(s),c(_,$[D]),_.push(s,h(f[++D]));return u(_),new n(_)}e.str=o;function c(f,$){$ instanceof n?f.push(...$._items):$ instanceof r?f.push($):f.push(l($))}e.addCodeArg=c;function u(f){let $=1;for(;$<f.length-1;){if(f[$]===s){const _=m(f[$-1],f[$+1]);if(_!==void 0){f.splice($-1,3,_);continue}f[$++]="+"}$++}}function m(f,$){if($==='""')return f;if(f==='""')return $;if(typeof f=="string")return $ instanceof r||f[f.length-1]!=='"'?void 0:typeof $!="string"?`${f.slice(0,-1)}${$}"`:$[0]==='"'?f.slice(0,-1)+$.slice(1):void 0;if(typeof $=="string"&&$[0]==='"'&&!(f instanceof r))return`"${f}${$.slice(1)}`}function a(f,$){return $.emptyStr()?f:f.emptyStr()?$:o`${f}${$}`}e.strConcat=a;function l(f){return typeof f=="number"||typeof f=="boolean"||f===null?f:h(Array.isArray(f)?f.join(","):f)}function E(f){return new n(h(f))}e.stringify=E;function h(f){return JSON.stringify(f).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=h;function d(f){return typeof f=="string"&&e.IDENTIFIER.test(f)?new n(`.${f}`):i`[${f}]`}e.getProperty=d;function v(f){if(typeof f=="string"&&e.IDENTIFIER.test(f))return new n(`${f}`);throw new Error(`CodeGen: invalid export name: ${f}, use explicit $id name mapping`)}e.getEsmExportName=v;function p(f){return new n(f.toString())}e.regexpCode=p})(bn);var ws={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=bn;class r extends Error{constructor(m){super(`CodeGen: "code" for ${m} not defined`),this.value=m.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:m,parent:a}={}){this._names={},this._prefixes=m,this._parent=a}toName(m){return m instanceof t.Name?m:this.name(m)}name(m){return new t.Name(this._newName(m))}_newName(m){const a=this._names[m]||this._nameGroup(m);return`${m}${a.index++}`}_nameGroup(m){var a,l;if(!((l=(a=this._parent)===null||a===void 0?void 0:a._prefixes)===null||l===void 0)&&l.has(m)||this._prefixes&&!this._prefixes.has(m))throw new Error(`CodeGen: prefix "${m}" is not allowed in this scope`);return this._names[m]={prefix:m,index:0}}}e.Scope=i;class s extends t.Name{constructor(m,a){super(a),this.prefix=m}setValue(m,{property:a,itemIndex:l}){this.value=m,this.scopePath=(0,t._)`.${new t.Name(a)}[${l}]`}}e.ValueScopeName=s;const o=(0,t._)`\n`;class c extends i{constructor(m){super(m),this._values={},this._scope=m.scope,this.opts={...m,_n:m.lines?o:t.nil}}get(){return this._scope}name(m){return new s(m,this._newName(m))}value(m,a){var l;if(a.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const E=this.toName(m),{prefix:h}=E,d=(l=a.key)!==null&&l!==void 0?l:a.ref;let v=this._values[h];if(v){const $=v.get(d);if($)return $}else v=this._values[h]=new Map;v.set(d,E);const p=this._scope[h]||(this._scope[h]=[]),f=p.length;return p[f]=a.ref,E.setValue(a,{property:h,itemIndex:f}),E}getValue(m,a){const l=this._values[m];if(!!l)return l.get(a)}scopeRefs(m,a=this._values){return this._reduceValues(a,l=>{if(l.scopePath===void 0)throw new Error(`CodeGen: name "${l}" has no value`);return(0,t._)`${m}${l.scopePath}`})}scopeCode(m=this._values,a,l){return this._reduceValues(m,E=>{if(E.value===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return E.value.code},a,l)}_reduceValues(m,a,l={},E){let h=t.nil;for(const d in m){const v=m[d];if(!v)continue;const p=l[d]=l[d]||new Map;v.forEach(f=>{if(p.has(f))return;p.set(f,n.Started);let $=a(f);if($){const _=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0,t._)`${h}${_} ${f} = ${$};${this.opts._n}`}else if($=E==null?void 0:E(f))h=(0,t._)`${h}${$}${this.opts._n}`;else throw new r(f);p.set(f,n.Completed)})}return h}}e.ValueScope=c})(ws);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=bn,r=ws;var n=bn;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=ws;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(y,S){return this}}class o extends s{constructor(y,S,U){super(),this.varKind=y,this.name=S,this.rhs=U}render({es5:y,_n:S}){const U=y?r.varKinds.var:this.varKind,W=this.rhs===void 0?"":` = ${this.rhs}`;return`${U} ${this.name}${W};`+S}optimizeNames(y,S){if(!!y[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,y,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(y,S,U){super(),this.lhs=y,this.rhs=S,this.sideEffects=U}render({_n:y}){return`${this.lhs} = ${this.rhs};`+y}optimizeNames(y,S){if(!(this.lhs instanceof t.Name&&!y[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,y,S),this}get names(){const y=this.lhs instanceof t.Name?{}:{...this.lhs.names};return H(y,this.rhs)}}class u extends c{constructor(y,S,U,W){super(y,U,W),this.op=S}render({_n:y}){return`${this.lhs} ${this.op}= ${this.rhs};`+y}}class m extends s{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`${this.label}:`+y}}class a extends s{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`break${this.label?` ${this.label}`:""};`+y}}class l extends s{constructor(y){super(),this.error=y}render({_n:y}){return`throw ${this.error};`+y}get names(){return this.error.names}}class E extends s{constructor(y){super(),this.code=y}render({_n:y}){return`${this.code};`+y}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(y,S){return this.code=G(this.code,y,S),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class h extends s{constructor(y=[]){super(),this.nodes=y}render(y){return this.nodes.reduce((S,U)=>S+U.render(y),"")}optimizeNodes(){const{nodes:y}=this;let S=y.length;for(;S--;){const U=y[S].optimizeNodes();Array.isArray(U)?y.splice(S,1,...U):U?y[S]=U:y.splice(S,1)}return y.length>0?this:void 0}optimizeNames(y,S){const{nodes:U}=this;let W=U.length;for(;W--;){const Z=U[W];Z.optimizeNames(y,S)||(q(y,Z.names),U.splice(W,1))}return U.length>0?this:void 0}get names(){return this.nodes.reduce((y,S)=>A(y,S.names),{})}}class d extends h{render(y){return"{"+y._n+super.render(y)+"}"+y._n}}class v extends h{}class p extends d{}p.kind="else";class f extends d{constructor(y,S){super(S),this.condition=y}render(y){let S=`if(${this.condition})`+super.render(y);return this.else&&(S+="else "+this.else.render(y)),S}optimizeNodes(){super.optimizeNodes();const y=this.condition;if(y===!0)return this.nodes;let S=this.else;if(S){const U=S.optimizeNodes();S=this.else=Array.isArray(U)?new p(U):U}if(S)return y===!1?S instanceof f?S:S.nodes:this.nodes.length?this:new f(K(y),S instanceof f?[S]:S.nodes);if(!(y===!1||!this.nodes.length))return this}optimizeNames(y,S){var U;if(this.else=(U=this.else)===null||U===void 0?void 0:U.optimizeNames(y,S),!!(super.optimizeNames(y,S)||this.else))return this.condition=G(this.condition,y,S),this}get names(){const y=super.names;return H(y,this.condition),this.else&&A(y,this.else.names),y}}f.kind="if";class $ extends d{}$.kind="for";class _ extends ${constructor(y){super(),this.iteration=y}render(y){return`for(${this.iteration})`+super.render(y)}optimizeNames(y,S){if(!!super.optimizeNames(y,S))return this.iteration=G(this.iteration,y,S),this}get names(){return A(super.names,this.iteration.names)}}class D extends ${constructor(y,S,U,W){super(),this.varKind=y,this.name=S,this.from=U,this.to=W}render(y){const S=y.es5?r.varKinds.var:this.varKind,{name:U,from:W,to:Z}=this;return`for(${S} ${U}=${W}; ${U}<${Z}; ${U}++)`+super.render(y)}get names(){const y=H(super.names,this.from);return H(y,this.to)}}class z extends ${constructor(y,S,U,W){super(),this.loop=y,this.varKind=S,this.name=U,this.iterable=W}render(y){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(y)}optimizeNames(y,S){if(!!super.optimizeNames(y,S))return this.iterable=G(this.iterable,y,S),this}get names(){return A(super.names,this.iterable.names)}}class T extends d{constructor(y,S,U){super(),this.name=y,this.args=S,this.async=U}render(y){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(y)}}T.kind="func";class C extends h{render(y){return"return "+super.render(y)}}C.kind="return";class V extends d{render(y){let S="try"+super.render(y);return this.catch&&(S+=this.catch.render(y)),this.finally&&(S+=this.finally.render(y)),S}optimizeNodes(){var y,S;return super.optimizeNodes(),(y=this.catch)===null||y===void 0||y.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(y,S){var U,W;return super.optimizeNames(y,S),(U=this.catch)===null||U===void 0||U.optimizeNames(y,S),(W=this.finally)===null||W===void 0||W.optimizeNames(y,S),this}get names(){const y=super.names;return this.catch&&A(y,this.catch.names),this.finally&&A(y,this.finally.names),y}}class P extends d{constructor(y){super(),this.error=y}render(y){return`catch(${this.error})`+super.render(y)}}P.kind="catch";class x extends d{render(y){return"finally"+super.render(y)}}x.kind="finally";class M{constructor(y,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
8
- `:""},this._extScope=y,this._scope=new r.Scope({parent:y}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(y){return this._scope.name(y)}scopeName(y){return this._extScope.name(y)}scopeValue(y,S){const U=this._extScope.value(y,S);return(this._values[U.prefix]||(this._values[U.prefix]=new Set)).add(U),U}getScopeValue(y,S){return this._extScope.getValue(y,S)}scopeRefs(y){return this._extScope.scopeRefs(y,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(y,S,U,W){const Z=this._scope.toName(S);return U!==void 0&&W&&(this._constants[Z.str]=U),this._leafNode(new o(y,Z,U)),Z}const(y,S,U){return this._def(r.varKinds.const,y,S,U)}let(y,S,U){return this._def(r.varKinds.let,y,S,U)}var(y,S,U){return this._def(r.varKinds.var,y,S,U)}assign(y,S,U){return this._leafNode(new c(y,S,U))}add(y,S){return this._leafNode(new u(y,e.operators.ADD,S))}code(y){return typeof y=="function"?y():y!==t.nil&&this._leafNode(new E(y)),this}object(...y){const S=["{"];for(const[U,W]of y)S.length>1&&S.push(","),S.push(U),(U!==W||this.opts.es5)&&(S.push(":"),(0,t.addCodeArg)(S,W));return S.push("}"),new t._Code(S)}if(y,S,U){if(this._blockNode(new f(y)),S&&U)this.code(S).else().code(U).endIf();else if(S)this.code(S).endIf();else if(U)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(y){return this._elseNode(new f(y))}else(){return this._elseNode(new p)}endIf(){return this._endBlockNode(f,p)}_for(y,S){return this._blockNode(y),S&&this.code(S).endFor(),this}for(y,S){return this._for(new _(y),S)}forRange(y,S,U,W,Z=this.opts.es5?r.varKinds.var:r.varKinds.let){const ie=this._scope.toName(y);return this._for(new D(Z,ie,S,U),()=>W(ie))}forOf(y,S,U,W=r.varKinds.const){const Z=this._scope.toName(y);if(this.opts.es5){const ie=S instanceof t.Name?S:this.var("_arr",S);return this.forRange("_i",0,(0,t._)`${ie}.length`,ae=>{this.var(Z,(0,t._)`${ie}[${ae}]`),U(Z)})}return this._for(new z("of",W,Z,S),()=>U(Z))}forIn(y,S,U,W=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(y,(0,t._)`Object.keys(${S})`,U);const Z=this._scope.toName(y);return this._for(new z("in",W,Z,S),()=>U(Z))}endFor(){return this._endBlockNode($)}label(y){return this._leafNode(new m(y))}break(y){return this._leafNode(new a(y))}return(y){const S=new C;if(this._blockNode(S),this.code(y),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(y,S,U){if(!S&&!U)throw new Error('CodeGen: "try" without "catch" and "finally"');const W=new V;if(this._blockNode(W),this.code(y),S){const Z=this.name("e");this._currNode=W.catch=new P(Z),S(Z)}return U&&(this._currNode=W.finally=new x,this.code(U)),this._endBlockNode(P,x)}throw(y){return this._leafNode(new l(y))}block(y,S){return this._blockStarts.push(this._nodes.length),y&&this.code(y).endBlock(S),this}endBlock(y){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const U=this._nodes.length-S;if(U<0||y!==void 0&&U!==y)throw new Error(`CodeGen: wrong number of nodes: ${U} vs ${y} expected`);return this._nodes.length=S,this}func(y,S=t.nil,U,W){return this._blockNode(new T(y,S,U)),W&&this.code(W).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(y=1){for(;y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(y){return this._currNode.nodes.push(y),this}_blockNode(y){this._currNode.nodes.push(y),this._nodes.push(y)}_endBlockNode(y,S){const U=this._currNode;if(U instanceof y||S&&U instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${y.kind}/${S.kind}`:y.kind}"`)}_elseNode(y){const S=this._currNode;if(!(S instanceof f))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=y,this}get _root(){return this._nodes[0]}get _currNode(){const y=this._nodes;return y[y.length-1]}set _currNode(y){const S=this._nodes;S[S.length-1]=y}}e.CodeGen=M;function A(R,y){for(const S in y)R[S]=(R[S]||0)+(y[S]||0);return R}function H(R,y){return y instanceof t._CodeOrName?A(R,y.names):R}function G(R,y,S){if(R instanceof t.Name)return U(R);if(!W(R))return R;return new t._Code(R._items.reduce((Z,ie)=>(ie instanceof t.Name&&(ie=U(ie)),ie instanceof t._Code?Z.push(...ie._items):Z.push(ie),Z),[]));function U(Z){const ie=S[Z.str];return ie===void 0||y[Z.str]!==1?Z:(delete y[Z.str],ie)}function W(Z){return Z instanceof t._Code&&Z._items.some(ie=>ie instanceof t.Name&&y[ie.str]===1&&S[ie.str]!==void 0)}}function q(R,y){for(const S in y)R[S]=(R[S]||0)-(y[S]||0)}function K(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,t._)`!${F(R)}`}e.not=K;const B=I(e.operators.AND);function b(...R){return R.reduce(B)}e.and=b;const k=I(e.operators.OR);function O(...R){return R.reduce(k)}e.or=O;function I(R){return(y,S)=>y===t.nil?S:S===t.nil?y:(0,t._)`${F(y)} ${R} ${F(S)}`}function F(R){return R instanceof t.Name?R:(0,t._)`(${R})`}})(re);var fe={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=re,r=bn;function n(T){const C={};for(const V of T)C[V]=!0;return C}e.toHash=n;function i(T,C){return typeof C=="boolean"?C:Object.keys(C).length===0?!0:(s(T,C),!o(C,T.self.RULES.all))}e.alwaysValidSchema=i;function s(T,C=T.schema){const{opts:V,self:P}=T;if(!V.strictSchema||typeof C=="boolean")return;const x=P.RULES.keywords;for(const M in C)x[M]||z(T,`unknown keyword: "${M}"`)}e.checkUnknownRules=s;function o(T,C){if(typeof T=="boolean")return!T;for(const V in T)if(C[V])return!0;return!1}e.schemaHasRules=o;function c(T,C){if(typeof T=="boolean")return!T;for(const V in T)if(V!=="$ref"&&C.all[V])return!0;return!1}e.schemaHasRulesButRef=c;function u({topSchemaRef:T,schemaPath:C},V,P,x){if(!x){if(typeof V=="number"||typeof V=="boolean")return V;if(typeof V=="string")return(0,t._)`${V}`}return(0,t._)`${T}${C}${(0,t.getProperty)(P)}`}e.schemaRefOrVal=u;function m(T){return E(decodeURIComponent(T))}e.unescapeFragment=m;function a(T){return encodeURIComponent(l(T))}e.escapeFragment=a;function l(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=l;function E(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=E;function h(T,C){if(Array.isArray(T))for(const V of T)C(V);else C(T)}e.eachItem=h;function d({mergeNames:T,mergeToName:C,mergeValues:V,resultToName:P}){return(x,M,A,H)=>{const G=A===void 0?M:A instanceof t.Name?(M instanceof t.Name?T(x,M,A):C(x,M,A),A):M instanceof t.Name?(C(x,A,M),M):V(M,A);return H===t.Name&&!(G instanceof t.Name)?P(x,G):G}}e.mergeEvaluated={props:d({mergeNames:(T,C,V)=>T.if((0,t._)`${V} !== true && ${C} !== undefined`,()=>{T.if((0,t._)`${C} === true`,()=>T.assign(V,!0),()=>T.assign(V,(0,t._)`${V} || {}`).code((0,t._)`Object.assign(${V}, ${C})`))}),mergeToName:(T,C,V)=>T.if((0,t._)`${V} !== true`,()=>{C===!0?T.assign(V,!0):(T.assign(V,(0,t._)`${V} || {}`),p(T,V,C))}),mergeValues:(T,C)=>T===!0?!0:{...T,...C},resultToName:v}),items:d({mergeNames:(T,C,V)=>T.if((0,t._)`${V} !== true && ${C} !== undefined`,()=>T.assign(V,(0,t._)`${C} === true ? true : ${V} > ${C} ? ${V} : ${C}`)),mergeToName:(T,C,V)=>T.if((0,t._)`${V} !== true`,()=>T.assign(V,C===!0?!0:(0,t._)`${V} > ${C} ? ${V} : ${C}`)),mergeValues:(T,C)=>T===!0?!0:Math.max(T,C),resultToName:(T,C)=>T.var("items",C)})};function v(T,C){if(C===!0)return T.var("props",!0);const V=T.var("props",(0,t._)`{}`);return C!==void 0&&p(T,V,C),V}e.evaluatedPropsToName=v;function p(T,C,V){Object.keys(V).forEach(P=>T.assign((0,t._)`${C}${(0,t.getProperty)(P)}`,!0))}e.setEvaluated=p;const f={};function $(T,C){return T.scopeValue("func",{ref:C,code:f[C.code]||(f[C.code]=new r._Code(C.code))})}e.useFunc=$;var _;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str"})(_=e.Type||(e.Type={}));function D(T,C,V){if(T instanceof t.Name){const P=C===_.Num;return V?P?(0,t._)`"[" + ${T} + "]"`:(0,t._)`"['" + ${T} + "']"`:P?(0,t._)`"/" + ${T}`:(0,t._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return V?(0,t.getProperty)(T).toString():"/"+l(T)}e.getErrorPath=D;function z(T,C,V=T.opts.strictSchema){if(!!V){if(C=`strict mode: ${C}`,V===!0)throw new Error(C);T.self.logger.warn(C)}}e.checkStrictMode=z})(fe);var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0});const xe=re,Wh={data:new xe.Name("data"),valCxt:new xe.Name("valCxt"),instancePath:new xe.Name("instancePath"),parentData:new xe.Name("parentData"),parentDataProperty:new xe.Name("parentDataProperty"),rootData:new xe.Name("rootData"),dynamicAnchors:new xe.Name("dynamicAnchors"),vErrors:new xe.Name("vErrors"),errors:new xe.Name("errors"),this:new xe.Name("this"),self:new xe.Name("self"),scope:new xe.Name("scope"),json:new xe.Name("json"),jsonPos:new xe.Name("jsonPos"),jsonLen:new xe.Name("jsonLen"),jsonPart:new xe.Name("jsonPart")};Lt.default=Wh;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=re,r=fe,n=Lt;e.keywordError={message:({keyword:p})=>(0,t.str)`must pass "${p}" keyword validation`},e.keyword$DataError={message:({keyword:p,schemaType:f})=>f?(0,t.str)`"${p}" keyword must be ${f} ($data)`:(0,t.str)`"${p}" keyword is invalid ($data)`};function i(p,f=e.keywordError,$,_){const{it:D}=p,{gen:z,compositeRule:T,allErrors:C}=D,V=l(p,f,$);_??(T||C)?u(z,V):m(D,(0,t._)`[${V}]`)}e.reportError=i;function s(p,f=e.keywordError,$){const{it:_}=p,{gen:D,compositeRule:z,allErrors:T}=_,C=l(p,f,$);u(D,C),z||T||m(_,n.default.vErrors)}e.reportExtraError=s;function o(p,f){p.assign(n.default.errors,f),p.if((0,t._)`${n.default.vErrors} !== null`,()=>p.if(f,()=>p.assign((0,t._)`${n.default.vErrors}.length`,f),()=>p.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function c({gen:p,keyword:f,schemaValue:$,data:_,errsCount:D,it:z}){if(D===void 0)throw new Error("ajv implementation error");const T=p.name("err");p.forRange("i",D,n.default.errors,C=>{p.const(T,(0,t._)`${n.default.vErrors}[${C}]`),p.if((0,t._)`${T}.instancePath === undefined`,()=>p.assign((0,t._)`${T}.instancePath`,(0,t.strConcat)(n.default.instancePath,z.errorPath))),p.assign((0,t._)`${T}.schemaPath`,(0,t.str)`${z.errSchemaPath}/${f}`),z.opts.verbose&&(p.assign((0,t._)`${T}.schema`,$),p.assign((0,t._)`${T}.data`,_))})}e.extendErrors=c;function u(p,f){const $=p.const("err",f);p.if((0,t._)`${n.default.vErrors} === null`,()=>p.assign(n.default.vErrors,(0,t._)`[${$}]`),(0,t._)`${n.default.vErrors}.push(${$})`),p.code((0,t._)`${n.default.errors}++`)}function m(p,f){const{gen:$,validateName:_,schemaEnv:D}=p;D.$async?$.throw((0,t._)`new ${p.ValidationError}(${f})`):($.assign((0,t._)`${_}.errors`,f),$.return(!1))}const a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function l(p,f,$){const{createErrors:_}=p.it;return _===!1?(0,t._)`{}`:E(p,f,$)}function E(p,f,$={}){const{gen:_,it:D}=p,z=[h(D,$),d(p,$)];return v(p,f,z),_.object(...z)}function h({errorPath:p},{instancePath:f}){const $=f?(0,t.str)`${p}${(0,r.getErrorPath)(f,r.Type.Str)}`:p;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,$)]}function d({keyword:p,it:{errSchemaPath:f}},{schemaPath:$,parentSchema:_}){let D=_?f:(0,t.str)`${f}/${p}`;return $&&(D=(0,t.str)`${D}${(0,r.getErrorPath)($,r.Type.Str)}`),[a.schemaPath,D]}function v(p,{params:f,message:$},_){const{keyword:D,data:z,schemaValue:T,it:C}=p,{opts:V,propertyName:P,topSchemaRef:x,schemaPath:M}=C;_.push([a.keyword,D],[a.params,typeof f=="function"?f(p):f||(0,t._)`{}`]),V.messages&&_.push([a.message,typeof $=="function"?$(p):$]),V.verbose&&_.push([a.schema,T],[a.parentSchema,(0,t._)`${x}${M}`],[n.default.data,z]),P&&_.push([a.propertyName,P])}})(zn);Object.defineProperty(Jr,"__esModule",{value:!0});Jr.boolOrEmptySchema=Jr.topBoolOrEmptySchema=void 0;const Zh=zn,Xh=re,Jh=Lt,Yh={message:"boolean schema is false"};function Qh(e){const{gen:t,schema:r,validateName:n}=e;r===!1?Au(e,!1):typeof r=="object"&&r.$async===!0?t.return(Jh.default.data):(t.assign((0,Xh._)`${n}.errors`,null),t.return(!0))}Jr.topBoolOrEmptySchema=Qh;function em(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Au(e)):r.var(t,!0)}Jr.boolOrEmptySchema=em;function Au(e,t){const{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Zh.reportError)(i,Yh,void 0,t)}var xn={},Er={};Object.defineProperty(Er,"__esModule",{value:!0});Er.getRules=Er.isJSONType=void 0;const tm=["string","number","integer","boolean","null","object","array"],rm=new Set(tm);function nm(e){return typeof e=="string"&&rm.has(e)}Er.isJSONType=nm;function im(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Er.getRules=im;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.shouldUseRule=Ut.shouldUseGroup=Ut.schemaHasRulesForType=void 0;function sm({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&bu(e,n)}Ut.schemaHasRulesForType=sm;function bu(e,t){return t.rules.some(r=>Lu(e,r))}Ut.shouldUseGroup=bu;function Lu(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Ut.shouldUseRule=Lu;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=Er,r=Ut,n=zn,i=re,s=fe;var o;(function(_){_[_.Correct=0]="Correct",_[_.Wrong=1]="Wrong"})(o=e.DataType||(e.DataType={}));function c(_){const D=u(_.type);if(D.includes("null")){if(_.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!D.length&&_.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');_.nullable===!0&&D.push("null")}return D}e.getSchemaTypes=c;function u(_){const D=Array.isArray(_)?_:_?[_]:[];if(D.every(t.isJSONType))return D;throw new Error("type must be JSONType or JSONType[]: "+D.join(","))}e.getJSONTypes=u;function m(_,D){const{gen:z,data:T,opts:C}=_,V=l(D,C.coerceTypes),P=D.length>0&&!(V.length===0&&D.length===1&&(0,r.schemaHasRulesForType)(_,D[0]));if(P){const x=v(D,T,C.strictNumbers,o.Wrong);z.if(x,()=>{V.length?E(_,D,V):f(_)})}return P}e.coerceAndCheckDataType=m;const a=new Set(["string","number","integer","boolean","null"]);function l(_,D){return D?_.filter(z=>a.has(z)||D==="array"&&z==="array"):[]}function E(_,D,z){const{gen:T,data:C,opts:V}=_,P=T.let("dataType",(0,i._)`typeof ${C}`),x=T.let("coerced",(0,i._)`undefined`);V.coerceTypes==="array"&&T.if((0,i._)`${P} == 'object' && Array.isArray(${C}) && ${C}.length == 1`,()=>T.assign(C,(0,i._)`${C}[0]`).assign(P,(0,i._)`typeof ${C}`).if(v(D,C,V.strictNumbers),()=>T.assign(x,C))),T.if((0,i._)`${x} !== undefined`);for(const A of z)(a.has(A)||A==="array"&&V.coerceTypes==="array")&&M(A);T.else(),f(_),T.endIf(),T.if((0,i._)`${x} !== undefined`,()=>{T.assign(C,x),h(_,x)});function M(A){switch(A){case"string":T.elseIf((0,i._)`${P} == "number" || ${P} == "boolean"`).assign(x,(0,i._)`"" + ${C}`).elseIf((0,i._)`${C} === null`).assign(x,(0,i._)`""`);return;case"number":T.elseIf((0,i._)`${P} == "boolean" || ${C} === null
6
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");const{srcStat:n,destStat:i}=An.checkPathsSync(e,t,"copy",r);if(An.checkParentPathsSync(e,n,t,"copy"),r.filter&&!r.filter(e,t))return;const s=Pn.dirname(t);return Ze.existsSync(s)||Pl(s),zc(i,e,t,r)}function zc(e,t,r,n){const s=(n.dereference?Ze.statSync:Ze.lstatSync)(t);if(s.isDirectory())return Vl(s,e,t,r,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Ll(s,e,t,r,n);if(s.isSymbolicLink())return Gl(e,t,r,n);throw s.isSocket()?new Error(`Cannot copy a socket file: ${t}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}function Ll(e,t,r,n,i){return t?Fl(e,r,n,i):xc(e,r,n,i)}function Fl(e,t,r,n){if(n.overwrite)return Ze.unlinkSync(r),xc(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function xc(e,t,r,n){return Ze.copyFileSync(t,r),n.preserveTimestamps&&jl(e.mode,t,r),Hs(r,e.mode)}function jl(e,t,r){return Ml(e)&&kl(r,e),Ul(t,r)}function Ml(e){return(e&128)===0}function kl(e,t){return Hs(e,t|128)}function Hs(e,t){return Ze.chmodSync(e,t)}function Ul(e,t){const r=Ze.statSync(e);return Al(t,r.atime,r.mtime)}function Vl(e,t,r,n,i){return t?Gc(r,n,i):zl(e.mode,r,n,i)}function zl(e,t,r,n){return Ze.mkdirSync(r),Gc(t,r,n),Hs(r,e)}function Gc(e,t,r){Ze.readdirSync(e).forEach(n=>xl(n,e,t,r))}function xl(e,t,r,n){const i=Pn.join(t,e),s=Pn.join(r,e);if(n.filter&&!n.filter(i,s))return;const{destStat:o}=An.checkPathsSync(i,s,"copy",n);return zc(o,i,s,n)}function Gl(e,t,r,n){let i=Ze.readlinkSync(t);if(n.dereference&&(i=Pn.resolve(process.cwd(),i)),e){let s;try{s=Ze.readlinkSync(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return Ze.symlinkSync(i,r);throw o}if(n.dereference&&(s=Pn.resolve(process.cwd(),s)),An.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(An.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return Bl(i,r)}else return Ze.symlinkSync(i,r)}function Bl(e,t){return Ze.unlinkSync(t),Ze.symlinkSync(e,t)}var Hl=bl;const ql=Xe.fromCallback;var qs={copy:ql(Rl),copySync:Hl};const Bc=nt,Kl=Xe.fromCallback;function Zl(e,t){Bc.rm(e,{recursive:!0,force:!0},t)}function Wl(e){Bc.rmSync(e,{recursive:!0,force:!0})}var Hi={remove:Kl(Zl),removeSync:Wl};const Xl=Xe.fromPromise,Hc=Sr,qc=Ie,Kc=bt,Zc=Hi,la=Xl(async function(t){let r;try{r=await Hc.readdir(t)}catch{return Kc.mkdirs(t)}return Promise.all(r.map(n=>Zc.remove(qc.join(t,n))))});function da(e){let t;try{t=Hc.readdirSync(e)}catch{return Kc.mkdirsSync(e)}t.forEach(r=>{r=qc.join(e,r),Zc.removeSync(r)})}var Jl={emptyDirSync:da,emptydirSync:da,emptyDir:la,emptydir:la};const Yl=Xe.fromCallback,Wc=Ie,Jt=nt,Xc=bt;function Ql(e,t){function r(){Jt.writeFile(e,"",n=>{if(n)return t(n);t()})}Jt.stat(e,(n,i)=>{if(!n&&i.isFile())return t();const s=Wc.dirname(e);Jt.stat(s,(o,c)=>{if(o)return o.code==="ENOENT"?Xc.mkdirs(s,u=>{if(u)return t(u);r()}):t(o);c.isDirectory()?r():Jt.readdir(s,u=>{if(u)return t(u)})})})}function ed(e){let t;try{t=Jt.statSync(e)}catch{}if(t&&t.isFile())return;const r=Wc.dirname(e);try{Jt.statSync(r).isDirectory()||Jt.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")Xc.mkdirsSync(r);else throw n}Jt.writeFileSync(e,"")}var td={createFile:Yl(Ql),createFileSync:ed};const rd=Xe.fromCallback,Jc=Ie,qt=nt,Yc=bt,nd=wr.pathExists,{areIdentical:Qc}=tn;function id(e,t,r){function n(i,s){qt.link(i,s,o=>{if(o)return r(o);r(null)})}qt.lstat(t,(i,s)=>{qt.lstat(e,(o,c)=>{if(o)return o.message=o.message.replace("lstat","ensureLink"),r(o);if(s&&Qc(c,s))return r(null);const u=Jc.dirname(t);nd(u,(m,a)=>{if(m)return r(m);if(a)return n(e,t);Yc.mkdirs(u,l=>{if(l)return r(l);n(e,t)})})})})}function sd(e,t){let r;try{r=qt.lstatSync(t)}catch{}try{const s=qt.lstatSync(e);if(r&&Qc(s,r))return}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}const n=Jc.dirname(t);return qt.existsSync(n)||Yc.mkdirsSync(n),qt.linkSync(e,t)}var od={createLink:rd(id),createLinkSync:sd};const Yt=Ie,_n=nt,ad=wr.pathExists;function cd(e,t,r){if(Yt.isAbsolute(e))return _n.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{const n=Yt.dirname(t),i=Yt.join(n,e);return ad(i,(s,o)=>s?r(s):o?r(null,{toCwd:i,toDst:e}):_n.lstat(e,c=>c?(c.message=c.message.replace("lstat","ensureSymlink"),r(c)):r(null,{toCwd:e,toDst:Yt.relative(n,e)})))}}function ud(e,t){let r;if(Yt.isAbsolute(e)){if(r=_n.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{const n=Yt.dirname(t),i=Yt.join(n,e);if(r=_n.existsSync(i),r)return{toCwd:i,toDst:e};if(r=_n.existsSync(e),!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:Yt.relative(n,e)}}}var fd={symlinkPaths:cd,symlinkPathsSync:ud};const eu=nt;function ld(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);eu.lstat(e,(n,i)=>{if(n)return r(null,"file");t=i&&i.isDirectory()?"dir":"file",r(null,t)})}function dd(e,t){let r;if(t)return t;try{r=eu.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}var hd={symlinkType:ld,symlinkTypeSync:dd};const md=Xe.fromCallback,tu=Ie,vt=Sr,ru=bt,pd=ru.mkdirs,yd=ru.mkdirsSync,nu=fd,vd=nu.symlinkPaths,Ed=nu.symlinkPathsSync,iu=hd,gd=iu.symlinkType,$d=iu.symlinkTypeSync,_d=wr.pathExists,{areIdentical:su}=tn;function Sd(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,vt.lstat(t,(i,s)=>{!i&&s.isSymbolicLink()?Promise.all([vt.stat(e),vt.stat(t)]).then(([o,c])=>{if(su(o,c))return n(null);ha(e,t,r,n)}):ha(e,t,r,n)})}function ha(e,t,r,n){vd(e,t,(i,s)=>{if(i)return n(i);e=s.toDst,gd(s.toCwd,r,(o,c)=>{if(o)return n(o);const u=tu.dirname(t);_d(u,(m,a)=>{if(m)return n(m);if(a)return vt.symlink(e,t,c,n);pd(u,l=>{if(l)return n(l);vt.symlink(e,t,c,n)})})})})}function wd(e,t,r){let n;try{n=vt.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const c=vt.statSync(e),u=vt.statSync(t);if(su(c,u))return}const i=Ed(e,t);e=i.toDst,r=$d(i.toCwd,r);const s=tu.dirname(t);return vt.existsSync(s)||yd(s),vt.symlinkSync(e,t,r)}var Nd={createSymlink:md(Sd),createSymlinkSync:wd};const{createFile:ma,createFileSync:pa}=td,{createLink:ya,createLinkSync:va}=od,{createSymlink:Ea,createSymlinkSync:ga}=Nd;var Id={createFile:ma,createFileSync:pa,ensureFile:ma,ensureFileSync:pa,createLink:ya,createLinkSync:va,ensureLink:ya,ensureLinkSync:va,createSymlink:Ea,createSymlinkSync:ga,ensureSymlink:Ea,ensureSymlinkSync:ga};function Od(e,{EOL:t=`
7
+ `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){const s=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+s}function Td(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}var Ks={stringify:Od,stripBom:Td};let Wr;try{Wr=nt}catch{Wr=en}const qi=Xe,{stringify:ou,stripBom:au}=Ks;async function Dd(e,t={}){typeof t=="string"&&(t={encoding:t});const r=t.fs||Wr,n="throws"in t?t.throws:!0;let i=await qi.fromCallback(r.readFile)(e,t);i=au(i);let s;try{s=JSON.parse(i,t?t.reviver:null)}catch(o){if(n)throw o.message=`${e}: ${o.message}`,o;return null}return s}const Cd=qi.fromPromise(Dd);function Rd(e,t={}){typeof t=="string"&&(t={encoding:t});const r=t.fs||Wr,n="throws"in t?t.throws:!0;try{let i=r.readFileSync(e,t);return i=au(i),JSON.parse(i,t.reviver)}catch(i){if(n)throw i.message=`${e}: ${i.message}`,i;return null}}async function Pd(e,t,r={}){const n=r.fs||Wr,i=ou(t,r);await qi.fromCallback(n.writeFile)(e,i,r)}const Ad=qi.fromPromise(Pd);function bd(e,t,r={}){const n=r.fs||Wr,i=ou(t,r);return n.writeFileSync(e,i,r)}const Ld={readFile:Cd,readFileSync:Rd,writeFile:Ad,writeFileSync:bd};var Fd=Ld;const ei=Fd;var jd={readJson:ei.readFile,readJsonSync:ei.readFileSync,writeJson:ei.writeFile,writeJsonSync:ei.writeFileSync};const Md=Xe.fromCallback,Sn=nt,cu=Ie,uu=bt,kd=wr.pathExists;function Ud(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");const i=cu.dirname(e);kd(i,(s,o)=>{if(s)return n(s);if(o)return Sn.writeFile(e,t,r,n);uu.mkdirs(i,c=>{if(c)return n(c);Sn.writeFile(e,t,r,n)})})}function Vd(e,...t){const r=cu.dirname(e);if(Sn.existsSync(r))return Sn.writeFileSync(e,...t);uu.mkdirsSync(r),Sn.writeFileSync(e,...t)}var Zs={outputFile:Md(Ud),outputFileSync:Vd};const{stringify:zd}=Ks,{outputFile:xd}=Zs;async function Gd(e,t,r={}){const n=zd(t,r);await xd(e,n,r)}var Bd=Gd;const{stringify:Hd}=Ks,{outputFileSync:qd}=Zs;function Kd(e,t,r){const n=Hd(t,r);qd(e,n,r)}var Zd=Kd;const Wd=Xe.fromPromise,We=jd;We.outputJson=Wd(Bd);We.outputJsonSync=Zd;We.outputJSON=We.outputJson;We.outputJSONSync=We.outputJsonSync;We.writeJSON=We.writeJson;We.writeJSONSync=We.writeJsonSync;We.readJSON=We.readJson;We.readJSONSync=We.readJsonSync;var Xd=We;const Jd=nt,Rs=Ie,Yd=qs.copy,fu=Hi.remove,Qd=bt.mkdirp,eh=wr.pathExists,$a=tn;function th(e,t,r,n){typeof r=="function"&&(n=r,r={}),r=r||{};const i=r.overwrite||r.clobber||!1;$a.checkPaths(e,t,"move",r,(s,o)=>{if(s)return n(s);const{srcStat:c,isChangingCase:u=!1}=o;$a.checkParentPaths(e,c,t,"move",m=>{if(m)return n(m);if(rh(t))return _a(e,t,i,u,n);Qd(Rs.dirname(t),a=>a?n(a):_a(e,t,i,u,n))})})}function rh(e){const t=Rs.dirname(e);return Rs.parse(t).root===t}function _a(e,t,r,n,i){if(n)return ls(e,t,r,i);if(r)return fu(t,s=>s?i(s):ls(e,t,r,i));eh(t,(s,o)=>s?i(s):o?i(new Error("dest already exists.")):ls(e,t,r,i))}function ls(e,t,r,n){Jd.rename(e,t,i=>i?i.code!=="EXDEV"?n(i):nh(e,t,r,n):n())}function nh(e,t,r,n){Yd(e,t,{overwrite:r,errorOnExist:!0},s=>s?n(s):fu(e,n))}var ih=th;const lu=nt,Ps=Ie,sh=qs.copySync,du=Hi.removeSync,oh=bt.mkdirpSync,Sa=tn;function ah(e,t,r){r=r||{};const n=r.overwrite||r.clobber||!1,{srcStat:i,isChangingCase:s=!1}=Sa.checkPathsSync(e,t,"move",r);return Sa.checkParentPathsSync(e,i,t,"move"),ch(t)||oh(Ps.dirname(t)),uh(e,t,n,s)}function ch(e){const t=Ps.dirname(e);return Ps.parse(t).root===t}function uh(e,t,r,n){if(n)return ds(e,t,r);if(r)return du(t),ds(e,t,r);if(lu.existsSync(t))throw new Error("dest already exists.");return ds(e,t,r)}function ds(e,t,r){try{lu.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return fh(e,t,r)}}function fh(e,t,r){return sh(e,t,{overwrite:r,errorOnExist:!0}),du(e)}var lh=ah;const dh=Xe.fromCallback;var hh={move:dh(ih),moveSync:lh},lt={...Sr,...qs,...Jl,...Id,...Xd,...bt,...hh,...Zs,...wr,...Hi},Si={},mh={get exports(){return Si},set exports(e){Si=e}},ph=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")};const ar=ph,yh=new Set(["__proto__","prototype","constructor"]),vh=e=>!e.some(t=>yh.has(t));function ti(e){const t=e.split("."),r=[];for(let n=0;n<t.length;n++){let i=t[n];for(;i[i.length-1]==="\\"&&t[n+1]!==void 0;)i=i.slice(0,-1)+".",i+=t[++n];r.push(i)}return vh(r)?r:[]}var Eh={get(e,t,r){if(!ar(e)||typeof t!="string")return r===void 0?e:r;const n=ti(t);if(n.length!==0){for(let i=0;i<n.length;i++)if(e=e[n[i]],e==null){if(i!==n.length-1)return r;break}return e===void 0?r:e}},set(e,t,r){if(!ar(e)||typeof t!="string")return e;const n=e,i=ti(t);for(let s=0;s<i.length;s++){const o=i[s];ar(e[o])||(e[o]={}),s===i.length-1&&(e[o]=r),e=e[o]}return n},delete(e,t){if(!ar(e)||typeof t!="string")return!1;const r=ti(t);for(let n=0;n<r.length;n++){const i=r[n];if(n===r.length-1)return delete e[i],!0;if(e=e[i],!ar(e))return!1}},has(e,t){if(!ar(e)||typeof t!="string")return!1;const r=ti(t);if(r.length===0)return!1;for(let n=0;n<r.length;n++)if(ar(e)){if(!(r[n]in e))return!1;e=e[r[n]]}else return!1;return!0}},wi={},gh={get exports(){return wi},set exports(e){wi=e}},Ni={},$h={get exports(){return Ni},set exports(e){Ni=e}},Ii={},_h={get exports(){return Ii},set exports(e){Ii=e}},Oi={},Sh={get exports(){return Oi},set exports(e){Oi=e}};const hu=en;Sh.exports=e=>new Promise(t=>{hu.access(e,r=>{t(!r)})});Oi.sync=e=>{try{return hu.accessSync(e),!0}catch{return!1}};var Ti={},wh={get exports(){return Ti},set exports(e){Ti=e}},Di={},Nh={get exports(){return Di},set exports(e){Di=e}};const mu=(e,...t)=>new Promise(r=>{r(e(...t))});Nh.exports=mu;Di.default=mu;const Ih=Di,pu=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const t=[];let r=0;const n=()=>{r--,t.length>0&&t.shift()()},i=(c,u,...m)=>{r++;const a=Ih(c,...m);u(a),a.then(n,n)},s=(c,u,...m)=>{r<e?i(c,u,...m):t.push(i.bind(null,c,u,...m))},o=(c,...u)=>new Promise(m=>s(c,m,...u));return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}}),o};wh.exports=pu;Ti.default=pu;const wa=Ti;class yu extends Error{constructor(t){super(),this.value=t}}const Oh=(e,t)=>Promise.resolve(e).then(t),Th=e=>Promise.all(e).then(t=>t[1]===!0&&Promise.reject(new yu(t[0])));var Dh=(e,t,r)=>{r=Object.assign({concurrency:1/0,preserveOrder:!0},r);const n=wa(r.concurrency),i=[...e].map(o=>[o,n(Oh,o,t)]),s=wa(r.preserveOrder?1:1/0);return Promise.all(i.map(o=>s(Th,o))).then(()=>{}).catch(o=>o instanceof yu?o.value:Promise.reject(o))};const vu=Ie,Eu=Oi,Ch=Dh;_h.exports=(e,t)=>(t=Object.assign({cwd:process.cwd()},t),Ch(e,r=>Eu(vu.resolve(t.cwd,r)),t));Ii.sync=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);for(const r of e)if(Eu.sync(vu.resolve(t.cwd,r)))return r};const Qt=Ie,gu=Ii;$h.exports=(e,t={})=>{const r=Qt.resolve(t.cwd||""),{root:n}=Qt.parse(r),i=[].concat(e);return new Promise(s=>{(function o(c){gu(i,{cwd:c}).then(u=>{u?s(Qt.join(c,u)):c===n?s(null):o(Qt.dirname(c))})})(r)})};Ni.sync=(e,t={})=>{let r=Qt.resolve(t.cwd||"");const{root:n}=Qt.parse(r),i=[].concat(e);for(;;){const s=gu.sync(i,{cwd:r});if(s)return Qt.join(r,s);if(r===n)return null;r=Qt.dirname(r)}};const $u=Ni;gh.exports=async({cwd:e}={})=>$u("package.json",{cwd:e});wi.sync=({cwd:e}={})=>$u.sync("package.json",{cwd:e});var Ci={},Rh={get exports(){return Ci},set exports(e){Ci=e}};const we=Ie,_u=zf,Kt=_u.homedir(),Ws=_u.tmpdir(),{env:Ur}=process,Ph=e=>{const t=we.join(Kt,"Library");return{data:we.join(t,"Application Support",e),config:we.join(t,"Preferences",e),cache:we.join(t,"Caches",e),log:we.join(t,"Logs",e),temp:we.join(Ws,e)}},Ah=e=>{const t=Ur.APPDATA||we.join(Kt,"AppData","Roaming"),r=Ur.LOCALAPPDATA||we.join(Kt,"AppData","Local");return{data:we.join(r,e,"Data"),config:we.join(t,e,"Config"),cache:we.join(r,e,"Cache"),log:we.join(r,e,"Log"),temp:we.join(Ws,e)}},bh=e=>{const t=we.basename(Kt);return{data:we.join(Ur.XDG_DATA_HOME||we.join(Kt,".local","share"),e),config:we.join(Ur.XDG_CONFIG_HOME||we.join(Kt,".config"),e),cache:we.join(Ur.XDG_CACHE_HOME||we.join(Kt,".cache"),e),log:we.join(Ur.XDG_STATE_HOME||we.join(Kt,".local","state"),e),temp:we.join(Ws,t,e)}},Su=(e,t)=>{if(typeof e!="string")throw new TypeError(`Expected string, got ${typeof e}`);return t=Object.assign({suffix:"nodejs"},t),t.suffix&&(e+=`-${t.suffix}`),process.platform==="darwin"?Ph(e):process.platform==="win32"?Ah(e):bh(e)};Rh.exports=Su;Ci.default=Su;var Pt={},he={};Object.defineProperty(he,"__esModule",{value:!0});he.NOOP=he.LIMIT_FILES_DESCRIPTORS=he.LIMIT_BASENAME_LENGTH=he.IS_USER_ROOT=he.IS_POSIX=he.DEFAULT_TIMEOUT_SYNC=he.DEFAULT_TIMEOUT_ASYNC=he.DEFAULT_WRITE_OPTIONS=he.DEFAULT_READ_OPTIONS=he.DEFAULT_FOLDER_MODE=he.DEFAULT_FILE_MODE=he.DEFAULT_ENCODING=void 0;const Lh="utf8";he.DEFAULT_ENCODING=Lh;const Fh=438;he.DEFAULT_FILE_MODE=Fh;const jh=511;he.DEFAULT_FOLDER_MODE=jh;const Mh={};he.DEFAULT_READ_OPTIONS=Mh;const kh={};he.DEFAULT_WRITE_OPTIONS=kh;const Uh=5e3;he.DEFAULT_TIMEOUT_ASYNC=Uh;const Vh=100;he.DEFAULT_TIMEOUT_SYNC=Vh;const zh=!!process.getuid;he.IS_POSIX=zh;const xh=process.getuid?!process.getuid():!1;he.IS_USER_ROOT=xh;const Gh=128;he.LIMIT_BASENAME_LENGTH=Gh;const Bh=1e4;he.LIMIT_FILES_DESCRIPTORS=Bh;const Hh=()=>{};he.NOOP=Hh;var Ki={},Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.attemptifySync=Xr.attemptifyAsync=void 0;const wu=he,qh=(e,t=wu.NOOP)=>function(){return e.apply(void 0,arguments).catch(t)};Xr.attemptifyAsync=qh;const Kh=(e,t=wu.NOOP)=>function(){try{return e.apply(void 0,arguments)}catch(r){return t(r)}};Xr.attemptifySync=Kh;var Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});const Zh=he,Nu={isChangeErrorOk:e=>{const{code:t}=e;return t==="ENOSYS"||!Zh.IS_USER_ROOT&&(t==="EINVAL"||t==="EPERM")},isRetriableError:e=>{const{code:t}=e;return t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCS"||t==="EPERM"},onChangeError:e=>{if(!Nu.isChangeErrorOk(e))throw e}};Xs.default=Nu;var Jr={},Js={};Object.defineProperty(Js,"__esModule",{value:!0});const Wh=he,ye={interval:25,intervalId:void 0,limit:Wh.LIMIT_FILES_DESCRIPTORS,queueActive:new Set,queueWaiting:new Set,init:()=>{ye.intervalId||(ye.intervalId=setInterval(ye.tick,ye.interval))},reset:()=>{ye.intervalId&&(clearInterval(ye.intervalId),delete ye.intervalId)},add:e=>{ye.queueWaiting.add(e),ye.queueActive.size<ye.limit/2?ye.tick():ye.init()},remove:e=>{ye.queueWaiting.delete(e),ye.queueActive.delete(e)},schedule:()=>new Promise(e=>{const t=()=>ye.remove(r),r=()=>e(t);ye.add(r)}),tick:()=>{if(!(ye.queueActive.size>=ye.limit)){if(!ye.queueWaiting.size)return ye.reset();for(const e of ye.queueWaiting){if(ye.queueActive.size>=ye.limit)break;ye.queueWaiting.delete(e),ye.queueActive.add(e),e()}}}};Js.default=ye;Object.defineProperty(Jr,"__esModule",{value:!0});Jr.retryifySync=Jr.retryifyAsync=void 0;const Xh=Js,Jh=(e,t)=>function(r){return function n(){return Xh.default.schedule().then(i=>e.apply(void 0,arguments).then(s=>(i(),s),s=>{if(i(),Date.now()>=r)throw s;if(t(s)){const o=Math.round(100+400*Math.random());return new Promise(u=>setTimeout(u,o)).then(()=>n.apply(void 0,arguments))}throw s}))}};Jr.retryifyAsync=Jh;const Yh=(e,t)=>function(r){return function n(){try{return e.apply(void 0,arguments)}catch(i){if(Date.now()>r)throw i;if(t(i))return n.apply(void 0,arguments);throw i}}};Jr.retryifySync=Yh;Object.defineProperty(Ki,"__esModule",{value:!0});const me=en,Be=xi,He=Xr,Pe=Xs,Qe=Jr,Qh={chmodAttempt:He.attemptifyAsync(Be.promisify(me.chmod),Pe.default.onChangeError),chownAttempt:He.attemptifyAsync(Be.promisify(me.chown),Pe.default.onChangeError),closeAttempt:He.attemptifyAsync(Be.promisify(me.close)),fsyncAttempt:He.attemptifyAsync(Be.promisify(me.fsync)),mkdirAttempt:He.attemptifyAsync(Be.promisify(me.mkdir)),realpathAttempt:He.attemptifyAsync(Be.promisify(me.realpath)),statAttempt:He.attemptifyAsync(Be.promisify(me.stat)),unlinkAttempt:He.attemptifyAsync(Be.promisify(me.unlink)),closeRetry:Qe.retryifyAsync(Be.promisify(me.close),Pe.default.isRetriableError),fsyncRetry:Qe.retryifyAsync(Be.promisify(me.fsync),Pe.default.isRetriableError),openRetry:Qe.retryifyAsync(Be.promisify(me.open),Pe.default.isRetriableError),readFileRetry:Qe.retryifyAsync(Be.promisify(me.readFile),Pe.default.isRetriableError),renameRetry:Qe.retryifyAsync(Be.promisify(me.rename),Pe.default.isRetriableError),statRetry:Qe.retryifyAsync(Be.promisify(me.stat),Pe.default.isRetriableError),writeRetry:Qe.retryifyAsync(Be.promisify(me.write),Pe.default.isRetriableError),chmodSyncAttempt:He.attemptifySync(me.chmodSync,Pe.default.onChangeError),chownSyncAttempt:He.attemptifySync(me.chownSync,Pe.default.onChangeError),closeSyncAttempt:He.attemptifySync(me.closeSync),mkdirSyncAttempt:He.attemptifySync(me.mkdirSync),realpathSyncAttempt:He.attemptifySync(me.realpathSync),statSyncAttempt:He.attemptifySync(me.statSync),unlinkSyncAttempt:He.attemptifySync(me.unlinkSync),closeSyncRetry:Qe.retryifySync(me.closeSync,Pe.default.isRetriableError),fsyncSyncRetry:Qe.retryifySync(me.fsyncSync,Pe.default.isRetriableError),openSyncRetry:Qe.retryifySync(me.openSync,Pe.default.isRetriableError),readFileSyncRetry:Qe.retryifySync(me.readFileSync,Pe.default.isRetriableError),renameSyncRetry:Qe.retryifySync(me.renameSync,Pe.default.isRetriableError),statSyncRetry:Qe.retryifySync(me.statSync,Pe.default.isRetriableError),writeSyncRetry:Qe.retryifySync(me.writeSync,Pe.default.isRetriableError)};Ki.default=Qh;var Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});const em={isFunction:e=>typeof e=="function",isString:e=>typeof e=="string",isUndefined:e=>typeof e>"u"};Ys.default=em;var Qs={};Object.defineProperty(Qs,"__esModule",{value:!0});const ri={},As={next:e=>{const t=ri[e];if(!t)return;t.shift();const r=t[0];r?r(()=>As.next(e)):delete ri[e]},schedule:e=>new Promise(t=>{let r=ri[e];r||(r=ri[e]=[]),r.push(t),!(r.length>1)&&t(()=>As.next(e))})};Qs.default=As;var eo={};Object.defineProperty(eo,"__esModule",{value:!0});const tm=Ie,Na=he,Ia=Ki,ot={store:{},create:e=>{const t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),r=Date.now().toString().slice(-10),n="tmp-",i=`.${n}${r}${t}`;return`${e}${i}`},get:(e,t,r=!0)=>{const n=ot.truncate(t(e));return n in ot.store?ot.get(e,t,r):(ot.store[n]=r,[n,()=>delete ot.store[n]])},purge:e=>{ot.store[e]&&(delete ot.store[e],Ia.default.unlinkAttempt(e))},purgeSync:e=>{ot.store[e]&&(delete ot.store[e],Ia.default.unlinkSyncAttempt(e))},purgeSyncAll:()=>{for(const e in ot.store)ot.purgeSync(e)},truncate:e=>{const t=tm.basename(e);if(t.length<=Na.LIMIT_BASENAME_LENGTH)return e;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;const n=t.length-Na.LIMIT_BASENAME_LENGTH;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};process.on("exit",ot.purgeSyncAll);eo.default=ot;Object.defineProperty(Pt,"__esModule",{value:!0});Pt.writeFileSync=Pt.writeFile=Pt.readFileSync=Pt.readFile=void 0;const Iu=Ie,Me=he,de=Ki,at=Ys,rm=Qs,er=eo;function Ou(e,t=Me.DEFAULT_READ_OPTIONS){var r;if(at.default.isString(t))return Ou(e,{encoding:t});const n=Date.now()+((r=t.timeout)!==null&&r!==void 0?r:Me.DEFAULT_TIMEOUT_ASYNC);return de.default.readFileRetry(n)(e,t)}Pt.readFile=Ou;function Tu(e,t=Me.DEFAULT_READ_OPTIONS){var r;if(at.default.isString(t))return Tu(e,{encoding:t});const n=Date.now()+((r=t.timeout)!==null&&r!==void 0?r:Me.DEFAULT_TIMEOUT_SYNC);return de.default.readFileSyncRetry(n)(e,t)}Pt.readFileSync=Tu;const Du=(e,t,r,n)=>{if(at.default.isFunction(r))return Du(e,t,Me.DEFAULT_WRITE_OPTIONS,r);const i=Cu(e,t,r);return n&&i.then(n,n),i};Pt.writeFile=Du;const Cu=async(e,t,r=Me.DEFAULT_WRITE_OPTIONS)=>{var n;if(at.default.isString(r))return Cu(e,t,{encoding:r});const i=Date.now()+((n=r.timeout)!==null&&n!==void 0?n:Me.DEFAULT_TIMEOUT_ASYNC);let s=null,o=null,c=null,u=null,m=null;try{r.schedule&&(s=await r.schedule(e)),o=await rm.default.schedule(e),e=await de.default.realpathAttempt(e)||e,[u,c]=er.default.get(e,r.tmpCreate||er.default.create,r.tmpPurge!==!1);const a=Me.IS_POSIX&&at.default.isUndefined(r.chown),l=at.default.isUndefined(r.mode);if(a||l){const h=await de.default.statAttempt(e);h&&(r={...r},a&&(r.chown={uid:h.uid,gid:h.gid}),l&&(r.mode=h.mode))}const E=Iu.dirname(e);await de.default.mkdirAttempt(E,{mode:Me.DEFAULT_FOLDER_MODE,recursive:!0}),m=await de.default.openRetry(i)(u,"w",r.mode||Me.DEFAULT_FILE_MODE),r.tmpCreated&&r.tmpCreated(u),at.default.isString(t)?await de.default.writeRetry(i)(m,t,0,r.encoding||Me.DEFAULT_ENCODING):at.default.isUndefined(t)||await de.default.writeRetry(i)(m,t,0,t.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?await de.default.fsyncRetry(i)(m):de.default.fsyncAttempt(m)),await de.default.closeRetry(i)(m),m=null,r.chown&&await de.default.chownAttempt(u,r.chown.uid,r.chown.gid),r.mode&&await de.default.chmodAttempt(u,r.mode);try{await de.default.renameRetry(i)(u,e)}catch(h){if(h.code!=="ENAMETOOLONG")throw h;await de.default.renameRetry(i)(u,er.default.truncate(e))}c(),u=null}finally{m&&await de.default.closeAttempt(m),u&&er.default.purge(u),s&&s(),o&&o()}},Ru=(e,t,r=Me.DEFAULT_WRITE_OPTIONS)=>{var n;if(at.default.isString(r))return Ru(e,t,{encoding:r});const i=Date.now()+((n=r.timeout)!==null&&n!==void 0?n:Me.DEFAULT_TIMEOUT_SYNC);let s=null,o=null,c=null;try{e=de.default.realpathSyncAttempt(e)||e,[o,s]=er.default.get(e,r.tmpCreate||er.default.create,r.tmpPurge!==!1);const u=Me.IS_POSIX&&at.default.isUndefined(r.chown),m=at.default.isUndefined(r.mode);if(u||m){const l=de.default.statSyncAttempt(e);l&&(r={...r},u&&(r.chown={uid:l.uid,gid:l.gid}),m&&(r.mode=l.mode))}const a=Iu.dirname(e);de.default.mkdirSyncAttempt(a,{mode:Me.DEFAULT_FOLDER_MODE,recursive:!0}),c=de.default.openSyncRetry(i)(o,"w",r.mode||Me.DEFAULT_FILE_MODE),r.tmpCreated&&r.tmpCreated(o),at.default.isString(t)?de.default.writeSyncRetry(i)(c,t,0,r.encoding||Me.DEFAULT_ENCODING):at.default.isUndefined(t)||de.default.writeSyncRetry(i)(c,t,0,t.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?de.default.fsyncSyncRetry(i)(c):de.default.fsyncAttempt(c)),de.default.closeSyncRetry(i)(c),c=null,r.chown&&de.default.chownSyncAttempt(o,r.chown.uid,r.chown.gid),r.mode&&de.default.chmodSyncAttempt(o,r.mode);try{de.default.renameSyncRetry(i)(o,e)}catch(l){if(l.code!=="ENAMETOOLONG")throw l;de.default.renameSyncRetry(i)(o,er.default.truncate(e))}s(),o=null}finally{c&&de.default.closeSyncAttempt(c),o&&er.default.purge(o)}};Pt.writeFileSync=Ru;var bn={},nm={get exports(){return bn},set exports(e){bn=e}},Pu={},gt={},Yr={},Gn={},re={},Ln={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor($){if(super(),!e.IDENTIFIER.test($))throw new Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor($){super(),this._items=typeof $=="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((_,D)=>`${_}${D}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((_,D)=>(D instanceof r&&(_[D.str]=(_[D.str]||0)+1),_),{})}}e._Code=n,e.nil=new n("");function i(f,...$){const _=[f[0]];let D=0;for(;D<$.length;)c(_,$[D]),_.push(f[++D]);return new n(_)}e._=i;const s=new n("+");function o(f,...$){const _=[h(f[0])];let D=0;for(;D<$.length;)_.push(s),c(_,$[D]),_.push(s,h(f[++D]));return u(_),new n(_)}e.str=o;function c(f,$){$ instanceof n?f.push(...$._items):$ instanceof r?f.push($):f.push(l($))}e.addCodeArg=c;function u(f){let $=1;for(;$<f.length-1;){if(f[$]===s){const _=m(f[$-1],f[$+1]);if(_!==void 0){f.splice($-1,3,_);continue}f[$++]="+"}$++}}function m(f,$){if($==='""')return f;if(f==='""')return $;if(typeof f=="string")return $ instanceof r||f[f.length-1]!=='"'?void 0:typeof $!="string"?`${f.slice(0,-1)}${$}"`:$[0]==='"'?f.slice(0,-1)+$.slice(1):void 0;if(typeof $=="string"&&$[0]==='"'&&!(f instanceof r))return`"${f}${$.slice(1)}`}function a(f,$){return $.emptyStr()?f:f.emptyStr()?$:o`${f}${$}`}e.strConcat=a;function l(f){return typeof f=="number"||typeof f=="boolean"||f===null?f:h(Array.isArray(f)?f.join(","):f)}function E(f){return new n(h(f))}e.stringify=E;function h(f){return JSON.stringify(f).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=h;function d(f){return typeof f=="string"&&e.IDENTIFIER.test(f)?new n(`.${f}`):i`[${f}]`}e.getProperty=d;function y(f){if(typeof f=="string"&&e.IDENTIFIER.test(f))return new n(`${f}`);throw new Error(`CodeGen: invalid export name: ${f}, use explicit $id name mapping`)}e.getEsmExportName=y;function p(f){return new n(f.toString())}e.regexpCode=p})(Ln);var bs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Ln;class r extends Error{constructor(m){super(`CodeGen: "code" for ${m} not defined`),this.value=m.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:m,parent:a}={}){this._names={},this._prefixes=m,this._parent=a}toName(m){return m instanceof t.Name?m:this.name(m)}name(m){return new t.Name(this._newName(m))}_newName(m){const a=this._names[m]||this._nameGroup(m);return`${m}${a.index++}`}_nameGroup(m){var a,l;if(!((l=(a=this._parent)===null||a===void 0?void 0:a._prefixes)===null||l===void 0)&&l.has(m)||this._prefixes&&!this._prefixes.has(m))throw new Error(`CodeGen: prefix "${m}" is not allowed in this scope`);return this._names[m]={prefix:m,index:0}}}e.Scope=i;class s extends t.Name{constructor(m,a){super(a),this.prefix=m}setValue(m,{property:a,itemIndex:l}){this.value=m,this.scopePath=(0,t._)`.${new t.Name(a)}[${l}]`}}e.ValueScopeName=s;const o=(0,t._)`\n`;class c extends i{constructor(m){super(m),this._values={},this._scope=m.scope,this.opts={...m,_n:m.lines?o:t.nil}}get(){return this._scope}name(m){return new s(m,this._newName(m))}value(m,a){var l;if(a.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const E=this.toName(m),{prefix:h}=E,d=(l=a.key)!==null&&l!==void 0?l:a.ref;let y=this._values[h];if(y){const $=y.get(d);if($)return $}else y=this._values[h]=new Map;y.set(d,E);const p=this._scope[h]||(this._scope[h]=[]),f=p.length;return p[f]=a.ref,E.setValue(a,{property:h,itemIndex:f}),E}getValue(m,a){const l=this._values[m];if(l)return l.get(a)}scopeRefs(m,a=this._values){return this._reduceValues(a,l=>{if(l.scopePath===void 0)throw new Error(`CodeGen: name "${l}" has no value`);return(0,t._)`${m}${l.scopePath}`})}scopeCode(m=this._values,a,l){return this._reduceValues(m,E=>{if(E.value===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return E.value.code},a,l)}_reduceValues(m,a,l={},E){let h=t.nil;for(const d in m){const y=m[d];if(!y)continue;const p=l[d]=l[d]||new Map;y.forEach(f=>{if(p.has(f))return;p.set(f,n.Started);let $=a(f);if($){const _=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0,t._)`${h}${_} ${f} = ${$};${this.opts._n}`}else if($=E==null?void 0:E(f))h=(0,t._)`${h}${$}${this.opts._n}`;else throw new r(f);p.set(f,n.Completed)})}return h}}e.ValueScope=c})(bs);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Ln,r=bs;var n=Ln;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=bs;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(v,S){return this}}class o extends s{constructor(v,S,U){super(),this.varKind=v,this.name=S,this.rhs=U}render({es5:v,_n:S}){const U=v?r.varKinds.var:this.varKind,Z=this.rhs===void 0?"":` = ${this.rhs}`;return`${U} ${this.name}${Z};`+S}optimizeNames(v,S){if(v[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,v,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(v,S,U){super(),this.lhs=v,this.rhs=S,this.sideEffects=U}render({_n:v}){return`${this.lhs} = ${this.rhs};`+v}optimizeNames(v,S){if(!(this.lhs instanceof t.Name&&!v[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,v,S),this}get names(){const v=this.lhs instanceof t.Name?{}:{...this.lhs.names};return H(v,this.rhs)}}class u extends c{constructor(v,S,U,Z){super(v,U,Z),this.op=S}render({_n:v}){return`${this.lhs} ${this.op}= ${this.rhs};`+v}}class m extends s{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`${this.label}:`+v}}class a extends s{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`break${this.label?` ${this.label}`:""};`+v}}class l extends s{constructor(v){super(),this.error=v}render({_n:v}){return`throw ${this.error};`+v}get names(){return this.error.names}}class E extends s{constructor(v){super(),this.code=v}render({_n:v}){return`${this.code};`+v}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(v,S){return this.code=G(this.code,v,S),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class h extends s{constructor(v=[]){super(),this.nodes=v}render(v){return this.nodes.reduce((S,U)=>S+U.render(v),"")}optimizeNodes(){const{nodes:v}=this;let S=v.length;for(;S--;){const U=v[S].optimizeNodes();Array.isArray(U)?v.splice(S,1,...U):U?v[S]=U:v.splice(S,1)}return v.length>0?this:void 0}optimizeNames(v,S){const{nodes:U}=this;let Z=U.length;for(;Z--;){const W=U[Z];W.optimizeNames(v,S)||(q(v,W.names),U.splice(Z,1))}return U.length>0?this:void 0}get names(){return this.nodes.reduce((v,S)=>A(v,S.names),{})}}class d extends h{render(v){return"{"+v._n+super.render(v)+"}"+v._n}}class y extends h{}class p extends d{}p.kind="else";class f extends d{constructor(v,S){super(S),this.condition=v}render(v){let S=`if(${this.condition})`+super.render(v);return this.else&&(S+="else "+this.else.render(v)),S}optimizeNodes(){super.optimizeNodes();const v=this.condition;if(v===!0)return this.nodes;let S=this.else;if(S){const U=S.optimizeNodes();S=this.else=Array.isArray(U)?new p(U):U}if(S)return v===!1?S instanceof f?S:S.nodes:this.nodes.length?this:new f(K(v),S instanceof f?[S]:S.nodes);if(!(v===!1||!this.nodes.length))return this}optimizeNames(v,S){var U;if(this.else=(U=this.else)===null||U===void 0?void 0:U.optimizeNames(v,S),!!(super.optimizeNames(v,S)||this.else))return this.condition=G(this.condition,v,S),this}get names(){const v=super.names;return H(v,this.condition),this.else&&A(v,this.else.names),v}}f.kind="if";class $ extends d{}$.kind="for";class _ extends ${constructor(v){super(),this.iteration=v}render(v){return`for(${this.iteration})`+super.render(v)}optimizeNames(v,S){if(super.optimizeNames(v,S))return this.iteration=G(this.iteration,v,S),this}get names(){return A(super.names,this.iteration.names)}}class D extends ${constructor(v,S,U,Z){super(),this.varKind=v,this.name=S,this.from=U,this.to=Z}render(v){const S=v.es5?r.varKinds.var:this.varKind,{name:U,from:Z,to:W}=this;return`for(${S} ${U}=${Z}; ${U}<${W}; ${U}++)`+super.render(v)}get names(){const v=H(super.names,this.from);return H(v,this.to)}}class z extends ${constructor(v,S,U,Z){super(),this.loop=v,this.varKind=S,this.name=U,this.iterable=Z}render(v){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(v)}optimizeNames(v,S){if(super.optimizeNames(v,S))return this.iterable=G(this.iterable,v,S),this}get names(){return A(super.names,this.iterable.names)}}class T extends d{constructor(v,S,U){super(),this.name=v,this.args=S,this.async=U}render(v){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(v)}}T.kind="func";class C extends h{render(v){return"return "+super.render(v)}}C.kind="return";class V extends d{render(v){let S="try"+super.render(v);return this.catch&&(S+=this.catch.render(v)),this.finally&&(S+=this.finally.render(v)),S}optimizeNodes(){var v,S;return super.optimizeNodes(),(v=this.catch)===null||v===void 0||v.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(v,S){var U,Z;return super.optimizeNames(v,S),(U=this.catch)===null||U===void 0||U.optimizeNames(v,S),(Z=this.finally)===null||Z===void 0||Z.optimizeNames(v,S),this}get names(){const v=super.names;return this.catch&&A(v,this.catch.names),this.finally&&A(v,this.finally.names),v}}class P extends d{constructor(v){super(),this.error=v}render(v){return`catch(${this.error})`+super.render(v)}}P.kind="catch";class x extends d{render(v){return"finally"+super.render(v)}}x.kind="finally";class M{constructor(v,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
8
+ `:""},this._extScope=v,this._scope=new r.Scope({parent:v}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(v){return this._scope.name(v)}scopeName(v){return this._extScope.name(v)}scopeValue(v,S){const U=this._extScope.value(v,S);return(this._values[U.prefix]||(this._values[U.prefix]=new Set)).add(U),U}getScopeValue(v,S){return this._extScope.getValue(v,S)}scopeRefs(v){return this._extScope.scopeRefs(v,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(v,S,U,Z){const W=this._scope.toName(S);return U!==void 0&&Z&&(this._constants[W.str]=U),this._leafNode(new o(v,W,U)),W}const(v,S,U){return this._def(r.varKinds.const,v,S,U)}let(v,S,U){return this._def(r.varKinds.let,v,S,U)}var(v,S,U){return this._def(r.varKinds.var,v,S,U)}assign(v,S,U){return this._leafNode(new c(v,S,U))}add(v,S){return this._leafNode(new u(v,e.operators.ADD,S))}code(v){return typeof v=="function"?v():v!==t.nil&&this._leafNode(new E(v)),this}object(...v){const S=["{"];for(const[U,Z]of v)S.length>1&&S.push(","),S.push(U),(U!==Z||this.opts.es5)&&(S.push(":"),(0,t.addCodeArg)(S,Z));return S.push("}"),new t._Code(S)}if(v,S,U){if(this._blockNode(new f(v)),S&&U)this.code(S).else().code(U).endIf();else if(S)this.code(S).endIf();else if(U)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(v){return this._elseNode(new f(v))}else(){return this._elseNode(new p)}endIf(){return this._endBlockNode(f,p)}_for(v,S){return this._blockNode(v),S&&this.code(S).endFor(),this}for(v,S){return this._for(new _(v),S)}forRange(v,S,U,Z,W=this.opts.es5?r.varKinds.var:r.varKinds.let){const ie=this._scope.toName(v);return this._for(new D(W,ie,S,U),()=>Z(ie))}forOf(v,S,U,Z=r.varKinds.const){const W=this._scope.toName(v);if(this.opts.es5){const ie=S instanceof t.Name?S:this.var("_arr",S);return this.forRange("_i",0,(0,t._)`${ie}.length`,ae=>{this.var(W,(0,t._)`${ie}[${ae}]`),U(W)})}return this._for(new z("of",Z,W,S),()=>U(W))}forIn(v,S,U,Z=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(v,(0,t._)`Object.keys(${S})`,U);const W=this._scope.toName(v);return this._for(new z("in",Z,W,S),()=>U(W))}endFor(){return this._endBlockNode($)}label(v){return this._leafNode(new m(v))}break(v){return this._leafNode(new a(v))}return(v){const S=new C;if(this._blockNode(S),this.code(v),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(v,S,U){if(!S&&!U)throw new Error('CodeGen: "try" without "catch" and "finally"');const Z=new V;if(this._blockNode(Z),this.code(v),S){const W=this.name("e");this._currNode=Z.catch=new P(W),S(W)}return U&&(this._currNode=Z.finally=new x,this.code(U)),this._endBlockNode(P,x)}throw(v){return this._leafNode(new l(v))}block(v,S){return this._blockStarts.push(this._nodes.length),v&&this.code(v).endBlock(S),this}endBlock(v){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const U=this._nodes.length-S;if(U<0||v!==void 0&&U!==v)throw new Error(`CodeGen: wrong number of nodes: ${U} vs ${v} expected`);return this._nodes.length=S,this}func(v,S=t.nil,U,Z){return this._blockNode(new T(v,S,U)),Z&&this.code(Z).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(v=1){for(;v-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(v){return this._currNode.nodes.push(v),this}_blockNode(v){this._currNode.nodes.push(v),this._nodes.push(v)}_endBlockNode(v,S){const U=this._currNode;if(U instanceof v||S&&U instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${v.kind}/${S.kind}`:v.kind}"`)}_elseNode(v){const S=this._currNode;if(!(S instanceof f))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=v,this}get _root(){return this._nodes[0]}get _currNode(){const v=this._nodes;return v[v.length-1]}set _currNode(v){const S=this._nodes;S[S.length-1]=v}}e.CodeGen=M;function A(R,v){for(const S in v)R[S]=(R[S]||0)+(v[S]||0);return R}function H(R,v){return v instanceof t._CodeOrName?A(R,v.names):R}function G(R,v,S){if(R instanceof t.Name)return U(R);if(!Z(R))return R;return new t._Code(R._items.reduce((W,ie)=>(ie instanceof t.Name&&(ie=U(ie)),ie instanceof t._Code?W.push(...ie._items):W.push(ie),W),[]));function U(W){const ie=S[W.str];return ie===void 0||v[W.str]!==1?W:(delete v[W.str],ie)}function Z(W){return W instanceof t._Code&&W._items.some(ie=>ie instanceof t.Name&&v[ie.str]===1&&S[ie.str]!==void 0)}}function q(R,v){for(const S in v)R[S]=(R[S]||0)-(v[S]||0)}function K(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,t._)`!${F(R)}`}e.not=K;const B=I(e.operators.AND);function b(...R){return R.reduce(B)}e.and=b;const k=I(e.operators.OR);function O(...R){return R.reduce(k)}e.or=O;function I(R){return(v,S)=>v===t.nil?S:S===t.nil?v:(0,t._)`${F(v)} ${R} ${F(S)}`}function F(R){return R instanceof t.Name?R:(0,t._)`(${R})`}})(re);var fe={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=re,r=Ln;function n(T){const C={};for(const V of T)C[V]=!0;return C}e.toHash=n;function i(T,C){return typeof C=="boolean"?C:Object.keys(C).length===0?!0:(s(T,C),!o(C,T.self.RULES.all))}e.alwaysValidSchema=i;function s(T,C=T.schema){const{opts:V,self:P}=T;if(!V.strictSchema||typeof C=="boolean")return;const x=P.RULES.keywords;for(const M in C)x[M]||z(T,`unknown keyword: "${M}"`)}e.checkUnknownRules=s;function o(T,C){if(typeof T=="boolean")return!T;for(const V in T)if(C[V])return!0;return!1}e.schemaHasRules=o;function c(T,C){if(typeof T=="boolean")return!T;for(const V in T)if(V!=="$ref"&&C.all[V])return!0;return!1}e.schemaHasRulesButRef=c;function u({topSchemaRef:T,schemaPath:C},V,P,x){if(!x){if(typeof V=="number"||typeof V=="boolean")return V;if(typeof V=="string")return(0,t._)`${V}`}return(0,t._)`${T}${C}${(0,t.getProperty)(P)}`}e.schemaRefOrVal=u;function m(T){return E(decodeURIComponent(T))}e.unescapeFragment=m;function a(T){return encodeURIComponent(l(T))}e.escapeFragment=a;function l(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=l;function E(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=E;function h(T,C){if(Array.isArray(T))for(const V of T)C(V);else C(T)}e.eachItem=h;function d({mergeNames:T,mergeToName:C,mergeValues:V,resultToName:P}){return(x,M,A,H)=>{const G=A===void 0?M:A instanceof t.Name?(M instanceof t.Name?T(x,M,A):C(x,M,A),A):M instanceof t.Name?(C(x,A,M),M):V(M,A);return H===t.Name&&!(G instanceof t.Name)?P(x,G):G}}e.mergeEvaluated={props:d({mergeNames:(T,C,V)=>T.if((0,t._)`${V} !== true && ${C} !== undefined`,()=>{T.if((0,t._)`${C} === true`,()=>T.assign(V,!0),()=>T.assign(V,(0,t._)`${V} || {}`).code((0,t._)`Object.assign(${V}, ${C})`))}),mergeToName:(T,C,V)=>T.if((0,t._)`${V} !== true`,()=>{C===!0?T.assign(V,!0):(T.assign(V,(0,t._)`${V} || {}`),p(T,V,C))}),mergeValues:(T,C)=>T===!0?!0:{...T,...C},resultToName:y}),items:d({mergeNames:(T,C,V)=>T.if((0,t._)`${V} !== true && ${C} !== undefined`,()=>T.assign(V,(0,t._)`${C} === true ? true : ${V} > ${C} ? ${V} : ${C}`)),mergeToName:(T,C,V)=>T.if((0,t._)`${V} !== true`,()=>T.assign(V,C===!0?!0:(0,t._)`${V} > ${C} ? ${V} : ${C}`)),mergeValues:(T,C)=>T===!0?!0:Math.max(T,C),resultToName:(T,C)=>T.var("items",C)})};function y(T,C){if(C===!0)return T.var("props",!0);const V=T.var("props",(0,t._)`{}`);return C!==void 0&&p(T,V,C),V}e.evaluatedPropsToName=y;function p(T,C,V){Object.keys(V).forEach(P=>T.assign((0,t._)`${C}${(0,t.getProperty)(P)}`,!0))}e.setEvaluated=p;const f={};function $(T,C){return T.scopeValue("func",{ref:C,code:f[C.code]||(f[C.code]=new r._Code(C.code))})}e.useFunc=$;var _;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str"})(_=e.Type||(e.Type={}));function D(T,C,V){if(T instanceof t.Name){const P=C===_.Num;return V?P?(0,t._)`"[" + ${T} + "]"`:(0,t._)`"['" + ${T} + "']"`:P?(0,t._)`"/" + ${T}`:(0,t._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return V?(0,t.getProperty)(T).toString():"/"+l(T)}e.getErrorPath=D;function z(T,C,V=T.opts.strictSchema){if(V){if(C=`strict mode: ${C}`,V===!0)throw new Error(C);T.self.logger.warn(C)}}e.checkStrictMode=z})(fe);var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0});const xe=re,im={data:new xe.Name("data"),valCxt:new xe.Name("valCxt"),instancePath:new xe.Name("instancePath"),parentData:new xe.Name("parentData"),parentDataProperty:new xe.Name("parentDataProperty"),rootData:new xe.Name("rootData"),dynamicAnchors:new xe.Name("dynamicAnchors"),vErrors:new xe.Name("vErrors"),errors:new xe.Name("errors"),this:new xe.Name("this"),self:new xe.Name("self"),scope:new xe.Name("scope"),json:new xe.Name("json"),jsonPos:new xe.Name("jsonPos"),jsonLen:new xe.Name("jsonLen"),jsonPart:new xe.Name("jsonPart")};Lt.default=im;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=re,r=fe,n=Lt;e.keywordError={message:({keyword:p})=>(0,t.str)`must pass "${p}" keyword validation`},e.keyword$DataError={message:({keyword:p,schemaType:f})=>f?(0,t.str)`"${p}" keyword must be ${f} ($data)`:(0,t.str)`"${p}" keyword is invalid ($data)`};function i(p,f=e.keywordError,$,_){const{it:D}=p,{gen:z,compositeRule:T,allErrors:C}=D,V=l(p,f,$);_??(T||C)?u(z,V):m(D,(0,t._)`[${V}]`)}e.reportError=i;function s(p,f=e.keywordError,$){const{it:_}=p,{gen:D,compositeRule:z,allErrors:T}=_,C=l(p,f,$);u(D,C),z||T||m(_,n.default.vErrors)}e.reportExtraError=s;function o(p,f){p.assign(n.default.errors,f),p.if((0,t._)`${n.default.vErrors} !== null`,()=>p.if(f,()=>p.assign((0,t._)`${n.default.vErrors}.length`,f),()=>p.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function c({gen:p,keyword:f,schemaValue:$,data:_,errsCount:D,it:z}){if(D===void 0)throw new Error("ajv implementation error");const T=p.name("err");p.forRange("i",D,n.default.errors,C=>{p.const(T,(0,t._)`${n.default.vErrors}[${C}]`),p.if((0,t._)`${T}.instancePath === undefined`,()=>p.assign((0,t._)`${T}.instancePath`,(0,t.strConcat)(n.default.instancePath,z.errorPath))),p.assign((0,t._)`${T}.schemaPath`,(0,t.str)`${z.errSchemaPath}/${f}`),z.opts.verbose&&(p.assign((0,t._)`${T}.schema`,$),p.assign((0,t._)`${T}.data`,_))})}e.extendErrors=c;function u(p,f){const $=p.const("err",f);p.if((0,t._)`${n.default.vErrors} === null`,()=>p.assign(n.default.vErrors,(0,t._)`[${$}]`),(0,t._)`${n.default.vErrors}.push(${$})`),p.code((0,t._)`${n.default.errors}++`)}function m(p,f){const{gen:$,validateName:_,schemaEnv:D}=p;D.$async?$.throw((0,t._)`new ${p.ValidationError}(${f})`):($.assign((0,t._)`${_}.errors`,f),$.return(!1))}const a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function l(p,f,$){const{createErrors:_}=p.it;return _===!1?(0,t._)`{}`:E(p,f,$)}function E(p,f,$={}){const{gen:_,it:D}=p,z=[h(D,$),d(p,$)];return y(p,f,z),_.object(...z)}function h({errorPath:p},{instancePath:f}){const $=f?(0,t.str)`${p}${(0,r.getErrorPath)(f,r.Type.Str)}`:p;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,$)]}function d({keyword:p,it:{errSchemaPath:f}},{schemaPath:$,parentSchema:_}){let D=_?f:(0,t.str)`${f}/${p}`;return $&&(D=(0,t.str)`${D}${(0,r.getErrorPath)($,r.Type.Str)}`),[a.schemaPath,D]}function y(p,{params:f,message:$},_){const{keyword:D,data:z,schemaValue:T,it:C}=p,{opts:V,propertyName:P,topSchemaRef:x,schemaPath:M}=C;_.push([a.keyword,D],[a.params,typeof f=="function"?f(p):f||(0,t._)`{}`]),V.messages&&_.push([a.message,typeof $=="function"?$(p):$]),V.verbose&&_.push([a.schema,T],[a.parentSchema,(0,t._)`${x}${M}`],[n.default.data,z]),P&&_.push([a.propertyName,P])}})(Gn);Object.defineProperty(Yr,"__esModule",{value:!0});Yr.boolOrEmptySchema=Yr.topBoolOrEmptySchema=void 0;const sm=Gn,om=re,am=Lt,cm={message:"boolean schema is false"};function um(e){const{gen:t,schema:r,validateName:n}=e;r===!1?Au(e,!1):typeof r=="object"&&r.$async===!0?t.return(am.default.data):(t.assign((0,om._)`${n}.errors`,null),t.return(!0))}Yr.topBoolOrEmptySchema=um;function fm(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Au(e)):r.var(t,!0)}Yr.boolOrEmptySchema=fm;function Au(e,t){const{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,sm.reportError)(i,cm,void 0,t)}var Bn={},Er={};Object.defineProperty(Er,"__esModule",{value:!0});Er.getRules=Er.isJSONType=void 0;const lm=["string","number","integer","boolean","null","object","array"],dm=new Set(lm);function hm(e){return typeof e=="string"&&dm.has(e)}Er.isJSONType=hm;function mm(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Er.getRules=mm;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.shouldUseRule=Ut.shouldUseGroup=Ut.schemaHasRulesForType=void 0;function pm({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&bu(e,n)}Ut.schemaHasRulesForType=pm;function bu(e,t){return t.rules.some(r=>Lu(e,r))}Ut.shouldUseGroup=bu;function Lu(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Ut.shouldUseRule=Lu;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=Er,r=Ut,n=Gn,i=re,s=fe;var o;(function(_){_[_.Correct=0]="Correct",_[_.Wrong=1]="Wrong"})(o=e.DataType||(e.DataType={}));function c(_){const D=u(_.type);if(D.includes("null")){if(_.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!D.length&&_.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');_.nullable===!0&&D.push("null")}return D}e.getSchemaTypes=c;function u(_){const D=Array.isArray(_)?_:_?[_]:[];if(D.every(t.isJSONType))return D;throw new Error("type must be JSONType or JSONType[]: "+D.join(","))}e.getJSONTypes=u;function m(_,D){const{gen:z,data:T,opts:C}=_,V=l(D,C.coerceTypes),P=D.length>0&&!(V.length===0&&D.length===1&&(0,r.schemaHasRulesForType)(_,D[0]));if(P){const x=y(D,T,C.strictNumbers,o.Wrong);z.if(x,()=>{V.length?E(_,D,V):f(_)})}return P}e.coerceAndCheckDataType=m;const a=new Set(["string","number","integer","boolean","null"]);function l(_,D){return D?_.filter(z=>a.has(z)||D==="array"&&z==="array"):[]}function E(_,D,z){const{gen:T,data:C,opts:V}=_,P=T.let("dataType",(0,i._)`typeof ${C}`),x=T.let("coerced",(0,i._)`undefined`);V.coerceTypes==="array"&&T.if((0,i._)`${P} == 'object' && Array.isArray(${C}) && ${C}.length == 1`,()=>T.assign(C,(0,i._)`${C}[0]`).assign(P,(0,i._)`typeof ${C}`).if(y(D,C,V.strictNumbers),()=>T.assign(x,C))),T.if((0,i._)`${x} !== undefined`);for(const A of z)(a.has(A)||A==="array"&&V.coerceTypes==="array")&&M(A);T.else(),f(_),T.endIf(),T.if((0,i._)`${x} !== undefined`,()=>{T.assign(C,x),h(_,x)});function M(A){switch(A){case"string":T.elseIf((0,i._)`${P} == "number" || ${P} == "boolean"`).assign(x,(0,i._)`"" + ${C}`).elseIf((0,i._)`${C} === null`).assign(x,(0,i._)`""`);return;case"number":T.elseIf((0,i._)`${P} == "boolean" || ${C} === null
9
9
  || (${P} == "string" && ${C} && ${C} == +${C})`).assign(x,(0,i._)`+${C}`);return;case"integer":T.elseIf((0,i._)`${P} === "boolean" || ${C} === null
10
10
  || (${P} === "string" && ${C} && ${C} == +${C} && !(${C} % 1))`).assign(x,(0,i._)`+${C}`);return;case"boolean":T.elseIf((0,i._)`${C} === "false" || ${C} === 0 || ${C} === null`).assign(x,!1).elseIf((0,i._)`${C} === "true" || ${C} === 1`).assign(x,!0);return;case"null":T.elseIf((0,i._)`${C} === "" || ${C} === 0 || ${C} === false`),T.assign(x,null);return;case"array":T.elseIf((0,i._)`${P} === "string" || ${P} === "number"
11
- || ${P} === "boolean" || ${C} === null`).assign(x,(0,i._)`[${C}]`)}}}function h({gen:_,parentData:D,parentDataProperty:z},T){_.if((0,i._)`${D} !== undefined`,()=>_.assign((0,i._)`${D}[${z}]`,T))}function d(_,D,z,T=o.Correct){const C=T===o.Correct?i.operators.EQ:i.operators.NEQ;let V;switch(_){case"null":return(0,i._)`${D} ${C} null`;case"array":V=(0,i._)`Array.isArray(${D})`;break;case"object":V=(0,i._)`${D} && typeof ${D} == "object" && !Array.isArray(${D})`;break;case"integer":V=P((0,i._)`!(${D} % 1) && !isNaN(${D})`);break;case"number":V=P();break;default:return(0,i._)`typeof ${D} ${C} ${_}`}return T===o.Correct?V:(0,i.not)(V);function P(x=i.nil){return(0,i.and)((0,i._)`typeof ${D} == "number"`,x,z?(0,i._)`isFinite(${D})`:i.nil)}}e.checkDataType=d;function v(_,D,z,T){if(_.length===1)return d(_[0],D,z,T);let C;const V=(0,s.toHash)(_);if(V.array&&V.object){const P=(0,i._)`typeof ${D} != "object"`;C=V.null?P:(0,i._)`!${D} || ${P}`,delete V.null,delete V.array,delete V.object}else C=i.nil;V.number&&delete V.integer;for(const P in V)C=(0,i.and)(C,d(P,D,z,T));return C}e.checkDataTypes=v;const p={message:({schema:_})=>`must be ${_}`,params:({schema:_,schemaValue:D})=>typeof _=="string"?(0,i._)`{type: ${_}}`:(0,i._)`{type: ${D}}`};function f(_){const D=$(_);(0,n.reportError)(D,p)}e.reportTypeError=f;function $(_){const{gen:D,data:z,schema:T}=_,C=(0,s.schemaRefOrVal)(_,T,"type");return{gen:D,keyword:"type",data:z,schema:T.type,schemaCode:C,schemaValue:C,parentSchema:T,params:{},it:_}}})(xn);var ji={};Object.defineProperty(ji,"__esModule",{value:!0});ji.assignDefaults=void 0;const Ar=re,om=fe;function am(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const i in r)Ia(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,s)=>Ia(e,s,i.default))}ji.assignDefaults=am;function Ia(e,t,r){const{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;const c=(0,Ar._)`${s}${(0,Ar.getProperty)(t)}`;if(i){(0,om.checkStrictMode)(e,`default is ignored for: ${c}`);return}let u=(0,Ar._)`${c} === undefined`;o.useDefaults==="empty"&&(u=(0,Ar._)`${u} || ${c} === null || ${c} === ""`),n.if(u,(0,Ar._)`${c} = ${(0,Ar.stringify)(r)}`)}var At={},ne={};Object.defineProperty(ne,"__esModule",{value:!0});ne.validateUnion=ne.validateArray=ne.usePattern=ne.callValidateCode=ne.schemaProperties=ne.allSchemaProperties=ne.noPropertyInData=ne.propertyInData=ne.isOwnProperty=ne.hasPropFunc=ne.reportMissingProp=ne.checkMissingProp=ne.checkReportMissingProp=void 0;const Ee=re,Qs=fe,Gt=Lt,cm=fe;function um(e,t){const{gen:r,data:n,it:i}=e;r.if(to(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ee._)`${t}`},!0),e.error()})}ne.checkReportMissingProp=um;function fm({gen:e,data:t,it:{opts:r}},n,i){return(0,Ee.or)(...n.map(s=>(0,Ee.and)(to(e,t,s,r.ownProperties),(0,Ee._)`${i} = ${s}`)))}ne.checkMissingProp=fm;function lm(e,t){e.setParams({missingProperty:t},!0),e.error()}ne.reportMissingProp=lm;function Fu(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ee._)`Object.prototype.hasOwnProperty`})}ne.hasPropFunc=Fu;function eo(e,t,r){return(0,Ee._)`${Fu(e)}.call(${t}, ${r})`}ne.isOwnProperty=eo;function dm(e,t,r,n){const i=(0,Ee._)`${t}${(0,Ee.getProperty)(r)} !== undefined`;return n?(0,Ee._)`${i} && ${eo(e,t,r)}`:i}ne.propertyInData=dm;function to(e,t,r,n){const i=(0,Ee._)`${t}${(0,Ee.getProperty)(r)} === undefined`;return n?(0,Ee.or)(i,(0,Ee.not)(eo(e,t,r))):i}ne.noPropertyInData=to;function ju(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ne.allSchemaProperties=ju;function hm(e,t){return ju(t).filter(r=>!(0,Qs.alwaysValidSchema)(e,t[r]))}ne.schemaProperties=hm;function mm({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},c,u,m){const a=m?(0,Ee._)`${e}, ${t}, ${n}${i}`:t,l=[[Gt.default.instancePath,(0,Ee.strConcat)(Gt.default.instancePath,s)],[Gt.default.parentData,o.parentData],[Gt.default.parentDataProperty,o.parentDataProperty],[Gt.default.rootData,Gt.default.rootData]];o.opts.dynamicRef&&l.push([Gt.default.dynamicAnchors,Gt.default.dynamicAnchors]);const E=(0,Ee._)`${a}, ${r.object(...l)}`;return u!==Ee.nil?(0,Ee._)`${c}.call(${u}, ${E})`:(0,Ee._)`${c}(${E})`}ne.callValidateCode=mm;const pm=(0,Ee._)`new RegExp`;function ym({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Ee._)`${i.code==="new RegExp"?pm:(0,cm.useFunc)(e,i)}(${r}, ${n})`})}ne.usePattern=ym;function vm(e){const{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){const c=t.let("valid",!0);return o(()=>t.assign(c,!1)),c}return t.var(s,!0),o(()=>t.break()),s;function o(c){const u=t.const("len",(0,Ee._)`${r}.length`);t.forRange("i",0,u,m=>{e.subschema({keyword:n,dataProp:m,dataPropType:Qs.Type.Num},s),t.if((0,Ee.not)(s),c)})}}ne.validateArray=vm;function Em(e){const{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,Qs.alwaysValidSchema)(i,u))&&!i.opts.unevaluated)return;const o=t.let("valid",!1),c=t.name("_valid");t.block(()=>r.forEach((u,m)=>{const a=e.subschema({keyword:n,schemaProp:m,compositeRule:!0},c);t.assign(o,(0,Ee._)`${o} || ${c}`),e.mergeValidEvaluated(a,c)||t.if((0,Ee.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}ne.validateUnion=Em;Object.defineProperty(At,"__esModule",{value:!0});At.validateKeywordUsage=At.validSchemaType=At.funcKeywordCode=At.macroKeywordCode=void 0;const qe=re,fr=Lt,gm=ne,$m=zn;function _m(e,t){const{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e,c=t.macro.call(o.self,i,s,o),u=Mu(r,n,c);o.opts.validateSchema!==!1&&o.self.validateSchema(c,!0);const m=r.name("valid");e.subschema({schema:c,schemaPath:qe.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},m),e.pass(m,()=>e.error(!0))}At.macroKeywordCode=_m;function Sm(e,t){var r;const{gen:n,keyword:i,schema:s,parentSchema:o,$data:c,it:u}=e;Nm(u,t);const m=!c&&t.compile?t.compile.call(u.self,s,o,u):t.validate,a=Mu(n,i,m),l=n.let("valid");e.block$data(l,E),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function E(){if(t.errors===!1)v(),t.modifying&&Oa(e),p(()=>e.error());else{const f=t.async?h():d();t.modifying&&Oa(e),p(()=>wm(e,f))}}function h(){const f=n.let("ruleErrs",null);return n.try(()=>v((0,qe._)`await `),$=>n.assign(l,!1).if((0,qe._)`${$} instanceof ${u.ValidationError}`,()=>n.assign(f,(0,qe._)`${$}.errors`),()=>n.throw($))),f}function d(){const f=(0,qe._)`${a}.errors`;return n.assign(f,null),v(qe.nil),f}function v(f=t.async?(0,qe._)`await `:qe.nil){const $=u.opts.passContext?fr.default.this:fr.default.self,_=!("compile"in t&&!c||t.schema===!1);n.assign(l,(0,qe._)`${f}${(0,gm.callValidateCode)(e,a,$,_)}`,t.modifying)}function p(f){var $;n.if((0,qe.not)(($=t.valid)!==null&&$!==void 0?$:l),f)}}At.funcKeywordCode=Sm;function Oa(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,qe._)`${n.parentData}[${n.parentDataProperty}]`))}function wm(e,t){const{gen:r}=e;r.if((0,qe._)`Array.isArray(${t})`,()=>{r.assign(fr.default.vErrors,(0,qe._)`${fr.default.vErrors} === null ? ${t} : ${fr.default.vErrors}.concat(${t})`).assign(fr.default.errors,(0,qe._)`${fr.default.vErrors}.length`),(0,$m.extendErrors)(e)},()=>e.error())}function Nm({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Mu(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,qe.stringify)(r)})}function Im(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}At.validSchemaType=Im;function Om({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const o=i.dependencies;if(o!=null&&o.some(c=>!Object.prototype.hasOwnProperty.call(e,c)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[s])){const u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}At.validateKeywordUsage=Om;var tr={};Object.defineProperty(tr,"__esModule",{value:!0});tr.extendSubschemaMode=tr.extendSubschemaData=tr.getSubschema=void 0;const Rt=re,ku=fe;function Tm(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const c=e.schema[t];return r===void 0?{schema:c,schemaPath:(0,Rt._)`${e.schemaPath}${(0,Rt.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:c[r],schemaPath:(0,Rt._)`${e.schemaPath}${(0,Rt.getProperty)(t)}${(0,Rt.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,ku.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}tr.getSubschema=Tm;function Dm(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(r!==void 0){const{errorPath:m,dataPathArr:a,opts:l}=t,E=c.let("data",(0,Rt._)`${t.data}${(0,Rt.getProperty)(r)}`,!0);u(E),e.errorPath=(0,Rt.str)`${m}${(0,ku.getErrorPath)(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=(0,Rt._)`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}if(i!==void 0){const m=i instanceof Rt.Name?i:c.let("data",i,!0);u(m),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function u(m){e.data=m,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,m]}}tr.extendSubschemaData=Dm;function Cm(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}tr.extendSubschemaMode=Cm;var ke={},Uu=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},Vu={exports:{}},er=Vu.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};li(t,n,i,e,"",e)};er.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};er.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};er.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};er.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function li(e,t,r,n,i,s,o,c,u,m){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,o,c,u,m);for(var a in n){var l=n[a];if(Array.isArray(l)){if(a in er.arrayKeywords)for(var E=0;E<l.length;E++)li(e,t,r,l[E],i+"/"+a+"/"+E,s,i,a,n,E)}else if(a in er.propsKeywords){if(l&&typeof l=="object")for(var h in l)li(e,t,r,l[h],i+"/"+a+"/"+Rm(h),s,i,a,n,h)}else(a in er.keywords||e.allKeys&&!(a in er.skipKeywords))&&li(e,t,r,l,i+"/"+a,s,i,a,n)}r(n,i,s,o,c,u,m)}}function Rm(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}Object.defineProperty(ke,"__esModule",{value:!0});ke.getSchemaRefs=ke.resolveUrl=ke.normalizeId=ke._getFullPath=ke.getFullPath=ke.inlineRef=void 0;const Pm=fe,Am=Uu,bm=Vu.exports,Lm=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Fm(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Ns(e):t?zu(e)<=t:!1}ke.inlineRef=Fm;const jm=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ns(e){for(const t in e){if(jm.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Ns)||typeof r=="object"&&Ns(r))return!0}return!1}function zu(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!Lm.has(r)&&(typeof e[r]=="object"&&(0,Pm.eachItem)(e[r],n=>t+=zu(n)),t===1/0))return 1/0}return t}function xu(e,t="",r){r!==!1&&(t=zr(t));const n=e.parse(t);return Gu(e,n)}ke.getFullPath=xu;function Gu(e,t){return e.serialize(t).split("#")[0]+"#"}ke._getFullPath=Gu;const Mm=/#\/?$/;function zr(e){return e?e.replace(Mm,""):""}ke.normalizeId=zr;function km(e,t,r){return r=zr(r),e.resolve(t,r)}ke.resolveUrl=km;const Um=/^[a-z_][-a-z0-9._]*$/i;function Vm(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,i=zr(e[r]||t),s={"":i},o=xu(n,i,!1),c={},u=new Set;return bm(e,{allKeys:!0},(l,E,h,d)=>{if(d===void 0)return;const v=o+E;let p=s[d];typeof l[r]=="string"&&(p=f.call(this,l[r])),$.call(this,l.$anchor),$.call(this,l.$dynamicAnchor),s[E]=p;function f(_){const D=this.opts.uriResolver.resolve;if(_=zr(p?D(p,_):_),u.has(_))throw a(_);u.add(_);let z=this.refs[_];return typeof z=="string"&&(z=this.refs[z]),typeof z=="object"?m(l,z.schema,_):_!==zr(v)&&(_[0]==="#"?(m(l,c[_],_),c[_]=l):this.refs[_]=v),_}function $(_){if(typeof _=="string"){if(!Um.test(_))throw new Error(`invalid anchor "${_}"`);f.call(this,`#${_}`)}}}),c;function m(l,E,h){if(E!==void 0&&!Am(l,E))throw a(h)}function a(l){return new Error(`reference "${l}" resolves to more than one schema`)}}ke.getSchemaRefs=Vm;Object.defineProperty(gt,"__esModule",{value:!0});gt.getData=gt.KeywordCxt=gt.validateFunctionCode=void 0;const Bu=Jr,Ta=xn,ro=Ut,_i=xn,zm=ji,wn=At,rs=tr,J=re,ee=Lt,xm=ke,Vt=fe,pn=zn;function Gm(e){if(Ku(e)&&(Wu(e),qu(e))){qm(e);return}Hu(e,()=>(0,Bu.topBoolOrEmptySchema)(e))}gt.validateFunctionCode=Gm;function Hu({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,(0,J._)`${ee.default.data}, ${ee.default.valCxt}`,n.$async,()=>{e.code((0,J._)`"use strict"; ${Da(r,i)}`),Hm(e,i),e.code(s)}):e.func(t,(0,J._)`${ee.default.data}, ${Bm(i)}`,n.$async,()=>e.code(Da(r,i)).code(s))}function Bm(e){return(0,J._)`{${ee.default.instancePath}="", ${ee.default.parentData}, ${ee.default.parentDataProperty}, ${ee.default.rootData}=${ee.default.data}${e.dynamicRef?(0,J._)`, ${ee.default.dynamicAnchors}={}`:J.nil}}={}`}function Hm(e,t){e.if(ee.default.valCxt,()=>{e.var(ee.default.instancePath,(0,J._)`${ee.default.valCxt}.${ee.default.instancePath}`),e.var(ee.default.parentData,(0,J._)`${ee.default.valCxt}.${ee.default.parentData}`),e.var(ee.default.parentDataProperty,(0,J._)`${ee.default.valCxt}.${ee.default.parentDataProperty}`),e.var(ee.default.rootData,(0,J._)`${ee.default.valCxt}.${ee.default.rootData}`),t.dynamicRef&&e.var(ee.default.dynamicAnchors,(0,J._)`${ee.default.valCxt}.${ee.default.dynamicAnchors}`)},()=>{e.var(ee.default.instancePath,(0,J._)`""`),e.var(ee.default.parentData,(0,J._)`undefined`),e.var(ee.default.parentDataProperty,(0,J._)`undefined`),e.var(ee.default.rootData,ee.default.data),t.dynamicRef&&e.var(ee.default.dynamicAnchors,(0,J._)`{}`)})}function qm(e){const{schema:t,opts:r,gen:n}=e;Hu(e,()=>{r.$comment&&t.$comment&&Xu(e),Jm(e),n.let(ee.default.vErrors,null),n.let(ee.default.errors,0),r.unevaluated&&Km(e),Zu(e),ep(e)})}function Km(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,J._)`${r}.evaluated`),t.if((0,J._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,J._)`${e.evaluated}.props`,(0,J._)`undefined`)),t.if((0,J._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,J._)`${e.evaluated}.items`,(0,J._)`undefined`))}function Da(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,J._)`/*# sourceURL=${r} */`:J.nil}function Wm(e,t){if(Ku(e)&&(Wu(e),qu(e))){Zm(e,t);return}(0,Bu.boolOrEmptySchema)(e,t)}function qu({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function Ku(e){return typeof e.schema!="boolean"}function Zm(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Xu(e),Ym(e),Qm(e);const s=n.const("_errs",ee.default.errors);Zu(e,s),n.var(t,(0,J._)`${s} === ${ee.default.errors}`)}function Wu(e){(0,Vt.checkUnknownRules)(e),Xm(e)}function Zu(e,t){if(e.opts.jtd)return Ca(e,[],!1,t);const r=(0,Ta.getSchemaTypes)(e.schema),n=(0,Ta.coerceAndCheckDataType)(e,r);Ca(e,r,!n,t)}function Xm(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Vt.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Jm(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Vt.checkStrictMode)(e,"default is ignored in the schema root")}function Ym(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,xm.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Qm(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Xu({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const s=r.$comment;if(i.$comment===!0)e.code((0,J._)`${ee.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){const o=(0,J.str)`${n}/$comment`,c=e.scopeValue("root",{ref:t.root});e.code((0,J._)`${ee.default.self}.opts.$comment(${s}, ${o}, ${c}.schema)`)}}function ep(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if((0,J._)`${ee.default.errors} === 0`,()=>t.return(ee.default.data),()=>t.throw((0,J._)`new ${i}(${ee.default.vErrors})`)):(t.assign((0,J._)`${n}.errors`,ee.default.vErrors),s.unevaluated&&tp(e),t.return((0,J._)`${ee.default.errors} === 0`))}function tp({gen:e,evaluated:t,props:r,items:n}){r instanceof J.Name&&e.assign((0,J._)`${t}.props`,r),n instanceof J.Name&&e.assign((0,J._)`${t}.items`,n)}function Ca(e,t,r,n){const{gen:i,schema:s,data:o,allErrors:c,opts:u,self:m}=e,{RULES:a}=m;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,Vt.schemaHasRulesButRef)(s,a))){i.block(()=>Yu(e,"$ref",a.all.$ref.definition));return}u.jtd||rp(e,t),i.block(()=>{for(const E of a.rules)l(E);l(a.post)});function l(E){!(0,ro.shouldUseGroup)(s,E)||(E.type?(i.if((0,_i.checkDataType)(E.type,o,u.strictNumbers)),Ra(e,E),t.length===1&&t[0]===E.type&&r&&(i.else(),(0,_i.reportTypeError)(e)),i.endIf()):Ra(e,E),c||i.if((0,J._)`${ee.default.errors} === ${n||0}`))}}function Ra(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,zm.assignDefaults)(e,t.type),r.block(()=>{for(const s of t.rules)(0,ro.shouldUseRule)(n,s)&&Yu(e,s.keyword,s.definition,t.type)})}function rp(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(np(e,t),e.opts.allowUnionTypes||ip(e,t),sp(e,e.dataTypes))}function np(e,t){if(!!t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Pa(e.dataTypes,r)||no(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),e.dataTypes=e.dataTypes.filter(r=>Pa(t,r))}}function ip(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&no(e,"use allowUnionTypes to allow union type keyword")}function sp(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,ro.shouldUseRule)(e.schema,i)){const{type:s}=i.definition;s.length&&!s.some(o=>op(t,o))&&no(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function op(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Pa(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function no(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Vt.checkStrictMode)(e,t,e.opts.strictTypes)}class Ju{constructor(t,r,n){if((0,wn.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Vt.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Qu(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,wn.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",ee.default.errors))}result(t,r,n){this.failResult((0,J.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,J.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,J._)`${r} !== undefined && (${(0,J.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?pn.reportExtraError:pn.reportError)(this,this.def.error,r)}$dataError(){(0,pn.reportError)(this,this.def.$dataError||pn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,pn.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=J.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=J.nil,r=J.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:s,def:o}=this;n.if((0,J.or)((0,J._)`${i} === undefined`,r)),t!==J.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==J.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,J.or)(o(),c());function o(){if(n.length){if(!(r instanceof J.Name))throw new Error("ajv implementation error");const u=Array.isArray(n)?n:[n];return(0,J._)`${(0,_i.checkDataTypes)(u,r,s.opts.strictNumbers,_i.DataType.Wrong)}`}return J.nil}function c(){if(i.validateSchema){const u=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,J._)`!${u}(${r})`}return J.nil}}subschema(t,r){const n=(0,rs.getSubschema)(this.it,t);(0,rs.extendSubschemaData)(n,this.it,t),(0,rs.extendSubschemaMode)(n,t);const i={...this.it,...n,items:void 0,props:void 0};return Wm(i,r),i}mergeEvaluated(t,r){const{it:n,gen:i}=this;!n.opts.unevaluated||(n.props!==!0&&t.props!==void 0&&(n.props=Vt.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Vt.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,J.Name)),!0}}gt.KeywordCxt=Ju;function Yu(e,t,r,n){const i=new Ju(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,wn.funcKeywordCode)(i,r):"macro"in r?(0,wn.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,wn.funcKeywordCode)(i,r)}const ap=/^\/(?:[^~]|~0|~1)*$/,cp=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Qu(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return ee.default.rootData;if(e[0]==="/"){if(!ap.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,s=ee.default.rootData}else{const m=cp.exec(e);if(!m)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+m[1];if(i=m[2],i==="#"){if(a>=t)throw new Error(u("property/index",a));return n[t-a]}if(a>t)throw new Error(u("data",a));if(s=r[t-a],!i)return s}let o=s;const c=i.split("/");for(const m of c)m&&(s=(0,J._)`${s}${(0,J.getProperty)((0,Vt.unescapeJsonPointer)(m))}`,o=(0,J._)`${o} && ${s}`);return o;function u(m,a){return`Cannot access ${m} ${a} levels up, current level is ${t}`}}gt.getData=Qu;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});class up extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}Gn.default=up;var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});const ns=ke;class fp extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,ns.resolveUrl)(t,r,n),this.missingSchema=(0,ns.normalizeId)((0,ns.getFullPath)(t,this.missingRef))}}Bn.default=fp;var tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.resolveSchema=tt.getCompilingSchema=tt.resolveRef=tt.compileSchema=tt.SchemaEnv=void 0;const dt=re,lp=Gn,cr=Lt,Et=ke,Aa=fe,dp=gt;class Mi{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Et.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}tt.SchemaEnv=Mi;function io(e){const t=ef.call(this,e);if(t)return t;const r=(0,Et.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new dt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s});let c;e.$async&&(c=o.scopeValue("Error",{ref:lp.default,code:(0,dt._)`require("ajv/dist/runtime/validation_error").default`}));const u=o.scopeName("validate");e.validateName=u;const m={gen:o,allErrors:this.opts.allErrors,data:cr.default.data,parentData:cr.default.parentData,parentDataProperty:cr.default.parentDataProperty,dataNames:[cr.default.data],dataPathArr:[dt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,dt.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:c,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:dt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,dt._)`""`,opts:this.opts,self:this};let a;try{this._compilations.add(e),(0,dp.validateFunctionCode)(m),o.optimize(this.opts.code.optimize);const l=o.toString();a=`${o.scopeRefs(cr.default.scope)}return ${l}`,this.opts.code.process&&(a=this.opts.code.process(a,e));const h=new Function(`${cr.default.self}`,`${cr.default.scope}`,a)(this,this.scope.get());if(this.scope.value(u,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:u,validateCode:l,scopeValues:o._values}),this.opts.unevaluated){const{props:d,items:v}=m;h.evaluated={props:d instanceof dt.Name?void 0:d,items:v instanceof dt.Name?void 0:v,dynamicProps:d instanceof dt.Name,dynamicItems:v instanceof dt.Name},h.source&&(h.source.evaluated=(0,dt.stringify)(h.evaluated))}return e.validate=h,e}catch(l){throw delete e.validate,delete e.validateName,a&&this.logger.error("Error compiling schema, function code:",a),l}finally{this._compilations.delete(e)}}tt.compileSchema=io;function hp(e,t,r){var n;r=(0,Et.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let s=yp.call(this,e,r);if(s===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:c}=this.opts;o&&(s=new Mi({schema:o,schemaId:c,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=mp.call(this,s)}tt.resolveRef=hp;function mp(e){return(0,Et.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:io.call(this,e)}function ef(e){for(const t of this._compilations)if(pp(t,e))return t}tt.getCompilingSchema=ef;function pp(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function yp(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||ki.call(this,e,t)}function ki(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Et._getFullPath)(this.opts.uriResolver,r);let i=(0,Et.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return is.call(this,r,e);const s=(0,Et.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){const c=ki.call(this,e,o);return typeof(c==null?void 0:c.schema)!="object"?void 0:is.call(this,r,c)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||io.call(this,o),s===(0,Et.normalizeId)(t)){const{schema:c}=o,{schemaId:u}=this.opts,m=c[u];return m&&(i=(0,Et.resolveUrl)(this.opts.uriResolver,i,m)),new Mi({schema:c,schemaId:u,root:e,baseId:i})}return is.call(this,r,o)}}tt.resolveSchema=ki;const vp=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function is(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const c of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const u=r[(0,Aa.unescapeFragment)(c)];if(u===void 0)return;r=u;const m=typeof r=="object"&&r[this.opts.schemaId];!vp.has(c)&&m&&(t=(0,Et.resolveUrl)(this.opts.uriResolver,t,m))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Aa.schemaHasRulesButRef)(r,this.RULES)){const c=(0,Et.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=ki.call(this,n,c)}const{schemaId:o}=this.opts;if(s=s||new Mi({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}const Ep="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",gp="Meta-schema for $data reference (JSON AnySchema extension proposal)",$p="object",_p=["$data"],Sp={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},wp=!1,Np={$id:Ep,description:gp,type:$p,required:_p,properties:Sp,additionalProperties:wp};var so={},Is={exports:{}};(function(e,t){(function(r,n){n(t)})(Zt,function(r){function n(){for(var w=arguments.length,g=Array(w),N=0;N<w;N++)g[N]=arguments[N];if(g.length>1){g[0]=g[0].slice(0,-1);for(var j=g.length-1,L=1;L<j;++L)g[L]=g[L].slice(1,-1);return g[j]=g[j].slice(1),g.join("")}else return g[0]}function i(w){return"(?:"+w+")"}function s(w){return w===void 0?"undefined":w===null?"null":Object.prototype.toString.call(w).split(" ").pop().split("]").shift().toLowerCase()}function o(w){return w.toUpperCase()}function c(w){return w!=null?w instanceof Array?w:typeof w.length!="number"||w.split||w.setInterval||w.call?[w]:Array.prototype.slice.call(w):[]}function u(w,g){var N=w;if(g)for(var j in g)N[j]=g[j];return N}function m(w){var g="[A-Za-z]",N="[0-9]",j=n(N,"[A-Fa-f]"),L=i(i("%[EFef]"+j+"%"+j+j+"%"+j+j)+"|"+i("%[89A-Fa-f]"+j+"%"+j+j)+"|"+i("%"+j+j)),Y="[\\:\\/\\?\\#\\[\\]\\@]",Q="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ue=n(Y,Q),ve=w?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Oe=w?"[\\uE000-\\uF8FF]":"[]",se=n(g,N,"[\\-\\.\\_\\~]",ve);i(g+n(g,N,"[\\+\\-\\.]")+"*"),i(i(L+"|"+n(se,Q,"[\\:]"))+"*");var pe=i(i("25[0-5]")+"|"+i("2[0-4]"+N)+"|"+i("1"+N+N)+"|"+i("0?[1-9]"+N)+"|0?0?"+N),Te=i(pe+"\\."+pe+"\\."+pe+"\\."+pe),te=i(j+"{1,4}"),ge=i(i(te+"\\:"+te)+"|"+Te),Ce=i(i(te+"\\:")+"{6}"+ge),$e=i("\\:\\:"+i(te+"\\:")+"{5}"+ge),zt=i(i(te)+"?\\:\\:"+i(te+"\\:")+"{4}"+ge),It=i(i(i(te+"\\:")+"{0,1}"+te)+"?\\:\\:"+i(te+"\\:")+"{3}"+ge),Ot=i(i(i(te+"\\:")+"{0,2}"+te)+"?\\:\\:"+i(te+"\\:")+"{2}"+ge),Cr=i(i(i(te+"\\:")+"{0,3}"+te)+"?\\:\\:"+te+"\\:"+ge),sr=i(i(i(te+"\\:")+"{0,4}"+te)+"?\\:\\:"+ge),ut=i(i(i(te+"\\:")+"{0,5}"+te)+"?\\:\\:"+te),Tt=i(i(i(te+"\\:")+"{0,6}"+te)+"?\\:\\:"),or=i([Ce,$e,zt,It,Ot,Cr,sr,ut,Tt].join("|")),Ft=i(i(se+"|"+L)+"+");i("[vV]"+j+"+\\."+n(se,Q,"[\\:]")+"+"),i(i(L+"|"+n(se,Q))+"*");var hn=i(L+"|"+n(se,Q,"[\\:\\@]"));return i(i(L+"|"+n(se,Q,"[\\@]"))+"+"),i(i(hn+"|"+n("[\\/\\?]",Oe))+"*"),{NOT_SCHEME:new RegExp(n("[^]",g,N,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",se,Q),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",se,Q),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",se,Q),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",se,Q),"g"),NOT_QUERY:new RegExp(n("[^\\%]",se,Q,"[\\:\\@\\/\\?]",Oe),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",se,Q,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",se,Q),"g"),UNRESERVED:new RegExp(se,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",se,ue),"g"),PCT_ENCODED:new RegExp(L,"g"),IPV4ADDRESS:new RegExp("^("+Te+")$"),IPV6ADDRESS:new RegExp("^\\[?("+or+")"+i(i("\\%25|\\%(?!"+j+"{2})")+"("+Ft+")")+"?\\]?$")}}var a=m(!1),l=m(!0),E=function(){function w(g,N){var j=[],L=!0,Y=!1,Q=void 0;try{for(var ue=g[Symbol.iterator](),ve;!(L=(ve=ue.next()).done)&&(j.push(ve.value),!(N&&j.length===N));L=!0);}catch(Oe){Y=!0,Q=Oe}finally{try{!L&&ue.return&&ue.return()}finally{if(Y)throw Q}}return j}return function(g,N){if(Array.isArray(g))return g;if(Symbol.iterator in Object(g))return w(g,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(w){if(Array.isArray(w)){for(var g=0,N=Array(w.length);g<w.length;g++)N[g]=w[g];return N}else return Array.from(w)},d=2147483647,v=36,p=1,f=26,$=38,_=700,D=72,z=128,T="-",C=/^xn--/,V=/[^\0-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=v-p,A=Math.floor,H=String.fromCharCode;function G(w){throw new RangeError(x[w])}function q(w,g){for(var N=[],j=w.length;j--;)N[j]=g(w[j]);return N}function K(w,g){var N=w.split("@"),j="";N.length>1&&(j=N[0]+"@",w=N[1]),w=w.replace(P,".");var L=w.split("."),Y=q(L,g).join(".");return j+Y}function B(w){for(var g=[],N=0,j=w.length;N<j;){var L=w.charCodeAt(N++);if(L>=55296&&L<=56319&&N<j){var Y=w.charCodeAt(N++);(Y&64512)==56320?g.push(((L&1023)<<10)+(Y&1023)+65536):(g.push(L),N--)}else g.push(L)}return g}var b=function(g){return String.fromCodePoint.apply(String,h(g))},k=function(g){return g-48<10?g-22:g-65<26?g-65:g-97<26?g-97:v},O=function(g,N){return g+22+75*(g<26)-((N!=0)<<5)},I=function(g,N,j){var L=0;for(g=j?A(g/_):g>>1,g+=A(g/N);g>M*f>>1;L+=v)g=A(g/M);return A(L+(M+1)*g/(g+$))},F=function(g){var N=[],j=g.length,L=0,Y=z,Q=D,ue=g.lastIndexOf(T);ue<0&&(ue=0);for(var ve=0;ve<ue;++ve)g.charCodeAt(ve)>=128&&G("not-basic"),N.push(g.charCodeAt(ve));for(var Oe=ue>0?ue+1:0;Oe<j;){for(var se=L,pe=1,Te=v;;Te+=v){Oe>=j&&G("invalid-input");var te=k(g.charCodeAt(Oe++));(te>=v||te>A((d-L)/pe))&&G("overflow"),L+=te*pe;var ge=Te<=Q?p:Te>=Q+f?f:Te-Q;if(te<ge)break;var Ce=v-ge;pe>A(d/Ce)&&G("overflow"),pe*=Ce}var $e=N.length+1;Q=I(L-se,$e,se==0),A(L/$e)>d-Y&&G("overflow"),Y+=A(L/$e),L%=$e,N.splice(L++,0,Y)}return String.fromCodePoint.apply(String,N)},R=function(g){var N=[];g=B(g);var j=g.length,L=z,Y=0,Q=D,ue=!0,ve=!1,Oe=void 0;try{for(var se=g[Symbol.iterator](),pe;!(ue=(pe=se.next()).done);ue=!0){var Te=pe.value;Te<128&&N.push(H(Te))}}catch(mn){ve=!0,Oe=mn}finally{try{!ue&&se.return&&se.return()}finally{if(ve)throw Oe}}var te=N.length,ge=te;for(te&&N.push(T);ge<j;){var Ce=d,$e=!0,zt=!1,It=void 0;try{for(var Ot=g[Symbol.iterator](),Cr;!($e=(Cr=Ot.next()).done);$e=!0){var sr=Cr.value;sr>=L&&sr<Ce&&(Ce=sr)}}catch(mn){zt=!0,It=mn}finally{try{!$e&&Ot.return&&Ot.return()}finally{if(zt)throw It}}var ut=ge+1;Ce-L>A((d-Y)/ut)&&G("overflow"),Y+=(Ce-L)*ut,L=Ce;var Tt=!0,or=!1,Ft=void 0;try{for(var hn=g[Symbol.iterator](),ra;!(Tt=(ra=hn.next()).done);Tt=!0){var na=ra.value;if(na<L&&++Y>d&&G("overflow"),na==L){for(var Kn=Y,Wn=v;;Wn+=v){var Zn=Wn<=Q?p:Wn>=Q+f?f:Wn-Q;if(Kn<Zn)break;var ia=Kn-Zn,sa=v-Zn;N.push(H(O(Zn+ia%sa,0))),Kn=A(ia/sa)}N.push(H(O(Kn,0))),Q=I(Y,ut,ge==te),Y=0,++ge}}}catch(mn){or=!0,Ft=mn}finally{try{!Tt&&hn.return&&hn.return()}finally{if(or)throw Ft}}++Y,++L}return N.join("")},y=function(g){return K(g,function(N){return C.test(N)?F(N.slice(4).toLowerCase()):N})},S=function(g){return K(g,function(N){return V.test(N)?"xn--"+R(N):N})},U={version:"2.1.0",ucs2:{decode:B,encode:b},decode:F,encode:R,toASCII:S,toUnicode:y},W={};function Z(w){var g=w.charCodeAt(0),N=void 0;return g<16?N="%0"+g.toString(16).toUpperCase():g<128?N="%"+g.toString(16).toUpperCase():g<2048?N="%"+(g>>6|192).toString(16).toUpperCase()+"%"+(g&63|128).toString(16).toUpperCase():N="%"+(g>>12|224).toString(16).toUpperCase()+"%"+(g>>6&63|128).toString(16).toUpperCase()+"%"+(g&63|128).toString(16).toUpperCase(),N}function ie(w){for(var g="",N=0,j=w.length;N<j;){var L=parseInt(w.substr(N+1,2),16);if(L<128)g+=String.fromCharCode(L),N+=3;else if(L>=194&&L<224){if(j-N>=6){var Y=parseInt(w.substr(N+4,2),16);g+=String.fromCharCode((L&31)<<6|Y&63)}else g+=w.substr(N,6);N+=6}else if(L>=224){if(j-N>=9){var Q=parseInt(w.substr(N+4,2),16),ue=parseInt(w.substr(N+7,2),16);g+=String.fromCharCode((L&15)<<12|(Q&63)<<6|ue&63)}else g+=w.substr(N,9);N+=9}else g+=w.substr(N,3),N+=3}return g}function ae(w,g){function N(j){var L=ie(j);return L.match(g.UNRESERVED)?L:j}return w.scheme&&(w.scheme=String(w.scheme).replace(g.PCT_ENCODED,N).toLowerCase().replace(g.NOT_SCHEME,"")),w.userinfo!==void 0&&(w.userinfo=String(w.userinfo).replace(g.PCT_ENCODED,N).replace(g.NOT_USERINFO,Z).replace(g.PCT_ENCODED,o)),w.host!==void 0&&(w.host=String(w.host).replace(g.PCT_ENCODED,N).toLowerCase().replace(g.NOT_HOST,Z).replace(g.PCT_ENCODED,o)),w.path!==void 0&&(w.path=String(w.path).replace(g.PCT_ENCODED,N).replace(w.scheme?g.NOT_PATH:g.NOT_PATH_NOSCHEME,Z).replace(g.PCT_ENCODED,o)),w.query!==void 0&&(w.query=String(w.query).replace(g.PCT_ENCODED,N).replace(g.NOT_QUERY,Z).replace(g.PCT_ENCODED,o)),w.fragment!==void 0&&(w.fragment=String(w.fragment).replace(g.PCT_ENCODED,N).replace(g.NOT_FRAGMENT,Z).replace(g.PCT_ENCODED,o)),w}function Ne(w){return w.replace(/^0*(.*)/,"$1")||"0"}function St(w,g){var N=w.match(g.IPV4ADDRESS)||[],j=E(N,2),L=j[1];return L?L.split(".").map(Ne).join("."):w}function wr(w,g){var N=w.match(g.IPV6ADDRESS)||[],j=E(N,3),L=j[1],Y=j[2];if(L){for(var Q=L.toLowerCase().split("::").reverse(),ue=E(Q,2),ve=ue[0],Oe=ue[1],se=Oe?Oe.split(":").map(Ne):[],pe=ve.split(":").map(Ne),Te=g.IPV4ADDRESS.test(pe[pe.length-1]),te=Te?7:8,ge=pe.length-te,Ce=Array(te),$e=0;$e<te;++$e)Ce[$e]=se[$e]||pe[ge+$e]||"";Te&&(Ce[te-1]=St(Ce[te-1],g));var zt=Ce.reduce(function(ut,Tt,or){if(!Tt||Tt==="0"){var Ft=ut[ut.length-1];Ft&&Ft.index+Ft.length===or?Ft.length++:ut.push({index:or,length:1})}return ut},[]),It=zt.sort(function(ut,Tt){return Tt.length-ut.length})[0],Ot=void 0;if(It&&It.length>1){var Cr=Ce.slice(0,It.index),sr=Ce.slice(It.index+It.length);Ot=Cr.join(":")+"::"+sr.join(":")}else Ot=Ce.join(":");return Y&&(Ot+="%"+Y),Ot}else return w}var on=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,an="".match(/(){0}/)[1]===void 0;function it(w){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N={},j=g.iri!==!1?l:a;g.reference==="suffix"&&(w=(g.scheme?g.scheme+":":"")+"//"+w);var L=w.match(on);if(L){an?(N.scheme=L[1],N.userinfo=L[3],N.host=L[4],N.port=parseInt(L[5],10),N.path=L[6]||"",N.query=L[7],N.fragment=L[8],isNaN(N.port)&&(N.port=L[5])):(N.scheme=L[1]||void 0,N.userinfo=w.indexOf("@")!==-1?L[3]:void 0,N.host=w.indexOf("//")!==-1?L[4]:void 0,N.port=parseInt(L[5],10),N.path=L[6]||"",N.query=w.indexOf("?")!==-1?L[7]:void 0,N.fragment=w.indexOf("#")!==-1?L[8]:void 0,isNaN(N.port)&&(N.port=w.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?L[4]:void 0)),N.host&&(N.host=wr(St(N.host,j),j)),N.scheme===void 0&&N.userinfo===void 0&&N.host===void 0&&N.port===void 0&&!N.path&&N.query===void 0?N.reference="same-document":N.scheme===void 0?N.reference="relative":N.fragment===void 0?N.reference="absolute":N.reference="uri",g.reference&&g.reference!=="suffix"&&g.reference!==N.reference&&(N.error=N.error||"URI is not a "+g.reference+" reference.");var Y=W[(g.scheme||N.scheme||"").toLowerCase()];if(!g.unicodeSupport&&(!Y||!Y.unicodeSupport)){if(N.host&&(g.domainHost||Y&&Y.domainHost))try{N.host=U.toASCII(N.host.replace(j.PCT_ENCODED,ie).toLowerCase())}catch(Q){N.error=N.error||"Host's domain name can not be converted to ASCII via punycode: "+Q}ae(N,a)}else ae(N,j);Y&&Y.parse&&Y.parse(N,g)}else N.error=N.error||"URI can not be parsed.";return N}function cn(w,g){var N=g.iri!==!1?l:a,j=[];return w.userinfo!==void 0&&(j.push(w.userinfo),j.push("@")),w.host!==void 0&&j.push(wr(St(String(w.host),N),N).replace(N.IPV6ADDRESS,function(L,Y,Q){return"["+Y+(Q?"%25"+Q:"")+"]"})),(typeof w.port=="number"||typeof w.port=="string")&&(j.push(":"),j.push(String(w.port))),j.length?j.join(""):void 0}var Nr=/^\.\.?\//,Ir=/^\/\.(\/|$)/,Or=/^\/\.\.(\/|$)/,un=/^\/?(?:.|\n)*?(?=\/|$)/;function wt(w){for(var g=[];w.length;)if(w.match(Nr))w=w.replace(Nr,"");else if(w.match(Ir))w=w.replace(Ir,"/");else if(w.match(Or))w=w.replace(Or,"/"),g.pop();else if(w==="."||w==="..")w="";else{var N=w.match(un);if(N){var j=N[0];w=w.slice(j.length),g.push(j)}else throw new Error("Unexpected dot segment condition")}return g.join("")}function Ye(w){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=g.iri?l:a,j=[],L=W[(g.scheme||w.scheme||"").toLowerCase()];if(L&&L.serialize&&L.serialize(w,g),w.host&&!N.IPV6ADDRESS.test(w.host)){if(g.domainHost||L&&L.domainHost)try{w.host=g.iri?U.toUnicode(w.host):U.toASCII(w.host.replace(N.PCT_ENCODED,ie).toLowerCase())}catch(ue){w.error=w.error||"Host's domain name can not be converted to "+(g.iri?"Unicode":"ASCII")+" via punycode: "+ue}}ae(w,N),g.reference!=="suffix"&&w.scheme&&(j.push(w.scheme),j.push(":"));var Y=cn(w,g);if(Y!==void 0&&(g.reference!=="suffix"&&j.push("//"),j.push(Y),w.path&&w.path.charAt(0)!=="/"&&j.push("/")),w.path!==void 0){var Q=w.path;!g.absolutePath&&(!L||!L.absolutePath)&&(Q=wt(Q)),Y===void 0&&(Q=Q.replace(/^\/\//,"/%2F")),j.push(Q)}return w.query!==void 0&&(j.push("?"),j.push(w.query)),w.fragment!==void 0&&(j.push("#"),j.push(w.fragment)),j.join("")}function Tr(w,g){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},j=arguments[3],L={};return j||(w=it(Ye(w,N),N),g=it(Ye(g,N),N)),N=N||{},!N.tolerant&&g.scheme?(L.scheme=g.scheme,L.userinfo=g.userinfo,L.host=g.host,L.port=g.port,L.path=wt(g.path||""),L.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?(L.userinfo=g.userinfo,L.host=g.host,L.port=g.port,L.path=wt(g.path||""),L.query=g.query):(g.path?(g.path.charAt(0)==="/"?L.path=wt(g.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?L.path="/"+g.path:w.path?L.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+g.path:L.path=g.path,L.path=wt(L.path)),L.query=g.query):(L.path=w.path,g.query!==void 0?L.query=g.query:L.query=w.query),L.userinfo=w.userinfo,L.host=w.host,L.port=w.port),L.scheme=w.scheme),L.fragment=g.fragment,L}function fn(w,g,N){var j=u({scheme:"null"},N);return Ye(Tr(it(w,j),it(g,j),j,!0),j)}function nr(w,g){return typeof w=="string"?w=Ye(it(w,g),g):s(w)==="object"&&(w=it(Ye(w,g),g)),w}function ln(w,g,N){return typeof w=="string"?w=Ye(it(w,N),N):s(w)==="object"&&(w=Ye(w,N)),typeof g=="string"?g=Ye(it(g,N),N):s(g)==="object"&&(g=Ye(g,N)),w===g}function qn(w,g){return w&&w.toString().replace(!g||!g.iri?a.ESCAPE:l.ESCAPE,Z)}function ct(w,g){return w&&w.toString().replace(!g||!g.iri?a.PCT_ENCODED:l.PCT_ENCODED,ie)}var ir={scheme:"http",domainHost:!0,parse:function(g,N){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g},serialize:function(g,N){var j=String(g.scheme).toLowerCase()==="https";return(g.port===(j?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}},Wo={scheme:"https",domainHost:ir.domainHost,parse:ir.parse,serialize:ir.serialize};function Zo(w){return typeof w.secure=="boolean"?w.secure:String(w.scheme).toLowerCase()==="wss"}var dn={scheme:"ws",domainHost:!0,parse:function(g,N){var j=g;return j.secure=Zo(j),j.resourceName=(j.path||"/")+(j.query?"?"+j.query:""),j.path=void 0,j.query=void 0,j},serialize:function(g,N){if((g.port===(Zo(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){var j=g.resourceName.split("?"),L=E(j,2),Y=L[0],Q=L[1];g.path=Y&&Y!=="/"?Y:void 0,g.query=Q,g.resourceName=void 0}return g.fragment=void 0,g}},Xo={scheme:"wss",domainHost:dn.domainHost,parse:dn.parse,serialize:dn.serialize},Of={},Jo="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Nt="[0-9A-Fa-f]",Tf=i(i("%[EFef]"+Nt+"%"+Nt+Nt+"%"+Nt+Nt)+"|"+i("%[89A-Fa-f]"+Nt+"%"+Nt+Nt)+"|"+i("%"+Nt+Nt)),Df="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Cf="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Rf=n(Cf,'[\\"\\\\]'),Pf="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Af=new RegExp(Jo,"g"),Dr=new RegExp(Tf,"g"),bf=new RegExp(n("[^]",Df,"[\\.]",'[\\"]',Rf),"g"),Yo=new RegExp(n("[^]",Jo,Pf),"g"),Lf=Yo;function Xi(w){var g=ie(w);return g.match(Af)?g:w}var Qo={scheme:"mailto",parse:function(g,N){var j=g,L=j.to=j.path?j.path.split(","):[];if(j.path=void 0,j.query){for(var Y=!1,Q={},ue=j.query.split("&"),ve=0,Oe=ue.length;ve<Oe;++ve){var se=ue[ve].split("=");switch(se[0]){case"to":for(var pe=se[1].split(","),Te=0,te=pe.length;Te<te;++Te)L.push(pe[Te]);break;case"subject":j.subject=ct(se[1],N);break;case"body":j.body=ct(se[1],N);break;default:Y=!0,Q[ct(se[0],N)]=ct(se[1],N);break}}Y&&(j.headers=Q)}j.query=void 0;for(var ge=0,Ce=L.length;ge<Ce;++ge){var $e=L[ge].split("@");if($e[0]=ct($e[0]),N.unicodeSupport)$e[1]=ct($e[1],N).toLowerCase();else try{$e[1]=U.toASCII(ct($e[1],N).toLowerCase())}catch(zt){j.error=j.error||"Email address's domain name can not be converted to ASCII via punycode: "+zt}L[ge]=$e.join("@")}return j},serialize:function(g,N){var j=g,L=c(g.to);if(L){for(var Y=0,Q=L.length;Y<Q;++Y){var ue=String(L[Y]),ve=ue.lastIndexOf("@"),Oe=ue.slice(0,ve).replace(Dr,Xi).replace(Dr,o).replace(bf,Z),se=ue.slice(ve+1);try{se=N.iri?U.toUnicode(se):U.toASCII(ct(se,N).toLowerCase())}catch(ge){j.error=j.error||"Email address's domain name can not be converted to "+(N.iri?"Unicode":"ASCII")+" via punycode: "+ge}L[Y]=Oe+"@"+se}j.path=L.join(",")}var pe=g.headers=g.headers||{};g.subject&&(pe.subject=g.subject),g.body&&(pe.body=g.body);var Te=[];for(var te in pe)pe[te]!==Of[te]&&Te.push(te.replace(Dr,Xi).replace(Dr,o).replace(Yo,Z)+"="+pe[te].replace(Dr,Xi).replace(Dr,o).replace(Lf,Z));return Te.length&&(j.query=Te.join("&")),j}},Ff=/^([^\:]+)\:(.*)/,ea={scheme:"urn",parse:function(g,N){var j=g.path&&g.path.match(Ff),L=g;if(j){var Y=N.scheme||L.scheme||"urn",Q=j[1].toLowerCase(),ue=j[2],ve=Y+":"+(N.nid||Q),Oe=W[ve];L.nid=Q,L.nss=ue,L.path=void 0,Oe&&(L=Oe.parse(L,N))}else L.error=L.error||"URN can not be parsed.";return L},serialize:function(g,N){var j=N.scheme||g.scheme||"urn",L=g.nid,Y=j+":"+(N.nid||L),Q=W[Y];Q&&(g=Q.serialize(g,N));var ue=g,ve=g.nss;return ue.path=(L||N.nid)+":"+ve,ue}},jf=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ta={scheme:"urn:uuid",parse:function(g,N){var j=g;return j.uuid=j.nss,j.nss=void 0,!N.tolerant&&(!j.uuid||!j.uuid.match(jf))&&(j.error=j.error||"UUID is not valid."),j},serialize:function(g,N){var j=g;return j.nss=(g.uuid||"").toLowerCase(),j}};W[ir.scheme]=ir,W[Wo.scheme]=Wo,W[dn.scheme]=dn,W[Xo.scheme]=Xo,W[Qo.scheme]=Qo,W[ea.scheme]=ea,W[ta.scheme]=ta,r.SCHEMES=W,r.pctEncChar=Z,r.pctDecChars=ie,r.parse=it,r.removeDotSegments=wt,r.serialize=Ye,r.resolveComponents=Tr,r.resolve=fn,r.normalize=nr,r.equal=ln,r.escapeComponent=qn,r.unescapeComponent=ct,Object.defineProperty(r,"__esModule",{value:!0})})})(Is,Is.exports);Object.defineProperty(so,"__esModule",{value:!0});const tf=Is.exports;tf.code='require("ajv/dist/runtime/uri").default';so.default=tf;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=gt;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=re;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Gn,i=Bn,s=Er,o=tt,c=re,u=ke,m=xn,a=fe,l=Np,E=so,h=(O,I)=>new RegExp(O,I);h.code="new RegExp";const d=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),p={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},f={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},$=200;function _(O){var I,F,R,y,S,U,W,Z,ie,ae,Ne,St,wr,on,an,it,cn,Nr,Ir,Or,un,wt,Ye,Tr,fn;const nr=O.strict,ln=(I=O.code)===null||I===void 0?void 0:I.optimize,qn=ln===!0||ln===void 0?1:ln||0,ct=(R=(F=O.code)===null||F===void 0?void 0:F.regExp)!==null&&R!==void 0?R:h,ir=(y=O.uriResolver)!==null&&y!==void 0?y:E.default;return{strictSchema:(U=(S=O.strictSchema)!==null&&S!==void 0?S:nr)!==null&&U!==void 0?U:!0,strictNumbers:(Z=(W=O.strictNumbers)!==null&&W!==void 0?W:nr)!==null&&Z!==void 0?Z:!0,strictTypes:(ae=(ie=O.strictTypes)!==null&&ie!==void 0?ie:nr)!==null&&ae!==void 0?ae:"log",strictTuples:(St=(Ne=O.strictTuples)!==null&&Ne!==void 0?Ne:nr)!==null&&St!==void 0?St:"log",strictRequired:(on=(wr=O.strictRequired)!==null&&wr!==void 0?wr:nr)!==null&&on!==void 0?on:!1,code:O.code?{...O.code,optimize:qn,regExp:ct}:{optimize:qn,regExp:ct},loopRequired:(an=O.loopRequired)!==null&&an!==void 0?an:$,loopEnum:(it=O.loopEnum)!==null&&it!==void 0?it:$,meta:(cn=O.meta)!==null&&cn!==void 0?cn:!0,messages:(Nr=O.messages)!==null&&Nr!==void 0?Nr:!0,inlineRefs:(Ir=O.inlineRefs)!==null&&Ir!==void 0?Ir:!0,schemaId:(Or=O.schemaId)!==null&&Or!==void 0?Or:"$id",addUsedSchema:(un=O.addUsedSchema)!==null&&un!==void 0?un:!0,validateSchema:(wt=O.validateSchema)!==null&&wt!==void 0?wt:!0,validateFormats:(Ye=O.validateFormats)!==null&&Ye!==void 0?Ye:!0,unicodeRegExp:(Tr=O.unicodeRegExp)!==null&&Tr!==void 0?Tr:!0,int32range:(fn=O.int32range)!==null&&fn!==void 0?fn:!0,uriResolver:ir}}class D{constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,..._(I)};const{es5:F,lines:R}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:v,es5:F,lines:R}),this.logger=A(I.logger);const y=I.validateFormats;I.validateFormats=!1,this.RULES=(0,s.getRules)(),z.call(this,p,I,"NOT SUPPORTED"),z.call(this,f,I,"DEPRECATED","warn"),this._metaOpts=x.call(this),I.formats&&V.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&P.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),C.call(this),I.validateFormats=y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:I,meta:F,schemaId:R}=this.opts;let y=l;R==="id"&&(y={...l},y.id=y.$id,delete y.$id),F&&I&&this.addMetaSchema(y,y[R],!1)}defaultMeta(){const{meta:I,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[F]||I:void 0}validate(I,F){let R;if(typeof I=="string"){if(R=this.getSchema(I),!R)throw new Error(`no schema with key or ref "${I}"`)}else R=this.compile(I);const y=R(F);return"$async"in R||(this.errors=R.errors),y}compile(I,F){const R=this._addSchema(I,F);return R.validate||this._compileSchemaEnv(R)}compileAsync(I,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return y.call(this,I,F);async function y(ae,Ne){await S.call(this,ae.$schema);const St=this._addSchema(ae,Ne);return St.validate||U.call(this,St)}async function S(ae){ae&&!this.getSchema(ae)&&await y.call(this,{$ref:ae},!0)}async function U(ae){try{return this._compileSchemaEnv(ae)}catch(Ne){if(!(Ne instanceof i.default))throw Ne;return W.call(this,Ne),await Z.call(this,Ne.missingSchema),U.call(this,ae)}}function W({missingSchema:ae,missingRef:Ne}){if(this.refs[ae])throw new Error(`AnySchema ${ae} is loaded but ${Ne} cannot be resolved`)}async function Z(ae){const Ne=await ie.call(this,ae);this.refs[ae]||await S.call(this,Ne.$schema),this.refs[ae]||this.addSchema(Ne,ae,F)}async function ie(ae){const Ne=this._loading[ae];if(Ne)return Ne;try{return await(this._loading[ae]=R(ae))}finally{delete this._loading[ae]}}}addSchema(I,F,R,y=this.opts.validateSchema){if(Array.isArray(I)){for(const U of I)this.addSchema(U,void 0,R,y);return this}let S;if(typeof I=="object"){const{schemaId:U}=this.opts;if(S=I[U],S!==void 0&&typeof S!="string")throw new Error(`schema ${U} must be string`)}return F=(0,u.normalizeId)(F||S),this._checkUnique(F),this.schemas[F]=this._addSchema(I,R,F,y,!0),this}addMetaSchema(I,F,R=this.opts.validateSchema){return this.addSchema(I,F,!0,R),this}validateSchema(I,F){if(typeof I=="boolean")return!0;let R;if(R=I.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const y=this.validate(R,I);if(!y&&F){const S="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(S);else throw new Error(S)}return y}getSchema(I){let F;for(;typeof(F=T.call(this,I))=="string";)I=F;if(F===void 0){const{schemaId:R}=this.opts,y=new o.SchemaEnv({schema:{},schemaId:R});if(F=o.resolveSchema.call(this,y,I),!F)return;this.refs[I]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=T.call(this,I);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{const F=I;this._cache.delete(F);let R=I[this.opts.schemaId];return R&&(R=(0,u.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(const F of I)this.addKeyword(F);return this}addKeyword(I,F){let R;if(typeof I=="string")R=I,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=R);else if(typeof I=="object"&&F===void 0){if(F=I,R=F.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,R,F),!F)return(0,a.eachItem)(R,S=>q.call(this,S)),this;B.call(this,F);const y={...F,type:(0,m.getJSONTypes)(F.type),schemaType:(0,m.getJSONTypes)(F.schemaType)};return(0,a.eachItem)(R,y.type.length===0?S=>q.call(this,S,y):S=>y.type.forEach(U=>q.call(this,S,y,U))),this}getKeyword(I){const F=this.RULES.all[I];return typeof F=="object"?F.definition:!!F}removeKeyword(I){const{RULES:F}=this;delete F.keywords[I],delete F.all[I];for(const R of F.rules){const y=R.rules.findIndex(S=>S.keyword===I);y>=0&&R.rules.splice(y,1)}return this}addFormat(I,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[I]=F,this}errorsText(I=this.errors,{separator:F=", ",dataVar:R="data"}={}){return!I||I.length===0?"No errors":I.map(y=>`${R}${y.instancePath} ${y.message}`).reduce((y,S)=>y+F+S)}$dataMetaSchema(I,F){const R=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(const y of F){const S=y.split("/").slice(1);let U=I;for(const W of S)U=U[W];for(const W in R){const Z=R[W];if(typeof Z!="object")continue;const{$data:ie}=Z.definition,ae=U[W];ie&&ae&&(U[W]=k(ae))}}return I}_removeAllSchemas(I,F){for(const R in I){const y=I[R];(!F||F.test(R))&&(typeof y=="string"?delete I[R]:y&&!y.meta&&(this._cache.delete(y.schema),delete I[R]))}}_addSchema(I,F,R,y=this.opts.validateSchema,S=this.opts.addUsedSchema){let U;const{schemaId:W}=this.opts;if(typeof I=="object")U=I[W];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof I!="boolean")throw new Error("schema must be object or boolean")}let Z=this._cache.get(I);if(Z!==void 0)return Z;R=(0,u.normalizeId)(U||R);const ie=u.getSchemaRefs.call(this,I,R);return Z=new o.SchemaEnv({schema:I,schemaId:W,meta:F,baseId:R,localRefs:ie}),this._cache.set(Z.schema,Z),S&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=Z),y&&this.validateSchema(I,!0),Z}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw new Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):o.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}_compileMetaSchema(I){const F=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,I)}finally{this.opts=F}}}e.default=D,D.ValidationError=n.default,D.MissingRefError=i.default;function z(O,I,F,R="error"){for(const y in O){const S=y;S in I&&this.logger[R](`${F}: option ${y}. ${O[S]}`)}}function T(O){return O=(0,u.normalizeId)(O),this.schemas[O]||this.refs[O]}function C(){const O=this.opts.schemas;if(!!O)if(Array.isArray(O))this.addSchema(O);else for(const I in O)this.addSchema(O[I],I)}function V(){for(const O in this.opts.formats){const I=this.opts.formats[O];I&&this.addFormat(O,I)}}function P(O){if(Array.isArray(O)){this.addVocabulary(O);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const I in O){const F=O[I];F.keyword||(F.keyword=I),this.addKeyword(F)}}function x(){const O={...this.opts};for(const I of d)delete O[I];return O}const M={log(){},warn(){},error(){}};function A(O){if(O===!1)return M;if(O===void 0)return console;if(O.log&&O.warn&&O.error)return O;throw new Error("logger must implement log, warn and error methods")}const H=/^[a-z_$][a-z0-9_$:-]*$/i;function G(O,I){const{RULES:F}=this;if((0,a.eachItem)(O,R=>{if(F.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!H.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function q(O,I,F){var R;const y=I==null?void 0:I.post;if(F&&y)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:S}=this;let U=y?S.post:S.rules.find(({type:Z})=>Z===F);if(U||(U={type:F,rules:[]},S.rules.push(U)),S.keywords[O]=!0,!I)return;const W={keyword:O,definition:{...I,type:(0,m.getJSONTypes)(I.type),schemaType:(0,m.getJSONTypes)(I.schemaType)}};I.before?K.call(this,U,W,I.before):U.rules.push(W),S.all[O]=W,(R=I.implements)===null||R===void 0||R.forEach(Z=>this.addKeyword(Z))}function K(O,I,F){const R=O.rules.findIndex(y=>y.keyword===F);R>=0?O.rules.splice(R,0,I):(O.rules.push(I),this.logger.warn(`rule ${F} is not defined`))}function B(O){let{metaSchema:I}=O;I!==void 0&&(O.$data&&this.opts.$data&&(I=k(I)),O.validateSchema=this.compile(I,!0))}const b={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function k(O){return{anyOf:[O,b]}}})(Pu);var oo={},ao={},co={};Object.defineProperty(co,"__esModule",{value:!0});const Ip={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};co.default=Ip;var gr={};Object.defineProperty(gr,"__esModule",{value:!0});gr.callRef=gr.getValidate=void 0;const Op=Bn,ba=ne,et=re,br=Lt,La=tt,ti=fe,Tp={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:o,opts:c,self:u}=n,{root:m}=s;if((r==="#"||r==="#/")&&i===m.baseId)return l();const a=La.resolveRef.call(u,m,i,r);if(a===void 0)throw new Op.default(n.opts.uriResolver,i,r);if(a instanceof La.SchemaEnv)return E(a);return h(a);function l(){if(s===m)return di(e,o,s,s.$async);const d=t.scopeValue("root",{ref:m});return di(e,(0,et._)`${d}.validate`,m,m.$async)}function E(d){const v=rf(e,d);di(e,v,d,d.$async)}function h(d){const v=t.scopeValue("schema",c.code.source===!0?{ref:d,code:(0,et.stringify)(d)}:{ref:d}),p=t.name("valid"),f=e.subschema({schema:d,dataTypes:[],schemaPath:et.nil,topSchemaRef:v,errSchemaPath:r},p);e.mergeEvaluated(f),e.ok(p)}}};function rf(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,et._)`${r.scopeValue("wrapper",{ref:t})}.validate`}gr.getValidate=rf;function di(e,t,r,n){const{gen:i,it:s}=e,{allErrors:o,schemaEnv:c,opts:u}=s,m=u.passContext?br.default.this:et.nil;n?a():l();function a(){if(!c.$async)throw new Error("async schema referenced by sync schema");const d=i.let("valid");i.try(()=>{i.code((0,et._)`await ${(0,ba.callValidateCode)(e,t,m)}`),h(t),o||i.assign(d,!0)},v=>{i.if((0,et._)`!(${v} instanceof ${s.ValidationError})`,()=>i.throw(v)),E(v),o||i.assign(d,!1)}),e.ok(d)}function l(){e.result((0,ba.callValidateCode)(e,t,m),()=>h(t),()=>E(t))}function E(d){const v=(0,et._)`${d}.errors`;i.assign(br.default.vErrors,(0,et._)`${br.default.vErrors} === null ? ${v} : ${br.default.vErrors}.concat(${v})`),i.assign(br.default.errors,(0,et._)`${br.default.vErrors}.length`)}function h(d){var v;if(!s.opts.unevaluated)return;const p=(v=r==null?void 0:r.validate)===null||v===void 0?void 0:v.evaluated;if(s.props!==!0)if(p&&!p.dynamicProps)p.props!==void 0&&(s.props=ti.mergeEvaluated.props(i,p.props,s.props));else{const f=i.var("props",(0,et._)`${d}.evaluated.props`);s.props=ti.mergeEvaluated.props(i,f,s.props,et.Name)}if(s.items!==!0)if(p&&!p.dynamicItems)p.items!==void 0&&(s.items=ti.mergeEvaluated.items(i,p.items,s.items));else{const f=i.var("items",(0,et._)`${d}.evaluated.items`);s.items=ti.mergeEvaluated.items(i,f,s.items,et.Name)}}}gr.callRef=di;gr.default=Tp;Object.defineProperty(ao,"__esModule",{value:!0});const Dp=co,Cp=gr,Rp=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Dp.default,Cp.default];ao.default=Rp;var uo={},fo={};Object.defineProperty(fo,"__esModule",{value:!0});const Si=re,Bt=Si.operators,wi={maximum:{okStr:"<=",ok:Bt.LTE,fail:Bt.GT},minimum:{okStr:">=",ok:Bt.GTE,fail:Bt.LT},exclusiveMaximum:{okStr:"<",ok:Bt.LT,fail:Bt.GTE},exclusiveMinimum:{okStr:">",ok:Bt.GT,fail:Bt.LTE}},Pp={message:({keyword:e,schemaCode:t})=>(0,Si.str)`must be ${wi[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Si._)`{comparison: ${wi[e].okStr}, limit: ${t}}`},Ap={keyword:Object.keys(wi),type:"number",schemaType:"number",$data:!0,error:Pp,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Si._)`${r} ${wi[t].fail} ${n} || isNaN(${r})`)}};fo.default=Ap;var lo={};Object.defineProperty(lo,"__esModule",{value:!0});const Nn=re,bp={message:({schemaCode:e})=>(0,Nn.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Nn._)`{multipleOf: ${e}}`},Lp={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:bp,code(e){const{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,o=t.let("res"),c=s?(0,Nn._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,Nn._)`${o} !== parseInt(${o})`;e.fail$data((0,Nn._)`(${n} === 0 || (${o} = ${r}/${n}, ${c}))`)}};lo.default=Lp;var ho={},mo={};Object.defineProperty(mo,"__esModule",{value:!0});function nf(e){const t=e.length;let r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}mo.default=nf;nf.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(ho,"__esModule",{value:!0});const lr=re,Fp=fe,jp=mo,Mp={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,lr.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,lr._)`{limit: ${e}}`},kp={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Mp,code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?lr.operators.GT:lr.operators.LT,o=i.opts.unicode===!1?(0,lr._)`${r}.length`:(0,lr._)`${(0,Fp.useFunc)(e.gen,jp.default)}(${r})`;e.fail$data((0,lr._)`${o} ${s} ${n}`)}};ho.default=kp;var po={};Object.defineProperty(po,"__esModule",{value:!0});const Up=ne,Ni=re,Vp={message:({schemaCode:e})=>(0,Ni.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Ni._)`{pattern: ${e}}`},zp={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Vp,code(e){const{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,o=s.opts.unicodeRegExp?"u":"",c=r?(0,Ni._)`(new RegExp(${i}, ${o}))`:(0,Up.usePattern)(e,n);e.fail$data((0,Ni._)`!${c}.test(${t})`)}};po.default=zp;var yo={};Object.defineProperty(yo,"__esModule",{value:!0});const In=re,xp={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,In.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,In._)`{limit: ${e}}`},Gp={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:xp,code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?In.operators.GT:In.operators.LT;e.fail$data((0,In._)`Object.keys(${r}).length ${i} ${n}`)}};yo.default=Gp;var vo={};Object.defineProperty(vo,"__esModule",{value:!0});const yn=ne,On=re,Bp=fe,Hp={message:({params:{missingProperty:e}})=>(0,On.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,On._)`{missingProperty: ${e}}`},qp={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Hp,code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e,{opts:c}=o;if(!s&&r.length===0)return;const u=r.length>=c.loopRequired;if(o.allErrors?m():a(),c.strictRequired){const h=e.parentSchema.properties,{definedProperties:d}=e.it;for(const v of r)if((h==null?void 0:h[v])===void 0&&!d.has(v)){const p=o.schemaEnv.baseId+o.errSchemaPath,f=`required property "${v}" is not defined at "${p}" (strictRequired)`;(0,Bp.checkStrictMode)(o,f,o.opts.strictRequired)}}function m(){if(u||s)e.block$data(On.nil,l);else for(const h of r)(0,yn.checkReportMissingProp)(e,h)}function a(){const h=t.let("missing");if(u||s){const d=t.let("valid",!0);e.block$data(d,()=>E(h,d)),e.ok(d)}else t.if((0,yn.checkMissingProp)(e,r,h)),(0,yn.reportMissingProp)(e,h),t.else()}function l(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,yn.noPropertyInData)(t,i,h,c.ownProperties),()=>e.error())})}function E(h,d){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(d,(0,yn.propertyInData)(t,i,h,c.ownProperties)),t.if((0,On.not)(d),()=>{e.error(),t.break()})},On.nil)}}};vo.default=qp;var Eo={};Object.defineProperty(Eo,"__esModule",{value:!0});const Tn=re,Kp={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Tn.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Tn._)`{limit: ${e}}`},Wp={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Kp,code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Tn.operators.GT:Tn.operators.LT;e.fail$data((0,Tn._)`${r}.length ${i} ${n}`)}};Eo.default=Wp;var go={},Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const sf=Uu;sf.code='require("ajv/dist/runtime/equal").default';Hn.default=sf;Object.defineProperty(go,"__esModule",{value:!0});const ss=xn,je=re,Zp=fe,Xp=Hn,Jp={message:({params:{i:e,j:t}})=>(0,je.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,je._)`{i: ${e}, j: ${t}}`},Yp={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Jp,code(e){const{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:c}=e;if(!n&&!i)return;const u=t.let("valid"),m=s.items?(0,ss.getSchemaTypes)(s.items):[];e.block$data(u,a,(0,je._)`${o} === false`),e.ok(u);function a(){const d=t.let("i",(0,je._)`${r}.length`),v=t.let("j");e.setParams({i:d,j:v}),t.assign(u,!0),t.if((0,je._)`${d} > 1`,()=>(l()?E:h)(d,v))}function l(){return m.length>0&&!m.some(d=>d==="object"||d==="array")}function E(d,v){const p=t.name("item"),f=(0,ss.checkDataTypes)(m,p,c.opts.strictNumbers,ss.DataType.Wrong),$=t.const("indices",(0,je._)`{}`);t.for((0,je._)`;${d}--;`,()=>{t.let(p,(0,je._)`${r}[${d}]`),t.if(f,(0,je._)`continue`),m.length>1&&t.if((0,je._)`typeof ${p} == "string"`,(0,je._)`${p} += "_"`),t.if((0,je._)`typeof ${$}[${p}] == "number"`,()=>{t.assign(v,(0,je._)`${$}[${p}]`),e.error(),t.assign(u,!1).break()}).code((0,je._)`${$}[${p}] = ${d}`)})}function h(d,v){const p=(0,Zp.useFunc)(t,Xp.default),f=t.name("outer");t.label(f).for((0,je._)`;${d}--;`,()=>t.for((0,je._)`${v} = ${d}; ${v}--;`,()=>t.if((0,je._)`${p}(${r}[${d}], ${r}[${v}])`,()=>{e.error(),t.assign(u,!1).break(f)})))}}};go.default=Yp;var $o={};Object.defineProperty($o,"__esModule",{value:!0});const Os=re,Qp=fe,ey=Hn,ty={message:"must be equal to constant",params:({schemaCode:e})=>(0,Os._)`{allowedValue: ${e}}`},ry={keyword:"const",$data:!0,error:ty,code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,Os._)`!${(0,Qp.useFunc)(t,ey.default)}(${r}, ${i})`):e.fail((0,Os._)`${s} !== ${r}`)}};$o.default=ry;var _o={};Object.defineProperty(_o,"__esModule",{value:!0});const gn=re,ny=fe,iy=Hn,sy={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,gn._)`{allowedValues: ${e}}`},oy={keyword:"enum",schemaType:"array",$data:!0,error:sy,code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");const c=i.length>=o.opts.loopEnum;let u;const m=()=>u??(u=(0,ny.useFunc)(t,iy.default));let a;if(c||n)a=t.let("valid"),e.block$data(a,l);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const h=t.const("vSchema",s);a=(0,gn.or)(...i.map((d,v)=>E(h,v)))}e.pass(a);function l(){t.assign(a,!1),t.forOf("v",s,h=>t.if((0,gn._)`${m()}(${r}, ${h})`,()=>t.assign(a,!0).break()))}function E(h,d){const v=i[d];return typeof v=="object"&&v!==null?(0,gn._)`${m()}(${r}, ${h}[${d}])`:(0,gn._)`${r} === ${v}`}}};_o.default=oy;Object.defineProperty(uo,"__esModule",{value:!0});const ay=fo,cy=lo,uy=ho,fy=po,ly=yo,dy=vo,hy=Eo,my=go,py=$o,yy=_o,vy=[ay.default,cy.default,uy.default,fy.default,ly.default,dy.default,hy.default,my.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},py.default,yy.default];uo.default=vy;var So={},tn={};Object.defineProperty(tn,"__esModule",{value:!0});tn.validateAdditionalItems=void 0;const dr=re,Ts=fe,Ey={message:({params:{len:e}})=>(0,dr.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,dr._)`{limit: ${e}}`},gy={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ey,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Ts.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}of(e,n)}};function of(e,t){const{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=!0;const c=r.const("len",(0,dr._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,dr._)`${c} <= ${t.length}`);else if(typeof n=="object"&&!(0,Ts.alwaysValidSchema)(o,n)){const m=r.var("valid",(0,dr._)`${c} <= ${t.length}`);r.if((0,dr.not)(m),()=>u(m)),e.ok(m)}function u(m){r.forRange("i",t.length,c,a=>{e.subschema({keyword:s,dataProp:a,dataPropType:Ts.Type.Num},m),o.allErrors||r.if((0,dr.not)(m),()=>r.break())})}}tn.validateAdditionalItems=of;tn.default=gy;var wo={},rn={};Object.defineProperty(rn,"__esModule",{value:!0});rn.validateTuple=void 0;const Fa=re,hi=fe,$y=ne,_y={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return af(e,"additionalItems",t);r.items=!0,!(0,hi.alwaysValidSchema)(r,t)&&e.ok((0,$y.validateArray)(e))}};function af(e,t,r=e.schema){const{gen:n,parentSchema:i,data:s,keyword:o,it:c}=e;a(i),c.opts.unevaluated&&r.length&&c.items!==!0&&(c.items=hi.mergeEvaluated.items(n,r.length,c.items));const u=n.name("valid"),m=n.const("len",(0,Fa._)`${s}.length`);r.forEach((l,E)=>{(0,hi.alwaysValidSchema)(c,l)||(n.if((0,Fa._)`${m} > ${E}`,()=>e.subschema({keyword:o,schemaProp:E,dataProp:E},u)),e.ok(u))});function a(l){const{opts:E,errSchemaPath:h}=c,d=r.length,v=d===l.minItems&&(d===l.maxItems||l[t]===!1);if(E.strictTuples&&!v){const p=`"${o}" is ${d}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,hi.checkStrictMode)(c,p,E.strictTuples)}}}rn.validateTuple=af;rn.default=_y;Object.defineProperty(wo,"__esModule",{value:!0});const Sy=rn,wy={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Sy.validateTuple)(e,"items")};wo.default=wy;var No={};Object.defineProperty(No,"__esModule",{value:!0});const ja=re,Ny=fe,Iy=ne,Oy=tn,Ty={message:({params:{len:e}})=>(0,ja.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ja._)`{limit: ${e}}`},Dy={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Ty,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,Ny.alwaysValidSchema)(n,t)&&(i?(0,Oy.validateAdditionalItems)(e,i):e.ok((0,Iy.validateArray)(e)))}};No.default=Dy;var Io={};Object.defineProperty(Io,"__esModule",{value:!0});const ft=re,ri=fe,Cy={message:({params:{min:e,max:t}})=>t===void 0?(0,ft.str)`must contain at least ${e} valid item(s)`:(0,ft.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,ft._)`{minContains: ${e}}`:(0,ft._)`{minContains: ${e}, maxContains: ${t}}`},Ry={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Cy,code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;let o,c;const{minContains:u,maxContains:m}=n;s.opts.next?(o=u===void 0?1:u,c=m):o=1;const a=t.const("len",(0,ft._)`${i}.length`);if(e.setParams({min:o,max:c}),c===void 0&&o===0){(0,ri.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&o>c){(0,ri.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,ri.alwaysValidSchema)(s,r)){let v=(0,ft._)`${a} >= ${o}`;c!==void 0&&(v=(0,ft._)`${v} && ${a} <= ${c}`),e.pass(v);return}s.items=!0;const l=t.name("valid");c===void 0&&o===1?h(l,()=>t.if(l,()=>t.break())):o===0?(t.let(l,!0),c!==void 0&&t.if((0,ft._)`${i}.length > 0`,E)):(t.let(l,!1),E()),e.result(l,()=>e.reset());function E(){const v=t.name("_valid"),p=t.let("count",0);h(v,()=>t.if(v,()=>d(p)))}function h(v,p){t.forRange("i",0,a,f=>{e.subschema({keyword:"contains",dataProp:f,dataPropType:ri.Type.Num,compositeRule:!0},v),p()})}function d(v){t.code((0,ft._)`${v}++`),c===void 0?t.if((0,ft._)`${v} >= ${o}`,()=>t.assign(l,!0).break()):(t.if((0,ft._)`${v} > ${c}`,()=>t.assign(l,!1).break()),o===1?t.assign(l,!0):t.if((0,ft._)`${v} >= ${o}`,()=>t.assign(l,!0)))}}};Io.default=Ry;var cf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=re,r=fe,n=ne;e.error={message:({params:{property:u,depsCount:m,deps:a}})=>{const l=m===1?"property":"properties";return(0,t.str)`must have ${l} ${a} when property ${u} is present`},params:({params:{property:u,depsCount:m,deps:a,missingProperty:l}})=>(0,t._)`{property: ${u},
11
+ || ${P} === "boolean" || ${C} === null`).assign(x,(0,i._)`[${C}]`)}}}function h({gen:_,parentData:D,parentDataProperty:z},T){_.if((0,i._)`${D} !== undefined`,()=>_.assign((0,i._)`${D}[${z}]`,T))}function d(_,D,z,T=o.Correct){const C=T===o.Correct?i.operators.EQ:i.operators.NEQ;let V;switch(_){case"null":return(0,i._)`${D} ${C} null`;case"array":V=(0,i._)`Array.isArray(${D})`;break;case"object":V=(0,i._)`${D} && typeof ${D} == "object" && !Array.isArray(${D})`;break;case"integer":V=P((0,i._)`!(${D} % 1) && !isNaN(${D})`);break;case"number":V=P();break;default:return(0,i._)`typeof ${D} ${C} ${_}`}return T===o.Correct?V:(0,i.not)(V);function P(x=i.nil){return(0,i.and)((0,i._)`typeof ${D} == "number"`,x,z?(0,i._)`isFinite(${D})`:i.nil)}}e.checkDataType=d;function y(_,D,z,T){if(_.length===1)return d(_[0],D,z,T);let C;const V=(0,s.toHash)(_);if(V.array&&V.object){const P=(0,i._)`typeof ${D} != "object"`;C=V.null?P:(0,i._)`!${D} || ${P}`,delete V.null,delete V.array,delete V.object}else C=i.nil;V.number&&delete V.integer;for(const P in V)C=(0,i.and)(C,d(P,D,z,T));return C}e.checkDataTypes=y;const p={message:({schema:_})=>`must be ${_}`,params:({schema:_,schemaValue:D})=>typeof _=="string"?(0,i._)`{type: ${_}}`:(0,i._)`{type: ${D}}`};function f(_){const D=$(_);(0,n.reportError)(D,p)}e.reportTypeError=f;function $(_){const{gen:D,data:z,schema:T}=_,C=(0,s.schemaRefOrVal)(_,T,"type");return{gen:D,keyword:"type",data:z,schema:T.type,schemaCode:C,schemaValue:C,parentSchema:T,params:{},it:_}}})(Bn);var Zi={};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.assignDefaults=void 0;const br=re,ym=fe;function vm(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const i in r)Oa(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,s)=>Oa(e,s,i.default))}Zi.assignDefaults=vm;function Oa(e,t,r){const{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;const c=(0,br._)`${s}${(0,br.getProperty)(t)}`;if(i){(0,ym.checkStrictMode)(e,`default is ignored for: ${c}`);return}let u=(0,br._)`${c} === undefined`;o.useDefaults==="empty"&&(u=(0,br._)`${u} || ${c} === null || ${c} === ""`),n.if(u,(0,br._)`${c} = ${(0,br.stringify)(r)}`)}var At={},ne={};Object.defineProperty(ne,"__esModule",{value:!0});ne.validateUnion=ne.validateArray=ne.usePattern=ne.callValidateCode=ne.schemaProperties=ne.allSchemaProperties=ne.noPropertyInData=ne.propertyInData=ne.isOwnProperty=ne.hasPropFunc=ne.reportMissingProp=ne.checkMissingProp=ne.checkReportMissingProp=void 0;const Ee=re,to=fe,Bt=Lt,Em=fe;function gm(e,t){const{gen:r,data:n,it:i}=e;r.if(no(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ee._)`${t}`},!0),e.error()})}ne.checkReportMissingProp=gm;function $m({gen:e,data:t,it:{opts:r}},n,i){return(0,Ee.or)(...n.map(s=>(0,Ee.and)(no(e,t,s,r.ownProperties),(0,Ee._)`${i} = ${s}`)))}ne.checkMissingProp=$m;function _m(e,t){e.setParams({missingProperty:t},!0),e.error()}ne.reportMissingProp=_m;function Fu(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ee._)`Object.prototype.hasOwnProperty`})}ne.hasPropFunc=Fu;function ro(e,t,r){return(0,Ee._)`${Fu(e)}.call(${t}, ${r})`}ne.isOwnProperty=ro;function Sm(e,t,r,n){const i=(0,Ee._)`${t}${(0,Ee.getProperty)(r)} !== undefined`;return n?(0,Ee._)`${i} && ${ro(e,t,r)}`:i}ne.propertyInData=Sm;function no(e,t,r,n){const i=(0,Ee._)`${t}${(0,Ee.getProperty)(r)} === undefined`;return n?(0,Ee.or)(i,(0,Ee.not)(ro(e,t,r))):i}ne.noPropertyInData=no;function ju(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ne.allSchemaProperties=ju;function wm(e,t){return ju(t).filter(r=>!(0,to.alwaysValidSchema)(e,t[r]))}ne.schemaProperties=wm;function Nm({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},c,u,m){const a=m?(0,Ee._)`${e}, ${t}, ${n}${i}`:t,l=[[Bt.default.instancePath,(0,Ee.strConcat)(Bt.default.instancePath,s)],[Bt.default.parentData,o.parentData],[Bt.default.parentDataProperty,o.parentDataProperty],[Bt.default.rootData,Bt.default.rootData]];o.opts.dynamicRef&&l.push([Bt.default.dynamicAnchors,Bt.default.dynamicAnchors]);const E=(0,Ee._)`${a}, ${r.object(...l)}`;return u!==Ee.nil?(0,Ee._)`${c}.call(${u}, ${E})`:(0,Ee._)`${c}(${E})`}ne.callValidateCode=Nm;const Im=(0,Ee._)`new RegExp`;function Om({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Ee._)`${i.code==="new RegExp"?Im:(0,Em.useFunc)(e,i)}(${r}, ${n})`})}ne.usePattern=Om;function Tm(e){const{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){const c=t.let("valid",!0);return o(()=>t.assign(c,!1)),c}return t.var(s,!0),o(()=>t.break()),s;function o(c){const u=t.const("len",(0,Ee._)`${r}.length`);t.forRange("i",0,u,m=>{e.subschema({keyword:n,dataProp:m,dataPropType:to.Type.Num},s),t.if((0,Ee.not)(s),c)})}}ne.validateArray=Tm;function Dm(e){const{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,to.alwaysValidSchema)(i,u))&&!i.opts.unevaluated)return;const o=t.let("valid",!1),c=t.name("_valid");t.block(()=>r.forEach((u,m)=>{const a=e.subschema({keyword:n,schemaProp:m,compositeRule:!0},c);t.assign(o,(0,Ee._)`${o} || ${c}`),e.mergeValidEvaluated(a,c)||t.if((0,Ee.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}ne.validateUnion=Dm;Object.defineProperty(At,"__esModule",{value:!0});At.validateKeywordUsage=At.validSchemaType=At.funcKeywordCode=At.macroKeywordCode=void 0;const qe=re,fr=Lt,Cm=ne,Rm=Gn;function Pm(e,t){const{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e,c=t.macro.call(o.self,i,s,o),u=Mu(r,n,c);o.opts.validateSchema!==!1&&o.self.validateSchema(c,!0);const m=r.name("valid");e.subschema({schema:c,schemaPath:qe.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},m),e.pass(m,()=>e.error(!0))}At.macroKeywordCode=Pm;function Am(e,t){var r;const{gen:n,keyword:i,schema:s,parentSchema:o,$data:c,it:u}=e;Lm(u,t);const m=!c&&t.compile?t.compile.call(u.self,s,o,u):t.validate,a=Mu(n,i,m),l=n.let("valid");e.block$data(l,E),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function E(){if(t.errors===!1)y(),t.modifying&&Ta(e),p(()=>e.error());else{const f=t.async?h():d();t.modifying&&Ta(e),p(()=>bm(e,f))}}function h(){const f=n.let("ruleErrs",null);return n.try(()=>y((0,qe._)`await `),$=>n.assign(l,!1).if((0,qe._)`${$} instanceof ${u.ValidationError}`,()=>n.assign(f,(0,qe._)`${$}.errors`),()=>n.throw($))),f}function d(){const f=(0,qe._)`${a}.errors`;return n.assign(f,null),y(qe.nil),f}function y(f=t.async?(0,qe._)`await `:qe.nil){const $=u.opts.passContext?fr.default.this:fr.default.self,_=!("compile"in t&&!c||t.schema===!1);n.assign(l,(0,qe._)`${f}${(0,Cm.callValidateCode)(e,a,$,_)}`,t.modifying)}function p(f){var $;n.if((0,qe.not)(($=t.valid)!==null&&$!==void 0?$:l),f)}}At.funcKeywordCode=Am;function Ta(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,qe._)`${n.parentData}[${n.parentDataProperty}]`))}function bm(e,t){const{gen:r}=e;r.if((0,qe._)`Array.isArray(${t})`,()=>{r.assign(fr.default.vErrors,(0,qe._)`${fr.default.vErrors} === null ? ${t} : ${fr.default.vErrors}.concat(${t})`).assign(fr.default.errors,(0,qe._)`${fr.default.vErrors}.length`),(0,Rm.extendErrors)(e)},()=>e.error())}function Lm({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Mu(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,qe.stringify)(r)})}function Fm(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}At.validSchemaType=Fm;function jm({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const o=i.dependencies;if(o!=null&&o.some(c=>!Object.prototype.hasOwnProperty.call(e,c)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[s])){const u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}At.validateKeywordUsage=jm;var rr={};Object.defineProperty(rr,"__esModule",{value:!0});rr.extendSubschemaMode=rr.extendSubschemaData=rr.getSubschema=void 0;const Rt=re,ku=fe;function Mm(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const c=e.schema[t];return r===void 0?{schema:c,schemaPath:(0,Rt._)`${e.schemaPath}${(0,Rt.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:c[r],schemaPath:(0,Rt._)`${e.schemaPath}${(0,Rt.getProperty)(t)}${(0,Rt.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,ku.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}rr.getSubschema=Mm;function km(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(r!==void 0){const{errorPath:m,dataPathArr:a,opts:l}=t,E=c.let("data",(0,Rt._)`${t.data}${(0,Rt.getProperty)(r)}`,!0);u(E),e.errorPath=(0,Rt.str)`${m}${(0,ku.getErrorPath)(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=(0,Rt._)`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}if(i!==void 0){const m=i instanceof Rt.Name?i:c.let("data",i,!0);u(m),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function u(m){e.data=m,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,m]}}rr.extendSubschemaData=km;function Um(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}rr.extendSubschemaMode=Um;var ke={},Uu=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},Ls={},Vm={get exports(){return Ls},set exports(e){Ls=e}},tr=Vm.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};hi(t,n,i,e,"",e)};tr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};tr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};tr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};tr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function hi(e,t,r,n,i,s,o,c,u,m){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,o,c,u,m);for(var a in n){var l=n[a];if(Array.isArray(l)){if(a in tr.arrayKeywords)for(var E=0;E<l.length;E++)hi(e,t,r,l[E],i+"/"+a+"/"+E,s,i,a,n,E)}else if(a in tr.propsKeywords){if(l&&typeof l=="object")for(var h in l)hi(e,t,r,l[h],i+"/"+a+"/"+zm(h),s,i,a,n,h)}else(a in tr.keywords||e.allKeys&&!(a in tr.skipKeywords))&&hi(e,t,r,l,i+"/"+a,s,i,a,n)}r(n,i,s,o,c,u,m)}}function zm(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}Object.defineProperty(ke,"__esModule",{value:!0});ke.getSchemaRefs=ke.resolveUrl=ke.normalizeId=ke._getFullPath=ke.getFullPath=ke.inlineRef=void 0;const xm=fe,Gm=Uu,Bm=Ls,Hm=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function qm(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Fs(e):t?Vu(e)<=t:!1}ke.inlineRef=qm;const Km=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Fs(e){for(const t in e){if(Km.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Fs)||typeof r=="object"&&Fs(r))return!0}return!1}function Vu(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!Hm.has(r)&&(typeof e[r]=="object"&&(0,xm.eachItem)(e[r],n=>t+=Vu(n)),t===1/0))return 1/0}return t}function zu(e,t="",r){r!==!1&&(t=xr(t));const n=e.parse(t);return xu(e,n)}ke.getFullPath=zu;function xu(e,t){return e.serialize(t).split("#")[0]+"#"}ke._getFullPath=xu;const Zm=/#\/?$/;function xr(e){return e?e.replace(Zm,""):""}ke.normalizeId=xr;function Wm(e,t,r){return r=xr(r),e.resolve(t,r)}ke.resolveUrl=Wm;const Xm=/^[a-z_][-a-z0-9._]*$/i;function Jm(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,i=xr(e[r]||t),s={"":i},o=zu(n,i,!1),c={},u=new Set;return Bm(e,{allKeys:!0},(l,E,h,d)=>{if(d===void 0)return;const y=o+E;let p=s[d];typeof l[r]=="string"&&(p=f.call(this,l[r])),$.call(this,l.$anchor),$.call(this,l.$dynamicAnchor),s[E]=p;function f(_){const D=this.opts.uriResolver.resolve;if(_=xr(p?D(p,_):_),u.has(_))throw a(_);u.add(_);let z=this.refs[_];return typeof z=="string"&&(z=this.refs[z]),typeof z=="object"?m(l,z.schema,_):_!==xr(y)&&(_[0]==="#"?(m(l,c[_],_),c[_]=l):this.refs[_]=y),_}function $(_){if(typeof _=="string"){if(!Xm.test(_))throw new Error(`invalid anchor "${_}"`);f.call(this,`#${_}`)}}}),c;function m(l,E,h){if(E!==void 0&&!Gm(l,E))throw a(h)}function a(l){return new Error(`reference "${l}" resolves to more than one schema`)}}ke.getSchemaRefs=Jm;Object.defineProperty(gt,"__esModule",{value:!0});gt.getData=gt.KeywordCxt=gt.validateFunctionCode=void 0;const Gu=Yr,Da=Bn,io=Ut,Ri=Bn,Ym=Zi,wn=At,hs=rr,J=re,ee=Lt,Qm=ke,Vt=fe,pn=Gn;function ep(e){if(qu(e)&&(Ku(e),Hu(e))){np(e);return}Bu(e,()=>(0,Gu.topBoolOrEmptySchema)(e))}gt.validateFunctionCode=ep;function Bu({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,(0,J._)`${ee.default.data}, ${ee.default.valCxt}`,n.$async,()=>{e.code((0,J._)`"use strict"; ${Ca(r,i)}`),rp(e,i),e.code(s)}):e.func(t,(0,J._)`${ee.default.data}, ${tp(i)}`,n.$async,()=>e.code(Ca(r,i)).code(s))}function tp(e){return(0,J._)`{${ee.default.instancePath}="", ${ee.default.parentData}, ${ee.default.parentDataProperty}, ${ee.default.rootData}=${ee.default.data}${e.dynamicRef?(0,J._)`, ${ee.default.dynamicAnchors}={}`:J.nil}}={}`}function rp(e,t){e.if(ee.default.valCxt,()=>{e.var(ee.default.instancePath,(0,J._)`${ee.default.valCxt}.${ee.default.instancePath}`),e.var(ee.default.parentData,(0,J._)`${ee.default.valCxt}.${ee.default.parentData}`),e.var(ee.default.parentDataProperty,(0,J._)`${ee.default.valCxt}.${ee.default.parentDataProperty}`),e.var(ee.default.rootData,(0,J._)`${ee.default.valCxt}.${ee.default.rootData}`),t.dynamicRef&&e.var(ee.default.dynamicAnchors,(0,J._)`${ee.default.valCxt}.${ee.default.dynamicAnchors}`)},()=>{e.var(ee.default.instancePath,(0,J._)`""`),e.var(ee.default.parentData,(0,J._)`undefined`),e.var(ee.default.parentDataProperty,(0,J._)`undefined`),e.var(ee.default.rootData,ee.default.data),t.dynamicRef&&e.var(ee.default.dynamicAnchors,(0,J._)`{}`)})}function np(e){const{schema:t,opts:r,gen:n}=e;Bu(e,()=>{r.$comment&&t.$comment&&Wu(e),cp(e),n.let(ee.default.vErrors,null),n.let(ee.default.errors,0),r.unevaluated&&ip(e),Zu(e),lp(e)})}function ip(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,J._)`${r}.evaluated`),t.if((0,J._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,J._)`${e.evaluated}.props`,(0,J._)`undefined`)),t.if((0,J._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,J._)`${e.evaluated}.items`,(0,J._)`undefined`))}function Ca(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,J._)`/*# sourceURL=${r} */`:J.nil}function sp(e,t){if(qu(e)&&(Ku(e),Hu(e))){op(e,t);return}(0,Gu.boolOrEmptySchema)(e,t)}function Hu({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function qu(e){return typeof e.schema!="boolean"}function op(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Wu(e),up(e),fp(e);const s=n.const("_errs",ee.default.errors);Zu(e,s),n.var(t,(0,J._)`${s} === ${ee.default.errors}`)}function Ku(e){(0,Vt.checkUnknownRules)(e),ap(e)}function Zu(e,t){if(e.opts.jtd)return Ra(e,[],!1,t);const r=(0,Da.getSchemaTypes)(e.schema),n=(0,Da.coerceAndCheckDataType)(e,r);Ra(e,r,!n,t)}function ap(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Vt.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function cp(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Vt.checkStrictMode)(e,"default is ignored in the schema root")}function up(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Qm.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function fp(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Wu({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const s=r.$comment;if(i.$comment===!0)e.code((0,J._)`${ee.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){const o=(0,J.str)`${n}/$comment`,c=e.scopeValue("root",{ref:t.root});e.code((0,J._)`${ee.default.self}.opts.$comment(${s}, ${o}, ${c}.schema)`)}}function lp(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if((0,J._)`${ee.default.errors} === 0`,()=>t.return(ee.default.data),()=>t.throw((0,J._)`new ${i}(${ee.default.vErrors})`)):(t.assign((0,J._)`${n}.errors`,ee.default.vErrors),s.unevaluated&&dp(e),t.return((0,J._)`${ee.default.errors} === 0`))}function dp({gen:e,evaluated:t,props:r,items:n}){r instanceof J.Name&&e.assign((0,J._)`${t}.props`,r),n instanceof J.Name&&e.assign((0,J._)`${t}.items`,n)}function Ra(e,t,r,n){const{gen:i,schema:s,data:o,allErrors:c,opts:u,self:m}=e,{RULES:a}=m;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,Vt.schemaHasRulesButRef)(s,a))){i.block(()=>Yu(e,"$ref",a.all.$ref.definition));return}u.jtd||hp(e,t),i.block(()=>{for(const E of a.rules)l(E);l(a.post)});function l(E){(0,io.shouldUseGroup)(s,E)&&(E.type?(i.if((0,Ri.checkDataType)(E.type,o,u.strictNumbers)),Pa(e,E),t.length===1&&t[0]===E.type&&r&&(i.else(),(0,Ri.reportTypeError)(e)),i.endIf()):Pa(e,E),c||i.if((0,J._)`${ee.default.errors} === ${n||0}`))}}function Pa(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,Ym.assignDefaults)(e,t.type),r.block(()=>{for(const s of t.rules)(0,io.shouldUseRule)(n,s)&&Yu(e,s.keyword,s.definition,t.type)})}function hp(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(mp(e,t),e.opts.allowUnionTypes||pp(e,t),yp(e,e.dataTypes))}function mp(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Xu(e.dataTypes,r)||so(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Ep(e,t)}}function pp(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&so(e,"use allowUnionTypes to allow union type keyword")}function yp(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,io.shouldUseRule)(e.schema,i)){const{type:s}=i.definition;s.length&&!s.some(o=>vp(t,o))&&so(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function vp(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Xu(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Ep(e,t){const r=[];for(const n of e.dataTypes)Xu(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function so(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Vt.checkStrictMode)(e,t,e.opts.strictTypes)}class Ju{constructor(t,r,n){if((0,wn.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Vt.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Qu(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,wn.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",ee.default.errors))}result(t,r,n){this.failResult((0,J.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,J.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,J._)`${r} !== undefined && (${(0,J.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?pn.reportExtraError:pn.reportError)(this,this.def.error,r)}$dataError(){(0,pn.reportError)(this,this.def.$dataError||pn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,pn.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=J.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=J.nil,r=J.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:s,def:o}=this;n.if((0,J.or)((0,J._)`${i} === undefined`,r)),t!==J.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==J.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,J.or)(o(),c());function o(){if(n.length){if(!(r instanceof J.Name))throw new Error("ajv implementation error");const u=Array.isArray(n)?n:[n];return(0,J._)`${(0,Ri.checkDataTypes)(u,r,s.opts.strictNumbers,Ri.DataType.Wrong)}`}return J.nil}function c(){if(i.validateSchema){const u=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,J._)`!${u}(${r})`}return J.nil}}subschema(t,r){const n=(0,hs.getSubschema)(this.it,t);(0,hs.extendSubschemaData)(n,this.it,t),(0,hs.extendSubschemaMode)(n,t);const i={...this.it,...n,items:void 0,props:void 0};return sp(i,r),i}mergeEvaluated(t,r){const{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Vt.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Vt.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,J.Name)),!0}}gt.KeywordCxt=Ju;function Yu(e,t,r,n){const i=new Ju(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,wn.funcKeywordCode)(i,r):"macro"in r?(0,wn.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,wn.funcKeywordCode)(i,r)}const gp=/^\/(?:[^~]|~0|~1)*$/,$p=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Qu(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return ee.default.rootData;if(e[0]==="/"){if(!gp.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,s=ee.default.rootData}else{const m=$p.exec(e);if(!m)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+m[1];if(i=m[2],i==="#"){if(a>=t)throw new Error(u("property/index",a));return n[t-a]}if(a>t)throw new Error(u("data",a));if(s=r[t-a],!i)return s}let o=s;const c=i.split("/");for(const m of c)m&&(s=(0,J._)`${s}${(0,J.getProperty)((0,Vt.unescapeJsonPointer)(m))}`,o=(0,J._)`${o} && ${s}`);return o;function u(m,a){return`Cannot access ${m} ${a} levels up, current level is ${t}`}}gt.getData=Qu;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});class _p extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}Hn.default=_p;var qn={};Object.defineProperty(qn,"__esModule",{value:!0});const ms=ke;class Sp extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,ms.resolveUrl)(t,r,n),this.missingSchema=(0,ms.normalizeId)((0,ms.getFullPath)(t,this.missingRef))}}qn.default=Sp;var tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.resolveSchema=tt.getCompilingSchema=tt.resolveRef=tt.compileSchema=tt.SchemaEnv=void 0;const dt=re,wp=Hn,cr=Lt,Et=ke,Aa=fe,Np=gt;class Wi{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Et.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}tt.SchemaEnv=Wi;function oo(e){const t=ef.call(this,e);if(t)return t;const r=(0,Et.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new dt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s});let c;e.$async&&(c=o.scopeValue("Error",{ref:wp.default,code:(0,dt._)`require("ajv/dist/runtime/validation_error").default`}));const u=o.scopeName("validate");e.validateName=u;const m={gen:o,allErrors:this.opts.allErrors,data:cr.default.data,parentData:cr.default.parentData,parentDataProperty:cr.default.parentDataProperty,dataNames:[cr.default.data],dataPathArr:[dt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,dt.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:c,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:dt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,dt._)`""`,opts:this.opts,self:this};let a;try{this._compilations.add(e),(0,Np.validateFunctionCode)(m),o.optimize(this.opts.code.optimize);const l=o.toString();a=`${o.scopeRefs(cr.default.scope)}return ${l}`,this.opts.code.process&&(a=this.opts.code.process(a,e));const h=new Function(`${cr.default.self}`,`${cr.default.scope}`,a)(this,this.scope.get());if(this.scope.value(u,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:u,validateCode:l,scopeValues:o._values}),this.opts.unevaluated){const{props:d,items:y}=m;h.evaluated={props:d instanceof dt.Name?void 0:d,items:y instanceof dt.Name?void 0:y,dynamicProps:d instanceof dt.Name,dynamicItems:y instanceof dt.Name},h.source&&(h.source.evaluated=(0,dt.stringify)(h.evaluated))}return e.validate=h,e}catch(l){throw delete e.validate,delete e.validateName,a&&this.logger.error("Error compiling schema, function code:",a),l}finally{this._compilations.delete(e)}}tt.compileSchema=oo;function Ip(e,t,r){var n;r=(0,Et.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let s=Dp.call(this,e,r);if(s===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:c}=this.opts;o&&(s=new Wi({schema:o,schemaId:c,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=Op.call(this,s)}tt.resolveRef=Ip;function Op(e){return(0,Et.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:oo.call(this,e)}function ef(e){for(const t of this._compilations)if(Tp(t,e))return t}tt.getCompilingSchema=ef;function Tp(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Dp(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Xi.call(this,e,t)}function Xi(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Et._getFullPath)(this.opts.uriResolver,r);let i=(0,Et.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return ps.call(this,r,e);const s=(0,Et.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){const c=Xi.call(this,e,o);return typeof(c==null?void 0:c.schema)!="object"?void 0:ps.call(this,r,c)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||oo.call(this,o),s===(0,Et.normalizeId)(t)){const{schema:c}=o,{schemaId:u}=this.opts,m=c[u];return m&&(i=(0,Et.resolveUrl)(this.opts.uriResolver,i,m)),new Wi({schema:c,schemaId:u,root:e,baseId:i})}return ps.call(this,r,o)}}tt.resolveSchema=Xi;const Cp=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function ps(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const c of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const u=r[(0,Aa.unescapeFragment)(c)];if(u===void 0)return;r=u;const m=typeof r=="object"&&r[this.opts.schemaId];!Cp.has(c)&&m&&(t=(0,Et.resolveUrl)(this.opts.uriResolver,t,m))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Aa.schemaHasRulesButRef)(r,this.RULES)){const c=(0,Et.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=Xi.call(this,n,c)}const{schemaId:o}=this.opts;if(s=s||new Wi({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}const Rp="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Pp="Meta-schema for $data reference (JSON AnySchema extension proposal)",Ap="object",bp=["$data"],Lp={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Fp=!1,jp={$id:Rp,description:Pp,type:Ap,required:bp,properties:Lp,additionalProperties:Fp};var ao={},Pi={},Mp={get exports(){return Pi},set exports(e){Pi=e}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(Xt,function(r){function n(){for(var w=arguments.length,g=Array(w),N=0;N<w;N++)g[N]=arguments[N];if(g.length>1){g[0]=g[0].slice(0,-1);for(var j=g.length-1,L=1;L<j;++L)g[L]=g[L].slice(1,-1);return g[j]=g[j].slice(1),g.join("")}else return g[0]}function i(w){return"(?:"+w+")"}function s(w){return w===void 0?"undefined":w===null?"null":Object.prototype.toString.call(w).split(" ").pop().split("]").shift().toLowerCase()}function o(w){return w.toUpperCase()}function c(w){return w!=null?w instanceof Array?w:typeof w.length!="number"||w.split||w.setInterval||w.call?[w]:Array.prototype.slice.call(w):[]}function u(w,g){var N=w;if(g)for(var j in g)N[j]=g[j];return N}function m(w){var g="[A-Za-z]",N="[0-9]",j=n(N,"[A-Fa-f]"),L=i(i("%[EFef]"+j+"%"+j+j+"%"+j+j)+"|"+i("%[89A-Fa-f]"+j+"%"+j+j)+"|"+i("%"+j+j)),Y="[\\:\\/\\?\\#\\[\\]\\@]",Q="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ue=n(Y,Q),ve=w?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Oe=w?"[\\uE000-\\uF8FF]":"[]",se=n(g,N,"[\\-\\.\\_\\~]",ve);i(g+n(g,N,"[\\+\\-\\.]")+"*"),i(i(L+"|"+n(se,Q,"[\\:]"))+"*");var pe=i(i("25[0-5]")+"|"+i("2[0-4]"+N)+"|"+i("1"+N+N)+"|"+i("0?[1-9]"+N)+"|0?0?"+N),Te=i(pe+"\\."+pe+"\\."+pe+"\\."+pe),te=i(j+"{1,4}"),ge=i(i(te+"\\:"+te)+"|"+Te),Ce=i(i(te+"\\:")+"{6}"+ge),$e=i("\\:\\:"+i(te+"\\:")+"{5}"+ge),xt=i(i(te)+"?\\:\\:"+i(te+"\\:")+"{4}"+ge),It=i(i(i(te+"\\:")+"{0,1}"+te)+"?\\:\\:"+i(te+"\\:")+"{3}"+ge),Ot=i(i(i(te+"\\:")+"{0,2}"+te)+"?\\:\\:"+i(te+"\\:")+"{2}"+ge),Rr=i(i(i(te+"\\:")+"{0,3}"+te)+"?\\:\\:"+te+"\\:"+ge),sr=i(i(i(te+"\\:")+"{0,4}"+te)+"?\\:\\:"+ge),ut=i(i(i(te+"\\:")+"{0,5}"+te)+"?\\:\\:"+te),Tt=i(i(i(te+"\\:")+"{0,6}"+te)+"?\\:\\:"),or=i([Ce,$e,xt,It,Ot,Rr,sr,ut,Tt].join("|")),Ft=i(i(se+"|"+L)+"+");i("[vV]"+j+"+\\."+n(se,Q,"[\\:]")+"+"),i(i(L+"|"+n(se,Q))+"*");var hn=i(L+"|"+n(se,Q,"[\\:\\@]"));return i(i(L+"|"+n(se,Q,"[\\@]"))+"+"),i(i(hn+"|"+n("[\\/\\?]",Oe))+"*"),{NOT_SCHEME:new RegExp(n("[^]",g,N,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",se,Q),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",se,Q),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",se,Q),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",se,Q),"g"),NOT_QUERY:new RegExp(n("[^\\%]",se,Q,"[\\:\\@\\/\\?]",Oe),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",se,Q,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",se,Q),"g"),UNRESERVED:new RegExp(se,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",se,ue),"g"),PCT_ENCODED:new RegExp(L,"g"),IPV4ADDRESS:new RegExp("^("+Te+")$"),IPV6ADDRESS:new RegExp("^\\[?("+or+")"+i(i("\\%25|\\%(?!"+j+"{2})")+"("+Ft+")")+"?\\]?$")}}var a=m(!1),l=m(!0),E=function(){function w(g,N){var j=[],L=!0,Y=!1,Q=void 0;try{for(var ue=g[Symbol.iterator](),ve;!(L=(ve=ue.next()).done)&&(j.push(ve.value),!(N&&j.length===N));L=!0);}catch(Oe){Y=!0,Q=Oe}finally{try{!L&&ue.return&&ue.return()}finally{if(Y)throw Q}}return j}return function(g,N){if(Array.isArray(g))return g;if(Symbol.iterator in Object(g))return w(g,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(w){if(Array.isArray(w)){for(var g=0,N=Array(w.length);g<w.length;g++)N[g]=w[g];return N}else return Array.from(w)},d=2147483647,y=36,p=1,f=26,$=38,_=700,D=72,z=128,T="-",C=/^xn--/,V=/[^\0-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=y-p,A=Math.floor,H=String.fromCharCode;function G(w){throw new RangeError(x[w])}function q(w,g){for(var N=[],j=w.length;j--;)N[j]=g(w[j]);return N}function K(w,g){var N=w.split("@"),j="";N.length>1&&(j=N[0]+"@",w=N[1]),w=w.replace(P,".");var L=w.split("."),Y=q(L,g).join(".");return j+Y}function B(w){for(var g=[],N=0,j=w.length;N<j;){var L=w.charCodeAt(N++);if(L>=55296&&L<=56319&&N<j){var Y=w.charCodeAt(N++);(Y&64512)==56320?g.push(((L&1023)<<10)+(Y&1023)+65536):(g.push(L),N--)}else g.push(L)}return g}var b=function(g){return String.fromCodePoint.apply(String,h(g))},k=function(g){return g-48<10?g-22:g-65<26?g-65:g-97<26?g-97:y},O=function(g,N){return g+22+75*(g<26)-((N!=0)<<5)},I=function(g,N,j){var L=0;for(g=j?A(g/_):g>>1,g+=A(g/N);g>M*f>>1;L+=y)g=A(g/M);return A(L+(M+1)*g/(g+$))},F=function(g){var N=[],j=g.length,L=0,Y=z,Q=D,ue=g.lastIndexOf(T);ue<0&&(ue=0);for(var ve=0;ve<ue;++ve)g.charCodeAt(ve)>=128&&G("not-basic"),N.push(g.charCodeAt(ve));for(var Oe=ue>0?ue+1:0;Oe<j;){for(var se=L,pe=1,Te=y;;Te+=y){Oe>=j&&G("invalid-input");var te=k(g.charCodeAt(Oe++));(te>=y||te>A((d-L)/pe))&&G("overflow"),L+=te*pe;var ge=Te<=Q?p:Te>=Q+f?f:Te-Q;if(te<ge)break;var Ce=y-ge;pe>A(d/Ce)&&G("overflow"),pe*=Ce}var $e=N.length+1;Q=I(L-se,$e,se==0),A(L/$e)>d-Y&&G("overflow"),Y+=A(L/$e),L%=$e,N.splice(L++,0,Y)}return String.fromCodePoint.apply(String,N)},R=function(g){var N=[];g=B(g);var j=g.length,L=z,Y=0,Q=D,ue=!0,ve=!1,Oe=void 0;try{for(var se=g[Symbol.iterator](),pe;!(ue=(pe=se.next()).done);ue=!0){var Te=pe.value;Te<128&&N.push(H(Te))}}catch(mn){ve=!0,Oe=mn}finally{try{!ue&&se.return&&se.return()}finally{if(ve)throw Oe}}var te=N.length,ge=te;for(te&&N.push(T);ge<j;){var Ce=d,$e=!0,xt=!1,It=void 0;try{for(var Ot=g[Symbol.iterator](),Rr;!($e=(Rr=Ot.next()).done);$e=!0){var sr=Rr.value;sr>=L&&sr<Ce&&(Ce=sr)}}catch(mn){xt=!0,It=mn}finally{try{!$e&&Ot.return&&Ot.return()}finally{if(xt)throw It}}var ut=ge+1;Ce-L>A((d-Y)/ut)&&G("overflow"),Y+=(Ce-L)*ut,L=Ce;var Tt=!0,or=!1,Ft=void 0;try{for(var hn=g[Symbol.iterator](),na;!(Tt=(na=hn.next()).done);Tt=!0){var ia=na.value;if(ia<L&&++Y>d&&G("overflow"),ia==L){for(var Wn=Y,Xn=y;;Xn+=y){var Jn=Xn<=Q?p:Xn>=Q+f?f:Xn-Q;if(Wn<Jn)break;var sa=Wn-Jn,oa=y-Jn;N.push(H(O(Jn+sa%oa,0))),Wn=A(sa/oa)}N.push(H(O(Wn,0))),Q=I(Y,ut,ge==te),Y=0,++ge}}}catch(mn){or=!0,Ft=mn}finally{try{!Tt&&hn.return&&hn.return()}finally{if(or)throw Ft}}++Y,++L}return N.join("")},v=function(g){return K(g,function(N){return C.test(N)?F(N.slice(4).toLowerCase()):N})},S=function(g){return K(g,function(N){return V.test(N)?"xn--"+R(N):N})},U={version:"2.1.0",ucs2:{decode:B,encode:b},decode:F,encode:R,toASCII:S,toUnicode:v},Z={};function W(w){var g=w.charCodeAt(0),N=void 0;return g<16?N="%0"+g.toString(16).toUpperCase():g<128?N="%"+g.toString(16).toUpperCase():g<2048?N="%"+(g>>6|192).toString(16).toUpperCase()+"%"+(g&63|128).toString(16).toUpperCase():N="%"+(g>>12|224).toString(16).toUpperCase()+"%"+(g>>6&63|128).toString(16).toUpperCase()+"%"+(g&63|128).toString(16).toUpperCase(),N}function ie(w){for(var g="",N=0,j=w.length;N<j;){var L=parseInt(w.substr(N+1,2),16);if(L<128)g+=String.fromCharCode(L),N+=3;else if(L>=194&&L<224){if(j-N>=6){var Y=parseInt(w.substr(N+4,2),16);g+=String.fromCharCode((L&31)<<6|Y&63)}else g+=w.substr(N,6);N+=6}else if(L>=224){if(j-N>=9){var Q=parseInt(w.substr(N+4,2),16),ue=parseInt(w.substr(N+7,2),16);g+=String.fromCharCode((L&15)<<12|(Q&63)<<6|ue&63)}else g+=w.substr(N,9);N+=9}else g+=w.substr(N,3),N+=3}return g}function ae(w,g){function N(j){var L=ie(j);return L.match(g.UNRESERVED)?L:j}return w.scheme&&(w.scheme=String(w.scheme).replace(g.PCT_ENCODED,N).toLowerCase().replace(g.NOT_SCHEME,"")),w.userinfo!==void 0&&(w.userinfo=String(w.userinfo).replace(g.PCT_ENCODED,N).replace(g.NOT_USERINFO,W).replace(g.PCT_ENCODED,o)),w.host!==void 0&&(w.host=String(w.host).replace(g.PCT_ENCODED,N).toLowerCase().replace(g.NOT_HOST,W).replace(g.PCT_ENCODED,o)),w.path!==void 0&&(w.path=String(w.path).replace(g.PCT_ENCODED,N).replace(w.scheme?g.NOT_PATH:g.NOT_PATH_NOSCHEME,W).replace(g.PCT_ENCODED,o)),w.query!==void 0&&(w.query=String(w.query).replace(g.PCT_ENCODED,N).replace(g.NOT_QUERY,W).replace(g.PCT_ENCODED,o)),w.fragment!==void 0&&(w.fragment=String(w.fragment).replace(g.PCT_ENCODED,N).replace(g.NOT_FRAGMENT,W).replace(g.PCT_ENCODED,o)),w}function Ne(w){return w.replace(/^0*(.*)/,"$1")||"0"}function St(w,g){var N=w.match(g.IPV4ADDRESS)||[],j=E(N,2),L=j[1];return L?L.split(".").map(Ne).join("."):w}function Nr(w,g){var N=w.match(g.IPV6ADDRESS)||[],j=E(N,3),L=j[1],Y=j[2];if(L){for(var Q=L.toLowerCase().split("::").reverse(),ue=E(Q,2),ve=ue[0],Oe=ue[1],se=Oe?Oe.split(":").map(Ne):[],pe=ve.split(":").map(Ne),Te=g.IPV4ADDRESS.test(pe[pe.length-1]),te=Te?7:8,ge=pe.length-te,Ce=Array(te),$e=0;$e<te;++$e)Ce[$e]=se[$e]||pe[ge+$e]||"";Te&&(Ce[te-1]=St(Ce[te-1],g));var xt=Ce.reduce(function(ut,Tt,or){if(!Tt||Tt==="0"){var Ft=ut[ut.length-1];Ft&&Ft.index+Ft.length===or?Ft.length++:ut.push({index:or,length:1})}return ut},[]),It=xt.sort(function(ut,Tt){return Tt.length-ut.length})[0],Ot=void 0;if(It&&It.length>1){var Rr=Ce.slice(0,It.index),sr=Ce.slice(It.index+It.length);Ot=Rr.join(":")+"::"+sr.join(":")}else Ot=Ce.join(":");return Y&&(Ot+="%"+Y),Ot}else return w}var on=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,an="".match(/(){0}/)[1]===void 0;function it(w){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N={},j=g.iri!==!1?l:a;g.reference==="suffix"&&(w=(g.scheme?g.scheme+":":"")+"//"+w);var L=w.match(on);if(L){an?(N.scheme=L[1],N.userinfo=L[3],N.host=L[4],N.port=parseInt(L[5],10),N.path=L[6]||"",N.query=L[7],N.fragment=L[8],isNaN(N.port)&&(N.port=L[5])):(N.scheme=L[1]||void 0,N.userinfo=w.indexOf("@")!==-1?L[3]:void 0,N.host=w.indexOf("//")!==-1?L[4]:void 0,N.port=parseInt(L[5],10),N.path=L[6]||"",N.query=w.indexOf("?")!==-1?L[7]:void 0,N.fragment=w.indexOf("#")!==-1?L[8]:void 0,isNaN(N.port)&&(N.port=w.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?L[4]:void 0)),N.host&&(N.host=Nr(St(N.host,j),j)),N.scheme===void 0&&N.userinfo===void 0&&N.host===void 0&&N.port===void 0&&!N.path&&N.query===void 0?N.reference="same-document":N.scheme===void 0?N.reference="relative":N.fragment===void 0?N.reference="absolute":N.reference="uri",g.reference&&g.reference!=="suffix"&&g.reference!==N.reference&&(N.error=N.error||"URI is not a "+g.reference+" reference.");var Y=Z[(g.scheme||N.scheme||"").toLowerCase()];if(!g.unicodeSupport&&(!Y||!Y.unicodeSupport)){if(N.host&&(g.domainHost||Y&&Y.domainHost))try{N.host=U.toASCII(N.host.replace(j.PCT_ENCODED,ie).toLowerCase())}catch(Q){N.error=N.error||"Host's domain name can not be converted to ASCII via punycode: "+Q}ae(N,a)}else ae(N,j);Y&&Y.parse&&Y.parse(N,g)}else N.error=N.error||"URI can not be parsed.";return N}function cn(w,g){var N=g.iri!==!1?l:a,j=[];return w.userinfo!==void 0&&(j.push(w.userinfo),j.push("@")),w.host!==void 0&&j.push(Nr(St(String(w.host),N),N).replace(N.IPV6ADDRESS,function(L,Y,Q){return"["+Y+(Q?"%25"+Q:"")+"]"})),(typeof w.port=="number"||typeof w.port=="string")&&(j.push(":"),j.push(String(w.port))),j.length?j.join(""):void 0}var Ir=/^\.\.?\//,Or=/^\/\.(\/|$)/,Tr=/^\/\.\.(\/|$)/,un=/^\/?(?:.|\n)*?(?=\/|$)/;function wt(w){for(var g=[];w.length;)if(w.match(Ir))w=w.replace(Ir,"");else if(w.match(Or))w=w.replace(Or,"/");else if(w.match(Tr))w=w.replace(Tr,"/"),g.pop();else if(w==="."||w==="..")w="";else{var N=w.match(un);if(N){var j=N[0];w=w.slice(j.length),g.push(j)}else throw new Error("Unexpected dot segment condition")}return g.join("")}function Ye(w){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=g.iri?l:a,j=[],L=Z[(g.scheme||w.scheme||"").toLowerCase()];if(L&&L.serialize&&L.serialize(w,g),w.host&&!N.IPV6ADDRESS.test(w.host)){if(g.domainHost||L&&L.domainHost)try{w.host=g.iri?U.toUnicode(w.host):U.toASCII(w.host.replace(N.PCT_ENCODED,ie).toLowerCase())}catch(ue){w.error=w.error||"Host's domain name can not be converted to "+(g.iri?"Unicode":"ASCII")+" via punycode: "+ue}}ae(w,N),g.reference!=="suffix"&&w.scheme&&(j.push(w.scheme),j.push(":"));var Y=cn(w,g);if(Y!==void 0&&(g.reference!=="suffix"&&j.push("//"),j.push(Y),w.path&&w.path.charAt(0)!=="/"&&j.push("/")),w.path!==void 0){var Q=w.path;!g.absolutePath&&(!L||!L.absolutePath)&&(Q=wt(Q)),Y===void 0&&(Q=Q.replace(/^\/\//,"/%2F")),j.push(Q)}return w.query!==void 0&&(j.push("?"),j.push(w.query)),w.fragment!==void 0&&(j.push("#"),j.push(w.fragment)),j.join("")}function Dr(w,g){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},j=arguments[3],L={};return j||(w=it(Ye(w,N),N),g=it(Ye(g,N),N)),N=N||{},!N.tolerant&&g.scheme?(L.scheme=g.scheme,L.userinfo=g.userinfo,L.host=g.host,L.port=g.port,L.path=wt(g.path||""),L.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?(L.userinfo=g.userinfo,L.host=g.host,L.port=g.port,L.path=wt(g.path||""),L.query=g.query):(g.path?(g.path.charAt(0)==="/"?L.path=wt(g.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?L.path="/"+g.path:w.path?L.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+g.path:L.path=g.path,L.path=wt(L.path)),L.query=g.query):(L.path=w.path,g.query!==void 0?L.query=g.query:L.query=w.query),L.userinfo=w.userinfo,L.host=w.host,L.port=w.port),L.scheme=w.scheme),L.fragment=g.fragment,L}function fn(w,g,N){var j=u({scheme:"null"},N);return Ye(Dr(it(w,j),it(g,j),j,!0),j)}function nr(w,g){return typeof w=="string"?w=Ye(it(w,g),g):s(w)==="object"&&(w=it(Ye(w,g),g)),w}function ln(w,g,N){return typeof w=="string"?w=Ye(it(w,N),N):s(w)==="object"&&(w=Ye(w,N)),typeof g=="string"?g=Ye(it(g,N),N):s(g)==="object"&&(g=Ye(g,N)),w===g}function Zn(w,g){return w&&w.toString().replace(!g||!g.iri?a.ESCAPE:l.ESCAPE,W)}function ct(w,g){return w&&w.toString().replace(!g||!g.iri?a.PCT_ENCODED:l.PCT_ENCODED,ie)}var ir={scheme:"http",domainHost:!0,parse:function(g,N){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g},serialize:function(g,N){var j=String(g.scheme).toLowerCase()==="https";return(g.port===(j?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}},Wo={scheme:"https",domainHost:ir.domainHost,parse:ir.parse,serialize:ir.serialize};function Xo(w){return typeof w.secure=="boolean"?w.secure:String(w.scheme).toLowerCase()==="wss"}var dn={scheme:"ws",domainHost:!0,parse:function(g,N){var j=g;return j.secure=Xo(j),j.resourceName=(j.path||"/")+(j.query?"?"+j.query:""),j.path=void 0,j.query=void 0,j},serialize:function(g,N){if((g.port===(Xo(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){var j=g.resourceName.split("?"),L=E(j,2),Y=L[0],Q=L[1];g.path=Y&&Y!=="/"?Y:void 0,g.query=Q,g.resourceName=void 0}return g.fragment=void 0,g}},Jo={scheme:"wss",domainHost:dn.domainHost,parse:dn.parse,serialize:dn.serialize},Tf={},Yo="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Nt="[0-9A-Fa-f]",Df=i(i("%[EFef]"+Nt+"%"+Nt+Nt+"%"+Nt+Nt)+"|"+i("%[89A-Fa-f]"+Nt+"%"+Nt+Nt)+"|"+i("%"+Nt+Nt)),Cf="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Rf="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Pf=n(Rf,'[\\"\\\\]'),Af="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",bf=new RegExp(Yo,"g"),Cr=new RegExp(Df,"g"),Lf=new RegExp(n("[^]",Cf,"[\\.]",'[\\"]',Pf),"g"),Qo=new RegExp(n("[^]",Yo,Af),"g"),Ff=Qo;function as(w){var g=ie(w);return g.match(bf)?g:w}var ea={scheme:"mailto",parse:function(g,N){var j=g,L=j.to=j.path?j.path.split(","):[];if(j.path=void 0,j.query){for(var Y=!1,Q={},ue=j.query.split("&"),ve=0,Oe=ue.length;ve<Oe;++ve){var se=ue[ve].split("=");switch(se[0]){case"to":for(var pe=se[1].split(","),Te=0,te=pe.length;Te<te;++Te)L.push(pe[Te]);break;case"subject":j.subject=ct(se[1],N);break;case"body":j.body=ct(se[1],N);break;default:Y=!0,Q[ct(se[0],N)]=ct(se[1],N);break}}Y&&(j.headers=Q)}j.query=void 0;for(var ge=0,Ce=L.length;ge<Ce;++ge){var $e=L[ge].split("@");if($e[0]=ct($e[0]),N.unicodeSupport)$e[1]=ct($e[1],N).toLowerCase();else try{$e[1]=U.toASCII(ct($e[1],N).toLowerCase())}catch(xt){j.error=j.error||"Email address's domain name can not be converted to ASCII via punycode: "+xt}L[ge]=$e.join("@")}return j},serialize:function(g,N){var j=g,L=c(g.to);if(L){for(var Y=0,Q=L.length;Y<Q;++Y){var ue=String(L[Y]),ve=ue.lastIndexOf("@"),Oe=ue.slice(0,ve).replace(Cr,as).replace(Cr,o).replace(Lf,W),se=ue.slice(ve+1);try{se=N.iri?U.toUnicode(se):U.toASCII(ct(se,N).toLowerCase())}catch(ge){j.error=j.error||"Email address's domain name can not be converted to "+(N.iri?"Unicode":"ASCII")+" via punycode: "+ge}L[Y]=Oe+"@"+se}j.path=L.join(",")}var pe=g.headers=g.headers||{};g.subject&&(pe.subject=g.subject),g.body&&(pe.body=g.body);var Te=[];for(var te in pe)pe[te]!==Tf[te]&&Te.push(te.replace(Cr,as).replace(Cr,o).replace(Qo,W)+"="+pe[te].replace(Cr,as).replace(Cr,o).replace(Ff,W));return Te.length&&(j.query=Te.join("&")),j}},jf=/^([^\:]+)\:(.*)/,ta={scheme:"urn",parse:function(g,N){var j=g.path&&g.path.match(jf),L=g;if(j){var Y=N.scheme||L.scheme||"urn",Q=j[1].toLowerCase(),ue=j[2],ve=Y+":"+(N.nid||Q),Oe=Z[ve];L.nid=Q,L.nss=ue,L.path=void 0,Oe&&(L=Oe.parse(L,N))}else L.error=L.error||"URN can not be parsed.";return L},serialize:function(g,N){var j=N.scheme||g.scheme||"urn",L=g.nid,Y=j+":"+(N.nid||L),Q=Z[Y];Q&&(g=Q.serialize(g,N));var ue=g,ve=g.nss;return ue.path=(L||N.nid)+":"+ve,ue}},Mf=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ra={scheme:"urn:uuid",parse:function(g,N){var j=g;return j.uuid=j.nss,j.nss=void 0,!N.tolerant&&(!j.uuid||!j.uuid.match(Mf))&&(j.error=j.error||"UUID is not valid."),j},serialize:function(g,N){var j=g;return j.nss=(g.uuid||"").toLowerCase(),j}};Z[ir.scheme]=ir,Z[Wo.scheme]=Wo,Z[dn.scheme]=dn,Z[Jo.scheme]=Jo,Z[ea.scheme]=ea,Z[ta.scheme]=ta,Z[ra.scheme]=ra,r.SCHEMES=Z,r.pctEncChar=W,r.pctDecChars=ie,r.parse=it,r.removeDotSegments=wt,r.serialize=Ye,r.resolveComponents=Dr,r.resolve=fn,r.normalize=nr,r.equal=ln,r.escapeComponent=Zn,r.unescapeComponent=ct,Object.defineProperty(r,"__esModule",{value:!0})})})(Mp,Pi);Object.defineProperty(ao,"__esModule",{value:!0});const tf=Pi;tf.code='require("ajv/dist/runtime/uri").default';ao.default=tf;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=gt;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=re;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Hn,i=qn,s=Er,o=tt,c=re,u=ke,m=Bn,a=fe,l=jp,E=ao,h=(O,I)=>new RegExp(O,I);h.code="new RegExp";const d=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),p={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},f={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},$=200;function _(O){var I,F,R,v,S,U,Z,W,ie,ae,Ne,St,Nr,on,an,it,cn,Ir,Or,Tr,un,wt,Ye,Dr,fn;const nr=O.strict,ln=(I=O.code)===null||I===void 0?void 0:I.optimize,Zn=ln===!0||ln===void 0?1:ln||0,ct=(R=(F=O.code)===null||F===void 0?void 0:F.regExp)!==null&&R!==void 0?R:h,ir=(v=O.uriResolver)!==null&&v!==void 0?v:E.default;return{strictSchema:(U=(S=O.strictSchema)!==null&&S!==void 0?S:nr)!==null&&U!==void 0?U:!0,strictNumbers:(W=(Z=O.strictNumbers)!==null&&Z!==void 0?Z:nr)!==null&&W!==void 0?W:!0,strictTypes:(ae=(ie=O.strictTypes)!==null&&ie!==void 0?ie:nr)!==null&&ae!==void 0?ae:"log",strictTuples:(St=(Ne=O.strictTuples)!==null&&Ne!==void 0?Ne:nr)!==null&&St!==void 0?St:"log",strictRequired:(on=(Nr=O.strictRequired)!==null&&Nr!==void 0?Nr:nr)!==null&&on!==void 0?on:!1,code:O.code?{...O.code,optimize:Zn,regExp:ct}:{optimize:Zn,regExp:ct},loopRequired:(an=O.loopRequired)!==null&&an!==void 0?an:$,loopEnum:(it=O.loopEnum)!==null&&it!==void 0?it:$,meta:(cn=O.meta)!==null&&cn!==void 0?cn:!0,messages:(Ir=O.messages)!==null&&Ir!==void 0?Ir:!0,inlineRefs:(Or=O.inlineRefs)!==null&&Or!==void 0?Or:!0,schemaId:(Tr=O.schemaId)!==null&&Tr!==void 0?Tr:"$id",addUsedSchema:(un=O.addUsedSchema)!==null&&un!==void 0?un:!0,validateSchema:(wt=O.validateSchema)!==null&&wt!==void 0?wt:!0,validateFormats:(Ye=O.validateFormats)!==null&&Ye!==void 0?Ye:!0,unicodeRegExp:(Dr=O.unicodeRegExp)!==null&&Dr!==void 0?Dr:!0,int32range:(fn=O.int32range)!==null&&fn!==void 0?fn:!0,uriResolver:ir}}class D{constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,..._(I)};const{es5:F,lines:R}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:F,lines:R}),this.logger=A(I.logger);const v=I.validateFormats;I.validateFormats=!1,this.RULES=(0,s.getRules)(),z.call(this,p,I,"NOT SUPPORTED"),z.call(this,f,I,"DEPRECATED","warn"),this._metaOpts=x.call(this),I.formats&&V.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&P.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),C.call(this),I.validateFormats=v}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:I,meta:F,schemaId:R}=this.opts;let v=l;R==="id"&&(v={...l},v.id=v.$id,delete v.$id),F&&I&&this.addMetaSchema(v,v[R],!1)}defaultMeta(){const{meta:I,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[F]||I:void 0}validate(I,F){let R;if(typeof I=="string"){if(R=this.getSchema(I),!R)throw new Error(`no schema with key or ref "${I}"`)}else R=this.compile(I);const v=R(F);return"$async"in R||(this.errors=R.errors),v}compile(I,F){const R=this._addSchema(I,F);return R.validate||this._compileSchemaEnv(R)}compileAsync(I,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return v.call(this,I,F);async function v(ae,Ne){await S.call(this,ae.$schema);const St=this._addSchema(ae,Ne);return St.validate||U.call(this,St)}async function S(ae){ae&&!this.getSchema(ae)&&await v.call(this,{$ref:ae},!0)}async function U(ae){try{return this._compileSchemaEnv(ae)}catch(Ne){if(!(Ne instanceof i.default))throw Ne;return Z.call(this,Ne),await W.call(this,Ne.missingSchema),U.call(this,ae)}}function Z({missingSchema:ae,missingRef:Ne}){if(this.refs[ae])throw new Error(`AnySchema ${ae} is loaded but ${Ne} cannot be resolved`)}async function W(ae){const Ne=await ie.call(this,ae);this.refs[ae]||await S.call(this,Ne.$schema),this.refs[ae]||this.addSchema(Ne,ae,F)}async function ie(ae){const Ne=this._loading[ae];if(Ne)return Ne;try{return await(this._loading[ae]=R(ae))}finally{delete this._loading[ae]}}}addSchema(I,F,R,v=this.opts.validateSchema){if(Array.isArray(I)){for(const U of I)this.addSchema(U,void 0,R,v);return this}let S;if(typeof I=="object"){const{schemaId:U}=this.opts;if(S=I[U],S!==void 0&&typeof S!="string")throw new Error(`schema ${U} must be string`)}return F=(0,u.normalizeId)(F||S),this._checkUnique(F),this.schemas[F]=this._addSchema(I,R,F,v,!0),this}addMetaSchema(I,F,R=this.opts.validateSchema){return this.addSchema(I,F,!0,R),this}validateSchema(I,F){if(typeof I=="boolean")return!0;let R;if(R=I.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const v=this.validate(R,I);if(!v&&F){const S="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(S);else throw new Error(S)}return v}getSchema(I){let F;for(;typeof(F=T.call(this,I))=="string";)I=F;if(F===void 0){const{schemaId:R}=this.opts,v=new o.SchemaEnv({schema:{},schemaId:R});if(F=o.resolveSchema.call(this,v,I),!F)return;this.refs[I]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=T.call(this,I);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{const F=I;this._cache.delete(F);let R=I[this.opts.schemaId];return R&&(R=(0,u.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(const F of I)this.addKeyword(F);return this}addKeyword(I,F){let R;if(typeof I=="string")R=I,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=R);else if(typeof I=="object"&&F===void 0){if(F=I,R=F.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,R,F),!F)return(0,a.eachItem)(R,S=>q.call(this,S)),this;B.call(this,F);const v={...F,type:(0,m.getJSONTypes)(F.type),schemaType:(0,m.getJSONTypes)(F.schemaType)};return(0,a.eachItem)(R,v.type.length===0?S=>q.call(this,S,v):S=>v.type.forEach(U=>q.call(this,S,v,U))),this}getKeyword(I){const F=this.RULES.all[I];return typeof F=="object"?F.definition:!!F}removeKeyword(I){const{RULES:F}=this;delete F.keywords[I],delete F.all[I];for(const R of F.rules){const v=R.rules.findIndex(S=>S.keyword===I);v>=0&&R.rules.splice(v,1)}return this}addFormat(I,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[I]=F,this}errorsText(I=this.errors,{separator:F=", ",dataVar:R="data"}={}){return!I||I.length===0?"No errors":I.map(v=>`${R}${v.instancePath} ${v.message}`).reduce((v,S)=>v+F+S)}$dataMetaSchema(I,F){const R=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(const v of F){const S=v.split("/").slice(1);let U=I;for(const Z of S)U=U[Z];for(const Z in R){const W=R[Z];if(typeof W!="object")continue;const{$data:ie}=W.definition,ae=U[Z];ie&&ae&&(U[Z]=k(ae))}}return I}_removeAllSchemas(I,F){for(const R in I){const v=I[R];(!F||F.test(R))&&(typeof v=="string"?delete I[R]:v&&!v.meta&&(this._cache.delete(v.schema),delete I[R]))}}_addSchema(I,F,R,v=this.opts.validateSchema,S=this.opts.addUsedSchema){let U;const{schemaId:Z}=this.opts;if(typeof I=="object")U=I[Z];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof I!="boolean")throw new Error("schema must be object or boolean")}let W=this._cache.get(I);if(W!==void 0)return W;R=(0,u.normalizeId)(U||R);const ie=u.getSchemaRefs.call(this,I,R);return W=new o.SchemaEnv({schema:I,schemaId:Z,meta:F,baseId:R,localRefs:ie}),this._cache.set(W.schema,W),S&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=W),v&&this.validateSchema(I,!0),W}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw new Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):o.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}_compileMetaSchema(I){const F=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,I)}finally{this.opts=F}}}e.default=D,D.ValidationError=n.default,D.MissingRefError=i.default;function z(O,I,F,R="error"){for(const v in O){const S=v;S in I&&this.logger[R](`${F}: option ${v}. ${O[S]}`)}}function T(O){return O=(0,u.normalizeId)(O),this.schemas[O]||this.refs[O]}function C(){const O=this.opts.schemas;if(O)if(Array.isArray(O))this.addSchema(O);else for(const I in O)this.addSchema(O[I],I)}function V(){for(const O in this.opts.formats){const I=this.opts.formats[O];I&&this.addFormat(O,I)}}function P(O){if(Array.isArray(O)){this.addVocabulary(O);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const I in O){const F=O[I];F.keyword||(F.keyword=I),this.addKeyword(F)}}function x(){const O={...this.opts};for(const I of d)delete O[I];return O}const M={log(){},warn(){},error(){}};function A(O){if(O===!1)return M;if(O===void 0)return console;if(O.log&&O.warn&&O.error)return O;throw new Error("logger must implement log, warn and error methods")}const H=/^[a-z_$][a-z0-9_$:-]*$/i;function G(O,I){const{RULES:F}=this;if((0,a.eachItem)(O,R=>{if(F.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!H.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function q(O,I,F){var R;const v=I==null?void 0:I.post;if(F&&v)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:S}=this;let U=v?S.post:S.rules.find(({type:W})=>W===F);if(U||(U={type:F,rules:[]},S.rules.push(U)),S.keywords[O]=!0,!I)return;const Z={keyword:O,definition:{...I,type:(0,m.getJSONTypes)(I.type),schemaType:(0,m.getJSONTypes)(I.schemaType)}};I.before?K.call(this,U,Z,I.before):U.rules.push(Z),S.all[O]=Z,(R=I.implements)===null||R===void 0||R.forEach(W=>this.addKeyword(W))}function K(O,I,F){const R=O.rules.findIndex(v=>v.keyword===F);R>=0?O.rules.splice(R,0,I):(O.rules.push(I),this.logger.warn(`rule ${F} is not defined`))}function B(O){let{metaSchema:I}=O;I!==void 0&&(O.$data&&this.opts.$data&&(I=k(I)),O.validateSchema=this.compile(I,!0))}const b={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function k(O){return{anyOf:[O,b]}}})(Pu);var co={},uo={},fo={};Object.defineProperty(fo,"__esModule",{value:!0});const kp={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};fo.default=kp;var gr={};Object.defineProperty(gr,"__esModule",{value:!0});gr.callRef=gr.getValidate=void 0;const Up=qn,ba=ne,et=re,Lr=Lt,La=tt,ni=fe,Vp={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:o,opts:c,self:u}=n,{root:m}=s;if((r==="#"||r==="#/")&&i===m.baseId)return l();const a=La.resolveRef.call(u,m,i,r);if(a===void 0)throw new Up.default(n.opts.uriResolver,i,r);if(a instanceof La.SchemaEnv)return E(a);return h(a);function l(){if(s===m)return mi(e,o,s,s.$async);const d=t.scopeValue("root",{ref:m});return mi(e,(0,et._)`${d}.validate`,m,m.$async)}function E(d){const y=rf(e,d);mi(e,y,d,d.$async)}function h(d){const y=t.scopeValue("schema",c.code.source===!0?{ref:d,code:(0,et.stringify)(d)}:{ref:d}),p=t.name("valid"),f=e.subschema({schema:d,dataTypes:[],schemaPath:et.nil,topSchemaRef:y,errSchemaPath:r},p);e.mergeEvaluated(f),e.ok(p)}}};function rf(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,et._)`${r.scopeValue("wrapper",{ref:t})}.validate`}gr.getValidate=rf;function mi(e,t,r,n){const{gen:i,it:s}=e,{allErrors:o,schemaEnv:c,opts:u}=s,m=u.passContext?Lr.default.this:et.nil;n?a():l();function a(){if(!c.$async)throw new Error("async schema referenced by sync schema");const d=i.let("valid");i.try(()=>{i.code((0,et._)`await ${(0,ba.callValidateCode)(e,t,m)}`),h(t),o||i.assign(d,!0)},y=>{i.if((0,et._)`!(${y} instanceof ${s.ValidationError})`,()=>i.throw(y)),E(y),o||i.assign(d,!1)}),e.ok(d)}function l(){e.result((0,ba.callValidateCode)(e,t,m),()=>h(t),()=>E(t))}function E(d){const y=(0,et._)`${d}.errors`;i.assign(Lr.default.vErrors,(0,et._)`${Lr.default.vErrors} === null ? ${y} : ${Lr.default.vErrors}.concat(${y})`),i.assign(Lr.default.errors,(0,et._)`${Lr.default.vErrors}.length`)}function h(d){var y;if(!s.opts.unevaluated)return;const p=(y=r==null?void 0:r.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(p&&!p.dynamicProps)p.props!==void 0&&(s.props=ni.mergeEvaluated.props(i,p.props,s.props));else{const f=i.var("props",(0,et._)`${d}.evaluated.props`);s.props=ni.mergeEvaluated.props(i,f,s.props,et.Name)}if(s.items!==!0)if(p&&!p.dynamicItems)p.items!==void 0&&(s.items=ni.mergeEvaluated.items(i,p.items,s.items));else{const f=i.var("items",(0,et._)`${d}.evaluated.items`);s.items=ni.mergeEvaluated.items(i,f,s.items,et.Name)}}}gr.callRef=mi;gr.default=Vp;Object.defineProperty(uo,"__esModule",{value:!0});const zp=fo,xp=gr,Gp=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",zp.default,xp.default];uo.default=Gp;var lo={},ho={};Object.defineProperty(ho,"__esModule",{value:!0});const Ai=re,Ht=Ai.operators,bi={maximum:{okStr:"<=",ok:Ht.LTE,fail:Ht.GT},minimum:{okStr:">=",ok:Ht.GTE,fail:Ht.LT},exclusiveMaximum:{okStr:"<",ok:Ht.LT,fail:Ht.GTE},exclusiveMinimum:{okStr:">",ok:Ht.GT,fail:Ht.LTE}},Bp={message:({keyword:e,schemaCode:t})=>(0,Ai.str)`must be ${bi[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Ai._)`{comparison: ${bi[e].okStr}, limit: ${t}}`},Hp={keyword:Object.keys(bi),type:"number",schemaType:"number",$data:!0,error:Bp,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Ai._)`${r} ${bi[t].fail} ${n} || isNaN(${r})`)}};ho.default=Hp;var mo={};Object.defineProperty(mo,"__esModule",{value:!0});const Nn=re,qp={message:({schemaCode:e})=>(0,Nn.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Nn._)`{multipleOf: ${e}}`},Kp={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:qp,code(e){const{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,o=t.let("res"),c=s?(0,Nn._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,Nn._)`${o} !== parseInt(${o})`;e.fail$data((0,Nn._)`(${n} === 0 || (${o} = ${r}/${n}, ${c}))`)}};mo.default=Kp;var po={},yo={};Object.defineProperty(yo,"__esModule",{value:!0});function nf(e){const t=e.length;let r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}yo.default=nf;nf.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(po,"__esModule",{value:!0});const lr=re,Zp=fe,Wp=yo,Xp={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,lr.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,lr._)`{limit: ${e}}`},Jp={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Xp,code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?lr.operators.GT:lr.operators.LT,o=i.opts.unicode===!1?(0,lr._)`${r}.length`:(0,lr._)`${(0,Zp.useFunc)(e.gen,Wp.default)}(${r})`;e.fail$data((0,lr._)`${o} ${s} ${n}`)}};po.default=Jp;var vo={};Object.defineProperty(vo,"__esModule",{value:!0});const Yp=ne,Li=re,Qp={message:({schemaCode:e})=>(0,Li.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Li._)`{pattern: ${e}}`},ey={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Qp,code(e){const{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,o=s.opts.unicodeRegExp?"u":"",c=r?(0,Li._)`(new RegExp(${i}, ${o}))`:(0,Yp.usePattern)(e,n);e.fail$data((0,Li._)`!${c}.test(${t})`)}};vo.default=ey;var Eo={};Object.defineProperty(Eo,"__esModule",{value:!0});const In=re,ty={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,In.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,In._)`{limit: ${e}}`},ry={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ty,code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?In.operators.GT:In.operators.LT;e.fail$data((0,In._)`Object.keys(${r}).length ${i} ${n}`)}};Eo.default=ry;var go={};Object.defineProperty(go,"__esModule",{value:!0});const yn=ne,On=re,ny=fe,iy={message:({params:{missingProperty:e}})=>(0,On.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,On._)`{missingProperty: ${e}}`},sy={keyword:"required",type:"object",schemaType:"array",$data:!0,error:iy,code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e,{opts:c}=o;if(!s&&r.length===0)return;const u=r.length>=c.loopRequired;if(o.allErrors?m():a(),c.strictRequired){const h=e.parentSchema.properties,{definedProperties:d}=e.it;for(const y of r)if((h==null?void 0:h[y])===void 0&&!d.has(y)){const p=o.schemaEnv.baseId+o.errSchemaPath,f=`required property "${y}" is not defined at "${p}" (strictRequired)`;(0,ny.checkStrictMode)(o,f,o.opts.strictRequired)}}function m(){if(u||s)e.block$data(On.nil,l);else for(const h of r)(0,yn.checkReportMissingProp)(e,h)}function a(){const h=t.let("missing");if(u||s){const d=t.let("valid",!0);e.block$data(d,()=>E(h,d)),e.ok(d)}else t.if((0,yn.checkMissingProp)(e,r,h)),(0,yn.reportMissingProp)(e,h),t.else()}function l(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,yn.noPropertyInData)(t,i,h,c.ownProperties),()=>e.error())})}function E(h,d){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(d,(0,yn.propertyInData)(t,i,h,c.ownProperties)),t.if((0,On.not)(d),()=>{e.error(),t.break()})},On.nil)}}};go.default=sy;var $o={};Object.defineProperty($o,"__esModule",{value:!0});const Tn=re,oy={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Tn.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Tn._)`{limit: ${e}}`},ay={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:oy,code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Tn.operators.GT:Tn.operators.LT;e.fail$data((0,Tn._)`${r}.length ${i} ${n}`)}};$o.default=ay;var _o={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const sf=Uu;sf.code='require("ajv/dist/runtime/equal").default';Kn.default=sf;Object.defineProperty(_o,"__esModule",{value:!0});const ys=Bn,je=re,cy=fe,uy=Kn,fy={message:({params:{i:e,j:t}})=>(0,je.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,je._)`{i: ${e}, j: ${t}}`},ly={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:fy,code(e){const{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:c}=e;if(!n&&!i)return;const u=t.let("valid"),m=s.items?(0,ys.getSchemaTypes)(s.items):[];e.block$data(u,a,(0,je._)`${o} === false`),e.ok(u);function a(){const d=t.let("i",(0,je._)`${r}.length`),y=t.let("j");e.setParams({i:d,j:y}),t.assign(u,!0),t.if((0,je._)`${d} > 1`,()=>(l()?E:h)(d,y))}function l(){return m.length>0&&!m.some(d=>d==="object"||d==="array")}function E(d,y){const p=t.name("item"),f=(0,ys.checkDataTypes)(m,p,c.opts.strictNumbers,ys.DataType.Wrong),$=t.const("indices",(0,je._)`{}`);t.for((0,je._)`;${d}--;`,()=>{t.let(p,(0,je._)`${r}[${d}]`),t.if(f,(0,je._)`continue`),m.length>1&&t.if((0,je._)`typeof ${p} == "string"`,(0,je._)`${p} += "_"`),t.if((0,je._)`typeof ${$}[${p}] == "number"`,()=>{t.assign(y,(0,je._)`${$}[${p}]`),e.error(),t.assign(u,!1).break()}).code((0,je._)`${$}[${p}] = ${d}`)})}function h(d,y){const p=(0,cy.useFunc)(t,uy.default),f=t.name("outer");t.label(f).for((0,je._)`;${d}--;`,()=>t.for((0,je._)`${y} = ${d}; ${y}--;`,()=>t.if((0,je._)`${p}(${r}[${d}], ${r}[${y}])`,()=>{e.error(),t.assign(u,!1).break(f)})))}}};_o.default=ly;var So={};Object.defineProperty(So,"__esModule",{value:!0});const js=re,dy=fe,hy=Kn,my={message:"must be equal to constant",params:({schemaCode:e})=>(0,js._)`{allowedValue: ${e}}`},py={keyword:"const",$data:!0,error:my,code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,js._)`!${(0,dy.useFunc)(t,hy.default)}(${r}, ${i})`):e.fail((0,js._)`${s} !== ${r}`)}};So.default=py;var wo={};Object.defineProperty(wo,"__esModule",{value:!0});const gn=re,yy=fe,vy=Kn,Ey={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,gn._)`{allowedValues: ${e}}`},gy={keyword:"enum",schemaType:"array",$data:!0,error:Ey,code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");const c=i.length>=o.opts.loopEnum;let u;const m=()=>u??(u=(0,yy.useFunc)(t,vy.default));let a;if(c||n)a=t.let("valid"),e.block$data(a,l);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const h=t.const("vSchema",s);a=(0,gn.or)(...i.map((d,y)=>E(h,y)))}e.pass(a);function l(){t.assign(a,!1),t.forOf("v",s,h=>t.if((0,gn._)`${m()}(${r}, ${h})`,()=>t.assign(a,!0).break()))}function E(h,d){const y=i[d];return typeof y=="object"&&y!==null?(0,gn._)`${m()}(${r}, ${h}[${d}])`:(0,gn._)`${r} === ${y}`}}};wo.default=gy;Object.defineProperty(lo,"__esModule",{value:!0});const $y=ho,_y=mo,Sy=po,wy=vo,Ny=Eo,Iy=go,Oy=$o,Ty=_o,Dy=So,Cy=wo,Ry=[$y.default,_y.default,Sy.default,wy.default,Ny.default,Iy.default,Oy.default,Ty.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Dy.default,Cy.default];lo.default=Ry;var No={},rn={};Object.defineProperty(rn,"__esModule",{value:!0});rn.validateAdditionalItems=void 0;const dr=re,Ms=fe,Py={message:({params:{len:e}})=>(0,dr.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,dr._)`{limit: ${e}}`},Ay={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Py,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Ms.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}of(e,n)}};function of(e,t){const{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=!0;const c=r.const("len",(0,dr._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,dr._)`${c} <= ${t.length}`);else if(typeof n=="object"&&!(0,Ms.alwaysValidSchema)(o,n)){const m=r.var("valid",(0,dr._)`${c} <= ${t.length}`);r.if((0,dr.not)(m),()=>u(m)),e.ok(m)}function u(m){r.forRange("i",t.length,c,a=>{e.subschema({keyword:s,dataProp:a,dataPropType:Ms.Type.Num},m),o.allErrors||r.if((0,dr.not)(m),()=>r.break())})}}rn.validateAdditionalItems=of;rn.default=Ay;var Io={},nn={};Object.defineProperty(nn,"__esModule",{value:!0});nn.validateTuple=void 0;const Fa=re,pi=fe,by=ne,Ly={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return af(e,"additionalItems",t);r.items=!0,!(0,pi.alwaysValidSchema)(r,t)&&e.ok((0,by.validateArray)(e))}};function af(e,t,r=e.schema){const{gen:n,parentSchema:i,data:s,keyword:o,it:c}=e;a(i),c.opts.unevaluated&&r.length&&c.items!==!0&&(c.items=pi.mergeEvaluated.items(n,r.length,c.items));const u=n.name("valid"),m=n.const("len",(0,Fa._)`${s}.length`);r.forEach((l,E)=>{(0,pi.alwaysValidSchema)(c,l)||(n.if((0,Fa._)`${m} > ${E}`,()=>e.subschema({keyword:o,schemaProp:E,dataProp:E},u)),e.ok(u))});function a(l){const{opts:E,errSchemaPath:h}=c,d=r.length,y=d===l.minItems&&(d===l.maxItems||l[t]===!1);if(E.strictTuples&&!y){const p=`"${o}" is ${d}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,pi.checkStrictMode)(c,p,E.strictTuples)}}}nn.validateTuple=af;nn.default=Ly;Object.defineProperty(Io,"__esModule",{value:!0});const Fy=nn,jy={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Fy.validateTuple)(e,"items")};Io.default=jy;var Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});const ja=re,My=fe,ky=ne,Uy=rn,Vy={message:({params:{len:e}})=>(0,ja.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ja._)`{limit: ${e}}`},zy={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Vy,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,My.alwaysValidSchema)(n,t)&&(i?(0,Uy.validateAdditionalItems)(e,i):e.ok((0,ky.validateArray)(e)))}};Oo.default=zy;var To={};Object.defineProperty(To,"__esModule",{value:!0});const ft=re,ii=fe,xy={message:({params:{min:e,max:t}})=>t===void 0?(0,ft.str)`must contain at least ${e} valid item(s)`:(0,ft.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,ft._)`{minContains: ${e}}`:(0,ft._)`{minContains: ${e}, maxContains: ${t}}`},Gy={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:xy,code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;let o,c;const{minContains:u,maxContains:m}=n;s.opts.next?(o=u===void 0?1:u,c=m):o=1;const a=t.const("len",(0,ft._)`${i}.length`);if(e.setParams({min:o,max:c}),c===void 0&&o===0){(0,ii.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&o>c){(0,ii.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,ii.alwaysValidSchema)(s,r)){let y=(0,ft._)`${a} >= ${o}`;c!==void 0&&(y=(0,ft._)`${y} && ${a} <= ${c}`),e.pass(y);return}s.items=!0;const l=t.name("valid");c===void 0&&o===1?h(l,()=>t.if(l,()=>t.break())):o===0?(t.let(l,!0),c!==void 0&&t.if((0,ft._)`${i}.length > 0`,E)):(t.let(l,!1),E()),e.result(l,()=>e.reset());function E(){const y=t.name("_valid"),p=t.let("count",0);h(y,()=>t.if(y,()=>d(p)))}function h(y,p){t.forRange("i",0,a,f=>{e.subschema({keyword:"contains",dataProp:f,dataPropType:ii.Type.Num,compositeRule:!0},y),p()})}function d(y){t.code((0,ft._)`${y}++`),c===void 0?t.if((0,ft._)`${y} >= ${o}`,()=>t.assign(l,!0).break()):(t.if((0,ft._)`${y} > ${c}`,()=>t.assign(l,!1).break()),o===1?t.assign(l,!0):t.if((0,ft._)`${y} >= ${o}`,()=>t.assign(l,!0)))}}};To.default=Gy;var cf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=re,r=fe,n=ne;e.error={message:({params:{property:u,depsCount:m,deps:a}})=>{const l=m===1?"property":"properties";return(0,t.str)`must have ${l} ${a} when property ${u} is present`},params:({params:{property:u,depsCount:m,deps:a,missingProperty:l}})=>(0,t._)`{property: ${u},
12
12
  missingProperty: ${l},
13
13
  depsCount: ${m},
14
- deps: ${a}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[m,a]=s(u);o(u,m),c(u,a)}};function s({schema:u}){const m={},a={};for(const l in u){if(l==="__proto__")continue;const E=Array.isArray(u[l])?m:a;E[l]=u[l]}return[m,a]}function o(u,m=u.schema){const{gen:a,data:l,it:E}=u;if(Object.keys(m).length===0)return;const h=a.let("missing");for(const d in m){const v=m[d];if(v.length===0)continue;const p=(0,n.propertyInData)(a,l,d,E.opts.ownProperties);u.setParams({property:d,depsCount:v.length,deps:v.join(", ")}),E.allErrors?a.if(p,()=>{for(const f of v)(0,n.checkReportMissingProp)(u,f)}):(a.if((0,t._)`${p} && (${(0,n.checkMissingProp)(u,v,h)})`),(0,n.reportMissingProp)(u,h),a.else())}}e.validatePropertyDeps=o;function c(u,m=u.schema){const{gen:a,data:l,keyword:E,it:h}=u,d=a.name("valid");for(const v in m)(0,r.alwaysValidSchema)(h,m[v])||(a.if((0,n.propertyInData)(a,l,v,h.opts.ownProperties),()=>{const p=u.subschema({keyword:E,schemaProp:v},d);u.mergeValidEvaluated(p,d)},()=>a.var(d,!0)),u.ok(d))}e.validateSchemaDeps=c,e.default=i})(cf);var Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});const uf=re,Py=fe,Ay={message:"property name must be valid",params:({params:e})=>(0,uf._)`{propertyName: ${e.propertyName}}`},by={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Ay,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,Py.alwaysValidSchema)(i,r))return;const s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,uf.not)(s),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(s)}};Oo.default=by;var Ui={};Object.defineProperty(Ui,"__esModule",{value:!0});const ni=ne,ht=re,Ly=Lt,ii=fe,Fy={message:"must NOT have additional properties",params:({params:e})=>(0,ht._)`{additionalProperty: ${e.additionalProperty}}`},jy={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Fy,code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:c,opts:u}=o;if(o.props=!0,u.removeAdditional!=="all"&&(0,ii.alwaysValidSchema)(o,r))return;const m=(0,ni.allSchemaProperties)(n.properties),a=(0,ni.allSchemaProperties)(n.patternProperties);l(),e.ok((0,ht._)`${s} === ${Ly.default.errors}`);function l(){t.forIn("key",i,p=>{!m.length&&!a.length?d(p):t.if(E(p),()=>d(p))})}function E(p){let f;if(m.length>8){const $=(0,ii.schemaRefOrVal)(o,n.properties,"properties");f=(0,ni.isOwnProperty)(t,$,p)}else m.length?f=(0,ht.or)(...m.map($=>(0,ht._)`${p} === ${$}`)):f=ht.nil;return a.length&&(f=(0,ht.or)(f,...a.map($=>(0,ht._)`${(0,ni.usePattern)(e,$)}.test(${p})`))),(0,ht.not)(f)}function h(p){t.code((0,ht._)`delete ${i}[${p}]`)}function d(p){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){h(p);return}if(r===!1){e.setParams({additionalProperty:p}),e.error(),c||t.break();return}if(typeof r=="object"&&!(0,ii.alwaysValidSchema)(o,r)){const f=t.name("valid");u.removeAdditional==="failing"?(v(p,f,!1),t.if((0,ht.not)(f),()=>{e.reset(),h(p)})):(v(p,f),c||t.if((0,ht.not)(f),()=>t.break()))}}function v(p,f,$){const _={keyword:"additionalProperties",dataProp:p,dataPropType:ii.Type.Str};$===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(_,f)}}};Ui.default=jy;var To={};Object.defineProperty(To,"__esModule",{value:!0});const My=gt,Ma=ne,os=fe,ka=Ui,ky={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&ka.default.code(new My.KeywordCxt(s,ka.default,"additionalProperties"));const o=(0,Ma.allSchemaProperties)(r);for(const l of o)s.definedProperties.add(l);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=os.mergeEvaluated.props(t,(0,os.toHash)(o),s.props));const c=o.filter(l=>!(0,os.alwaysValidSchema)(s,r[l]));if(c.length===0)return;const u=t.name("valid");for(const l of c)m(l)?a(l):(t.if((0,Ma.propertyInData)(t,i,l,s.opts.ownProperties)),a(l),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(l),e.ok(u);function m(l){return s.opts.useDefaults&&!s.compositeRule&&r[l].default!==void 0}function a(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},u)}}};To.default=ky;var Do={};Object.defineProperty(Do,"__esModule",{value:!0});const Ua=ne,si=re,Va=fe,za=fe,Uy={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:o}=s,c=(0,Ua.allSchemaProperties)(r),u=c.filter(v=>(0,Va.alwaysValidSchema)(s,r[v]));if(c.length===0||u.length===c.length&&(!s.opts.unevaluated||s.props===!0))return;const m=o.strictSchema&&!o.allowMatchingProperties&&i.properties,a=t.name("valid");s.props!==!0&&!(s.props instanceof si.Name)&&(s.props=(0,za.evaluatedPropsToName)(t,s.props));const{props:l}=s;E();function E(){for(const v of c)m&&h(v),s.allErrors?d(v):(t.var(a,!0),d(v),t.if(a))}function h(v){for(const p in m)new RegExp(v).test(p)&&(0,Va.checkStrictMode)(s,`property ${p} matches pattern ${v} (use allowMatchingProperties)`)}function d(v){t.forIn("key",n,p=>{t.if((0,si._)`${(0,Ua.usePattern)(e,v)}.test(${p})`,()=>{const f=u.includes(v);f||e.subschema({keyword:"patternProperties",schemaProp:v,dataProp:p,dataPropType:za.Type.Str},a),s.opts.unevaluated&&l!==!0?t.assign((0,si._)`${l}[${p}]`,!0):!f&&!s.allErrors&&t.if((0,si.not)(a),()=>t.break())})})}}};Do.default=Uy;var Co={};Object.defineProperty(Co,"__esModule",{value:!0});const Vy=fe,zy={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,Vy.alwaysValidSchema)(n,r)){e.fail();return}const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Co.default=zy;var Ro={};Object.defineProperty(Ro,"__esModule",{value:!0});const xy=ne,Gy={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:xy.validateUnion,error:{message:"must match a schema in anyOf"}};Ro.default=Gy;var Po={};Object.defineProperty(Po,"__esModule",{value:!0});const mi=re,By=fe,Hy={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,mi._)`{passingSchemas: ${e.passing}}`},qy={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Hy,code(e){const{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const s=r,o=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block(m),e.result(o,()=>e.reset(),()=>e.error(!0));function m(){s.forEach((a,l)=>{let E;(0,By.alwaysValidSchema)(i,a)?t.var(u,!0):E=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},u),l>0&&t.if((0,mi._)`${u} && ${o}`).assign(o,!1).assign(c,(0,mi._)`[${c}, ${l}]`).else(),t.if(u,()=>{t.assign(o,!0),t.assign(c,l),E&&e.mergeEvaluated(E,mi.Name)})})}}};Po.default=qy;var Ao={};Object.defineProperty(Ao,"__esModule",{value:!0});const Ky=fe,Wy={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach((s,o)=>{if((0,Ky.alwaysValidSchema)(n,s))return;const c=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i),e.mergeEvaluated(c)})}};Ao.default=Wy;var bo={};Object.defineProperty(bo,"__esModule",{value:!0});const Ii=re,ff=fe,Zy={message:({params:e})=>(0,Ii.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Ii._)`{failingKeyword: ${e.ifClause}}`},Xy={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Zy,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,ff.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=xa(n,"then"),s=xa(n,"else");if(!i&&!s)return;const o=t.let("valid",!0),c=t.name("_valid");if(u(),e.reset(),i&&s){const a=t.let("ifClause");e.setParams({ifClause:a}),t.if(c,m("then",a),m("else",a))}else i?t.if(c,m("then")):t.if((0,Ii.not)(c),m("else"));e.pass(o,()=>e.error(!0));function u(){const a=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);e.mergeEvaluated(a)}function m(a,l){return()=>{const E=e.subschema({keyword:a},c);t.assign(o,c),e.mergeValidEvaluated(E,o),l?t.assign(l,(0,Ii._)`${a}`):e.setParams({ifClause:a})}}}};function xa(e,t){const r=e.schema[t];return r!==void 0&&!(0,ff.alwaysValidSchema)(e,r)}bo.default=Xy;var Lo={};Object.defineProperty(Lo,"__esModule",{value:!0});const Jy=fe,Yy={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Jy.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Lo.default=Yy;Object.defineProperty(So,"__esModule",{value:!0});const Qy=tn,e0=wo,t0=rn,r0=No,n0=Io,i0=cf,s0=Oo,o0=Ui,a0=To,c0=Do,u0=Co,f0=Ro,l0=Po,d0=Ao,h0=bo,m0=Lo;function p0(e=!1){const t=[u0.default,f0.default,l0.default,d0.default,h0.default,m0.default,s0.default,o0.default,i0.default,a0.default,c0.default];return e?t.push(e0.default,r0.default):t.push(Qy.default,t0.default),t.push(n0.default),t}So.default=p0;var Fo={},jo={};Object.defineProperty(jo,"__esModule",{value:!0});const De=re,y0={message:({schemaCode:e})=>(0,De.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,De._)`{format: ${e}}`},v0={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:y0,code(e,t){const{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:c}=e,{opts:u,errSchemaPath:m,schemaEnv:a,self:l}=c;if(!u.validateFormats)return;i?E():h();function E(){const d=r.scopeValue("formats",{ref:l.formats,code:u.code.formats}),v=r.const("fDef",(0,De._)`${d}[${o}]`),p=r.let("fType"),f=r.let("format");r.if((0,De._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(p,(0,De._)`${v}.type || "string"`).assign(f,(0,De._)`${v}.validate`),()=>r.assign(p,(0,De._)`"string"`).assign(f,v)),e.fail$data((0,De.or)($(),_()));function $(){return u.strictSchema===!1?De.nil:(0,De._)`${o} && !${f}`}function _(){const D=a.$async?(0,De._)`(${v}.async ? await ${f}(${n}) : ${f}(${n}))`:(0,De._)`${f}(${n})`,z=(0,De._)`(typeof ${f} == "function" ? ${D} : ${f}.test(${n}))`;return(0,De._)`${f} && ${f} !== true && ${p} === ${t} && !${z}`}}function h(){const d=l.formats[s];if(!d){$();return}if(d===!0)return;const[v,p,f]=_(d);v===t&&e.pass(D());function $(){if(u.strictSchema===!1){l.logger.warn(z());return}throw new Error(z());function z(){return`unknown format "${s}" ignored in schema at path "${m}"`}}function _(z){const T=z instanceof RegExp?(0,De.regexpCode)(z):u.code.formats?(0,De._)`${u.code.formats}${(0,De.getProperty)(s)}`:void 0,C=r.scopeValue("formats",{key:s,ref:z,code:T});return typeof z=="object"&&!(z instanceof RegExp)?[z.type||"string",z.validate,(0,De._)`${C}.validate`]:["string",z,C]}function D(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!a.$async)throw new Error("async format in sync schema");return(0,De._)`await ${f}(${n})`}return typeof p=="function"?(0,De._)`${f}(${n})`:(0,De._)`${f}.test(${n})`}}}};jo.default=v0;Object.defineProperty(Fo,"__esModule",{value:!0});const E0=jo,g0=[E0.default];Fo.default=g0;var Yr={};Object.defineProperty(Yr,"__esModule",{value:!0});Yr.contentVocabulary=Yr.metadataVocabulary=void 0;Yr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Yr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(oo,"__esModule",{value:!0});const $0=ao,_0=uo,S0=So,w0=Fo,Ga=Yr,N0=[$0.default,_0.default,(0,S0.default)(),w0.default,Ga.metadataVocabulary,Ga.contentVocabulary];oo.default=N0;var Mo={},lf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(lf);Object.defineProperty(Mo,"__esModule",{value:!0});const jr=re,Ds=lf,Ba=tt,I0=fe,O0={message:({params:{discrError:e,tagName:t}})=>e===Ds.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,jr._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},T0={keyword:"discriminator",type:"object",schemaType:"object",error:O0,code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:o}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const c=n.propertyName;if(typeof c!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),m=t.const("tag",(0,jr._)`${r}${(0,jr.getProperty)(c)}`);t.if((0,jr._)`typeof ${m} == "string"`,()=>a(),()=>e.error(!1,{discrError:Ds.DiscrError.Tag,tag:m,tagName:c})),e.ok(u);function a(){const h=E();t.if(!1);for(const d in h)t.elseIf((0,jr._)`${m} === ${d}`),t.assign(u,l(h[d]));t.else(),e.error(!1,{discrError:Ds.DiscrError.Mapping,tag:m,tagName:c}),t.endIf()}function l(h){const d=t.name("valid"),v=e.subschema({keyword:"oneOf",schemaProp:h},d);return e.mergeEvaluated(v,jr.Name),d}function E(){var h;const d={},v=f(i);let p=!0;for(let D=0;D<o.length;D++){let z=o[D];z!=null&&z.$ref&&!(0,I0.schemaHasRulesButRef)(z,s.self.RULES)&&(z=Ba.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,z==null?void 0:z.$ref),z instanceof Ba.SchemaEnv&&(z=z.schema));const T=(h=z==null?void 0:z.properties)===null||h===void 0?void 0:h[c];if(typeof T!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${c}"`);p=p&&(v||f(z)),$(T,D)}if(!p)throw new Error(`discriminator: "${c}" must be required`);return d;function f({required:D}){return Array.isArray(D)&&D.includes(c)}function $(D,z){if(D.const)_(D.const,z);else if(D.enum)for(const T of D.enum)_(T,z);else throw new Error(`discriminator: "properties/${c}" must have "const" or "enum"`)}function _(D,z){if(typeof D!="string"||D in d)throw new Error(`discriminator: "${c}" values must be unique strings`);d[D]=z}}}};Mo.default=T0;const D0="http://json-schema.org/draft-07/schema#",C0="http://json-schema.org/draft-07/schema#",R0="Core schema meta-schema",P0={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},A0=["object","boolean"],b0={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},L0={$schema:D0,$id:C0,title:R0,definitions:P0,type:A0,properties:b0,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=Pu,n=oo,i=Mo,s=L0,o=["/properties"],c="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(d=>this.addVocabulary(d)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const d=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(d,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var m=gt;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return m.KeywordCxt}});var a=re;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return a.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return a.CodeGen}});var l=Gn;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var E=Bn;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return E.default}})})($i,$i.exports);var Cs={exports:{}},df={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(P,x){return{validate:P,compare:x}}e.fullFormats={date:t(s,o),time:t(u,m),"date-time":t(l,E),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:v,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:V,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:f,int32:{type:"number",validate:D},int64:{type:"number",validate:z},float:{type:"number",validate:T},double:{type:"number",validate:T},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,E),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(P){return P%4===0&&(P%100!==0||P%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(P){const x=n.exec(P);if(!x)return!1;const M=+x[1],A=+x[2],H=+x[3];return A>=1&&A<=12&&H>=1&&H<=(A===2&&r(M)?29:i[A])}function o(P,x){if(!!(P&&x))return P>x?1:P<x?-1:0}const c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(P,x){const M=c.exec(P);if(!M)return!1;const A=+M[1],H=+M[2],G=+M[3],q=M[5];return(A<=23&&H<=59&&G<=59||A===23&&H===59&&G===60)&&(!x||q!=="")}function m(P,x){if(!(P&&x))return;const M=c.exec(P),A=c.exec(x);if(!!(M&&A))return P=M[1]+M[2]+M[3]+(M[4]||""),x=A[1]+A[2]+A[3]+(A[4]||""),P>x?1:P<x?-1:0}const a=/t|\s/i;function l(P){const x=P.split(a);return x.length===2&&s(x[0])&&u(x[1],!0)}function E(P,x){if(!(P&&x))return;const[M,A]=P.split(a),[H,G]=x.split(a),q=o(M,H);if(q!==void 0)return q||m(A,G)}const h=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function v(P){return h.test(P)&&d.test(P)}const p=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function f(P){return p.lastIndex=0,p.test(P)}const $=-(2**31),_=2**31-1;function D(P){return Number.isInteger(P)&&P<=_&&P>=$}function z(P){return Number.isInteger(P)}function T(){return!0}const C=/[^\\]\\Z/;function V(P){if(C.test(P))return!1;try{return new RegExp(P),!0}catch{return!1}}})(df);var hf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=$i.exports,r=re,n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:c,schemaCode:u})=>r.str`should be ${i[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>r._`{comparison: ${i[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:u,data:m,schemaCode:a,keyword:l,it:E}=c,{opts:h,self:d}=E;if(!h.validateFormats)return;const v=new t.KeywordCxt(E,d.RULES.all.format.definition,"format");v.$data?p():f();function p(){const _=u.scopeValue("formats",{ref:d.formats,code:h.code.formats}),D=u.const("fmt",r._`${_}[${v.schemaCode}]`);c.fail$data(r.or(r._`typeof ${D} != "object"`,r._`${D} instanceof RegExp`,r._`typeof ${D}.compare != "function"`,$(D)))}function f(){const _=v.schema,D=d.formats[_];if(!D||D===!0)return;if(typeof D!="object"||D instanceof RegExp||typeof D.compare!="function")throw new Error(`"${l}": format "${_}" does not define "compare" function`);const z=u.scopeValue("formats",{key:_,ref:D,code:h.code.formats?r._`${h.code.formats}${r.getProperty(_)}`:void 0});c.fail$data($(z))}function $(_){return r._`${_}.compare(${m}, ${a}) ${i[l].fail} 0`}},dependencies:["format"]};const o=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=o})(hf);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=df,n=hf,i=re,s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),c=(m,a={keywords:!0})=>{if(Array.isArray(a))return u(m,a,r.fullFormats,s),m;const[l,E]=a.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,s],h=a.formats||r.formatNames;return u(m,h,l,E),a.keywords&&n.default(m),m};c.get=(m,a="full")=>{const E=(a==="fast"?r.fastFormats:r.fullFormats)[m];if(!E)throw new Error(`Unknown format "${m}"`);return E};function u(m,a,l,E){var h,d;(h=(d=m.opts.code).formats)!==null&&h!==void 0||(d.formats=i._`require("ajv-formats/dist/formats").${E}`);for(const v of a)m.addFormat(v,l[v])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(Cs,Cs.exports);const F0=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const i=Object.getOwnPropertyDescriptor(e,r),s=Object.getOwnPropertyDescriptor(t,r);!j0(i,s)&&n||Object.defineProperty(e,r,s)},j0=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},M0=(e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},k0=(e,t)=>`/* Wrapped ${e}*/
15
- ${t}`,U0=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),V0=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),z0=(e,t,r)=>{const n=r===""?"":`with ${r.trim()}() `,i=k0.bind(null,n,t.toString());Object.defineProperty(i,"name",V0),Object.defineProperty(e,"toString",{...U0,value:i})},x0=(e,t,{ignoreNonConfigurable:r=!1}={})=>{const{name:n}=e;for(const i of Reflect.ownKeys(t))F0(e,t,i,r);return M0(e,t),z0(e,t,n),e};var G0=x0;const B0=G0;var H0=(e,t={})=>{if(typeof e!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);const{wait:r=0,before:n=!1,after:i=!0}=t;if(!n&&!i)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let s,o;const c=function(...u){const m=this,a=()=>{s=void 0,i&&(o=e.apply(m,u))},l=n&&!s;return clearTimeout(s),s=setTimeout(a,r),l&&(o=e.apply(m,u)),o};return B0(c,e),c.cancel=()=>{s&&(clearTimeout(s),s=void 0)},c},rr={exports:{}};const q0="2.0.0",K0=256,W0=Number.MAX_SAFE_INTEGER||9007199254740991,Z0=16;var Vi={SEMVER_SPEC_VERSION:q0,MAX_LENGTH:K0,MAX_SAFE_INTEGER:W0,MAX_SAFE_COMPONENT_LENGTH:Z0};const X0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var zi=X0;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r}=Vi,n=zi;t=e.exports={};const i=t.re=[],s=t.src=[],o=t.t={};let c=0;const u=(m,a,l)=>{const E=c++;n(m,E,a),o[m]=E,s[E]=a,i[E]=new RegExp(a,l?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${s[o.NUMERICIDENTIFIER]})\\.(${s[o.NUMERICIDENTIFIER]})\\.(${s[o.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${s[o.NUMERICIDENTIFIERLOOSE]})\\.(${s[o.NUMERICIDENTIFIERLOOSE]})\\.(${s[o.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${s[o.NUMERICIDENTIFIER]}|${s[o.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${s[o.NUMERICIDENTIFIERLOOSE]}|${s[o.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${s[o.PRERELEASEIDENTIFIER]}(?:\\.${s[o.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${s[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[o.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${s[o.BUILDIDENTIFIER]}(?:\\.${s[o.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${s[o.MAINVERSION]}${s[o.PRERELEASE]}?${s[o.BUILD]}?`),u("FULL",`^${s[o.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${s[o.MAINVERSIONLOOSE]}${s[o.PRERELEASELOOSE]}?${s[o.BUILD]}?`),u("LOOSE",`^${s[o.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${s[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${s[o.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${s[o.XRANGEIDENTIFIER]})(?:\\.(${s[o.XRANGEIDENTIFIER]})(?:\\.(${s[o.XRANGEIDENTIFIER]})(?:${s[o.PRERELEASE]})?${s[o.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${s[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[o.XRANGEIDENTIFIERLOOSE]})(?:${s[o.PRERELEASELOOSE]})?${s[o.BUILD]}?)?)?`),u("XRANGE",`^${s[o.GTLT]}\\s*${s[o.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${s[o.GTLT]}\\s*${s[o.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",s[o.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${s[o.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${s[o.LONETILDE]}${s[o.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${s[o.LONETILDE]}${s[o.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${s[o.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${s[o.LONECARET]}${s[o.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${s[o.LONECARET]}${s[o.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${s[o.GTLT]}\\s*(${s[o.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${s[o.GTLT]}\\s*(${s[o.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${s[o.GTLT]}\\s*(${s[o.LOOSEPLAIN]}|${s[o.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${s[o.XRANGEPLAIN]})\\s+-\\s+(${s[o.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${s[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[o.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(rr,rr.exports);const J0=["includePrerelease","loose","rtl"],Y0=e=>e?typeof e!="object"?{loose:!0}:J0.filter(t=>e[t]).reduce((t,r)=>(t[r]=!0,t),{}):{};var xi=Y0;const Ha=/^[0-9]+$/,mf=(e,t)=>{const r=Ha.test(e),n=Ha.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},Q0=(e,t)=>mf(t,e);var pf={compareIdentifiers:mf,rcompareIdentifiers:Q0};const oi=zi,{MAX_LENGTH:qa,MAX_SAFE_INTEGER:ai}=Vi,{re:Ka,t:Wa}=rr.exports,ev=xi,{compareIdentifiers:Lr}=pf;let Ct=class{constructor(t,r){if(r=ev(r),t instanceof Ct){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid Version: ${t}`);if(t.length>qa)throw new TypeError(`version is longer than ${qa} characters`);oi("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Ka[Wa.LOOSE]:Ka[Wa.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ai||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ai||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ai||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s<ai)return s}return i}):this.prerelease=[],this.build=n[5]?n[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(oi("SemVer.compare",this.version,this.options,t),!(t instanceof Ct)){if(typeof t=="string"&&t===this.version)return 0;t=new Ct(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Ct||(t=new Ct(t,this.options)),Lr(this.major,t.major)||Lr(this.minor,t.minor)||Lr(this.patch,t.patch)}comparePre(t){if(t instanceof Ct||(t=new Ct(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 r=0;do{const n=this.prerelease[r],i=t.prerelease[r];if(oi("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Lr(n,i)}while(++r)}compareBuild(t){t instanceof Ct||(t=new Ct(t,this.options));let r=0;do{const n=this.build[r],i=t.build[r];if(oi("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Lr(n,i)}while(++r)}inc(t,r){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}r&&(Lr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${t}`)}return this.format(),this.raw=this.version,this}};var Je=Ct;const{MAX_LENGTH:tv}=Vi,{re:Za,t:Xa}=rr.exports,Ja=Je,rv=xi,nv=(e,t)=>{if(t=rv(t),e instanceof Ja)return e;if(typeof e!="string"||e.length>tv||!(t.loose?Za[Xa.LOOSE]:Za[Xa.FULL]).test(e))return null;try{return new Ja(e,t)}catch{return null}};var nn=nv;const iv=nn,sv=(e,t)=>{const r=iv(e,t);return r?r.version:null};var ov=sv;const av=nn,cv=(e,t)=>{const r=av(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var uv=cv;const Ya=Je,fv=(e,t,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new Ya(e instanceof Ya?e.version:e,r).inc(t,n).version}catch{return null}};var lv=fv;const Qa=Je,dv=(e,t,r)=>new Qa(e,r).compare(new Qa(t,r));var $t=dv;const hv=$t,mv=(e,t,r)=>hv(e,t,r)===0;var ko=mv;const ec=nn,pv=ko,yv=(e,t)=>{if(pv(e,t))return null;{const r=ec(e),n=ec(t),i=r.prerelease.length||n.prerelease.length,s=i?"pre":"",o=i?"prerelease":"";for(const c in r)if((c==="major"||c==="minor"||c==="patch")&&r[c]!==n[c])return s+c;return o}};var vv=yv;const Ev=Je,gv=(e,t)=>new Ev(e,t).major;var $v=gv;const _v=Je,Sv=(e,t)=>new _v(e,t).minor;var wv=Sv;const Nv=Je,Iv=(e,t)=>new Nv(e,t).patch;var Ov=Iv;const Tv=nn,Dv=(e,t)=>{const r=Tv(e,t);return r&&r.prerelease.length?r.prerelease:null};var Cv=Dv;const Rv=$t,Pv=(e,t,r)=>Rv(t,e,r);var Av=Pv;const bv=$t,Lv=(e,t)=>bv(e,t,!0);var Fv=Lv;const tc=Je,jv=(e,t,r)=>{const n=new tc(e,r),i=new tc(t,r);return n.compare(i)||n.compareBuild(i)};var Uo=jv;const Mv=Uo,kv=(e,t)=>e.sort((r,n)=>Mv(r,n,t));var Uv=kv;const Vv=Uo,zv=(e,t)=>e.sort((r,n)=>Vv(n,r,t));var xv=zv;const Gv=$t,Bv=(e,t,r)=>Gv(e,t,r)>0;var Gi=Bv;const Hv=$t,qv=(e,t,r)=>Hv(e,t,r)<0;var Vo=qv;const Kv=$t,Wv=(e,t,r)=>Kv(e,t,r)!==0;var yf=Wv;const Zv=$t,Xv=(e,t,r)=>Zv(e,t,r)>=0;var zo=Xv;const Jv=$t,Yv=(e,t,r)=>Jv(e,t,r)<=0;var xo=Yv;const Qv=ko,eE=yf,tE=Gi,rE=zo,nE=Vo,iE=xo,sE=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return Qv(e,r,n);case"!=":return eE(e,r,n);case">":return tE(e,r,n);case">=":return rE(e,r,n);case"<":return nE(e,r,n);case"<=":return iE(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var vf=sE;const oE=Je,aE=nn,{re:ci,t:ui}=rr.exports,cE=(e,t)=>{if(e instanceof oE)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(ci[ui.COERCE]);else{let n;for(;(n=ci[ui.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),ci[ui.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;ci[ui.COERCERTL].lastIndex=-1}return r===null?null:aE(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};var uE=cE,as,rc;function fE(){return rc||(rc=1,as=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),as}var lE=le;le.Node=$r;le.create=le;function le(e){var t=this;if(t instanceof le||(t=new le),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(i){t.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)t.push(arguments[r]);return t}le.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t};le.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};le.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};le.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)hE(this,arguments[e]);return this.length};le.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)mE(this,arguments[e]);return this.length};le.prototype.pop=function(){if(!!this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};le.prototype.shift=function(){if(!!this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};le.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;r!==null;n++)e.call(t,r.value,n,this),r=r.next};le.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;r!==null;n--)e.call(t,r.value,n,this),r=r.prev};le.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++)r=r.next;if(t===e&&r!==null)return r.value};le.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++)r=r.prev;if(t===e&&r!==null)return r.value};le.prototype.map=function(e,t){t=t||this;for(var r=new le,n=this.head;n!==null;)r.push(e.call(t,n.value,this)),n=n.next;return r};le.prototype.mapReverse=function(e,t){t=t||this;for(var r=new le,n=this.tail;n!==null;)r.push(e.call(t,n.value,this)),n=n.prev;return r};le.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=e(r,n.value,i),n=n.next;return r};le.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=e(r,n.value,i),n=n.prev;return r};le.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};le.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};le.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new le;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=0,i=this.head;i!==null&&n<e;n++)i=i.next;for(;i!==null&&n<t;n++,i=i.next)r.push(i.value);return r};le.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new le;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=this.length,i=this.tail;i!==null&&n>t;n--)i=i.prev;for(;i!==null&&n>e;n--,i=i.prev)r.push(i.value);return r};le.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;i!==null&&n<e;n++)i=i.next;for(var s=[],n=0;i&&n<t;n++)s.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=dE(this,i,r[n]);return s};le.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};function dE(e,t,r){var n=t===e.head?new $r(r,null,t,e):new $r(r,t,t.next,e);return n.next===null&&(e.tail=n),n.prev===null&&(e.head=n),e.length++,n}function hE(e,t){e.tail=new $r(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function mE(e,t){e.head=new $r(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function $r(e,t,r,n){if(!(this instanceof $r))return new $r(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{fE()(le)}catch{}const pE=lE,hr=Symbol("max"),Mt=Symbol("length"),Fr=Symbol("lengthCalculator"),Dn=Symbol("allowStale"),mr=Symbol("maxAge"),jt=Symbol("dispose"),nc=Symbol("noDisposeOnSet"),be=Symbol("lruList"),mt=Symbol("cache"),Ef=Symbol("updateAgeOnGet"),cs=()=>1;class yE{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[hr]=t.max||1/0;const r=t.length||cs;if(this[Fr]=typeof r!="function"?cs:r,this[Dn]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[mr]=t.maxAge||0,this[jt]=t.dispose,this[nc]=t.noDisposeOnSet||!1,this[Ef]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[hr]=t||1/0,vn(this)}get max(){return this[hr]}set allowStale(t){this[Dn]=!!t}get allowStale(){return this[Dn]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[mr]=t,vn(this)}get maxAge(){return this[mr]}set lengthCalculator(t){typeof t!="function"&&(t=cs),t!==this[Fr]&&(this[Fr]=t,this[Mt]=0,this[be].forEach(r=>{r.length=this[Fr](r.value,r.key),this[Mt]+=r.length})),vn(this)}get lengthCalculator(){return this[Fr]}get length(){return this[Mt]}get itemCount(){return this[be].length}rforEach(t,r){r=r||this;for(let n=this[be].tail;n!==null;){const i=n.prev;ic(this,t,n,r),n=i}}forEach(t,r){r=r||this;for(let n=this[be].head;n!==null;){const i=n.next;ic(this,t,n,r),n=i}}keys(){return this[be].toArray().map(t=>t.key)}values(){return this[be].toArray().map(t=>t.value)}reset(){this[jt]&&this[be]&&this[be].length&&this[be].forEach(t=>this[jt](t.key,t.value)),this[mt]=new Map,this[be]=new pE,this[Mt]=0}dump(){return this[be].map(t=>Oi(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[be]}set(t,r,n){if(n=n||this[mr],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[Fr](r,t);if(this[mt].has(t)){if(s>this[hr])return xr(this,this[mt].get(t)),!1;const u=this[mt].get(t).value;return this[jt]&&(this[nc]||this[jt](t,u.value)),u.now=i,u.maxAge=n,u.value=r,this[Mt]+=s-u.length,u.length=s,this.get(t),vn(this),!0}const o=new vE(t,r,s,i,n);return o.length>this[hr]?(this[jt]&&this[jt](t,r),!1):(this[Mt]+=o.length,this[be].unshift(o),this[mt].set(t,this[be].head),vn(this),!0)}has(t){if(!this[mt].has(t))return!1;const r=this[mt].get(t).value;return!Oi(this,r)}get(t){return us(this,t,!0)}peek(t){return us(this,t,!1)}pop(){const t=this[be].tail;return t?(xr(this,t),t.value):null}del(t){xr(this,this[mt].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const i=t[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const o=s-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[mt].forEach((t,r)=>us(this,r,!1))}}const us=(e,t,r)=>{const n=e[mt].get(t);if(n){const i=n.value;if(Oi(e,i)){if(xr(e,n),!e[Dn])return}else r&&(e[Ef]&&(n.value.now=Date.now()),e[be].unshiftNode(n));return i.value}},Oi=(e,t)=>{if(!t||!t.maxAge&&!e[mr])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[mr]&&r>e[mr]},vn=e=>{if(e[Mt]>e[hr])for(let t=e[be].tail;e[Mt]>e[hr]&&t!==null;){const r=t.prev;xr(e,t),t=r}},xr=(e,t)=>{if(t){const r=t.value;e[jt]&&e[jt](r.key,r.value),e[Mt]-=r.length,e[mt].delete(r.key),e[be].removeNode(t)}};class vE{constructor(t,r,n,i,s){this.key=t,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const ic=(e,t,r,n)=>{let i=r.value;Oi(e,i)&&(xr(e,r),e[Dn]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};var EE=yE,fs,sc;function _t(){if(sc)return fs;sc=1;class e{constructor(A,H){if(H=n(H),A instanceof e)return A.loose===!!H.loose&&A.includePrerelease===!!H.includePrerelease?A:new e(A.raw,H);if(A instanceof i)return this.raw=A.value,this.set=[[A]],this.format(),this;if(this.options=H,this.loose=!!H.loose,this.includePrerelease=!!H.includePrerelease,this.raw=A,this.set=A.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${A}`);if(this.set.length>1){const G=this.set[0];if(this.set=this.set.filter(q=>!E(q[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(const q of this.set)if(q.length===1&&h(q[0])){this.set=[q];break}}}this.format()}format(){return this.range=this.set.map(A=>A.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(A){A=A.trim();const G=`parseRange:${Object.keys(this.options).join(",")}:${A}`,q=r.get(G);if(q)return q;const K=this.options.loose,B=K?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];A=A.replace(B,P(this.options.includePrerelease)),s("hyphen replace",A),A=A.replace(c[u.COMPARATORTRIM],m),s("comparator trim",A),A=A.replace(c[u.TILDETRIM],a),A=A.replace(c[u.CARETTRIM],l),A=A.split(/\s+/).join(" ");let b=A.split(" ").map(F=>v(F,this.options)).join(" ").split(/\s+/).map(F=>V(F,this.options));K&&(b=b.filter(F=>(s("loose invalid filter",F,this.options),!!F.match(c[u.COMPARATORLOOSE])))),s("range list",b);const k=new Map,O=b.map(F=>new i(F,this.options));for(const F of O){if(E(F))return[F];k.set(F.value,F)}k.size>1&&k.has("")&&k.delete("");const I=[...k.values()];return r.set(G,I),I}intersects(A,H){if(!(A instanceof e))throw new TypeError("a Range is required");return this.set.some(G=>d(G,H)&&A.set.some(q=>d(q,H)&&G.every(K=>q.every(B=>K.intersects(B,H)))))}test(A){if(!A)return!1;if(typeof A=="string")try{A=new o(A,this.options)}catch{return!1}for(let H=0;H<this.set.length;H++)if(x(this.set[H],A,this.options))return!0;return!1}}fs=e;const t=EE,r=new t({max:1e3}),n=xi,i=Bi(),s=zi,o=Je,{re:c,t:u,comparatorTrimReplace:m,tildeTrimReplace:a,caretTrimReplace:l}=rr.exports,E=M=>M.value==="<0.0.0-0",h=M=>M.value==="",d=(M,A)=>{let H=!0;const G=M.slice();let q=G.pop();for(;H&&G.length;)H=G.every(K=>q.intersects(K,A)),q=G.pop();return H},v=(M,A)=>(s("comp",M,A),M=_(M,A),s("caret",M),M=f(M,A),s("tildes",M),M=z(M,A),s("xrange",M),M=C(M,A),s("stars",M),M),p=M=>!M||M.toLowerCase()==="x"||M==="*",f=(M,A)=>M.trim().split(/\s+/).map(H=>$(H,A)).join(" "),$=(M,A)=>{const H=A.loose?c[u.TILDELOOSE]:c[u.TILDE];return M.replace(H,(G,q,K,B,b)=>{s("tilde",M,G,q,K,B,b);let k;return p(q)?k="":p(K)?k=`>=${q}.0.0 <${+q+1}.0.0-0`:p(B)?k=`>=${q}.${K}.0 <${q}.${+K+1}.0-0`:b?(s("replaceTilde pr",b),k=`>=${q}.${K}.${B}-${b} <${q}.${+K+1}.0-0`):k=`>=${q}.${K}.${B} <${q}.${+K+1}.0-0`,s("tilde return",k),k})},_=(M,A)=>M.trim().split(/\s+/).map(H=>D(H,A)).join(" "),D=(M,A)=>{s("caret",M,A);const H=A.loose?c[u.CARETLOOSE]:c[u.CARET],G=A.includePrerelease?"-0":"";return M.replace(H,(q,K,B,b,k)=>{s("caret",M,q,K,B,b,k);let O;return p(K)?O="":p(B)?O=`>=${K}.0.0${G} <${+K+1}.0.0-0`:p(b)?K==="0"?O=`>=${K}.${B}.0${G} <${K}.${+B+1}.0-0`:O=`>=${K}.${B}.0${G} <${+K+1}.0.0-0`:k?(s("replaceCaret pr",k),K==="0"?B==="0"?O=`>=${K}.${B}.${b}-${k} <${K}.${B}.${+b+1}-0`:O=`>=${K}.${B}.${b}-${k} <${K}.${+B+1}.0-0`:O=`>=${K}.${B}.${b}-${k} <${+K+1}.0.0-0`):(s("no pr"),K==="0"?B==="0"?O=`>=${K}.${B}.${b}${G} <${K}.${B}.${+b+1}-0`:O=`>=${K}.${B}.${b}${G} <${K}.${+B+1}.0-0`:O=`>=${K}.${B}.${b} <${+K+1}.0.0-0`),s("caret return",O),O})},z=(M,A)=>(s("replaceXRanges",M,A),M.split(/\s+/).map(H=>T(H,A)).join(" ")),T=(M,A)=>{M=M.trim();const H=A.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return M.replace(H,(G,q,K,B,b,k)=>{s("xRange",M,G,q,K,B,b,k);const O=p(K),I=O||p(B),F=I||p(b),R=F;return q==="="&&R&&(q=""),k=A.includePrerelease?"-0":"",O?q===">"||q==="<"?G="<0.0.0-0":G="*":q&&R?(I&&(B=0),b=0,q===">"?(q=">=",I?(K=+K+1,B=0,b=0):(B=+B+1,b=0)):q==="<="&&(q="<",I?K=+K+1:B=+B+1),q==="<"&&(k="-0"),G=`${q+K}.${B}.${b}${k}`):I?G=`>=${K}.0.0${k} <${+K+1}.0.0-0`:F&&(G=`>=${K}.${B}.0${k} <${K}.${+B+1}.0-0`),s("xRange return",G),G})},C=(M,A)=>(s("replaceStars",M,A),M.trim().replace(c[u.STAR],"")),V=(M,A)=>(s("replaceGTE0",M,A),M.trim().replace(c[A.includePrerelease?u.GTE0PRE:u.GTE0],"")),P=M=>(A,H,G,q,K,B,b,k,O,I,F,R,y)=>(p(G)?H="":p(q)?H=`>=${G}.0.0${M?"-0":""}`:p(K)?H=`>=${G}.${q}.0${M?"-0":""}`:B?H=`>=${H}`:H=`>=${H}${M?"-0":""}`,p(O)?k="":p(I)?k=`<${+O+1}.0.0-0`:p(F)?k=`<${O}.${+I+1}.0-0`:R?k=`<=${O}.${I}.${F}-${R}`:M?k=`<${O}.${I}.${+F+1}-0`:k=`<=${k}`,`${H} ${k}`.trim()),x=(M,A,H)=>{for(let G=0;G<M.length;G++)if(!M[G].test(A))return!1;if(A.prerelease.length&&!H.includePrerelease){for(let G=0;G<M.length;G++)if(s(M[G].semver),M[G].semver!==i.ANY&&M[G].semver.prerelease.length>0){const q=M[G].semver;if(q.major===A.major&&q.minor===A.minor&&q.patch===A.patch)return!0}return!1}return!0};return fs}var ls,oc;function Bi(){if(oc)return ls;oc=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(a,l){if(l=r(l),a instanceof t){if(a.loose===!!l.loose)return a;a=a.value}o("comparator",a,l),this.options=l,this.loose=!!l.loose,this.parse(a),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(a){const l=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],E=a.match(l);if(!E)throw new TypeError(`Invalid comparator: ${a}`);this.operator=E[1]!==void 0?E[1]:"",this.operator==="="&&(this.operator=""),E[2]?this.semver=new c(E[2],this.options.loose):this.semver=e}toString(){return this.value}test(a){if(o("Comparator.test",a,this.options.loose),this.semver===e||a===e)return!0;if(typeof a=="string")try{a=new c(a,this.options)}catch{return!1}return s(a,this.operator,this.semver,this.options)}intersects(a,l){if(!(a instanceof t))throw new TypeError("a Comparator is required");if((!l||typeof l!="object")&&(l={loose:!!l,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new u(a.value,l).test(this.value);if(a.operator==="")return a.value===""?!0:new u(this.value,l).test(a.semver);const E=(this.operator===">="||this.operator===">")&&(a.operator===">="||a.operator===">"),h=(this.operator==="<="||this.operator==="<")&&(a.operator==="<="||a.operator==="<"),d=this.semver.version===a.semver.version,v=(this.operator===">="||this.operator==="<=")&&(a.operator===">="||a.operator==="<="),p=s(this.semver,"<",a.semver,l)&&(this.operator===">="||this.operator===">")&&(a.operator==="<="||a.operator==="<"),f=s(this.semver,">",a.semver,l)&&(this.operator==="<="||this.operator==="<")&&(a.operator===">="||a.operator===">");return E||h||d&&v||p||f}}ls=t;const r=xi,{re:n,t:i}=rr.exports,s=vf,o=zi,c=Je,u=_t();return ls}const gE=_t(),$E=(e,t,r)=>{try{t=new gE(t,r)}catch{return!1}return t.test(e)};var Hi=$E;const _E=_t(),SE=(e,t)=>new _E(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var wE=SE;const NE=Je,IE=_t(),OE=(e,t,r)=>{let n=null,i=null,s=null;try{s=new IE(t,r)}catch{return null}return e.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new NE(n,r))}),n};var TE=OE;const DE=Je,CE=_t(),RE=(e,t,r)=>{let n=null,i=null,s=null;try{s=new CE(t,r)}catch{return null}return e.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new DE(n,r))}),n};var PE=RE;const ds=Je,AE=_t(),ac=Gi,bE=(e,t)=>{e=new AE(e,t);let r=new ds("0.0.0");if(e.test(r)||(r=new ds("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){const i=e.set[n];let s=null;i.forEach(o=>{const c=new ds(o.semver.version);switch(o.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!s||ac(c,s))&&(s=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||ac(r,s))&&(r=s)}return r&&e.test(r)?r:null};var LE=bE;const FE=_t(),jE=(e,t)=>{try{return new FE(e,t).range||"*"}catch{return null}};var ME=jE;const kE=Je,gf=Bi(),{ANY:UE}=gf,VE=_t(),zE=Hi,cc=Gi,uc=Vo,xE=xo,GE=zo,BE=(e,t,r,n)=>{e=new kE(e,n),t=new VE(t,n);let i,s,o,c,u;switch(r){case">":i=cc,s=xE,o=uc,c=">",u=">=";break;case"<":i=uc,s=GE,o=cc,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(zE(e,t,n))return!1;for(let m=0;m<t.set.length;++m){const a=t.set[m];let l=null,E=null;if(a.forEach(h=>{h.semver===UE&&(h=new gf(">=0.0.0")),l=l||h,E=E||h,i(h.semver,l.semver,n)?l=h:o(h.semver,E.semver,n)&&(E=h)}),l.operator===c||l.operator===u||(!E.operator||E.operator===c)&&s(e,E.semver))return!1;if(E.operator===u&&o(e,E.semver))return!1}return!0};var Go=BE;const HE=Go,qE=(e,t,r)=>HE(e,t,">",r);var KE=qE;const WE=Go,ZE=(e,t,r)=>WE(e,t,"<",r);var XE=ZE;const fc=_t(),JE=(e,t,r)=>(e=new fc(e,r),t=new fc(t,r),e.intersects(t));var YE=JE;const QE=Hi,eg=$t;var tg=(e,t,r)=>{const n=[];let i=null,s=null;const o=e.sort((a,l)=>eg(a,l,r));for(const a of o)QE(a,t,r)?(s=a,i||(i=a)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const c=[];for(const[a,l]of n)a===l?c.push(a):!l&&a===o[0]?c.push("*"):l?a===o[0]?c.push(`<=${l}`):c.push(`${a} - ${l}`):c.push(`>=${a}`);const u=c.join(" || "),m=typeof t.raw=="string"?t.raw:String(t);return u.length<m.length?u:t};const lc=_t(),pi=Bi(),{ANY:hs}=pi,En=Hi,Bo=$t,rg=(e,t,r={})=>{if(e===t)return!0;e=new lc(e,r),t=new lc(t,r);let n=!1;e:for(const i of e.set){for(const s of t.set){const o=ng(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},ng=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===hs){if(t.length===1&&t[0].semver===hs)return!0;r.includePrerelease?e=[new pi(">=0.0.0-0")]:e=[new pi(">=0.0.0")]}if(t.length===1&&t[0].semver===hs){if(r.includePrerelease)return!0;t=[new pi(">=0.0.0")]}const n=new Set;let i,s;for(const h of e)h.operator===">"||h.operator===">="?i=dc(i,h,r):h.operator==="<"||h.operator==="<="?s=hc(s,h,r):n.add(h.semver);if(n.size>1)return null;let o;if(i&&s){if(o=Bo(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const h of n){if(i&&!En(h,String(i),r)||s&&!En(h,String(s),r))return null;for(const d of t)if(!En(h,String(d),r))return!1;return!0}let c,u,m,a,l=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;l&&l.prerelease.length===1&&s.operator==="<"&&l.prerelease[0]===0&&(l=!1);for(const h of t){if(a=a||h.operator===">"||h.operator===">=",m=m||h.operator==="<"||h.operator==="<=",i){if(E&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===E.major&&h.semver.minor===E.minor&&h.semver.patch===E.patch&&(E=!1),h.operator===">"||h.operator===">="){if(c=dc(i,h,r),c===h&&c!==i)return!1}else if(i.operator===">="&&!En(i.semver,String(h),r))return!1}if(s){if(l&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===l.major&&h.semver.minor===l.minor&&h.semver.patch===l.patch&&(l=!1),h.operator==="<"||h.operator==="<="){if(u=hc(s,h,r),u===h&&u!==s)return!1}else if(s.operator==="<="&&!En(s.semver,String(h),r))return!1}if(!h.operator&&(s||i)&&o!==0)return!1}return!(i&&m&&!s&&o!==0||s&&a&&!i&&o!==0||E||l)},dc=(e,t,r)=>{if(!e)return t;const n=Bo(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},hc=(e,t,r)=>{if(!e)return t;const n=Bo(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var ig=rg;const ms=rr.exports,sg=Vi,og=Je,mc=pf,ag=nn,cg=ov,ug=uv,fg=lv,lg=vv,dg=$v,hg=wv,mg=Ov,pg=Cv,yg=$t,vg=Av,Eg=Fv,gg=Uo,$g=Uv,_g=xv,Sg=Gi,wg=Vo,Ng=ko,Ig=yf,Og=zo,Tg=xo,Dg=vf,Cg=uE,Rg=Bi(),Pg=_t(),Ag=Hi,bg=wE,Lg=TE,Fg=PE,jg=LE,Mg=ME,kg=Go,Ug=KE,Vg=XE,zg=YE,xg=tg,Gg=ig;var Bg={parse:ag,valid:cg,clean:ug,inc:fg,diff:lg,major:dg,minor:hg,patch:mg,prerelease:pg,compare:yg,rcompare:vg,compareLoose:Eg,compareBuild:gg,sort:$g,rsort:_g,gt:Sg,lt:wg,eq:Ng,neq:Ig,gte:Og,lte:Tg,cmp:Dg,coerce:Cg,Comparator:Rg,Range:Pg,satisfies:Ag,toComparators:bg,maxSatisfying:Lg,minSatisfying:Fg,minVersion:jg,validRange:Mg,outside:kg,gtr:Ug,ltr:Vg,intersects:zg,simplifyRange:xg,subset:Gg,SemVer:og,re:ms.re,src:ms.src,tokens:ms.t,SEMVER_SPEC_VERSION:sg.SEMVER_SPEC_VERSION,compareIdentifiers:mc.compareIdentifiers,rcompareIdentifiers:mc.rcompareIdentifiers},qi={exports:{}},Ho={exports:{}};const $f=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};Ho.exports=$f;Ho.exports.default=$f;const Hg=Ho.exports,Ti=new WeakMap,_f=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0;const i=e.displayName||e.name||"<anonymous>",s=function(...o){if(Ti.set(s,++n),n===1)r=e.apply(this,o),e=null;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return Hg(s,e),Ti.set(s,n),s};qi.exports=_f;qi.exports.default=_f;qi.exports.callCount=e=>{if(!Ti.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Ti.get(e)};(function(e,t){var r=Zt&&Zt.__classPrivateFieldSet||function(B,b,k,O,I){if(O==="m")throw new TypeError("Private method is not writable");if(O==="a"&&!I)throw new TypeError("Private accessor was defined without a setter");if(typeof b=="function"?B!==b||!I:!b.has(B))throw new TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?I.call(B,k):I?I.value=k:b.set(B,k),k},n=Zt&&Zt.__classPrivateFieldGet||function(B,b,k,O){if(k==="a"&&!O)throw new TypeError("Private accessor was defined without a getter");if(typeof b=="function"?B!==b||!O:!b.has(B))throw new TypeError("Cannot read private member from an object whose class did not declare it");return k==="m"?O:k==="a"?O.call(B):O?O.value:b.get(B)},i,s,o,c,u,m;Object.defineProperty(t,"__esModule",{value:!0});const a=Ri,l=Qr,E=Ie,h=Tc,d=Oc,v=Uf,p=yh,f=Vs.exports,$=qs.exports,_=Pt,D=$i.exports,z=Cs.exports,T=H0,C=Bg,V=qi.exports,P="aes-256-cbc",x=()=>Object.create(null),M=B=>B!=null;let A="";try{delete require.cache[__filename],A=E.dirname((s=(i=e.parent)===null||i===void 0?void 0:i.filename)!==null&&s!==void 0?s:".")}catch{}const H=(B,b)=>{const k=new Set(["undefined","symbol","function"]),O=typeof b;if(k.has(O))throw new TypeError(`Setting a value of type \`${O}\` for key \`${B}\` is not allowed as it's not supported by JSON`)},G="__internal__",q=`${G}.migrations.version`;class K{constructor(b={}){var k;o.set(this,void 0),c.set(this,void 0),u.set(this,void 0),m.set(this,{}),this._deserialize=S=>JSON.parse(S),this._serialize=S=>JSON.stringify(S,void 0," ");const O={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...b},I=V(()=>{const S=f.sync({cwd:A}),U=S&&JSON.parse(l.readFileSync(S,"utf8"));return U??{}});if(!O.cwd){if(O.projectName||(O.projectName=I().name),!O.projectName)throw new Error("Project name could not be inferred. Please specify the `projectName` option.");O.cwd=$(O.projectName,{suffix:O.projectSuffix}).config}if(r(this,u,O,"f"),O.schema){if(typeof O.schema!="object")throw new TypeError("The `schema` option must be an object.");const S=new D.default({allErrors:!0,useDefaults:!0});(0,z.default)(S);const U={type:"object",properties:O.schema};r(this,o,S.compile(U),"f");for(const[W,Z]of Object.entries(O.schema))Z!=null&&Z.default&&(n(this,m,"f")[W]=Z.default)}O.defaults&&r(this,m,{...n(this,m,"f"),...O.defaults},"f"),O.serialize&&(this._serialize=O.serialize),O.deserialize&&(this._deserialize=O.deserialize),this.events=new v.EventEmitter,r(this,c,O.encryptionKey,"f");const F=O.fileExtension?`.${O.fileExtension}`:"";this.path=E.resolve(O.cwd,`${(k=O.configName)!==null&&k!==void 0?k:"config"}${F}`);const R=this.store,y=Object.assign(x(),O.defaults,R);this._validate(y);try{d.deepEqual(R,y)}catch{this.store=y}if(O.watch&&this._watch(),O.migrations){if(O.projectVersion||(O.projectVersion=I().version),!O.projectVersion)throw new Error("Project version could not be inferred. Please specify the `projectVersion` option.");this._migrate(O.migrations,O.projectVersion,O.beforeEachMigration)}}get(b,k){if(n(this,u,"f").accessPropertiesByDotNotation)return this._get(b,k);const{store:O}=this;return b in O?O[b]:k}set(b,k){if(typeof b!="string"&&typeof b!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof b}`);if(typeof b!="object"&&k===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(b))throw new TypeError(`Please don't use the ${G} key, as it's used to manage this module internal operations.`);const{store:O}=this,I=(F,R)=>{H(F,R),n(this,u,"f").accessPropertiesByDotNotation?p.set(O,F,R):O[F]=R};if(typeof b=="object"){const F=b;for(const[R,y]of Object.entries(F))I(R,y)}else I(b,k);this.store=O}has(b){return n(this,u,"f").accessPropertiesByDotNotation?p.has(this.store,b):b in this.store}reset(...b){for(const k of b)M(n(this,m,"f")[k])&&this.set(k,n(this,m,"f")[k])}delete(b){const{store:k}=this;n(this,u,"f").accessPropertiesByDotNotation?p.delete(k,b):delete k[b],this.store=k}clear(){this.store=x();for(const b of Object.keys(n(this,m,"f")))this.reset(b)}onDidChange(b,k){if(typeof b!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof b}`);if(typeof k!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof k}`);return this._handleChange(()=>this.get(b),k)}onDidAnyChange(b){if(typeof b!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof b}`);return this._handleChange(()=>this.store,b)}get size(){return Object.keys(this.store).length}get store(){try{const b=l.readFileSync(this.path,n(this,c,"f")?null:"utf8"),k=this._encryptData(b),O=this._deserialize(k);return this._validate(O),Object.assign(x(),O)}catch(b){if((b==null?void 0:b.code)==="ENOENT")return this._ensureDirectory(),x();if(n(this,u,"f").clearInvalidConfig&&b.name==="SyntaxError")return x();throw b}}set store(b){this._ensureDirectory(),this._validate(b),this._write(b),this.events.emit("change")}*[(o=new WeakMap,c=new WeakMap,u=new WeakMap,m=new WeakMap,Symbol.iterator)](){for(const[b,k]of Object.entries(this.store))yield[b,k]}_encryptData(b){if(!n(this,c,"f"))return b.toString();try{if(n(this,c,"f"))try{if(b.slice(16,17).toString()===":"){const k=b.slice(0,16),O=h.pbkdf2Sync(n(this,c,"f"),k.toString(),1e4,32,"sha512"),I=h.createDecipheriv(P,O,k);b=Buffer.concat([I.update(Buffer.from(b.slice(17))),I.final()]).toString("utf8")}else{const k=h.createDecipher(P,n(this,c,"f"));b=Buffer.concat([k.update(Buffer.from(b)),k.final()]).toString("utf8")}}catch{}}catch{}return b.toString()}_handleChange(b,k){let O=b();const I=()=>{const F=O,R=b();(0,a.isDeepStrictEqual)(R,F)||(O=R,k.call(this,R,F))};return this.events.on("change",I),()=>this.events.removeListener("change",I)}_validate(b){if(!n(this,o,"f")||n(this,o,"f").call(this,b)||!n(this,o,"f").errors)return;const O=n(this,o,"f").errors.map(({instancePath:I,message:F=""})=>`\`${I.slice(1)}\` ${F}`);throw new Error("Config schema violation: "+O.join("; "))}_ensureDirectory(){l.mkdirSync(E.dirname(this.path),{recursive:!0})}_write(b){let k=this._serialize(b);if(n(this,c,"f")){const O=h.randomBytes(16),I=h.pbkdf2Sync(n(this,c,"f"),O.toString(),1e4,32,"sha512"),F=h.createCipheriv(P,I,O);k=Buffer.concat([O,Buffer.from(":"),F.update(Buffer.from(k)),F.final()])}if(process.env.SNAP)l.writeFileSync(this.path,k,{mode:n(this,u,"f").configFileMode});else try{_.writeFileSync(this.path,k,{mode:n(this,u,"f").configFileMode})}catch(O){if((O==null?void 0:O.code)==="EXDEV"){l.writeFileSync(this.path,k,{mode:n(this,u,"f").configFileMode});return}throw O}}_watch(){this._ensureDirectory(),l.existsSync(this.path)||this._write(x()),process.platform==="win32"?l.watch(this.path,{persistent:!1},T(()=>{this.events.emit("change")},{wait:100})):l.watchFile(this.path,{persistent:!1},T(()=>{this.events.emit("change")},{wait:5e3}))}_migrate(b,k,O){let I=this._get(q,"0.0.0");const F=Object.keys(b).filter(y=>this._shouldPerformMigration(y,I,k));let R={...this.store};for(const y of F)try{O&&O(this,{fromVersion:I,toVersion:y,finalVersion:k,versions:F});const S=b[y];S(this),this._set(q,y),I=y,R={...this.store}}catch(S){throw this.store=R,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${S}`)}(this._isVersionInRangeFormat(I)||!C.eq(I,k))&&this._set(q,k)}_containsReservedKey(b){return typeof b=="object"&&Object.keys(b)[0]===G?!0:typeof b!="string"?!1:n(this,u,"f").accessPropertiesByDotNotation?!!b.startsWith(`${G}.`):!1}_isVersionInRangeFormat(b){return C.clean(b)===null}_shouldPerformMigration(b,k,O){return this._isVersionInRangeFormat(b)?k!=="0.0.0"&&C.satisfies(k,b)?!1:C.satisfies(O,b):!(C.lte(b,k)||C.gt(b,O))}_get(b,k){return p.get(this.store,b,k)}_set(b,k){const{store:O}=this;p.set(O,b,k),this.store=O}}t.default=K,e.exports=K,e.exports.default=K})(_s,_s.exports);const pc=Ie,{app:yi,ipcMain:Rs,ipcRenderer:yc,shell:qg}=ce,Kg=_s.exports;let vc=!1;const Ec=()=>{if(!Rs||!yi)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");const e={defaultCwd:yi.getPath("userData"),appVersion:yi.getVersion()};return vc||(Rs.on("electron-store-get-data",t=>{t.returnValue=e}),vc=!0),e};class Wg extends Kg{constructor(t){let r,n;if(yc){const i=yc.sendSync("electron-store-get-data");if(!i)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");({defaultCwd:r,appVersion:n}=i)}else Rs&&yi&&({defaultCwd:r,appVersion:n}=Ec());t={name:"config",...t},t.projectVersion||(t.projectVersion=n),t.cwd?t.cwd=pc.isAbsolute(t.cwd)?t.cwd:pc.join(r,t.cwd):t.cwd=r,t.configName=t.name,delete t.name,super(t)}static initRenderer(){Ec()}openInEditor(){qg.openPath(this.path)}}var gc=Wg,sn={exports:{}},qo={},Zg=qo.require=function(){if(typeof process=="object"&&process.versions&&process.versions.electron)try{const e=Zg("original-fs");if(Object.keys(e).length>0)return e}catch{}return Qr},Sf={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24};const Xg=qo.require(),Ke=Ie,$c=Sf,Jg=typeof process=="object"&&process.platform==="win32",_c=e=>e&&typeof e=="object",Ko=new Uint32Array(256).map((e,t)=>{for(let r=0;r<8;r++)t&1?t=3988292384^t>>>1:t>>>=1;return t>>>0});function Ve(e){this.sep=Ke.sep,this.fs=Xg,_c(e)&&_c(e.fs)&&typeof e.fs.statSync=="function"&&(this.fs=e.fs)}var Yg=Ve;Ve.prototype.makeDir=function(e){const t=this;function r(n){let i=n.split(t.sep)[0];n.split(t.sep).forEach(function(s){if(!(!s||s.substr(-1,1)===":")){i+=t.sep+s;var o;try{o=t.fs.statSync(i)}catch{t.fs.mkdirSync(i)}if(o&&o.isFile())throw Errors.FILE_IN_THE_WAY.replace("%s",i)}})}r(e)};Ve.prototype.writeFileTo=function(e,t,r,n){const i=this;if(i.fs.existsSync(e)){if(!r)return!1;var s=i.fs.statSync(e);if(s.isDirectory())return!1}var o=Ke.dirname(e);i.fs.existsSync(o)||i.makeDir(o);var c;try{c=i.fs.openSync(e,"w",438)}catch{i.fs.chmodSync(e,438),c=i.fs.openSync(e,"w",438)}if(c)try{i.fs.writeSync(c,t,0,t.length,0)}finally{i.fs.closeSync(c)}return i.fs.chmodSync(e,n||438),!0};Ve.prototype.writeFileToAsync=function(e,t,r,n,i){typeof n=="function"&&(i=n,n=void 0);const s=this;s.fs.exists(e,function(o){if(o&&!r)return i(!1);s.fs.stat(e,function(c,u){if(o&&u.isDirectory())return i(!1);var m=Ke.dirname(e);s.fs.exists(m,function(a){a||s.makeDir(m),s.fs.open(e,"w",438,function(l,E){l?s.fs.chmod(e,438,function(){s.fs.open(e,"w",438,function(h,d){s.fs.write(d,t,0,t.length,0,function(){s.fs.close(d,function(){s.fs.chmod(e,n||438,function(){i(!0)})})})})}):E?s.fs.write(E,t,0,t.length,0,function(){s.fs.close(E,function(){s.fs.chmod(e,n||438,function(){i(!0)})})}):s.fs.chmod(e,n||438,function(){i(!0)})})})})})};Ve.prototype.findFiles=function(e){const t=this;function r(n,i,s){typeof i=="boolean"&&(s=i,i=void 0);let o=[];return t.fs.readdirSync(n).forEach(function(c){var u=Ke.join(n,c);t.fs.statSync(u).isDirectory()&&s&&(o=o.concat(r(u,i,s))),(!i||i.test(u))&&o.push(Ke.normalize(u)+(t.fs.statSync(u).isDirectory()?t.sep:""))}),o}return r(e,void 0,!0)};Ve.prototype.getAttributes=function(){};Ve.prototype.setAttributes=function(){};Ve.crc32update=function(e,t){return Ko[(e^t)&255]^e>>>8};Ve.crc32=function(e){typeof e=="string"&&(e=Buffer.from(e,"utf8")),Ko.length||genCRCTable();let t=e.length,r=-1;for(let n=0;n<t;)r=Ve.crc32update(r,e[n++]);return~r>>>0};Ve.methodToString=function(e){switch(e){case $c.STORED:return"STORED ("+e+")";case $c.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}};Ve.canonical=function(e){if(!e)return"";var t=Ke.posix.normalize("/"+e.split("\\").join("/"));return Ke.join(".",t)};Ve.sanitize=function(e,t){e=Ke.resolve(Ke.normalize(e));for(var r=t.split("/"),n=0,i=r.length;n<i;n++){var s=Ke.normalize(Ke.join(e,r.slice(n,i).join(Ke.sep)));if(s.indexOf(e)===0)return s}return Ke.normalize(Ke.join(e,Ke.basename(t)))};Ve.toBuffer=function(t){return Buffer.isBuffer(t)?t:t instanceof Uint8Array?Buffer.from(t):typeof t=="string"?Buffer.from(t,"utf8"):Buffer.alloc(0)};Ve.readBigUInt64LE=function(e,t){var r=Buffer.from(e.slice(t,t+8));return r.swap64(),parseInt(`0x${r.toString("hex")}`)};Ve.isWin=Jg;Ve.crcTable=Ko;var Qg={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed",FILE_IN_THE_WAY:"There is a file in the way: %s",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:"File not found: %s",NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found"};const Di=qo.require(),wf=Ie;Di.existsSync=Di.existsSync||wf.existsSync;var e$=function(e){var t=e||"",r=i(),n=null;function i(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return t&&Di.existsSync(t)?(n=Di.statSync(t),r.directory=n.isDirectory(),r.mtime=n.mtime,r.atime=n.atime,r.executable=(73&n.mode)!==0,r.readonly=(128&n.mode)===0,r.hidden=wf.basename(t)[0]==="."):console.warn("Invalid path: "+t),{get directory(){return r.directory},get readOnly(){return r.readonly},get hidden(){return r.hidden},get mtime(){return r.mtime},get atime(){return r.atime},get executable(){return r.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:t,isDirectory:r.directory,isReadOnly:r.readonly,isHidden:r.hidden,isExecutable:r.executable,mTime:r.mtime,aTime:r.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}};(function(e){e.exports=Yg,e.exports.Constants=Sf,e.exports.Errors=Qg,e.exports.FileAttr=e$})(sn);var Ki={},$n=sn.exports,X=$n.Constants,t$=function(){var e=20,t=10,r=0,n=0,i=0,s=0,o=0,c=0,u=0,m=0,a=0,l=0,E=0,h=0,d=0;e|=$n.isWin?2560:768,r|=X.FLG_EFS;var v={};function p(f){f=new Date(f),i=(f.getFullYear()-1980&127)<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1}return p(+new Date),{get made(){return e},set made(f){e=f},get version(){return t},set version(f){t=f},get flags(){return r},set flags(f){r=f},get method(){return n},set method(f){switch(f){case X.STORED:this.version=10;case X.DEFLATED:default:this.version=20}n=f},get time(){return new Date((i>>25&127)+1980,(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(i&31)<<1)},set time(f){p(f)},get crc(){return s},set crc(f){s=Math.max(0,f)>>>0},get compressedSize(){return o},set compressedSize(f){o=Math.max(0,f)>>>0},get size(){return c},set size(f){c=Math.max(0,f)>>>0},get fileNameLength(){return u},set fileNameLength(f){u=f},get extraLength(){return m},set extraLength(f){m=f},get commentLength(){return a},set commentLength(f){a=f},get diskNumStart(){return l},set diskNumStart(f){l=Math.max(0,f)>>>0},get inAttr(){return E},set inAttr(f){E=Math.max(0,f)>>>0},get attr(){return h},set attr(f){h=Math.max(0,f)>>>0},get fileAttr(){return h?(h>>>0|0)>>16&4095:0},get offset(){return d},set offset(f){d=Math.max(0,f)>>>0},get encripted(){return(r&1)===1},get entryHeaderSize(){return X.CENHDR+u+m+a},get realDataOffset(){return d+X.LOCHDR+v.fnameLen+v.extraLen},get dataHeader(){return v},loadDataHeaderFromBinary:function(f){var $=f.slice(d,d+X.LOCHDR);if($.readUInt32LE(0)!==X.LOCSIG)throw new Error($n.Errors.INVALID_LOC);v={version:$.readUInt16LE(X.LOCVER),flags:$.readUInt16LE(X.LOCFLG),method:$.readUInt16LE(X.LOCHOW),time:$.readUInt32LE(X.LOCTIM),crc:$.readUInt32LE(X.LOCCRC),compressedSize:$.readUInt32LE(X.LOCSIZ),size:$.readUInt32LE(X.LOCLEN),fnameLen:$.readUInt16LE(X.LOCNAM),extraLen:$.readUInt16LE(X.LOCEXT)}},loadFromBinary:function(f){if(f.length!==X.CENHDR||f.readUInt32LE(0)!==X.CENSIG)throw new Error($n.Errors.INVALID_CEN);e=f.readUInt16LE(X.CENVEM),t=f.readUInt16LE(X.CENVER),r=f.readUInt16LE(X.CENFLG),n=f.readUInt16LE(X.CENHOW),i=f.readUInt32LE(X.CENTIM),s=f.readUInt32LE(X.CENCRC),o=f.readUInt32LE(X.CENSIZ),c=f.readUInt32LE(X.CENLEN),u=f.readUInt16LE(X.CENNAM),m=f.readUInt16LE(X.CENEXT),a=f.readUInt16LE(X.CENCOM),l=f.readUInt16LE(X.CENDSK),E=f.readUInt16LE(X.CENATT),h=f.readUInt32LE(X.CENATX),d=f.readUInt32LE(X.CENOFF)},dataHeaderToBinary:function(){var f=Buffer.alloc(X.LOCHDR);return f.writeUInt32LE(X.LOCSIG,0),f.writeUInt16LE(t,X.LOCVER),f.writeUInt16LE(r,X.LOCFLG),f.writeUInt16LE(n,X.LOCHOW),f.writeUInt32LE(i,X.LOCTIM),f.writeUInt32LE(s,X.LOCCRC),f.writeUInt32LE(o,X.LOCSIZ),f.writeUInt32LE(c,X.LOCLEN),f.writeUInt16LE(u,X.LOCNAM),f.writeUInt16LE(m,X.LOCEXT),f},entryHeaderToBinary:function(){var f=Buffer.alloc(X.CENHDR+u+m+a);return f.writeUInt32LE(X.CENSIG,0),f.writeUInt16LE(e,X.CENVEM),f.writeUInt16LE(t,X.CENVER),f.writeUInt16LE(r,X.CENFLG),f.writeUInt16LE(n,X.CENHOW),f.writeUInt32LE(i,X.CENTIM),f.writeUInt32LE(s,X.CENCRC),f.writeUInt32LE(o,X.CENSIZ),f.writeUInt32LE(c,X.CENLEN),f.writeUInt16LE(u,X.CENNAM),f.writeUInt16LE(m,X.CENEXT),f.writeUInt16LE(a,X.CENCOM),f.writeUInt16LE(l,X.CENDSK),f.writeUInt16LE(E,X.CENATT),f.writeUInt32LE(h,X.CENATX),f.writeUInt32LE(d,X.CENOFF),f.fill(0,X.CENHDR),f},toJSON:function(){const f=function($){return $+" bytes"};return{made:e,version:t,flags:r,method:$n.methodToString(n),time:this.time,crc:"0x"+s.toString(16).toUpperCase(),compressedSize:f(o),size:f(c),fileNameLength:f(u),extraLength:f(m),commentLength:f(a),diskNumStart:l,inAttr:E,attr:h,offset:d,entryHeaderSize:f(X.CENHDR+u+m+a)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Mr=sn.exports,_e=Mr.Constants,r$=function(){var e=0,t=0,r=0,n=0,i=0;return{get diskEntries(){return e},set diskEntries(s){e=t=s},get totalEntries(){return t},set totalEntries(s){t=e=s},get size(){return r},set size(s){r=s},get offset(){return n},set offset(s){n=s},get commentLength(){return i},set commentLength(s){i=s},get mainHeaderSize(){return _e.ENDHDR+i},loadFromBinary:function(s){if((s.length!==_e.ENDHDR||s.readUInt32LE(0)!==_e.ENDSIG)&&(s.length<_e.ZIP64HDR||s.readUInt32LE(0)!==_e.ZIP64SIG))throw new Error(Mr.Errors.INVALID_END);s.readUInt32LE(0)===_e.ENDSIG?(e=s.readUInt16LE(_e.ENDSUB),t=s.readUInt16LE(_e.ENDTOT),r=s.readUInt32LE(_e.ENDSIZ),n=s.readUInt32LE(_e.ENDOFF),i=s.readUInt16LE(_e.ENDCOM)):(e=Mr.readBigUInt64LE(s,_e.ZIP64SUB),t=Mr.readBigUInt64LE(s,_e.ZIP64TOT),r=Mr.readBigUInt64LE(s,_e.ZIP64SIZ),n=Mr.readBigUInt64LE(s,_e.ZIP64OFF),i=0)},toBinary:function(){var s=Buffer.alloc(_e.ENDHDR+i);return s.writeUInt32LE(_e.ENDSIG,0),s.writeUInt32LE(0,4),s.writeUInt16LE(e,_e.ENDSUB),s.writeUInt16LE(t,_e.ENDTOT),s.writeUInt32LE(r,_e.ENDSIZ),s.writeUInt32LE(n,_e.ENDOFF),s.writeUInt16LE(i,_e.ENDCOM),s.fill(" ",_e.ENDHDR),s},toJSON:function(){const s=function(o,c){let u=o.toString(16).toUpperCase();for(;u.length<c;)u="0"+u;return"0x"+u};return{diskEntries:e,totalEntries:t,size:r+" bytes",offset:s(n,4),commentLength:i}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}};Ki.EntryHeader=t$;Ki.MainHeader=r$;var Wi={},n$=function(e){var t=Dc,r={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,r)},deflateAsync:function(n){var i=t.createDeflateRaw(r),s=[],o=0;i.on("data",function(c){s.push(c),o+=c.length}),i.on("end",function(){var c=Buffer.alloc(o),u=0;c.fill(0);for(var m=0;m<s.length;m++){var a=s[m];a.copy(c,u),u+=a.length}n&&n(c)}),i.end(e)}}},i$=function(e){var t=Dc;return{inflate:function(){return t.inflateRawSync(e)},inflateAsync:function(r){var n=t.createInflateRaw(),i=[],s=0;n.on("data",function(o){i.push(o),s+=o.length}),n.on("end",function(){var o=Buffer.alloc(s),c=0;o.fill(0);for(var u=0;u<i.length;u++){var m=i[u];m.copy(o,c),c+=m.length}r&&r(o)}),n.end(e)}}};const{randomFillSync:Sc}=Tc,s$=new Uint32Array(256).map((e,t)=>{for(let r=0;r<8;r++)t&1?t=t>>>1^3988292384:t>>>=1;return t>>>0}),Nf=(e,t)=>Math.imul(e,t)>>>0,wc=(e,t)=>s$[(e^t)&255]^e>>>8,Ln=()=>typeof Sc=="function"?Sc(Buffer.alloc(12)):Ln.node();Ln.node=()=>{const e=Buffer.alloc(12),t=e.length;for(let r=0;r<t;r++)e[r]=Math.random()*256&255;return e};const vi={genSalt:Ln};function Zi(e){const t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let r=0;r<t.length;r++)this.updateKeys(t[r])}Zi.prototype.updateKeys=function(e){const t=this.keys;return t[0]=wc(t[0],e),t[1]+=t[0]&255,t[1]=Nf(t[1],134775813)+1,t[2]=wc(t[2],t[1]>>>24),e};Zi.prototype.next=function(){const e=(this.keys[2]|2)>>>0;return Nf(e,e^1)>>8&255};function o$(e){const t=new Zi(e);return function(r){const n=Buffer.alloc(r.length);let i=0;for(let s of r)n[i++]=t.updateKeys(s^t.next());return n}}function a$(e){const t=new Zi(e);return function(r,n,i=0){n||(n=Buffer.alloc(r.length));for(let s of r){const o=t.next();n[i++]=s^o,t.updateKeys(s)}return n}}function c$(e,t,r){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);const n=o$(r);if(n(e.slice(0,12))[11]!==t.crc>>>24)throw"ADM-ZIP: Wrong Password";return n(e.slice(12))}function u$(e){Buffer.isBuffer(e)&&e.length>=12?vi.genSalt=function(){return e.slice(0,12)}:e==="node"?vi.genSalt=Ln.node:vi.genSalt=Ln}function f$(e,t,r,n=!1){e==null&&(e=Buffer.alloc(0)),Buffer.isBuffer(e)||(e=Buffer.from(e.toString()));const i=a$(r),s=vi.genSalt();s[11]=t.crc>>>24&255,n&&(s[10]=t.crc>>>16&255);const o=Buffer.alloc(e.length+12);return i(s,o),i(e,o,12)}var l$={decrypt:c$,encrypt:f$,_salter:u$};Wi.Deflater=n$;Wi.Inflater=i$;Wi.ZipCrypto=l$;var Re=sn.exports,d$=Ki,st=Re.Constants,ps=Wi,If=function(e){var t=new d$.EntryHeader,r=Buffer.alloc(0),n=Buffer.alloc(0),i=!1,s=null,o=Buffer.alloc(0);function c(){return!e||!Buffer.isBuffer(e)?Buffer.alloc(0):(t.loadDataHeaderFromBinary(e),e.slice(t.realDataOffset,t.realDataOffset+t.compressedSize))}function u(d){return!((t.flags&8)!==8&&Re.crc32(d)!==t.dataHeader.crc)}function m(d,v,p){if(typeof v>"u"&&typeof d=="string"&&(p=d,d=void 0),i)return d&&v&&v(Buffer.alloc(0),Re.Errors.DIRECTORY_CONTENT_ERROR),Buffer.alloc(0);var f=c();if(f.length===0)return d&&v&&v(f),f;if(t.encripted){if(typeof p!="string"&&!Buffer.isBuffer(p))throw new Error("ADM-ZIP: Incompatible password parameter");f=ps.ZipCrypto.decrypt(f,t,p)}var $=Buffer.alloc(t.size);switch(t.method){case Re.Constants.STORED:if(f.copy($),u($))return d&&v&&v($),$;throw d&&v&&v($,Re.Errors.BAD_CRC),new Error(Re.Errors.BAD_CRC);case Re.Constants.DEFLATED:var _=new ps.Inflater(f);if(d)_.inflateAsync(function(D){D.copy(D,0),v&&(u(D)?v(D):v(D,Re.Errors.BAD_CRC))});else{if(_.inflate($).copy($,0),!u($))throw new Error(Re.Errors.BAD_CRC+" "+r.toString());return $}break;default:throw d&&v&&v(Buffer.alloc(0),Re.Errors.UNKNOWN_METHOD),new Error(Re.Errors.UNKNOWN_METHOD)}}function a(d,v){if((!s||!s.length)&&Buffer.isBuffer(e))return d&&v&&v(c()),c();if(s.length&&!i){var p;switch(t.method){case Re.Constants.STORED:return t.compressedSize=t.size,p=Buffer.alloc(s.length),s.copy(p),d&&v&&v(p),p;default:case Re.Constants.DEFLATED:var f=new ps.Deflater(s);if(d)f.deflateAsync(function(_){p=Buffer.alloc(_.length),t.compressedSize=_.length,_.copy(p),v&&v(p)});else{var $=f.deflate();return t.compressedSize=$.length,$}f=null;break}}else if(d&&v)v(Buffer.alloc(0));else return Buffer.alloc(0)}function l(d,v){return(d.readUInt32LE(v+4)<<4)+d.readUInt32LE(v)}function E(d){for(var v=0,p,f,$;v<d.length;)p=d.readUInt16LE(v),v+=2,f=d.readUInt16LE(v),v+=2,$=d.slice(v,v+f),v+=f,st.ID_ZIP64===p&&h($)}function h(d){var v,p,f,$;d.length>=st.EF_ZIP64_SCOMP&&(v=l(d,st.EF_ZIP64_SUNCOMP),t.size===st.EF_ZIP64_OR_32&&(t.size=v)),d.length>=st.EF_ZIP64_RHO&&(p=l(d,st.EF_ZIP64_SCOMP),t.compressedSize===st.EF_ZIP64_OR_32&&(t.compressedSize=p)),d.length>=st.EF_ZIP64_DSN&&(f=l(d,st.EF_ZIP64_RHO),t.offset===st.EF_ZIP64_OR_32&&(t.offset=f)),d.length>=st.EF_ZIP64_DSN+4&&($=d.readUInt32LE(st.EF_ZIP64_DSN),t.diskNumStart===st.EF_ZIP64_OR_16&&(t.diskNumStart=$))}return{get entryName(){return r.toString()},get rawEntryName(){return r},set entryName(d){r=Re.toBuffer(d);var v=r[r.length-1];i=v===47||v===92,t.fileNameLength=r.length},get extra(){return o},set extra(d){o=d,t.extraLength=d.length,E(d)},get comment(){return n.toString()},set comment(d){n=Re.toBuffer(d),t.commentLength=n.length},get name(){var d=r.toString();return i?d.substr(d.length-1).split("/").pop():d.split("/").pop()},get isDirectory(){return i},getCompressedData:function(){return a(!1,null)},getCompressedDataAsync:function(d){a(!0,d)},setData:function(d){s=Re.toBuffer(d),!i&&s.length?(t.size=s.length,t.method=Re.Constants.DEFLATED,t.crc=Re.crc32(d),t.changed=!0):t.method=Re.Constants.STORED},getData:function(d){return t.changed?s:m(!1,null,d)},getDataAsync:function(d,v){t.changed?d(s):m(!0,d,v)},set attr(d){t.attr=d},get attr(){return t.attr},set header(d){t.loadFromBinary(d)},get header(){return t},packHeader:function(){var d=t.entryHeaderToBinary(),v=Re.Constants.CENHDR;return r.copy(d,v),v+=r.length,t.extraLength&&(o.copy(d,v),v+=t.extraLength),t.commentLength&&n.copy(d,v),d},toJSON:function(){const d=function(v){return"<"+(v&&v.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:t.toJSON(),compressedData:d(e),data:d(s)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}};const Nc=If,h$=Ki,Ge=sn.exports;var m$=function(e,t){var r=[],n={},i=Buffer.alloc(0),s=new h$.MainHeader,o=!1;const c=Object.assign(Object.create(null),t),{noSort:u}=c;e?l(c.readEntries):o=!0;function m(h){const d=s.diskEntries;let v=s.offset;for(let p=0;p<d;p++){let f=v;const $=new Nc(e);$.header=e.slice(f,f+=Ge.Constants.CENHDR),$.entryName=e.slice(f,f+=$.header.fileNameLength),v+=$.header.entryHeaderSize,h($)}}function a(){o=!0,n={},r=new Array(s.diskEntries);for(var h=s.offset,d=0;d<r.length;d++){var v=h,p=new Nc(e);p.header=e.slice(v,v+=Ge.Constants.CENHDR),p.entryName=e.slice(v,v+=p.header.fileNameLength),p.header.extraLength&&(p.extra=e.slice(v,v+=p.header.extraLength)),p.header.commentLength&&(p.comment=e.slice(v,v+p.header.commentLength)),h+=p.header.entryHeaderSize,r[d]=p,n[p.entryName]=p}}function l(h){var d=e.length-Ge.Constants.ENDHDR,v=Math.max(0,d-65535),p=v,f=e.length,$=-1,_=0;for(d;d>=p;d--)if(e[d]===80){if(e.readUInt32LE(d)===Ge.Constants.ENDSIG){$=d,_=d,f=d+Ge.Constants.ENDHDR,p=d-Ge.Constants.END64HDR;continue}if(e.readUInt32LE(d)===Ge.Constants.END64SIG){p=v;continue}if(e.readUInt32LE(d)===Ge.Constants.ZIP64SIG){$=d,f=d+Ge.readBigUInt64LE(e,d+Ge.Constants.ZIP64SIZE)+Ge.Constants.ZIP64LEAD;break}}if(!~$)throw new Error(Ge.Errors.INVALID_FORMAT);s.loadFromBinary(e.slice($,f)),s.commentLength&&(i=e.slice(_+Ge.Constants.ENDHDR)),h&&a()}function E(){r.length>1&&!u&&r.sort((h,d)=>h.entryName.toLowerCase().localeCompare(d.entryName.toLowerCase()))}return{get entries(){return o||a(),r},get comment(){return i.toString()},set comment(h){i=Ge.toBuffer(h),s.commentLength=i.length},getEntryCount:function(){return o?r.length:s.diskEntries},forEach:function(h){if(!o){m(h);return}r.forEach(h)},getEntry:function(h){return o||a(),n[h]||null},setEntry:function(h){o||a(),r.push(h),n[h.entryName]=h,s.totalEntries=r.length},deleteEntry:function(h){o||a();var d=n[h];if(d&&d.isDirectory){var v=this;this.getEntryChildren(d).forEach(function(p){p.entryName!==h&&v.deleteEntry(p.entryName)})}r.splice(r.indexOf(d),1),delete n[h],s.totalEntries=r.length},getEntryChildren:function(h){if(o||a(),h&&h.isDirectory){const d=[],v=h.entryName,p=v.length;return r.forEach(function(f){f.entryName.substr(0,p)===v&&d.push(f)}),d}return[]},compressToBuffer:function(){o||a(),E();const h=[],d=[];let v=0,p=0;s.size=0,s.offset=0;for(const _ of r){const D=_.getCompressedData();_.header.offset=p;const z=_.header.dataHeaderToBinary(),T=_.rawEntryName.length,C=Buffer.alloc(T+_.extra.length);_.rawEntryName.copy(C,0),C.copy(_.extra,T);const V=z.length+C.length+D.length;p+=V,h.push(z),h.push(C),h.push(D);const P=_.packHeader();d.push(P),s.size+=P.length,v+=V+P.length}v+=s.mainHeaderSize,s.offset=p,p=0;const f=Buffer.alloc(v);for(const _ of h)_.copy(f,p),p+=_.length;for(const _ of d)_.copy(f,p),p+=_.length;const $=s.toBinary();return i&&i.copy($,Ge.Constants.ENDHDR),$.copy(f,p),f},toAsyncBuffer:function(h,d,v,p){try{o||a(),E();const f=[],$=[];let _=0,D=0;s.size=0,s.offset=0;const z=function(T){if(T.length){const C=T.pop(),V=C.entryName+C.extra.toString();v&&v(V),C.getCompressedDataAsync(function(P){p&&p(V),C.header.offset=D;const x=C.header.dataHeaderToBinary(),M=Buffer.alloc(V.length,V),A=x.length+M.length+P.length;D+=A,f.push(x),f.push(M),f.push(P);const H=C.packHeader();$.push(H),s.size+=H.length,_+=A+H.length,z(T)})}else{_+=s.mainHeaderSize,s.offset=D,D=0;const C=Buffer.alloc(_);f.forEach(function(P){P.copy(C,D),D+=P.length}),$.forEach(function(P){P.copy(C,D),D+=P.length});const V=s.toBinary();i&&i.copy(V,Ge.Constants.ENDHDR),V.copy(C,D),h(C)}};z(r)}catch(f){d(f)}}}};const Pe=sn.exports,Dt=Ie,p$=If,y$=m$,ur=(e,t)=>typeof e=="boolean"?e:t,ys=(e,t)=>typeof e=="string"?e:t,v$={noSort:!1,readEntries:!1,method:Pe.Constants.NONE,fs:null};var Ic=function(e,t){let r=null;const n=Object.assign(Object.create(null),v$);e&&typeof e=="object"&&(e instanceof Uint8Array||(Object.assign(n,e),e=n.input?n.input:void 0,n.input&&delete n.input),Buffer.isBuffer(e)&&(r=e,n.method=Pe.Constants.BUFFER,e=void 0)),Object.assign(n,t);const i=new Pe(n);if(e&&typeof e=="string")if(i.fs.existsSync(e))n.method=Pe.Constants.FILE,n.filename=e,r=i.fs.readFileSync(e);else throw new Error(Pe.Errors.INVALID_FILENAME);const s=new y$(r,n),{canonical:o,sanitize:c}=Pe;function u(a){if(a&&s){var l;if(typeof a=="string"&&(l=s.getEntry(a)),typeof a=="object"&&typeof a.entryName<"u"&&typeof a.header<"u"&&(l=s.getEntry(a.entryName)),l)return l}return null}function m(a){const{join:l,normalize:E,sep:h}=Dt.posix;return l(".",E(h+a.split("\\").join(h)+h))}return{readFile:function(a,l){var E=u(a);return E&&E.getData(l)||null},readFileAsync:function(a,l){var E=u(a);E?E.getDataAsync(l):l(null,"getEntry failed for:"+a)},readAsText:function(a,l){var E=u(a);if(E){var h=E.getData();if(h&&h.length)return h.toString(l||"utf8")}return""},readAsTextAsync:function(a,l,E){var h=u(a);h?h.getDataAsync(function(d,v){if(v){l(d,v);return}d&&d.length?l(d.toString(E||"utf8")):l("")}):l("")},deleteFile:function(a){var l=u(a);l&&s.deleteEntry(l.entryName)},addZipComment:function(a){s.comment=a},getZipComment:function(){return s.comment||""},addZipEntryComment:function(a,l){var E=u(a);E&&(E.comment=l)},getZipEntryComment:function(a){var l=u(a);return l&&l.comment||""},updateFile:function(a,l){var E=u(a);E&&E.setData(l)},addLocalFile:function(a,l,E,h){if(i.fs.existsSync(a)){l=l?m(l):"";var d=a.split("\\").join("/").split("/").pop();l+=E||d;const v=i.fs.statSync(a);this.addFile(l,i.fs.readFileSync(a),h,v)}else throw new Error(Pe.Errors.FILE_NOT_FOUND.replace("%s",a))},addLocalFolder:function(a,l,E){if(E instanceof RegExp?E=function(h){return function(d){return h.test(d)}}(E):typeof E!="function"&&(E=function(){return!0}),l=l?m(l):"",a=Dt.normalize(a),i.fs.existsSync(a)){const h=i.findFiles(a),d=this;h.length&&h.forEach(function(v){var p=Dt.relative(a,v).split("\\").join("/");if(E(p)){var f=i.fs.statSync(v);f.isFile()?d.addFile(l+p,i.fs.readFileSync(v),"",f):d.addFile(l+p+"/",Buffer.alloc(0),"",f)}})}else throw new Error(Pe.Errors.FILE_NOT_FOUND.replace("%s",a))},addLocalFolderAsync:function(a,l,E,h){h instanceof RegExp?h=function(v){return function(p){return v.test(p)}}(h):typeof h!="function"&&(h=function(){return!0}),E=E?m(E):"",a=Dt.normalize(a);var d=this;i.fs.open(a,"r",function(v){if(v&&v.code==="ENOENT")l(void 0,Pe.Errors.FILE_NOT_FOUND.replace("%s",a));else if(v)l(void 0,v);else{var p=i.findFiles(a),f=-1,$=function(){if(f+=1,f<p.length){var _=p[f],D=Dt.relative(a,_).split("\\").join("/");D=D.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),h(D)?i.fs.stat(_,function(z,T){z&&l(void 0,z),T.isFile()?i.fs.readFile(_,function(C,V){C?l(void 0,C):(d.addFile(E+D,V,"",T),$())}):(d.addFile(E+D+"/",Buffer.alloc(0),"",T),$())}):$()}else l(!0,void 0)};$()}})},addLocalFolderPromise:function(a,l){return new Promise((E,h)=>{const{filter:d,zipPath:v}=Object.assign({},l);this.addLocalFolderAsync(a,(p,f)=>{f&&h(f),p&&E(this)},v,d)})},addFile:function(a,l,E,h){let d=u(a);const v=d!=null;v||(d=new p$,d.entryName=a),d.comment=E||"";const p=typeof h=="object"&&h instanceof i.fs.Stats;p&&(d.header.time=h.mtime);var f=d.isDirectory?16:0;if(!Pe.isWin){let $=d.isDirectory?16384:32768;p?$|=4095&h.mode:typeof h=="number"?$|=4095&h:$|=d.isDirectory?493:420,f=(f|$<<16)>>>0}d.attr=f,d.setData(l),v||s.setEntry(d)},getEntries:function(){return s?s.entries:[]},getEntry:function(a){return u(a)},getEntryCount:function(){return s.getEntryCount()},forEach:function(a){return s.forEach(a)},extractEntryTo:function(a,l,E,h,d,v){h=ur(h,!1),d=ur(d,!1),E=ur(E,!0),v=ys(v,ys(d,void 0));var p=u(a);if(!p)throw new Error(Pe.Errors.NO_ENTRY);var f=o(p.entryName),$=c(l,v&&!p.isDirectory?v:E?f:Dt.basename(f));if(p.isDirectory){var _=s.getEntryChildren(p);return _.forEach(function(T){if(T.isDirectory)return;var C=T.getData();if(!C)throw new Error(Pe.Errors.CANT_EXTRACT_FILE);var V=o(T.entryName),P=c(l,E?V:Dt.basename(V));const x=d?T.header.fileAttr:void 0;i.writeFileTo(P,C,h,x)}),!0}var D=p.getData();if(!D)throw new Error(Pe.Errors.CANT_EXTRACT_FILE);if(i.fs.existsSync($)&&!h)throw new Error(Pe.Errors.CANT_OVERRIDE);const z=d?a.header.fileAttr:void 0;return i.writeFileTo($,D,h,z),!0},test:function(a){if(!s)return!1;for(var l in s.entries)try{if(l.isDirectory)continue;var E=s.entries[l].getData(a);if(!E)return!1}catch{return!1}return!0},extractAllTo:function(a,l,E,h){if(l=ur(l,!1),h=ys(E,h),E=ur(E,!1),!s)throw new Error(Pe.Errors.NO_ZIP);s.entries.forEach(function(d){var v=c(a,o(d.entryName.toString()));if(d.isDirectory){i.makeDir(v);return}var p=d.getData(h);if(!p)throw new Error(Pe.Errors.CANT_EXTRACT_FILE);const f=E?d.header.fileAttr:void 0;i.writeFileTo(v,p,l,f);try{i.fs.utimesSync(v,d.header.time,d.header.time)}catch{throw new Error(Pe.Errors.CANT_EXTRACT_FILE)}})},extractAllToAsync:function(a,l,E,h){if(h||(h=function(){}),l=ur(l,!1),typeof E=="function"&&!h&&(h=E),E=ur(E,!1),!s){h(new Error(Pe.Errors.NO_ZIP));return}a=Dt.resolve(a);const d=_=>c(a,Dt.normalize(o(_.entryName.toString()))),v=(_,D)=>new Error(_+': "'+D+'"'),p=[],f=new Set;s.entries.forEach(_=>{_.isDirectory?p.push(_):f.add(_)});for(const _ of p){const D=d(_),z=E?_.header.fileAttr:void 0;try{i.makeDir(D),z&&i.fs.chmodSync(D,z),i.fs.utimesSync(D,_.header.time,_.header.time)}catch{h(v("Unable to create folder",D))}}const $=()=>{f.size===0&&h()};for(const _ of f.values()){const D=Dt.normalize(o(_.entryName.toString())),z=c(a,D);_.getDataAsync(function(T,C){if(C){h(new Error(C));return}if(!T)h(new Error(Pe.Errors.CANT_EXTRACT_FILE));else{const V=E?_.header.fileAttr:void 0;i.writeFileToAsync(z,T,l,V,function(P){if(!P){h(v("Unable to write file",z));return}i.fs.utimes(z,_.header.time,_.header.time,function(x){if(x){h(v("Unable to set times",z));return}f.delete(_),$()})})}})}$()},writeZip:function(a,l){if(arguments.length===1&&typeof a=="function"&&(l=a,a=""),!a&&n.filename&&(a=n.filename),!!a){var E=s.compressToBuffer();if(E){var h=i.writeFileTo(a,E,!0);typeof l=="function"&&l(h?null:new Error("failed"),"")}}},writeZipPromise:function(a,l){const{overwrite:E,perm:h}=Object.assign({overwrite:!0},l);return new Promise((d,v)=>{!a&&n.filename&&(a=n.filename),a||v("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(p=>{const f=$=>$?d($):v("ADM-ZIP: Wasn't able to write zip file");i.writeFileToAsync(a,p,E,h,f)},v)})},toBufferPromise:function(){return new Promise((a,l)=>{s.toAsyncBuffer(a,l)})},toBuffer:function(a,l,E,h){return this.valueOf=2,typeof a=="function"?(s.toAsyncBuffer(a,l,E,h),null):s.compressToBuffer()}}},Fn,Gr,Br,jn,pr,yr,Kt,Wt,Ci,Hr,Mn,Ps,kn,yt,qr,Ei,Un,kt;const pt=class{constructor(t,r){Fe(this,Mn);Fe(this,qr);Fe(this,Fn,ce.screen.getPrimaryDisplay().size);Fe(this,Gr,oe(this,Fn).width);Fe(this,Br,oe(this,Fn).height);Fe(this,jn,{getAppPath:ce.app.getAppPath(),isPackaged:ce.app.isPackaged,downloads:ce.app.getPath("downloads"),userData:ce.app.getPath("userData"),getVersion:"",env:{...process.env},platform:process.platform,arch:process.arch});Fe(this,pr,0);Fe(this,yr,0);Fe(this,Kt,0);Fe(this,Wt,0);Fe(this,Ci,process.platform==="win32");Fe(this,Hr,void 0);Fe(this,kn,!1);Fe(this,yt,!1);this.bw=t,oe(this,jn).getVersion=r,ce.ipcMain.handle("getInfo",()=>oe(this,jn)),ce.ipcMain.handle("existsSync",(i,s)=>lt.existsSync(s)),ce.ipcMain.handle("copySync",(i,s,o)=>lt.copySync(s,o)),ce.ipcMain.handle("removeSync",(i,s)=>lt.removeSync(s)),ce.ipcMain.handle("ensureFileSync",(i,s)=>lt.ensureFileSync(s)),ce.ipcMain.handle("readFileSync",(i,s)=>lt.readFileSync(s,{encoding:"utf8"})),ce.ipcMain.handle("readFile",(i,s,o)=>lt.readFile(s,o)),ce.ipcMain.handle("writeFileSync",(i,s,o,c)=>lt.writeFileSync(s,o,c)),ce.ipcMain.handle("appendFile",(i,s,o,c)=>lt.appendFile(s,o,c)),ce.ipcMain.handle("win_close",()=>t.close()),ce.ipcMain.handle("win_setTitle",(i,s)=>t.setTitle(s)),ce.ipcMain.handle("showMessageBox",(i,s)=>ce.dialog.showMessageBox(s)),ce.ipcMain.handle("capturePage",(i,s)=>t.webContents.capturePage().then(o=>lt.writeFileSync(s,s.slice(-4)===".png"?o.toPNG():o.toJPEG(80)))),ce.ipcMain.handle("navigate_to",(i,s)=>ce.shell.openExternal(s)),ce.ipcMain.handle("openDevTools",()=>t.webContents.openDevTools()),ce.ipcMain.handle("win_ev_devtools_opened",(i,s)=>t.webContents.on("devtools-opened",s));let n;ce.ipcMain.handle("Store",(i,s)=>{n=new gc(s)}),ce.ipcMain.handle("flush",(i,s)=>{n.store=s}),ce.ipcMain.handle("Store_isEmpty",()=>n.size===0),ce.ipcMain.handle("Store_get",()=>n.store),ce.ipcMain.handle("zip",(i,s,o)=>{const c=new Ic;c.addLocalFolder(s),c.writeZip(o)}),ce.ipcMain.handle("unzip",(i,s,o)=>{lt.removeSync(o),lt.ensureDirSync(o),new Ic(s).extractAllTo(o,!0)}),ce.ipcMain.handle("isSimpleFullScreen",()=>t.simpleFullScreen),oe(this,Ci)?(ce.ipcMain.handle("setSimpleFullScreen",(i,s)=>{ze(this,yt,!0),t.setSimpleFullScreen(s),s||(t.setPosition(oe(this,pr),oe(this,yr)),t.setContentSize(oe(this,Kt),oe(this,Wt)+oe(pt,kt))),ze(this,yt,!1)}),t.on("enter-full-screen",()=>{t.setContentSize(oe(this,Gr),oe(this,Br)-oe(pt,kt))}),t.on("leave-full-screen",()=>{Rr(this,qr,Ei).call(this,!1,oe(this,pr),oe(this,yr),oe(this,Kt),oe(this,Wt)+oe(pt,kt))})):ce.ipcMain.handle("setSimpleFullScreen",(i,s)=>{t.setSimpleFullScreen(s),s||t.setContentSize(oe(this,Kt),oe(this,Wt)+oe(pt,kt))}),ce.ipcMain.handle("window",(i,s,o,c,u,m)=>Rr(this,qr,Ei).call(this,s,o,c,u,m)),t.on("move",()=>Rr(this,Mn,Ps).call(this))}openDevTools(){this.bw.webContents.openDevTools()}static initRenderer(t,r,n){let i=()=>{},s;try{gc.initRenderer(),process.env.ELECTRON_DISABLE_SECURITY_WARNINGS="true",s=new ce.BrowserWindow({...n,fullscreenable:!0,maximizable:!1,webPreferences:{enableRemoteModule:!1,nodeIntegration:!1,contextIsolation:!0,preload:`${__dirname}/preload.js`,backgroundColor:"#000",show:!1}}),s.setMenuBarVisibility(!1);const o=s.getContentSize()[1];s.setMenuBarVisibility(!0);const c=s.getContentSize()[1];ze(pt,kt,o-c),ze(pt,Un,new pt(s,r)),i=()=>oe(pt,Un).openDevTools(),s.loadFile(t),s.once("ready-to-show",()=>s.show())}catch(o){throw console.error(`ealy err:${o}`),i(),"initRenderer error"}return s}};let Ur=pt;Fn=new WeakMap,Gr=new WeakMap,Br=new WeakMap,jn=new WeakMap,pr=new WeakMap,yr=new WeakMap,Kt=new WeakMap,Wt=new WeakMap,Ci=new WeakMap,Hr=new WeakMap,Mn=new WeakSet,Ps=function(){if(oe(this,Hr)||oe(this,yt))return;ze(this,yt,!0);const{x:t,y:r}=this.bw.getBounds();ze(this,Hr,setTimeout(()=>{if(ze(this,Hr,void 0),oe(this,kn)){ze(this,kn,!1);return}ze(this,yt,!1);const n=this.bw.getBounds();if(t!==n.x||r!==n.y){Rr(this,Mn,Ps).call(this);return}Rr(this,qr,Ei).call(this,!1,n.x,n.y,oe(this,Kt),oe(this,Wt))},1e3/60*10))},kn=new WeakMap,yt=new WeakMap,qr=new WeakSet,Ei=function(t,r,n,i,s){oe(this,yt)||(ze(this,yt,!0),!this.bw.simpleFullScreen&&(t?([r,n]=this.bw.getPosition(),r=(oe(this,Gr)-r)*.5,n=(oe(this,Br)-n)*.5):((r<0||r>oe(this,Gr))&&(r=0),(n<0||n>oe(this,Br))&&(n=0)),(oe(this,pr)!==r||oe(this,yr)!==n)&&(ze(this,pr,r),ze(this,yr,n),this.bw.webContents.send("save_win_pos",r,n),this.bw.setPosition(r,n)),ze(this,Kt,i),ze(this,Wt,s),this.bw.setContentSize(i,s+oe(pt,kt)),ze(this,yt,!1)))},Un=new WeakMap,kt=new WeakMap,Fe(Ur,Un,void 0),Fe(Ur,kt,0);module.exports=Ur;exports.appMain=Ur;
14
+ deps: ${a}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[m,a]=s(u);o(u,m),c(u,a)}};function s({schema:u}){const m={},a={};for(const l in u){if(l==="__proto__")continue;const E=Array.isArray(u[l])?m:a;E[l]=u[l]}return[m,a]}function o(u,m=u.schema){const{gen:a,data:l,it:E}=u;if(Object.keys(m).length===0)return;const h=a.let("missing");for(const d in m){const y=m[d];if(y.length===0)continue;const p=(0,n.propertyInData)(a,l,d,E.opts.ownProperties);u.setParams({property:d,depsCount:y.length,deps:y.join(", ")}),E.allErrors?a.if(p,()=>{for(const f of y)(0,n.checkReportMissingProp)(u,f)}):(a.if((0,t._)`${p} && (${(0,n.checkMissingProp)(u,y,h)})`),(0,n.reportMissingProp)(u,h),a.else())}}e.validatePropertyDeps=o;function c(u,m=u.schema){const{gen:a,data:l,keyword:E,it:h}=u,d=a.name("valid");for(const y in m)(0,r.alwaysValidSchema)(h,m[y])||(a.if((0,n.propertyInData)(a,l,y,h.opts.ownProperties),()=>{const p=u.subschema({keyword:E,schemaProp:y},d);u.mergeValidEvaluated(p,d)},()=>a.var(d,!0)),u.ok(d))}e.validateSchemaDeps=c,e.default=i})(cf);var Do={};Object.defineProperty(Do,"__esModule",{value:!0});const uf=re,By=fe,Hy={message:"property name must be valid",params:({params:e})=>(0,uf._)`{propertyName: ${e.propertyName}}`},qy={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Hy,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,By.alwaysValidSchema)(i,r))return;const s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,uf.not)(s),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(s)}};Do.default=qy;var Ji={};Object.defineProperty(Ji,"__esModule",{value:!0});const si=ne,ht=re,Ky=Lt,oi=fe,Zy={message:"must NOT have additional properties",params:({params:e})=>(0,ht._)`{additionalProperty: ${e.additionalProperty}}`},Wy={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Zy,code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:c,opts:u}=o;if(o.props=!0,u.removeAdditional!=="all"&&(0,oi.alwaysValidSchema)(o,r))return;const m=(0,si.allSchemaProperties)(n.properties),a=(0,si.allSchemaProperties)(n.patternProperties);l(),e.ok((0,ht._)`${s} === ${Ky.default.errors}`);function l(){t.forIn("key",i,p=>{!m.length&&!a.length?d(p):t.if(E(p),()=>d(p))})}function E(p){let f;if(m.length>8){const $=(0,oi.schemaRefOrVal)(o,n.properties,"properties");f=(0,si.isOwnProperty)(t,$,p)}else m.length?f=(0,ht.or)(...m.map($=>(0,ht._)`${p} === ${$}`)):f=ht.nil;return a.length&&(f=(0,ht.or)(f,...a.map($=>(0,ht._)`${(0,si.usePattern)(e,$)}.test(${p})`))),(0,ht.not)(f)}function h(p){t.code((0,ht._)`delete ${i}[${p}]`)}function d(p){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){h(p);return}if(r===!1){e.setParams({additionalProperty:p}),e.error(),c||t.break();return}if(typeof r=="object"&&!(0,oi.alwaysValidSchema)(o,r)){const f=t.name("valid");u.removeAdditional==="failing"?(y(p,f,!1),t.if((0,ht.not)(f),()=>{e.reset(),h(p)})):(y(p,f),c||t.if((0,ht.not)(f),()=>t.break()))}}function y(p,f,$){const _={keyword:"additionalProperties",dataProp:p,dataPropType:oi.Type.Str};$===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(_,f)}}};Ji.default=Wy;var Co={};Object.defineProperty(Co,"__esModule",{value:!0});const Xy=gt,Ma=ne,vs=fe,ka=Ji,Jy={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&ka.default.code(new Xy.KeywordCxt(s,ka.default,"additionalProperties"));const o=(0,Ma.allSchemaProperties)(r);for(const l of o)s.definedProperties.add(l);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=vs.mergeEvaluated.props(t,(0,vs.toHash)(o),s.props));const c=o.filter(l=>!(0,vs.alwaysValidSchema)(s,r[l]));if(c.length===0)return;const u=t.name("valid");for(const l of c)m(l)?a(l):(t.if((0,Ma.propertyInData)(t,i,l,s.opts.ownProperties)),a(l),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(l),e.ok(u);function m(l){return s.opts.useDefaults&&!s.compositeRule&&r[l].default!==void 0}function a(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},u)}}};Co.default=Jy;var Ro={};Object.defineProperty(Ro,"__esModule",{value:!0});const Ua=ne,ai=re,Va=fe,za=fe,Yy={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:o}=s,c=(0,Ua.allSchemaProperties)(r),u=c.filter(y=>(0,Va.alwaysValidSchema)(s,r[y]));if(c.length===0||u.length===c.length&&(!s.opts.unevaluated||s.props===!0))return;const m=o.strictSchema&&!o.allowMatchingProperties&&i.properties,a=t.name("valid");s.props!==!0&&!(s.props instanceof ai.Name)&&(s.props=(0,za.evaluatedPropsToName)(t,s.props));const{props:l}=s;E();function E(){for(const y of c)m&&h(y),s.allErrors?d(y):(t.var(a,!0),d(y),t.if(a))}function h(y){for(const p in m)new RegExp(y).test(p)&&(0,Va.checkStrictMode)(s,`property ${p} matches pattern ${y} (use allowMatchingProperties)`)}function d(y){t.forIn("key",n,p=>{t.if((0,ai._)`${(0,Ua.usePattern)(e,y)}.test(${p})`,()=>{const f=u.includes(y);f||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:p,dataPropType:za.Type.Str},a),s.opts.unevaluated&&l!==!0?t.assign((0,ai._)`${l}[${p}]`,!0):!f&&!s.allErrors&&t.if((0,ai.not)(a),()=>t.break())})})}}};Ro.default=Yy;var Po={};Object.defineProperty(Po,"__esModule",{value:!0});const Qy=fe,e0={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,Qy.alwaysValidSchema)(n,r)){e.fail();return}const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Po.default=e0;var Ao={};Object.defineProperty(Ao,"__esModule",{value:!0});const t0=ne,r0={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:t0.validateUnion,error:{message:"must match a schema in anyOf"}};Ao.default=r0;var bo={};Object.defineProperty(bo,"__esModule",{value:!0});const yi=re,n0=fe,i0={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,yi._)`{passingSchemas: ${e.passing}}`},s0={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:i0,code(e){const{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const s=r,o=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block(m),e.result(o,()=>e.reset(),()=>e.error(!0));function m(){s.forEach((a,l)=>{let E;(0,n0.alwaysValidSchema)(i,a)?t.var(u,!0):E=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},u),l>0&&t.if((0,yi._)`${u} && ${o}`).assign(o,!1).assign(c,(0,yi._)`[${c}, ${l}]`).else(),t.if(u,()=>{t.assign(o,!0),t.assign(c,l),E&&e.mergeEvaluated(E,yi.Name)})})}}};bo.default=s0;var Lo={};Object.defineProperty(Lo,"__esModule",{value:!0});const o0=fe,a0={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach((s,o)=>{if((0,o0.alwaysValidSchema)(n,s))return;const c=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i),e.mergeEvaluated(c)})}};Lo.default=a0;var Fo={};Object.defineProperty(Fo,"__esModule",{value:!0});const Fi=re,ff=fe,c0={message:({params:e})=>(0,Fi.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Fi._)`{failingKeyword: ${e.ifClause}}`},u0={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:c0,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,ff.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=xa(n,"then"),s=xa(n,"else");if(!i&&!s)return;const o=t.let("valid",!0),c=t.name("_valid");if(u(),e.reset(),i&&s){const a=t.let("ifClause");e.setParams({ifClause:a}),t.if(c,m("then",a),m("else",a))}else i?t.if(c,m("then")):t.if((0,Fi.not)(c),m("else"));e.pass(o,()=>e.error(!0));function u(){const a=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);e.mergeEvaluated(a)}function m(a,l){return()=>{const E=e.subschema({keyword:a},c);t.assign(o,c),e.mergeValidEvaluated(E,o),l?t.assign(l,(0,Fi._)`${a}`):e.setParams({ifClause:a})}}}};function xa(e,t){const r=e.schema[t];return r!==void 0&&!(0,ff.alwaysValidSchema)(e,r)}Fo.default=u0;var jo={};Object.defineProperty(jo,"__esModule",{value:!0});const f0=fe,l0={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,f0.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};jo.default=l0;Object.defineProperty(No,"__esModule",{value:!0});const d0=rn,h0=Io,m0=nn,p0=Oo,y0=To,v0=cf,E0=Do,g0=Ji,$0=Co,_0=Ro,S0=Po,w0=Ao,N0=bo,I0=Lo,O0=Fo,T0=jo;function D0(e=!1){const t=[S0.default,w0.default,N0.default,I0.default,O0.default,T0.default,E0.default,g0.default,v0.default,$0.default,_0.default];return e?t.push(h0.default,p0.default):t.push(d0.default,m0.default),t.push(y0.default),t}No.default=D0;var Mo={},ko={};Object.defineProperty(ko,"__esModule",{value:!0});const De=re,C0={message:({schemaCode:e})=>(0,De.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,De._)`{format: ${e}}`},R0={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:C0,code(e,t){const{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:c}=e,{opts:u,errSchemaPath:m,schemaEnv:a,self:l}=c;if(!u.validateFormats)return;i?E():h();function E(){const d=r.scopeValue("formats",{ref:l.formats,code:u.code.formats}),y=r.const("fDef",(0,De._)`${d}[${o}]`),p=r.let("fType"),f=r.let("format");r.if((0,De._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(p,(0,De._)`${y}.type || "string"`).assign(f,(0,De._)`${y}.validate`),()=>r.assign(p,(0,De._)`"string"`).assign(f,y)),e.fail$data((0,De.or)($(),_()));function $(){return u.strictSchema===!1?De.nil:(0,De._)`${o} && !${f}`}function _(){const D=a.$async?(0,De._)`(${y}.async ? await ${f}(${n}) : ${f}(${n}))`:(0,De._)`${f}(${n})`,z=(0,De._)`(typeof ${f} == "function" ? ${D} : ${f}.test(${n}))`;return(0,De._)`${f} && ${f} !== true && ${p} === ${t} && !${z}`}}function h(){const d=l.formats[s];if(!d){$();return}if(d===!0)return;const[y,p,f]=_(d);y===t&&e.pass(D());function $(){if(u.strictSchema===!1){l.logger.warn(z());return}throw new Error(z());function z(){return`unknown format "${s}" ignored in schema at path "${m}"`}}function _(z){const T=z instanceof RegExp?(0,De.regexpCode)(z):u.code.formats?(0,De._)`${u.code.formats}${(0,De.getProperty)(s)}`:void 0,C=r.scopeValue("formats",{key:s,ref:z,code:T});return typeof z=="object"&&!(z instanceof RegExp)?[z.type||"string",z.validate,(0,De._)`${C}.validate`]:["string",z,C]}function D(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!a.$async)throw new Error("async format in sync schema");return(0,De._)`await ${f}(${n})`}return typeof p=="function"?(0,De._)`${f}(${n})`:(0,De._)`${f}.test(${n})`}}}};ko.default=R0;Object.defineProperty(Mo,"__esModule",{value:!0});const P0=ko,A0=[P0.default];Mo.default=A0;var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.contentVocabulary=Qr.metadataVocabulary=void 0;Qr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Qr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(co,"__esModule",{value:!0});const b0=uo,L0=lo,F0=No,j0=Mo,Ga=Qr,M0=[b0.default,L0.default,(0,F0.default)(),j0.default,Ga.metadataVocabulary,Ga.contentVocabulary];co.default=M0;var Uo={},lf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(lf);Object.defineProperty(Uo,"__esModule",{value:!0});const Mr=re,ks=lf,Ba=tt,k0=fe,U0={message:({params:{discrError:e,tagName:t}})=>e===ks.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Mr._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},V0={keyword:"discriminator",type:"object",schemaType:"object",error:U0,code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:o}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const c=n.propertyName;if(typeof c!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),m=t.const("tag",(0,Mr._)`${r}${(0,Mr.getProperty)(c)}`);t.if((0,Mr._)`typeof ${m} == "string"`,()=>a(),()=>e.error(!1,{discrError:ks.DiscrError.Tag,tag:m,tagName:c})),e.ok(u);function a(){const h=E();t.if(!1);for(const d in h)t.elseIf((0,Mr._)`${m} === ${d}`),t.assign(u,l(h[d]));t.else(),e.error(!1,{discrError:ks.DiscrError.Mapping,tag:m,tagName:c}),t.endIf()}function l(h){const d=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:h},d);return e.mergeEvaluated(y,Mr.Name),d}function E(){var h;const d={},y=f(i);let p=!0;for(let D=0;D<o.length;D++){let z=o[D];z!=null&&z.$ref&&!(0,k0.schemaHasRulesButRef)(z,s.self.RULES)&&(z=Ba.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,z==null?void 0:z.$ref),z instanceof Ba.SchemaEnv&&(z=z.schema));const T=(h=z==null?void 0:z.properties)===null||h===void 0?void 0:h[c];if(typeof T!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${c}"`);p=p&&(y||f(z)),$(T,D)}if(!p)throw new Error(`discriminator: "${c}" must be required`);return d;function f({required:D}){return Array.isArray(D)&&D.includes(c)}function $(D,z){if(D.const)_(D.const,z);else if(D.enum)for(const T of D.enum)_(T,z);else throw new Error(`discriminator: "properties/${c}" must have "const" or "enum"`)}function _(D,z){if(typeof D!="string"||D in d)throw new Error(`discriminator: "${c}" values must be unique strings`);d[D]=z}}}};Uo.default=V0;const z0="http://json-schema.org/draft-07/schema#",x0="http://json-schema.org/draft-07/schema#",G0="Core schema meta-schema",B0={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},H0=["object","boolean"],q0={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},K0={$schema:z0,$id:x0,title:G0,definitions:B0,type:H0,properties:q0,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=Pu,n=co,i=Uo,s=K0,o=["/properties"],c="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(d=>this.addVocabulary(d)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const d=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(d,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var m=gt;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return m.KeywordCxt}});var a=re;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return a.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return a.CodeGen}});var l=Hn;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var E=qn;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return E.default}})})(nm,bn);var ji={},Z0={get exports(){return ji},set exports(e){ji=e}},df={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(P,x){return{validate:P,compare:x}}e.fullFormats={date:t(s,o),time:t(u,m),"date-time":t(l,E),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:y,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:V,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:f,int32:{type:"number",validate:D},int64:{type:"number",validate:z},float:{type:"number",validate:T},double:{type:"number",validate:T},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,E),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(P){return P%4===0&&(P%100!==0||P%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(P){const x=n.exec(P);if(!x)return!1;const M=+x[1],A=+x[2],H=+x[3];return A>=1&&A<=12&&H>=1&&H<=(A===2&&r(M)?29:i[A])}function o(P,x){if(P&&x)return P>x?1:P<x?-1:0}const c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(P,x){const M=c.exec(P);if(!M)return!1;const A=+M[1],H=+M[2],G=+M[3],q=M[5];return(A<=23&&H<=59&&G<=59||A===23&&H===59&&G===60)&&(!x||q!=="")}function m(P,x){if(!(P&&x))return;const M=c.exec(P),A=c.exec(x);if(M&&A)return P=M[1]+M[2]+M[3]+(M[4]||""),x=A[1]+A[2]+A[3]+(A[4]||""),P>x?1:P<x?-1:0}const a=/t|\s/i;function l(P){const x=P.split(a);return x.length===2&&s(x[0])&&u(x[1],!0)}function E(P,x){if(!(P&&x))return;const[M,A]=P.split(a),[H,G]=x.split(a),q=o(M,H);if(q!==void 0)return q||m(A,G)}const h=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function y(P){return h.test(P)&&d.test(P)}const p=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function f(P){return p.lastIndex=0,p.test(P)}const $=-(2**31),_=2**31-1;function D(P){return Number.isInteger(P)&&P<=_&&P>=$}function z(P){return Number.isInteger(P)}function T(){return!0}const C=/[^\\]\\Z/;function V(P){if(C.test(P))return!1;try{return new RegExp(P),!0}catch{return!1}}})(df);var hf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=bn,r=re,n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:c,schemaCode:u})=>r.str`should be ${i[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>r._`{comparison: ${i[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:u,data:m,schemaCode:a,keyword:l,it:E}=c,{opts:h,self:d}=E;if(!h.validateFormats)return;const y=new t.KeywordCxt(E,d.RULES.all.format.definition,"format");y.$data?p():f();function p(){const _=u.scopeValue("formats",{ref:d.formats,code:h.code.formats}),D=u.const("fmt",r._`${_}[${y.schemaCode}]`);c.fail$data(r.or(r._`typeof ${D} != "object"`,r._`${D} instanceof RegExp`,r._`typeof ${D}.compare != "function"`,$(D)))}function f(){const _=y.schema,D=d.formats[_];if(!D||D===!0)return;if(typeof D!="object"||D instanceof RegExp||typeof D.compare!="function")throw new Error(`"${l}": format "${_}" does not define "compare" function`);const z=u.scopeValue("formats",{key:_,ref:D,code:h.code.formats?r._`${h.code.formats}${r.getProperty(_)}`:void 0});c.fail$data($(z))}function $(_){return r._`${_}.compare(${m}, ${a}) ${i[l].fail} 0`}},dependencies:["format"]};const o=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=o})(hf);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=df,n=hf,i=re,s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),c=(m,a={keywords:!0})=>{if(Array.isArray(a))return u(m,a,r.fullFormats,s),m;const[l,E]=a.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,s],h=a.formats||r.formatNames;return u(m,h,l,E),a.keywords&&n.default(m),m};c.get=(m,a="full")=>{const E=(a==="fast"?r.fastFormats:r.fullFormats)[m];if(!E)throw new Error(`Unknown format "${m}"`);return E};function u(m,a,l,E){var h,d;(h=(d=m.opts.code).formats)!==null&&h!==void 0||(d.formats=i._`require("ajv-formats/dist/formats").${E}`);for(const y of a)m.addFormat(y,l[y])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(Z0,ji);const W0=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const i=Object.getOwnPropertyDescriptor(e,r),s=Object.getOwnPropertyDescriptor(t,r);!X0(i,s)&&n||Object.defineProperty(e,r,s)},X0=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},J0=(e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},Y0=(e,t)=>`/* Wrapped ${e}*/
15
+ ${t}`,Q0=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ev=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),tv=(e,t,r)=>{const n=r===""?"":`with ${r.trim()}() `,i=Y0.bind(null,n,t.toString());Object.defineProperty(i,"name",ev),Object.defineProperty(e,"toString",{...Q0,value:i})},rv=(e,t,{ignoreNonConfigurable:r=!1}={})=>{const{name:n}=e;for(const i of Reflect.ownKeys(t))W0(e,t,i,r);return J0(e,t),tv(e,t,n),e};var nv=rv;const iv=nv;var sv=(e,t={})=>{if(typeof e!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);const{wait:r=0,before:n=!1,after:i=!0}=t;if(!n&&!i)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let s,o;const c=function(...u){const m=this,a=()=>{s=void 0,i&&(o=e.apply(m,u))},l=n&&!s;return clearTimeout(s),s=setTimeout(a,r),l&&(o=e.apply(m,u)),o};return iv(c,e),c.cancel=()=>{s&&(clearTimeout(s),s=void 0)},c},zt={},ov={get exports(){return zt},set exports(e){zt=e}};const av="2.0.0",cv=256,uv=Number.MAX_SAFE_INTEGER||9007199254740991,fv=16;var Yi={SEMVER_SPEC_VERSION:av,MAX_LENGTH:cv,MAX_SAFE_INTEGER:uv,MAX_SAFE_COMPONENT_LENGTH:fv};const lv=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Qi=lv;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r}=Yi,n=Qi;t=e.exports={};const i=t.re=[],s=t.src=[],o=t.t={};let c=0;const u=(m,a,l)=>{const E=c++;n(m,E,a),o[m]=E,s[E]=a,i[E]=new RegExp(a,l?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${s[o.NUMERICIDENTIFIER]})\\.(${s[o.NUMERICIDENTIFIER]})\\.(${s[o.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${s[o.NUMERICIDENTIFIERLOOSE]})\\.(${s[o.NUMERICIDENTIFIERLOOSE]})\\.(${s[o.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${s[o.NUMERICIDENTIFIER]}|${s[o.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${s[o.NUMERICIDENTIFIERLOOSE]}|${s[o.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${s[o.PRERELEASEIDENTIFIER]}(?:\\.${s[o.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${s[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[o.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${s[o.BUILDIDENTIFIER]}(?:\\.${s[o.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${s[o.MAINVERSION]}${s[o.PRERELEASE]}?${s[o.BUILD]}?`),u("FULL",`^${s[o.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${s[o.MAINVERSIONLOOSE]}${s[o.PRERELEASELOOSE]}?${s[o.BUILD]}?`),u("LOOSE",`^${s[o.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${s[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${s[o.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${s[o.XRANGEIDENTIFIER]})(?:\\.(${s[o.XRANGEIDENTIFIER]})(?:\\.(${s[o.XRANGEIDENTIFIER]})(?:${s[o.PRERELEASE]})?${s[o.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${s[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[o.XRANGEIDENTIFIERLOOSE]})(?:${s[o.PRERELEASELOOSE]})?${s[o.BUILD]}?)?)?`),u("XRANGE",`^${s[o.GTLT]}\\s*${s[o.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${s[o.GTLT]}\\s*${s[o.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",s[o.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${s[o.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${s[o.LONETILDE]}${s[o.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${s[o.LONETILDE]}${s[o.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${s[o.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${s[o.LONECARET]}${s[o.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${s[o.LONECARET]}${s[o.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${s[o.GTLT]}\\s*(${s[o.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${s[o.GTLT]}\\s*(${s[o.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${s[o.GTLT]}\\s*(${s[o.LOOSEPLAIN]}|${s[o.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${s[o.XRANGEPLAIN]})\\s+-\\s+(${s[o.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${s[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[o.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(ov,zt);const dv=["includePrerelease","loose","rtl"],hv=e=>e?typeof e!="object"?{loose:!0}:dv.filter(t=>e[t]).reduce((t,r)=>(t[r]=!0,t),{}):{};var es=hv;const Ha=/^[0-9]+$/,mf=(e,t)=>{const r=Ha.test(e),n=Ha.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},mv=(e,t)=>mf(t,e);var pf={compareIdentifiers:mf,rcompareIdentifiers:mv};const ci=Qi,{MAX_LENGTH:qa,MAX_SAFE_INTEGER:ui}=Yi,{re:Ka,t:Za}=zt,pv=es,{compareIdentifiers:Fr}=pf;let Ct=class{constructor(t,r){if(r=pv(r),t instanceof Ct){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid Version: ${t}`);if(t.length>qa)throw new TypeError(`version is longer than ${qa} characters`);ci("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Ka[Za.LOOSE]:Ka[Za.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ui||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ui||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ui||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s<ui)return s}return i}):this.prerelease=[],this.build=n[5]?n[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(ci("SemVer.compare",this.version,this.options,t),!(t instanceof Ct)){if(typeof t=="string"&&t===this.version)return 0;t=new Ct(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Ct||(t=new Ct(t,this.options)),Fr(this.major,t.major)||Fr(this.minor,t.minor)||Fr(this.patch,t.patch)}comparePre(t){if(t instanceof Ct||(t=new Ct(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 r=0;do{const n=this.prerelease[r],i=t.prerelease[r];if(ci("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Fr(n,i)}while(++r)}compareBuild(t){t instanceof Ct||(t=new Ct(t,this.options));let r=0;do{const n=this.build[r],i=t.build[r];if(ci("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Fr(n,i)}while(++r)}inc(t,r){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}r&&(Fr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${t}`)}return this.format(),this.raw=this.version,this}};var Je=Ct;const{MAX_LENGTH:yv}=Yi,{re:Wa,t:Xa}=zt,Ja=Je,vv=es,Ev=(e,t)=>{if(t=vv(t),e instanceof Ja)return e;if(typeof e!="string"||e.length>yv||!(t.loose?Wa[Xa.LOOSE]:Wa[Xa.FULL]).test(e))return null;try{return new Ja(e,t)}catch{return null}};var sn=Ev;const gv=sn,$v=(e,t)=>{const r=gv(e,t);return r?r.version:null};var _v=$v;const Sv=sn,wv=(e,t)=>{const r=Sv(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var Nv=wv;const Ya=Je,Iv=(e,t,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new Ya(e instanceof Ya?e.version:e,r).inc(t,n).version}catch{return null}};var Ov=Iv;const Qa=Je,Tv=(e,t,r)=>new Qa(e,r).compare(new Qa(t,r));var $t=Tv;const Dv=$t,Cv=(e,t,r)=>Dv(e,t,r)===0;var Vo=Cv;const ec=sn,Rv=Vo,Pv=(e,t)=>{if(Rv(e,t))return null;{const r=ec(e),n=ec(t),i=r.prerelease.length||n.prerelease.length,s=i?"pre":"",o=i?"prerelease":"";for(const c in r)if((c==="major"||c==="minor"||c==="patch")&&r[c]!==n[c])return s+c;return o}};var Av=Pv;const bv=Je,Lv=(e,t)=>new bv(e,t).major;var Fv=Lv;const jv=Je,Mv=(e,t)=>new jv(e,t).minor;var kv=Mv;const Uv=Je,Vv=(e,t)=>new Uv(e,t).patch;var zv=Vv;const xv=sn,Gv=(e,t)=>{const r=xv(e,t);return r&&r.prerelease.length?r.prerelease:null};var Bv=Gv;const Hv=$t,qv=(e,t,r)=>Hv(t,e,r);var Kv=qv;const Zv=$t,Wv=(e,t)=>Zv(e,t,!0);var Xv=Wv;const tc=Je,Jv=(e,t,r)=>{const n=new tc(e,r),i=new tc(t,r);return n.compare(i)||n.compareBuild(i)};var zo=Jv;const Yv=zo,Qv=(e,t)=>e.sort((r,n)=>Yv(r,n,t));var eE=Qv;const tE=zo,rE=(e,t)=>e.sort((r,n)=>tE(n,r,t));var nE=rE;const iE=$t,sE=(e,t,r)=>iE(e,t,r)>0;var ts=sE;const oE=$t,aE=(e,t,r)=>oE(e,t,r)<0;var xo=aE;const cE=$t,uE=(e,t,r)=>cE(e,t,r)!==0;var yf=uE;const fE=$t,lE=(e,t,r)=>fE(e,t,r)>=0;var Go=lE;const dE=$t,hE=(e,t,r)=>dE(e,t,r)<=0;var Bo=hE;const mE=Vo,pE=yf,yE=ts,vE=Go,EE=xo,gE=Bo,$E=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return mE(e,r,n);case"!=":return pE(e,r,n);case">":return yE(e,r,n);case">=":return vE(e,r,n);case"<":return EE(e,r,n);case"<=":return gE(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var vf=$E;const _E=Je,SE=sn,{re:fi,t:li}=zt,wE=(e,t)=>{if(e instanceof _E)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(fi[li.COERCE]);else{let n;for(;(n=fi[li.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),fi[li.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;fi[li.COERCERTL].lastIndex=-1}return r===null?null:SE(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};var NE=wE,Es,rc;function IE(){return rc||(rc=1,Es=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Es}var OE=le;le.Node=$r;le.create=le;function le(e){var t=this;if(t instanceof le||(t=new le),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(i){t.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)t.push(arguments[r]);return t}le.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t};le.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};le.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};le.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)DE(this,arguments[e]);return this.length};le.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)CE(this,arguments[e]);return this.length};le.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};le.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};le.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;r!==null;n++)e.call(t,r.value,n,this),r=r.next};le.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;r!==null;n--)e.call(t,r.value,n,this),r=r.prev};le.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++)r=r.next;if(t===e&&r!==null)return r.value};le.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++)r=r.prev;if(t===e&&r!==null)return r.value};le.prototype.map=function(e,t){t=t||this;for(var r=new le,n=this.head;n!==null;)r.push(e.call(t,n.value,this)),n=n.next;return r};le.prototype.mapReverse=function(e,t){t=t||this;for(var r=new le,n=this.tail;n!==null;)r.push(e.call(t,n.value,this)),n=n.prev;return r};le.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=e(r,n.value,i),n=n.next;return r};le.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=e(r,n.value,i),n=n.prev;return r};le.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};le.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};le.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new le;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=0,i=this.head;i!==null&&n<e;n++)i=i.next;for(;i!==null&&n<t;n++,i=i.next)r.push(i.value);return r};le.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new le;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=this.length,i=this.tail;i!==null&&n>t;n--)i=i.prev;for(;i!==null&&n>e;n--,i=i.prev)r.push(i.value);return r};le.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;i!==null&&n<e;n++)i=i.next;for(var s=[],n=0;i&&n<t;n++)s.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=TE(this,i,r[n]);return s};le.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};function TE(e,t,r){var n=t===e.head?new $r(r,null,t,e):new $r(r,t,t.next,e);return n.next===null&&(e.tail=n),n.prev===null&&(e.head=n),e.length++,n}function DE(e,t){e.tail=new $r(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function CE(e,t){e.head=new $r(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function $r(e,t,r,n){if(!(this instanceof $r))return new $r(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{IE()(le)}catch{}const RE=OE,hr=Symbol("max"),Mt=Symbol("length"),jr=Symbol("lengthCalculator"),Dn=Symbol("allowStale"),mr=Symbol("maxAge"),jt=Symbol("dispose"),nc=Symbol("noDisposeOnSet"),be=Symbol("lruList"),mt=Symbol("cache"),Ef=Symbol("updateAgeOnGet"),gs=()=>1;class PE{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[hr]=t.max||1/0;const r=t.length||gs;if(this[jr]=typeof r!="function"?gs:r,this[Dn]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[mr]=t.maxAge||0,this[jt]=t.dispose,this[nc]=t.noDisposeOnSet||!1,this[Ef]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[hr]=t||1/0,vn(this)}get max(){return this[hr]}set allowStale(t){this[Dn]=!!t}get allowStale(){return this[Dn]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[mr]=t,vn(this)}get maxAge(){return this[mr]}set lengthCalculator(t){typeof t!="function"&&(t=gs),t!==this[jr]&&(this[jr]=t,this[Mt]=0,this[be].forEach(r=>{r.length=this[jr](r.value,r.key),this[Mt]+=r.length})),vn(this)}get lengthCalculator(){return this[jr]}get length(){return this[Mt]}get itemCount(){return this[be].length}rforEach(t,r){r=r||this;for(let n=this[be].tail;n!==null;){const i=n.prev;ic(this,t,n,r),n=i}}forEach(t,r){r=r||this;for(let n=this[be].head;n!==null;){const i=n.next;ic(this,t,n,r),n=i}}keys(){return this[be].toArray().map(t=>t.key)}values(){return this[be].toArray().map(t=>t.value)}reset(){this[jt]&&this[be]&&this[be].length&&this[be].forEach(t=>this[jt](t.key,t.value)),this[mt]=new Map,this[be]=new RE,this[Mt]=0}dump(){return this[be].map(t=>Mi(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[be]}set(t,r,n){if(n=n||this[mr],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[jr](r,t);if(this[mt].has(t)){if(s>this[hr])return Gr(this,this[mt].get(t)),!1;const u=this[mt].get(t).value;return this[jt]&&(this[nc]||this[jt](t,u.value)),u.now=i,u.maxAge=n,u.value=r,this[Mt]+=s-u.length,u.length=s,this.get(t),vn(this),!0}const o=new AE(t,r,s,i,n);return o.length>this[hr]?(this[jt]&&this[jt](t,r),!1):(this[Mt]+=o.length,this[be].unshift(o),this[mt].set(t,this[be].head),vn(this),!0)}has(t){if(!this[mt].has(t))return!1;const r=this[mt].get(t).value;return!Mi(this,r)}get(t){return $s(this,t,!0)}peek(t){return $s(this,t,!1)}pop(){const t=this[be].tail;return t?(Gr(this,t),t.value):null}del(t){Gr(this,this[mt].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const i=t[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const o=s-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[mt].forEach((t,r)=>$s(this,r,!1))}}const $s=(e,t,r)=>{const n=e[mt].get(t);if(n){const i=n.value;if(Mi(e,i)){if(Gr(e,n),!e[Dn])return}else r&&(e[Ef]&&(n.value.now=Date.now()),e[be].unshiftNode(n));return i.value}},Mi=(e,t)=>{if(!t||!t.maxAge&&!e[mr])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[mr]&&r>e[mr]},vn=e=>{if(e[Mt]>e[hr])for(let t=e[be].tail;e[Mt]>e[hr]&&t!==null;){const r=t.prev;Gr(e,t),t=r}},Gr=(e,t)=>{if(t){const r=t.value;e[jt]&&e[jt](r.key,r.value),e[Mt]-=r.length,e[mt].delete(r.key),e[be].removeNode(t)}};class AE{constructor(t,r,n,i,s){this.key=t,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const ic=(e,t,r,n)=>{let i=r.value;Mi(e,i)&&(Gr(e,r),e[Dn]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};var bE=PE,_s,sc;function _t(){if(sc)return _s;sc=1;class e{constructor(A,H){if(H=n(H),A instanceof e)return A.loose===!!H.loose&&A.includePrerelease===!!H.includePrerelease?A:new e(A.raw,H);if(A instanceof i)return this.raw=A.value,this.set=[[A]],this.format(),this;if(this.options=H,this.loose=!!H.loose,this.includePrerelease=!!H.includePrerelease,this.raw=A,this.set=A.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${A}`);if(this.set.length>1){const G=this.set[0];if(this.set=this.set.filter(q=>!E(q[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(const q of this.set)if(q.length===1&&h(q[0])){this.set=[q];break}}}this.format()}format(){return this.range=this.set.map(A=>A.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(A){A=A.trim();const G=`parseRange:${Object.keys(this.options).join(",")}:${A}`,q=r.get(G);if(q)return q;const K=this.options.loose,B=K?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];A=A.replace(B,P(this.options.includePrerelease)),s("hyphen replace",A),A=A.replace(c[u.COMPARATORTRIM],m),s("comparator trim",A),A=A.replace(c[u.TILDETRIM],a),A=A.replace(c[u.CARETTRIM],l),A=A.split(/\s+/).join(" ");let b=A.split(" ").map(F=>y(F,this.options)).join(" ").split(/\s+/).map(F=>V(F,this.options));K&&(b=b.filter(F=>(s("loose invalid filter",F,this.options),!!F.match(c[u.COMPARATORLOOSE])))),s("range list",b);const k=new Map,O=b.map(F=>new i(F,this.options));for(const F of O){if(E(F))return[F];k.set(F.value,F)}k.size>1&&k.has("")&&k.delete("");const I=[...k.values()];return r.set(G,I),I}intersects(A,H){if(!(A instanceof e))throw new TypeError("a Range is required");return this.set.some(G=>d(G,H)&&A.set.some(q=>d(q,H)&&G.every(K=>q.every(B=>K.intersects(B,H)))))}test(A){if(!A)return!1;if(typeof A=="string")try{A=new o(A,this.options)}catch{return!1}for(let H=0;H<this.set.length;H++)if(x(this.set[H],A,this.options))return!0;return!1}}_s=e;const t=bE,r=new t({max:1e3}),n=es,i=rs(),s=Qi,o=Je,{re:c,t:u,comparatorTrimReplace:m,tildeTrimReplace:a,caretTrimReplace:l}=zt,E=M=>M.value==="<0.0.0-0",h=M=>M.value==="",d=(M,A)=>{let H=!0;const G=M.slice();let q=G.pop();for(;H&&G.length;)H=G.every(K=>q.intersects(K,A)),q=G.pop();return H},y=(M,A)=>(s("comp",M,A),M=_(M,A),s("caret",M),M=f(M,A),s("tildes",M),M=z(M,A),s("xrange",M),M=C(M,A),s("stars",M),M),p=M=>!M||M.toLowerCase()==="x"||M==="*",f=(M,A)=>M.trim().split(/\s+/).map(H=>$(H,A)).join(" "),$=(M,A)=>{const H=A.loose?c[u.TILDELOOSE]:c[u.TILDE];return M.replace(H,(G,q,K,B,b)=>{s("tilde",M,G,q,K,B,b);let k;return p(q)?k="":p(K)?k=`>=${q}.0.0 <${+q+1}.0.0-0`:p(B)?k=`>=${q}.${K}.0 <${q}.${+K+1}.0-0`:b?(s("replaceTilde pr",b),k=`>=${q}.${K}.${B}-${b} <${q}.${+K+1}.0-0`):k=`>=${q}.${K}.${B} <${q}.${+K+1}.0-0`,s("tilde return",k),k})},_=(M,A)=>M.trim().split(/\s+/).map(H=>D(H,A)).join(" "),D=(M,A)=>{s("caret",M,A);const H=A.loose?c[u.CARETLOOSE]:c[u.CARET],G=A.includePrerelease?"-0":"";return M.replace(H,(q,K,B,b,k)=>{s("caret",M,q,K,B,b,k);let O;return p(K)?O="":p(B)?O=`>=${K}.0.0${G} <${+K+1}.0.0-0`:p(b)?K==="0"?O=`>=${K}.${B}.0${G} <${K}.${+B+1}.0-0`:O=`>=${K}.${B}.0${G} <${+K+1}.0.0-0`:k?(s("replaceCaret pr",k),K==="0"?B==="0"?O=`>=${K}.${B}.${b}-${k} <${K}.${B}.${+b+1}-0`:O=`>=${K}.${B}.${b}-${k} <${K}.${+B+1}.0-0`:O=`>=${K}.${B}.${b}-${k} <${+K+1}.0.0-0`):(s("no pr"),K==="0"?B==="0"?O=`>=${K}.${B}.${b}${G} <${K}.${B}.${+b+1}-0`:O=`>=${K}.${B}.${b}${G} <${K}.${+B+1}.0-0`:O=`>=${K}.${B}.${b} <${+K+1}.0.0-0`),s("caret return",O),O})},z=(M,A)=>(s("replaceXRanges",M,A),M.split(/\s+/).map(H=>T(H,A)).join(" ")),T=(M,A)=>{M=M.trim();const H=A.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return M.replace(H,(G,q,K,B,b,k)=>{s("xRange",M,G,q,K,B,b,k);const O=p(K),I=O||p(B),F=I||p(b),R=F;return q==="="&&R&&(q=""),k=A.includePrerelease?"-0":"",O?q===">"||q==="<"?G="<0.0.0-0":G="*":q&&R?(I&&(B=0),b=0,q===">"?(q=">=",I?(K=+K+1,B=0,b=0):(B=+B+1,b=0)):q==="<="&&(q="<",I?K=+K+1:B=+B+1),q==="<"&&(k="-0"),G=`${q+K}.${B}.${b}${k}`):I?G=`>=${K}.0.0${k} <${+K+1}.0.0-0`:F&&(G=`>=${K}.${B}.0${k} <${K}.${+B+1}.0-0`),s("xRange return",G),G})},C=(M,A)=>(s("replaceStars",M,A),M.trim().replace(c[u.STAR],"")),V=(M,A)=>(s("replaceGTE0",M,A),M.trim().replace(c[A.includePrerelease?u.GTE0PRE:u.GTE0],"")),P=M=>(A,H,G,q,K,B,b,k,O,I,F,R,v)=>(p(G)?H="":p(q)?H=`>=${G}.0.0${M?"-0":""}`:p(K)?H=`>=${G}.${q}.0${M?"-0":""}`:B?H=`>=${H}`:H=`>=${H}${M?"-0":""}`,p(O)?k="":p(I)?k=`<${+O+1}.0.0-0`:p(F)?k=`<${O}.${+I+1}.0-0`:R?k=`<=${O}.${I}.${F}-${R}`:M?k=`<${O}.${I}.${+F+1}-0`:k=`<=${k}`,`${H} ${k}`.trim()),x=(M,A,H)=>{for(let G=0;G<M.length;G++)if(!M[G].test(A))return!1;if(A.prerelease.length&&!H.includePrerelease){for(let G=0;G<M.length;G++)if(s(M[G].semver),M[G].semver!==i.ANY&&M[G].semver.prerelease.length>0){const q=M[G].semver;if(q.major===A.major&&q.minor===A.minor&&q.patch===A.patch)return!0}return!1}return!0};return _s}var Ss,oc;function rs(){if(oc)return Ss;oc=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(a,l){if(l=r(l),a instanceof t){if(a.loose===!!l.loose)return a;a=a.value}o("comparator",a,l),this.options=l,this.loose=!!l.loose,this.parse(a),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(a){const l=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],E=a.match(l);if(!E)throw new TypeError(`Invalid comparator: ${a}`);this.operator=E[1]!==void 0?E[1]:"",this.operator==="="&&(this.operator=""),E[2]?this.semver=new c(E[2],this.options.loose):this.semver=e}toString(){return this.value}test(a){if(o("Comparator.test",a,this.options.loose),this.semver===e||a===e)return!0;if(typeof a=="string")try{a=new c(a,this.options)}catch{return!1}return s(a,this.operator,this.semver,this.options)}intersects(a,l){if(!(a instanceof t))throw new TypeError("a Comparator is required");if((!l||typeof l!="object")&&(l={loose:!!l,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new u(a.value,l).test(this.value);if(a.operator==="")return a.value===""?!0:new u(this.value,l).test(a.semver);const E=(this.operator===">="||this.operator===">")&&(a.operator===">="||a.operator===">"),h=(this.operator==="<="||this.operator==="<")&&(a.operator==="<="||a.operator==="<"),d=this.semver.version===a.semver.version,y=(this.operator===">="||this.operator==="<=")&&(a.operator===">="||a.operator==="<="),p=s(this.semver,"<",a.semver,l)&&(this.operator===">="||this.operator===">")&&(a.operator==="<="||a.operator==="<"),f=s(this.semver,">",a.semver,l)&&(this.operator==="<="||this.operator==="<")&&(a.operator===">="||a.operator===">");return E||h||d&&y||p||f}}Ss=t;const r=es,{re:n,t:i}=zt,s=vf,o=Qi,c=Je,u=_t();return Ss}const LE=_t(),FE=(e,t,r)=>{try{t=new LE(t,r)}catch{return!1}return t.test(e)};var ns=FE;const jE=_t(),ME=(e,t)=>new jE(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var kE=ME;const UE=Je,VE=_t(),zE=(e,t,r)=>{let n=null,i=null,s=null;try{s=new VE(t,r)}catch{return null}return e.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new UE(n,r))}),n};var xE=zE;const GE=Je,BE=_t(),HE=(e,t,r)=>{let n=null,i=null,s=null;try{s=new BE(t,r)}catch{return null}return e.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new GE(n,r))}),n};var qE=HE;const ws=Je,KE=_t(),ac=ts,ZE=(e,t)=>{e=new KE(e,t);let r=new ws("0.0.0");if(e.test(r)||(r=new ws("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){const i=e.set[n];let s=null;i.forEach(o=>{const c=new ws(o.semver.version);switch(o.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!s||ac(c,s))&&(s=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||ac(r,s))&&(r=s)}return r&&e.test(r)?r:null};var WE=ZE;const XE=_t(),JE=(e,t)=>{try{return new XE(e,t).range||"*"}catch{return null}};var YE=JE;const QE=Je,gf=rs(),{ANY:eg}=gf,tg=_t(),rg=ns,cc=ts,uc=xo,ng=Bo,ig=Go,sg=(e,t,r,n)=>{e=new QE(e,n),t=new tg(t,n);let i,s,o,c,u;switch(r){case">":i=cc,s=ng,o=uc,c=">",u=">=";break;case"<":i=uc,s=ig,o=cc,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(rg(e,t,n))return!1;for(let m=0;m<t.set.length;++m){const a=t.set[m];let l=null,E=null;if(a.forEach(h=>{h.semver===eg&&(h=new gf(">=0.0.0")),l=l||h,E=E||h,i(h.semver,l.semver,n)?l=h:o(h.semver,E.semver,n)&&(E=h)}),l.operator===c||l.operator===u||(!E.operator||E.operator===c)&&s(e,E.semver))return!1;if(E.operator===u&&o(e,E.semver))return!1}return!0};var Ho=sg;const og=Ho,ag=(e,t,r)=>og(e,t,">",r);var cg=ag;const ug=Ho,fg=(e,t,r)=>ug(e,t,"<",r);var lg=fg;const fc=_t(),dg=(e,t,r)=>(e=new fc(e,r),t=new fc(t,r),e.intersects(t));var hg=dg;const mg=ns,pg=$t;var yg=(e,t,r)=>{const n=[];let i=null,s=null;const o=e.sort((a,l)=>pg(a,l,r));for(const a of o)mg(a,t,r)?(s=a,i||(i=a)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const c=[];for(const[a,l]of n)a===l?c.push(a):!l&&a===o[0]?c.push("*"):l?a===o[0]?c.push(`<=${l}`):c.push(`${a} - ${l}`):c.push(`>=${a}`);const u=c.join(" || "),m=typeof t.raw=="string"?t.raw:String(t);return u.length<m.length?u:t};const lc=_t(),vi=rs(),{ANY:Ns}=vi,En=ns,qo=$t,vg=(e,t,r={})=>{if(e===t)return!0;e=new lc(e,r),t=new lc(t,r);let n=!1;e:for(const i of e.set){for(const s of t.set){const o=Eg(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Eg=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Ns){if(t.length===1&&t[0].semver===Ns)return!0;r.includePrerelease?e=[new vi(">=0.0.0-0")]:e=[new vi(">=0.0.0")]}if(t.length===1&&t[0].semver===Ns){if(r.includePrerelease)return!0;t=[new vi(">=0.0.0")]}const n=new Set;let i,s;for(const h of e)h.operator===">"||h.operator===">="?i=dc(i,h,r):h.operator==="<"||h.operator==="<="?s=hc(s,h,r):n.add(h.semver);if(n.size>1)return null;let o;if(i&&s){if(o=qo(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const h of n){if(i&&!En(h,String(i),r)||s&&!En(h,String(s),r))return null;for(const d of t)if(!En(h,String(d),r))return!1;return!0}let c,u,m,a,l=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;l&&l.prerelease.length===1&&s.operator==="<"&&l.prerelease[0]===0&&(l=!1);for(const h of t){if(a=a||h.operator===">"||h.operator===">=",m=m||h.operator==="<"||h.operator==="<=",i){if(E&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===E.major&&h.semver.minor===E.minor&&h.semver.patch===E.patch&&(E=!1),h.operator===">"||h.operator===">="){if(c=dc(i,h,r),c===h&&c!==i)return!1}else if(i.operator===">="&&!En(i.semver,String(h),r))return!1}if(s){if(l&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===l.major&&h.semver.minor===l.minor&&h.semver.patch===l.patch&&(l=!1),h.operator==="<"||h.operator==="<="){if(u=hc(s,h,r),u===h&&u!==s)return!1}else if(s.operator==="<="&&!En(s.semver,String(h),r))return!1}if(!h.operator&&(s||i)&&o!==0)return!1}return!(i&&m&&!s&&o!==0||s&&a&&!i&&o!==0||E||l)},dc=(e,t,r)=>{if(!e)return t;const n=qo(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},hc=(e,t,r)=>{if(!e)return t;const n=qo(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var gg=vg;const Is=zt,$g=Yi,_g=Je,mc=pf,Sg=sn,wg=_v,Ng=Nv,Ig=Ov,Og=Av,Tg=Fv,Dg=kv,Cg=zv,Rg=Bv,Pg=$t,Ag=Kv,bg=Xv,Lg=zo,Fg=eE,jg=nE,Mg=ts,kg=xo,Ug=Vo,Vg=yf,zg=Go,xg=Bo,Gg=vf,Bg=NE,Hg=rs(),qg=_t(),Kg=ns,Zg=kE,Wg=xE,Xg=qE,Jg=WE,Yg=YE,Qg=Ho,e$=cg,t$=lg,r$=hg,n$=yg,i$=gg;var s$={parse:Sg,valid:wg,clean:Ng,inc:Ig,diff:Og,major:Tg,minor:Dg,patch:Cg,prerelease:Rg,compare:Pg,rcompare:Ag,compareLoose:bg,compareBuild:Lg,sort:Fg,rsort:jg,gt:Mg,lt:kg,eq:Ug,neq:Vg,gte:zg,lte:xg,cmp:Gg,coerce:Bg,Comparator:Hg,Range:qg,satisfies:Kg,toComparators:Zg,maxSatisfying:Wg,minSatisfying:Xg,minVersion:Jg,validRange:Yg,outside:Qg,gtr:e$,ltr:t$,intersects:r$,simplifyRange:n$,subset:i$,SemVer:_g,re:Is.re,src:Is.src,tokens:Is.t,SEMVER_SPEC_VERSION:$g.SEMVER_SPEC_VERSION,compareIdentifiers:mc.compareIdentifiers,rcompareIdentifiers:mc.rcompareIdentifiers},Fn={},o$={get exports(){return Fn},set exports(e){Fn=e}},ki={},a$={get exports(){return ki},set exports(e){ki=e}};const $f=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};a$.exports=$f;ki.default=$f;const c$=ki,Ui=new WeakMap,_f=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0;const i=e.displayName||e.name||"<anonymous>",s=function(...o){if(Ui.set(s,++n),n===1)r=e.apply(this,o),e=null;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return c$(s,e),Ui.set(s,n),s};o$.exports=_f;Fn.default=_f;Fn.callCount=e=>{if(!Ui.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Ui.get(e)};(function(e,t){var r=Xt&&Xt.__classPrivateFieldSet||function(B,b,k,O,I){if(O==="m")throw new TypeError("Private method is not writable");if(O==="a"&&!I)throw new TypeError("Private accessor was defined without a setter");if(typeof b=="function"?B!==b||!I:!b.has(B))throw new TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?I.call(B,k):I?I.value=k:b.set(B,k),k},n=Xt&&Xt.__classPrivateFieldGet||function(B,b,k,O){if(k==="a"&&!O)throw new TypeError("Private accessor was defined without a getter");if(typeof b=="function"?B!==b||!O:!b.has(B))throw new TypeError("Cannot read private member from an object whose class did not declare it");return k==="m"?O:k==="a"?O.call(B):O?O.value:b.get(B)},i,s,o,c,u,m;Object.defineProperty(t,"__esModule",{value:!0});const a=xi,l=en,E=Ie,h=Tc,d=Oc,y=Vf,p=Eh,f=wi,$=Ci,_=Pt,D=bn,z=ji,T=sv,C=s$,V=Fn,P="aes-256-cbc",x=()=>Object.create(null),M=B=>B!=null;let A="";try{delete require.cache[__filename],A=E.dirname((s=(i=e.parent)===null||i===void 0?void 0:i.filename)!==null&&s!==void 0?s:".")}catch{}const H=(B,b)=>{const k=new Set(["undefined","symbol","function"]),O=typeof b;if(k.has(O))throw new TypeError(`Setting a value of type \`${O}\` for key \`${B}\` is not allowed as it's not supported by JSON`)},G="__internal__",q=`${G}.migrations.version`;class K{constructor(b={}){var k;o.set(this,void 0),c.set(this,void 0),u.set(this,void 0),m.set(this,{}),this._deserialize=S=>JSON.parse(S),this._serialize=S=>JSON.stringify(S,void 0," ");const O={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...b},I=V(()=>{const S=f.sync({cwd:A}),U=S&&JSON.parse(l.readFileSync(S,"utf8"));return U??{}});if(!O.cwd){if(O.projectName||(O.projectName=I().name),!O.projectName)throw new Error("Project name could not be inferred. Please specify the `projectName` option.");O.cwd=$(O.projectName,{suffix:O.projectSuffix}).config}if(r(this,u,O,"f"),O.schema){if(typeof O.schema!="object")throw new TypeError("The `schema` option must be an object.");const S=new D.default({allErrors:!0,useDefaults:!0});(0,z.default)(S);const U={type:"object",properties:O.schema};r(this,o,S.compile(U),"f");for(const[Z,W]of Object.entries(O.schema))W!=null&&W.default&&(n(this,m,"f")[Z]=W.default)}O.defaults&&r(this,m,{...n(this,m,"f"),...O.defaults},"f"),O.serialize&&(this._serialize=O.serialize),O.deserialize&&(this._deserialize=O.deserialize),this.events=new y.EventEmitter,r(this,c,O.encryptionKey,"f");const F=O.fileExtension?`.${O.fileExtension}`:"";this.path=E.resolve(O.cwd,`${(k=O.configName)!==null&&k!==void 0?k:"config"}${F}`);const R=this.store,v=Object.assign(x(),O.defaults,R);this._validate(v);try{d.deepEqual(R,v)}catch{this.store=v}if(O.watch&&this._watch(),O.migrations){if(O.projectVersion||(O.projectVersion=I().version),!O.projectVersion)throw new Error("Project version could not be inferred. Please specify the `projectVersion` option.");this._migrate(O.migrations,O.projectVersion,O.beforeEachMigration)}}get(b,k){if(n(this,u,"f").accessPropertiesByDotNotation)return this._get(b,k);const{store:O}=this;return b in O?O[b]:k}set(b,k){if(typeof b!="string"&&typeof b!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof b}`);if(typeof b!="object"&&k===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(b))throw new TypeError(`Please don't use the ${G} key, as it's used to manage this module internal operations.`);const{store:O}=this,I=(F,R)=>{H(F,R),n(this,u,"f").accessPropertiesByDotNotation?p.set(O,F,R):O[F]=R};if(typeof b=="object"){const F=b;for(const[R,v]of Object.entries(F))I(R,v)}else I(b,k);this.store=O}has(b){return n(this,u,"f").accessPropertiesByDotNotation?p.has(this.store,b):b in this.store}reset(...b){for(const k of b)M(n(this,m,"f")[k])&&this.set(k,n(this,m,"f")[k])}delete(b){const{store:k}=this;n(this,u,"f").accessPropertiesByDotNotation?p.delete(k,b):delete k[b],this.store=k}clear(){this.store=x();for(const b of Object.keys(n(this,m,"f")))this.reset(b)}onDidChange(b,k){if(typeof b!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof b}`);if(typeof k!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof k}`);return this._handleChange(()=>this.get(b),k)}onDidAnyChange(b){if(typeof b!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof b}`);return this._handleChange(()=>this.store,b)}get size(){return Object.keys(this.store).length}get store(){try{const b=l.readFileSync(this.path,n(this,c,"f")?null:"utf8"),k=this._encryptData(b),O=this._deserialize(k);return this._validate(O),Object.assign(x(),O)}catch(b){if((b==null?void 0:b.code)==="ENOENT")return this._ensureDirectory(),x();if(n(this,u,"f").clearInvalidConfig&&b.name==="SyntaxError")return x();throw b}}set store(b){this._ensureDirectory(),this._validate(b),this._write(b),this.events.emit("change")}*[(o=new WeakMap,c=new WeakMap,u=new WeakMap,m=new WeakMap,Symbol.iterator)](){for(const[b,k]of Object.entries(this.store))yield[b,k]}_encryptData(b){if(!n(this,c,"f"))return b.toString();try{if(n(this,c,"f"))try{if(b.slice(16,17).toString()===":"){const k=b.slice(0,16),O=h.pbkdf2Sync(n(this,c,"f"),k.toString(),1e4,32,"sha512"),I=h.createDecipheriv(P,O,k);b=Buffer.concat([I.update(Buffer.from(b.slice(17))),I.final()]).toString("utf8")}else{const k=h.createDecipher(P,n(this,c,"f"));b=Buffer.concat([k.update(Buffer.from(b)),k.final()]).toString("utf8")}}catch{}}catch{}return b.toString()}_handleChange(b,k){let O=b();const I=()=>{const F=O,R=b();(0,a.isDeepStrictEqual)(R,F)||(O=R,k.call(this,R,F))};return this.events.on("change",I),()=>this.events.removeListener("change",I)}_validate(b){if(!n(this,o,"f")||n(this,o,"f").call(this,b)||!n(this,o,"f").errors)return;const O=n(this,o,"f").errors.map(({instancePath:I,message:F=""})=>`\`${I.slice(1)}\` ${F}`);throw new Error("Config schema violation: "+O.join("; "))}_ensureDirectory(){l.mkdirSync(E.dirname(this.path),{recursive:!0})}_write(b){let k=this._serialize(b);if(n(this,c,"f")){const O=h.randomBytes(16),I=h.pbkdf2Sync(n(this,c,"f"),O.toString(),1e4,32,"sha512"),F=h.createCipheriv(P,I,O);k=Buffer.concat([O,Buffer.from(":"),F.update(Buffer.from(k)),F.final()])}if(process.env.SNAP)l.writeFileSync(this.path,k,{mode:n(this,u,"f").configFileMode});else try{_.writeFileSync(this.path,k,{mode:n(this,u,"f").configFileMode})}catch(O){if((O==null?void 0:O.code)==="EXDEV"){l.writeFileSync(this.path,k,{mode:n(this,u,"f").configFileMode});return}throw O}}_watch(){this._ensureDirectory(),l.existsSync(this.path)||this._write(x()),process.platform==="win32"?l.watch(this.path,{persistent:!1},T(()=>{this.events.emit("change")},{wait:100})):l.watchFile(this.path,{persistent:!1},T(()=>{this.events.emit("change")},{wait:5e3}))}_migrate(b,k,O){let I=this._get(q,"0.0.0");const F=Object.keys(b).filter(v=>this._shouldPerformMigration(v,I,k));let R={...this.store};for(const v of F)try{O&&O(this,{fromVersion:I,toVersion:v,finalVersion:k,versions:F});const S=b[v];S(this),this._set(q,v),I=v,R={...this.store}}catch(S){throw this.store=R,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${S}`)}(this._isVersionInRangeFormat(I)||!C.eq(I,k))&&this._set(q,k)}_containsReservedKey(b){return typeof b=="object"&&Object.keys(b)[0]===G?!0:typeof b!="string"?!1:n(this,u,"f").accessPropertiesByDotNotation?!!b.startsWith(`${G}.`):!1}_isVersionInRangeFormat(b){return C.clean(b)===null}_shouldPerformMigration(b,k,O){return this._isVersionInRangeFormat(b)?k!=="0.0.0"&&C.satisfies(k,b)?!1:C.satisfies(O,b):!(C.lte(b,k)||C.gt(b,O))}_get(b,k){return p.get(this.store,b,k)}_set(b,k){const{store:O}=this;p.set(O,b,k),this.store=O}}t.default=K,e.exports=K,e.exports.default=K})(mh,Si);const pc=Ie,{app:Ei,ipcMain:Us,ipcRenderer:yc,shell:u$}=ce,f$=Si;let vc=!1;const Ec=()=>{if(!Us||!Ei)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");const e={defaultCwd:Ei.getPath("userData"),appVersion:Ei.getVersion()};return vc||(Us.on("electron-store-get-data",t=>{t.returnValue=e}),vc=!0),e};class l$ extends f${constructor(t){let r,n;if(yc){const i=yc.sendSync("electron-store-get-data");if(!i)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");({defaultCwd:r,appVersion:n}=i)}else Us&&Ei&&({defaultCwd:r,appVersion:n}=Ec());t={name:"config",...t},t.projectVersion||(t.projectVersion=n),t.cwd?t.cwd=pc.isAbsolute(t.cwd)?t.cwd:pc.join(r,t.cwd):t.cwd=r,t.configName=t.name,delete t.name,super(t)}static initRenderer(){Ec()}openInEditor(){u$.openPath(this.path)}}var gc=l$,_r={},d$={get exports(){return _r},set exports(e){_r=e}},Ko={},h$=Ko.require=function(){if(typeof process=="object"&&process.versions&&process.versions.electron)try{const e=h$("original-fs");if(Object.keys(e).length>0)return e}catch{}return en},Sf={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24},wf={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed",FILE_IN_THE_WAY:"There is a file in the way: %s",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:"File not found: %s",NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found"};const m$=Ko.require(),Ke=Ie,$c=Sf,p$=wf,y$=typeof process=="object"&&process.platform==="win32",_c=e=>e&&typeof e=="object",Zo=new Uint32Array(256).map((e,t)=>{for(let r=0;r<8;r++)t&1?t=3988292384^t>>>1:t>>>=1;return t>>>0});function Ve(e){this.sep=Ke.sep,this.fs=m$,_c(e)&&_c(e.fs)&&typeof e.fs.statSync=="function"&&(this.fs=e.fs)}var v$=Ve;Ve.prototype.makeDir=function(e){const t=this;function r(n){let i=n.split(t.sep)[0];n.split(t.sep).forEach(function(s){if(!(!s||s.substr(-1,1)===":")){i+=t.sep+s;var o;try{o=t.fs.statSync(i)}catch{t.fs.mkdirSync(i)}if(o&&o.isFile())throw p$.FILE_IN_THE_WAY.replace("%s",i)}})}r(e)};Ve.prototype.writeFileTo=function(e,t,r,n){const i=this;if(i.fs.existsSync(e)){if(!r)return!1;var s=i.fs.statSync(e);if(s.isDirectory())return!1}var o=Ke.dirname(e);i.fs.existsSync(o)||i.makeDir(o);var c;try{c=i.fs.openSync(e,"w",438)}catch{i.fs.chmodSync(e,438),c=i.fs.openSync(e,"w",438)}if(c)try{i.fs.writeSync(c,t,0,t.length,0)}finally{i.fs.closeSync(c)}return i.fs.chmodSync(e,n||438),!0};Ve.prototype.writeFileToAsync=function(e,t,r,n,i){typeof n=="function"&&(i=n,n=void 0);const s=this;s.fs.exists(e,function(o){if(o&&!r)return i(!1);s.fs.stat(e,function(c,u){if(o&&u.isDirectory())return i(!1);var m=Ke.dirname(e);s.fs.exists(m,function(a){a||s.makeDir(m),s.fs.open(e,"w",438,function(l,E){l?s.fs.chmod(e,438,function(){s.fs.open(e,"w",438,function(h,d){s.fs.write(d,t,0,t.length,0,function(){s.fs.close(d,function(){s.fs.chmod(e,n||438,function(){i(!0)})})})})}):E?s.fs.write(E,t,0,t.length,0,function(){s.fs.close(E,function(){s.fs.chmod(e,n||438,function(){i(!0)})})}):s.fs.chmod(e,n||438,function(){i(!0)})})})})})};Ve.prototype.findFiles=function(e){const t=this;function r(n,i,s){typeof i=="boolean"&&(s=i,i=void 0);let o=[];return t.fs.readdirSync(n).forEach(function(c){var u=Ke.join(n,c);t.fs.statSync(u).isDirectory()&&s&&(o=o.concat(r(u,i,s))),(!i||i.test(u))&&o.push(Ke.normalize(u)+(t.fs.statSync(u).isDirectory()?t.sep:""))}),o}return r(e,void 0,!0)};Ve.prototype.getAttributes=function(){};Ve.prototype.setAttributes=function(){};Ve.crc32update=function(e,t){return Zo[(e^t)&255]^e>>>8};Ve.crc32=function(e){typeof e=="string"&&(e=Buffer.from(e,"utf8")),Zo.length||genCRCTable();let t=e.length,r=-1;for(let n=0;n<t;)r=Ve.crc32update(r,e[n++]);return~r>>>0};Ve.methodToString=function(e){switch(e){case $c.STORED:return"STORED ("+e+")";case $c.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}};Ve.canonical=function(e){if(!e)return"";var t=Ke.posix.normalize("/"+e.split("\\").join("/"));return Ke.join(".",t)};Ve.sanitize=function(e,t){e=Ke.resolve(Ke.normalize(e));for(var r=t.split("/"),n=0,i=r.length;n<i;n++){var s=Ke.normalize(Ke.join(e,r.slice(n,i).join(Ke.sep)));if(s.indexOf(e)===0)return s}return Ke.normalize(Ke.join(e,Ke.basename(t)))};Ve.toBuffer=function(t){return Buffer.isBuffer(t)?t:t instanceof Uint8Array?Buffer.from(t):typeof t=="string"?Buffer.from(t,"utf8"):Buffer.alloc(0)};Ve.readBigUInt64LE=function(e,t){var r=Buffer.from(e.slice(t,t+8));return r.swap64(),parseInt(`0x${r.toString("hex")}`)};Ve.isWin=y$;Ve.crcTable=Zo;const Vi=Ko.require(),Nf=Ie;Vi.existsSync=Vi.existsSync||Nf.existsSync;var E$=function(e){var t=e||"",r=i(),n=null;function i(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return t&&Vi.existsSync(t)?(n=Vi.statSync(t),r.directory=n.isDirectory(),r.mtime=n.mtime,r.atime=n.atime,r.executable=(73&n.mode)!==0,r.readonly=(128&n.mode)===0,r.hidden=Nf.basename(t)[0]==="."):console.warn("Invalid path: "+t),{get directory(){return r.directory},get readOnly(){return r.readonly},get hidden(){return r.hidden},get mtime(){return r.mtime},get atime(){return r.atime},get executable(){return r.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:t,isDirectory:r.directory,isReadOnly:r.readonly,isHidden:r.hidden,isExecutable:r.executable,mTime:r.mtime,aTime:r.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}};(function(e){e.exports=v$,e.exports.Constants=Sf,e.exports.Errors=wf,e.exports.FileAttr=E$})(d$);var is={},$n=_r,X=$n.Constants,g$=function(){var e=20,t=10,r=0,n=0,i=0,s=0,o=0,c=0,u=0,m=0,a=0,l=0,E=0,h=0,d=0;e|=$n.isWin?2560:768,r|=X.FLG_EFS;var y={};function p(f){f=new Date(f),i=(f.getFullYear()-1980&127)<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1}return p(+new Date),{get made(){return e},set made(f){e=f},get version(){return t},set version(f){t=f},get flags(){return r},set flags(f){r=f},get method(){return n},set method(f){switch(f){case X.STORED:this.version=10;case X.DEFLATED:default:this.version=20}n=f},get time(){return new Date((i>>25&127)+1980,(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(i&31)<<1)},set time(f){p(f)},get crc(){return s},set crc(f){s=Math.max(0,f)>>>0},get compressedSize(){return o},set compressedSize(f){o=Math.max(0,f)>>>0},get size(){return c},set size(f){c=Math.max(0,f)>>>0},get fileNameLength(){return u},set fileNameLength(f){u=f},get extraLength(){return m},set extraLength(f){m=f},get commentLength(){return a},set commentLength(f){a=f},get diskNumStart(){return l},set diskNumStart(f){l=Math.max(0,f)>>>0},get inAttr(){return E},set inAttr(f){E=Math.max(0,f)>>>0},get attr(){return h},set attr(f){h=Math.max(0,f)>>>0},get fileAttr(){return h?(h>>>0|0)>>16&4095:0},get offset(){return d},set offset(f){d=Math.max(0,f)>>>0},get encripted(){return(r&1)===1},get entryHeaderSize(){return X.CENHDR+u+m+a},get realDataOffset(){return d+X.LOCHDR+y.fnameLen+y.extraLen},get dataHeader(){return y},loadDataHeaderFromBinary:function(f){var $=f.slice(d,d+X.LOCHDR);if($.readUInt32LE(0)!==X.LOCSIG)throw new Error($n.Errors.INVALID_LOC);y={version:$.readUInt16LE(X.LOCVER),flags:$.readUInt16LE(X.LOCFLG),method:$.readUInt16LE(X.LOCHOW),time:$.readUInt32LE(X.LOCTIM),crc:$.readUInt32LE(X.LOCCRC),compressedSize:$.readUInt32LE(X.LOCSIZ),size:$.readUInt32LE(X.LOCLEN),fnameLen:$.readUInt16LE(X.LOCNAM),extraLen:$.readUInt16LE(X.LOCEXT)}},loadFromBinary:function(f){if(f.length!==X.CENHDR||f.readUInt32LE(0)!==X.CENSIG)throw new Error($n.Errors.INVALID_CEN);e=f.readUInt16LE(X.CENVEM),t=f.readUInt16LE(X.CENVER),r=f.readUInt16LE(X.CENFLG),n=f.readUInt16LE(X.CENHOW),i=f.readUInt32LE(X.CENTIM),s=f.readUInt32LE(X.CENCRC),o=f.readUInt32LE(X.CENSIZ),c=f.readUInt32LE(X.CENLEN),u=f.readUInt16LE(X.CENNAM),m=f.readUInt16LE(X.CENEXT),a=f.readUInt16LE(X.CENCOM),l=f.readUInt16LE(X.CENDSK),E=f.readUInt16LE(X.CENATT),h=f.readUInt32LE(X.CENATX),d=f.readUInt32LE(X.CENOFF)},dataHeaderToBinary:function(){var f=Buffer.alloc(X.LOCHDR);return f.writeUInt32LE(X.LOCSIG,0),f.writeUInt16LE(t,X.LOCVER),f.writeUInt16LE(r,X.LOCFLG),f.writeUInt16LE(n,X.LOCHOW),f.writeUInt32LE(i,X.LOCTIM),f.writeUInt32LE(s,X.LOCCRC),f.writeUInt32LE(o,X.LOCSIZ),f.writeUInt32LE(c,X.LOCLEN),f.writeUInt16LE(u,X.LOCNAM),f.writeUInt16LE(m,X.LOCEXT),f},entryHeaderToBinary:function(){var f=Buffer.alloc(X.CENHDR+u+m+a);return f.writeUInt32LE(X.CENSIG,0),f.writeUInt16LE(e,X.CENVEM),f.writeUInt16LE(t,X.CENVER),f.writeUInt16LE(r,X.CENFLG),f.writeUInt16LE(n,X.CENHOW),f.writeUInt32LE(i,X.CENTIM),f.writeUInt32LE(s,X.CENCRC),f.writeUInt32LE(o,X.CENSIZ),f.writeUInt32LE(c,X.CENLEN),f.writeUInt16LE(u,X.CENNAM),f.writeUInt16LE(m,X.CENEXT),f.writeUInt16LE(a,X.CENCOM),f.writeUInt16LE(l,X.CENDSK),f.writeUInt16LE(E,X.CENATT),f.writeUInt32LE(h,X.CENATX),f.writeUInt32LE(d,X.CENOFF),f.fill(0,X.CENHDR),f},toJSON:function(){const f=function($){return $+" bytes"};return{made:e,version:t,flags:r,method:$n.methodToString(n),time:this.time,crc:"0x"+s.toString(16).toUpperCase(),compressedSize:f(o),size:f(c),fileNameLength:f(u),extraLength:f(m),commentLength:f(a),diskNumStart:l,inAttr:E,attr:h,offset:d,entryHeaderSize:f(X.CENHDR+u+m+a)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},kr=_r,_e=kr.Constants,$$=function(){var e=0,t=0,r=0,n=0,i=0;return{get diskEntries(){return e},set diskEntries(s){e=t=s},get totalEntries(){return t},set totalEntries(s){t=e=s},get size(){return r},set size(s){r=s},get offset(){return n},set offset(s){n=s},get commentLength(){return i},set commentLength(s){i=s},get mainHeaderSize(){return _e.ENDHDR+i},loadFromBinary:function(s){if((s.length!==_e.ENDHDR||s.readUInt32LE(0)!==_e.ENDSIG)&&(s.length<_e.ZIP64HDR||s.readUInt32LE(0)!==_e.ZIP64SIG))throw new Error(kr.Errors.INVALID_END);s.readUInt32LE(0)===_e.ENDSIG?(e=s.readUInt16LE(_e.ENDSUB),t=s.readUInt16LE(_e.ENDTOT),r=s.readUInt32LE(_e.ENDSIZ),n=s.readUInt32LE(_e.ENDOFF),i=s.readUInt16LE(_e.ENDCOM)):(e=kr.readBigUInt64LE(s,_e.ZIP64SUB),t=kr.readBigUInt64LE(s,_e.ZIP64TOT),r=kr.readBigUInt64LE(s,_e.ZIP64SIZE),n=kr.readBigUInt64LE(s,_e.ZIP64OFF),i=0)},toBinary:function(){var s=Buffer.alloc(_e.ENDHDR+i);return s.writeUInt32LE(_e.ENDSIG,0),s.writeUInt32LE(0,4),s.writeUInt16LE(e,_e.ENDSUB),s.writeUInt16LE(t,_e.ENDTOT),s.writeUInt32LE(r,_e.ENDSIZ),s.writeUInt32LE(n,_e.ENDOFF),s.writeUInt16LE(i,_e.ENDCOM),s.fill(" ",_e.ENDHDR),s},toJSON:function(){const s=function(o,c){let u=o.toString(16).toUpperCase();for(;u.length<c;)u="0"+u;return"0x"+u};return{diskEntries:e,totalEntries:t,size:r+" bytes",offset:s(n,4),commentLength:i}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}};is.EntryHeader=g$;is.MainHeader=$$;var ss={},_$=function(e){var t=Dc,r={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,r)},deflateAsync:function(n){var i=t.createDeflateRaw(r),s=[],o=0;i.on("data",function(c){s.push(c),o+=c.length}),i.on("end",function(){var c=Buffer.alloc(o),u=0;c.fill(0);for(var m=0;m<s.length;m++){var a=s[m];a.copy(c,u),u+=a.length}n&&n(c)}),i.end(e)}}},S$=function(e){var t=Dc;return{inflate:function(){return t.inflateRawSync(e)},inflateAsync:function(r){var n=t.createInflateRaw(),i=[],s=0;n.on("data",function(o){i.push(o),s+=o.length}),n.on("end",function(){var o=Buffer.alloc(s),c=0;o.fill(0);for(var u=0;u<i.length;u++){var m=i[u];m.copy(o,c),c+=m.length}r&&r(o)}),n.end(e)}}};const{randomFillSync:Sc}=Tc,w$=new Uint32Array(256).map((e,t)=>{for(let r=0;r<8;r++)t&1?t=t>>>1^3988292384:t>>>=1;return t>>>0}),If=(e,t)=>Math.imul(e,t)>>>0,wc=(e,t)=>w$[(e^t)&255]^e>>>8,jn=()=>typeof Sc=="function"?Sc(Buffer.alloc(12)):jn.node();jn.node=()=>{const e=Buffer.alloc(12),t=e.length;for(let r=0;r<t;r++)e[r]=Math.random()*256&255;return e};const gi={genSalt:jn};function os(e){const t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let r=0;r<t.length;r++)this.updateKeys(t[r])}os.prototype.updateKeys=function(e){const t=this.keys;return t[0]=wc(t[0],e),t[1]+=t[0]&255,t[1]=If(t[1],134775813)+1,t[2]=wc(t[2],t[1]>>>24),e};os.prototype.next=function(){const e=(this.keys[2]|2)>>>0;return If(e,e^1)>>8&255};function N$(e){const t=new os(e);return function(r){const n=Buffer.alloc(r.length);let i=0;for(let s of r)n[i++]=t.updateKeys(s^t.next());return n}}function I$(e){const t=new os(e);return function(r,n,i=0){n||(n=Buffer.alloc(r.length));for(let s of r){const o=t.next();n[i++]=s^o,t.updateKeys(s)}return n}}function O$(e,t,r){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);const n=N$(r);if(n(e.slice(0,12))[11]!==t.crc>>>24)throw"ADM-ZIP: Wrong Password";return n(e.slice(12))}function T$(e){Buffer.isBuffer(e)&&e.length>=12?gi.genSalt=function(){return e.slice(0,12)}:e==="node"?gi.genSalt=jn.node:gi.genSalt=jn}function D$(e,t,r,n=!1){e==null&&(e=Buffer.alloc(0)),Buffer.isBuffer(e)||(e=Buffer.from(e.toString()));const i=I$(r),s=gi.genSalt();s[11]=t.crc>>>24&255,n&&(s[10]=t.crc>>>16&255);const o=Buffer.alloc(e.length+12);return i(s,o),i(e,o,12)}var C$={decrypt:O$,encrypt:D$,_salter:T$};ss.Deflater=_$;ss.Inflater=S$;ss.ZipCrypto=C$;var Re=_r,R$=is,st=Re.Constants,Os=ss,Of=function(e){var t=new R$.EntryHeader,r=Buffer.alloc(0),n=Buffer.alloc(0),i=!1,s=null,o=Buffer.alloc(0);function c(){return!e||!Buffer.isBuffer(e)?Buffer.alloc(0):(t.loadDataHeaderFromBinary(e),e.slice(t.realDataOffset,t.realDataOffset+t.compressedSize))}function u(d){return!((t.flags&8)!==8&&Re.crc32(d)!==t.dataHeader.crc)}function m(d,y,p){if(typeof y>"u"&&typeof d=="string"&&(p=d,d=void 0),i)return d&&y&&y(Buffer.alloc(0),Re.Errors.DIRECTORY_CONTENT_ERROR),Buffer.alloc(0);var f=c();if(f.length===0)return d&&y&&y(f),f;if(t.encripted){if(typeof p!="string"&&!Buffer.isBuffer(p))throw new Error("ADM-ZIP: Incompatible password parameter");f=Os.ZipCrypto.decrypt(f,t,p)}var $=Buffer.alloc(t.size);switch(t.method){case Re.Constants.STORED:if(f.copy($),u($))return d&&y&&y($),$;throw d&&y&&y($,Re.Errors.BAD_CRC),new Error(Re.Errors.BAD_CRC);case Re.Constants.DEFLATED:var _=new Os.Inflater(f);if(d)_.inflateAsync(function(D){D.copy(D,0),y&&(u(D)?y(D):y(D,Re.Errors.BAD_CRC))});else{if(_.inflate($).copy($,0),!u($))throw new Error(Re.Errors.BAD_CRC+" "+r.toString());return $}break;default:throw d&&y&&y(Buffer.alloc(0),Re.Errors.UNKNOWN_METHOD),new Error(Re.Errors.UNKNOWN_METHOD)}}function a(d,y){if((!s||!s.length)&&Buffer.isBuffer(e))return d&&y&&y(c()),c();if(s.length&&!i){var p;switch(t.method){case Re.Constants.STORED:return t.compressedSize=t.size,p=Buffer.alloc(s.length),s.copy(p),d&&y&&y(p),p;default:case Re.Constants.DEFLATED:var f=new Os.Deflater(s);if(d)f.deflateAsync(function(_){p=Buffer.alloc(_.length),t.compressedSize=_.length,_.copy(p),y&&y(p)});else{var $=f.deflate();return t.compressedSize=$.length,$}f=null;break}}else if(d&&y)y(Buffer.alloc(0));else return Buffer.alloc(0)}function l(d,y){return(d.readUInt32LE(y+4)<<4)+d.readUInt32LE(y)}function E(d){for(var y=0,p,f,$;y<d.length;)p=d.readUInt16LE(y),y+=2,f=d.readUInt16LE(y),y+=2,$=d.slice(y,y+f),y+=f,st.ID_ZIP64===p&&h($)}function h(d){var y,p,f,$;d.length>=st.EF_ZIP64_SCOMP&&(y=l(d,st.EF_ZIP64_SUNCOMP),t.size===st.EF_ZIP64_OR_32&&(t.size=y)),d.length>=st.EF_ZIP64_RHO&&(p=l(d,st.EF_ZIP64_SCOMP),t.compressedSize===st.EF_ZIP64_OR_32&&(t.compressedSize=p)),d.length>=st.EF_ZIP64_DSN&&(f=l(d,st.EF_ZIP64_RHO),t.offset===st.EF_ZIP64_OR_32&&(t.offset=f)),d.length>=st.EF_ZIP64_DSN+4&&($=d.readUInt32LE(st.EF_ZIP64_DSN),t.diskNumStart===st.EF_ZIP64_OR_16&&(t.diskNumStart=$))}return{get entryName(){return r.toString()},get rawEntryName(){return r},set entryName(d){r=Re.toBuffer(d);var y=r[r.length-1];i=y===47||y===92,t.fileNameLength=r.length},get extra(){return o},set extra(d){o=d,t.extraLength=d.length,E(d)},get comment(){return n.toString()},set comment(d){n=Re.toBuffer(d),t.commentLength=n.length},get name(){var d=r.toString();return i?d.substr(d.length-1).split("/").pop():d.split("/").pop()},get isDirectory(){return i},getCompressedData:function(){return a(!1,null)},getCompressedDataAsync:function(d){a(!0,d)},setData:function(d){s=Re.toBuffer(d),!i&&s.length?(t.size=s.length,t.method=Re.Constants.DEFLATED,t.crc=Re.crc32(d),t.changed=!0):t.method=Re.Constants.STORED},getData:function(d){return t.changed?s:m(!1,null,d)},getDataAsync:function(d,y){t.changed?d(s):m(!0,d,y)},set attr(d){t.attr=d},get attr(){return t.attr},set header(d){t.loadFromBinary(d)},get header(){return t},packHeader:function(){var d=t.entryHeaderToBinary(),y=Re.Constants.CENHDR;return r.copy(d,y),y+=r.length,t.extraLength&&(o.copy(d,y),y+=t.extraLength),t.commentLength&&n.copy(d,y),d},toJSON:function(){const d=function(y){return"<"+(y&&y.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:t.toJSON(),compressedData:d(e),data:d(s)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}};const Nc=Of,P$=is,Ge=_r;var A$=function(e,t){var r=[],n={},i=Buffer.alloc(0),s=new P$.MainHeader,o=!1;const c=Object.assign(Object.create(null),t),{noSort:u}=c;e?l(c.readEntries):o=!0;function m(h){const d=s.diskEntries;let y=s.offset;for(let p=0;p<d;p++){let f=y;const $=new Nc(e);$.header=e.slice(f,f+=Ge.Constants.CENHDR),$.entryName=e.slice(f,f+=$.header.fileNameLength),y+=$.header.entryHeaderSize,h($)}}function a(){o=!0,n={},r=new Array(s.diskEntries);for(var h=s.offset,d=0;d<r.length;d++){var y=h,p=new Nc(e);p.header=e.slice(y,y+=Ge.Constants.CENHDR),p.entryName=e.slice(y,y+=p.header.fileNameLength),p.header.extraLength&&(p.extra=e.slice(y,y+=p.header.extraLength)),p.header.commentLength&&(p.comment=e.slice(y,y+p.header.commentLength)),h+=p.header.entryHeaderSize,r[d]=p,n[p.entryName]=p}}function l(h){var d=e.length-Ge.Constants.ENDHDR,y=Math.max(0,d-65535),p=y,f=e.length,$=-1,_=0;for(d;d>=p;d--)if(e[d]===80){if(e.readUInt32LE(d)===Ge.Constants.ENDSIG){$=d,_=d,f=d+Ge.Constants.ENDHDR,p=d-Ge.Constants.END64HDR;continue}if(e.readUInt32LE(d)===Ge.Constants.END64SIG){p=y;continue}if(e.readUInt32LE(d)===Ge.Constants.ZIP64SIG){$=d,f=d+Ge.readBigUInt64LE(e,d+Ge.Constants.ZIP64SIZE)+Ge.Constants.ZIP64LEAD;break}}if(!~$)throw new Error(Ge.Errors.INVALID_FORMAT);s.loadFromBinary(e.slice($,f)),s.commentLength&&(i=e.slice(_+Ge.Constants.ENDHDR)),h&&a()}function E(){r.length>1&&!u&&r.sort((h,d)=>h.entryName.toLowerCase().localeCompare(d.entryName.toLowerCase()))}return{get entries(){return o||a(),r},get comment(){return i.toString()},set comment(h){i=Ge.toBuffer(h),s.commentLength=i.length},getEntryCount:function(){return o?r.length:s.diskEntries},forEach:function(h){if(!o){m(h);return}r.forEach(h)},getEntry:function(h){return o||a(),n[h]||null},setEntry:function(h){o||a(),r.push(h),n[h.entryName]=h,s.totalEntries=r.length},deleteEntry:function(h){o||a();var d=n[h];if(d&&d.isDirectory){var y=this;this.getEntryChildren(d).forEach(function(p){p.entryName!==h&&y.deleteEntry(p.entryName)})}r.splice(r.indexOf(d),1),delete n[h],s.totalEntries=r.length},getEntryChildren:function(h){if(o||a(),h&&h.isDirectory){const d=[],y=h.entryName,p=y.length;return r.forEach(function(f){f.entryName.substr(0,p)===y&&d.push(f)}),d}return[]},compressToBuffer:function(){o||a(),E();const h=[],d=[];let y=0,p=0;s.size=0,s.offset=0;for(const _ of r){const D=_.getCompressedData();_.header.offset=p;const z=_.header.dataHeaderToBinary(),T=_.rawEntryName.length,C=Buffer.alloc(T+_.extra.length);_.rawEntryName.copy(C,0),C.copy(_.extra,T);const V=z.length+C.length+D.length;p+=V,h.push(z),h.push(C),h.push(D);const P=_.packHeader();d.push(P),s.size+=P.length,y+=V+P.length}y+=s.mainHeaderSize,s.offset=p,p=0;const f=Buffer.alloc(y);for(const _ of h)_.copy(f,p),p+=_.length;for(const _ of d)_.copy(f,p),p+=_.length;const $=s.toBinary();return i&&i.copy($,Ge.Constants.ENDHDR),$.copy(f,p),f},toAsyncBuffer:function(h,d,y,p){try{o||a(),E();const f=[],$=[];let _=0,D=0;s.size=0,s.offset=0;const z=function(T){if(T.length){const C=T.pop(),V=C.entryName+C.extra.toString();y&&y(V),C.getCompressedDataAsync(function(P){p&&p(V),C.header.offset=D;const x=C.header.dataHeaderToBinary(),M=Buffer.alloc(V.length,V),A=x.length+M.length+P.length;D+=A,f.push(x),f.push(M),f.push(P);const H=C.packHeader();$.push(H),s.size+=H.length,_+=A+H.length,z(T)})}else{_+=s.mainHeaderSize,s.offset=D,D=0;const C=Buffer.alloc(_);f.forEach(function(P){P.copy(C,D),D+=P.length}),$.forEach(function(P){P.copy(C,D),D+=P.length});const V=s.toBinary();i&&i.copy(V,Ge.Constants.ENDHDR),V.copy(C,D),h(C)}};z(r)}catch(f){d(f)}}}};const Ae=_r,Dt=Ie,b$=Of,L$=A$,ur=(e,t)=>typeof e=="boolean"?e:t,Ts=(e,t)=>typeof e=="string"?e:t,F$={noSort:!1,readEntries:!1,method:Ae.Constants.NONE,fs:null};var Ic=function(e,t){let r=null;const n=Object.assign(Object.create(null),F$);e&&typeof e=="object"&&(e instanceof Uint8Array||(Object.assign(n,e),e=n.input?n.input:void 0,n.input&&delete n.input),Buffer.isBuffer(e)&&(r=e,n.method=Ae.Constants.BUFFER,e=void 0)),Object.assign(n,t);const i=new Ae(n);if(e&&typeof e=="string")if(i.fs.existsSync(e))n.method=Ae.Constants.FILE,n.filename=e,r=i.fs.readFileSync(e);else throw new Error(Ae.Errors.INVALID_FILENAME);const s=new L$(r,n),{canonical:o,sanitize:c}=Ae;function u(a){if(a&&s){var l;if(typeof a=="string"&&(l=s.getEntry(a)),typeof a=="object"&&typeof a.entryName<"u"&&typeof a.header<"u"&&(l=s.getEntry(a.entryName)),l)return l}return null}function m(a){const{join:l,normalize:E,sep:h}=Dt.posix;return l(".",E(h+a.split("\\").join(h)+h))}return{readFile:function(a,l){var E=u(a);return E&&E.getData(l)||null},readFileAsync:function(a,l){var E=u(a);E?E.getDataAsync(l):l(null,"getEntry failed for:"+a)},readAsText:function(a,l){var E=u(a);if(E){var h=E.getData();if(h&&h.length)return h.toString(l||"utf8")}return""},readAsTextAsync:function(a,l,E){var h=u(a);h?h.getDataAsync(function(d,y){if(y){l(d,y);return}d&&d.length?l(d.toString(E||"utf8")):l("")}):l("")},deleteFile:function(a){var l=u(a);l&&s.deleteEntry(l.entryName)},addZipComment:function(a){s.comment=a},getZipComment:function(){return s.comment||""},addZipEntryComment:function(a,l){var E=u(a);E&&(E.comment=l)},getZipEntryComment:function(a){var l=u(a);return l&&l.comment||""},updateFile:function(a,l){var E=u(a);E&&E.setData(l)},addLocalFile:function(a,l,E,h){if(i.fs.existsSync(a)){l=l?m(l):"";var d=a.split("\\").join("/").split("/").pop();l+=E||d;const y=i.fs.statSync(a);this.addFile(l,i.fs.readFileSync(a),h,y)}else throw new Error(Ae.Errors.FILE_NOT_FOUND.replace("%s",a))},addLocalFolder:function(a,l,E,h){if(E instanceof RegExp?E=function(d){return function(y){return d.test(y)}}(E):typeof E!="function"&&(E=function(){return!0}),l=l?m(l):"",a=Dt.normalize(a),i.fs.existsSync(a)){const d=i.findFiles(a),y=this;d.length&&d.forEach(function(p){var f=Dt.relative(a,p).split("\\").join("/");if(E(f)){var $=i.fs.statSync(p);$.isFile()?y.addFile(l+f,i.fs.readFileSync(p),"",h||$):y.addFile(l+f+"/",Buffer.alloc(0),"",h||$)}})}else throw new Error(Ae.Errors.FILE_NOT_FOUND.replace("%s",a))},addLocalFolderAsync:function(a,l,E,h){h instanceof RegExp?h=function(y){return function(p){return y.test(p)}}(h):typeof h!="function"&&(h=function(){return!0}),E=E?m(E):"",a=Dt.normalize(a);var d=this;i.fs.open(a,"r",function(y){if(y&&y.code==="ENOENT")l(void 0,Ae.Errors.FILE_NOT_FOUND.replace("%s",a));else if(y)l(void 0,y);else{var p=i.findFiles(a),f=-1,$=function(){if(f+=1,f<p.length){var _=p[f],D=Dt.relative(a,_).split("\\").join("/");D=D.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),h(D)?i.fs.stat(_,function(z,T){z&&l(void 0,z),T.isFile()?i.fs.readFile(_,function(C,V){C?l(void 0,C):(d.addFile(E+D,V,"",T),$())}):(d.addFile(E+D+"/",Buffer.alloc(0),"",T),$())}):process.nextTick(()=>{$()})}else l(!0,void 0)};$()}})},addLocalFolderPromise:function(a,l){return new Promise((E,h)=>{const{filter:d,zipPath:y}=Object.assign({},l);this.addLocalFolderAsync(a,(p,f)=>{f&&h(f),p&&E(this)},y,d)})},addFile:function(a,l,E,h){let d=u(a);const y=d!=null;y||(d=new b$,d.entryName=a),d.comment=E||"";const p=typeof h=="object"&&h instanceof i.fs.Stats;p&&(d.header.time=h.mtime);var f=d.isDirectory?16:0;let $=d.isDirectory?16384:32768;p?$|=4095&h.mode:typeof h=="number"?$|=4095&h:$|=d.isDirectory?493:420,f=(f|$<<16)>>>0,d.attr=f,d.setData(l),y||s.setEntry(d)},getEntries:function(){return s?s.entries:[]},getEntry:function(a){return u(a)},getEntryCount:function(){return s.getEntryCount()},forEach:function(a){return s.forEach(a)},extractEntryTo:function(a,l,E,h,d,y){h=ur(h,!1),d=ur(d,!1),E=ur(E,!0),y=Ts(y,Ts(d,void 0));var p=u(a);if(!p)throw new Error(Ae.Errors.NO_ENTRY);var f=o(p.entryName),$=c(l,y&&!p.isDirectory?y:E?f:Dt.basename(f));if(p.isDirectory){var _=s.getEntryChildren(p);return _.forEach(function(T){if(T.isDirectory)return;var C=T.getData();if(!C)throw new Error(Ae.Errors.CANT_EXTRACT_FILE);var V=o(T.entryName),P=c(l,E?V:Dt.basename(V));const x=d?T.header.fileAttr:void 0;i.writeFileTo(P,C,h,x)}),!0}var D=p.getData();if(!D)throw new Error(Ae.Errors.CANT_EXTRACT_FILE);if(i.fs.existsSync($)&&!h)throw new Error(Ae.Errors.CANT_OVERRIDE);const z=d?a.header.fileAttr:void 0;return i.writeFileTo($,D,h,z),!0},test:function(a){if(!s)return!1;for(var l in s.entries)try{if(l.isDirectory)continue;var E=s.entries[l].getData(a);if(!E)return!1}catch{return!1}return!0},extractAllTo:function(a,l,E,h){if(l=ur(l,!1),h=Ts(E,h),E=ur(E,!1),!s)throw new Error(Ae.Errors.NO_ZIP);s.entries.forEach(function(d){var y=c(a,o(d.entryName.toString()));if(d.isDirectory){i.makeDir(y);return}var p=d.getData(h);if(!p)throw new Error(Ae.Errors.CANT_EXTRACT_FILE);const f=E?d.header.fileAttr:void 0;i.writeFileTo(y,p,l,f);try{i.fs.utimesSync(y,d.header.time,d.header.time)}catch{throw new Error(Ae.Errors.CANT_EXTRACT_FILE)}})},extractAllToAsync:function(a,l,E,h){if(l=ur(l,!1),typeof E=="function"&&!h&&(h=E),E=ur(E,!1),h||(h=function(_){throw new Error(_)}),!s){h(new Error(Ae.Errors.NO_ZIP));return}a=Dt.resolve(a);const d=_=>c(a,Dt.normalize(o(_.entryName.toString()))),y=(_,D)=>new Error(_+': "'+D+'"'),p=[],f=new Set;s.entries.forEach(_=>{_.isDirectory?p.push(_):f.add(_)});for(const _ of p){const D=d(_),z=E?_.header.fileAttr:void 0;try{i.makeDir(D),z&&i.fs.chmodSync(D,z),i.fs.utimesSync(D,_.header.time,_.header.time)}catch{h(y("Unable to create folder",D))}}const $=()=>{f.size===0&&h()};for(const _ of f.values()){const D=Dt.normalize(o(_.entryName.toString())),z=c(a,D);_.getDataAsync(function(T,C){if(C){h(new Error(C));return}if(!T)h(new Error(Ae.Errors.CANT_EXTRACT_FILE));else{const V=E?_.header.fileAttr:void 0;i.writeFileToAsync(z,T,l,V,function(P){if(!P){h(y("Unable to write file",z));return}i.fs.utimes(z,_.header.time,_.header.time,function(x){if(x){h(y("Unable to set times",z));return}f.delete(_),$()})})}})}$()},writeZip:function(a,l){if(arguments.length===1&&typeof a=="function"&&(l=a,a=""),!a&&n.filename&&(a=n.filename),!!a){var E=s.compressToBuffer();if(E){var h=i.writeFileTo(a,E,!0);typeof l=="function"&&l(h?null:new Error("failed"),"")}}},writeZipPromise:function(a,l){const{overwrite:E,perm:h}=Object.assign({overwrite:!0},l);return new Promise((d,y)=>{!a&&n.filename&&(a=n.filename),a||y("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(p=>{const f=$=>$?d($):y("ADM-ZIP: Wasn't able to write zip file");i.writeFileToAsync(a,p,E,h,f)},y)})},toBufferPromise:function(){return new Promise((a,l)=>{s.toAsyncBuffer(a,l)})},toBuffer:function(a,l,E,h){return this.valueOf=2,typeof a=="function"?(s.toAsyncBuffer(a,l,E,h),null):s.compressToBuffer()}}},Mn,Br,Hr,kn,pr,yr,Zt,Wt,zi,qr,Un,Vs,Vn,yt,Kr,$i,zn,kt;const pt=class{constructor(t,r){Fe(this,Un);Fe(this,Kr);Fe(this,Mn,ce.screen.getPrimaryDisplay().size);Fe(this,Br,oe(this,Mn).width);Fe(this,Hr,oe(this,Mn).height);Fe(this,kn,{getAppPath:ce.app.getAppPath(),isPackaged:ce.app.isPackaged,downloads:ce.app.getPath("downloads"),userData:ce.app.getPath("userData"),getVersion:"",env:{...process.env},platform:process.platform,arch:process.arch});Fe(this,pr,0);Fe(this,yr,0);Fe(this,Zt,0);Fe(this,Wt,0);Fe(this,zi,process.platform==="win32");Fe(this,qr,void 0);Fe(this,Vn,!1);Fe(this,yt,!1);this.bw=t,oe(this,kn).getVersion=r,ce.ipcMain.handle("getInfo",()=>oe(this,kn)),ce.ipcMain.handle("existsSync",(i,s)=>lt.existsSync(s)),ce.ipcMain.handle("copySync",(i,s,o)=>lt.copySync(s,o)),ce.ipcMain.handle("removeSync",(i,s)=>lt.removeSync(s)),ce.ipcMain.handle("ensureFileSync",(i,s)=>lt.ensureFileSync(s)),ce.ipcMain.handle("readFileSync",(i,s)=>lt.readFileSync(s,{encoding:"utf8"})),ce.ipcMain.handle("readFile",(i,s,o)=>lt.readFile(s,o)),ce.ipcMain.handle("writeFileSync",(i,s,o,c)=>lt.writeFileSync(s,o,c)),ce.ipcMain.handle("appendFile",(i,s,o,c)=>lt.appendFile(s,o,c)),ce.ipcMain.handle("win_close",()=>t.close()),ce.ipcMain.handle("win_setTitle",(i,s)=>t.setTitle(s)),ce.ipcMain.handle("showMessageBox",(i,s)=>ce.dialog.showMessageBox(s)),ce.ipcMain.handle("capturePage",(i,s)=>t.webContents.capturePage().then(o=>lt.writeFileSync(s,s.slice(-4)===".png"?o.toPNG():o.toJPEG(80)))),ce.ipcMain.handle("navigate_to",(i,s)=>ce.shell.openExternal(s)),ce.ipcMain.handle("openDevTools",()=>t.webContents.openDevTools()),ce.ipcMain.handle("win_ev_devtools_opened",(i,s)=>t.webContents.on("devtools-opened",s));let n;ce.ipcMain.handle("Store",(i,s)=>{n=new gc(s)}),ce.ipcMain.handle("flush",(i,s)=>{n.store=s}),ce.ipcMain.handle("Store_isEmpty",()=>n.size===0),ce.ipcMain.handle("Store_get",()=>n.store),ce.ipcMain.handle("zip",(i,s,o)=>{const c=new Ic;c.addLocalFolder(s),c.writeZip(o)}),ce.ipcMain.handle("unzip",(i,s,o)=>{lt.removeSync(o),lt.ensureDirSync(o),new Ic(s).extractAllTo(o,!0)}),ce.ipcMain.handle("isSimpleFullScreen",()=>t.simpleFullScreen),oe(this,zi)?(ce.ipcMain.handle("setSimpleFullScreen",(i,s)=>{ze(this,yt,!0),t.setSimpleFullScreen(s),s||(t.setPosition(oe(this,pr),oe(this,yr)),t.setContentSize(oe(this,Zt),oe(this,Wt)+oe(pt,kt))),ze(this,yt,!1)}),t.on("enter-full-screen",()=>{t.setContentSize(oe(this,Br),oe(this,Hr)-oe(pt,kt))}),t.on("leave-full-screen",()=>{Pr(this,Kr,$i).call(this,!1,oe(this,pr),oe(this,yr),oe(this,Zt),oe(this,Wt)+oe(pt,kt))})):ce.ipcMain.handle("setSimpleFullScreen",(i,s)=>{t.setSimpleFullScreen(s),s||t.setContentSize(oe(this,Zt),oe(this,Wt)+oe(pt,kt))}),ce.ipcMain.handle("window",(i,s,o,c,u,m)=>Pr(this,Kr,$i).call(this,s,o,c,u,m)),t.on("move",()=>Pr(this,Un,Vs).call(this))}openDevTools(){this.bw.webContents.openDevTools()}static initRenderer(t,r,n){let i=()=>{},s;try{gc.initRenderer(),process.env.ELECTRON_DISABLE_SECURITY_WARNINGS="true",s=new ce.BrowserWindow({...n,fullscreenable:!0,maximizable:!1,webPreferences:{enableRemoteModule:!1,nodeIntegration:!1,contextIsolation:!0,preload:`${__dirname}/preload.js`,backgroundColor:"#000",show:!1}}),s.setMenuBarVisibility(!1);const o=s.getContentSize()[1];s.setMenuBarVisibility(!0);const c=s.getContentSize()[1];ze(pt,kt,o-c),ze(pt,zn,new pt(s,r)),i=()=>oe(pt,zn).openDevTools(),s.loadFile(t),s.once("ready-to-show",()=>s.show())}catch(o){throw console.error(`ealy err:${o}`),i(),"initRenderer error"}return s}};let Vr=pt;Mn=new WeakMap,Br=new WeakMap,Hr=new WeakMap,kn=new WeakMap,pr=new WeakMap,yr=new WeakMap,Zt=new WeakMap,Wt=new WeakMap,zi=new WeakMap,qr=new WeakMap,Un=new WeakSet,Vs=function(){if(oe(this,qr)||oe(this,yt))return;ze(this,yt,!0);const{x:t,y:r}=this.bw.getBounds();ze(this,qr,setTimeout(()=>{if(ze(this,qr,void 0),oe(this,Vn)){ze(this,Vn,!1);return}ze(this,yt,!1);const n=this.bw.getBounds();if(t!==n.x||r!==n.y){Pr(this,Un,Vs).call(this);return}Pr(this,Kr,$i).call(this,!1,n.x,n.y,oe(this,Zt),oe(this,Wt))},1e3/60*10))},Vn=new WeakMap,yt=new WeakMap,Kr=new WeakSet,$i=function(t,r,n,i,s){oe(this,yt)||(ze(this,yt,!0),!this.bw.simpleFullScreen&&(t?([r,n]=this.bw.getPosition(),r=(oe(this,Br)-r)*.5,n=(oe(this,Hr)-n)*.5):((r<0||r>oe(this,Br))&&(r=0),(n<0||n>oe(this,Hr))&&(n=0)),(oe(this,pr)!==r||oe(this,yr)!==n)&&(ze(this,pr,r),ze(this,yr,n),this.bw.webContents.send("save_win_pos",r,n),this.bw.setPosition(r,n)),ze(this,Zt,i),ze(this,Wt,s),this.bw.setContentSize(i,s+oe(pt,kt)),ze(this,yt,!1)))},zn=new WeakMap,kt=new WeakMap,Fe(Vr,zn,void 0),Fe(Vr,kt,0);module.exports=Vr;exports.appMain=Vr;
16
16
  //# sourceMappingURL=appMain.js.map