@serverless-devs/s 2.1.2-beta.2 → 2.1.3-beta.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.
@@ -1,55 +1,55 @@
1
- "use strict";var gh=Object.defineProperty,vh=Object.defineProperties;var _h=Object.getOwnPropertyDescriptors;var To=Object.getOwnPropertySymbols;var yh=Object.prototype.hasOwnProperty,$h=Object.prototype.propertyIsEnumerable;var Ao=(r,e,t)=>e in r?gh(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,oe=(r,e)=>{for(var t in e||(e={}))yh.call(e,t)&&Ao(r,t,e[t]);if(To)for(var t of To(e))$h.call(e,t)&&Ao(r,t,e[t]);return r},Ue=(r,e)=>vh(r,_h(e));var _=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Fo=_((Ft,Mo)=>{var Eh=require("events").EventEmitter,Xs=require("child_process").spawn,Mt=require("path"),Ws=require("fs"),Jr=class{constructor(e,t){this.flags=e,this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Lo(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.description=t||"",this.defaultValue=void 0}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return wh(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}},hr=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},pr=class extends Eh{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._storeOptionsAsPropertiesCalled=!1,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(e,t,n){let s=t,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let a=e.split(/ +/),c=this.createCommand(a.shift());return s&&(c.description(s),c._executableHandler=!0),i.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(i.noHelp||i.hidden),c._hasHelpOption=this._hasHelpOption,c._helpFlags=this._helpFlags,c._helpDescription=this._helpDescription,c._helpShortFlag=this._helpShortFlag,c._helpLongFlag=this._helpLongFlag,c._helpCommandName=this._helpCommandName,c._helpCommandnameAndArgs=this._helpCommandnameAndArgs,c._helpCommandDescription=this._helpCommandDescription,c._exitCallback=this._exitCallback,c._storeOptionsAsProperties=this._storeOptionsAsProperties,c._passCommandToAction=this._passCommandToAction,c._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue,c._executableFile=i.executableFile||null,this.commands.push(c),c._parseExpectedArgs(a),c.parent=this,s?this:c}createCommand(e){return new pr(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function n(s){s.forEach(i=>{if(i._executableHandler&&!i._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${i.name()}`);n(i.commands)})}return n(e.commands),t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return e===!1?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return this._hasImplicitHelpCommand===void 0&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(!!e.length)return e.forEach(t=>{let n={required:!1,name:"",variadic:!1};switch(t[0]){case"<":n.required=!0,n.name=t.slice(1,-1);break;case"[":n.name=t.slice(1,-1);break}n.name.length>3&&n.name.slice(-3)==="..."&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&this._args.push(n)}),this._args.forEach((t,n)=>{if(t.variadic&&n<this._args.length-1)throw new Error(`only the last argument can be variadic '${t.name}'`)}),this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new hr(e,t,n)),process.exit(e)}action(e){let t=n=>{let s=this._args.length,i=n.slice(0,s);this._passCommandToAction?i[s]=this:i[s]=this.opts(),n.length>s&&i.push(n.slice(s));let a=e.apply(this,i),c=this;for(;c.parent;)c=c.parent;c._actionResults.push(a)};return this._actionHandler=t,this}_checkForOptionNameClash(e){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||e.name()==="help"||this._getOptionValue(e.attributeName())===void 0)return;let n=!0;if(e.negate){let s=e.long.replace(/^--no-/,"--");n=!this._findOption(s)}else if(e.long){let s=e.long.replace(/^--/,"--no-");n=!this._findOption(s)}if(n)throw new Error(`option '${e.name()}' clashes with existing property '${e.attributeName()}' on Command
1
+ "use strict";var _=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ko=_((Lt,jo)=>{var dh=require("events").EventEmitter,zs=require("child_process").spawn,xt=require("path"),Ks=require("fs"),Wr=class{constructor(e,t){this.flags=e,this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Do(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.description=t||"",this.defaultValue=void 0}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return hh(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}},fr=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},dr=class extends dh{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._storeOptionsAsPropertiesCalled=!1,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(e,t,n){let s=t,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let a=e.split(/ +/),c=this.createCommand(a.shift());return s&&(c.description(s),c._executableHandler=!0),i.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(i.noHelp||i.hidden),c._hasHelpOption=this._hasHelpOption,c._helpFlags=this._helpFlags,c._helpDescription=this._helpDescription,c._helpShortFlag=this._helpShortFlag,c._helpLongFlag=this._helpLongFlag,c._helpCommandName=this._helpCommandName,c._helpCommandnameAndArgs=this._helpCommandnameAndArgs,c._helpCommandDescription=this._helpCommandDescription,c._exitCallback=this._exitCallback,c._storeOptionsAsProperties=this._storeOptionsAsProperties,c._passCommandToAction=this._passCommandToAction,c._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue,c._executableFile=i.executableFile||null,this.commands.push(c),c._parseExpectedArgs(a),c.parent=this,s?this:c}createCommand(e){return new dr(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function n(s){s.forEach(i=>{if(i._executableHandler&&!i._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${i.name()}`);n(i.commands)})}return n(e.commands),t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return e===!1?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return this._hasImplicitHelpCommand===void 0&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(!!e.length)return e.forEach(t=>{let n={required:!1,name:"",variadic:!1};switch(t[0]){case"<":n.required=!0,n.name=t.slice(1,-1);break;case"[":n.name=t.slice(1,-1);break}n.name.length>3&&n.name.slice(-3)==="..."&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&this._args.push(n)}),this._args.forEach((t,n)=>{if(t.variadic&&n<this._args.length-1)throw new Error(`only the last argument can be variadic '${t.name}'`)}),this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new fr(e,t,n)),process.exit(e)}action(e){let t=n=>{let s=this._args.length,i=n.slice(0,s);this._passCommandToAction?i[s]=this:i[s]=this.opts(),n.length>s&&i.push(n.slice(s));let a=e.apply(this,i),c=this;for(;c.parent;)c=c.parent;c._actionResults.push(a)};return this._actionHandler=t,this}_checkForOptionNameClash(e){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||e.name()==="help"||this._getOptionValue(e.attributeName())===void 0)return;let n=!0;if(e.negate){let s=e.long.replace(/^--no-/,"--");n=!this._findOption(s)}else if(e.long){let s=e.long.replace(/^--/,"--no-");n=!this._findOption(s)}if(n)throw new Error(`option '${e.name()}' clashes with existing property '${e.attributeName()}' on Command
2
2
  - call storeOptionsAsProperties(false) to store option values safely,
3
3
  - or call storeOptionsAsProperties(true) to suppress this check,
4
4
  - or change option name
5
5
 
6
- Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,s,i){let a=new Jr(t,n),c=a.name(),u=a.attributeName();if(a.mandatory=!!e.mandatory,this._checkForOptionNameClash(a),typeof s!="function")if(s instanceof RegExp){let o=s;s=(l,d)=>{let y=o.exec(l);return y?y[0]:d}}else i=s,s=null;if(a.negate||a.optional||a.required||typeof i=="boolean"){if(a.negate){let o=a.long.replace(/^--no-/,"--");i=this._findOption(o)?this._getOptionValue(u):!0}i!==void 0&&(this._setOptionValue(u,i),a.defaultValue=i)}return this.options.push(a),this.on("option:"+c,o=>{let l=this._getOptionValue(u);o!==null&&s?o=s(o,l===void 0?i:l):o!==null&&a.variadic&&(l===i||!Array.isArray(l)?o=[o]:o=l.concat(o)),typeof l=="boolean"||typeof l>"u"?o==null?this._setOptionValue(u,a.negate?!1:i||!0):this._setOptionValue(u,o):o!==null&&this._setOptionValue(u,a.negate?!1:o)}),this}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e){return this._combineFlagAndOptionalValue=e===void 0||e,this}allowUnknownOption(e){return this._allowUnknownOption=e===void 0||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=e===void 0||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=e===void 0||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&Mt.basename(this._scriptPath,Mt.extname(this._scriptPath)),this._parseCommand([],n),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then(()=>this)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let i=this._scriptPath;!i&&process.mainModule&&(i=process.mainModule.filename);let a;try{let y=Ws.realpathSync(i);a=Mt.dirname(y)}catch{a="."}let c=Mt.basename(i,Mt.extname(i))+"-"+e._name;e._executableFile&&(c=e._executableFile);let u=Mt.join(a,c);Ws.existsSync(u)?c=u:s.forEach(y=>{Ws.existsSync(`${u}${y}`)&&(c=`${u}${y}`)}),n=s.includes(Mt.extname(c));let o;process.platform!=="win32"?n?(t.unshift(c),t=ko(process.execArgv).concat(t),o=Xs(process.argv[0],t,{stdio:"inherit"})):o=Xs(c,t,{stdio:"inherit"}):(t.unshift(c),t=ko(process.execArgv).concat(t),o=Xs(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(y=>{process.on(y,()=>{o.killed===!1&&o.exitCode===null&&o.kill(y)})});let d=this._exitCallback;d?o.on("close",()=>{d(new hr(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):o.on("close",process.exit.bind(process)),o.on("error",y=>{if(y.code==="ENOENT"){let m=`'${c}' does not exist
6
+ Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,s,i){let a=new Wr(t,n),c=a.name(),u=a.attributeName();if(a.mandatory=!!e.mandatory,this._checkForOptionNameClash(a),typeof s!="function")if(s instanceof RegExp){let o=s;s=(l,d)=>{let y=o.exec(l);return y?y[0]:d}}else i=s,s=null;if(a.negate||a.optional||a.required||typeof i=="boolean"){if(a.negate){let o=a.long.replace(/^--no-/,"--");i=this._findOption(o)?this._getOptionValue(u):!0}i!==void 0&&(this._setOptionValue(u,i),a.defaultValue=i)}return this.options.push(a),this.on("option:"+c,o=>{let l=this._getOptionValue(u);o!==null&&s?o=s(o,l===void 0?i:l):o!==null&&a.variadic&&(l===i||!Array.isArray(l)?o=[o]:o=l.concat(o)),typeof l=="boolean"||typeof l>"u"?o==null?this._setOptionValue(u,a.negate?!1:i||!0):this._setOptionValue(u,o):o!==null&&this._setOptionValue(u,a.negate?!1:o)}),this}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e){return this._combineFlagAndOptionalValue=e===void 0||e,this}allowUnknownOption(e){return this._allowUnknownOption=e===void 0||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=e===void 0||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=e===void 0||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&xt.basename(this._scriptPath,xt.extname(this._scriptPath)),this._parseCommand([],n),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then(()=>this)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let i=this._scriptPath;!i&&process.mainModule&&(i=process.mainModule.filename);let a;try{let y=Ks.realpathSync(i);a=xt.dirname(y)}catch{a="."}let c=xt.basename(i,xt.extname(i))+"-"+e._name;e._executableFile&&(c=e._executableFile);let u=xt.join(a,c);Ks.existsSync(u)?c=u:s.forEach(y=>{Ks.existsSync(`${u}${y}`)&&(c=`${u}${y}`)}),n=s.includes(xt.extname(c));let o;process.platform!=="win32"?n?(t.unshift(c),t=Ao(process.execArgv).concat(t),o=zs(process.argv[0],t,{stdio:"inherit"})):o=zs(c,t,{stdio:"inherit"}):(t.unshift(c),t=Ao(process.execArgv).concat(t),o=zs(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(y=>{process.on(y,()=>{o.killed===!1&&o.exitCode===null&&o.kill(y)})});let d=this._exitCallback;d?o.on("close",()=>{d(new fr(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):o.on("close",process.exit.bind(process)),o.on("error",y=>{if(y.code==="ENOENT"){let m=`'${c}' does not exist
7
7
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
8
- - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(m)}else if(y.code==="EACCES")throw new Error(`'${c}' not executable`);if(!d)process.exit(1);else{let m=new hr(1,"commander.executeSubCommandAsync","(error)");m.nestedError=y,d(m)}}),this.runningCommand=o}_dispatchSubcommand(e,t,n){let s=this._findCommand(e);s||this._helpAndError(),s._executableHandler?this._executeSubCommand(s,t.concat(n)):s._parseCommand(t,n)}_parseCommand(e,t){let n=this.parseOptions(t);if(e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)e.length===1?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)Do(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Do(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){let s=this.args.slice();this._args.forEach((i,a)=>{i.required&&s[a]==null?this.missingArgument(i.name):i.variadic&&(s[a]=s.splice(a))}),this._actionHandler(s),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(!!e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e._getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}parseOptions(e){let t=[],n=[],s=t,i=e.slice();function a(u){return u.length>1&&u[0]==="-"}let c=null;for(;i.length;){let u=i.shift();if(u==="--"){s===n&&s.push(u),s.push(...i);break}if(c&&!a(u)){this.emit(`option:${c.name()}`,u);continue}if(c=null,a(u)){let o=this._findOption(u);if(o){if(o.required){let l=i.shift();l===void 0&&this.optionMissingArgument(o),this.emit(`option:${o.name()}`,l)}else if(o.optional){let l=null;i.length>0&&!a(i[0])&&(l=i.shift()),this.emit(`option:${o.name()}`,l)}else this.emit(`option:${o.name()}`);c=o.variadic?o:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let o=this._findOption(`-${u[1]}`);if(o){o.required||o.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${o.name()}`,u.slice(2)):(this.emit(`option:${o.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let o=u.indexOf("="),l=this._findOption(u.slice(0,o));if(l&&(l.required||l.optional)){this.emit(`option:${l.name()}`,u.slice(o+1));continue}}u.length>1&&u[0]==="-"&&(s=n),s.push(u)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let s=this.options[n].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}missingArgument(e){let t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let n;t?n=`error: option '${e.flags}' argument missing, got '${t}'`:n=`error: option '${e.flags}' argument missing`,console.error(n),this._exit(1,"commander.optionMissingArgument",n)}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;let t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){let e=[this.name()];for(let s=this.parent;s;s=s.parent)e.unshift(s.name());let t=e.join(" "),n=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${t} ${this._helpLongFlag}'.`:"");console.error(n),this._exit(1,"commander.unknownCommand",n)}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let s=new Jr(t,n);return this._versionOptionName=s.attributeName(),this.options.push(s),this.on("option:"+s.name(),()=>{process.stdout.write(e+`
9
- `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,this._argsDescription=t,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this._args.map(n=>jo(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}prepareCommands(){let e=this.commands.filter(t=>!t._hidden).map(t=>{let n=t._args.map(s=>jo(s)).join(" ");return[t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:""),t._description]});return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce((t,n)=>Math.max(t,n[0].length),0)}largestOptionLength(){let e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce((t,n)=>Math.max(t,n.flags.length),0)}largestArgLength(){return this._args.reduce((e,t)=>Math.max(e,t.name.length),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){let e=this.padWidth(),n=(process.stdout.columns||80)-e-4;function s(u,o){return Bs(u,e)+" "+qo(o,n,e+2)}let i=this.options.map(u=>{let o=u.description+(!u.negate&&u.defaultValue!==void 0?" (default: "+JSON.stringify(u.defaultValue)+")":"");return s(u.flags,o)}),a=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),c=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(a||c){let u=this._helpFlags;a?c||(u=this._helpShortFlag):u=this._helpLongFlag,i.push(s(u,this._helpDescription))}return i.join(`
10
- `)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),s=(process.stdout.columns||80)-t-4;return["Commands:",e.map(i=>{let a=i[1]?" "+i[1]:"";return(a?Bs(i[0],t):i[0])+qo(a,s,t+2)}).join(`
8
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(m)}else if(y.code==="EACCES")throw new Error(`'${c}' not executable`);if(!d)process.exit(1);else{let m=new fr(1,"commander.executeSubCommandAsync","(error)");m.nestedError=y,d(m)}}),this.runningCommand=o}_dispatchSubcommand(e,t,n){let s=this._findCommand(e);s||this._helpAndError(),s._executableHandler?this._executeSubCommand(s,t.concat(n)):s._parseCommand(t,n)}_parseCommand(e,t){let n=this.parseOptions(t);if(e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)e.length===1?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)Io(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Io(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){let s=this.args.slice();this._args.forEach((i,a)=>{i.required&&s[a]==null?this.missingArgument(i.name):i.variadic&&(s[a]=s.splice(a))}),this._actionHandler(s),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(!!e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e._getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}parseOptions(e){let t=[],n=[],s=t,i=e.slice();function a(u){return u.length>1&&u[0]==="-"}let c=null;for(;i.length;){let u=i.shift();if(u==="--"){s===n&&s.push(u),s.push(...i);break}if(c&&!a(u)){this.emit(`option:${c.name()}`,u);continue}if(c=null,a(u)){let o=this._findOption(u);if(o){if(o.required){let l=i.shift();l===void 0&&this.optionMissingArgument(o),this.emit(`option:${o.name()}`,l)}else if(o.optional){let l=null;i.length>0&&!a(i[0])&&(l=i.shift()),this.emit(`option:${o.name()}`,l)}else this.emit(`option:${o.name()}`);c=o.variadic?o:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let o=this._findOption(`-${u[1]}`);if(o){o.required||o.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${o.name()}`,u.slice(2)):(this.emit(`option:${o.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let o=u.indexOf("="),l=this._findOption(u.slice(0,o));if(l&&(l.required||l.optional)){this.emit(`option:${l.name()}`,u.slice(o+1));continue}}u.length>1&&u[0]==="-"&&(s=n),s.push(u)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let s=this.options[n].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}missingArgument(e){let t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let n;t?n=`error: option '${e.flags}' argument missing, got '${t}'`:n=`error: option '${e.flags}' argument missing`,console.error(n),this._exit(1,"commander.optionMissingArgument",n)}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;let t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){let e=[this.name()];for(let s=this.parent;s;s=s.parent)e.unshift(s.name());let t=e.join(" "),n=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${t} ${this._helpLongFlag}'.`:"");console.error(n),this._exit(1,"commander.unknownCommand",n)}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let s=new Wr(t,n);return this._versionOptionName=s.attributeName(),this.options.push(s),this.on("option:"+s.name(),()=>{process.stdout.write(e+`
9
+ `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,this._argsDescription=t,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this._args.map(n=>To(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}prepareCommands(){let e=this.commands.filter(t=>!t._hidden).map(t=>{let n=t._args.map(s=>To(s)).join(" ");return[t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:""),t._description]});return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce((t,n)=>Math.max(t,n[0].length),0)}largestOptionLength(){let e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce((t,n)=>Math.max(t,n.flags.length),0)}largestArgLength(){return this._args.reduce((e,t)=>Math.max(e,t.name.length),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){let e=this.padWidth(),n=(process.stdout.columns||80)-e-4;function s(u,o){return Xs(u,e)+" "+No(o,n,e+2)}let i=this.options.map(u=>{let o=u.description+(!u.negate&&u.defaultValue!==void 0?" (default: "+JSON.stringify(u.defaultValue)+")":"");return s(u.flags,o)}),a=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),c=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(a||c){let u=this._helpFlags;a?c||(u=this._helpShortFlag):u=this._helpLongFlag,i.push(s(u,this._helpDescription))}return i.join(`
10
+ `)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),s=(process.stdout.columns||80)-t-4;return["Commands:",e.map(i=>{let a=i[1]?" "+i[1]:"";return(a?Xs(i[0],t):i[0])+No(a,s,t+2)}).join(`
11
11
  `).replace(/^/gm," "),""].join(`
12
- `)}helpInformation(){if(this._name==="s")return"";let e=[];if(this._description){e=[this._description,""];let u=this._argsDescription;if(u&&this._args.length){let o=this.padWidth(),d=(process.stdout.columns||80)-o-5;e.push("Arguments:"),this._args.forEach(y=>{e.push(" "+Bs(y.name,o)+" "+xo(u[y.name]||"",d,o+4))}),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let n="";for(let u=this.parent;u;u=u.parent)n=u.name()+" "+n;let s=["Usage: "+n+t+" "+this.usage(),""],i=[],a=this.commandHelp();a&&(i=[a]);let c=[];return(this._hasHelpOption||this.options.length>0)&&(c=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),s.concat(e).concat(c).concat(i).join(`
13
- `)}outputHelp(e){e||(e=n=>n);let t=e(this.helpInformation());if(typeof t!="string"&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let n=Lo(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}};Ft=Mo.exports=new pr;Ft.program=Ft;Ft.Command=pr;Ft.Option=Jr;Ft.CommanderError=hr;function wh(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Bs(r,e){let t=Math.max(0,e-r.length);return r+Array(t+1).join(" ")}function xo(r,e,t){let n=new RegExp(".{1,"+(e-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(r.match(n)||[]).map((i,a)=>(i.slice(-1)===`
12
+ `)}helpInformation(){if(this._name==="s")return"";let e=[];if(this._description){e=[this._description,""];let u=this._argsDescription;if(u&&this._args.length){let o=this.padWidth(),d=(process.stdout.columns||80)-o-5;e.push("Arguments:"),this._args.forEach(y=>{e.push(" "+Xs(y.name,o)+" "+qo(u[y.name]||"",d,o+4))}),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let n="";for(let u=this.parent;u;u=u.parent)n=u.name()+" "+n;let s=["Usage: "+n+t+" "+this.usage(),""],i=[],a=this.commandHelp();a&&(i=[a]);let c=[];return(this._hasHelpOption||this.options.length>0)&&(c=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),s.concat(e).concat(c).concat(i).join(`
13
+ `)}outputHelp(e){e||(e=n=>n);let t=e(this.helpInformation());if(typeof t!="string"&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let n=Do(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}};Lt=jo.exports=new dr;Lt.program=Lt;Lt.Command=dr;Lt.Option=Wr;Lt.CommanderError=fr;function hh(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Xs(r,e){let t=Math.max(0,e-r.length);return r+Array(t+1).join(" ")}function qo(r,e,t){let n=new RegExp(".{1,"+(e-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(r.match(n)||[]).map((i,a)=>(i.slice(-1)===`
14
14
  `&&(i=i.slice(0,i.length-1)),(a>0&&t?Array(t+1).join(" "):"")+i.trimRight())).join(`
15
- `)}function qo(r,e,t){return r.match(/[\n]\s+/)||e<40?r:xo(r,e,t)}function Do(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function jo(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function Lo(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}function ko(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}});var Yr=_((xE,Vo)=>{var bh="2.0.0",Sh=Number.MAX_SAFE_INTEGER||9007199254740991,Oh=16;Vo.exports={SEMVER_SPEC_VERSION:bh,MAX_LENGTH:256,MAX_SAFE_INTEGER:Sh,MAX_SAFE_COMPONENT_LENGTH:Oh}});var Zr=_((LE,Ho)=>{var Ph=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Ho.exports=Ph});var Vt=_((Pt,Uo)=>{var{MAX_SAFE_COMPONENT_LENGTH:Js}=Yr(),Rh=Zr();Pt=Uo.exports={};var Ch=Pt.re=[],O=Pt.src=[],P=Pt.t={},Nh=0,j=(r,e,t)=>{let n=Nh++;Rh(r,n,e),P[r]=n,O[n]=e,Ch[n]=new RegExp(e,t?"g":void 0)};j("NUMERICIDENTIFIER","0|[1-9]\\d*");j("NUMERICIDENTIFIERLOOSE","[0-9]+");j("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");j("MAINVERSION",`(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})`);j("MAINVERSIONLOOSE",`(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})`);j("PRERELEASEIDENTIFIER",`(?:${O[P.NUMERICIDENTIFIER]}|${O[P.NONNUMERICIDENTIFIER]})`);j("PRERELEASEIDENTIFIERLOOSE",`(?:${O[P.NUMERICIDENTIFIERLOOSE]}|${O[P.NONNUMERICIDENTIFIER]})`);j("PRERELEASE",`(?:-(${O[P.PRERELEASEIDENTIFIER]}(?:\\.${O[P.PRERELEASEIDENTIFIER]})*))`);j("PRERELEASELOOSE",`(?:-?(${O[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[P.PRERELEASEIDENTIFIERLOOSE]})*))`);j("BUILDIDENTIFIER","[0-9A-Za-z-]+");j("BUILD",`(?:\\+(${O[P.BUILDIDENTIFIER]}(?:\\.${O[P.BUILDIDENTIFIER]})*))`);j("FULLPLAIN",`v?${O[P.MAINVERSION]}${O[P.PRERELEASE]}?${O[P.BUILD]}?`);j("FULL",`^${O[P.FULLPLAIN]}$`);j("LOOSEPLAIN",`[v=\\s]*${O[P.MAINVERSIONLOOSE]}${O[P.PRERELEASELOOSE]}?${O[P.BUILD]}?`);j("LOOSE",`^${O[P.LOOSEPLAIN]}$`);j("GTLT","((?:<|>)?=?)");j("XRANGEIDENTIFIERLOOSE",`${O[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);j("XRANGEIDENTIFIER",`${O[P.NUMERICIDENTIFIER]}|x|X|\\*`);j("XRANGEPLAIN",`[v=\\s]*(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:${O[P.PRERELEASE]})?${O[P.BUILD]}?)?)?`);j("XRANGEPLAINLOOSE",`[v=\\s]*(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:${O[P.PRERELEASELOOSE]})?${O[P.BUILD]}?)?)?`);j("XRANGE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAIN]}$`);j("XRANGELOOSE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAINLOOSE]}$`);j("COERCE",`(^|[^\\d])(\\d{1,${Js}})(?:\\.(\\d{1,${Js}}))?(?:\\.(\\d{1,${Js}}))?(?:$|[^\\d])`);j("COERCERTL",O[P.COERCE],!0);j("LONETILDE","(?:~>?)");j("TILDETRIM",`(\\s*)${O[P.LONETILDE]}\\s+`,!0);Pt.tildeTrimReplace="$1~";j("TILDE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAIN]}$`);j("TILDELOOSE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAINLOOSE]}$`);j("LONECARET","(?:\\^)");j("CARETTRIM",`(\\s*)${O[P.LONECARET]}\\s+`,!0);Pt.caretTrimReplace="$1^";j("CARET",`^${O[P.LONECARET]}${O[P.XRANGEPLAIN]}$`);j("CARETLOOSE",`^${O[P.LONECARET]}${O[P.XRANGEPLAINLOOSE]}$`);j("COMPARATORLOOSE",`^${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]})$|^$`);j("COMPARATOR",`^${O[P.GTLT]}\\s*(${O[P.FULLPLAIN]})$|^$`);j("COMPARATORTRIM",`(\\s*)${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]}|${O[P.XRANGEPLAIN]})`,!0);Pt.comparatorTrimReplace="$1$2$3";j("HYPHENRANGE",`^\\s*(${O[P.XRANGEPLAIN]})\\s+-\\s+(${O[P.XRANGEPLAIN]})\\s*$`);j("HYPHENRANGELOOSE",`^\\s*(${O[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[P.XRANGEPLAINLOOSE]})\\s*$`);j("STAR","(<|>)?=?\\s*\\*");j("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");j("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Qr=_((ME,Go)=>{var Ih=["includePrerelease","loose","rtl"],Th=r=>r?typeof r!="object"?{loose:!0}:Ih.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};Go.exports=Th});var Xn=_((FE,Xo)=>{var zo=/^[0-9]+$/,Ko=(r,e)=>{let t=zo.test(r),n=zo.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},Ah=(r,e)=>Ko(e,r);Xo.exports={compareIdentifiers:Ko,rcompareIdentifiers:Ah}});var ve=_((VE,Yo)=>{var Wn=Zr(),{MAX_LENGTH:Wo,MAX_SAFE_INTEGER:Bn}=Yr(),{re:Bo,t:Jo}=Vt(),qh=Qr(),{compareIdentifiers:mr}=Xn(),je=class{constructor(e,t){if(t=qh(t),e instanceof je){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Wo)throw new TypeError(`version is longer than ${Wo} characters`);Wn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?Bo[Jo.LOOSE]:Bo[Jo.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Bn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Bn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Bn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<Bn)return i}return s}):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(e){if(Wn("SemVer.compare",this.version,this.options,e),!(e instanceof je)){if(typeof e=="string"&&e===this.version)return 0;e=new je(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof je||(e=new je(e,this.options)),mr(this.major,e.major)||mr(this.minor,e.minor)||mr(this.patch,e.patch)}comparePre(e){if(e instanceof je||(e=new je(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if(Wn("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++t)}compareBuild(e){e instanceof je||(e=new je(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(Wn("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);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)}t&&(mr(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Yo.exports=je});var Ht=_((HE,tc)=>{var{MAX_LENGTH:Dh}=Yr(),{re:Zo,t:Qo}=Vt(),ec=ve(),jh=Qr(),kh=(r,e)=>{if(e=jh(e),r instanceof ec)return r;if(typeof r!="string"||r.length>Dh||!(e.loose?Zo[Qo.LOOSE]:Zo[Qo.FULL]).test(r))return null;try{return new ec(r,e)}catch{return null}};tc.exports=kh});var nc=_((UE,rc)=>{var xh=Ht(),Lh=(r,e)=>{let t=xh(r,e);return t?t.version:null};rc.exports=Lh});var ic=_((GE,sc)=>{var Mh=Ht(),Fh=(r,e)=>{let t=Mh(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};sc.exports=Fh});var cc=_((zE,oc)=>{var ac=ve(),Vh=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new ac(r instanceof ac?r.version:r,t).inc(e,n).version}catch{return null}};oc.exports=Vh});var Ge=_((KE,lc)=>{var uc=ve(),Hh=(r,e,t)=>new uc(r,t).compare(new uc(e,t));lc.exports=Hh});var Jn=_((XE,fc)=>{var Uh=Ge(),Gh=(r,e,t)=>Uh(r,e,t)===0;fc.exports=Gh});var pc=_((WE,hc)=>{var dc=Ht(),zh=Jn(),Kh=(r,e)=>{if(zh(r,e))return null;{let t=dc(r),n=dc(e),s=t.prerelease.length||n.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(let c in t)if((c==="major"||c==="minor"||c==="patch")&&t[c]!==n[c])return i+c;return a}};hc.exports=Kh});var gc=_((BE,mc)=>{var Xh=ve(),Wh=(r,e)=>new Xh(r,e).major;mc.exports=Wh});var _c=_((JE,vc)=>{var Bh=ve(),Jh=(r,e)=>new Bh(r,e).minor;vc.exports=Jh});var $c=_((YE,yc)=>{var Yh=ve(),Zh=(r,e)=>new Yh(r,e).patch;yc.exports=Zh});var wc=_((ZE,Ec)=>{var Qh=Ht(),ep=(r,e)=>{let t=Qh(r,e);return t&&t.prerelease.length?t.prerelease:null};Ec.exports=ep});var Sc=_((QE,bc)=>{var tp=Ge(),rp=(r,e,t)=>tp(e,r,t);bc.exports=rp});var Pc=_((ew,Oc)=>{var np=Ge(),sp=(r,e)=>np(r,e,!0);Oc.exports=sp});var Yn=_((tw,Cc)=>{var Rc=ve(),ip=(r,e,t)=>{let n=new Rc(r,t),s=new Rc(e,t);return n.compare(s)||n.compareBuild(s)};Cc.exports=ip});var Ic=_((rw,Nc)=>{var ap=Yn(),op=(r,e)=>r.sort((t,n)=>ap(t,n,e));Nc.exports=op});var Ac=_((nw,Tc)=>{var cp=Yn(),up=(r,e)=>r.sort((t,n)=>cp(n,t,e));Tc.exports=up});var en=_((sw,qc)=>{var lp=Ge(),fp=(r,e,t)=>lp(r,e,t)>0;qc.exports=fp});var Zn=_((iw,Dc)=>{var dp=Ge(),hp=(r,e,t)=>dp(r,e,t)<0;Dc.exports=hp});var Ys=_((aw,jc)=>{var pp=Ge(),mp=(r,e,t)=>pp(r,e,t)!==0;jc.exports=mp});var Qn=_((ow,kc)=>{var gp=Ge(),vp=(r,e,t)=>gp(r,e,t)>=0;kc.exports=vp});var es=_((cw,xc)=>{var _p=Ge(),yp=(r,e,t)=>_p(r,e,t)<=0;xc.exports=yp});var Zs=_((uw,Lc)=>{var $p=Jn(),Ep=Ys(),wp=en(),bp=Qn(),Sp=Zn(),Op=es(),Pp=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return $p(r,t,n);case"!=":return Ep(r,t,n);case">":return wp(r,t,n);case">=":return bp(r,t,n);case"<":return Sp(r,t,n);case"<=":return Op(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Lc.exports=Pp});var Fc=_((lw,Mc)=>{var Rp=ve(),Cp=Ht(),{re:ts,t:rs}=Vt(),Np=(r,e)=>{if(r instanceof Rp)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(ts[rs.COERCE]);else{let n;for(;(n=ts[rs.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),ts[rs.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;ts[rs.COERCERTL].lastIndex=-1}return t===null?null:Cp(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};Mc.exports=Np});var Hc=_((fw,Vc)=>{"use strict";Vc.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Gc=_((dw,Uc)=>{"use strict";Uc.exports=X;X.Node=Ut;X.create=X;function X(r){var e=this;if(e instanceof X||(e=new X),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}X.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};X.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};X.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};X.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Tp(this,arguments[r]);return this.length};X.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Ap(this,arguments[r]);return this.length};X.prototype.pop=function(){if(!!this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};X.prototype.shift=function(){if(!!this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};X.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};X.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};X.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};X.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};X.prototype.map=function(r,e){e=e||this;for(var t=new X,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};X.prototype.mapReverse=function(r,e){e=e||this;for(var t=new X,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};X.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)t=r(t,n.value,s),n=n.next;return t};X.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)t=r(t,n.value,s),n=n.prev;return t};X.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};X.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};X.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new X;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(;s!==null&&n<e;n++,s=s.next)t.push(s.value);return t};X.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new X;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,s=this.tail;s!==null&&n>e;n--)s=s.prev;for(;s!==null&&n>r;n--,s=s.prev)t.push(s.value);return t};X.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(var i=[],n=0;s&&n<e;n++)i.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var n=0;n<t.length;n++)s=Ip(this,s,t[n]);return i};X.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function Ip(r,e,t){var n=e===r.head?new Ut(t,null,e,r):new Ut(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function Tp(r,e){r.tail=new Ut(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Ap(r,e){r.head=new Ut(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Ut(r,e,t,n){if(!(this instanceof Ut))return new Ut(r,e,t,n);this.list=n,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Hc()(X)}catch{}});var Bc=_((hw,Wc)=>{"use strict";var qp=Gc(),Gt=Symbol("max"),_t=Symbol("length"),gr=Symbol("lengthCalculator"),rn=Symbol("allowStale"),zt=Symbol("maxAge"),vt=Symbol("dispose"),zc=Symbol("noDisposeOnSet"),de=Symbol("lruList"),Je=Symbol("cache"),Xc=Symbol("updateAgeOnGet"),Qs=()=>1,ti=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Gt]=e.max||1/0,n=e.length||Qs;if(this[gr]=typeof n!="function"?Qs:n,this[rn]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[zt]=e.maxAge||0,this[vt]=e.dispose,this[zc]=e.noDisposeOnSet||!1,this[Xc]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Gt]=e||1/0,tn(this)}get max(){return this[Gt]}set allowStale(e){this[rn]=!!e}get allowStale(){return this[rn]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[zt]=e,tn(this)}get maxAge(){return this[zt]}set lengthCalculator(e){typeof e!="function"&&(e=Qs),e!==this[gr]&&(this[gr]=e,this[_t]=0,this[de].forEach(t=>{t.length=this[gr](t.value,t.key),this[_t]+=t.length})),tn(this)}get lengthCalculator(){return this[gr]}get length(){return this[_t]}get itemCount(){return this[de].length}rforEach(e,t){t=t||this;for(let n=this[de].tail;n!==null;){let s=n.prev;Kc(this,e,n,t),n=s}}forEach(e,t){t=t||this;for(let n=this[de].head;n!==null;){let s=n.next;Kc(this,e,n,t),n=s}}keys(){return this[de].toArray().map(e=>e.key)}values(){return this[de].toArray().map(e=>e.value)}reset(){this[vt]&&this[de]&&this[de].length&&this[de].forEach(e=>this[vt](e.key,e.value)),this[Je]=new Map,this[de]=new qp,this[_t]=0}dump(){return this[de].map(e=>ns(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[de]}set(e,t,n){if(n=n||this[zt],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let s=n?Date.now():0,i=this[gr](t,e);if(this[Je].has(e)){if(i>this[Gt])return vr(this,this[Je].get(e)),!1;let u=this[Je].get(e).value;return this[vt]&&(this[zc]||this[vt](e,u.value)),u.now=s,u.maxAge=n,u.value=t,this[_t]+=i-u.length,u.length=i,this.get(e),tn(this),!0}let a=new ri(e,t,i,s,n);return a.length>this[Gt]?(this[vt]&&this[vt](e,t),!1):(this[_t]+=a.length,this[de].unshift(a),this[Je].set(e,this[de].head),tn(this),!0)}has(e){if(!this[Je].has(e))return!1;let t=this[Je].get(e).value;return!ns(this,t)}get(e){return ei(this,e,!0)}peek(e){return ei(this,e,!1)}pop(){let e=this[de].tail;return e?(vr(this,e),e.value):null}del(e){vr(this,this[Je].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let s=e[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{let a=i-t;a>0&&this.set(s.k,s.v,a)}}}prune(){this[Je].forEach((e,t)=>ei(this,t,!1))}},ei=(r,e,t)=>{let n=r[Je].get(e);if(n){let s=n.value;if(ns(r,s)){if(vr(r,n),!r[rn])return}else t&&(r[Xc]&&(n.value.now=Date.now()),r[de].unshiftNode(n));return s.value}},ns=(r,e)=>{if(!e||!e.maxAge&&!r[zt])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[zt]&&t>r[zt]},tn=r=>{if(r[_t]>r[Gt])for(let e=r[de].tail;r[_t]>r[Gt]&&e!==null;){let t=e.prev;vr(r,e),e=t}},vr=(r,e)=>{if(e){let t=e.value;r[vt]&&r[vt](t.key,t.value),r[_t]-=t.length,r[Je].delete(t.key),r[de].removeNode(e)}},ri=class{constructor(e,t,n,s,i){this.key=e,this.value=t,this.length=n,this.now=s,this.maxAge=i||0}},Kc=(r,e,t,n)=>{let s=t.value;ns(r,s)&&(vr(r,t),r[rn]||(s=void 0)),s&&e.call(n,s.value,s.key,r)};Wc.exports=ti});var ze=_((pw,Qc)=>{var Kt=class{constructor(e,t){if(t=jp(t),e instanceof Kt)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Kt(e.raw,t);if(e instanceof ni)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Yc(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Fp(s[0])){this.set=[s];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,s=Jc.get(n);if(s)return s;let i=this.options.loose,a=i?Re[Ee.HYPHENRANGELOOSE]:Re[Ee.HYPHENRANGE];e=e.replace(a,Jp(this.options.includePrerelease)),ae("hyphen replace",e),e=e.replace(Re[Ee.COMPARATORTRIM],xp),ae("comparator trim",e),e=e.replace(Re[Ee.TILDETRIM],Lp),e=e.replace(Re[Ee.CARETTRIM],Mp),e=e.split(/\s+/).join(" ");let c=e.split(" ").map(d=>Vp(d,this.options)).join(" ").split(/\s+/).map(d=>Bp(d,this.options));i&&(c=c.filter(d=>(ae("loose invalid filter",d,this.options),!!d.match(Re[Ee.COMPARATORLOOSE])))),ae("range list",c);let u=new Map,o=c.map(d=>new ni(d,this.options));for(let d of o){if(Yc(d))return[d];u.set(d.value,d)}u.size>1&&u.has("")&&u.delete("");let l=[...u.values()];return Jc.set(n,l),l}intersects(e,t){if(!(e instanceof Kt))throw new TypeError("a Range is required");return this.set.some(n=>Zc(n,t)&&e.set.some(s=>Zc(s,t)&&n.every(i=>s.every(a=>i.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new kp(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(Yp(this.set[t],e,this.options))return!0;return!1}};Qc.exports=Kt;var Dp=Bc(),Jc=new Dp({max:1e3}),jp=Qr(),ni=nn(),ae=Zr(),kp=ve(),{re:Re,t:Ee,comparatorTrimReplace:xp,tildeTrimReplace:Lp,caretTrimReplace:Mp}=Vt(),Yc=r=>r.value==="<0.0.0-0",Fp=r=>r.value==="",Zc=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(i=>s.intersects(i,e)),s=n.pop();return t},Vp=(r,e)=>(ae("comp",r,e),r=Gp(r,e),ae("caret",r),r=Hp(r,e),ae("tildes",r),r=Kp(r,e),ae("xrange",r),r=Wp(r,e),ae("stars",r),r),we=r=>!r||r.toLowerCase()==="x"||r==="*",Hp=(r,e)=>r.trim().split(/\s+/).map(t=>Up(t,e)).join(" "),Up=(r,e)=>{let t=e.loose?Re[Ee.TILDELOOSE]:Re[Ee.TILDE];return r.replace(t,(n,s,i,a,c)=>{ae("tilde",r,n,s,i,a,c);let u;return we(s)?u="":we(i)?u=`>=${s}.0.0 <${+s+1}.0.0-0`:we(a)?u=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:c?(ae("replaceTilde pr",c),u=`>=${s}.${i}.${a}-${c} <${s}.${+i+1}.0-0`):u=`>=${s}.${i}.${a} <${s}.${+i+1}.0-0`,ae("tilde return",u),u})},Gp=(r,e)=>r.trim().split(/\s+/).map(t=>zp(t,e)).join(" "),zp=(r,e)=>{ae("caret",r,e);let t=e.loose?Re[Ee.CARETLOOSE]:Re[Ee.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,a,c,u)=>{ae("caret",r,s,i,a,c,u);let o;return we(i)?o="":we(a)?o=`>=${i}.0.0${n} <${+i+1}.0.0-0`:we(c)?i==="0"?o=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.0${n} <${+i+1}.0.0-0`:u?(ae("replaceCaret pr",u),i==="0"?a==="0"?o=`>=${i}.${a}.${c}-${u} <${i}.${a}.${+c+1}-0`:o=`>=${i}.${a}.${c}-${u} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${c}-${u} <${+i+1}.0.0-0`):(ae("no pr"),i==="0"?a==="0"?o=`>=${i}.${a}.${c}${n} <${i}.${a}.${+c+1}-0`:o=`>=${i}.${a}.${c}${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${c} <${+i+1}.0.0-0`),ae("caret return",o),o})},Kp=(r,e)=>(ae("replaceXRanges",r,e),r.split(/\s+/).map(t=>Xp(t,e)).join(" ")),Xp=(r,e)=>{r=r.trim();let t=e.loose?Re[Ee.XRANGELOOSE]:Re[Ee.XRANGE];return r.replace(t,(n,s,i,a,c,u)=>{ae("xRange",r,n,s,i,a,c,u);let o=we(i),l=o||we(a),d=l||we(c),y=d;return s==="="&&y&&(s=""),u=e.includePrerelease?"-0":"",o?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&y?(l&&(a=0),c=0,s===">"?(s=">=",l?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",l?i=+i+1:a=+a+1),s==="<"&&(u="-0"),n=`${s+i}.${a}.${c}${u}`):l?n=`>=${i}.0.0${u} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${u} <${i}.${+a+1}.0-0`),ae("xRange return",n),n})},Wp=(r,e)=>(ae("replaceStars",r,e),r.trim().replace(Re[Ee.STAR],"")),Bp=(r,e)=>(ae("replaceGTE0",r,e),r.trim().replace(Re[e.includePrerelease?Ee.GTE0PRE:Ee.GTE0],"")),Jp=r=>(e,t,n,s,i,a,c,u,o,l,d,y,m)=>(we(n)?t="":we(s)?t=`>=${n}.0.0${r?"-0":""}`:we(i)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,we(o)?u="":we(l)?u=`<${+o+1}.0.0-0`:we(d)?u=`<${o}.${+l+1}.0-0`:y?u=`<=${o}.${l}.${d}-${y}`:r?u=`<${o}.${l}.${+d+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),Yp=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(ae(r[n].semver),r[n].semver!==ni.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var nn=_((mw,su)=>{var sn=Symbol("SemVer ANY"),_r=class{static get ANY(){return sn}constructor(e,t){if(t=Zp(t),e instanceof _r){if(e.loose===!!t.loose)return e;e=e.value}ii("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===sn?this.value="":this.value=this.operator+this.semver.version,ii("comp",this)}parse(e){let t=this.options.loose?eu[tu.COMPARATORLOOSE]:eu[tu.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new ru(n[2],this.options.loose):this.semver=sn}toString(){return this.value}test(e){if(ii("Comparator.test",e,this.options.loose),this.semver===sn||e===sn)return!0;if(typeof e=="string")try{e=new ru(e,this.options)}catch{return!1}return si(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof _r))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new nu(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new nu(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),c=si(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=si(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||s||i&&a||c||u}};su.exports=_r;var Zp=Qr(),{re:eu,t:tu}=Vt(),si=Zs(),ii=Zr(),ru=ve(),nu=ze()});var an=_((gw,iu)=>{var Qp=ze(),em=(r,e,t)=>{try{e=new Qp(e,t)}catch{return!1}return e.test(r)};iu.exports=em});var ou=_((vw,au)=>{var tm=ze(),rm=(r,e)=>new tm(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));au.exports=rm});var uu=_((_w,cu)=>{var nm=ve(),sm=ze(),im=(r,e,t)=>{let n=null,s=null,i=null;try{i=new sm(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new nm(n,t))}),n};cu.exports=im});var fu=_((yw,lu)=>{var am=ve(),om=ze(),cm=(r,e,t)=>{let n=null,s=null,i=null;try{i=new om(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new am(n,t))}),n};lu.exports=cm});var pu=_(($w,hu)=>{var ai=ve(),um=ze(),du=en(),lm=(r,e)=>{r=new um(r,e);let t=new ai("0.0.0");if(r.test(t)||(t=new ai("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(a=>{let c=new ai(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!i||du(c,i))&&(i=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||du(t,i))&&(t=i)}return t&&r.test(t)?t:null};hu.exports=lm});var gu=_((Ew,mu)=>{var fm=ze(),dm=(r,e)=>{try{return new fm(r,e).range||"*"}catch{return null}};mu.exports=dm});var ss=_((ww,$u)=>{var hm=ve(),yu=nn(),{ANY:pm}=yu,mm=ze(),gm=an(),vu=en(),_u=Zn(),vm=es(),_m=Qn(),ym=(r,e,t,n)=>{r=new hm(r,n),e=new mm(e,n);let s,i,a,c,u;switch(t){case">":s=vu,i=vm,a=_u,c=">",u=">=";break;case"<":s=_u,i=_m,a=vu,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(gm(r,e,n))return!1;for(let o=0;o<e.set.length;++o){let l=e.set[o],d=null,y=null;if(l.forEach(m=>{m.semver===pm&&(m=new yu(">=0.0.0")),d=d||m,y=y||m,s(m.semver,d.semver,n)?d=m:a(m.semver,y.semver,n)&&(y=m)}),d.operator===c||d.operator===u||(!y.operator||y.operator===c)&&i(r,y.semver))return!1;if(y.operator===u&&a(r,y.semver))return!1}return!0};$u.exports=ym});var wu=_((bw,Eu)=>{var $m=ss(),Em=(r,e,t)=>$m(r,e,">",t);Eu.exports=Em});var Su=_((Sw,bu)=>{var wm=ss(),bm=(r,e,t)=>wm(r,e,"<",t);bu.exports=bm});var Ru=_((Ow,Pu)=>{var Ou=ze(),Sm=(r,e,t)=>(r=new Ou(r,t),e=new Ou(e,t),r.intersects(e));Pu.exports=Sm});var Nu=_((Pw,Cu)=>{var Om=an(),Pm=Ge();Cu.exports=(r,e,t)=>{let n=[],s=null,i=null,a=r.sort((l,d)=>Pm(l,d,t));for(let l of a)Om(l,e,t)?(i=l,s||(s=l)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let c=[];for(let[l,d]of n)l===d?c.push(l):!d&&l===a[0]?c.push("*"):d?l===a[0]?c.push(`<=${d}`):c.push(`${l} - ${d}`):c.push(`>=${l}`);let u=c.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return u.length<o.length?u:e}});var Du=_((Rw,qu)=>{var Iu=ze(),is=nn(),{ANY:oi}=is,on=an(),ci=Ge(),Rm=(r,e,t={})=>{if(r===e)return!0;r=new Iu(r,t),e=new Iu(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let a=Cm(s,i,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},Cm=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===oi){if(e.length===1&&e[0].semver===oi)return!0;t.includePrerelease?r=[new is(">=0.0.0-0")]:r=[new is(">=0.0.0")]}if(e.length===1&&e[0].semver===oi){if(t.includePrerelease)return!0;e=[new is(">=0.0.0")]}let n=new Set,s,i;for(let m of r)m.operator===">"||m.operator===">="?s=Tu(s,m,t):m.operator==="<"||m.operator==="<="?i=Au(i,m,t):n.add(m.semver);if(n.size>1)return null;let a;if(s&&i){if(a=ci(s.semver,i.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let m of n){if(s&&!on(m,String(s),t)||i&&!on(m,String(i),t))return null;for(let $ of e)if(!on(m,String($),t))return!1;return!0}let c,u,o,l,d=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,y=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let m of e){if(l=l||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(y&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===y.major&&m.semver.minor===y.minor&&m.semver.patch===y.patch&&(y=!1),m.operator===">"||m.operator===">="){if(c=Tu(s,m,t),c===m&&c!==s)return!1}else if(s.operator===">="&&!on(s.semver,String(m),t))return!1}if(i){if(d&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===d.major&&m.semver.minor===d.minor&&m.semver.patch===d.patch&&(d=!1),m.operator==="<"||m.operator==="<="){if(u=Au(i,m,t),u===m&&u!==i)return!1}else if(i.operator==="<="&&!on(i.semver,String(m),t))return!1}if(!m.operator&&(i||s)&&a!==0)return!1}return!(s&&o&&!i&&a!==0||i&&l&&!s&&a!==0||y||d)},Tu=(r,e,t)=>{if(!r)return e;let n=ci(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Au=(r,e,t)=>{if(!r)return e;let n=ci(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};qu.exports=Rm});var ku=_((Cw,ju)=>{var ui=Vt();ju.exports={re:ui.re,src:ui.src,tokens:ui.t,SEMVER_SPEC_VERSION:Yr().SEMVER_SPEC_VERSION,SemVer:ve(),compareIdentifiers:Xn().compareIdentifiers,rcompareIdentifiers:Xn().rcompareIdentifiers,parse:Ht(),valid:nc(),clean:ic(),inc:cc(),diff:pc(),major:gc(),minor:_c(),patch:$c(),prerelease:wc(),compare:Ge(),rcompare:Sc(),compareLoose:Pc(),compareBuild:Yn(),sort:Ic(),rsort:Ac(),gt:en(),lt:Zn(),eq:Jn(),neq:Ys(),gte:Qn(),lte:es(),cmp:Zs(),coerce:Fc(),Comparator:nn(),Range:ze(),satisfies:an(),toComparators:ou(),maxSatisfying:uu(),minSatisfying:fu(),minVersion:pu(),validRange:gu(),outside:ss(),gtr:wu(),ltr:Su(),intersects:Ru(),simplifyRange:Nu(),subset:Du()}});var yt=_(ke=>{"use strict";var Nm=ke&&ke.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Im=ke&&ke.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Tm=ke&&ke.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Nm(e,r,t);return Im(e,r),e},xu=ke&&ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ke,"__esModule",{value:!0});ke.getCoreVersion=void 0;var Lu=xu(require("path")),Mu=xu(require("fs")),li=Tm(require("@serverless-devs/core")),Am=ku(),Fu=Lu.default.join(li.getRootHome(),"cache","core"),fi=Lu.default.join(Fu,"package.json");function qm(){if(Mu.default.existsSync(fi)){var r=require("@serverless-devs/core/package.json").version,e=Vu();return Am.gt(e,r)?require(Fu):li}return li}function Vu(){return Mu.default.existsSync(fi)?require(fi).version:void 0}ke.getCoreVersion=Vu;ke.default=qm()});var pi=_(Ce=>{"use strict";var Dm=Ce&&Ce.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},jm=Ce&&Ce.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Hu=Ce&&Ce.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.handlerProfileFile=Ce.getConfig=Ce.setConfig=void 0;var Uu=Hu(require("path")),hi=Hu(yt()),ot=hi.default.fse,as=hi.default.jsyaml,di=hi.default.getRootHome;function km(r){var e=zu();ot.writeFileSync(e,as.dump(r))}function Gu(){var r=zu();if(!ot.existsSync(r))return{};try{var e=as.load(ot.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function zu(){var r=Uu.default.join(di(),"set-config.yml");return ot.existsSync(r)||ot.createFileSync(r),r}function xm(r,e){var t=Gu();t[r]=e,km(t)}Ce.setConfig=xm;function Lm(r,e){var t=Gu();return t[r]||e}Ce.getConfig=Lm;function Mm(r){return Dm(this,void 0,void 0,function(){var e,t,n,s,i,a,c;return jm(this,function(u){switch(u.label){case 0:if(e=r.filePath||"set-config.yml",t=Uu.default.join(di(),e),n=ot.existsSync(t),s={},n)return[3,5];i=di(),u.label=1;case 1:return u.trys.push([1,2,,4]),ot.statSync(i),[3,4];case 2:return a=u.sent(),[4,ot.mkdirSync(i)];case 3:return u.sent(),[3,4];case 4:return[3,6];case 5:try{s=as.load(ot.readFileSync(t,"utf8"))||{}}catch(o){throw o}u.label=6;case 6:return r.read?[2,s]:(c=r.configKey||"",s[c]=r.data,[4,ot.writeFileSync(t,as.dump(s))]);case 7:return u.sent(),[2,s]}})})}Ce.handlerProfileFile=Mm});var os=_(cn=>{"use strict";var Fm=cn&&cn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cn,"__esModule",{value:!0});var Vm=Fm(yt()),Hm=Vm.default.Logger,mi=new Hm("S-CLI");mi.success=function(r){return mi.log(r,"green")};cn.default=mi});var Ku=_((Aw,Um)=>{Um.exports={name:"@serverless-devs/s",version:"2.1.2-beta.2",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"jest test/special-command.test",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.0.0","@types/jest":"^27.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8",open:"^8.4.0","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta","@serverless-devs/ui":"beta"}}});var vi=_(N=>{"use strict";var Gm=N&&N.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),zm=N&&N.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Km=N&&N.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Gm(e,r,t);return zm(e,r),e},$r=N&&N.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},Er=N&&N.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},cs=N&&N.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(N,"__esModule",{value:!0});N.specifyServiceHelp=N.getTempCommandStr=N.emoji=N.mark=N.replaceTemplate=N.replaceFun=N.getLang=N.printn=N.getFolderSize=N.getVersion=N.aiRequest=N.getCredentialWithAll=N.getCredentialWithExisted=N.getProcessArgv=N.bgRed=N.yellow=N.red=void 0;var Xm=cs(require("path")),un=cs(require("fs")),Wm=cs(require("os")),be=Km(yt()),Bm=pi(),yr=cs(os()),Xu=Ku(),wr=be.default.colors,Jm=be.default.got,Ym=be.default.isDocker,Zm=be.default.isCiCdEnv,Rt=be.default.lodash,Wu=be.default.publishHelp,Qm=Rt.get,eg=Rt.trim,tg=Rt.assign,rg=Rt.filter,Bu=Rt.includes,ng=Rt.omit,sg=Rt.isPlainObject,ig=Rt.isEmpty,ag=wr.underline,og=wr.bold;N.red=wr.hex("#fd5750");N.yellow=wr.hex("#F3F99D");N.bgRed=wr.hex("#000").bgHex("#fd5750");var cg=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=be.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),tg({},t,{noHelpArgv:process.argv.slice(0,2).concat(rg(t._argsObj,function(n){return!Bu(["-h","--help"],n)}))})}catch{return{}}};N.getProcessArgv=cg;var ug=function(r){return $r(void 0,void 0,void 0,function(){var e,t;return Er(this,function(n){switch(n.label){case 0:return[4,be.default.getCredentialAliasList()];case 1:return e=n.sent(),Bu(e,r)?[4,be.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};N.getCredentialWithExisted=ug;var lg=function(){return $r(void 0,void 0,void 0,function(){var r,e,t,n,s,i;return Er(this,function(a){switch(a.label){case 0:return[4,be.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(s=n[t],[4,be.default.getCredential(s)]):[3,5];case 3:i=a.sent(),e[i.Alias]=ng(i,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};N.getCredentialWithAll=lg;var fg=function(r,e){return e===void 0&&(e="unknow"),$r(void 0,void 0,void 0,function(){var t,n,s,i;return Er(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,Bm.getConfig)("analysis"),t!=="enable"?[2]:Ym()||Zm()?[2]:[4,Jm("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return n=a.sent(),s=Qm(n.body,"shorturl"),s&&yr.default.log(`AI Tips:
16
- You can try to solve the problem through: `.concat(wr.underline(s),`
17
- `)),[3,3];case 2:return i=a.sent(),[3,3];case 3:return[2]}})})};N.aiRequest=fg;function dg(){var r=(0,be.getCoreVersion)(),e=["".concat(Xu.name,": ").concat(Xu.version),r?"core: ".concat(r):void 0,"s-home: ".concat(be.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}N.getVersion=dg;function hg(r){return $r(this,void 0,void 0,function(){function e(s){return $r(this,void 0,void 0,function(){var i,a;return Er(this,function(c){switch(c.label){case 0:return i=un.default.lstatSync(s),typeof i!="object"?[2]:(t.set(i.ino,i.size),i.isDirectory()?(a=un.default.readdirSync(s),typeof a!="object"?[2]:[4,Promise.all(a.map(function(u){return e(Xm.default.join(s,u))}))]):[3,2]);case 1:c.sent(),c.label=2;case 2:return[2]}})})}var t,n;return Er(this,function(s){switch(s.label){case 0:return t=new Map,[4,e(r)];case 1:return s.sent(),n=Array.from(t.values()).reduce(function(i,a){return i+a},0),[2,n]}})})}N.getFolderSize=hg;function pg(r,e){e===void 0&&(e=" ");for(var t="",n=0;n<r;n++)t=t+e;return t}N.printn=pg;function mg(){return"en"}N.getLang=mg;function Ju(r,e){var t=/\{\{(.*?)\}\}/g,n=r.match(t);if(n)for(var s=0;s<n.length;s++){var i=n[s].replace(/{{|}}/g,""),a=eg(i.split("|")[0]);e[a]&&(r=r.replace(n[s],e[a]))}return r}N.replaceFun=Ju;function gg(r,e){r.forEach(function(t){if(un.default.existsSync(t)){var n=un.default.readFileSync(t,"utf-8"),s=Ju(n,e);un.default.writeFileSync(t,s,"utf-8")}})}N.replaceTemplate=gg;function vg(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}N.mark=vg;function gi(r,e){return Wm.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}N.emoji=gi;function Yu(r,e){var t=r.length,n=new Array(e-t).fill(" ");return"".concat(r).concat(n.join("")," : ")}N.getTempCommandStr=Yu;function _g(r){return $r(this,void 0,void 0,function(){var e,t,n,s,i,c,a,c;return Er(this,function(u){switch(u.label){case 0:return[4,be.default.getYamlContent(r)];case 1:if(e=u.sent(),yr.default.log(`
18
- `.concat(gi("\u{1F680}")," ").concat(e.Name,"@").concat(e.Version,": ").concat(e.Description,`
19
- `)),t=e.Commands,t){n=Wu.maxLen(t),s=[],i={};for(c in t)a=t[c],sg(a)?s.push(Wu.helpInfo(a,ag(og(c)),n,4)):i[c]=a;if(s.length>0&&yr.default.log(s.join(`
20
- `)),!ig(i)){for(c in i)yr.default.log(" ".concat(Yu(c,n)," ").concat(i[c]));yr.default.log("")}yr.default.log(e.HomePage?" ".concat(gi("\u{1F9ED}")," ").concat(be.default.makeUnderLine("More information: "+e.HomePage)," ")+`
21
- `:"")}return[2]}})})}N.specifyServiceHelp=_g});var Zu=_(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.default={clean_up_the_environment:"\u6E05\u7406\u73AF\u5883",display_help_for_command:"\u663E\u793A\u547D\u4EE4\u5E2E\u52A9",remove_components:"\u5220\u9664\u7EC4\u4EF6",delete_the_file_under_the_cache:"\u5220\u9664\u7F13\u5B58\u91CC\u7684\u7684<dirname>\u6587\u4EF6",record_your_log_information:"\u662F\u5426\u8BB0\u5F55\u60A8\u7684\u65E5\u5FD7\u4FE1\u606F\uFF1F",init_pproject_deploy_tip:"\u662F\u5426\u7ACB\u5373\u90E8\u7F72\u8BE5\u9879\u76EE\uFF1F",tip_for_a_serverless_project:"\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u4E0B\u5DF2\u5B58\u5728\u4E00\u4E2AServerless-Devs\u9879\u76EE\uFF0C\u8BF7\u901A\u8FC7 's deploy' \u8FDB\u884C\u90E8\u7F72\u6216\u901A\u8FC7 's -h' \u83B7\u53D6\u66F4\u591A\u4FE1\u606F",create_a_new_project:"\u672A\u68C0\u6D4B\u5230 Serverless-Devs \u9879\u76EE\uFF0C\u662F\u5426\u65B0\u5EFA\u4E00\u4E2A\u9879\u76EE\uFF1F",en:"English (en)",zh:"\u4E2D\u6587 (zh)",select_current_language:"\u8BF7\u9009\u62E9\u5F53\u524D\u8BED\u8A00","app-tip":"\u8BF7\u9009\u62E9\u60A8\u5E0C\u671B\u521B\u5EFA\u7684 Serverless-Devs \u5E94\u7528","template-tip":"\u8BF7\u9009\u62E9\u60A8\u559C\u6B22\u7684\u6A21\u7248","fc-runtime-starter":"fc-runtime-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A FC \u51FD\u6570","fc-custom-container-stater":"fc-custom-container-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A custom-container \u5E94\u7528",web:"web-framework-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Web \u6846\u67B6","static-site":"static-website-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","best-practice":"serverless-best-practice - \u5FEB\u901F\u4F53\u9A8C Serverless \u6700\u4F73\u5B9E\u8DF5","devs-template":"Serverless Devs \u5F00\u53D1\u6A21\u677F","fc-http-nodejs":"fc-http-nodejs - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nodejs12 \u51FD\u6570","fc-http-python":"fc-http-python - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A python3 \u51FD\u6570","fc-http-java":"fc-http-java - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A java8 \u51FD\u6570","fc-custom-container-event-python3":"fc-custom-container-event-python3 - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 python3 \u5E94\u7528","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 cpp \u5E94\u7528","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 springboot \u5E94\u7528","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 aspdotnetcore \u5E94\u7528","express-starter":"express-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A express \u57FA\u7840\u5E94\u7528","koa-starter":"koa-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A koa \u57FA\u7840\u5E94\u7528","nuxtjs-starter":"nuxtjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nuxtjs \u57FA\u7840\u5E94\u7528","eggjs-starter":"eggjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A eggjs \u57FA\u7840\u5E94\u7528","flask-starter":"flask-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A flask \u57FA\u7840\u5E94\u7528","SpringBoot-starter":"SpringBoot-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A SpringBoot \u57FA\u7840\u5E94\u7528","Zblog-starter":"Zblog-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Zblog \u57FA\u7840\u5E94\u7528","website-starter":"website-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","react-starter":"react-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A React.js \u5E94\u7528","vue-starter":"vue-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Vue.js \u5E94\u7528",puppeteer:"puppeteer - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E puppeteer \u622A\u56FE\u7684 Web \u5E94\u7528",ffmpeg:"ffmpeg - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E ffmpeg \u5B9E\u73B0\u97F3\u89C6\u9891\u5904\u7406\u5E94\u7528",pdf2Img:"pdf2Img - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A pdf \u8F6C\u56FE\u7247\u5E94\u7528",tensorflow:"tensorflow - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A tensorflow \u5E94\u7528",todoList:"todoList - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E nodejs \u7684\u7F51\u9875 TodoList \u5E94\u7528"}});var Qu=_(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.default={clean_up_the_environment:"Clean up the environment",display_help_for_command:"Display help for command",remove_components:"Remove component (like: fc, fc@0.0.1)",delete_the_file_under_the_cache:"Delete the <dirname> file in the cache",record_your_log_information:"Do you record your log information?",init_pproject_deploy_tip:"Do you want to deploy the project immediately?",tip_for_a_serverless_project:"A Serverless-Devs project is detected in the current directory, please deploy via 's deploy' or get more information via 's -h'",create_a_new_project:"No Serverless-Devs project is currently detected. Do you want to create a new project?",en:"English (en)",zh:"Chinese (zh)",select_current_language:"Please select current language","app-tip":"Hello, serverlesser. Which template do you like?","template-tip":"Which template do you like?","fc-runtime-starter":"fc-runtime-starter - Deploy FC function in 5 minutes","fc-custom-container-stater":"fc-custom-container-stater - Deploy FC function with custom-container",web:"web-framework-stater-Quickly deploy a web framework","static-site":"static-website-stater-Quickly deploy a static website","best-practice":"serverless-best-practice-Quickly experience serverless best practices","devs-template":"Serverless Develop scaffold","fc-http-nodejs":"fc-http-nodejs - Deploy FC nodejs12 runtime function","fc-http-python":"fc-http-python - Deploy FC python3 runtime function","fc-http-java":"fc-http-java - Deploy FC java8 runtime function","fc-custom-container-event-python3":"fc-custom-container-event-python3 - Deploy python3 event-triggered application","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - Deploy cpp event-triggered application","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - Deploy springboot HTTP Request-triggered application","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - Deploy dotnetcore HTTP Request-triggered application","express-starter":"express-starter - Deploy express application","koa-starter":"koa-starter - Deploy koa application","nuxtjs-starter":"nuxtjs-starter - Deploy nuxtjs application","eggjs-starter":"eggjs-starter - Deploy eggjs application","flask-starter":"flask-starter - Deploy flask application","SpringBoot-starter":"SpringBoot-starter - Deploy SpringBoot application","Zblog-starter":"Zblog-starter - Deploy Zblog application","website-starter":"website-starter - Deploy static website","react-starter":"react-starter - Deploy React.js application","vue-starter":"vue-starter - Deploy Vue.js application",puppeteer:"puppeteer - Deploy screenshot application base on puppeteer + fc",ffmpeg:"ffmpeg - Deploy audio and video processing application base on ffmpeg + fc",pdf2Img:"pdf2Img - Deploy pdf to images application",tensorflow:"tensorflow - Deploy tensorflow application",todoList:"todoList - Deploy todoList application"}});var Ei=_(ln=>{"use strict";var el=ln&&ln.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ln,"__esModule",{value:!0});var yg=vi(),$g=el(Zu()),Eg=el(Qu()),$i={en:Eg.default,zh:$g.default},wg=function(r){var e=(0,yg.getLang)(),t=$i[e]?$i[e][r]:$i.en[r];return t||r};ln.default=wg});var fn=_(_e=>{"use strict";var bg=_e&&_e.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),tl=_e&&_e.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&bg(e,r,t)},wi=_e&&_e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_e,"__esModule",{value:!0});_e.registerCommandChecker=_e.i18n=_e.logger=void 0;var Sg=wi(os());tl(vi(),_e);tl(pi(),_e);var Og=os();Object.defineProperty(_e,"logger",{enumerable:!0,get:function(){return wi(Og).default}});var Pg=Ei();Object.defineProperty(_e,"i18n",{enumerable:!0,get:function(){return wi(Pg).default}});function Rg(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(Sg.default.error(" error: unknown command ".concat(e[0])),r.help())})}_e.registerCommandChecker=Rg});var pn=_(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.regexpCode=U.getEsmExportName=U.getProperty=U.safeStringify=U.stringify=U.strConcat=U.addCodeArg=U.str=U._=U.nil=U._Code=U.Name=U.IDENTIFIER=U._CodeOrName=void 0;var dn=class{};U._CodeOrName=dn;U.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Xt=class extends dn{constructor(e){if(super(),!U.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};U.Name=Xt;var Ke=class extends dn{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof Xt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};U._Code=Ke;U.nil=new Ke("");function rl(r,...e){let t=[r[0]],n=0;for(;n<e.length;)Si(t,e[n]),t.push(r[++n]);return new Ke(t)}U._=rl;var bi=new Ke("+");function nl(r,...e){let t=[hn(r[0])],n=0;for(;n<e.length;)t.push(bi),Si(t,e[n]),t.push(bi,hn(r[++n]));return Cg(t),new Ke(t)}U.str=nl;function Si(r,e){e instanceof Ke?r.push(...e._items):e instanceof Xt?r.push(e):r.push(Tg(e))}U.addCodeArg=Si;function Cg(r){let e=1;for(;e<r.length-1;){if(r[e]===bi){let t=Ng(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function Ng(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof Xt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof Xt))return`"${r}${e.slice(1)}`}function Ig(r,e){return e.emptyStr()?r:r.emptyStr()?e:nl`${r}${e}`}U.strConcat=Ig;function Tg(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:hn(Array.isArray(r)?r.join(","):r)}function Ag(r){return new Ke(hn(r))}U.stringify=Ag;function hn(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}U.safeStringify=hn;function qg(r){return typeof r=="string"&&U.IDENTIFIER.test(r)?new Ke(`.${r}`):rl`[${r}]`}U.getProperty=qg;function Dg(r){if(typeof r=="string"&&U.IDENTIFIER.test(r))return new Ke(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}U.getEsmExportName=Dg;function jg(r){return new Ke(r.toString())}U.regexpCode=jg});var Ci=_(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.ValueScope=Se.ValueScopeName=Se.Scope=Se.varKinds=Se.UsedValueState=void 0;var Ne=pn(),Oi=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Pi;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(Pi=Se.UsedValueState||(Se.UsedValueState={}));Se.varKinds={const:new Ne.Name("const"),let:new Ne.Name("let"),var:new Ne.Name("var")};var us=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Ne.Name?e:this.name(e)}name(e){return new Ne.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Se.Scope=us;var ls=class extends Ne.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,Ne._)`.${new Ne.Name(t)}[${n}]`}};Se.ValueScopeName=ls;var kg=(0,Ne._)`\n`,Ri=class extends us{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=Ue(oe({},e),{_n:e.lines?kg:Ne.nil})}get(){return this._scope}name(e){return new ls(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:i}=s,a=(n=t.key)!==null&&n!==void 0?n:t.ref,c=this._values[i];if(c){let l=c.get(a);if(l)return l}else c=this._values[i]=new Map;c.set(a,s);let u=this._scope[i]||(this._scope[i]=[]),o=u.length;return u[o]=t.ref,s.setValue(t,{property:i,itemIndex:o}),s}getValue(e,t){let n=this._values[e];if(!!n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ne._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},t,n)}_reduceValues(e,t,n={},s){let i=Ne.nil;for(let a in e){let c=e[a];if(!c)continue;let u=n[a]=n[a]||new Map;c.forEach(o=>{if(u.has(o))return;u.set(o,Pi.Started);let l=t(o);if(l){let d=this.opts.es5?Se.varKinds.var:Se.varKinds.const;i=(0,Ne._)`${i}${d} ${o} = ${l};${this.opts._n}`}else if(l=s==null?void 0:s(o))i=(0,Ne._)`${i}${l}${this.opts._n}`;else throw new Oi(o);u.set(o,Pi.Completed)})}return i}};Se.ValueScope=Ri});var L=_(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.or=k.and=k.not=k.CodeGen=k.operators=k.varKinds=k.ValueScopeName=k.ValueScope=k.Scope=k.Name=k.regexpCode=k.stringify=k.getProperty=k.nil=k.strConcat=k.str=k._=void 0;var M=pn(),Ye=Ci(),Ct=pn();Object.defineProperty(k,"_",{enumerable:!0,get:function(){return Ct._}});Object.defineProperty(k,"str",{enumerable:!0,get:function(){return Ct.str}});Object.defineProperty(k,"strConcat",{enumerable:!0,get:function(){return Ct.strConcat}});Object.defineProperty(k,"nil",{enumerable:!0,get:function(){return Ct.nil}});Object.defineProperty(k,"getProperty",{enumerable:!0,get:function(){return Ct.getProperty}});Object.defineProperty(k,"stringify",{enumerable:!0,get:function(){return Ct.stringify}});Object.defineProperty(k,"regexpCode",{enumerable:!0,get:function(){return Ct.regexpCode}});Object.defineProperty(k,"Name",{enumerable:!0,get:function(){return Ct.Name}});var ps=Ci();Object.defineProperty(k,"Scope",{enumerable:!0,get:function(){return ps.Scope}});Object.defineProperty(k,"ValueScope",{enumerable:!0,get:function(){return ps.ValueScope}});Object.defineProperty(k,"ValueScopeName",{enumerable:!0,get:function(){return ps.ValueScopeName}});Object.defineProperty(k,"varKinds",{enumerable:!0,get:function(){return ps.varKinds}});k.operators={GT:new M._Code(">"),GTE:new M._Code(">="),LT:new M._Code("<"),LTE:new M._Code("<="),EQ:new M._Code("==="),NEQ:new M._Code("!=="),NOT:new M._Code("!"),OR:new M._Code("||"),AND:new M._Code("&&"),ADD:new M._Code("+")};var $t=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Ni=class extends $t{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Ye.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+t}optimizeNames(e,t){if(!!e[this.name.str])return this.rhs&&(this.rhs=Sr(this.rhs,e,t)),this}get names(){return this.rhs instanceof M._CodeOrName?this.rhs.names:{}}},fs=class extends $t{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof M.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Sr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof M.Name?{}:oe({},this.lhs.names);return hs(e,this.rhs)}},Ii=class extends fs{constructor(e,t,n,s){super(e,n,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Ti=class extends $t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Ai=class extends $t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},qi=class extends $t{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Di=class extends $t{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=Sr(this.code,e,t),this}get names(){return this.code instanceof M._CodeOrName?this.code.names:{}}},mn=class extends $t{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,s=n.length;for(;s--;){let i=n[s];i.optimizeNames(e,t)||(xg(e,i.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Bt(e,t.names),{})}},Et=class extends mn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},ji=class extends mn{},br=class extends Et{};br.kind="else";var Ze=class extends Et{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new br(n):n}if(t)return e===!1?t instanceof Ze?t:t.nodes:this.nodes.length?this:new Ze(sl(e),t instanceof Ze?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=Sr(this.condition,e,t),this}get names(){let e=super.names;return hs(e,this.condition),this.else&&Bt(e,this.else.names),e}};Ze.kind="if";var Wt=class extends Et{};Wt.kind="for";var ki=class extends Wt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!!super.optimizeNames(e,t))return this.iteration=Sr(this.iteration,e,t),this}get names(){return Bt(super.names,this.iteration.names)}},xi=class extends Wt{constructor(e,t,n,s){super(),this.varKind=e,this.name=t,this.from=n,this.to=s}render(e){let t=e.es5?Ye.varKinds.var:this.varKind,{name:n,from:s,to:i}=this;return`for(${t} ${n}=${s}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){let e=hs(super.names,this.from);return hs(e,this.to)}},ds=class extends Wt{constructor(e,t,n,s){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!!super.optimizeNames(e,t))return this.iterable=Sr(this.iterable,e,t),this}get names(){return Bt(super.names,this.iterable.names)}},gn=class extends Et{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};gn.kind="func";var vn=class extends mn{render(e){return"return "+super.render(e)}};vn.kind="return";var Li=class extends Et{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,s;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(s=this.finally)===null||s===void 0||s.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Bt(e,this.catch.names),this.finally&&Bt(e,this.finally.names),e}},_n=class extends Et{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};_n.kind="catch";var yn=class extends Et{render(e){return"finally"+super.render(e)}};yn.kind="finally";var Mi=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ue(oe({},t),{_n:t.lines?`
22
- `:""}),this._extScope=e,this._scope=new Ye.Scope({parent:e}),this._nodes=[new ji]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,s){let i=this._scope.toName(t);return n!==void 0&&s&&(this._constants[i.str]=n),this._leafNode(new Ni(e,i,n)),i}const(e,t,n){return this._def(Ye.varKinds.const,e,t,n)}let(e,t,n){return this._def(Ye.varKinds.let,e,t,n)}var(e,t,n){return this._def(Ye.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new fs(e,t,n))}add(e,t){return this._leafNode(new Ii(e,k.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==M.nil&&this._leafNode(new Di(e)),this}object(...e){let t=["{"];for(let[n,s]of e)t.length>1&&t.push(","),t.push(n),(n!==s||this.opts.es5)&&(t.push(":"),(0,M.addCodeArg)(t,s));return t.push("}"),new M._Code(t)}if(e,t,n){if(this._blockNode(new Ze(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ze(e))}else(){return this._elseNode(new br)}endIf(){return this._endBlockNode(Ze,br)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new ki(e),t)}forRange(e,t,n,s,i=this.opts.es5?Ye.varKinds.var:Ye.varKinds.let){let a=this._scope.toName(e);return this._for(new xi(i,a,t,n),()=>s(a))}forOf(e,t,n,s=Ye.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let a=t instanceof M.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,M._)`${a}.length`,c=>{this.var(i,(0,M._)`${a}[${c}]`),n(i)})}return this._for(new ds("of",s,i,t),()=>n(i))}forIn(e,t,n,s=this.opts.es5?Ye.varKinds.var:Ye.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,M._)`Object.keys(${t})`,n);let i=this._scope.toName(e);return this._for(new ds("in",s,i,t),()=>n(i))}endFor(){return this._endBlockNode(Wt)}label(e){return this._leafNode(new Ti(e))}break(e){return this._leafNode(new Ai(e))}return(e){let t=new vn;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(vn)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let s=new Li;if(this._blockNode(s),this.code(e),t){let i=this.name("e");this._currNode=s.catch=new _n(i),t(i)}return n&&(this._currNode=s.finally=new yn,this.code(n)),this._endBlockNode(_n,yn)}throw(e){return this._leafNode(new qi(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=M.nil,n,s){return this._blockNode(new gn(e,t,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(gn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Ze))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};k.CodeGen=Mi;function Bt(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function hs(r,e){return e instanceof M._CodeOrName?Bt(r,e.names):r}function Sr(r,e,t){if(r instanceof M.Name)return n(r);if(!s(r))return r;return new M._Code(r._items.reduce((i,a)=>(a instanceof M.Name&&(a=n(a)),a instanceof M._Code?i.push(...a._items):i.push(a),i),[]));function n(i){let a=t[i.str];return a===void 0||e[i.str]!==1?i:(delete e[i.str],a)}function s(i){return i instanceof M._Code&&i._items.some(a=>a instanceof M.Name&&e[a.str]===1&&t[a.str]!==void 0)}}function xg(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function sl(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,M._)`!${Fi(r)}`}k.not=sl;var Lg=il(k.operators.AND);function Mg(...r){return r.reduce(Lg)}k.and=Mg;var Fg=il(k.operators.OR);function Vg(...r){return r.reduce(Fg)}k.or=Vg;function il(r){return(e,t)=>e===M.nil?t:t===M.nil?e:(0,M._)`${Fi(e)} ${r} ${Fi(t)}`}function Fi(r){return r instanceof M.Name?r:(0,M._)`(${r})`}});var G=_(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.checkStrictMode=x.getErrorPath=x.Type=x.useFunc=x.setEvaluated=x.evaluatedPropsToName=x.mergeEvaluated=x.eachItem=x.unescapeJsonPointer=x.escapeJsonPointer=x.escapeFragment=x.unescapeFragment=x.schemaRefOrVal=x.schemaHasRulesButRef=x.schemaHasRules=x.checkUnknownRules=x.alwaysValidSchema=x.toHash=void 0;var Z=L(),Hg=pn();function Ug(r){let e={};for(let t of r)e[t]=!0;return e}x.toHash=Ug;function Gg(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(cl(r,e),!ul(e,r.self.RULES.all))}x.alwaysValidSchema=Gg;function cl(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let s=n.RULES.keywords;for(let i in e)s[i]||hl(r,`unknown keyword: "${i}"`)}x.checkUnknownRules=cl;function ul(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}x.schemaHasRules=ul;function zg(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}x.schemaHasRulesButRef=zg;function Kg({topSchemaRef:r,schemaPath:e},t,n,s){if(!s){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Z._)`${t}`}return(0,Z._)`${r}${e}${(0,Z.getProperty)(n)}`}x.schemaRefOrVal=Kg;function Xg(r){return ll(decodeURIComponent(r))}x.unescapeFragment=Xg;function Wg(r){return encodeURIComponent(Vi(r))}x.escapeFragment=Wg;function Vi(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}x.escapeJsonPointer=Vi;function ll(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}x.unescapeJsonPointer=ll;function Bg(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}x.eachItem=Bg;function al({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(s,i,a,c)=>{let u=a===void 0?i:a instanceof Z.Name?(i instanceof Z.Name?r(s,i,a):e(s,i,a),a):i instanceof Z.Name?(e(s,a,i),i):t(i,a);return c===Z.Name&&!(u instanceof Z.Name)?n(s,u):u}}x.mergeEvaluated={props:al({mergeNames:(r,e,t)=>r.if((0,Z._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,Z._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,Z._)`${t} || {}`).code((0,Z._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,Z._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,Z._)`${t} || {}`),Hi(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:oe(oe({},r),e),resultToName:fl}),items:al({mergeNames:(r,e,t)=>r.if((0,Z._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,Z._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,Z._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,Z._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function fl(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,Z._)`{}`);return e!==void 0&&Hi(r,t,e),t}x.evaluatedPropsToName=fl;function Hi(r,e,t){Object.keys(t).forEach(n=>r.assign((0,Z._)`${e}${(0,Z.getProperty)(n)}`,!0))}x.setEvaluated=Hi;var ol={};function Jg(r,e){return r.scopeValue("func",{ref:e,code:ol[e.code]||(ol[e.code]=new Hg._Code(e.code))})}x.useFunc=Jg;var dl;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(dl=x.Type||(x.Type={}));function Yg(r,e,t){if(r instanceof Z.Name){let n=e===dl.Num;return t?n?(0,Z._)`"[" + ${r} + "]"`:(0,Z._)`"['" + ${r} + "']"`:n?(0,Z._)`"/" + ${r}`:(0,Z._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Z.getProperty)(r).toString():"/"+Vi(r)}x.getErrorPath=Yg;function hl(r,e,t=r.opts.strictSchema){if(!!t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}x.checkStrictMode=hl});var wt=_(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});var ye=L(),Zg={data:new ye.Name("data"),valCxt:new ye.Name("valCxt"),instancePath:new ye.Name("instancePath"),parentData:new ye.Name("parentData"),parentDataProperty:new ye.Name("parentDataProperty"),rootData:new ye.Name("rootData"),dynamicAnchors:new ye.Name("dynamicAnchors"),vErrors:new ye.Name("vErrors"),errors:new ye.Name("errors"),this:new ye.Name("this"),self:new ye.Name("self"),scope:new ye.Name("scope"),json:new ye.Name("json"),jsonPos:new ye.Name("jsonPos"),jsonLen:new ye.Name("jsonLen"),jsonPart:new ye.Name("jsonPart")};Ui.default=Zg});var $n=_($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.extendErrors=$e.resetErrorsCount=$e.reportExtraError=$e.reportError=$e.keyword$DataError=$e.keywordError=void 0;var V=L(),ms=G(),Oe=wt();$e.keywordError={message:({keyword:r})=>(0,V.str)`must pass "${r}" keyword validation`};$e.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,V.str)`"${r}" keyword must be ${e} ($data)`:(0,V.str)`"${r}" keyword is invalid ($data)`};function Qg(r,e=$e.keywordError,t,n){let{it:s}=r,{gen:i,compositeRule:a,allErrors:c}=s,u=gl(r,e,t);(n!=null?n:a||c)?pl(i,u):ml(s,(0,V._)`[${u}]`)}$e.reportError=Qg;function ev(r,e=$e.keywordError,t){let{it:n}=r,{gen:s,compositeRule:i,allErrors:a}=n,c=gl(r,e,t);pl(s,c),i||a||ml(n,Oe.default.vErrors)}$e.reportExtraError=ev;function tv(r,e){r.assign(Oe.default.errors,e),r.if((0,V._)`${Oe.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,V._)`${Oe.default.vErrors}.length`,e),()=>r.assign(Oe.default.vErrors,null)))}$e.resetErrorsCount=tv;function rv({gen:r,keyword:e,schemaValue:t,data:n,errsCount:s,it:i}){if(s===void 0)throw new Error("ajv implementation error");let a=r.name("err");r.forRange("i",s,Oe.default.errors,c=>{r.const(a,(0,V._)`${Oe.default.vErrors}[${c}]`),r.if((0,V._)`${a}.instancePath === undefined`,()=>r.assign((0,V._)`${a}.instancePath`,(0,V.strConcat)(Oe.default.instancePath,i.errorPath))),r.assign((0,V._)`${a}.schemaPath`,(0,V.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(r.assign((0,V._)`${a}.schema`,t),r.assign((0,V._)`${a}.data`,n))})}$e.extendErrors=rv;function pl(r,e){let t=r.const("err",e);r.if((0,V._)`${Oe.default.vErrors} === null`,()=>r.assign(Oe.default.vErrors,(0,V._)`[${t}]`),(0,V._)`${Oe.default.vErrors}.push(${t})`),r.code((0,V._)`${Oe.default.errors}++`)}function ml(r,e){let{gen:t,validateName:n,schemaEnv:s}=r;s.$async?t.throw((0,V._)`new ${r.ValidationError}(${e})`):(t.assign((0,V._)`${n}.errors`,e),t.return(!1))}var Jt={keyword:new V.Name("keyword"),schemaPath:new V.Name("schemaPath"),params:new V.Name("params"),propertyName:new V.Name("propertyName"),message:new V.Name("message"),schema:new V.Name("schema"),parentSchema:new V.Name("parentSchema")};function gl(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,V._)`{}`:nv(r,e,t)}function nv(r,e,t={}){let{gen:n,it:s}=r,i=[sv(s,t),iv(r,t)];return av(r,e,i),n.object(...i)}function sv({errorPath:r},{instancePath:e}){let t=e?(0,V.str)`${r}${(0,ms.getErrorPath)(e,ms.Type.Str)}`:r;return[Oe.default.instancePath,(0,V.strConcat)(Oe.default.instancePath,t)]}function iv({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let s=n?e:(0,V.str)`${e}/${r}`;return t&&(s=(0,V.str)`${s}${(0,ms.getErrorPath)(t,ms.Type.Str)}`),[Jt.schemaPath,s]}function av(r,{params:e,message:t},n){let{keyword:s,data:i,schemaValue:a,it:c}=r,{opts:u,propertyName:o,topSchemaRef:l,schemaPath:d}=c;n.push([Jt.keyword,s],[Jt.params,typeof e=="function"?e(r):e||(0,V._)`{}`]),u.messages&&n.push([Jt.message,typeof t=="function"?t(r):t]),u.verbose&&n.push([Jt.schema,a],[Jt.parentSchema,(0,V._)`${l}${d}`],[Oe.default.data,i]),o&&n.push([Jt.propertyName,o])}});var _l=_(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.boolOrEmptySchema=Or.topBoolOrEmptySchema=void 0;var ov=$n(),cv=L(),uv=wt(),lv={message:"boolean schema is false"};function fv(r){let{gen:e,schema:t,validateName:n}=r;t===!1?vl(r,!1):typeof t=="object"&&t.$async===!0?e.return(uv.default.data):(e.assign((0,cv._)`${n}.errors`,null),e.return(!0))}Or.topBoolOrEmptySchema=fv;function dv(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),vl(r)):t.var(e,!0)}Or.boolOrEmptySchema=dv;function vl(r,e){let{gen:t,data:n}=r,s={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,ov.reportError)(s,lv,void 0,e)}});var Gi=_(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.getRules=Pr.isJSONType=void 0;var hv=["string","number","integer","boolean","null","object","array"],pv=new Set(hv);function mv(r){return typeof r=="string"&&pv.has(r)}Pr.isJSONType=mv;function gv(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ue(oe({},r),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}Pr.getRules=gv});var zi=_(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.shouldUseRule=Nt.shouldUseGroup=Nt.schemaHasRulesForType=void 0;function vv({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&yl(r,n)}Nt.schemaHasRulesForType=vv;function yl(r,e){return e.rules.some(t=>$l(r,t))}Nt.shouldUseGroup=yl;function $l(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}Nt.shouldUseRule=$l});var wn=_(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.reportTypeError=he.checkDataTypes=he.checkDataType=he.coerceAndCheckDataType=he.getJSONTypes=he.getSchemaTypes=he.DataType=void 0;var _v=Gi(),yv=zi(),$v=$n(),q=L(),El=G(),En;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(En=he.DataType||(he.DataType={}));function Ev(r){let e=wl(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}he.getSchemaTypes=Ev;function wl(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(_v.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}he.getJSONTypes=wl;function wv(r,e){let{gen:t,data:n,opts:s}=r,i=bv(e,s.coerceTypes),a=e.length>0&&!(i.length===0&&e.length===1&&(0,yv.schemaHasRulesForType)(r,e[0]));if(a){let c=Xi(e,n,s.strictNumbers,En.Wrong);t.if(c,()=>{i.length?Sv(r,e,i):Wi(r)})}return a}he.coerceAndCheckDataType=wv;var bl=new Set(["string","number","integer","boolean","null"]);function bv(r,e){return e?r.filter(t=>bl.has(t)||e==="array"&&t==="array"):[]}function Sv(r,e,t){let{gen:n,data:s,opts:i}=r,a=n.let("dataType",(0,q._)`typeof ${s}`),c=n.let("coerced",(0,q._)`undefined`);i.coerceTypes==="array"&&n.if((0,q._)`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,q._)`${s}[0]`).assign(a,(0,q._)`typeof ${s}`).if(Xi(e,s,i.strictNumbers),()=>n.assign(c,s))),n.if((0,q._)`${c} !== undefined`);for(let o of t)(bl.has(o)||o==="array"&&i.coerceTypes==="array")&&u(o);n.else(),Wi(r),n.endIf(),n.if((0,q._)`${c} !== undefined`,()=>{n.assign(s,c),Ov(r,c)});function u(o){switch(o){case"string":n.elseIf((0,q._)`${a} == "number" || ${a} == "boolean"`).assign(c,(0,q._)`"" + ${s}`).elseIf((0,q._)`${s} === null`).assign(c,(0,q._)`""`);return;case"number":n.elseIf((0,q._)`${a} == "boolean" || ${s} === null
15
+ `)}function No(r,e,t){return r.match(/[\n]\s+/)||e<40?r:qo(r,e,t)}function Io(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function To(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function Do(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}function Ao(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}});var Br=_((CE,xo)=>{var ph="2.0.0",mh=Number.MAX_SAFE_INTEGER||9007199254740991,gh=16;xo.exports={SEMVER_SPEC_VERSION:ph,MAX_LENGTH:256,MAX_SAFE_INTEGER:mh,MAX_SAFE_COMPONENT_LENGTH:gh}});var Jr=_((NE,Lo)=>{var vh=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Lo.exports=vh});var Mt=_((St,Mo)=>{var{MAX_SAFE_COMPONENT_LENGTH:Ws}=Br(),_h=Jr();St=Mo.exports={};var yh=St.re=[],O=St.src=[],P=St.t={},$h=0,j=(r,e,t)=>{let n=$h++;_h(r,n,e),P[r]=n,O[n]=e,yh[n]=new RegExp(e,t?"g":void 0)};j("NUMERICIDENTIFIER","0|[1-9]\\d*");j("NUMERICIDENTIFIERLOOSE","[0-9]+");j("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");j("MAINVERSION",`(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})`);j("MAINVERSIONLOOSE",`(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})`);j("PRERELEASEIDENTIFIER",`(?:${O[P.NUMERICIDENTIFIER]}|${O[P.NONNUMERICIDENTIFIER]})`);j("PRERELEASEIDENTIFIERLOOSE",`(?:${O[P.NUMERICIDENTIFIERLOOSE]}|${O[P.NONNUMERICIDENTIFIER]})`);j("PRERELEASE",`(?:-(${O[P.PRERELEASEIDENTIFIER]}(?:\\.${O[P.PRERELEASEIDENTIFIER]})*))`);j("PRERELEASELOOSE",`(?:-?(${O[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[P.PRERELEASEIDENTIFIERLOOSE]})*))`);j("BUILDIDENTIFIER","[0-9A-Za-z-]+");j("BUILD",`(?:\\+(${O[P.BUILDIDENTIFIER]}(?:\\.${O[P.BUILDIDENTIFIER]})*))`);j("FULLPLAIN",`v?${O[P.MAINVERSION]}${O[P.PRERELEASE]}?${O[P.BUILD]}?`);j("FULL",`^${O[P.FULLPLAIN]}$`);j("LOOSEPLAIN",`[v=\\s]*${O[P.MAINVERSIONLOOSE]}${O[P.PRERELEASELOOSE]}?${O[P.BUILD]}?`);j("LOOSE",`^${O[P.LOOSEPLAIN]}$`);j("GTLT","((?:<|>)?=?)");j("XRANGEIDENTIFIERLOOSE",`${O[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);j("XRANGEIDENTIFIER",`${O[P.NUMERICIDENTIFIER]}|x|X|\\*`);j("XRANGEPLAIN",`[v=\\s]*(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:${O[P.PRERELEASE]})?${O[P.BUILD]}?)?)?`);j("XRANGEPLAINLOOSE",`[v=\\s]*(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:${O[P.PRERELEASELOOSE]})?${O[P.BUILD]}?)?)?`);j("XRANGE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAIN]}$`);j("XRANGELOOSE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAINLOOSE]}$`);j("COERCE",`(^|[^\\d])(\\d{1,${Ws}})(?:\\.(\\d{1,${Ws}}))?(?:\\.(\\d{1,${Ws}}))?(?:$|[^\\d])`);j("COERCERTL",O[P.COERCE],!0);j("LONETILDE","(?:~>?)");j("TILDETRIM",`(\\s*)${O[P.LONETILDE]}\\s+`,!0);St.tildeTrimReplace="$1~";j("TILDE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAIN]}$`);j("TILDELOOSE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAINLOOSE]}$`);j("LONECARET","(?:\\^)");j("CARETTRIM",`(\\s*)${O[P.LONECARET]}\\s+`,!0);St.caretTrimReplace="$1^";j("CARET",`^${O[P.LONECARET]}${O[P.XRANGEPLAIN]}$`);j("CARETLOOSE",`^${O[P.LONECARET]}${O[P.XRANGEPLAINLOOSE]}$`);j("COMPARATORLOOSE",`^${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]})$|^$`);j("COMPARATOR",`^${O[P.GTLT]}\\s*(${O[P.FULLPLAIN]})$|^$`);j("COMPARATORTRIM",`(\\s*)${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]}|${O[P.XRANGEPLAIN]})`,!0);St.comparatorTrimReplace="$1$2$3";j("HYPHENRANGE",`^\\s*(${O[P.XRANGEPLAIN]})\\s+-\\s+(${O[P.XRANGEPLAIN]})\\s*$`);j("HYPHENRANGELOOSE",`^\\s*(${O[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[P.XRANGEPLAINLOOSE]})\\s*$`);j("STAR","(<|>)?=?\\s*\\*");j("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");j("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Yr=_((IE,Fo)=>{var Eh=["includePrerelease","loose","rtl"],wh=r=>r?typeof r!="object"?{loose:!0}:Eh.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};Fo.exports=wh});var zn=_((TE,Uo)=>{var Vo=/^[0-9]+$/,Ho=(r,e)=>{let t=Vo.test(r),n=Vo.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},bh=(r,e)=>Ho(e,r);Uo.exports={compareIdentifiers:Ho,rcompareIdentifiers:bh}});var ge=_((AE,Xo)=>{var Kn=Jr(),{MAX_LENGTH:Go,MAX_SAFE_INTEGER:Xn}=Br(),{re:zo,t:Ko}=Mt(),Sh=Yr(),{compareIdentifiers:hr}=zn(),De=class{constructor(e,t){if(t=Sh(t),e instanceof De){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Go)throw new TypeError(`version is longer than ${Go} characters`);Kn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?zo[Ko.LOOSE]:zo[Ko.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Xn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Xn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Xn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<Xn)return i}return s}):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(e){if(Kn("SemVer.compare",this.version,this.options,e),!(e instanceof De)){if(typeof e=="string"&&e===this.version)return 0;e=new De(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof De||(e=new De(e,this.options)),hr(this.major,e.major)||hr(this.minor,e.minor)||hr(this.patch,e.patch)}comparePre(e){if(e instanceof De||(e=new De(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if(Kn("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return hr(n,s)}while(++t)}compareBuild(e){e instanceof De||(e=new De(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(Kn("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return hr(n,s)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);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)}t&&(hr(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Xo.exports=De});var Ft=_((qE,Yo)=>{var{MAX_LENGTH:Oh}=Br(),{re:Wo,t:Bo}=Mt(),Jo=ge(),Ph=Yr(),Rh=(r,e)=>{if(e=Ph(e),r instanceof Jo)return r;if(typeof r!="string"||r.length>Oh||!(e.loose?Wo[Bo.LOOSE]:Wo[Bo.FULL]).test(r))return null;try{return new Jo(r,e)}catch{return null}};Yo.exports=Rh});var Qo=_((DE,Zo)=>{var Ch=Ft(),Nh=(r,e)=>{let t=Ch(r,e);return t?t.version:null};Zo.exports=Nh});var tc=_((jE,ec)=>{var Ih=Ft(),Th=(r,e)=>{let t=Ih(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};ec.exports=Th});var sc=_((kE,nc)=>{var rc=ge(),Ah=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new rc(r instanceof rc?r.version:r,t).inc(e,n).version}catch{return null}};nc.exports=Ah});var He=_((xE,ac)=>{var ic=ge(),qh=(r,e,t)=>new ic(r,t).compare(new ic(e,t));ac.exports=qh});var Wn=_((LE,oc)=>{var Dh=He(),jh=(r,e,t)=>Dh(r,e,t)===0;oc.exports=jh});var lc=_((ME,uc)=>{var cc=Ft(),kh=Wn(),xh=(r,e)=>{if(kh(r,e))return null;{let t=cc(r),n=cc(e),s=t.prerelease.length||n.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(let c in t)if((c==="major"||c==="minor"||c==="patch")&&t[c]!==n[c])return i+c;return a}};uc.exports=xh});var dc=_((FE,fc)=>{var Lh=ge(),Mh=(r,e)=>new Lh(r,e).major;fc.exports=Mh});var pc=_((VE,hc)=>{var Fh=ge(),Vh=(r,e)=>new Fh(r,e).minor;hc.exports=Vh});var gc=_((HE,mc)=>{var Hh=ge(),Uh=(r,e)=>new Hh(r,e).patch;mc.exports=Uh});var _c=_((UE,vc)=>{var Gh=Ft(),zh=(r,e)=>{let t=Gh(r,e);return t&&t.prerelease.length?t.prerelease:null};vc.exports=zh});var $c=_((GE,yc)=>{var Kh=He(),Xh=(r,e,t)=>Kh(e,r,t);yc.exports=Xh});var wc=_((zE,Ec)=>{var Wh=He(),Bh=(r,e)=>Wh(r,e,!0);Ec.exports=Bh});var Bn=_((KE,Sc)=>{var bc=ge(),Jh=(r,e,t)=>{let n=new bc(r,t),s=new bc(e,t);return n.compare(s)||n.compareBuild(s)};Sc.exports=Jh});var Pc=_((XE,Oc)=>{var Yh=Bn(),Zh=(r,e)=>r.sort((t,n)=>Yh(t,n,e));Oc.exports=Zh});var Cc=_((WE,Rc)=>{var Qh=Bn(),ep=(r,e)=>r.sort((t,n)=>Qh(n,t,e));Rc.exports=ep});var Zr=_((BE,Nc)=>{var tp=He(),rp=(r,e,t)=>tp(r,e,t)>0;Nc.exports=rp});var Jn=_((JE,Ic)=>{var np=He(),sp=(r,e,t)=>np(r,e,t)<0;Ic.exports=sp});var Bs=_((YE,Tc)=>{var ip=He(),ap=(r,e,t)=>ip(r,e,t)!==0;Tc.exports=ap});var Yn=_((ZE,Ac)=>{var op=He(),cp=(r,e,t)=>op(r,e,t)>=0;Ac.exports=cp});var Zn=_((QE,qc)=>{var up=He(),lp=(r,e,t)=>up(r,e,t)<=0;qc.exports=lp});var Js=_((ew,Dc)=>{var fp=Wn(),dp=Bs(),hp=Zr(),pp=Yn(),mp=Jn(),gp=Zn(),vp=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return fp(r,t,n);case"!=":return dp(r,t,n);case">":return hp(r,t,n);case">=":return pp(r,t,n);case"<":return mp(r,t,n);case"<=":return gp(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Dc.exports=vp});var kc=_((tw,jc)=>{var _p=ge(),yp=Ft(),{re:Qn,t:es}=Mt(),$p=(r,e)=>{if(r instanceof _p)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Qn[es.COERCE]);else{let n;for(;(n=Qn[es.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Qn[es.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Qn[es.COERCERTL].lastIndex=-1}return t===null?null:yp(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};jc.exports=$p});var Lc=_((rw,xc)=>{"use strict";xc.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Fc=_((nw,Mc)=>{"use strict";Mc.exports=X;X.Node=Vt;X.create=X;function X(r){var e=this;if(e instanceof X||(e=new X),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}X.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};X.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};X.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};X.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)wp(this,arguments[r]);return this.length};X.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)bp(this,arguments[r]);return this.length};X.prototype.pop=function(){if(!!this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};X.prototype.shift=function(){if(!!this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};X.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};X.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};X.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};X.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};X.prototype.map=function(r,e){e=e||this;for(var t=new X,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};X.prototype.mapReverse=function(r,e){e=e||this;for(var t=new X,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};X.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)t=r(t,n.value,s),n=n.next;return t};X.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)t=r(t,n.value,s),n=n.prev;return t};X.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};X.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};X.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new X;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(;s!==null&&n<e;n++,s=s.next)t.push(s.value);return t};X.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new X;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,s=this.tail;s!==null&&n>e;n--)s=s.prev;for(;s!==null&&n>r;n--,s=s.prev)t.push(s.value);return t};X.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(var i=[],n=0;s&&n<e;n++)i.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var n=0;n<t.length;n++)s=Ep(this,s,t[n]);return i};X.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function Ep(r,e,t){var n=e===r.head?new Vt(t,null,e,r):new Vt(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function wp(r,e){r.tail=new Vt(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function bp(r,e){r.head=new Vt(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Vt(r,e,t,n){if(!(this instanceof Vt))return new Vt(r,e,t,n);this.list=n,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Lc()(X)}catch{}});var zc=_((sw,Gc)=>{"use strict";var Sp=Fc(),Ht=Symbol("max"),gt=Symbol("length"),pr=Symbol("lengthCalculator"),en=Symbol("allowStale"),Ut=Symbol("maxAge"),mt=Symbol("dispose"),Vc=Symbol("noDisposeOnSet"),fe=Symbol("lruList"),We=Symbol("cache"),Uc=Symbol("updateAgeOnGet"),Ys=()=>1,Qs=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Ht]=e.max||1/0,n=e.length||Ys;if(this[pr]=typeof n!="function"?Ys:n,this[en]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ut]=e.maxAge||0,this[mt]=e.dispose,this[Vc]=e.noDisposeOnSet||!1,this[Uc]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Ht]=e||1/0,Qr(this)}get max(){return this[Ht]}set allowStale(e){this[en]=!!e}get allowStale(){return this[en]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ut]=e,Qr(this)}get maxAge(){return this[Ut]}set lengthCalculator(e){typeof e!="function"&&(e=Ys),e!==this[pr]&&(this[pr]=e,this[gt]=0,this[fe].forEach(t=>{t.length=this[pr](t.value,t.key),this[gt]+=t.length})),Qr(this)}get lengthCalculator(){return this[pr]}get length(){return this[gt]}get itemCount(){return this[fe].length}rforEach(e,t){t=t||this;for(let n=this[fe].tail;n!==null;){let s=n.prev;Hc(this,e,n,t),n=s}}forEach(e,t){t=t||this;for(let n=this[fe].head;n!==null;){let s=n.next;Hc(this,e,n,t),n=s}}keys(){return this[fe].toArray().map(e=>e.key)}values(){return this[fe].toArray().map(e=>e.value)}reset(){this[mt]&&this[fe]&&this[fe].length&&this[fe].forEach(e=>this[mt](e.key,e.value)),this[We]=new Map,this[fe]=new Sp,this[gt]=0}dump(){return this[fe].map(e=>ts(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[fe]}set(e,t,n){if(n=n||this[Ut],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let s=n?Date.now():0,i=this[pr](t,e);if(this[We].has(e)){if(i>this[Ht])return mr(this,this[We].get(e)),!1;let u=this[We].get(e).value;return this[mt]&&(this[Vc]||this[mt](e,u.value)),u.now=s,u.maxAge=n,u.value=t,this[gt]+=i-u.length,u.length=i,this.get(e),Qr(this),!0}let a=new ei(e,t,i,s,n);return a.length>this[Ht]?(this[mt]&&this[mt](e,t),!1):(this[gt]+=a.length,this[fe].unshift(a),this[We].set(e,this[fe].head),Qr(this),!0)}has(e){if(!this[We].has(e))return!1;let t=this[We].get(e).value;return!ts(this,t)}get(e){return Zs(this,e,!0)}peek(e){return Zs(this,e,!1)}pop(){let e=this[fe].tail;return e?(mr(this,e),e.value):null}del(e){mr(this,this[We].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let s=e[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{let a=i-t;a>0&&this.set(s.k,s.v,a)}}}prune(){this[We].forEach((e,t)=>Zs(this,t,!1))}},Zs=(r,e,t)=>{let n=r[We].get(e);if(n){let s=n.value;if(ts(r,s)){if(mr(r,n),!r[en])return}else t&&(r[Uc]&&(n.value.now=Date.now()),r[fe].unshiftNode(n));return s.value}},ts=(r,e)=>{if(!e||!e.maxAge&&!r[Ut])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Ut]&&t>r[Ut]},Qr=r=>{if(r[gt]>r[Ht])for(let e=r[fe].tail;r[gt]>r[Ht]&&e!==null;){let t=e.prev;mr(r,e),e=t}},mr=(r,e)=>{if(e){let t=e.value;r[mt]&&r[mt](t.key,t.value),r[gt]-=t.length,r[We].delete(t.key),r[fe].removeNode(e)}},ei=class{constructor(e,t,n,s,i){this.key=e,this.value=t,this.length=n,this.now=s,this.maxAge=i||0}},Hc=(r,e,t,n)=>{let s=t.value;ts(r,s)&&(mr(r,t),r[en]||(s=void 0)),s&&e.call(n,s.value,s.key,r)};Gc.exports=Qs});var Ue=_((iw,Bc)=>{var Gt=class{constructor(e,t){if(t=Pp(t),e instanceof Gt)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Gt(e.raw,t);if(e instanceof ti)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Xc(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Tp(s[0])){this.set=[s];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,s=Kc.get(n);if(s)return s;let i=this.options.loose,a=i?Pe[$e.HYPHENRANGELOOSE]:Pe[$e.HYPHENRANGE];e=e.replace(a,Vp(this.options.includePrerelease)),ae("hyphen replace",e),e=e.replace(Pe[$e.COMPARATORTRIM],Cp),ae("comparator trim",e),e=e.replace(Pe[$e.TILDETRIM],Np),e=e.replace(Pe[$e.CARETTRIM],Ip),e=e.split(/\s+/).join(" ");let c=e.split(" ").map(d=>Ap(d,this.options)).join(" ").split(/\s+/).map(d=>Fp(d,this.options));i&&(c=c.filter(d=>(ae("loose invalid filter",d,this.options),!!d.match(Pe[$e.COMPARATORLOOSE])))),ae("range list",c);let u=new Map,o=c.map(d=>new ti(d,this.options));for(let d of o){if(Xc(d))return[d];u.set(d.value,d)}u.size>1&&u.has("")&&u.delete("");let l=[...u.values()];return Kc.set(n,l),l}intersects(e,t){if(!(e instanceof Gt))throw new TypeError("a Range is required");return this.set.some(n=>Wc(n,t)&&e.set.some(s=>Wc(s,t)&&n.every(i=>s.every(a=>i.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Rp(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(Hp(this.set[t],e,this.options))return!0;return!1}};Bc.exports=Gt;var Op=zc(),Kc=new Op({max:1e3}),Pp=Yr(),ti=tn(),ae=Jr(),Rp=ge(),{re:Pe,t:$e,comparatorTrimReplace:Cp,tildeTrimReplace:Np,caretTrimReplace:Ip}=Mt(),Xc=r=>r.value==="<0.0.0-0",Tp=r=>r.value==="",Wc=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(i=>s.intersects(i,e)),s=n.pop();return t},Ap=(r,e)=>(ae("comp",r,e),r=jp(r,e),ae("caret",r),r=qp(r,e),ae("tildes",r),r=xp(r,e),ae("xrange",r),r=Mp(r,e),ae("stars",r),r),Ee=r=>!r||r.toLowerCase()==="x"||r==="*",qp=(r,e)=>r.trim().split(/\s+/).map(t=>Dp(t,e)).join(" "),Dp=(r,e)=>{let t=e.loose?Pe[$e.TILDELOOSE]:Pe[$e.TILDE];return r.replace(t,(n,s,i,a,c)=>{ae("tilde",r,n,s,i,a,c);let u;return Ee(s)?u="":Ee(i)?u=`>=${s}.0.0 <${+s+1}.0.0-0`:Ee(a)?u=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:c?(ae("replaceTilde pr",c),u=`>=${s}.${i}.${a}-${c} <${s}.${+i+1}.0-0`):u=`>=${s}.${i}.${a} <${s}.${+i+1}.0-0`,ae("tilde return",u),u})},jp=(r,e)=>r.trim().split(/\s+/).map(t=>kp(t,e)).join(" "),kp=(r,e)=>{ae("caret",r,e);let t=e.loose?Pe[$e.CARETLOOSE]:Pe[$e.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,a,c,u)=>{ae("caret",r,s,i,a,c,u);let o;return Ee(i)?o="":Ee(a)?o=`>=${i}.0.0${n} <${+i+1}.0.0-0`:Ee(c)?i==="0"?o=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.0${n} <${+i+1}.0.0-0`:u?(ae("replaceCaret pr",u),i==="0"?a==="0"?o=`>=${i}.${a}.${c}-${u} <${i}.${a}.${+c+1}-0`:o=`>=${i}.${a}.${c}-${u} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${c}-${u} <${+i+1}.0.0-0`):(ae("no pr"),i==="0"?a==="0"?o=`>=${i}.${a}.${c}${n} <${i}.${a}.${+c+1}-0`:o=`>=${i}.${a}.${c}${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${c} <${+i+1}.0.0-0`),ae("caret return",o),o})},xp=(r,e)=>(ae("replaceXRanges",r,e),r.split(/\s+/).map(t=>Lp(t,e)).join(" ")),Lp=(r,e)=>{r=r.trim();let t=e.loose?Pe[$e.XRANGELOOSE]:Pe[$e.XRANGE];return r.replace(t,(n,s,i,a,c,u)=>{ae("xRange",r,n,s,i,a,c,u);let o=Ee(i),l=o||Ee(a),d=l||Ee(c),y=d;return s==="="&&y&&(s=""),u=e.includePrerelease?"-0":"",o?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&y?(l&&(a=0),c=0,s===">"?(s=">=",l?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",l?i=+i+1:a=+a+1),s==="<"&&(u="-0"),n=`${s+i}.${a}.${c}${u}`):l?n=`>=${i}.0.0${u} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${u} <${i}.${+a+1}.0-0`),ae("xRange return",n),n})},Mp=(r,e)=>(ae("replaceStars",r,e),r.trim().replace(Pe[$e.STAR],"")),Fp=(r,e)=>(ae("replaceGTE0",r,e),r.trim().replace(Pe[e.includePrerelease?$e.GTE0PRE:$e.GTE0],"")),Vp=r=>(e,t,n,s,i,a,c,u,o,l,d,y,m)=>(Ee(n)?t="":Ee(s)?t=`>=${n}.0.0${r?"-0":""}`:Ee(i)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,Ee(o)?u="":Ee(l)?u=`<${+o+1}.0.0-0`:Ee(d)?u=`<${o}.${+l+1}.0-0`:y?u=`<=${o}.${l}.${d}-${y}`:r?u=`<${o}.${l}.${+d+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),Hp=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(ae(r[n].semver),r[n].semver!==ti.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var tn=_((aw,eu)=>{var rn=Symbol("SemVer ANY"),gr=class{static get ANY(){return rn}constructor(e,t){if(t=Up(t),e instanceof gr){if(e.loose===!!t.loose)return e;e=e.value}ni("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===rn?this.value="":this.value=this.operator+this.semver.version,ni("comp",this)}parse(e){let t=this.options.loose?Jc[Yc.COMPARATORLOOSE]:Jc[Yc.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Zc(n[2],this.options.loose):this.semver=rn}toString(){return this.value}test(e){if(ni("Comparator.test",e,this.options.loose),this.semver===rn||e===rn)return!0;if(typeof e=="string")try{e=new Zc(e,this.options)}catch{return!1}return ri(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof gr))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Qc(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Qc(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),c=ri(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=ri(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||s||i&&a||c||u}};eu.exports=gr;var Up=Yr(),{re:Jc,t:Yc}=Mt(),ri=Js(),ni=Jr(),Zc=ge(),Qc=Ue()});var nn=_((ow,tu)=>{var Gp=Ue(),zp=(r,e,t)=>{try{e=new Gp(e,t)}catch{return!1}return e.test(r)};tu.exports=zp});var nu=_((cw,ru)=>{var Kp=Ue(),Xp=(r,e)=>new Kp(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));ru.exports=Xp});var iu=_((uw,su)=>{var Wp=ge(),Bp=Ue(),Jp=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Bp(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new Wp(n,t))}),n};su.exports=Jp});var ou=_((lw,au)=>{var Yp=ge(),Zp=Ue(),Qp=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Zp(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new Yp(n,t))}),n};au.exports=Qp});var lu=_((fw,uu)=>{var si=ge(),em=Ue(),cu=Zr(),tm=(r,e)=>{r=new em(r,e);let t=new si("0.0.0");if(r.test(t)||(t=new si("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(a=>{let c=new si(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!i||cu(c,i))&&(i=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||cu(t,i))&&(t=i)}return t&&r.test(t)?t:null};uu.exports=tm});var du=_((dw,fu)=>{var rm=Ue(),nm=(r,e)=>{try{return new rm(r,e).range||"*"}catch{return null}};fu.exports=nm});var rs=_((hw,gu)=>{var sm=ge(),mu=tn(),{ANY:im}=mu,am=Ue(),om=nn(),hu=Zr(),pu=Jn(),cm=Zn(),um=Yn(),lm=(r,e,t,n)=>{r=new sm(r,n),e=new am(e,n);let s,i,a,c,u;switch(t){case">":s=hu,i=cm,a=pu,c=">",u=">=";break;case"<":s=pu,i=um,a=hu,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(om(r,e,n))return!1;for(let o=0;o<e.set.length;++o){let l=e.set[o],d=null,y=null;if(l.forEach(m=>{m.semver===im&&(m=new mu(">=0.0.0")),d=d||m,y=y||m,s(m.semver,d.semver,n)?d=m:a(m.semver,y.semver,n)&&(y=m)}),d.operator===c||d.operator===u||(!y.operator||y.operator===c)&&i(r,y.semver))return!1;if(y.operator===u&&a(r,y.semver))return!1}return!0};gu.exports=lm});var _u=_((pw,vu)=>{var fm=rs(),dm=(r,e,t)=>fm(r,e,">",t);vu.exports=dm});var $u=_((mw,yu)=>{var hm=rs(),pm=(r,e,t)=>hm(r,e,"<",t);yu.exports=pm});var bu=_((gw,wu)=>{var Eu=Ue(),mm=(r,e,t)=>(r=new Eu(r,t),e=new Eu(e,t),r.intersects(e));wu.exports=mm});var Ou=_((vw,Su)=>{var gm=nn(),vm=He();Su.exports=(r,e,t)=>{let n=[],s=null,i=null,a=r.sort((l,d)=>vm(l,d,t));for(let l of a)gm(l,e,t)?(i=l,s||(s=l)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let c=[];for(let[l,d]of n)l===d?c.push(l):!d&&l===a[0]?c.push("*"):d?l===a[0]?c.push(`<=${d}`):c.push(`${l} - ${d}`):c.push(`>=${l}`);let u=c.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return u.length<o.length?u:e}});var Iu=_((_w,Nu)=>{var Pu=Ue(),ns=tn(),{ANY:ii}=ns,sn=nn(),ai=He(),_m=(r,e,t={})=>{if(r===e)return!0;r=new Pu(r,t),e=new Pu(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let a=ym(s,i,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},ym=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===ii){if(e.length===1&&e[0].semver===ii)return!0;t.includePrerelease?r=[new ns(">=0.0.0-0")]:r=[new ns(">=0.0.0")]}if(e.length===1&&e[0].semver===ii){if(t.includePrerelease)return!0;e=[new ns(">=0.0.0")]}let n=new Set,s,i;for(let m of r)m.operator===">"||m.operator===">="?s=Ru(s,m,t):m.operator==="<"||m.operator==="<="?i=Cu(i,m,t):n.add(m.semver);if(n.size>1)return null;let a;if(s&&i){if(a=ai(s.semver,i.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let m of n){if(s&&!sn(m,String(s),t)||i&&!sn(m,String(i),t))return null;for(let $ of e)if(!sn(m,String($),t))return!1;return!0}let c,u,o,l,d=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,y=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let m of e){if(l=l||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(y&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===y.major&&m.semver.minor===y.minor&&m.semver.patch===y.patch&&(y=!1),m.operator===">"||m.operator===">="){if(c=Ru(s,m,t),c===m&&c!==s)return!1}else if(s.operator===">="&&!sn(s.semver,String(m),t))return!1}if(i){if(d&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===d.major&&m.semver.minor===d.minor&&m.semver.patch===d.patch&&(d=!1),m.operator==="<"||m.operator==="<="){if(u=Cu(i,m,t),u===m&&u!==i)return!1}else if(i.operator==="<="&&!sn(i.semver,String(m),t))return!1}if(!m.operator&&(i||s)&&a!==0)return!1}return!(s&&o&&!i&&a!==0||i&&l&&!s&&a!==0||y||d)},Ru=(r,e,t)=>{if(!r)return e;let n=ai(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Cu=(r,e,t)=>{if(!r)return e;let n=ai(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Nu.exports=_m});var Au=_((yw,Tu)=>{var oi=Mt();Tu.exports={re:oi.re,src:oi.src,tokens:oi.t,SEMVER_SPEC_VERSION:Br().SEMVER_SPEC_VERSION,SemVer:ge(),compareIdentifiers:zn().compareIdentifiers,rcompareIdentifiers:zn().rcompareIdentifiers,parse:Ft(),valid:Qo(),clean:tc(),inc:sc(),diff:lc(),major:dc(),minor:pc(),patch:gc(),prerelease:_c(),compare:He(),rcompare:$c(),compareLoose:wc(),compareBuild:Bn(),sort:Pc(),rsort:Cc(),gt:Zr(),lt:Jn(),eq:Wn(),neq:Bs(),gte:Yn(),lte:Zn(),cmp:Js(),coerce:kc(),Comparator:tn(),Range:Ue(),satisfies:nn(),toComparators:nu(),maxSatisfying:iu(),minSatisfying:ou(),minVersion:lu(),validRange:du(),outside:rs(),gtr:_u(),ltr:$u(),intersects:bu(),simplifyRange:Ou(),subset:Iu()}});var vt=_(je=>{"use strict";var $m=je&&je.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Em=je&&je.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wm=je&&je.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&$m(e,r,t);return Em(e,r),e},qu=je&&je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(je,"__esModule",{value:!0});je.getCoreVersion=void 0;var Du=qu(require("path")),ju=qu(require("fs")),ci=wm(require("@serverless-devs/core")),bm=Au(),ku=Du.default.join(ci.getRootHome(),"cache","core"),ui=Du.default.join(ku,"package.json");function Sm(){if(ju.default.existsSync(ui)){var r=require("@serverless-devs/core/package.json").version,e=xu();return bm.gt(e,r)?require(ku):ci}return ci}function xu(){return ju.default.existsSync(ui)?require(ui).version:void 0}je.getCoreVersion=xu;je.default=Sm()});var di=_(Re=>{"use strict";var Om=Re&&Re.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},Pm=Re&&Re.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Lu=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0});Re.handlerProfileFile=Re.getConfig=Re.setConfig=void 0;var Mu=Lu(require("path")),fi=Lu(vt()),it=fi.default.fse,ss=fi.default.jsyaml,li=fi.default.getRootHome;function Rm(r){var e=Vu();it.writeFileSync(e,ss.dump(r))}function Fu(){var r=Vu();if(!it.existsSync(r))return{};try{var e=ss.load(it.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function Vu(){var r=Mu.default.join(li(),"set-config.yml");return it.existsSync(r)||it.createFileSync(r),r}function Cm(r,e){var t=Fu();t[r]=e,Rm(t)}Re.setConfig=Cm;function Nm(r,e){var t=Fu();return t[r]||e}Re.getConfig=Nm;function Im(r){return Om(this,void 0,void 0,function(){var e,t,n,s,i,a,c;return Pm(this,function(u){switch(u.label){case 0:if(e=r.filePath||"set-config.yml",t=Mu.default.join(li(),e),n=it.existsSync(t),s={},n)return[3,5];i=li(),u.label=1;case 1:return u.trys.push([1,2,,4]),it.statSync(i),[3,4];case 2:return a=u.sent(),[4,it.mkdirSync(i)];case 3:return u.sent(),[3,4];case 4:return[3,6];case 5:try{s=ss.load(it.readFileSync(t,"utf8"))||{}}catch(o){throw o}u.label=6;case 6:return r.read?[2,s]:(c=r.configKey||"",s[c]=r.data,[4,it.writeFileSync(t,ss.dump(s))]);case 7:return u.sent(),[2,s]}})})}Re.handlerProfileFile=Im});var is=_(an=>{"use strict";var Tm=an&&an.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(an,"__esModule",{value:!0});var Am=Tm(vt()),qm=Am.default.Logger,hi=new qm("S-CLI");hi.success=function(r){return hi.log(r,"green")};an.default=hi});var Hu=_((bw,Dm)=>{Dm.exports={name:"@serverless-devs/s",version:"2.1.3-beta.2",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"jest test/special-command.test",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.0.0","@types/jest":"^27.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8",open:"^8.4.0","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta","@serverless-devs/ui":"beta"}}});var mi=_(N=>{"use strict";var jm=N&&N.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),km=N&&N.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),xm=N&&N.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&jm(e,r,t);return km(e,r),e},_r=N&&N.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},yr=N&&N.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},as=N&&N.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(N,"__esModule",{value:!0});N.specifyServiceHelp=N.getTempCommandStr=N.emoji=N.mark=N.replaceTemplate=N.replaceFun=N.getLang=N.printn=N.getFolderSize=N.getVersion=N.aiRequest=N.getCredentialWithAll=N.getCredentialWithExisted=N.getProcessArgv=N.bgRed=N.yellow=N.red=void 0;var Lm=as(require("path")),on=as(require("fs")),Mm=as(require("os")),we=xm(vt()),Fm=di(),vr=as(is()),Uu=Hu(),$r=we.default.colors,Vm=we.default.got,Hm=we.default.isDocker,Um=we.default.isCiCdEnv,Ot=we.default.lodash,Gu=we.default.publishHelp,Gm=Ot.get,zm=Ot.trim,Km=Ot.assign,Xm=Ot.filter,zu=Ot.includes,Wm=Ot.omit,Bm=Ot.isPlainObject,Jm=Ot.isEmpty,Ym=$r.underline,Zm=$r.bold;N.red=$r.hex("#fd5750");N.yellow=$r.hex("#F3F99D");N.bgRed=$r.hex("#000").bgHex("#fd5750");var Qm=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=we.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),Km({},t,{noHelpArgv:process.argv.slice(0,2).concat(Xm(t._argsObj,function(n){return!zu(["-h","--help"],n)}))})}catch{return{}}};N.getProcessArgv=Qm;var eg=function(r){return _r(void 0,void 0,void 0,function(){var e,t;return yr(this,function(n){switch(n.label){case 0:return[4,we.default.getCredentialAliasList()];case 1:return e=n.sent(),zu(e,r)?[4,we.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};N.getCredentialWithExisted=eg;var tg=function(){return _r(void 0,void 0,void 0,function(){var r,e,t,n,s,i;return yr(this,function(a){switch(a.label){case 0:return[4,we.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(s=n[t],[4,we.default.getCredential(s)]):[3,5];case 3:i=a.sent(),e[i.Alias]=Wm(i,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};N.getCredentialWithAll=tg;var rg=function(r,e){return e===void 0&&(e="unknow"),_r(void 0,void 0,void 0,function(){var t,n,s,i;return yr(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,Fm.getConfig)("analysis"),t!=="enable"?[2]:Hm()||Um()?[2]:[4,Vm("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return n=a.sent(),s=Gm(n.body,"shorturl"),s&&vr.default.log(`AI Tips:
16
+ You can try to solve the problem through: `.concat($r.underline(s),`
17
+ `)),[3,3];case 2:return i=a.sent(),[3,3];case 3:return[2]}})})};N.aiRequest=rg;function ng(){var r=(0,we.getCoreVersion)(),e=["".concat(Uu.name,": ").concat(Uu.version),r?"core: ".concat(r):void 0,"s-home: ".concat(we.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}N.getVersion=ng;function sg(r){return _r(this,void 0,void 0,function(){function e(s){return _r(this,void 0,void 0,function(){var i,a;return yr(this,function(c){switch(c.label){case 0:return i=on.default.lstatSync(s),typeof i!="object"?[2]:(t.set(i.ino,i.size),i.isDirectory()?(a=on.default.readdirSync(s),typeof a!="object"?[2]:[4,Promise.all(a.map(function(u){return e(Lm.default.join(s,u))}))]):[3,2]);case 1:c.sent(),c.label=2;case 2:return[2]}})})}var t,n;return yr(this,function(s){switch(s.label){case 0:return t=new Map,[4,e(r)];case 1:return s.sent(),n=Array.from(t.values()).reduce(function(i,a){return i+a},0),[2,n]}})})}N.getFolderSize=sg;function ig(r,e){e===void 0&&(e=" ");for(var t="",n=0;n<r;n++)t=t+e;return t}N.printn=ig;function ag(){return"en"}N.getLang=ag;function Ku(r,e){var t=/\{\{(.*?)\}\}/g,n=r.match(t);if(n)for(var s=0;s<n.length;s++){var i=n[s].replace(/{{|}}/g,""),a=zm(i.split("|")[0]);e[a]&&(r=r.replace(n[s],e[a]))}return r}N.replaceFun=Ku;function og(r,e){r.forEach(function(t){if(on.default.existsSync(t)){var n=on.default.readFileSync(t,"utf-8"),s=Ku(n,e);on.default.writeFileSync(t,s,"utf-8")}})}N.replaceTemplate=og;function cg(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}N.mark=cg;function pi(r,e){return Mm.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}N.emoji=pi;function Xu(r,e){var t=r.length,n=new Array(e-t).fill(" ");return"".concat(r).concat(n.join("")," : ")}N.getTempCommandStr=Xu;function ug(r){return _r(this,void 0,void 0,function(){var e,t,n,s,i,c,a,c;return yr(this,function(u){switch(u.label){case 0:return[4,we.default.getYamlContent(r)];case 1:if(e=u.sent(),vr.default.log(`
18
+ `.concat(pi("\u{1F680}")," ").concat(e.Name,"@").concat(e.Version,": ").concat(e.Description,`
19
+ `)),t=e.Commands,t){n=Gu.maxLen(t),s=[],i={};for(c in t)a=t[c],Bm(a)?s.push(Gu.helpInfo(a,Ym(Zm(c)),n,4)):i[c]=a;if(s.length>0&&vr.default.log(s.join(`
20
+ `)),!Jm(i)){for(c in i)vr.default.log(" ".concat(Xu(c,n)," ").concat(i[c]));vr.default.log("")}vr.default.log(e.HomePage?" ".concat(pi("\u{1F9ED}")," ").concat(we.default.makeUnderLine("More information: "+e.HomePage)," ")+`
21
+ `:"")}return[2]}})})}N.specifyServiceHelp=ug});var Wu=_(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.default={clean_up_the_environment:"\u6E05\u7406\u73AF\u5883",display_help_for_command:"\u663E\u793A\u547D\u4EE4\u5E2E\u52A9",remove_components:"\u5220\u9664\u7EC4\u4EF6",delete_the_file_under_the_cache:"\u5220\u9664\u7F13\u5B58\u91CC\u7684\u7684<dirname>\u6587\u4EF6",record_your_log_information:"\u662F\u5426\u8BB0\u5F55\u60A8\u7684\u65E5\u5FD7\u4FE1\u606F\uFF1F",init_pproject_deploy_tip:"\u662F\u5426\u7ACB\u5373\u90E8\u7F72\u8BE5\u9879\u76EE\uFF1F",tip_for_a_serverless_project:"\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u4E0B\u5DF2\u5B58\u5728\u4E00\u4E2AServerless-Devs\u9879\u76EE\uFF0C\u8BF7\u901A\u8FC7 's deploy' \u8FDB\u884C\u90E8\u7F72\u6216\u901A\u8FC7 's -h' \u83B7\u53D6\u66F4\u591A\u4FE1\u606F",create_a_new_project:"\u672A\u68C0\u6D4B\u5230 Serverless-Devs \u9879\u76EE\uFF0C\u662F\u5426\u65B0\u5EFA\u4E00\u4E2A\u9879\u76EE\uFF1F",en:"English (en)",zh:"\u4E2D\u6587 (zh)",select_current_language:"\u8BF7\u9009\u62E9\u5F53\u524D\u8BED\u8A00","app-tip":"\u8BF7\u9009\u62E9\u60A8\u5E0C\u671B\u521B\u5EFA\u7684 Serverless-Devs \u5E94\u7528","template-tip":"\u8BF7\u9009\u62E9\u60A8\u559C\u6B22\u7684\u6A21\u7248","fc-runtime-starter":"fc-runtime-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A FC \u51FD\u6570","fc-custom-container-stater":"fc-custom-container-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A custom-container \u5E94\u7528",web:"web-framework-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Web \u6846\u67B6","static-site":"static-website-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","best-practice":"serverless-best-practice - \u5FEB\u901F\u4F53\u9A8C Serverless \u6700\u4F73\u5B9E\u8DF5","devs-template":"Serverless Devs \u5F00\u53D1\u6A21\u677F","fc-http-nodejs":"fc-http-nodejs - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nodejs12 \u51FD\u6570","fc-http-python":"fc-http-python - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A python3 \u51FD\u6570","fc-http-java":"fc-http-java - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A java8 \u51FD\u6570","fc-custom-container-event-python3":"fc-custom-container-event-python3 - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 python3 \u5E94\u7528","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 cpp \u5E94\u7528","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 springboot \u5E94\u7528","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 aspdotnetcore \u5E94\u7528","express-starter":"express-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A express \u57FA\u7840\u5E94\u7528","koa-starter":"koa-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A koa \u57FA\u7840\u5E94\u7528","nuxtjs-starter":"nuxtjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nuxtjs \u57FA\u7840\u5E94\u7528","eggjs-starter":"eggjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A eggjs \u57FA\u7840\u5E94\u7528","flask-starter":"flask-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A flask \u57FA\u7840\u5E94\u7528","SpringBoot-starter":"SpringBoot-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A SpringBoot \u57FA\u7840\u5E94\u7528","Zblog-starter":"Zblog-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Zblog \u57FA\u7840\u5E94\u7528","website-starter":"website-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","react-starter":"react-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A React.js \u5E94\u7528","vue-starter":"vue-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Vue.js \u5E94\u7528",puppeteer:"puppeteer - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E puppeteer \u622A\u56FE\u7684 Web \u5E94\u7528",ffmpeg:"ffmpeg - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E ffmpeg \u5B9E\u73B0\u97F3\u89C6\u9891\u5904\u7406\u5E94\u7528",pdf2Img:"pdf2Img - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A pdf \u8F6C\u56FE\u7247\u5E94\u7528",tensorflow:"tensorflow - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A tensorflow \u5E94\u7528",todoList:"todoList - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E nodejs \u7684\u7F51\u9875 TodoList \u5E94\u7528"}});var Bu=_(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.default={clean_up_the_environment:"Clean up the environment",display_help_for_command:"Display help for command",remove_components:"Remove component (like: fc, fc@0.0.1)",delete_the_file_under_the_cache:"Delete the <dirname> file in the cache",record_your_log_information:"Do you record your log information?",init_pproject_deploy_tip:"Do you want to deploy the project immediately?",tip_for_a_serverless_project:"A Serverless-Devs project is detected in the current directory, please deploy via 's deploy' or get more information via 's -h'",create_a_new_project:"No Serverless-Devs project is currently detected. Do you want to create a new project?",en:"English (en)",zh:"Chinese (zh)",select_current_language:"Please select current language","app-tip":"Hello, serverlesser. Which template do you like?","template-tip":"Which template do you like?","fc-runtime-starter":"fc-runtime-starter - Deploy FC function in 5 minutes","fc-custom-container-stater":"fc-custom-container-stater - Deploy FC function with custom-container",web:"web-framework-stater-Quickly deploy a web framework","static-site":"static-website-stater-Quickly deploy a static website","best-practice":"serverless-best-practice-Quickly experience serverless best practices","devs-template":"Serverless Develop scaffold","fc-http-nodejs":"fc-http-nodejs - Deploy FC nodejs12 runtime function","fc-http-python":"fc-http-python - Deploy FC python3 runtime function","fc-http-java":"fc-http-java - Deploy FC java8 runtime function","fc-custom-container-event-python3":"fc-custom-container-event-python3 - Deploy python3 event-triggered application","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - Deploy cpp event-triggered application","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - Deploy springboot HTTP Request-triggered application","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - Deploy dotnetcore HTTP Request-triggered application","express-starter":"express-starter - Deploy express application","koa-starter":"koa-starter - Deploy koa application","nuxtjs-starter":"nuxtjs-starter - Deploy nuxtjs application","eggjs-starter":"eggjs-starter - Deploy eggjs application","flask-starter":"flask-starter - Deploy flask application","SpringBoot-starter":"SpringBoot-starter - Deploy SpringBoot application","Zblog-starter":"Zblog-starter - Deploy Zblog application","website-starter":"website-starter - Deploy static website","react-starter":"react-starter - Deploy React.js application","vue-starter":"vue-starter - Deploy Vue.js application",puppeteer:"puppeteer - Deploy screenshot application base on puppeteer + fc",ffmpeg:"ffmpeg - Deploy audio and video processing application base on ffmpeg + fc",pdf2Img:"pdf2Img - Deploy pdf to images application",tensorflow:"tensorflow - Deploy tensorflow application",todoList:"todoList - Deploy todoList application"}});var yi=_(cn=>{"use strict";var Ju=cn&&cn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cn,"__esModule",{value:!0});var lg=mi(),fg=Ju(Wu()),dg=Ju(Bu()),_i={en:dg.default,zh:fg.default},hg=function(r){var e=(0,lg.getLang)(),t=_i[e]?_i[e][r]:_i.en[r];return t||r};cn.default=hg});var un=_(ve=>{"use strict";var pg=ve&&ve.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Yu=ve&&ve.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&pg(e,r,t)},$i=ve&&ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ve,"__esModule",{value:!0});ve.registerCommandChecker=ve.i18n=ve.logger=void 0;var mg=$i(is());Yu(mi(),ve);Yu(di(),ve);var gg=is();Object.defineProperty(ve,"logger",{enumerable:!0,get:function(){return $i(gg).default}});var vg=yi();Object.defineProperty(ve,"i18n",{enumerable:!0,get:function(){return $i(vg).default}});function _g(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(mg.default.error(" error: unknown command ".concat(e[0])),r.help())})}ve.registerCommandChecker=_g});var dn=_(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.regexpCode=U.getEsmExportName=U.getProperty=U.safeStringify=U.stringify=U.strConcat=U.addCodeArg=U.str=U._=U.nil=U._Code=U.Name=U.IDENTIFIER=U._CodeOrName=void 0;var ln=class{};U._CodeOrName=ln;U.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var zt=class extends ln{constructor(e){if(super(),!U.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};U.Name=zt;var Ge=class extends ln{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof zt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};U._Code=Ge;U.nil=new Ge("");function Zu(r,...e){let t=[r[0]],n=0;for(;n<e.length;)wi(t,e[n]),t.push(r[++n]);return new Ge(t)}U._=Zu;var Ei=new Ge("+");function Qu(r,...e){let t=[fn(r[0])],n=0;for(;n<e.length;)t.push(Ei),wi(t,e[n]),t.push(Ei,fn(r[++n]));return yg(t),new Ge(t)}U.str=Qu;function wi(r,e){e instanceof Ge?r.push(...e._items):e instanceof zt?r.push(e):r.push(wg(e))}U.addCodeArg=wi;function yg(r){let e=1;for(;e<r.length-1;){if(r[e]===Ei){let t=$g(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function $g(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof zt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof zt))return`"${r}${e.slice(1)}`}function Eg(r,e){return e.emptyStr()?r:r.emptyStr()?e:Qu`${r}${e}`}U.strConcat=Eg;function wg(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:fn(Array.isArray(r)?r.join(","):r)}function bg(r){return new Ge(fn(r))}U.stringify=bg;function fn(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}U.safeStringify=fn;function Sg(r){return typeof r=="string"&&U.IDENTIFIER.test(r)?new Ge(`.${r}`):Zu`[${r}]`}U.getProperty=Sg;function Og(r){if(typeof r=="string"&&U.IDENTIFIER.test(r))return new Ge(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}U.getEsmExportName=Og;function Pg(r){return new Ge(r.toString())}U.regexpCode=Pg});var Pi=_(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.ValueScope=be.ValueScopeName=be.Scope=be.varKinds=be.UsedValueState=void 0;var Ce=dn(),bi=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Si;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(Si=be.UsedValueState||(be.UsedValueState={}));be.varKinds={const:new Ce.Name("const"),let:new Ce.Name("let"),var:new Ce.Name("var")};var os=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Ce.Name?e:this.name(e)}name(e){return new Ce.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};be.Scope=os;var cs=class extends Ce.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,Ce._)`.${new Ce.Name(t)}[${n}]`}};be.ValueScopeName=cs;var Rg=(0,Ce._)`\n`,Oi=class extends os{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Rg:Ce.nil}}get(){return this._scope}name(e){return new cs(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:i}=s,a=(n=t.key)!==null&&n!==void 0?n:t.ref,c=this._values[i];if(c){let l=c.get(a);if(l)return l}else c=this._values[i]=new Map;c.set(a,s);let u=this._scope[i]||(this._scope[i]=[]),o=u.length;return u[o]=t.ref,s.setValue(t,{property:i,itemIndex:o}),s}getValue(e,t){let n=this._values[e];if(!!n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ce._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},t,n)}_reduceValues(e,t,n={},s){let i=Ce.nil;for(let a in e){let c=e[a];if(!c)continue;let u=n[a]=n[a]||new Map;c.forEach(o=>{if(u.has(o))return;u.set(o,Si.Started);let l=t(o);if(l){let d=this.opts.es5?be.varKinds.var:be.varKinds.const;i=(0,Ce._)`${i}${d} ${o} = ${l};${this.opts._n}`}else if(l=s==null?void 0:s(o))i=(0,Ce._)`${i}${l}${this.opts._n}`;else throw new bi(o);u.set(o,Si.Completed)})}return i}};be.ValueScope=Oi});var L=_(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.or=k.and=k.not=k.CodeGen=k.operators=k.varKinds=k.ValueScopeName=k.ValueScope=k.Scope=k.Name=k.regexpCode=k.stringify=k.getProperty=k.nil=k.strConcat=k.str=k._=void 0;var M=dn(),Be=Pi(),Pt=dn();Object.defineProperty(k,"_",{enumerable:!0,get:function(){return Pt._}});Object.defineProperty(k,"str",{enumerable:!0,get:function(){return Pt.str}});Object.defineProperty(k,"strConcat",{enumerable:!0,get:function(){return Pt.strConcat}});Object.defineProperty(k,"nil",{enumerable:!0,get:function(){return Pt.nil}});Object.defineProperty(k,"getProperty",{enumerable:!0,get:function(){return Pt.getProperty}});Object.defineProperty(k,"stringify",{enumerable:!0,get:function(){return Pt.stringify}});Object.defineProperty(k,"regexpCode",{enumerable:!0,get:function(){return Pt.regexpCode}});Object.defineProperty(k,"Name",{enumerable:!0,get:function(){return Pt.Name}});var ds=Pi();Object.defineProperty(k,"Scope",{enumerable:!0,get:function(){return ds.Scope}});Object.defineProperty(k,"ValueScope",{enumerable:!0,get:function(){return ds.ValueScope}});Object.defineProperty(k,"ValueScopeName",{enumerable:!0,get:function(){return ds.ValueScopeName}});Object.defineProperty(k,"varKinds",{enumerable:!0,get:function(){return ds.varKinds}});k.operators={GT:new M._Code(">"),GTE:new M._Code(">="),LT:new M._Code("<"),LTE:new M._Code("<="),EQ:new M._Code("==="),NEQ:new M._Code("!=="),NOT:new M._Code("!"),OR:new M._Code("||"),AND:new M._Code("&&"),ADD:new M._Code("+")};var _t=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Ri=class extends _t{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Be.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+t}optimizeNames(e,t){if(!!e[this.name.str])return this.rhs&&(this.rhs=wr(this.rhs,e,t)),this}get names(){return this.rhs instanceof M._CodeOrName?this.rhs.names:{}}},us=class extends _t{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof M.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=wr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof M.Name?{}:{...this.lhs.names};return fs(e,this.rhs)}},Ci=class extends us{constructor(e,t,n,s){super(e,n,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Ni=class extends _t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Ii=class extends _t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Ti=class extends _t{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Ai=class extends _t{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=wr(this.code,e,t),this}get names(){return this.code instanceof M._CodeOrName?this.code.names:{}}},hn=class extends _t{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,s=n.length;for(;s--;){let i=n[s];i.optimizeNames(e,t)||(Cg(e,i.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Xt(e,t.names),{})}},yt=class extends hn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},qi=class extends hn{},Er=class extends yt{};Er.kind="else";var Je=class extends yt{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new Er(n):n}if(t)return e===!1?t instanceof Je?t:t.nodes:this.nodes.length?this:new Je(el(e),t instanceof Je?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=wr(this.condition,e,t),this}get names(){let e=super.names;return fs(e,this.condition),this.else&&Xt(e,this.else.names),e}};Je.kind="if";var Kt=class extends yt{};Kt.kind="for";var Di=class extends Kt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!!super.optimizeNames(e,t))return this.iteration=wr(this.iteration,e,t),this}get names(){return Xt(super.names,this.iteration.names)}},ji=class extends Kt{constructor(e,t,n,s){super(),this.varKind=e,this.name=t,this.from=n,this.to=s}render(e){let t=e.es5?Be.varKinds.var:this.varKind,{name:n,from:s,to:i}=this;return`for(${t} ${n}=${s}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){let e=fs(super.names,this.from);return fs(e,this.to)}},ls=class extends Kt{constructor(e,t,n,s){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!!super.optimizeNames(e,t))return this.iterable=wr(this.iterable,e,t),this}get names(){return Xt(super.names,this.iterable.names)}},pn=class extends yt{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};pn.kind="func";var mn=class extends hn{render(e){return"return "+super.render(e)}};mn.kind="return";var ki=class extends yt{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,s;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(s=this.finally)===null||s===void 0||s.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Xt(e,this.catch.names),this.finally&&Xt(e,this.finally.names),e}},gn=class extends yt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};gn.kind="catch";var vn=class extends yt{render(e){return"finally"+super.render(e)}};vn.kind="finally";var xi=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
22
+ `:""},this._extScope=e,this._scope=new Be.Scope({parent:e}),this._nodes=[new qi]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,s){let i=this._scope.toName(t);return n!==void 0&&s&&(this._constants[i.str]=n),this._leafNode(new Ri(e,i,n)),i}const(e,t,n){return this._def(Be.varKinds.const,e,t,n)}let(e,t,n){return this._def(Be.varKinds.let,e,t,n)}var(e,t,n){return this._def(Be.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new us(e,t,n))}add(e,t){return this._leafNode(new Ci(e,k.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==M.nil&&this._leafNode(new Ai(e)),this}object(...e){let t=["{"];for(let[n,s]of e)t.length>1&&t.push(","),t.push(n),(n!==s||this.opts.es5)&&(t.push(":"),(0,M.addCodeArg)(t,s));return t.push("}"),new M._Code(t)}if(e,t,n){if(this._blockNode(new Je(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Je(e))}else(){return this._elseNode(new Er)}endIf(){return this._endBlockNode(Je,Er)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Di(e),t)}forRange(e,t,n,s,i=this.opts.es5?Be.varKinds.var:Be.varKinds.let){let a=this._scope.toName(e);return this._for(new ji(i,a,t,n),()=>s(a))}forOf(e,t,n,s=Be.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let a=t instanceof M.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,M._)`${a}.length`,c=>{this.var(i,(0,M._)`${a}[${c}]`),n(i)})}return this._for(new ls("of",s,i,t),()=>n(i))}forIn(e,t,n,s=this.opts.es5?Be.varKinds.var:Be.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,M._)`Object.keys(${t})`,n);let i=this._scope.toName(e);return this._for(new ls("in",s,i,t),()=>n(i))}endFor(){return this._endBlockNode(Kt)}label(e){return this._leafNode(new Ni(e))}break(e){return this._leafNode(new Ii(e))}return(e){let t=new mn;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(mn)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let s=new ki;if(this._blockNode(s),this.code(e),t){let i=this.name("e");this._currNode=s.catch=new gn(i),t(i)}return n&&(this._currNode=s.finally=new vn,this.code(n)),this._endBlockNode(gn,vn)}throw(e){return this._leafNode(new Ti(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=M.nil,n,s){return this._blockNode(new pn(e,t,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(pn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Je))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};k.CodeGen=xi;function Xt(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function fs(r,e){return e instanceof M._CodeOrName?Xt(r,e.names):r}function wr(r,e,t){if(r instanceof M.Name)return n(r);if(!s(r))return r;return new M._Code(r._items.reduce((i,a)=>(a instanceof M.Name&&(a=n(a)),a instanceof M._Code?i.push(...a._items):i.push(a),i),[]));function n(i){let a=t[i.str];return a===void 0||e[i.str]!==1?i:(delete e[i.str],a)}function s(i){return i instanceof M._Code&&i._items.some(a=>a instanceof M.Name&&e[a.str]===1&&t[a.str]!==void 0)}}function Cg(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function el(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,M._)`!${Li(r)}`}k.not=el;var Ng=tl(k.operators.AND);function Ig(...r){return r.reduce(Ng)}k.and=Ig;var Tg=tl(k.operators.OR);function Ag(...r){return r.reduce(Tg)}k.or=Ag;function tl(r){return(e,t)=>e===M.nil?t:t===M.nil?e:(0,M._)`${Li(e)} ${r} ${Li(t)}`}function Li(r){return r instanceof M.Name?r:(0,M._)`(${r})`}});var G=_(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.checkStrictMode=x.getErrorPath=x.Type=x.useFunc=x.setEvaluated=x.evaluatedPropsToName=x.mergeEvaluated=x.eachItem=x.unescapeJsonPointer=x.escapeJsonPointer=x.escapeFragment=x.unescapeFragment=x.schemaRefOrVal=x.schemaHasRulesButRef=x.schemaHasRules=x.checkUnknownRules=x.alwaysValidSchema=x.toHash=void 0;var Z=L(),qg=dn();function Dg(r){let e={};for(let t of r)e[t]=!0;return e}x.toHash=Dg;function jg(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(sl(r,e),!il(e,r.self.RULES.all))}x.alwaysValidSchema=jg;function sl(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let s=n.RULES.keywords;for(let i in e)s[i]||ul(r,`unknown keyword: "${i}"`)}x.checkUnknownRules=sl;function il(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}x.schemaHasRules=il;function kg(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}x.schemaHasRulesButRef=kg;function xg({topSchemaRef:r,schemaPath:e},t,n,s){if(!s){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Z._)`${t}`}return(0,Z._)`${r}${e}${(0,Z.getProperty)(n)}`}x.schemaRefOrVal=xg;function Lg(r){return al(decodeURIComponent(r))}x.unescapeFragment=Lg;function Mg(r){return encodeURIComponent(Mi(r))}x.escapeFragment=Mg;function Mi(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}x.escapeJsonPointer=Mi;function al(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}x.unescapeJsonPointer=al;function Fg(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}x.eachItem=Fg;function rl({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(s,i,a,c)=>{let u=a===void 0?i:a instanceof Z.Name?(i instanceof Z.Name?r(s,i,a):e(s,i,a),a):i instanceof Z.Name?(e(s,a,i),i):t(i,a);return c===Z.Name&&!(u instanceof Z.Name)?n(s,u):u}}x.mergeEvaluated={props:rl({mergeNames:(r,e,t)=>r.if((0,Z._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,Z._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,Z._)`${t} || {}`).code((0,Z._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,Z._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,Z._)`${t} || {}`),Fi(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:{...r,...e},resultToName:ol}),items:rl({mergeNames:(r,e,t)=>r.if((0,Z._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,Z._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,Z._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,Z._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function ol(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,Z._)`{}`);return e!==void 0&&Fi(r,t,e),t}x.evaluatedPropsToName=ol;function Fi(r,e,t){Object.keys(t).forEach(n=>r.assign((0,Z._)`${e}${(0,Z.getProperty)(n)}`,!0))}x.setEvaluated=Fi;var nl={};function Vg(r,e){return r.scopeValue("func",{ref:e,code:nl[e.code]||(nl[e.code]=new qg._Code(e.code))})}x.useFunc=Vg;var cl;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(cl=x.Type||(x.Type={}));function Hg(r,e,t){if(r instanceof Z.Name){let n=e===cl.Num;return t?n?(0,Z._)`"[" + ${r} + "]"`:(0,Z._)`"['" + ${r} + "']"`:n?(0,Z._)`"/" + ${r}`:(0,Z._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Z.getProperty)(r).toString():"/"+Mi(r)}x.getErrorPath=Hg;function ul(r,e,t=r.opts.strictSchema){if(!!t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}x.checkStrictMode=ul});var $t=_(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var _e=L(),Ug={data:new _e.Name("data"),valCxt:new _e.Name("valCxt"),instancePath:new _e.Name("instancePath"),parentData:new _e.Name("parentData"),parentDataProperty:new _e.Name("parentDataProperty"),rootData:new _e.Name("rootData"),dynamicAnchors:new _e.Name("dynamicAnchors"),vErrors:new _e.Name("vErrors"),errors:new _e.Name("errors"),this:new _e.Name("this"),self:new _e.Name("self"),scope:new _e.Name("scope"),json:new _e.Name("json"),jsonPos:new _e.Name("jsonPos"),jsonLen:new _e.Name("jsonLen"),jsonPart:new _e.Name("jsonPart")};Vi.default=Ug});var _n=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.extendErrors=ye.resetErrorsCount=ye.reportExtraError=ye.reportError=ye.keyword$DataError=ye.keywordError=void 0;var V=L(),hs=G(),Se=$t();ye.keywordError={message:({keyword:r})=>(0,V.str)`must pass "${r}" keyword validation`};ye.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,V.str)`"${r}" keyword must be ${e} ($data)`:(0,V.str)`"${r}" keyword is invalid ($data)`};function Gg(r,e=ye.keywordError,t,n){let{it:s}=r,{gen:i,compositeRule:a,allErrors:c}=s,u=dl(r,e,t);(n!=null?n:a||c)?ll(i,u):fl(s,(0,V._)`[${u}]`)}ye.reportError=Gg;function zg(r,e=ye.keywordError,t){let{it:n}=r,{gen:s,compositeRule:i,allErrors:a}=n,c=dl(r,e,t);ll(s,c),i||a||fl(n,Se.default.vErrors)}ye.reportExtraError=zg;function Kg(r,e){r.assign(Se.default.errors,e),r.if((0,V._)`${Se.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,V._)`${Se.default.vErrors}.length`,e),()=>r.assign(Se.default.vErrors,null)))}ye.resetErrorsCount=Kg;function Xg({gen:r,keyword:e,schemaValue:t,data:n,errsCount:s,it:i}){if(s===void 0)throw new Error("ajv implementation error");let a=r.name("err");r.forRange("i",s,Se.default.errors,c=>{r.const(a,(0,V._)`${Se.default.vErrors}[${c}]`),r.if((0,V._)`${a}.instancePath === undefined`,()=>r.assign((0,V._)`${a}.instancePath`,(0,V.strConcat)(Se.default.instancePath,i.errorPath))),r.assign((0,V._)`${a}.schemaPath`,(0,V.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(r.assign((0,V._)`${a}.schema`,t),r.assign((0,V._)`${a}.data`,n))})}ye.extendErrors=Xg;function ll(r,e){let t=r.const("err",e);r.if((0,V._)`${Se.default.vErrors} === null`,()=>r.assign(Se.default.vErrors,(0,V._)`[${t}]`),(0,V._)`${Se.default.vErrors}.push(${t})`),r.code((0,V._)`${Se.default.errors}++`)}function fl(r,e){let{gen:t,validateName:n,schemaEnv:s}=r;s.$async?t.throw((0,V._)`new ${r.ValidationError}(${e})`):(t.assign((0,V._)`${n}.errors`,e),t.return(!1))}var Wt={keyword:new V.Name("keyword"),schemaPath:new V.Name("schemaPath"),params:new V.Name("params"),propertyName:new V.Name("propertyName"),message:new V.Name("message"),schema:new V.Name("schema"),parentSchema:new V.Name("parentSchema")};function dl(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,V._)`{}`:Wg(r,e,t)}function Wg(r,e,t={}){let{gen:n,it:s}=r,i=[Bg(s,t),Jg(r,t)];return Yg(r,e,i),n.object(...i)}function Bg({errorPath:r},{instancePath:e}){let t=e?(0,V.str)`${r}${(0,hs.getErrorPath)(e,hs.Type.Str)}`:r;return[Se.default.instancePath,(0,V.strConcat)(Se.default.instancePath,t)]}function Jg({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let s=n?e:(0,V.str)`${e}/${r}`;return t&&(s=(0,V.str)`${s}${(0,hs.getErrorPath)(t,hs.Type.Str)}`),[Wt.schemaPath,s]}function Yg(r,{params:e,message:t},n){let{keyword:s,data:i,schemaValue:a,it:c}=r,{opts:u,propertyName:o,topSchemaRef:l,schemaPath:d}=c;n.push([Wt.keyword,s],[Wt.params,typeof e=="function"?e(r):e||(0,V._)`{}`]),u.messages&&n.push([Wt.message,typeof t=="function"?t(r):t]),u.verbose&&n.push([Wt.schema,a],[Wt.parentSchema,(0,V._)`${l}${d}`],[Se.default.data,i]),o&&n.push([Wt.propertyName,o])}});var pl=_(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.boolOrEmptySchema=br.topBoolOrEmptySchema=void 0;var Zg=_n(),Qg=L(),ev=$t(),tv={message:"boolean schema is false"};function rv(r){let{gen:e,schema:t,validateName:n}=r;t===!1?hl(r,!1):typeof t=="object"&&t.$async===!0?e.return(ev.default.data):(e.assign((0,Qg._)`${n}.errors`,null),e.return(!0))}br.topBoolOrEmptySchema=rv;function nv(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),hl(r)):t.var(e,!0)}br.boolOrEmptySchema=nv;function hl(r,e){let{gen:t,data:n}=r,s={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,Zg.reportError)(s,tv,void 0,e)}});var Hi=_(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.getRules=Sr.isJSONType=void 0;var sv=["string","number","integer","boolean","null","object","array"],iv=new Set(sv);function av(r){return typeof r=="string"&&iv.has(r)}Sr.isJSONType=av;function ov(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}Sr.getRules=ov});var Ui=_(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.shouldUseRule=Rt.shouldUseGroup=Rt.schemaHasRulesForType=void 0;function cv({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&ml(r,n)}Rt.schemaHasRulesForType=cv;function ml(r,e){return e.rules.some(t=>gl(r,t))}Rt.shouldUseGroup=ml;function gl(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}Rt.shouldUseRule=gl});var $n=_(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.reportTypeError=de.checkDataTypes=de.checkDataType=de.coerceAndCheckDataType=de.getJSONTypes=de.getSchemaTypes=de.DataType=void 0;var uv=Hi(),lv=Ui(),fv=_n(),q=L(),vl=G(),yn;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(yn=de.DataType||(de.DataType={}));function dv(r){let e=_l(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}de.getSchemaTypes=dv;function _l(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(uv.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}de.getJSONTypes=_l;function hv(r,e){let{gen:t,data:n,opts:s}=r,i=pv(e,s.coerceTypes),a=e.length>0&&!(i.length===0&&e.length===1&&(0,lv.schemaHasRulesForType)(r,e[0]));if(a){let c=zi(e,n,s.strictNumbers,yn.Wrong);t.if(c,()=>{i.length?mv(r,e,i):Ki(r)})}return a}de.coerceAndCheckDataType=hv;var yl=new Set(["string","number","integer","boolean","null"]);function pv(r,e){return e?r.filter(t=>yl.has(t)||e==="array"&&t==="array"):[]}function mv(r,e,t){let{gen:n,data:s,opts:i}=r,a=n.let("dataType",(0,q._)`typeof ${s}`),c=n.let("coerced",(0,q._)`undefined`);i.coerceTypes==="array"&&n.if((0,q._)`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,q._)`${s}[0]`).assign(a,(0,q._)`typeof ${s}`).if(zi(e,s,i.strictNumbers),()=>n.assign(c,s))),n.if((0,q._)`${c} !== undefined`);for(let o of t)(yl.has(o)||o==="array"&&i.coerceTypes==="array")&&u(o);n.else(),Ki(r),n.endIf(),n.if((0,q._)`${c} !== undefined`,()=>{n.assign(s,c),gv(r,c)});function u(o){switch(o){case"string":n.elseIf((0,q._)`${a} == "number" || ${a} == "boolean"`).assign(c,(0,q._)`"" + ${s}`).elseIf((0,q._)`${s} === null`).assign(c,(0,q._)`""`);return;case"number":n.elseIf((0,q._)`${a} == "boolean" || ${s} === null
23
23
  || (${a} == "string" && ${s} && ${s} == +${s})`).assign(c,(0,q._)`+${s}`);return;case"integer":n.elseIf((0,q._)`${a} === "boolean" || ${s} === null
24
24
  || (${a} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(c,(0,q._)`+${s}`);return;case"boolean":n.elseIf((0,q._)`${s} === "false" || ${s} === 0 || ${s} === null`).assign(c,!1).elseIf((0,q._)`${s} === "true" || ${s} === 1`).assign(c,!0);return;case"null":n.elseIf((0,q._)`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(c,null);return;case"array":n.elseIf((0,q._)`${a} === "string" || ${a} === "number"
25
- || ${a} === "boolean" || ${s} === null`).assign(c,(0,q._)`[${s}]`)}}}function Ov({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,q._)`${e} !== undefined`,()=>r.assign((0,q._)`${e}[${t}]`,n))}function Ki(r,e,t,n=En.Correct){let s=n===En.Correct?q.operators.EQ:q.operators.NEQ,i;switch(r){case"null":return(0,q._)`${e} ${s} null`;case"array":i=(0,q._)`Array.isArray(${e})`;break;case"object":i=(0,q._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=a((0,q._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=a();break;default:return(0,q._)`typeof ${e} ${s} ${r}`}return n===En.Correct?i:(0,q.not)(i);function a(c=q.nil){return(0,q.and)((0,q._)`typeof ${e} == "number"`,c,t?(0,q._)`isFinite(${e})`:q.nil)}}he.checkDataType=Ki;function Xi(r,e,t,n){if(r.length===1)return Ki(r[0],e,t,n);let s,i=(0,El.toHash)(r);if(i.array&&i.object){let a=(0,q._)`typeof ${e} != "object"`;s=i.null?a:(0,q._)`!${e} || ${a}`,delete i.null,delete i.array,delete i.object}else s=q.nil;i.number&&delete i.integer;for(let a in i)s=(0,q.and)(s,Ki(a,e,t,n));return s}he.checkDataTypes=Xi;var Pv={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,q._)`{type: ${r}}`:(0,q._)`{type: ${e}}`};function Wi(r){let e=Rv(r);(0,$v.reportError)(e,Pv)}he.reportTypeError=Wi;function Rv(r){let{gen:e,data:t,schema:n}=r,s=(0,El.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:r}}});var Ol=_(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.assignDefaults=void 0;var Rr=L(),Cv=G();function Nv(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let s in t)Sl(r,s,t[s].default);else e==="array"&&Array.isArray(n)&&n.forEach((s,i)=>Sl(r,i,s.default))}gs.assignDefaults=Nv;function Sl(r,e,t){let{gen:n,compositeRule:s,data:i,opts:a}=r;if(t===void 0)return;let c=(0,Rr._)`${i}${(0,Rr.getProperty)(e)}`;if(s){(0,Cv.checkStrictMode)(r,`default is ignored for: ${c}`);return}let u=(0,Rr._)`${c} === undefined`;a.useDefaults==="empty"&&(u=(0,Rr._)`${u} || ${c} === null || ${c} === ""`),n.if(u,(0,Rr._)`${c} = ${(0,Rr.stringify)(t)}`)}});var Xe=_(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.validateUnion=J.validateArray=J.usePattern=J.callValidateCode=J.schemaProperties=J.allSchemaProperties=J.noPropertyInData=J.propertyInData=J.isOwnProperty=J.hasPropFunc=J.reportMissingProp=J.checkMissingProp=J.checkReportMissingProp=void 0;var te=L(),Bi=G(),It=wt(),Iv=G();function Tv(r,e){let{gen:t,data:n,it:s}=r;t.if(Yi(t,n,e,s.opts.ownProperties),()=>{r.setParams({missingProperty:(0,te._)`${e}`},!0),r.error()})}J.checkReportMissingProp=Tv;function Av({gen:r,data:e,it:{opts:t}},n,s){return(0,te.or)(...n.map(i=>(0,te.and)(Yi(r,e,i,t.ownProperties),(0,te._)`${s} = ${i}`)))}J.checkMissingProp=Av;function qv(r,e){r.setParams({missingProperty:e},!0),r.error()}J.reportMissingProp=qv;function Pl(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,te._)`Object.prototype.hasOwnProperty`})}J.hasPropFunc=Pl;function Ji(r,e,t){return(0,te._)`${Pl(r)}.call(${e}, ${t})`}J.isOwnProperty=Ji;function Dv(r,e,t,n){let s=(0,te._)`${e}${(0,te.getProperty)(t)} !== undefined`;return n?(0,te._)`${s} && ${Ji(r,e,t)}`:s}J.propertyInData=Dv;function Yi(r,e,t,n){let s=(0,te._)`${e}${(0,te.getProperty)(t)} === undefined`;return n?(0,te.or)(s,(0,te.not)(Ji(r,e,t))):s}J.noPropertyInData=Yi;function Rl(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}J.allSchemaProperties=Rl;function jv(r,e){return Rl(e).filter(t=>!(0,Bi.alwaysValidSchema)(r,e[t]))}J.schemaProperties=jv;function kv({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:s,errorPath:i},it:a},c,u,o){let l=o?(0,te._)`${r}, ${e}, ${n}${s}`:e,d=[[It.default.instancePath,(0,te.strConcat)(It.default.instancePath,i)],[It.default.parentData,a.parentData],[It.default.parentDataProperty,a.parentDataProperty],[It.default.rootData,It.default.rootData]];a.opts.dynamicRef&&d.push([It.default.dynamicAnchors,It.default.dynamicAnchors]);let y=(0,te._)`${l}, ${t.object(...d)}`;return u!==te.nil?(0,te._)`${c}.call(${u}, ${y})`:(0,te._)`${c}(${y})`}J.callValidateCode=kv;var xv=(0,te._)`new RegExp`;function Lv({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:s}=e.code,i=s(t,n);return r.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,te._)`${s.code==="new RegExp"?xv:(0,Iv.useFunc)(r,s)}(${t}, ${n})`})}J.usePattern=Lv;function Mv(r){let{gen:e,data:t,keyword:n,it:s}=r,i=e.name("valid");if(s.allErrors){let c=e.let("valid",!0);return a(()=>e.assign(c,!1)),c}return e.var(i,!0),a(()=>e.break()),i;function a(c){let u=e.const("len",(0,te._)`${t}.length`);e.forRange("i",0,u,o=>{r.subschema({keyword:n,dataProp:o,dataPropType:Bi.Type.Num},i),e.if((0,te.not)(i),c)})}}J.validateArray=Mv;function Fv(r){let{gen:e,schema:t,keyword:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(u=>(0,Bi.alwaysValidSchema)(s,u))&&!s.opts.unevaluated)return;let a=e.let("valid",!1),c=e.name("_valid");e.block(()=>t.forEach((u,o)=>{let l=r.subschema({keyword:n,schemaProp:o,compositeRule:!0},c);e.assign(a,(0,te._)`${a} || ${c}`),r.mergeValidEvaluated(l,c)||e.if((0,te.not)(a))})),r.result(a,()=>r.reset(),()=>r.error(!0))}J.validateUnion=Fv});var Il=_(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.validateKeywordUsage=ct.validSchemaType=ct.funcKeywordCode=ct.macroKeywordCode=void 0;var Pe=L(),Yt=wt(),Vv=Xe(),Hv=$n();function Uv(r,e){let{gen:t,keyword:n,schema:s,parentSchema:i,it:a}=r,c=e.macro.call(a.self,s,i,a),u=Nl(t,n,c);a.opts.validateSchema!==!1&&a.self.validateSchema(c,!0);let o=t.name("valid");r.subschema({schema:c,schemaPath:Pe.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},o),r.pass(o,()=>r.error(!0))}ct.macroKeywordCode=Uv;function Gv(r,e){var t;let{gen:n,keyword:s,schema:i,parentSchema:a,$data:c,it:u}=r;Kv(u,e);let o=!c&&e.compile?e.compile.call(u.self,i,a,u):e.validate,l=Nl(n,s,o),d=n.let("valid");r.block$data(d,y),r.ok((t=e.valid)!==null&&t!==void 0?t:d);function y(){if(e.errors===!1)E(),e.modifying&&Cl(r),w(()=>r.error());else{let b=e.async?m():$();e.modifying&&Cl(r),w(()=>zv(r,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>E((0,Pe._)`await `),D=>n.assign(d,!1).if((0,Pe._)`${D} instanceof ${u.ValidationError}`,()=>n.assign(b,(0,Pe._)`${D}.errors`),()=>n.throw(D))),b}function $(){let b=(0,Pe._)`${l}.errors`;return n.assign(b,null),E(Pe.nil),b}function E(b=e.async?(0,Pe._)`await `:Pe.nil){let D=u.opts.passContext?Yt.default.this:Yt.default.self,T=!("compile"in e&&!c||e.schema===!1);n.assign(d,(0,Pe._)`${b}${(0,Vv.callValidateCode)(r,l,D,T)}`,e.modifying)}function w(b){var D;n.if((0,Pe.not)((D=e.valid)!==null&&D!==void 0?D:d),b)}}ct.funcKeywordCode=Gv;function Cl(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,Pe._)`${n.parentData}[${n.parentDataProperty}]`))}function zv(r,e){let{gen:t}=r;t.if((0,Pe._)`Array.isArray(${e})`,()=>{t.assign(Yt.default.vErrors,(0,Pe._)`${Yt.default.vErrors} === null ? ${e} : ${Yt.default.vErrors}.concat(${e})`).assign(Yt.default.errors,(0,Pe._)`${Yt.default.vErrors}.length`),(0,Hv.extendErrors)(r)},()=>r.error())}function Kv({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function Nl(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,Pe.stringify)(t)})}function Xv(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r>"u")}ct.validSchemaType=Xv;function Wv({schema:r,opts:e,self:t,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");let a=s.dependencies;if(a!=null&&a.some(c=>!Object.prototype.hasOwnProperty.call(r,c)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(s.validateSchema&&!s.validateSchema(r[i])){let u=`keyword "${i}" value is invalid at path "${n}": `+t.errorsText(s.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(u);else throw new Error(u)}}ct.validateKeywordUsage=Wv});var Al=_(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.extendSubschemaMode=Tt.extendSubschemaData=Tt.getSubschema=void 0;var ut=L(),Tl=G();function Bv(r,{keyword:e,schemaProp:t,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let c=r.schema[e];return t===void 0?{schema:c,schemaPath:(0,ut._)`${r.schemaPath}${(0,ut.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:c[t],schemaPath:(0,ut._)`${r.schemaPath}${(0,ut.getProperty)(e)}${(0,ut.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,Tl.escapeFragment)(t)}`}}if(n!==void 0){if(s===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Tt.getSubschema=Bv;function Jv(r,e,{dataProp:t,dataPropType:n,data:s,dataTypes:i,propertyName:a}){if(s!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=e;if(t!==void 0){let{errorPath:o,dataPathArr:l,opts:d}=e,y=c.let("data",(0,ut._)`${e.data}${(0,ut.getProperty)(t)}`,!0);u(y),r.errorPath=(0,ut.str)`${o}${(0,Tl.getErrorPath)(t,n,d.jsPropertySyntax)}`,r.parentDataProperty=(0,ut._)`${t}`,r.dataPathArr=[...l,r.parentDataProperty]}if(s!==void 0){let o=s instanceof ut.Name?s:c.let("data",s,!0);u(o),a!==void 0&&(r.propertyName=a)}i&&(r.dataTypes=i);function u(o){r.data=o,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,o]}}Tt.extendSubschemaData=Jv;function Yv(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(r.compositeRule=n),s!==void 0&&(r.createErrors=s),i!==void 0&&(r.allErrors=i),r.jtdDiscriminator=e,r.jtdMetadata=t}Tt.extendSubschemaMode=Yv});var Zi=_((Zw,ql)=>{"use strict";ql.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!r(e[s],t[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}});var jl=_((Qw,Dl)=>{"use strict";var At=Dl.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},s=t.post||function(){};vs(e,n,s,r,"",r)};At.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};At.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};At.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};At.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 vs(r,e,t,n,s,i,a,c,u,o){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,s,i,a,c,u,o);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in At.arrayKeywords)for(var y=0;y<d.length;y++)vs(r,e,t,d[y],s+"/"+l+"/"+y,i,s,l,n,y)}else if(l in At.propsKeywords){if(d&&typeof d=="object")for(var m in d)vs(r,e,t,d[m],s+"/"+l+"/"+Zv(m),i,s,l,n,m)}else(l in At.keywords||r.allKeys&&!(l in At.skipKeywords))&&vs(r,e,t,d,s+"/"+l,i,s,l,n)}t(n,s,i,a,c,u,o)}}function Zv(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var bn=_(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getSchemaRefs=Ie.resolveUrl=Ie.normalizeId=Ie._getFullPath=Ie.getFullPath=Ie.inlineRef=void 0;var Qv=G(),e_=Zi(),t_=jl(),r_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n_(r,e=!0){return typeof r=="boolean"?!0:e===!0?!Qi(r):e?kl(r)<=e:!1}Ie.inlineRef=n_;var s_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Qi(r){for(let e in r){if(s_.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(Qi)||typeof t=="object"&&Qi(t))return!0}return!1}function kl(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!r_.has(t)&&(typeof r[t]=="object"&&(0,Qv.eachItem)(r[t],n=>e+=kl(n)),e===1/0))return 1/0}return e}function xl(r,e="",t){t!==!1&&(e=Cr(e));let n=r.parse(e);return Ll(r,n)}Ie.getFullPath=xl;function Ll(r,e){return r.serialize(e).split("#")[0]+"#"}Ie._getFullPath=Ll;var i_=/#\/?$/;function Cr(r){return r?r.replace(i_,""):""}Ie.normalizeId=Cr;function a_(r,e,t){return t=Cr(t),r.resolve(e,t)}Ie.resolveUrl=a_;var o_=/^[a-z_][-a-z0-9._]*$/i;function c_(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,s=Cr(r[t]||e),i={"":s},a=xl(n,s,!1),c={},u=new Set;return t_(r,{allKeys:!0},(d,y,m,$)=>{if($===void 0)return;let E=a+y,w=i[$];typeof d[t]=="string"&&(w=b.call(this,d[t])),D.call(this,d.$anchor),D.call(this,d.$dynamicAnchor),i[y]=w;function b(T){let z=this.opts.uriResolver.resolve;if(T=Cr(w?z(w,T):T),u.has(T))throw l(T);u.add(T);let C=this.refs[T];return typeof C=="string"&&(C=this.refs[C]),typeof C=="object"?o(d,C.schema,T):T!==Cr(E)&&(T[0]==="#"?(o(d,c[T],T),c[T]=d):this.refs[T]=E),T}function D(T){if(typeof T=="string"){if(!o_.test(T))throw new Error(`invalid anchor "${T}"`);b.call(this,`#${T}`)}}}),c;function o(d,y,m){if(y!==void 0&&!e_(d,y))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Ie.getSchemaRefs=c_});var Pn=_(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.getData=qt.KeywordCxt=qt.validateFunctionCode=void 0;var Gl=_l(),Ml=wn(),ta=zi(),_s=wn(),u_=Ol(),On=Il(),ea=Al(),R=L(),I=wt(),l_=bn(),bt=G(),Sn=$n();function f_(r){if(Xl(r)&&(Wl(r),Kl(r))){p_(r);return}zl(r,()=>(0,Gl.topBoolOrEmptySchema)(r))}qt.validateFunctionCode=f_;function zl({gen:r,validateName:e,schema:t,schemaEnv:n,opts:s},i){s.code.es5?r.func(e,(0,R._)`${I.default.data}, ${I.default.valCxt}`,n.$async,()=>{r.code((0,R._)`"use strict"; ${Fl(t,s)}`),h_(r,s),r.code(i)}):r.func(e,(0,R._)`${I.default.data}, ${d_(s)}`,n.$async,()=>r.code(Fl(t,s)).code(i))}function d_(r){return(0,R._)`{${I.default.instancePath}="", ${I.default.parentData}, ${I.default.parentDataProperty}, ${I.default.rootData}=${I.default.data}${r.dynamicRef?(0,R._)`, ${I.default.dynamicAnchors}={}`:R.nil}}={}`}function h_(r,e){r.if(I.default.valCxt,()=>{r.var(I.default.instancePath,(0,R._)`${I.default.valCxt}.${I.default.instancePath}`),r.var(I.default.parentData,(0,R._)`${I.default.valCxt}.${I.default.parentData}`),r.var(I.default.parentDataProperty,(0,R._)`${I.default.valCxt}.${I.default.parentDataProperty}`),r.var(I.default.rootData,(0,R._)`${I.default.valCxt}.${I.default.rootData}`),e.dynamicRef&&r.var(I.default.dynamicAnchors,(0,R._)`${I.default.valCxt}.${I.default.dynamicAnchors}`)},()=>{r.var(I.default.instancePath,(0,R._)`""`),r.var(I.default.parentData,(0,R._)`undefined`),r.var(I.default.parentDataProperty,(0,R._)`undefined`),r.var(I.default.rootData,I.default.data),e.dynamicRef&&r.var(I.default.dynamicAnchors,(0,R._)`{}`)})}function p_(r){let{schema:e,opts:t,gen:n}=r;zl(r,()=>{t.$comment&&e.$comment&&Jl(r),y_(r),n.let(I.default.vErrors,null),n.let(I.default.errors,0),t.unevaluated&&m_(r),Bl(r),w_(r)})}function m_(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,R._)`${t}.evaluated`),e.if((0,R._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,R._)`${r.evaluated}.props`,(0,R._)`undefined`)),e.if((0,R._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,R._)`${r.evaluated}.items`,(0,R._)`undefined`))}function Fl(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,R._)`/*# sourceURL=${t} */`:R.nil}function g_(r,e){if(Xl(r)&&(Wl(r),Kl(r))){v_(r,e);return}(0,Gl.boolOrEmptySchema)(r,e)}function Kl({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function Xl(r){return typeof r.schema!="boolean"}function v_(r,e){let{schema:t,gen:n,opts:s}=r;s.$comment&&t.$comment&&Jl(r),$_(r),E_(r);let i=n.const("_errs",I.default.errors);Bl(r,i),n.var(e,(0,R._)`${i} === ${I.default.errors}`)}function Wl(r){(0,bt.checkUnknownRules)(r),__(r)}function Bl(r,e){if(r.opts.jtd)return Vl(r,[],!1,e);let t=(0,Ml.getSchemaTypes)(r.schema),n=(0,Ml.coerceAndCheckDataType)(r,t);Vl(r,t,!n,e)}function __(r){let{schema:e,errSchemaPath:t,opts:n,self:s}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,bt.schemaHasRulesButRef)(e,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function y_(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,bt.checkStrictMode)(r,"default is ignored in the schema root")}function $_(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,l_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function E_(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function Jl({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:s}){let i=t.$comment;if(s.$comment===!0)r.code((0,R._)`${I.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){let a=(0,R.str)`${n}/$comment`,c=r.scopeValue("root",{ref:e.root});r.code((0,R._)`${I.default.self}.opts.$comment(${i}, ${a}, ${c}.schema)`)}}function w_(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:s,opts:i}=r;t.$async?e.if((0,R._)`${I.default.errors} === 0`,()=>e.return(I.default.data),()=>e.throw((0,R._)`new ${s}(${I.default.vErrors})`)):(e.assign((0,R._)`${n}.errors`,I.default.vErrors),i.unevaluated&&b_(r),e.return((0,R._)`${I.default.errors} === 0`))}function b_({gen:r,evaluated:e,props:t,items:n}){t instanceof R.Name&&r.assign((0,R._)`${e}.props`,t),n instanceof R.Name&&r.assign((0,R._)`${e}.items`,n)}function Vl(r,e,t,n){let{gen:s,schema:i,data:a,allErrors:c,opts:u,self:o}=r,{RULES:l}=o;if(i.$ref&&(u.ignoreKeywordsWithRef||!(0,bt.schemaHasRulesButRef)(i,l))){s.block(()=>Yl(r,"$ref",l.all.$ref.definition));return}u.jtd||S_(r,e),s.block(()=>{for(let y of l.rules)d(y);d(l.post)});function d(y){!(0,ta.shouldUseGroup)(i,y)||(y.type?(s.if((0,_s.checkDataType)(y.type,a,u.strictNumbers)),Hl(r,y),e.length===1&&e[0]===y.type&&t&&(s.else(),(0,_s.reportTypeError)(r)),s.endIf()):Hl(r,y),c||s.if((0,R._)`${I.default.errors} === ${n||0}`))}}function Hl(r,e){let{gen:t,schema:n,opts:{useDefaults:s}}=r;s&&(0,u_.assignDefaults)(r,e.type),t.block(()=>{for(let i of e.rules)(0,ta.shouldUseRule)(n,i)&&Yl(r,i.keyword,i.definition,e.type)})}function S_(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(O_(r,e),r.opts.allowUnionTypes||P_(r,e),R_(r,r.dataTypes))}function O_(r,e){if(!!e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{Ul(r.dataTypes,t)||ra(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),r.dataTypes=r.dataTypes.filter(t=>Ul(e,t))}}function P_(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&ra(r,"use allowUnionTypes to allow union type keyword")}function R_(r,e){let t=r.self.RULES.all;for(let n in t){let s=t[n];if(typeof s=="object"&&(0,ta.shouldUseRule)(r.schema,s)){let{type:i}=s.definition;i.length&&!i.some(a=>C_(e,a))&&ra(r,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function C_(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function Ul(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function ra(r,e){e+=` at "${r.schemaEnv.baseId+r.errSchemaPath}" (strictTypes)`,(0,bt.checkStrictMode)(r,e,r.opts.strictTypes)}var ys=class{constructor(e,t,n){if((0,On.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,bt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Zl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,On.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",I.default.errors))}result(e,t,n){this.failResult((0,R.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,R.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,R._)`${t} !== undefined && (${(0,R.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?Sn.reportExtraError:Sn.reportError)(this,this.def.error,t)}$dataError(){(0,Sn.reportError)(this,this.def.$dataError||Sn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Sn.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=R.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=R.nil,t=R.nil){if(!this.$data)return;let{gen:n,schemaCode:s,schemaType:i,def:a}=this;n.if((0,R.or)((0,R._)`${s} === undefined`,t)),e!==R.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==R.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:s,it:i}=this;return(0,R.or)(a(),c());function a(){if(n.length){if(!(t instanceof R.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,R._)`${(0,_s.checkDataTypes)(u,t,i.opts.strictNumbers,_s.DataType.Wrong)}`}return R.nil}function c(){if(s.validateSchema){let u=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,R._)`!${u}(${t})`}return R.nil}}subschema(e,t){let n=(0,ea.getSubschema)(this.it,e);(0,ea.extendSubschemaData)(n,this.it,e),(0,ea.extendSubschemaMode)(n,e);let s=Ue(oe(oe({},this.it),n),{items:void 0,props:void 0});return g_(s,t),s}mergeEvaluated(e,t){let{it:n,gen:s}=this;!n.opts.unevaluated||(n.props!==!0&&e.props!==void 0&&(n.props=bt.mergeEvaluated.props(s,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=bt.mergeEvaluated.items(s,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(t,()=>this.mergeEvaluated(e,R.Name)),!0}};qt.KeywordCxt=ys;function Yl(r,e,t,n){let s=new ys(r,t,e);"code"in t?t.code(s,n):s.$data&&t.validate?(0,On.funcKeywordCode)(s,t):"macro"in t?(0,On.macroKeywordCode)(s,t):(t.compile||t.validate)&&(0,On.funcKeywordCode)(s,t)}var N_=/^\/(?:[^~]|~0|~1)*$/,I_=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Zl(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let s,i;if(r==="")return I.default.rootData;if(r[0]==="/"){if(!N_.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);s=r,i=I.default.rootData}else{let o=I_.exec(r);if(!o)throw new Error(`Invalid JSON-pointer: ${r}`);let l=+o[1];if(s=o[2],s==="#"){if(l>=e)throw new Error(u("property/index",l));return n[e-l]}if(l>e)throw new Error(u("data",l));if(i=t[e-l],!s)return i}let a=i,c=s.split("/");for(let o of c)o&&(i=(0,R._)`${i}${(0,R.getProperty)((0,bt.unescapeJsonPointer)(o))}`,a=(0,R._)`${a} && ${i}`);return a;function u(o,l){return`Cannot access ${o} ${l} levels up, current level is ${e}`}}qt.getData=Zl});var ia=_(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});var na=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};sa.default=na});var ua=_(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});var aa=bn(),oa=class extends Error{constructor(e,t,n,s){super(s||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,aa.resolveUrl)(e,t,n),this.missingSchema=(0,aa.normalizeId)((0,aa.getFullPath)(e,this.missingRef))}};ca.default=oa});var Es=_(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.resolveSchema=We.getCompilingSchema=We.resolveRef=We.compileSchema=We.SchemaEnv=void 0;var Qe=L(),T_=ia(),Zt=wt(),et=bn(),Ql=G(),A_=Pn(),Nr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,et.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};We.SchemaEnv=Nr;function fa(r){let e=ef.call(this,r);if(e)return e;let t=(0,et.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,a=new Qe.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i}),c;r.$async&&(c=a.scopeValue("Error",{ref:T_.default,code:(0,Qe._)`require("ajv/dist/runtime/validation_error").default`}));let u=a.scopeName("validate");r.validateName=u;let o={gen:a,allErrors:this.opts.allErrors,data:Zt.default.data,parentData:Zt.default.parentData,parentDataProperty:Zt.default.parentDataProperty,dataNames:[Zt.default.data],dataPathArr:[Qe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Qe.stringify)(r.schema)}:{ref:r.schema}),validateName:u,ValidationError:c,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Qe.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Qe._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(r),(0,A_.validateFunctionCode)(o),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(Zt.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,r));let m=new Function(`${Zt.default.self}`,`${Zt.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:m}),m.errors=null,m.schema=r.schema,m.schemaEnv=r,r.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:u,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:$,items:E}=o;m.evaluated={props:$ instanceof Qe.Name?void 0:$,items:E instanceof Qe.Name?void 0:E,dynamicProps:$ instanceof Qe.Name,dynamicItems:E instanceof Qe.Name},m.source&&(m.source.evaluated=(0,Qe.stringify)(m.evaluated))}return r.validate=m,r}catch(d){throw delete r.validate,delete r.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(r)}}We.compileSchema=fa;function q_(r,e,t){var n;t=(0,et.resolveUrl)(this.opts.uriResolver,e,t);let s=r.refs[t];if(s)return s;let i=k_.call(this,r,t);if(i===void 0){let a=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:c}=this.opts;a&&(i=new Nr({schema:a,schemaId:c,root:r,baseId:e}))}if(i!==void 0)return r.refs[t]=D_.call(this,i)}We.resolveRef=q_;function D_(r){return(0,et.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:fa.call(this,r)}function ef(r){for(let e of this._compilations)if(j_(e,r))return e}We.getCompilingSchema=ef;function j_(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function k_(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||$s.call(this,r,e)}function $s(r,e){let t=this.opts.uriResolver.parse(e),n=(0,et._getFullPath)(this.opts.uriResolver,t),s=(0,et.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===s)return la.call(this,t,r);let i=(0,et.normalizeId)(n),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let c=$s.call(this,r,a);return typeof(c==null?void 0:c.schema)!="object"?void 0:la.call(this,t,c)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||fa.call(this,a),i===(0,et.normalizeId)(e)){let{schema:c}=a,{schemaId:u}=this.opts,o=c[u];return o&&(s=(0,et.resolveUrl)(this.opts.uriResolver,s,o)),new Nr({schema:c,schemaId:u,root:r,baseId:s})}return la.call(this,t,a)}}We.resolveSchema=$s;var x_=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function la(r,{baseId:e,schema:t,root:n}){var s;if(((s=r.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(let c of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let u=t[(0,Ql.unescapeFragment)(c)];if(u===void 0)return;t=u;let o=typeof t=="object"&&t[this.opts.schemaId];!x_.has(c)&&o&&(e=(0,et.resolveUrl)(this.opts.uriResolver,e,o))}let i;if(typeof t!="boolean"&&t.$ref&&!(0,Ql.schemaHasRulesButRef)(t,this.RULES)){let c=(0,et.resolveUrl)(this.opts.uriResolver,e,t.$ref);i=$s.call(this,n,c)}let{schemaId:a}=this.opts;if(i=i||new Nr({schema:t,schemaId:a,root:n,baseId:e}),i.schema!==i.root.schema)return i}});var tf=_((ib,L_)=>{L_.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var nf=_((ws,rf)=>{(function(r,e){typeof ws=="object"&&typeof rf<"u"?e(ws):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})(ws,function(r){"use strict";function e(){for(var h=arguments.length,f=Array(h),p=0;p<h;p++)f[p]=arguments[p];if(f.length>1){f[0]=f[0].slice(0,-1);for(var g=f.length-1,v=1;v<g;++v)f[v]=f[v].slice(1,-1);return f[g]=f[g].slice(1),f.join("")}else return f[0]}function t(h){return"(?:"+h+")"}function n(h){return h===void 0?"undefined":h===null?"null":Object.prototype.toString.call(h).split(" ").pop().split("]").shift().toLowerCase()}function s(h){return h.toUpperCase()}function i(h){return h!=null?h instanceof Array?h:typeof h.length!="number"||h.split||h.setInterval||h.call?[h]:Array.prototype.slice.call(h):[]}function a(h,f){var p=h;if(f)for(var g in f)p[g]=f[g];return p}function c(h){var f="[A-Za-z]",p="[\\x0D]",g="[0-9]",v="[\\x22]",S=e(g,"[A-Fa-f]"),A="[\\x0A]",H="[\\x20]",W=t(t("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+t("%[89A-Fa-f]"+S+"%"+S+S)+"|"+t("%"+S+S)),ue="[\\:\\/\\?\\#\\[\\]\\@]",F="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",se=e(ue,F),le=h?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ne=h?"[\\uE000-\\uF8FF]":"[]",K=e(f,g,"[\\-\\.\\_\\~]",le),ie=t(f+e(f,g,"[\\+\\-\\.]")+"*"),B=t(t(W+"|"+e(K,F,"[\\:]"))+"*"),kt=t(t("25[0-5]")+"|"+t("2[0-4]"+g)+"|"+t("1"+g+g)+"|"+t("[1-9]"+g)+"|"+g),qe=t(t("25[0-5]")+"|"+t("2[0-4]"+g)+"|"+t("1"+g+g)+"|"+t("0?[1-9]"+g)+"|0?0?"+g),Ve=t(qe+"\\."+qe+"\\."+qe+"\\."+qe),Y=t(S+"{1,4}"),De=t(t(Y+"\\:"+Y)+"|"+Ve),He=t(t(Y+"\\:")+"{6}"+De),at=t("\\:\\:"+t(Y+"\\:")+"{5}"+De),xt=t(t(Y)+"?\\:\\:"+t(Y+"\\:")+"{4}"+De),pt=t(t(t(Y+"\\:")+"{0,1}"+Y)+"?\\:\\:"+t(Y+"\\:")+"{3}"+De),zr=t(t(t(Y+"\\:")+"{0,2}"+Y)+"?\\:\\:"+t(Y+"\\:")+"{2}"+De),Gn=t(t(t(Y+"\\:")+"{0,3}"+Y)+"?\\:\\:"+Y+"\\:"+De),zn=t(t(t(Y+"\\:")+"{0,4}"+Y)+"?\\:\\:"+De),or=t(t(t(Y+"\\:")+"{0,5}"+Y)+"?\\:\\:"+Y),cr=t(t(t(Y+"\\:")+"{0,6}"+Y)+"?\\:\\:"),mt=t([He,at,xt,pt,zr,Gn,zn,or,cr].join("|")),ur=t(t(K+"|"+W)+"+"),zs=t(mt+"\\%25"+ur),Lt=t(mt+t("\\%25|\\%(?!"+S+"{2})")+ur),uh=t("[vV]"+S+"+\\."+e(K,F,"[\\:]")+"+"),lh=t("\\["+t(Lt+"|"+mt+"|"+uh)+"\\]"),Ro=t(t(W+"|"+e(K,F))+"*"),Kr=t(lh+"|"+Ve+"(?!"+Ro+")|"+Ro),Xr=t(g+"*"),Co=t(t(B+"@")+"?"+Kr+t("\\:"+Xr)+"?"),Wr=t(W+"|"+e(K,F,"[\\:\\@]")),fh=t(Wr+"*"),No=t(Wr+"+"),dh=t(t(W+"|"+e(K,F,"[\\@]"))+"+"),gt=t(t("\\/"+fh)+"*"),lr=t("\\/"+t(No+gt)+"?"),Ks=t(dh+gt),Kn=t(No+gt),fr="(?!"+Wr+")",CE=t(gt+"|"+lr+"|"+Ks+"|"+Kn+"|"+fr),dr=t(t(Wr+"|"+e("[\\/\\?]",ne))+"*"),Br=t(t(Wr+"|[\\/\\?]")+"*"),Io=t(t("\\/\\/"+Co+gt)+"|"+lr+"|"+Kn+"|"+fr),hh=t(ie+"\\:"+Io+t("\\?"+dr)+"?"+t("\\#"+Br)+"?"),ph=t(t("\\/\\/"+Co+gt)+"|"+lr+"|"+Ks+"|"+fr),mh=t(ph+t("\\?"+dr)+"?"+t("\\#"+Br)+"?"),NE=t(hh+"|"+mh),IE=t(ie+"\\:"+Io+t("\\?"+dr)+"?"),TE="^("+ie+")\\:"+t(t("\\/\\/("+t("("+B+")@")+"?("+Kr+")"+t("\\:("+Xr+")")+"?)")+"?("+gt+"|"+lr+"|"+Kn+"|"+fr+")")+t("\\?("+dr+")")+"?"+t("\\#("+Br+")")+"?$",AE="^(){0}"+t(t("\\/\\/("+t("("+B+")@")+"?("+Kr+")"+t("\\:("+Xr+")")+"?)")+"?("+gt+"|"+lr+"|"+Ks+"|"+fr+")")+t("\\?("+dr+")")+"?"+t("\\#("+Br+")")+"?$",qE="^("+ie+")\\:"+t(t("\\/\\/("+t("("+B+")@")+"?("+Kr+")"+t("\\:("+Xr+")")+"?)")+"?("+gt+"|"+lr+"|"+Kn+"|"+fr+")")+t("\\?("+dr+")")+"?$",DE="^"+t("\\#("+Br+")")+"?$",jE="^"+t("("+B+")@")+"?("+Kr+")"+t("\\:("+Xr+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",f,g,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",K,F),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",K,F),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",K,F),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",K,F),"g"),NOT_QUERY:new RegExp(e("[^\\%]",K,F,"[\\:\\@\\/\\?]",ne),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",K,F,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",K,F),"g"),UNRESERVED:new RegExp(K,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",K,se),"g"),PCT_ENCODED:new RegExp(W,"g"),IPV4ADDRESS:new RegExp("^("+Ve+")$"),IPV6ADDRESS:new RegExp("^\\[?("+mt+")"+t(t("\\%25|\\%(?!"+S+"{2})")+"("+ur+")")+"?\\]?$")}}var u=c(!1),o=c(!0),l=function(){function h(f,p){var g=[],v=!0,S=!1,A=void 0;try{for(var H=f[Symbol.iterator](),W;!(v=(W=H.next()).done)&&(g.push(W.value),!(p&&g.length===p));v=!0);}catch(ue){S=!0,A=ue}finally{try{!v&&H.return&&H.return()}finally{if(S)throw A}}return g}return function(f,p){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f))return h(f,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(h){if(Array.isArray(h)){for(var f=0,p=Array(h.length);f<h.length;f++)p[f]=h[f];return p}else return Array.from(h)},y=2147483647,m=36,$=1,E=26,w=38,b=700,D=72,T=128,z="-",C=/^xn--/,ge=/[^\0-\x7E]/,xe=/[\x2E\u3002\uFF0E\uFF61]/g,Ot={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Le=m-$,re=Math.floor,Me=String.fromCharCode;function rt(h){throw new RangeError(Ot[h])}function Hn(h,f){for(var p=[],g=h.length;g--;)p[g]=f(h[g]);return p}function Un(h,f){var p=h.split("@"),g="";p.length>1&&(g=p[0]+"@",h=p[1]),h=h.replace(xe,".");var v=h.split("."),S=Hn(v,f).join(".");return g+S}function co(h){for(var f=[],p=0,g=h.length;p<g;){var v=h.charCodeAt(p++);if(v>=55296&&v<=56319&&p<g){var S=h.charCodeAt(p++);(S&64512)==56320?f.push(((v&1023)<<10)+(S&1023)+65536):(f.push(v),p--)}else f.push(v)}return f}var Md=function(f){return String.fromCodePoint.apply(String,d(f))},Fd=function(f){return f-48<10?f-22:f-65<26?f-65:f-97<26?f-97:m},uo=function(f,p){return f+22+75*(f<26)-((p!=0)<<5)},lo=function(f,p,g){var v=0;for(f=g?re(f/b):f>>1,f+=re(f/p);f>Le*E>>1;v+=m)f=re(f/Le);return re(v+(Le+1)*f/(f+w))},fo=function(f){var p=[],g=f.length,v=0,S=T,A=D,H=f.lastIndexOf(z);H<0&&(H=0);for(var W=0;W<H;++W)f.charCodeAt(W)>=128&&rt("not-basic"),p.push(f.charCodeAt(W));for(var ue=H>0?H+1:0;ue<g;){for(var F=v,se=1,le=m;;le+=m){ue>=g&&rt("invalid-input");var ne=Fd(f.charCodeAt(ue++));(ne>=m||ne>re((y-v)/se))&&rt("overflow"),v+=ne*se;var K=le<=A?$:le>=A+E?E:le-A;if(ne<K)break;var ie=m-K;se>re(y/ie)&&rt("overflow"),se*=ie}var B=p.length+1;A=lo(v-F,B,F==0),re(v/B)>y-S&&rt("overflow"),S+=re(v/B),v%=B,p.splice(v++,0,S)}return String.fromCodePoint.apply(String,p)},ho=function(f){var p=[];f=co(f);var g=f.length,v=T,S=0,A=D,H=!0,W=!1,ue=void 0;try{for(var F=f[Symbol.iterator](),se;!(H=(se=F.next()).done);H=!0){var le=se.value;le<128&&p.push(Me(le))}}catch(Lt){W=!0,ue=Lt}finally{try{!H&&F.return&&F.return()}finally{if(W)throw ue}}var ne=p.length,K=ne;for(ne&&p.push(z);K<g;){var ie=y,B=!0,kt=!1,qe=void 0;try{for(var Ve=f[Symbol.iterator](),Y;!(B=(Y=Ve.next()).done);B=!0){var De=Y.value;De>=v&&De<ie&&(ie=De)}}catch(Lt){kt=!0,qe=Lt}finally{try{!B&&Ve.return&&Ve.return()}finally{if(kt)throw qe}}var He=K+1;ie-v>re((y-S)/He)&&rt("overflow"),S+=(ie-v)*He,v=ie;var at=!0,xt=!1,pt=void 0;try{for(var zr=f[Symbol.iterator](),Gn;!(at=(Gn=zr.next()).done);at=!0){var zn=Gn.value;if(zn<v&&++S>y&&rt("overflow"),zn==v){for(var or=S,cr=m;;cr+=m){var mt=cr<=A?$:cr>=A+E?E:cr-A;if(or<mt)break;var ur=or-mt,zs=m-mt;p.push(Me(uo(mt+ur%zs,0))),or=re(ur/zs)}p.push(Me(uo(or,0))),A=lo(S,He,K==ne),S=0,++K}}}catch(Lt){xt=!0,pt=Lt}finally{try{!at&&zr.return&&zr.return()}finally{if(xt)throw pt}}++S,++v}return p.join("")},Vd=function(f){return Un(f,function(p){return C.test(p)?fo(p.slice(4).toLowerCase()):p})},Hd=function(f){return Un(f,function(p){return ge.test(p)?"xn--"+ho(p):p})},nr={version:"2.1.0",ucs2:{decode:co,encode:Md},decode:fo,encode:ho,toASCII:Hd,toUnicode:Vd},Fe={};function nt(h){var f=h.charCodeAt(0),p=void 0;return f<16?p="%0"+f.toString(16).toUpperCase():f<128?p="%"+f.toString(16).toUpperCase():f<2048?p="%"+(f>>6|192).toString(16).toUpperCase()+"%"+(f&63|128).toString(16).toUpperCase():p="%"+(f>>12|224).toString(16).toUpperCase()+"%"+(f>>6&63|128).toString(16).toUpperCase()+"%"+(f&63|128).toString(16).toUpperCase(),p}function sr(h){for(var f="",p=0,g=h.length;p<g;){var v=parseInt(h.substr(p+1,2),16);if(v<128)f+=String.fromCharCode(v),p+=3;else if(v>=194&&v<224){if(g-p>=6){var S=parseInt(h.substr(p+4,2),16);f+=String.fromCharCode((v&31)<<6|S&63)}else f+=h.substr(p,6);p+=6}else if(v>=224){if(g-p>=9){var A=parseInt(h.substr(p+4,2),16),H=parseInt(h.substr(p+7,2),16);f+=String.fromCharCode((v&15)<<12|(A&63)<<6|H&63)}else f+=h.substr(p,9);p+=9}else f+=h.substr(p,3),p+=3}return f}function Vs(h,f){function p(g){var v=sr(g);return v.match(f.UNRESERVED)?v:g}return h.scheme&&(h.scheme=String(h.scheme).replace(f.PCT_ENCODED,p).toLowerCase().replace(f.NOT_SCHEME,"")),h.userinfo!==void 0&&(h.userinfo=String(h.userinfo).replace(f.PCT_ENCODED,p).replace(f.NOT_USERINFO,nt).replace(f.PCT_ENCODED,s)),h.host!==void 0&&(h.host=String(h.host).replace(f.PCT_ENCODED,p).toLowerCase().replace(f.NOT_HOST,nt).replace(f.PCT_ENCODED,s)),h.path!==void 0&&(h.path=String(h.path).replace(f.PCT_ENCODED,p).replace(h.scheme?f.NOT_PATH:f.NOT_PATH_NOSCHEME,nt).replace(f.PCT_ENCODED,s)),h.query!==void 0&&(h.query=String(h.query).replace(f.PCT_ENCODED,p).replace(f.NOT_QUERY,nt).replace(f.PCT_ENCODED,s)),h.fragment!==void 0&&(h.fragment=String(h.fragment).replace(f.PCT_ENCODED,p).replace(f.NOT_FRAGMENT,nt).replace(f.PCT_ENCODED,s)),h}function Hs(h){return h.replace(/^0*(.*)/,"$1")||"0"}function Us(h,f){var p=h.match(f.IPV4ADDRESS)||[],g=l(p,2),v=g[1];return v?v.split(".").map(Hs).join("."):h}function po(h,f){var p=h.match(f.IPV6ADDRESS)||[],g=l(p,3),v=g[1],S=g[2];if(v){for(var A=v.toLowerCase().split("::").reverse(),H=l(A,2),W=H[0],ue=H[1],F=ue?ue.split(":").map(Hs):[],se=W.split(":").map(Hs),le=f.IPV4ADDRESS.test(se[se.length-1]),ne=le?7:8,K=se.length-ne,ie=Array(ne),B=0;B<ne;++B)ie[B]=F[B]||se[K+B]||"";le&&(ie[ne-1]=Us(ie[ne-1],f));var kt=ie.reduce(function(He,at,xt){if(!at||at==="0"){var pt=He[He.length-1];pt&&pt.index+pt.length===xt?pt.length++:He.push({index:xt,length:1})}return He},[]),qe=kt.sort(function(He,at){return at.length-He.length})[0],Ve=void 0;if(qe&&qe.length>1){var Y=ie.slice(0,qe.index),De=ie.slice(qe.index+qe.length);Ve=Y.join(":")+"::"+De.join(":")}else Ve=ie.join(":");return S&&(Ve+="%"+S),Ve}else return h}var Ud=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Gd="".match(/(){0}/)[1]===void 0;function dt(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p={},g=f.iri!==!1?o:u;f.reference==="suffix"&&(h=(f.scheme?f.scheme+":":"")+"//"+h);var v=h.match(Ud);if(v){Gd?(p.scheme=v[1],p.userinfo=v[3],p.host=v[4],p.port=parseInt(v[5],10),p.path=v[6]||"",p.query=v[7],p.fragment=v[8],isNaN(p.port)&&(p.port=v[5])):(p.scheme=v[1]||void 0,p.userinfo=h.indexOf("@")!==-1?v[3]:void 0,p.host=h.indexOf("//")!==-1?v[4]:void 0,p.port=parseInt(v[5],10),p.path=v[6]||"",p.query=h.indexOf("?")!==-1?v[7]:void 0,p.fragment=h.indexOf("#")!==-1?v[8]:void 0,isNaN(p.port)&&(p.port=h.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?v[4]:void 0)),p.host&&(p.host=po(Us(p.host,g),g)),p.scheme===void 0&&p.userinfo===void 0&&p.host===void 0&&p.port===void 0&&!p.path&&p.query===void 0?p.reference="same-document":p.scheme===void 0?p.reference="relative":p.fragment===void 0?p.reference="absolute":p.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==p.reference&&(p.error=p.error||"URI is not a "+f.reference+" reference.");var S=Fe[(f.scheme||p.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!S||!S.unicodeSupport)){if(p.host&&(f.domainHost||S&&S.domainHost))try{p.host=nr.toASCII(p.host.replace(g.PCT_ENCODED,sr).toLowerCase())}catch(A){p.error=p.error||"Host's domain name can not be converted to ASCII via punycode: "+A}Vs(p,u)}else Vs(p,g);S&&S.parse&&S.parse(p,f)}else p.error=p.error||"URI can not be parsed.";return p}function zd(h,f){var p=f.iri!==!1?o:u,g=[];return h.userinfo!==void 0&&(g.push(h.userinfo),g.push("@")),h.host!==void 0&&g.push(po(Us(String(h.host),p),p).replace(p.IPV6ADDRESS,function(v,S,A){return"["+S+(A?"%25"+A:"")+"]"})),(typeof h.port=="number"||typeof h.port=="string")&&(g.push(":"),g.push(String(h.port))),g.length?g.join(""):void 0}var mo=/^\.\.?\//,go=/^\/\.(\/|$)/,vo=/^\/\.\.(\/|$)/,Kd=/^\/?(?:.|\n)*?(?=\/|$)/;function ir(h){for(var f=[];h.length;)if(h.match(mo))h=h.replace(mo,"");else if(h.match(go))h=h.replace(go,"/");else if(h.match(vo))h=h.replace(vo,"/"),f.pop();else if(h==="."||h==="..")h="";else{var p=h.match(Kd);if(p){var g=p[0];h=h.slice(g.length),f.push(g)}else throw new Error("Unexpected dot segment condition")}return f.join("")}function st(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=f.iri?o:u,g=[],v=Fe[(f.scheme||h.scheme||"").toLowerCase()];if(v&&v.serialize&&v.serialize(h,f),h.host&&!p.IPV6ADDRESS.test(h.host)){if(f.domainHost||v&&v.domainHost)try{h.host=f.iri?nr.toUnicode(h.host):nr.toASCII(h.host.replace(p.PCT_ENCODED,sr).toLowerCase())}catch(H){h.error=h.error||"Host's domain name can not be converted to "+(f.iri?"Unicode":"ASCII")+" via punycode: "+H}}Vs(h,p),f.reference!=="suffix"&&h.scheme&&(g.push(h.scheme),g.push(":"));var S=zd(h,f);if(S!==void 0&&(f.reference!=="suffix"&&g.push("//"),g.push(S),h.path&&h.path.charAt(0)!=="/"&&g.push("/")),h.path!==void 0){var A=h.path;!f.absolutePath&&(!v||!v.absolutePath)&&(A=ir(A)),S===void 0&&(A=A.replace(/^\/\//,"/%2F")),g.push(A)}return h.query!==void 0&&(g.push("?"),g.push(h.query)),h.fragment!==void 0&&(g.push("#"),g.push(h.fragment)),g.join("")}function _o(h,f){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=arguments[3],v={};return g||(h=dt(st(h,p),p),f=dt(st(f,p),p)),p=p||{},!p.tolerant&&f.scheme?(v.scheme=f.scheme,v.userinfo=f.userinfo,v.host=f.host,v.port=f.port,v.path=ir(f.path||""),v.query=f.query):(f.userinfo!==void 0||f.host!==void 0||f.port!==void 0?(v.userinfo=f.userinfo,v.host=f.host,v.port=f.port,v.path=ir(f.path||""),v.query=f.query):(f.path?(f.path.charAt(0)==="/"?v.path=ir(f.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?v.path="/"+f.path:h.path?v.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+f.path:v.path=f.path,v.path=ir(v.path)),v.query=f.query):(v.path=h.path,f.query!==void 0?v.query=f.query:v.query=h.query),v.userinfo=h.userinfo,v.host=h.host,v.port=h.port),v.scheme=h.scheme),v.fragment=f.fragment,v}function Xd(h,f,p){var g=a({scheme:"null"},p);return st(_o(dt(h,g),dt(f,g),g,!0),g)}function Wd(h,f){return typeof h=="string"?h=st(dt(h,f),f):n(h)==="object"&&(h=dt(st(h,f),f)),h}function Bd(h,f,p){return typeof h=="string"?h=st(dt(h,p),p):n(h)==="object"&&(h=st(h,p)),typeof f=="string"?f=st(dt(f,p),p):n(f)==="object"&&(f=st(f,p)),h===f}function Jd(h,f){return h&&h.toString().replace(!f||!f.iri?u.ESCAPE:o.ESCAPE,nt)}function ht(h,f){return h&&h.toString().replace(!f||!f.iri?u.PCT_ENCODED:o.PCT_ENCODED,sr)}var Ur={scheme:"http",domainHost:!0,parse:function(f,p){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f},serialize:function(f,p){var g=String(f.scheme).toLowerCase()==="https";return(f.port===(g?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}},yo={scheme:"https",domainHost:Ur.domainHost,parse:Ur.parse,serialize:Ur.serialize};function $o(h){return typeof h.secure=="boolean"?h.secure:String(h.scheme).toLowerCase()==="wss"}var Gr={scheme:"ws",domainHost:!0,parse:function(f,p){var g=f;return g.secure=$o(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g},serialize:function(f,p){if((f.port===($o(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){var g=f.resourceName.split("?"),v=l(g,2),S=v[0],A=v[1];f.path=S&&S!=="/"?S:void 0,f.query=A,f.resourceName=void 0}return f.fragment=void 0,f}},Eo={scheme:"wss",domainHost:Gr.domainHost,parse:Gr.parse,serialize:Gr.serialize},Yd={},Zd=!0,wo="[A-Za-z0-9\\-\\.\\_\\~"+(Zd?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",it="[0-9A-Fa-f]",Qd=t(t("%[EFef]"+it+"%"+it+it+"%"+it+it)+"|"+t("%[89A-Fa-f]"+it+"%"+it+it)+"|"+t("%"+it+it)),eh="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",th="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",rh=e(th,'[\\"\\\\]'),nh="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",sh=new RegExp(wo,"g"),ar=new RegExp(Qd,"g"),ih=new RegExp(e("[^]",eh,"[\\.]",'[\\"]',rh),"g"),bo=new RegExp(e("[^]",wo,nh),"g"),ah=bo;function Gs(h){var f=sr(h);return f.match(sh)?f:h}var So={scheme:"mailto",parse:function(f,p){var g=f,v=g.to=g.path?g.path.split(","):[];if(g.path=void 0,g.query){for(var S=!1,A={},H=g.query.split("&"),W=0,ue=H.length;W<ue;++W){var F=H[W].split("=");switch(F[0]){case"to":for(var se=F[1].split(","),le=0,ne=se.length;le<ne;++le)v.push(se[le]);break;case"subject":g.subject=ht(F[1],p);break;case"body":g.body=ht(F[1],p);break;default:S=!0,A[ht(F[0],p)]=ht(F[1],p);break}}S&&(g.headers=A)}g.query=void 0;for(var K=0,ie=v.length;K<ie;++K){var B=v[K].split("@");if(B[0]=ht(B[0]),p.unicodeSupport)B[1]=ht(B[1],p).toLowerCase();else try{B[1]=nr.toASCII(ht(B[1],p).toLowerCase())}catch(kt){g.error=g.error||"Email address's domain name can not be converted to ASCII via punycode: "+kt}v[K]=B.join("@")}return g},serialize:function(f,p){var g=f,v=i(f.to);if(v){for(var S=0,A=v.length;S<A;++S){var H=String(v[S]),W=H.lastIndexOf("@"),ue=H.slice(0,W).replace(ar,Gs).replace(ar,s).replace(ih,nt),F=H.slice(W+1);try{F=p.iri?nr.toUnicode(F):nr.toASCII(ht(F,p).toLowerCase())}catch(K){g.error=g.error||"Email address's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+K}v[S]=ue+"@"+F}g.path=v.join(",")}var se=f.headers=f.headers||{};f.subject&&(se.subject=f.subject),f.body&&(se.body=f.body);var le=[];for(var ne in se)se[ne]!==Yd[ne]&&le.push(ne.replace(ar,Gs).replace(ar,s).replace(bo,nt)+"="+se[ne].replace(ar,Gs).replace(ar,s).replace(ah,nt));return le.length&&(g.query=le.join("&")),g}},oh=/^([^\:]+)\:(.*)/,Oo={scheme:"urn",parse:function(f,p){var g=f.path&&f.path.match(oh),v=f;if(g){var S=p.scheme||v.scheme||"urn",A=g[1].toLowerCase(),H=g[2],W=S+":"+(p.nid||A),ue=Fe[W];v.nid=A,v.nss=H,v.path=void 0,ue&&(v=ue.parse(v,p))}else v.error=v.error||"URN can not be parsed.";return v},serialize:function(f,p){var g=p.scheme||f.scheme||"urn",v=f.nid,S=g+":"+(p.nid||v),A=Fe[S];A&&(f=A.serialize(f,p));var H=f,W=f.nss;return H.path=(v||p.nid)+":"+W,H}},ch=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Po={scheme:"urn:uuid",parse:function(f,p){var g=f;return g.uuid=g.nss,g.nss=void 0,!p.tolerant&&(!g.uuid||!g.uuid.match(ch))&&(g.error=g.error||"UUID is not valid."),g},serialize:function(f,p){var g=f;return g.nss=(f.uuid||"").toLowerCase(),g}};Fe[Ur.scheme]=Ur,Fe[yo.scheme]=yo,Fe[Gr.scheme]=Gr,Fe[Eo.scheme]=Eo,Fe[So.scheme]=So,Fe[Oo.scheme]=Oo,Fe[Po.scheme]=Po,r.SCHEMES=Fe,r.pctEncChar=nt,r.pctDecChars=sr,r.parse=dt,r.removeDotSegments=ir,r.serialize=st,r.resolveComponents=_o,r.resolve=Xd,r.normalize=Wd,r.equal=Bd,r.escapeComponent=Jd,r.unescapeComponent=ht,Object.defineProperty(r,"__esModule",{value:!0})})});var af=_(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});var sf=nf();sf.code='require("ajv/dist/runtime/uri").default';da.default=sf});var pf=_(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.CodeGen=pe.Name=pe.nil=pe.stringify=pe.str=pe._=pe.KeywordCxt=void 0;var M_=Pn();Object.defineProperty(pe,"KeywordCxt",{enumerable:!0,get:function(){return M_.KeywordCxt}});var Ir=L();Object.defineProperty(pe,"_",{enumerable:!0,get:function(){return Ir._}});Object.defineProperty(pe,"str",{enumerable:!0,get:function(){return Ir.str}});Object.defineProperty(pe,"stringify",{enumerable:!0,get:function(){return Ir.stringify}});Object.defineProperty(pe,"nil",{enumerable:!0,get:function(){return Ir.nil}});Object.defineProperty(pe,"Name",{enumerable:!0,get:function(){return Ir.Name}});Object.defineProperty(pe,"CodeGen",{enumerable:!0,get:function(){return Ir.CodeGen}});var F_=ia(),ff=ua(),V_=Gi(),Rn=Es(),H_=L(),Cn=bn(),bs=wn(),pa=G(),of=tf(),U_=af(),df=(r,e)=>new RegExp(r,e);df.code="new RegExp";var G_=["removeAdditional","useDefaults","coerceTypes"],z_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),K_={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."},X_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},cf=200;function W_(r){var e,t,n,s,i,a,c,u,o,l,d,y,m,$,E,w,b,D,T,z,C,ge,xe,Ot,Le;let re=r.strict,Me=(e=r.code)===null||e===void 0?void 0:e.optimize,rt=Me===!0||Me===void 0?1:Me||0,Hn=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:df,Un=(s=r.uriResolver)!==null&&s!==void 0?s:U_.default;return{strictSchema:(a=(i=r.strictSchema)!==null&&i!==void 0?i:re)!==null&&a!==void 0?a:!0,strictNumbers:(u=(c=r.strictNumbers)!==null&&c!==void 0?c:re)!==null&&u!==void 0?u:!0,strictTypes:(l=(o=r.strictTypes)!==null&&o!==void 0?o:re)!==null&&l!==void 0?l:"log",strictTuples:(y=(d=r.strictTuples)!==null&&d!==void 0?d:re)!==null&&y!==void 0?y:"log",strictRequired:($=(m=r.strictRequired)!==null&&m!==void 0?m:re)!==null&&$!==void 0?$:!1,code:r.code?Ue(oe({},r.code),{optimize:rt,regExp:Hn}):{optimize:rt,regExp:Hn},loopRequired:(E=r.loopRequired)!==null&&E!==void 0?E:cf,loopEnum:(w=r.loopEnum)!==null&&w!==void 0?w:cf,meta:(b=r.meta)!==null&&b!==void 0?b:!0,messages:(D=r.messages)!==null&&D!==void 0?D:!0,inlineRefs:(T=r.inlineRefs)!==null&&T!==void 0?T:!0,schemaId:(z=r.schemaId)!==null&&z!==void 0?z:"$id",addUsedSchema:(C=r.addUsedSchema)!==null&&C!==void 0?C:!0,validateSchema:(ge=r.validateSchema)!==null&&ge!==void 0?ge:!0,validateFormats:(xe=r.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Ot=r.unicodeRegExp)!==null&&Ot!==void 0?Ot:!0,int32range:(Le=r.int32range)!==null&&Le!==void 0?Le:!0,uriResolver:Un}}var Nn=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=oe(oe({},e),W_(e));let{es5:t,lines:n}=this.opts.code;this.scope=new H_.ValueScope({scope:{},prefixes:z_,es5:t,lines:n}),this.logger=ey(e.logger);let s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,V_.getRules)(),uf.call(this,K_,e,"NOT SUPPORTED"),uf.call(this,X_,e,"DEPRECATED","warn"),this._metaOpts=Z_.call(this),e.formats&&J_.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Y_.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),B_.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,s=of;n==="id"&&(s=oe({},of),s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let s=n(t);return"$async"in n||(this.errors=n.errors),s}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return s.call(this,e,t);async function s(l,d){await i.call(this,l.$schema);let y=this._addSchema(l,d);return y.validate||a.call(this,y)}async function i(l){l&&!this.getSchema(l)&&await s.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof ff.default))throw d;return c.call(this,d),await u.call(this,d.missingSchema),a.call(this,l)}}function c({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function u(l){let d=await o.call(this,l);this.refs[l]||await i.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,t)}async function o(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(e,t,n,s=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,s);return this}let i;if(typeof e=="object"){let{schemaId:a}=this.opts;if(i=e[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return t=(0,Cn.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,s,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let s=this.validate(n,e);if(!s&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return s}getSchema(e){let t;for(;typeof(t=lf.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,s=new Rn.SchemaEnv({schema:{},schemaId:n});if(t=Rn.resolveSchema.call(this,s,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=lf.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,Cn.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ry.call(this,n,t),!t)return(0,pa.eachItem)(n,i=>ha.call(this,i)),this;sy.call(this,t);let s=Ue(oe({},t),{type:(0,bs.getJSONTypes)(t.type),schemaType:(0,bs.getJSONTypes)(t.schemaType)});return(0,pa.eachItem)(n,s.type.length===0?i=>ha.call(this,i,s):i=>s.type.forEach(a=>ha.call(this,i,s,a))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let s=n.rules.findIndex(i=>i.keyword===e);s>=0&&n.rules.splice(s,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(s=>`${n}${s.instancePath} ${s.message}`).reduce((s,i)=>s+t+i)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let s of t){let i=s.split("/").slice(1),a=e;for(let c of i)a=a[c];for(let c in n){let u=n[c];if(typeof u!="object")continue;let{$data:o}=u.definition,l=a[c];o&&l&&(a[c]=hf(l))}}return e}_removeAllSchemas(e,t){for(let n in e){let s=e[n];(!t||t.test(n))&&(typeof s=="string"?delete e[n]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[n]))}}_addSchema(e,t,n,s=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:c}=this.opts;if(typeof e=="object")a=e[c];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;n=(0,Cn.normalizeId)(a||n);let o=Cn.getSchemaRefs.call(this,e,n);return u=new Rn.SchemaEnv({schema:e,schemaId:c,meta:t,baseId:n,localRefs:o}),this._cache.set(u.schema,u),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),s&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Rn.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Rn.compileSchema.call(this,e)}finally{this.opts=t}}};pe.default=Nn;Nn.ValidationError=F_.default;Nn.MissingRefError=ff.default;function uf(r,e,t,n="error"){for(let s in r){let i=s;i in e&&this.logger[n](`${t}: option ${s}. ${r[i]}`)}}function lf(r){return r=(0,Cn.normalizeId)(r),this.schemas[r]||this.refs[r]}function B_(){let r=this.opts.schemas;if(!!r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function J_(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function Y_(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function Z_(){let r=oe({},this.opts);for(let e of G_)delete r[e];return r}var Q_={log(){},warn(){},error(){}};function ey(r){if(r===!1)return Q_;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var ty=/^[a-z_$][a-z0-9_$:-]*$/i;function ry(r,e){let{RULES:t}=this;if((0,pa.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!ty.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function ha(r,e,t){var n;let s=e==null?void 0:e.post;if(t&&s)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=s?i.post:i.rules.find(({type:u})=>u===t);if(a||(a={type:t,rules:[]},i.rules.push(a)),i.keywords[r]=!0,!e)return;let c={keyword:r,definition:Ue(oe({},e),{type:(0,bs.getJSONTypes)(e.type),schemaType:(0,bs.getJSONTypes)(e.schemaType)})};e.before?ny.call(this,a,c,e.before):a.rules.push(c),i.all[r]=c,(n=e.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function ny(r,e,t){let n=r.rules.findIndex(s=>s.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function sy(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=hf(e)),r.validateSchema=this.compile(e,!0))}var iy={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function hf(r){return{anyOf:[r,iy]}}});var mf=_(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});var ay={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};ma.default=ay});var yf=_(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.callRef=Qt.getValidate=void 0;var oy=ua(),gf=Xe(),Te=L(),Tr=wt(),vf=Es(),Ss=G(),cy={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:s,schemaEnv:i,validateName:a,opts:c,self:u}=n,{root:o}=i;if((t==="#"||t==="#/")&&s===o.baseId)return d();let l=vf.resolveRef.call(u,o,s,t);if(l===void 0)throw new oy.default(n.opts.uriResolver,s,t);if(l instanceof vf.SchemaEnv)return y(l);return m(l);function d(){if(i===o)return Os(r,a,i,i.$async);let $=e.scopeValue("root",{ref:o});return Os(r,(0,Te._)`${$}.validate`,o,o.$async)}function y($){let E=_f(r,$);Os(r,E,$,$.$async)}function m($){let E=e.scopeValue("schema",c.code.source===!0?{ref:$,code:(0,Te.stringify)($)}:{ref:$}),w=e.name("valid"),b=r.subschema({schema:$,dataTypes:[],schemaPath:Te.nil,topSchemaRef:E,errSchemaPath:t},w);r.mergeEvaluated(b),r.ok(w)}}};function _f(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Te._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Qt.getValidate=_f;function Os(r,e,t,n){let{gen:s,it:i}=r,{allErrors:a,schemaEnv:c,opts:u}=i,o=u.passContext?Tr.default.this:Te.nil;n?l():d();function l(){if(!c.$async)throw new Error("async schema referenced by sync schema");let $=s.let("valid");s.try(()=>{s.code((0,Te._)`await ${(0,gf.callValidateCode)(r,e,o)}`),m(e),a||s.assign($,!0)},E=>{s.if((0,Te._)`!(${E} instanceof ${i.ValidationError})`,()=>s.throw(E)),y(E),a||s.assign($,!1)}),r.ok($)}function d(){r.result((0,gf.callValidateCode)(r,e,o),()=>m(e),()=>y(e))}function y($){let E=(0,Te._)`${$}.errors`;s.assign(Tr.default.vErrors,(0,Te._)`${Tr.default.vErrors} === null ? ${E} : ${Tr.default.vErrors}.concat(${E})`),s.assign(Tr.default.errors,(0,Te._)`${Tr.default.vErrors}.length`)}function m($){var E;if(!i.opts.unevaluated)return;let w=(E=t==null?void 0:t.validate)===null||E===void 0?void 0:E.evaluated;if(i.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(i.props=Ss.mergeEvaluated.props(s,w.props,i.props));else{let b=s.var("props",(0,Te._)`${$}.evaluated.props`);i.props=Ss.mergeEvaluated.props(s,b,i.props,Te.Name)}if(i.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(i.items=Ss.mergeEvaluated.items(s,w.items,i.items));else{let b=s.var("items",(0,Te._)`${$}.evaluated.items`);i.items=Ss.mergeEvaluated.items(s,b,i.items,Te.Name)}}}Qt.callRef=Os;Qt.default=cy});var $f=_(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});var uy=mf(),ly=yf(),fy=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",uy.default,ly.default];ga.default=fy});var Ef=_(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});var Ps=L(),Dt=Ps.operators,Rs={maximum:{okStr:"<=",ok:Dt.LTE,fail:Dt.GT},minimum:{okStr:">=",ok:Dt.GTE,fail:Dt.LT},exclusiveMaximum:{okStr:"<",ok:Dt.LT,fail:Dt.GTE},exclusiveMinimum:{okStr:">",ok:Dt.GT,fail:Dt.LTE}},dy={message:({keyword:r,schemaCode:e})=>(0,Ps.str)`must be ${Rs[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,Ps._)`{comparison: ${Rs[r].okStr}, limit: ${e}}`},hy={keyword:Object.keys(Rs),type:"number",schemaType:"number",$data:!0,error:dy,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,Ps._)`${t} ${Rs[e].fail} ${n} || isNaN(${t})`)}};va.default=hy});var wf=_(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var In=L(),py={message:({schemaCode:r})=>(0,In.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,In._)`{multipleOf: ${r}}`},my={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:py,code(r){let{gen:e,data:t,schemaCode:n,it:s}=r,i=s.opts.multipleOfPrecision,a=e.let("res"),c=i?(0,In._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,In._)`${a} !== parseInt(${a})`;r.fail$data((0,In._)`(${n} === 0 || (${a} = ${t}/${n}, ${c}))`)}};_a.default=my});var Sf=_(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});function bf(r){let e=r.length,t=0,n=0,s;for(;n<e;)t++,s=r.charCodeAt(n++),s>=55296&&s<=56319&&n<e&&(s=r.charCodeAt(n),(s&64512)===56320&&n++);return t}ya.default=bf;bf.code='require("ajv/dist/runtime/ucs2length").default'});var Of=_($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});var er=L(),gy=G(),vy=Sf(),_y={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,er.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,er._)`{limit: ${r}}`},yy={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:_y,code(r){let{keyword:e,data:t,schemaCode:n,it:s}=r,i=e==="maxLength"?er.operators.GT:er.operators.LT,a=s.opts.unicode===!1?(0,er._)`${t}.length`:(0,er._)`${(0,gy.useFunc)(r.gen,vy.default)}(${t})`;r.fail$data((0,er._)`${a} ${i} ${n}`)}};$a.default=yy});var Pf=_(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});var $y=Xe(),Cs=L(),Ey={message:({schemaCode:r})=>(0,Cs.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,Cs._)`{pattern: ${r}}`},wy={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Ey,code(r){let{data:e,$data:t,schema:n,schemaCode:s,it:i}=r,a=i.opts.unicodeRegExp?"u":"",c=t?(0,Cs._)`(new RegExp(${s}, ${a}))`:(0,$y.usePattern)(r,n);r.fail$data((0,Cs._)`!${c}.test(${e})`)}};Ea.default=wy});var Rf=_(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});var Tn=L(),by={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,Tn.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,Tn._)`{limit: ${r}}`},Sy={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:by,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxProperties"?Tn.operators.GT:Tn.operators.LT;r.fail$data((0,Tn._)`Object.keys(${t}).length ${s} ${n}`)}};wa.default=Sy});var Cf=_(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});var An=Xe(),qn=L(),Oy=G(),Py={message:({params:{missingProperty:r}})=>(0,qn.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,qn._)`{missingProperty: ${r}}`},Ry={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Py,code(r){let{gen:e,schema:t,schemaCode:n,data:s,$data:i,it:a}=r,{opts:c}=a;if(!i&&t.length===0)return;let u=t.length>=c.loopRequired;if(a.allErrors?o():l(),c.strictRequired){let m=r.parentSchema.properties,{definedProperties:$}=r.it;for(let E of t)if((m==null?void 0:m[E])===void 0&&!$.has(E)){let w=a.schemaEnv.baseId+a.errSchemaPath,b=`required property "${E}" is not defined at "${w}" (strictRequired)`;(0,Oy.checkStrictMode)(a,b,a.opts.strictRequired)}}function o(){if(u||i)r.block$data(qn.nil,d);else for(let m of t)(0,An.checkReportMissingProp)(r,m)}function l(){let m=e.let("missing");if(u||i){let $=e.let("valid",!0);r.block$data($,()=>y(m,$)),r.ok($)}else e.if((0,An.checkMissingProp)(r,t,m)),(0,An.reportMissingProp)(r,m),e.else()}function d(){e.forOf("prop",n,m=>{r.setParams({missingProperty:m}),e.if((0,An.noPropertyInData)(e,s,m,c.ownProperties),()=>r.error())})}function y(m,$){r.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign($,(0,An.propertyInData)(e,s,m,c.ownProperties)),e.if((0,qn.not)($),()=>{r.error(),e.break()})},qn.nil)}}};ba.default=Ry});var Nf=_(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});var Dn=L(),Cy={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,Dn.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,Dn._)`{limit: ${r}}`},Ny={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Cy,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxItems"?Dn.operators.GT:Dn.operators.LT;r.fail$data((0,Dn._)`${t}.length ${s} ${n}`)}};Sa.default=Ny});var Ns=_(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});var If=Zi();If.code='require("ajv/dist/runtime/equal").default';Oa.default=If});var Tf=_(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var Pa=wn(),me=L(),Iy=G(),Ty=Ns(),Ay={message:({params:{i:r,j:e}})=>(0,me.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,me._)`{i: ${r}, j: ${e}}`},qy={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Ay,code(r){let{gen:e,data:t,$data:n,schema:s,parentSchema:i,schemaCode:a,it:c}=r;if(!n&&!s)return;let u=e.let("valid"),o=i.items?(0,Pa.getSchemaTypes)(i.items):[];r.block$data(u,l,(0,me._)`${a} === false`),r.ok(u);function l(){let $=e.let("i",(0,me._)`${t}.length`),E=e.let("j");r.setParams({i:$,j:E}),e.assign(u,!0),e.if((0,me._)`${$} > 1`,()=>(d()?y:m)($,E))}function d(){return o.length>0&&!o.some($=>$==="object"||$==="array")}function y($,E){let w=e.name("item"),b=(0,Pa.checkDataTypes)(o,w,c.opts.strictNumbers,Pa.DataType.Wrong),D=e.const("indices",(0,me._)`{}`);e.for((0,me._)`;${$}--;`,()=>{e.let(w,(0,me._)`${t}[${$}]`),e.if(b,(0,me._)`continue`),o.length>1&&e.if((0,me._)`typeof ${w} == "string"`,(0,me._)`${w} += "_"`),e.if((0,me._)`typeof ${D}[${w}] == "number"`,()=>{e.assign(E,(0,me._)`${D}[${w}]`),r.error(),e.assign(u,!1).break()}).code((0,me._)`${D}[${w}] = ${$}`)})}function m($,E){let w=(0,Iy.useFunc)(e,Ty.default),b=e.name("outer");e.label(b).for((0,me._)`;${$}--;`,()=>e.for((0,me._)`${E} = ${$}; ${E}--;`,()=>e.if((0,me._)`${w}(${t}[${$}], ${t}[${E}])`,()=>{r.error(),e.assign(u,!1).break(b)})))}}};Ra.default=qy});var Af=_(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var Ca=L(),Dy=G(),jy=Ns(),ky={message:"must be equal to constant",params:({schemaCode:r})=>(0,Ca._)`{allowedValue: ${r}}`},xy={keyword:"const",$data:!0,error:ky,code(r){let{gen:e,data:t,$data:n,schemaCode:s,schema:i}=r;n||i&&typeof i=="object"?r.fail$data((0,Ca._)`!${(0,Dy.useFunc)(e,jy.default)}(${t}, ${s})`):r.fail((0,Ca._)`${i} !== ${t}`)}};Na.default=xy});var qf=_(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});var jn=L(),Ly=G(),My=Ns(),Fy={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,jn._)`{allowedValues: ${r}}`},Vy={keyword:"enum",schemaType:"array",$data:!0,error:Fy,code(r){let{gen:e,data:t,$data:n,schema:s,schemaCode:i,it:a}=r;if(!n&&s.length===0)throw new Error("enum must have non-empty array");let c=s.length>=a.opts.loopEnum,u,o=()=>u!=null?u:u=(0,Ly.useFunc)(e,My.default),l;if(c||n)l=e.let("valid"),r.block$data(l,d);else{if(!Array.isArray(s))throw new Error("ajv implementation error");let m=e.const("vSchema",i);l=(0,jn.or)(...s.map(($,E)=>y(m,E)))}r.pass(l);function d(){e.assign(l,!1),e.forOf("v",i,m=>e.if((0,jn._)`${o()}(${t}, ${m})`,()=>e.assign(l,!0).break()))}function y(m,$){let E=s[$];return typeof E=="object"&&E!==null?(0,jn._)`${o()}(${t}, ${m}[${$}])`:(0,jn._)`${t} === ${E}`}}};Ia.default=Vy});var Df=_(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});var Hy=Ef(),Uy=wf(),Gy=Of(),zy=Pf(),Ky=Rf(),Xy=Cf(),Wy=Nf(),By=Tf(),Jy=Af(),Yy=qf(),Zy=[Hy.default,Uy.default,Gy.default,zy.default,Ky.default,Xy.default,Wy.default,By.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Jy.default,Yy.default];Ta.default=Zy});var qa=_(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.validateAdditionalItems=void 0;var tr=L(),Aa=G(),Qy={message:({params:{len:r}})=>(0,tr.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,tr._)`{limit: ${r}}`},e0={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Qy,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Aa.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}jf(r,n)}};function jf(r,e){let{gen:t,schema:n,data:s,keyword:i,it:a}=r;a.items=!0;let c=t.const("len",(0,tr._)`${s}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,tr._)`${c} <= ${e.length}`);else if(typeof n=="object"&&!(0,Aa.alwaysValidSchema)(a,n)){let o=t.var("valid",(0,tr._)`${c} <= ${e.length}`);t.if((0,tr.not)(o),()=>u(o)),r.ok(o)}function u(o){t.forRange("i",e.length,c,l=>{r.subschema({keyword:i,dataProp:l,dataPropType:Aa.Type.Num},o),a.allErrors||t.if((0,tr.not)(o),()=>t.break())})}}kn.validateAdditionalItems=jf;kn.default=e0});var Da=_(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.validateTuple=void 0;var kf=L(),Is=G(),t0=Xe(),r0={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return xf(r,"additionalItems",e);t.items=!0,!(0,Is.alwaysValidSchema)(t,e)&&r.ok((0,t0.validateArray)(r))}};function xf(r,e,t=r.schema){let{gen:n,parentSchema:s,data:i,keyword:a,it:c}=r;l(s),c.opts.unevaluated&&t.length&&c.items!==!0&&(c.items=Is.mergeEvaluated.items(n,t.length,c.items));let u=n.name("valid"),o=n.const("len",(0,kf._)`${i}.length`);t.forEach((d,y)=>{(0,Is.alwaysValidSchema)(c,d)||(n.if((0,kf._)`${o} > ${y}`,()=>r.subschema({keyword:a,schemaProp:y,dataProp:y},u)),r.ok(u))});function l(d){let{opts:y,errSchemaPath:m}=c,$=t.length,E=$===d.minItems&&($===d.maxItems||d[e]===!1);if(y.strictTuples&&!E){let w=`"${a}" is ${$}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Is.checkStrictMode)(c,w,y.strictTuples)}}}xn.validateTuple=xf;xn.default=r0});var Lf=_(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});var n0=Da(),s0={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,n0.validateTuple)(r,"items")};ja.default=s0});var Ff=_(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});var Mf=L(),i0=G(),a0=Xe(),o0=qa(),c0={message:({params:{len:r}})=>(0,Mf.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Mf._)`{limit: ${r}}`},u0={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:c0,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:s}=t;n.items=!0,!(0,i0.alwaysValidSchema)(n,e)&&(s?(0,o0.validateAdditionalItems)(r,s):r.ok((0,a0.validateArray)(r)))}};ka.default=u0});var Vf=_(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});var Be=L(),Ts=G(),l0={message:({params:{min:r,max:e}})=>e===void 0?(0,Be.str)`must contain at least ${r} valid item(s)`:(0,Be.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,Be._)`{minContains: ${r}}`:(0,Be._)`{minContains: ${r}, maxContains: ${e}}`},f0={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:l0,code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r,a,c,{minContains:u,maxContains:o}=n;i.opts.next?(a=u===void 0?1:u,c=o):a=1;let l=e.const("len",(0,Be._)`${s}.length`);if(r.setParams({min:a,max:c}),c===void 0&&a===0){(0,Ts.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&a>c){(0,Ts.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,Ts.alwaysValidSchema)(i,t)){let E=(0,Be._)`${l} >= ${a}`;c!==void 0&&(E=(0,Be._)`${E} && ${l} <= ${c}`),r.pass(E);return}i.items=!0;let d=e.name("valid");c===void 0&&a===1?m(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),c!==void 0&&e.if((0,Be._)`${s}.length > 0`,y)):(e.let(d,!1),y()),r.result(d,()=>r.reset());function y(){let E=e.name("_valid"),w=e.let("count",0);m(E,()=>e.if(E,()=>$(w)))}function m(E,w){e.forRange("i",0,l,b=>{r.subschema({keyword:"contains",dataProp:b,dataPropType:Ts.Type.Num,compositeRule:!0},E),w()})}function $(E){e.code((0,Be._)`${E}++`),c===void 0?e.if((0,Be._)`${E} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,Be._)`${E} > ${c}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,Be._)`${E} >= ${a}`,()=>e.assign(d,!0)))}}};xa.default=f0});var Gf=_(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.validateSchemaDeps=lt.validatePropertyDeps=lt.error=void 0;var La=L(),d0=G(),Ln=Xe();lt.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,La.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,La._)`{property: ${r},
25
+ || ${a} === "boolean" || ${s} === null`).assign(c,(0,q._)`[${s}]`)}}}function gv({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,q._)`${e} !== undefined`,()=>r.assign((0,q._)`${e}[${t}]`,n))}function Gi(r,e,t,n=yn.Correct){let s=n===yn.Correct?q.operators.EQ:q.operators.NEQ,i;switch(r){case"null":return(0,q._)`${e} ${s} null`;case"array":i=(0,q._)`Array.isArray(${e})`;break;case"object":i=(0,q._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=a((0,q._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=a();break;default:return(0,q._)`typeof ${e} ${s} ${r}`}return n===yn.Correct?i:(0,q.not)(i);function a(c=q.nil){return(0,q.and)((0,q._)`typeof ${e} == "number"`,c,t?(0,q._)`isFinite(${e})`:q.nil)}}de.checkDataType=Gi;function zi(r,e,t,n){if(r.length===1)return Gi(r[0],e,t,n);let s,i=(0,vl.toHash)(r);if(i.array&&i.object){let a=(0,q._)`typeof ${e} != "object"`;s=i.null?a:(0,q._)`!${e} || ${a}`,delete i.null,delete i.array,delete i.object}else s=q.nil;i.number&&delete i.integer;for(let a in i)s=(0,q.and)(s,Gi(a,e,t,n));return s}de.checkDataTypes=zi;var vv={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,q._)`{type: ${r}}`:(0,q._)`{type: ${e}}`};function Ki(r){let e=_v(r);(0,fv.reportError)(e,vv)}de.reportTypeError=Ki;function _v(r){let{gen:e,data:t,schema:n}=r,s=(0,vl.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:r}}});var El=_(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});ps.assignDefaults=void 0;var Or=L(),yv=G();function $v(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let s in t)$l(r,s,t[s].default);else e==="array"&&Array.isArray(n)&&n.forEach((s,i)=>$l(r,i,s.default))}ps.assignDefaults=$v;function $l(r,e,t){let{gen:n,compositeRule:s,data:i,opts:a}=r;if(t===void 0)return;let c=(0,Or._)`${i}${(0,Or.getProperty)(e)}`;if(s){(0,yv.checkStrictMode)(r,`default is ignored for: ${c}`);return}let u=(0,Or._)`${c} === undefined`;a.useDefaults==="empty"&&(u=(0,Or._)`${u} || ${c} === null || ${c} === ""`),n.if(u,(0,Or._)`${c} = ${(0,Or.stringify)(t)}`)}});var ze=_(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.validateUnion=J.validateArray=J.usePattern=J.callValidateCode=J.schemaProperties=J.allSchemaProperties=J.noPropertyInData=J.propertyInData=J.isOwnProperty=J.hasPropFunc=J.reportMissingProp=J.checkMissingProp=J.checkReportMissingProp=void 0;var te=L(),Xi=G(),Ct=$t(),Ev=G();function wv(r,e){let{gen:t,data:n,it:s}=r;t.if(Bi(t,n,e,s.opts.ownProperties),()=>{r.setParams({missingProperty:(0,te._)`${e}`},!0),r.error()})}J.checkReportMissingProp=wv;function bv({gen:r,data:e,it:{opts:t}},n,s){return(0,te.or)(...n.map(i=>(0,te.and)(Bi(r,e,i,t.ownProperties),(0,te._)`${s} = ${i}`)))}J.checkMissingProp=bv;function Sv(r,e){r.setParams({missingProperty:e},!0),r.error()}J.reportMissingProp=Sv;function wl(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,te._)`Object.prototype.hasOwnProperty`})}J.hasPropFunc=wl;function Wi(r,e,t){return(0,te._)`${wl(r)}.call(${e}, ${t})`}J.isOwnProperty=Wi;function Ov(r,e,t,n){let s=(0,te._)`${e}${(0,te.getProperty)(t)} !== undefined`;return n?(0,te._)`${s} && ${Wi(r,e,t)}`:s}J.propertyInData=Ov;function Bi(r,e,t,n){let s=(0,te._)`${e}${(0,te.getProperty)(t)} === undefined`;return n?(0,te.or)(s,(0,te.not)(Wi(r,e,t))):s}J.noPropertyInData=Bi;function bl(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}J.allSchemaProperties=bl;function Pv(r,e){return bl(e).filter(t=>!(0,Xi.alwaysValidSchema)(r,e[t]))}J.schemaProperties=Pv;function Rv({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:s,errorPath:i},it:a},c,u,o){let l=o?(0,te._)`${r}, ${e}, ${n}${s}`:e,d=[[Ct.default.instancePath,(0,te.strConcat)(Ct.default.instancePath,i)],[Ct.default.parentData,a.parentData],[Ct.default.parentDataProperty,a.parentDataProperty],[Ct.default.rootData,Ct.default.rootData]];a.opts.dynamicRef&&d.push([Ct.default.dynamicAnchors,Ct.default.dynamicAnchors]);let y=(0,te._)`${l}, ${t.object(...d)}`;return u!==te.nil?(0,te._)`${c}.call(${u}, ${y})`:(0,te._)`${c}(${y})`}J.callValidateCode=Rv;var Cv=(0,te._)`new RegExp`;function Nv({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:s}=e.code,i=s(t,n);return r.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,te._)`${s.code==="new RegExp"?Cv:(0,Ev.useFunc)(r,s)}(${t}, ${n})`})}J.usePattern=Nv;function Iv(r){let{gen:e,data:t,keyword:n,it:s}=r,i=e.name("valid");if(s.allErrors){let c=e.let("valid",!0);return a(()=>e.assign(c,!1)),c}return e.var(i,!0),a(()=>e.break()),i;function a(c){let u=e.const("len",(0,te._)`${t}.length`);e.forRange("i",0,u,o=>{r.subschema({keyword:n,dataProp:o,dataPropType:Xi.Type.Num},i),e.if((0,te.not)(i),c)})}}J.validateArray=Iv;function Tv(r){let{gen:e,schema:t,keyword:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(u=>(0,Xi.alwaysValidSchema)(s,u))&&!s.opts.unevaluated)return;let a=e.let("valid",!1),c=e.name("_valid");e.block(()=>t.forEach((u,o)=>{let l=r.subschema({keyword:n,schemaProp:o,compositeRule:!0},c);e.assign(a,(0,te._)`${a} || ${c}`),r.mergeValidEvaluated(l,c)||e.if((0,te.not)(a))})),r.result(a,()=>r.reset(),()=>r.error(!0))}J.validateUnion=Tv});var Pl=_(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.validateKeywordUsage=at.validSchemaType=at.funcKeywordCode=at.macroKeywordCode=void 0;var Oe=L(),Bt=$t(),Av=ze(),qv=_n();function Dv(r,e){let{gen:t,keyword:n,schema:s,parentSchema:i,it:a}=r,c=e.macro.call(a.self,s,i,a),u=Ol(t,n,c);a.opts.validateSchema!==!1&&a.self.validateSchema(c,!0);let o=t.name("valid");r.subschema({schema:c,schemaPath:Oe.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},o),r.pass(o,()=>r.error(!0))}at.macroKeywordCode=Dv;function jv(r,e){var t;let{gen:n,keyword:s,schema:i,parentSchema:a,$data:c,it:u}=r;xv(u,e);let o=!c&&e.compile?e.compile.call(u.self,i,a,u):e.validate,l=Ol(n,s,o),d=n.let("valid");r.block$data(d,y),r.ok((t=e.valid)!==null&&t!==void 0?t:d);function y(){if(e.errors===!1)E(),e.modifying&&Sl(r),w(()=>r.error());else{let b=e.async?m():$();e.modifying&&Sl(r),w(()=>kv(r,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>E((0,Oe._)`await `),D=>n.assign(d,!1).if((0,Oe._)`${D} instanceof ${u.ValidationError}`,()=>n.assign(b,(0,Oe._)`${D}.errors`),()=>n.throw(D))),b}function $(){let b=(0,Oe._)`${l}.errors`;return n.assign(b,null),E(Oe.nil),b}function E(b=e.async?(0,Oe._)`await `:Oe.nil){let D=u.opts.passContext?Bt.default.this:Bt.default.self,T=!("compile"in e&&!c||e.schema===!1);n.assign(d,(0,Oe._)`${b}${(0,Av.callValidateCode)(r,l,D,T)}`,e.modifying)}function w(b){var D;n.if((0,Oe.not)((D=e.valid)!==null&&D!==void 0?D:d),b)}}at.funcKeywordCode=jv;function Sl(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,Oe._)`${n.parentData}[${n.parentDataProperty}]`))}function kv(r,e){let{gen:t}=r;t.if((0,Oe._)`Array.isArray(${e})`,()=>{t.assign(Bt.default.vErrors,(0,Oe._)`${Bt.default.vErrors} === null ? ${e} : ${Bt.default.vErrors}.concat(${e})`).assign(Bt.default.errors,(0,Oe._)`${Bt.default.vErrors}.length`),(0,qv.extendErrors)(r)},()=>r.error())}function xv({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function Ol(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,Oe.stringify)(t)})}function Lv(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r>"u")}at.validSchemaType=Lv;function Mv({schema:r,opts:e,self:t,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");let a=s.dependencies;if(a!=null&&a.some(c=>!Object.prototype.hasOwnProperty.call(r,c)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(s.validateSchema&&!s.validateSchema(r[i])){let u=`keyword "${i}" value is invalid at path "${n}": `+t.errorsText(s.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(u);else throw new Error(u)}}at.validateKeywordUsage=Mv});var Cl=_(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.extendSubschemaMode=Nt.extendSubschemaData=Nt.getSubschema=void 0;var ot=L(),Rl=G();function Fv(r,{keyword:e,schemaProp:t,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let c=r.schema[e];return t===void 0?{schema:c,schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:c[t],schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}${(0,ot.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,Rl.escapeFragment)(t)}`}}if(n!==void 0){if(s===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Nt.getSubschema=Fv;function Vv(r,e,{dataProp:t,dataPropType:n,data:s,dataTypes:i,propertyName:a}){if(s!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=e;if(t!==void 0){let{errorPath:o,dataPathArr:l,opts:d}=e,y=c.let("data",(0,ot._)`${e.data}${(0,ot.getProperty)(t)}`,!0);u(y),r.errorPath=(0,ot.str)`${o}${(0,Rl.getErrorPath)(t,n,d.jsPropertySyntax)}`,r.parentDataProperty=(0,ot._)`${t}`,r.dataPathArr=[...l,r.parentDataProperty]}if(s!==void 0){let o=s instanceof ot.Name?s:c.let("data",s,!0);u(o),a!==void 0&&(r.propertyName=a)}i&&(r.dataTypes=i);function u(o){r.data=o,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,o]}}Nt.extendSubschemaData=Vv;function Hv(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(r.compositeRule=n),s!==void 0&&(r.createErrors=s),i!==void 0&&(r.allErrors=i),r.jtdDiscriminator=e,r.jtdMetadata=t}Nt.extendSubschemaMode=Hv});var Ji=_((Uw,Nl)=>{"use strict";Nl.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!r(e[s],t[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}});var Tl=_((Gw,Il)=>{"use strict";var It=Il.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},s=t.post||function(){};ms(e,n,s,r,"",r)};It.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};It.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};It.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};It.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 ms(r,e,t,n,s,i,a,c,u,o){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,s,i,a,c,u,o);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in It.arrayKeywords)for(var y=0;y<d.length;y++)ms(r,e,t,d[y],s+"/"+l+"/"+y,i,s,l,n,y)}else if(l in It.propsKeywords){if(d&&typeof d=="object")for(var m in d)ms(r,e,t,d[m],s+"/"+l+"/"+Uv(m),i,s,l,n,m)}else(l in It.keywords||r.allKeys&&!(l in It.skipKeywords))&&ms(r,e,t,d,s+"/"+l,i,s,l,n)}t(n,s,i,a,c,u,o)}}function Uv(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var En=_(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getSchemaRefs=Ne.resolveUrl=Ne.normalizeId=Ne._getFullPath=Ne.getFullPath=Ne.inlineRef=void 0;var Gv=G(),zv=Ji(),Kv=Tl(),Xv=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Wv(r,e=!0){return typeof r=="boolean"?!0:e===!0?!Yi(r):e?Al(r)<=e:!1}Ne.inlineRef=Wv;var Bv=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Yi(r){for(let e in r){if(Bv.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(Yi)||typeof t=="object"&&Yi(t))return!0}return!1}function Al(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!Xv.has(t)&&(typeof r[t]=="object"&&(0,Gv.eachItem)(r[t],n=>e+=Al(n)),e===1/0))return 1/0}return e}function ql(r,e="",t){t!==!1&&(e=Pr(e));let n=r.parse(e);return Dl(r,n)}Ne.getFullPath=ql;function Dl(r,e){return r.serialize(e).split("#")[0]+"#"}Ne._getFullPath=Dl;var Jv=/#\/?$/;function Pr(r){return r?r.replace(Jv,""):""}Ne.normalizeId=Pr;function Yv(r,e,t){return t=Pr(t),r.resolve(e,t)}Ne.resolveUrl=Yv;var Zv=/^[a-z_][-a-z0-9._]*$/i;function Qv(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,s=Pr(r[t]||e),i={"":s},a=ql(n,s,!1),c={},u=new Set;return Kv(r,{allKeys:!0},(d,y,m,$)=>{if($===void 0)return;let E=a+y,w=i[$];typeof d[t]=="string"&&(w=b.call(this,d[t])),D.call(this,d.$anchor),D.call(this,d.$dynamicAnchor),i[y]=w;function b(T){let z=this.opts.uriResolver.resolve;if(T=Pr(w?z(w,T):T),u.has(T))throw l(T);u.add(T);let C=this.refs[T];return typeof C=="string"&&(C=this.refs[C]),typeof C=="object"?o(d,C.schema,T):T!==Pr(E)&&(T[0]==="#"?(o(d,c[T],T),c[T]=d):this.refs[T]=E),T}function D(T){if(typeof T=="string"){if(!Zv.test(T))throw new Error(`invalid anchor "${T}"`);b.call(this,`#${T}`)}}}),c;function o(d,y,m){if(y!==void 0&&!zv(d,y))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Ne.getSchemaRefs=Qv});var Sn=_(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.getData=Tt.KeywordCxt=Tt.validateFunctionCode=void 0;var Fl=pl(),jl=$n(),Qi=Ui(),gs=$n(),e_=El(),bn=Pl(),Zi=Cl(),R=L(),I=$t(),t_=En(),Et=G(),wn=_n();function r_(r){if(Ul(r)&&(Gl(r),Hl(r))){i_(r);return}Vl(r,()=>(0,Fl.topBoolOrEmptySchema)(r))}Tt.validateFunctionCode=r_;function Vl({gen:r,validateName:e,schema:t,schemaEnv:n,opts:s},i){s.code.es5?r.func(e,(0,R._)`${I.default.data}, ${I.default.valCxt}`,n.$async,()=>{r.code((0,R._)`"use strict"; ${kl(t,s)}`),s_(r,s),r.code(i)}):r.func(e,(0,R._)`${I.default.data}, ${n_(s)}`,n.$async,()=>r.code(kl(t,s)).code(i))}function n_(r){return(0,R._)`{${I.default.instancePath}="", ${I.default.parentData}, ${I.default.parentDataProperty}, ${I.default.rootData}=${I.default.data}${r.dynamicRef?(0,R._)`, ${I.default.dynamicAnchors}={}`:R.nil}}={}`}function s_(r,e){r.if(I.default.valCxt,()=>{r.var(I.default.instancePath,(0,R._)`${I.default.valCxt}.${I.default.instancePath}`),r.var(I.default.parentData,(0,R._)`${I.default.valCxt}.${I.default.parentData}`),r.var(I.default.parentDataProperty,(0,R._)`${I.default.valCxt}.${I.default.parentDataProperty}`),r.var(I.default.rootData,(0,R._)`${I.default.valCxt}.${I.default.rootData}`),e.dynamicRef&&r.var(I.default.dynamicAnchors,(0,R._)`${I.default.valCxt}.${I.default.dynamicAnchors}`)},()=>{r.var(I.default.instancePath,(0,R._)`""`),r.var(I.default.parentData,(0,R._)`undefined`),r.var(I.default.parentDataProperty,(0,R._)`undefined`),r.var(I.default.rootData,I.default.data),e.dynamicRef&&r.var(I.default.dynamicAnchors,(0,R._)`{}`)})}function i_(r){let{schema:e,opts:t,gen:n}=r;Vl(r,()=>{t.$comment&&e.$comment&&Kl(r),l_(r),n.let(I.default.vErrors,null),n.let(I.default.errors,0),t.unevaluated&&a_(r),zl(r),h_(r)})}function a_(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,R._)`${t}.evaluated`),e.if((0,R._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,R._)`${r.evaluated}.props`,(0,R._)`undefined`)),e.if((0,R._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,R._)`${r.evaluated}.items`,(0,R._)`undefined`))}function kl(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,R._)`/*# sourceURL=${t} */`:R.nil}function o_(r,e){if(Ul(r)&&(Gl(r),Hl(r))){c_(r,e);return}(0,Fl.boolOrEmptySchema)(r,e)}function Hl({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function Ul(r){return typeof r.schema!="boolean"}function c_(r,e){let{schema:t,gen:n,opts:s}=r;s.$comment&&t.$comment&&Kl(r),f_(r),d_(r);let i=n.const("_errs",I.default.errors);zl(r,i),n.var(e,(0,R._)`${i} === ${I.default.errors}`)}function Gl(r){(0,Et.checkUnknownRules)(r),u_(r)}function zl(r,e){if(r.opts.jtd)return xl(r,[],!1,e);let t=(0,jl.getSchemaTypes)(r.schema),n=(0,jl.coerceAndCheckDataType)(r,t);xl(r,t,!n,e)}function u_(r){let{schema:e,errSchemaPath:t,opts:n,self:s}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,Et.schemaHasRulesButRef)(e,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function l_(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Et.checkStrictMode)(r,"default is ignored in the schema root")}function f_(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,t_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function d_(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function Kl({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:s}){let i=t.$comment;if(s.$comment===!0)r.code((0,R._)`${I.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){let a=(0,R.str)`${n}/$comment`,c=r.scopeValue("root",{ref:e.root});r.code((0,R._)`${I.default.self}.opts.$comment(${i}, ${a}, ${c}.schema)`)}}function h_(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:s,opts:i}=r;t.$async?e.if((0,R._)`${I.default.errors} === 0`,()=>e.return(I.default.data),()=>e.throw((0,R._)`new ${s}(${I.default.vErrors})`)):(e.assign((0,R._)`${n}.errors`,I.default.vErrors),i.unevaluated&&p_(r),e.return((0,R._)`${I.default.errors} === 0`))}function p_({gen:r,evaluated:e,props:t,items:n}){t instanceof R.Name&&r.assign((0,R._)`${e}.props`,t),n instanceof R.Name&&r.assign((0,R._)`${e}.items`,n)}function xl(r,e,t,n){let{gen:s,schema:i,data:a,allErrors:c,opts:u,self:o}=r,{RULES:l}=o;if(i.$ref&&(u.ignoreKeywordsWithRef||!(0,Et.schemaHasRulesButRef)(i,l))){s.block(()=>Xl(r,"$ref",l.all.$ref.definition));return}u.jtd||m_(r,e),s.block(()=>{for(let y of l.rules)d(y);d(l.post)});function d(y){!(0,Qi.shouldUseGroup)(i,y)||(y.type?(s.if((0,gs.checkDataType)(y.type,a,u.strictNumbers)),Ll(r,y),e.length===1&&e[0]===y.type&&t&&(s.else(),(0,gs.reportTypeError)(r)),s.endIf()):Ll(r,y),c||s.if((0,R._)`${I.default.errors} === ${n||0}`))}}function Ll(r,e){let{gen:t,schema:n,opts:{useDefaults:s}}=r;s&&(0,e_.assignDefaults)(r,e.type),t.block(()=>{for(let i of e.rules)(0,Qi.shouldUseRule)(n,i)&&Xl(r,i.keyword,i.definition,e.type)})}function m_(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(g_(r,e),r.opts.allowUnionTypes||v_(r,e),__(r,r.dataTypes))}function g_(r,e){if(!!e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{Ml(r.dataTypes,t)||ea(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),r.dataTypes=r.dataTypes.filter(t=>Ml(e,t))}}function v_(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&ea(r,"use allowUnionTypes to allow union type keyword")}function __(r,e){let t=r.self.RULES.all;for(let n in t){let s=t[n];if(typeof s=="object"&&(0,Qi.shouldUseRule)(r.schema,s)){let{type:i}=s.definition;i.length&&!i.some(a=>y_(e,a))&&ea(r,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function y_(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function Ml(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function ea(r,e){e+=` at "${r.schemaEnv.baseId+r.errSchemaPath}" (strictTypes)`,(0,Et.checkStrictMode)(r,e,r.opts.strictTypes)}var vs=class{constructor(e,t,n){if((0,bn.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Et.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Wl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,bn.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",I.default.errors))}result(e,t,n){this.failResult((0,R.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,R.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,R._)`${t} !== undefined && (${(0,R.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?wn.reportExtraError:wn.reportError)(this,this.def.error,t)}$dataError(){(0,wn.reportError)(this,this.def.$dataError||wn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,wn.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=R.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=R.nil,t=R.nil){if(!this.$data)return;let{gen:n,schemaCode:s,schemaType:i,def:a}=this;n.if((0,R.or)((0,R._)`${s} === undefined`,t)),e!==R.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==R.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:s,it:i}=this;return(0,R.or)(a(),c());function a(){if(n.length){if(!(t instanceof R.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,R._)`${(0,gs.checkDataTypes)(u,t,i.opts.strictNumbers,gs.DataType.Wrong)}`}return R.nil}function c(){if(s.validateSchema){let u=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,R._)`!${u}(${t})`}return R.nil}}subschema(e,t){let n=(0,Zi.getSubschema)(this.it,e);(0,Zi.extendSubschemaData)(n,this.it,e),(0,Zi.extendSubschemaMode)(n,e);let s={...this.it,...n,items:void 0,props:void 0};return o_(s,t),s}mergeEvaluated(e,t){let{it:n,gen:s}=this;!n.opts.unevaluated||(n.props!==!0&&e.props!==void 0&&(n.props=Et.mergeEvaluated.props(s,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Et.mergeEvaluated.items(s,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(t,()=>this.mergeEvaluated(e,R.Name)),!0}};Tt.KeywordCxt=vs;function Xl(r,e,t,n){let s=new vs(r,t,e);"code"in t?t.code(s,n):s.$data&&t.validate?(0,bn.funcKeywordCode)(s,t):"macro"in t?(0,bn.macroKeywordCode)(s,t):(t.compile||t.validate)&&(0,bn.funcKeywordCode)(s,t)}var $_=/^\/(?:[^~]|~0|~1)*$/,E_=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Wl(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let s,i;if(r==="")return I.default.rootData;if(r[0]==="/"){if(!$_.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);s=r,i=I.default.rootData}else{let o=E_.exec(r);if(!o)throw new Error(`Invalid JSON-pointer: ${r}`);let l=+o[1];if(s=o[2],s==="#"){if(l>=e)throw new Error(u("property/index",l));return n[e-l]}if(l>e)throw new Error(u("data",l));if(i=t[e-l],!s)return i}let a=i,c=s.split("/");for(let o of c)o&&(i=(0,R._)`${i}${(0,R.getProperty)((0,Et.unescapeJsonPointer)(o))}`,a=(0,R._)`${a} && ${i}`);return a;function u(o,l){return`Cannot access ${o} ${l} levels up, current level is ${e}`}}Tt.getData=Wl});var na=_(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var ta=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};ra.default=ta});var oa=_(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});var sa=En(),ia=class extends Error{constructor(e,t,n,s){super(s||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,sa.resolveUrl)(e,t,n),this.missingSchema=(0,sa.normalizeId)((0,sa.getFullPath)(e,this.missingRef))}};aa.default=ia});var ys=_(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.resolveSchema=Ke.getCompilingSchema=Ke.resolveRef=Ke.compileSchema=Ke.SchemaEnv=void 0;var Ye=L(),w_=na(),Jt=$t(),Ze=En(),Bl=G(),b_=Sn(),Rr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Ze.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Ke.SchemaEnv=Rr;function ua(r){let e=Jl.call(this,r);if(e)return e;let t=(0,Ze.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,a=new Ye.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i}),c;r.$async&&(c=a.scopeValue("Error",{ref:w_.default,code:(0,Ye._)`require("ajv/dist/runtime/validation_error").default`}));let u=a.scopeName("validate");r.validateName=u;let o={gen:a,allErrors:this.opts.allErrors,data:Jt.default.data,parentData:Jt.default.parentData,parentDataProperty:Jt.default.parentDataProperty,dataNames:[Jt.default.data],dataPathArr:[Ye.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Ye.stringify)(r.schema)}:{ref:r.schema}),validateName:u,ValidationError:c,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Ye.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ye._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(r),(0,b_.validateFunctionCode)(o),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(Jt.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,r));let m=new Function(`${Jt.default.self}`,`${Jt.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:m}),m.errors=null,m.schema=r.schema,m.schemaEnv=r,r.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:u,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:$,items:E}=o;m.evaluated={props:$ instanceof Ye.Name?void 0:$,items:E instanceof Ye.Name?void 0:E,dynamicProps:$ instanceof Ye.Name,dynamicItems:E instanceof Ye.Name},m.source&&(m.source.evaluated=(0,Ye.stringify)(m.evaluated))}return r.validate=m,r}catch(d){throw delete r.validate,delete r.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(r)}}Ke.compileSchema=ua;function S_(r,e,t){var n;t=(0,Ze.resolveUrl)(this.opts.uriResolver,e,t);let s=r.refs[t];if(s)return s;let i=R_.call(this,r,t);if(i===void 0){let a=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:c}=this.opts;a&&(i=new Rr({schema:a,schemaId:c,root:r,baseId:e}))}if(i!==void 0)return r.refs[t]=O_.call(this,i)}Ke.resolveRef=S_;function O_(r){return(0,Ze.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:ua.call(this,r)}function Jl(r){for(let e of this._compilations)if(P_(e,r))return e}Ke.getCompilingSchema=Jl;function P_(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function R_(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||_s.call(this,r,e)}function _s(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Ze._getFullPath)(this.opts.uriResolver,t),s=(0,Ze.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===s)return ca.call(this,t,r);let i=(0,Ze.normalizeId)(n),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let c=_s.call(this,r,a);return typeof(c==null?void 0:c.schema)!="object"?void 0:ca.call(this,t,c)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||ua.call(this,a),i===(0,Ze.normalizeId)(e)){let{schema:c}=a,{schemaId:u}=this.opts,o=c[u];return o&&(s=(0,Ze.resolveUrl)(this.opts.uriResolver,s,o)),new Rr({schema:c,schemaId:u,root:r,baseId:s})}return ca.call(this,t,a)}}Ke.resolveSchema=_s;var C_=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function ca(r,{baseId:e,schema:t,root:n}){var s;if(((s=r.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(let c of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let u=t[(0,Bl.unescapeFragment)(c)];if(u===void 0)return;t=u;let o=typeof t=="object"&&t[this.opts.schemaId];!C_.has(c)&&o&&(e=(0,Ze.resolveUrl)(this.opts.uriResolver,e,o))}let i;if(typeof t!="boolean"&&t.$ref&&!(0,Bl.schemaHasRulesButRef)(t,this.RULES)){let c=(0,Ze.resolveUrl)(this.opts.uriResolver,e,t.$ref);i=_s.call(this,n,c)}let{schemaId:a}=this.opts;if(i=i||new Rr({schema:t,schemaId:a,root:n,baseId:e}),i.schema!==i.root.schema)return i}});var Yl=_((Jw,N_)=>{N_.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Ql=_(($s,Zl)=>{(function(r,e){typeof $s=="object"&&typeof Zl<"u"?e($s):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})($s,function(r){"use strict";function e(){for(var h=arguments.length,f=Array(h),p=0;p<h;p++)f[p]=arguments[p];if(f.length>1){f[0]=f[0].slice(0,-1);for(var g=f.length-1,v=1;v<g;++v)f[v]=f[v].slice(1,-1);return f[g]=f[g].slice(1),f.join("")}else return f[0]}function t(h){return"(?:"+h+")"}function n(h){return h===void 0?"undefined":h===null?"null":Object.prototype.toString.call(h).split(" ").pop().split("]").shift().toLowerCase()}function s(h){return h.toUpperCase()}function i(h){return h!=null?h instanceof Array?h:typeof h.length!="number"||h.split||h.setInterval||h.call?[h]:Array.prototype.slice.call(h):[]}function a(h,f){var p=h;if(f)for(var g in f)p[g]=f[g];return p}function c(h){var f="[A-Za-z]",p="[\\x0D]",g="[0-9]",v="[\\x22]",S=e(g,"[A-Fa-f]"),A="[\\x0A]",H="[\\x20]",W=t(t("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+t("%[89A-Fa-f]"+S+"%"+S+S)+"|"+t("%"+S+S)),ce="[\\:\\/\\?\\#\\[\\]\\@]",F="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",se=e(ce,F),ue=h?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ne=h?"[\\uE000-\\uF8FF]":"[]",K=e(f,g,"[\\-\\.\\_\\~]",ue),ie=t(f+e(f,g,"[\\+\\-\\.]")+"*"),B=t(t(W+"|"+e(K,F,"[\\:]"))+"*"),Dt=t(t("25[0-5]")+"|"+t("2[0-4]"+g)+"|"+t("1"+g+g)+"|"+t("[1-9]"+g)+"|"+g),Ae=t(t("25[0-5]")+"|"+t("2[0-4]"+g)+"|"+t("1"+g+g)+"|"+t("0?[1-9]"+g)+"|0?0?"+g),Fe=t(Ae+"\\."+Ae+"\\."+Ae+"\\."+Ae),Y=t(S+"{1,4}"),qe=t(t(Y+"\\:"+Y)+"|"+Fe),Ve=t(t(Y+"\\:")+"{6}"+qe),st=t("\\:\\:"+t(Y+"\\:")+"{5}"+qe),jt=t(t(Y)+"?\\:\\:"+t(Y+"\\:")+"{4}"+qe),dt=t(t(t(Y+"\\:")+"{0,1}"+Y)+"?\\:\\:"+t(Y+"\\:")+"{3}"+qe),Ur=t(t(t(Y+"\\:")+"{0,2}"+Y)+"?\\:\\:"+t(Y+"\\:")+"{2}"+qe),Hn=t(t(t(Y+"\\:")+"{0,3}"+Y)+"?\\:\\:"+Y+"\\:"+qe),Un=t(t(t(Y+"\\:")+"{0,4}"+Y)+"?\\:\\:"+qe),ir=t(t(t(Y+"\\:")+"{0,5}"+Y)+"?\\:\\:"+Y),ar=t(t(t(Y+"\\:")+"{0,6}"+Y)+"?\\:\\:"),ht=t([Ve,st,jt,dt,Ur,Hn,Un,ir,ar].join("|")),or=t(t(K+"|"+W)+"+"),Us=t(ht+"\\%25"+or),kt=t(ht+t("\\%25|\\%(?!"+S+"{2})")+or),ih=t("[vV]"+S+"+\\."+e(K,F,"[\\:]")+"+"),ah=t("\\["+t(kt+"|"+ht+"|"+ih)+"\\]"),Oo=t(t(W+"|"+e(K,F))+"*"),Gr=t(ah+"|"+Fe+"(?!"+Oo+")|"+Oo),zr=t(g+"*"),Po=t(t(B+"@")+"?"+Gr+t("\\:"+zr)+"?"),Kr=t(W+"|"+e(K,F,"[\\:\\@]")),oh=t(Kr+"*"),Ro=t(Kr+"+"),ch=t(t(W+"|"+e(K,F,"[\\@]"))+"+"),pt=t(t("\\/"+oh)+"*"),cr=t("\\/"+t(Ro+pt)+"?"),Gs=t(ch+pt),Gn=t(Ro+pt),ur="(?!"+Kr+")",yE=t(pt+"|"+cr+"|"+Gs+"|"+Gn+"|"+ur),lr=t(t(Kr+"|"+e("[\\/\\?]",ne))+"*"),Xr=t(t(Kr+"|[\\/\\?]")+"*"),Co=t(t("\\/\\/"+Po+pt)+"|"+cr+"|"+Gn+"|"+ur),uh=t(ie+"\\:"+Co+t("\\?"+lr)+"?"+t("\\#"+Xr)+"?"),lh=t(t("\\/\\/"+Po+pt)+"|"+cr+"|"+Gs+"|"+ur),fh=t(lh+t("\\?"+lr)+"?"+t("\\#"+Xr)+"?"),$E=t(uh+"|"+fh),EE=t(ie+"\\:"+Co+t("\\?"+lr)+"?"),wE="^("+ie+")\\:"+t(t("\\/\\/("+t("("+B+")@")+"?("+Gr+")"+t("\\:("+zr+")")+"?)")+"?("+pt+"|"+cr+"|"+Gn+"|"+ur+")")+t("\\?("+lr+")")+"?"+t("\\#("+Xr+")")+"?$",bE="^(){0}"+t(t("\\/\\/("+t("("+B+")@")+"?("+Gr+")"+t("\\:("+zr+")")+"?)")+"?("+pt+"|"+cr+"|"+Gs+"|"+ur+")")+t("\\?("+lr+")")+"?"+t("\\#("+Xr+")")+"?$",SE="^("+ie+")\\:"+t(t("\\/\\/("+t("("+B+")@")+"?("+Gr+")"+t("\\:("+zr+")")+"?)")+"?("+pt+"|"+cr+"|"+Gn+"|"+ur+")")+t("\\?("+lr+")")+"?$",OE="^"+t("\\#("+Xr+")")+"?$",PE="^"+t("("+B+")@")+"?("+Gr+")"+t("\\:("+zr+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",f,g,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",K,F),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",K,F),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",K,F),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",K,F),"g"),NOT_QUERY:new RegExp(e("[^\\%]",K,F,"[\\:\\@\\/\\?]",ne),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",K,F,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",K,F),"g"),UNRESERVED:new RegExp(K,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",K,se),"g"),PCT_ENCODED:new RegExp(W,"g"),IPV4ADDRESS:new RegExp("^("+Fe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ht+")"+t(t("\\%25|\\%(?!"+S+"{2})")+"("+or+")")+"?\\]?$")}}var u=c(!1),o=c(!0),l=function(){function h(f,p){var g=[],v=!0,S=!1,A=void 0;try{for(var H=f[Symbol.iterator](),W;!(v=(W=H.next()).done)&&(g.push(W.value),!(p&&g.length===p));v=!0);}catch(ce){S=!0,A=ce}finally{try{!v&&H.return&&H.return()}finally{if(S)throw A}}return g}return function(f,p){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f))return h(f,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(h){if(Array.isArray(h)){for(var f=0,p=Array(h.length);f<h.length;f++)p[f]=h[f];return p}else return Array.from(h)},y=2147483647,m=36,$=1,E=26,w=38,b=700,D=72,T=128,z="-",C=/^xn--/,me=/[^\0-\x7E]/,ke=/[\x2E\u3002\uFF0E\uFF61]/g,bt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xe=m-$,re=Math.floor,Le=String.fromCharCode;function et(h){throw new RangeError(bt[h])}function Fn(h,f){for(var p=[],g=h.length;g--;)p[g]=f(h[g]);return p}function Vn(h,f){var p=h.split("@"),g="";p.length>1&&(g=p[0]+"@",h=p[1]),h=h.replace(ke,".");var v=h.split("."),S=Fn(v,f).join(".");return g+S}function ao(h){for(var f=[],p=0,g=h.length;p<g;){var v=h.charCodeAt(p++);if(v>=55296&&v<=56319&&p<g){var S=h.charCodeAt(p++);(S&64512)==56320?f.push(((v&1023)<<10)+(S&1023)+65536):(f.push(v),p--)}else f.push(v)}return f}var jd=function(f){return String.fromCodePoint.apply(String,d(f))},kd=function(f){return f-48<10?f-22:f-65<26?f-65:f-97<26?f-97:m},oo=function(f,p){return f+22+75*(f<26)-((p!=0)<<5)},co=function(f,p,g){var v=0;for(f=g?re(f/b):f>>1,f+=re(f/p);f>xe*E>>1;v+=m)f=re(f/xe);return re(v+(xe+1)*f/(f+w))},uo=function(f){var p=[],g=f.length,v=0,S=T,A=D,H=f.lastIndexOf(z);H<0&&(H=0);for(var W=0;W<H;++W)f.charCodeAt(W)>=128&&et("not-basic"),p.push(f.charCodeAt(W));for(var ce=H>0?H+1:0;ce<g;){for(var F=v,se=1,ue=m;;ue+=m){ce>=g&&et("invalid-input");var ne=kd(f.charCodeAt(ce++));(ne>=m||ne>re((y-v)/se))&&et("overflow"),v+=ne*se;var K=ue<=A?$:ue>=A+E?E:ue-A;if(ne<K)break;var ie=m-K;se>re(y/ie)&&et("overflow"),se*=ie}var B=p.length+1;A=co(v-F,B,F==0),re(v/B)>y-S&&et("overflow"),S+=re(v/B),v%=B,p.splice(v++,0,S)}return String.fromCodePoint.apply(String,p)},lo=function(f){var p=[];f=ao(f);var g=f.length,v=T,S=0,A=D,H=!0,W=!1,ce=void 0;try{for(var F=f[Symbol.iterator](),se;!(H=(se=F.next()).done);H=!0){var ue=se.value;ue<128&&p.push(Le(ue))}}catch(kt){W=!0,ce=kt}finally{try{!H&&F.return&&F.return()}finally{if(W)throw ce}}var ne=p.length,K=ne;for(ne&&p.push(z);K<g;){var ie=y,B=!0,Dt=!1,Ae=void 0;try{for(var Fe=f[Symbol.iterator](),Y;!(B=(Y=Fe.next()).done);B=!0){var qe=Y.value;qe>=v&&qe<ie&&(ie=qe)}}catch(kt){Dt=!0,Ae=kt}finally{try{!B&&Fe.return&&Fe.return()}finally{if(Dt)throw Ae}}var Ve=K+1;ie-v>re((y-S)/Ve)&&et("overflow"),S+=(ie-v)*Ve,v=ie;var st=!0,jt=!1,dt=void 0;try{for(var Ur=f[Symbol.iterator](),Hn;!(st=(Hn=Ur.next()).done);st=!0){var Un=Hn.value;if(Un<v&&++S>y&&et("overflow"),Un==v){for(var ir=S,ar=m;;ar+=m){var ht=ar<=A?$:ar>=A+E?E:ar-A;if(ir<ht)break;var or=ir-ht,Us=m-ht;p.push(Le(oo(ht+or%Us,0))),ir=re(or/Us)}p.push(Le(oo(ir,0))),A=co(S,Ve,K==ne),S=0,++K}}}catch(kt){jt=!0,dt=kt}finally{try{!st&&Ur.return&&Ur.return()}finally{if(jt)throw dt}}++S,++v}return p.join("")},xd=function(f){return Vn(f,function(p){return C.test(p)?uo(p.slice(4).toLowerCase()):p})},Ld=function(f){return Vn(f,function(p){return me.test(p)?"xn--"+lo(p):p})},tr={version:"2.1.0",ucs2:{decode:ao,encode:jd},decode:uo,encode:lo,toASCII:Ld,toUnicode:xd},Me={};function tt(h){var f=h.charCodeAt(0),p=void 0;return f<16?p="%0"+f.toString(16).toUpperCase():f<128?p="%"+f.toString(16).toUpperCase():f<2048?p="%"+(f>>6|192).toString(16).toUpperCase()+"%"+(f&63|128).toString(16).toUpperCase():p="%"+(f>>12|224).toString(16).toUpperCase()+"%"+(f>>6&63|128).toString(16).toUpperCase()+"%"+(f&63|128).toString(16).toUpperCase(),p}function rr(h){for(var f="",p=0,g=h.length;p<g;){var v=parseInt(h.substr(p+1,2),16);if(v<128)f+=String.fromCharCode(v),p+=3;else if(v>=194&&v<224){if(g-p>=6){var S=parseInt(h.substr(p+4,2),16);f+=String.fromCharCode((v&31)<<6|S&63)}else f+=h.substr(p,6);p+=6}else if(v>=224){if(g-p>=9){var A=parseInt(h.substr(p+4,2),16),H=parseInt(h.substr(p+7,2),16);f+=String.fromCharCode((v&15)<<12|(A&63)<<6|H&63)}else f+=h.substr(p,9);p+=9}else f+=h.substr(p,3),p+=3}return f}function Ms(h,f){function p(g){var v=rr(g);return v.match(f.UNRESERVED)?v:g}return h.scheme&&(h.scheme=String(h.scheme).replace(f.PCT_ENCODED,p).toLowerCase().replace(f.NOT_SCHEME,"")),h.userinfo!==void 0&&(h.userinfo=String(h.userinfo).replace(f.PCT_ENCODED,p).replace(f.NOT_USERINFO,tt).replace(f.PCT_ENCODED,s)),h.host!==void 0&&(h.host=String(h.host).replace(f.PCT_ENCODED,p).toLowerCase().replace(f.NOT_HOST,tt).replace(f.PCT_ENCODED,s)),h.path!==void 0&&(h.path=String(h.path).replace(f.PCT_ENCODED,p).replace(h.scheme?f.NOT_PATH:f.NOT_PATH_NOSCHEME,tt).replace(f.PCT_ENCODED,s)),h.query!==void 0&&(h.query=String(h.query).replace(f.PCT_ENCODED,p).replace(f.NOT_QUERY,tt).replace(f.PCT_ENCODED,s)),h.fragment!==void 0&&(h.fragment=String(h.fragment).replace(f.PCT_ENCODED,p).replace(f.NOT_FRAGMENT,tt).replace(f.PCT_ENCODED,s)),h}function Fs(h){return h.replace(/^0*(.*)/,"$1")||"0"}function Vs(h,f){var p=h.match(f.IPV4ADDRESS)||[],g=l(p,2),v=g[1];return v?v.split(".").map(Fs).join("."):h}function fo(h,f){var p=h.match(f.IPV6ADDRESS)||[],g=l(p,3),v=g[1],S=g[2];if(v){for(var A=v.toLowerCase().split("::").reverse(),H=l(A,2),W=H[0],ce=H[1],F=ce?ce.split(":").map(Fs):[],se=W.split(":").map(Fs),ue=f.IPV4ADDRESS.test(se[se.length-1]),ne=ue?7:8,K=se.length-ne,ie=Array(ne),B=0;B<ne;++B)ie[B]=F[B]||se[K+B]||"";ue&&(ie[ne-1]=Vs(ie[ne-1],f));var Dt=ie.reduce(function(Ve,st,jt){if(!st||st==="0"){var dt=Ve[Ve.length-1];dt&&dt.index+dt.length===jt?dt.length++:Ve.push({index:jt,length:1})}return Ve},[]),Ae=Dt.sort(function(Ve,st){return st.length-Ve.length})[0],Fe=void 0;if(Ae&&Ae.length>1){var Y=ie.slice(0,Ae.index),qe=ie.slice(Ae.index+Ae.length);Fe=Y.join(":")+"::"+qe.join(":")}else Fe=ie.join(":");return S&&(Fe+="%"+S),Fe}else return h}var Md=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Fd="".match(/(){0}/)[1]===void 0;function lt(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p={},g=f.iri!==!1?o:u;f.reference==="suffix"&&(h=(f.scheme?f.scheme+":":"")+"//"+h);var v=h.match(Md);if(v){Fd?(p.scheme=v[1],p.userinfo=v[3],p.host=v[4],p.port=parseInt(v[5],10),p.path=v[6]||"",p.query=v[7],p.fragment=v[8],isNaN(p.port)&&(p.port=v[5])):(p.scheme=v[1]||void 0,p.userinfo=h.indexOf("@")!==-1?v[3]:void 0,p.host=h.indexOf("//")!==-1?v[4]:void 0,p.port=parseInt(v[5],10),p.path=v[6]||"",p.query=h.indexOf("?")!==-1?v[7]:void 0,p.fragment=h.indexOf("#")!==-1?v[8]:void 0,isNaN(p.port)&&(p.port=h.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?v[4]:void 0)),p.host&&(p.host=fo(Vs(p.host,g),g)),p.scheme===void 0&&p.userinfo===void 0&&p.host===void 0&&p.port===void 0&&!p.path&&p.query===void 0?p.reference="same-document":p.scheme===void 0?p.reference="relative":p.fragment===void 0?p.reference="absolute":p.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==p.reference&&(p.error=p.error||"URI is not a "+f.reference+" reference.");var S=Me[(f.scheme||p.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!S||!S.unicodeSupport)){if(p.host&&(f.domainHost||S&&S.domainHost))try{p.host=tr.toASCII(p.host.replace(g.PCT_ENCODED,rr).toLowerCase())}catch(A){p.error=p.error||"Host's domain name can not be converted to ASCII via punycode: "+A}Ms(p,u)}else Ms(p,g);S&&S.parse&&S.parse(p,f)}else p.error=p.error||"URI can not be parsed.";return p}function Vd(h,f){var p=f.iri!==!1?o:u,g=[];return h.userinfo!==void 0&&(g.push(h.userinfo),g.push("@")),h.host!==void 0&&g.push(fo(Vs(String(h.host),p),p).replace(p.IPV6ADDRESS,function(v,S,A){return"["+S+(A?"%25"+A:"")+"]"})),(typeof h.port=="number"||typeof h.port=="string")&&(g.push(":"),g.push(String(h.port))),g.length?g.join(""):void 0}var ho=/^\.\.?\//,po=/^\/\.(\/|$)/,mo=/^\/\.\.(\/|$)/,Hd=/^\/?(?:.|\n)*?(?=\/|$)/;function nr(h){for(var f=[];h.length;)if(h.match(ho))h=h.replace(ho,"");else if(h.match(po))h=h.replace(po,"/");else if(h.match(mo))h=h.replace(mo,"/"),f.pop();else if(h==="."||h==="..")h="";else{var p=h.match(Hd);if(p){var g=p[0];h=h.slice(g.length),f.push(g)}else throw new Error("Unexpected dot segment condition")}return f.join("")}function rt(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=f.iri?o:u,g=[],v=Me[(f.scheme||h.scheme||"").toLowerCase()];if(v&&v.serialize&&v.serialize(h,f),h.host&&!p.IPV6ADDRESS.test(h.host)){if(f.domainHost||v&&v.domainHost)try{h.host=f.iri?tr.toUnicode(h.host):tr.toASCII(h.host.replace(p.PCT_ENCODED,rr).toLowerCase())}catch(H){h.error=h.error||"Host's domain name can not be converted to "+(f.iri?"Unicode":"ASCII")+" via punycode: "+H}}Ms(h,p),f.reference!=="suffix"&&h.scheme&&(g.push(h.scheme),g.push(":"));var S=Vd(h,f);if(S!==void 0&&(f.reference!=="suffix"&&g.push("//"),g.push(S),h.path&&h.path.charAt(0)!=="/"&&g.push("/")),h.path!==void 0){var A=h.path;!f.absolutePath&&(!v||!v.absolutePath)&&(A=nr(A)),S===void 0&&(A=A.replace(/^\/\//,"/%2F")),g.push(A)}return h.query!==void 0&&(g.push("?"),g.push(h.query)),h.fragment!==void 0&&(g.push("#"),g.push(h.fragment)),g.join("")}function go(h,f){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=arguments[3],v={};return g||(h=lt(rt(h,p),p),f=lt(rt(f,p),p)),p=p||{},!p.tolerant&&f.scheme?(v.scheme=f.scheme,v.userinfo=f.userinfo,v.host=f.host,v.port=f.port,v.path=nr(f.path||""),v.query=f.query):(f.userinfo!==void 0||f.host!==void 0||f.port!==void 0?(v.userinfo=f.userinfo,v.host=f.host,v.port=f.port,v.path=nr(f.path||""),v.query=f.query):(f.path?(f.path.charAt(0)==="/"?v.path=nr(f.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?v.path="/"+f.path:h.path?v.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+f.path:v.path=f.path,v.path=nr(v.path)),v.query=f.query):(v.path=h.path,f.query!==void 0?v.query=f.query:v.query=h.query),v.userinfo=h.userinfo,v.host=h.host,v.port=h.port),v.scheme=h.scheme),v.fragment=f.fragment,v}function Ud(h,f,p){var g=a({scheme:"null"},p);return rt(go(lt(h,g),lt(f,g),g,!0),g)}function Gd(h,f){return typeof h=="string"?h=rt(lt(h,f),f):n(h)==="object"&&(h=lt(rt(h,f),f)),h}function zd(h,f,p){return typeof h=="string"?h=rt(lt(h,p),p):n(h)==="object"&&(h=rt(h,p)),typeof f=="string"?f=rt(lt(f,p),p):n(f)==="object"&&(f=rt(f,p)),h===f}function Kd(h,f){return h&&h.toString().replace(!f||!f.iri?u.ESCAPE:o.ESCAPE,tt)}function ft(h,f){return h&&h.toString().replace(!f||!f.iri?u.PCT_ENCODED:o.PCT_ENCODED,rr)}var Vr={scheme:"http",domainHost:!0,parse:function(f,p){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f},serialize:function(f,p){var g=String(f.scheme).toLowerCase()==="https";return(f.port===(g?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}},vo={scheme:"https",domainHost:Vr.domainHost,parse:Vr.parse,serialize:Vr.serialize};function _o(h){return typeof h.secure=="boolean"?h.secure:String(h.scheme).toLowerCase()==="wss"}var Hr={scheme:"ws",domainHost:!0,parse:function(f,p){var g=f;return g.secure=_o(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g},serialize:function(f,p){if((f.port===(_o(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){var g=f.resourceName.split("?"),v=l(g,2),S=v[0],A=v[1];f.path=S&&S!=="/"?S:void 0,f.query=A,f.resourceName=void 0}return f.fragment=void 0,f}},yo={scheme:"wss",domainHost:Hr.domainHost,parse:Hr.parse,serialize:Hr.serialize},Xd={},Wd=!0,$o="[A-Za-z0-9\\-\\.\\_\\~"+(Wd?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",nt="[0-9A-Fa-f]",Bd=t(t("%[EFef]"+nt+"%"+nt+nt+"%"+nt+nt)+"|"+t("%[89A-Fa-f]"+nt+"%"+nt+nt)+"|"+t("%"+nt+nt)),Jd="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Yd="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Zd=e(Yd,'[\\"\\\\]'),Qd="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",eh=new RegExp($o,"g"),sr=new RegExp(Bd,"g"),th=new RegExp(e("[^]",Jd,"[\\.]",'[\\"]',Zd),"g"),Eo=new RegExp(e("[^]",$o,Qd),"g"),rh=Eo;function Hs(h){var f=rr(h);return f.match(eh)?f:h}var wo={scheme:"mailto",parse:function(f,p){var g=f,v=g.to=g.path?g.path.split(","):[];if(g.path=void 0,g.query){for(var S=!1,A={},H=g.query.split("&"),W=0,ce=H.length;W<ce;++W){var F=H[W].split("=");switch(F[0]){case"to":for(var se=F[1].split(","),ue=0,ne=se.length;ue<ne;++ue)v.push(se[ue]);break;case"subject":g.subject=ft(F[1],p);break;case"body":g.body=ft(F[1],p);break;default:S=!0,A[ft(F[0],p)]=ft(F[1],p);break}}S&&(g.headers=A)}g.query=void 0;for(var K=0,ie=v.length;K<ie;++K){var B=v[K].split("@");if(B[0]=ft(B[0]),p.unicodeSupport)B[1]=ft(B[1],p).toLowerCase();else try{B[1]=tr.toASCII(ft(B[1],p).toLowerCase())}catch(Dt){g.error=g.error||"Email address's domain name can not be converted to ASCII via punycode: "+Dt}v[K]=B.join("@")}return g},serialize:function(f,p){var g=f,v=i(f.to);if(v){for(var S=0,A=v.length;S<A;++S){var H=String(v[S]),W=H.lastIndexOf("@"),ce=H.slice(0,W).replace(sr,Hs).replace(sr,s).replace(th,tt),F=H.slice(W+1);try{F=p.iri?tr.toUnicode(F):tr.toASCII(ft(F,p).toLowerCase())}catch(K){g.error=g.error||"Email address's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+K}v[S]=ce+"@"+F}g.path=v.join(",")}var se=f.headers=f.headers||{};f.subject&&(se.subject=f.subject),f.body&&(se.body=f.body);var ue=[];for(var ne in se)se[ne]!==Xd[ne]&&ue.push(ne.replace(sr,Hs).replace(sr,s).replace(Eo,tt)+"="+se[ne].replace(sr,Hs).replace(sr,s).replace(rh,tt));return ue.length&&(g.query=ue.join("&")),g}},nh=/^([^\:]+)\:(.*)/,bo={scheme:"urn",parse:function(f,p){var g=f.path&&f.path.match(nh),v=f;if(g){var S=p.scheme||v.scheme||"urn",A=g[1].toLowerCase(),H=g[2],W=S+":"+(p.nid||A),ce=Me[W];v.nid=A,v.nss=H,v.path=void 0,ce&&(v=ce.parse(v,p))}else v.error=v.error||"URN can not be parsed.";return v},serialize:function(f,p){var g=p.scheme||f.scheme||"urn",v=f.nid,S=g+":"+(p.nid||v),A=Me[S];A&&(f=A.serialize(f,p));var H=f,W=f.nss;return H.path=(v||p.nid)+":"+W,H}},sh=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,So={scheme:"urn:uuid",parse:function(f,p){var g=f;return g.uuid=g.nss,g.nss=void 0,!p.tolerant&&(!g.uuid||!g.uuid.match(sh))&&(g.error=g.error||"UUID is not valid."),g},serialize:function(f,p){var g=f;return g.nss=(f.uuid||"").toLowerCase(),g}};Me[Vr.scheme]=Vr,Me[vo.scheme]=vo,Me[Hr.scheme]=Hr,Me[yo.scheme]=yo,Me[wo.scheme]=wo,Me[bo.scheme]=bo,Me[So.scheme]=So,r.SCHEMES=Me,r.pctEncChar=tt,r.pctDecChars=rr,r.parse=lt,r.removeDotSegments=nr,r.serialize=rt,r.resolveComponents=go,r.resolve=Ud,r.normalize=Gd,r.equal=zd,r.escapeComponent=Kd,r.unescapeComponent=ft,Object.defineProperty(r,"__esModule",{value:!0})})});var tf=_(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});var ef=Ql();ef.code='require("ajv/dist/runtime/uri").default';la.default=ef});var lf=_(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.CodeGen=he.Name=he.nil=he.stringify=he.str=he._=he.KeywordCxt=void 0;var I_=Sn();Object.defineProperty(he,"KeywordCxt",{enumerable:!0,get:function(){return I_.KeywordCxt}});var Cr=L();Object.defineProperty(he,"_",{enumerable:!0,get:function(){return Cr._}});Object.defineProperty(he,"str",{enumerable:!0,get:function(){return Cr.str}});Object.defineProperty(he,"stringify",{enumerable:!0,get:function(){return Cr.stringify}});Object.defineProperty(he,"nil",{enumerable:!0,get:function(){return Cr.nil}});Object.defineProperty(he,"Name",{enumerable:!0,get:function(){return Cr.Name}});Object.defineProperty(he,"CodeGen",{enumerable:!0,get:function(){return Cr.CodeGen}});var T_=na(),of=oa(),A_=Hi(),On=ys(),q_=L(),Pn=En(),Es=$n(),da=G(),rf=Yl(),D_=tf(),cf=(r,e)=>new RegExp(r,e);cf.code="new RegExp";var j_=["removeAdditional","useDefaults","coerceTypes"],k_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),x_={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."},L_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},nf=200;function M_(r){var e,t,n,s,i,a,c,u,o,l,d,y,m,$,E,w,b,D,T,z,C,me,ke,bt,xe;let re=r.strict,Le=(e=r.code)===null||e===void 0?void 0:e.optimize,et=Le===!0||Le===void 0?1:Le||0,Fn=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:cf,Vn=(s=r.uriResolver)!==null&&s!==void 0?s:D_.default;return{strictSchema:(a=(i=r.strictSchema)!==null&&i!==void 0?i:re)!==null&&a!==void 0?a:!0,strictNumbers:(u=(c=r.strictNumbers)!==null&&c!==void 0?c:re)!==null&&u!==void 0?u:!0,strictTypes:(l=(o=r.strictTypes)!==null&&o!==void 0?o:re)!==null&&l!==void 0?l:"log",strictTuples:(y=(d=r.strictTuples)!==null&&d!==void 0?d:re)!==null&&y!==void 0?y:"log",strictRequired:($=(m=r.strictRequired)!==null&&m!==void 0?m:re)!==null&&$!==void 0?$:!1,code:r.code?{...r.code,optimize:et,regExp:Fn}:{optimize:et,regExp:Fn},loopRequired:(E=r.loopRequired)!==null&&E!==void 0?E:nf,loopEnum:(w=r.loopEnum)!==null&&w!==void 0?w:nf,meta:(b=r.meta)!==null&&b!==void 0?b:!0,messages:(D=r.messages)!==null&&D!==void 0?D:!0,inlineRefs:(T=r.inlineRefs)!==null&&T!==void 0?T:!0,schemaId:(z=r.schemaId)!==null&&z!==void 0?z:"$id",addUsedSchema:(C=r.addUsedSchema)!==null&&C!==void 0?C:!0,validateSchema:(me=r.validateSchema)!==null&&me!==void 0?me:!0,validateFormats:(ke=r.validateFormats)!==null&&ke!==void 0?ke:!0,unicodeRegExp:(bt=r.unicodeRegExp)!==null&&bt!==void 0?bt:!0,int32range:(xe=r.int32range)!==null&&xe!==void 0?xe:!0,uriResolver:Vn}}var Rn=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...M_(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new q_.ValueScope({scope:{},prefixes:k_,es5:t,lines:n}),this.logger=z_(e.logger);let s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,A_.getRules)(),sf.call(this,x_,e,"NOT SUPPORTED"),sf.call(this,L_,e,"DEPRECATED","warn"),this._metaOpts=U_.call(this),e.formats&&V_.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&H_.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),F_.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,s=rf;n==="id"&&(s={...rf},s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let s=n(t);return"$async"in n||(this.errors=n.errors),s}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return s.call(this,e,t);async function s(l,d){await i.call(this,l.$schema);let y=this._addSchema(l,d);return y.validate||a.call(this,y)}async function i(l){l&&!this.getSchema(l)&&await s.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof of.default))throw d;return c.call(this,d),await u.call(this,d.missingSchema),a.call(this,l)}}function c({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function u(l){let d=await o.call(this,l);this.refs[l]||await i.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,t)}async function o(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(e,t,n,s=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,s);return this}let i;if(typeof e=="object"){let{schemaId:a}=this.opts;if(i=e[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return t=(0,Pn.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,s,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let s=this.validate(n,e);if(!s&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return s}getSchema(e){let t;for(;typeof(t=af.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,s=new On.SchemaEnv({schema:{},schemaId:n});if(t=On.resolveSchema.call(this,s,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=af.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,Pn.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(X_.call(this,n,t),!t)return(0,da.eachItem)(n,i=>fa.call(this,i)),this;B_.call(this,t);let s={...t,type:(0,Es.getJSONTypes)(t.type),schemaType:(0,Es.getJSONTypes)(t.schemaType)};return(0,da.eachItem)(n,s.type.length===0?i=>fa.call(this,i,s):i=>s.type.forEach(a=>fa.call(this,i,s,a))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let s=n.rules.findIndex(i=>i.keyword===e);s>=0&&n.rules.splice(s,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(s=>`${n}${s.instancePath} ${s.message}`).reduce((s,i)=>s+t+i)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let s of t){let i=s.split("/").slice(1),a=e;for(let c of i)a=a[c];for(let c in n){let u=n[c];if(typeof u!="object")continue;let{$data:o}=u.definition,l=a[c];o&&l&&(a[c]=uf(l))}}return e}_removeAllSchemas(e,t){for(let n in e){let s=e[n];(!t||t.test(n))&&(typeof s=="string"?delete e[n]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[n]))}}_addSchema(e,t,n,s=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:c}=this.opts;if(typeof e=="object")a=e[c];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;n=(0,Pn.normalizeId)(a||n);let o=Pn.getSchemaRefs.call(this,e,n);return u=new On.SchemaEnv({schema:e,schemaId:c,meta:t,baseId:n,localRefs:o}),this._cache.set(u.schema,u),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),s&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):On.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{On.compileSchema.call(this,e)}finally{this.opts=t}}};he.default=Rn;Rn.ValidationError=T_.default;Rn.MissingRefError=of.default;function sf(r,e,t,n="error"){for(let s in r){let i=s;i in e&&this.logger[n](`${t}: option ${s}. ${r[i]}`)}}function af(r){return r=(0,Pn.normalizeId)(r),this.schemas[r]||this.refs[r]}function F_(){let r=this.opts.schemas;if(!!r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function V_(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function H_(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function U_(){let r={...this.opts};for(let e of j_)delete r[e];return r}var G_={log(){},warn(){},error(){}};function z_(r){if(r===!1)return G_;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var K_=/^[a-z_$][a-z0-9_$:-]*$/i;function X_(r,e){let{RULES:t}=this;if((0,da.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!K_.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function fa(r,e,t){var n;let s=e==null?void 0:e.post;if(t&&s)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=s?i.post:i.rules.find(({type:u})=>u===t);if(a||(a={type:t,rules:[]},i.rules.push(a)),i.keywords[r]=!0,!e)return;let c={keyword:r,definition:{...e,type:(0,Es.getJSONTypes)(e.type),schemaType:(0,Es.getJSONTypes)(e.schemaType)}};e.before?W_.call(this,a,c,e.before):a.rules.push(c),i.all[r]=c,(n=e.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function W_(r,e,t){let n=r.rules.findIndex(s=>s.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function B_(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=uf(e)),r.validateSchema=this.compile(e,!0))}var J_={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function uf(r){return{anyOf:[r,J_]}}});var ff=_(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});var Y_={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};ha.default=Y_});var mf=_(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.callRef=Yt.getValidate=void 0;var Z_=oa(),df=ze(),Ie=L(),Nr=$t(),hf=ys(),ws=G(),Q_={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:s,schemaEnv:i,validateName:a,opts:c,self:u}=n,{root:o}=i;if((t==="#"||t==="#/")&&s===o.baseId)return d();let l=hf.resolveRef.call(u,o,s,t);if(l===void 0)throw new Z_.default(n.opts.uriResolver,s,t);if(l instanceof hf.SchemaEnv)return y(l);return m(l);function d(){if(i===o)return bs(r,a,i,i.$async);let $=e.scopeValue("root",{ref:o});return bs(r,(0,Ie._)`${$}.validate`,o,o.$async)}function y($){let E=pf(r,$);bs(r,E,$,$.$async)}function m($){let E=e.scopeValue("schema",c.code.source===!0?{ref:$,code:(0,Ie.stringify)($)}:{ref:$}),w=e.name("valid"),b=r.subschema({schema:$,dataTypes:[],schemaPath:Ie.nil,topSchemaRef:E,errSchemaPath:t},w);r.mergeEvaluated(b),r.ok(w)}}};function pf(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ie._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Yt.getValidate=pf;function bs(r,e,t,n){let{gen:s,it:i}=r,{allErrors:a,schemaEnv:c,opts:u}=i,o=u.passContext?Nr.default.this:Ie.nil;n?l():d();function l(){if(!c.$async)throw new Error("async schema referenced by sync schema");let $=s.let("valid");s.try(()=>{s.code((0,Ie._)`await ${(0,df.callValidateCode)(r,e,o)}`),m(e),a||s.assign($,!0)},E=>{s.if((0,Ie._)`!(${E} instanceof ${i.ValidationError})`,()=>s.throw(E)),y(E),a||s.assign($,!1)}),r.ok($)}function d(){r.result((0,df.callValidateCode)(r,e,o),()=>m(e),()=>y(e))}function y($){let E=(0,Ie._)`${$}.errors`;s.assign(Nr.default.vErrors,(0,Ie._)`${Nr.default.vErrors} === null ? ${E} : ${Nr.default.vErrors}.concat(${E})`),s.assign(Nr.default.errors,(0,Ie._)`${Nr.default.vErrors}.length`)}function m($){var E;if(!i.opts.unevaluated)return;let w=(E=t==null?void 0:t.validate)===null||E===void 0?void 0:E.evaluated;if(i.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(i.props=ws.mergeEvaluated.props(s,w.props,i.props));else{let b=s.var("props",(0,Ie._)`${$}.evaluated.props`);i.props=ws.mergeEvaluated.props(s,b,i.props,Ie.Name)}if(i.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(i.items=ws.mergeEvaluated.items(s,w.items,i.items));else{let b=s.var("items",(0,Ie._)`${$}.evaluated.items`);i.items=ws.mergeEvaluated.items(s,b,i.items,Ie.Name)}}}Yt.callRef=bs;Yt.default=Q_});var gf=_(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});var ey=ff(),ty=mf(),ry=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",ey.default,ty.default];pa.default=ry});var vf=_(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});var Ss=L(),At=Ss.operators,Os={maximum:{okStr:"<=",ok:At.LTE,fail:At.GT},minimum:{okStr:">=",ok:At.GTE,fail:At.LT},exclusiveMaximum:{okStr:"<",ok:At.LT,fail:At.GTE},exclusiveMinimum:{okStr:">",ok:At.GT,fail:At.LTE}},ny={message:({keyword:r,schemaCode:e})=>(0,Ss.str)`must be ${Os[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,Ss._)`{comparison: ${Os[r].okStr}, limit: ${e}}`},sy={keyword:Object.keys(Os),type:"number",schemaType:"number",$data:!0,error:ny,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,Ss._)`${t} ${Os[e].fail} ${n} || isNaN(${t})`)}};ma.default=sy});var _f=_(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});var Cn=L(),iy={message:({schemaCode:r})=>(0,Cn.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,Cn._)`{multipleOf: ${r}}`},ay={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:iy,code(r){let{gen:e,data:t,schemaCode:n,it:s}=r,i=s.opts.multipleOfPrecision,a=e.let("res"),c=i?(0,Cn._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,Cn._)`${a} !== parseInt(${a})`;r.fail$data((0,Cn._)`(${n} === 0 || (${a} = ${t}/${n}, ${c}))`)}};ga.default=ay});var $f=_(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});function yf(r){let e=r.length,t=0,n=0,s;for(;n<e;)t++,s=r.charCodeAt(n++),s>=55296&&s<=56319&&n<e&&(s=r.charCodeAt(n),(s&64512)===56320&&n++);return t}va.default=yf;yf.code='require("ajv/dist/runtime/ucs2length").default'});var Ef=_(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var Zt=L(),oy=G(),cy=$f(),uy={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Zt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Zt._)`{limit: ${r}}`},ly={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:uy,code(r){let{keyword:e,data:t,schemaCode:n,it:s}=r,i=e==="maxLength"?Zt.operators.GT:Zt.operators.LT,a=s.opts.unicode===!1?(0,Zt._)`${t}.length`:(0,Zt._)`${(0,oy.useFunc)(r.gen,cy.default)}(${t})`;r.fail$data((0,Zt._)`${a} ${i} ${n}`)}};_a.default=ly});var wf=_(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});var fy=ze(),Ps=L(),dy={message:({schemaCode:r})=>(0,Ps.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,Ps._)`{pattern: ${r}}`},hy={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:dy,code(r){let{data:e,$data:t,schema:n,schemaCode:s,it:i}=r,a=i.opts.unicodeRegExp?"u":"",c=t?(0,Ps._)`(new RegExp(${s}, ${a}))`:(0,fy.usePattern)(r,n);r.fail$data((0,Ps._)`!${c}.test(${e})`)}};ya.default=hy});var bf=_($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});var Nn=L(),py={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,Nn.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,Nn._)`{limit: ${r}}`},my={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:py,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxProperties"?Nn.operators.GT:Nn.operators.LT;r.fail$data((0,Nn._)`Object.keys(${t}).length ${s} ${n}`)}};$a.default=my});var Sf=_(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});var In=ze(),Tn=L(),gy=G(),vy={message:({params:{missingProperty:r}})=>(0,Tn.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,Tn._)`{missingProperty: ${r}}`},_y={keyword:"required",type:"object",schemaType:"array",$data:!0,error:vy,code(r){let{gen:e,schema:t,schemaCode:n,data:s,$data:i,it:a}=r,{opts:c}=a;if(!i&&t.length===0)return;let u=t.length>=c.loopRequired;if(a.allErrors?o():l(),c.strictRequired){let m=r.parentSchema.properties,{definedProperties:$}=r.it;for(let E of t)if((m==null?void 0:m[E])===void 0&&!$.has(E)){let w=a.schemaEnv.baseId+a.errSchemaPath,b=`required property "${E}" is not defined at "${w}" (strictRequired)`;(0,gy.checkStrictMode)(a,b,a.opts.strictRequired)}}function o(){if(u||i)r.block$data(Tn.nil,d);else for(let m of t)(0,In.checkReportMissingProp)(r,m)}function l(){let m=e.let("missing");if(u||i){let $=e.let("valid",!0);r.block$data($,()=>y(m,$)),r.ok($)}else e.if((0,In.checkMissingProp)(r,t,m)),(0,In.reportMissingProp)(r,m),e.else()}function d(){e.forOf("prop",n,m=>{r.setParams({missingProperty:m}),e.if((0,In.noPropertyInData)(e,s,m,c.ownProperties),()=>r.error())})}function y(m,$){r.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign($,(0,In.propertyInData)(e,s,m,c.ownProperties)),e.if((0,Tn.not)($),()=>{r.error(),e.break()})},Tn.nil)}}};Ea.default=_y});var Of=_(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});var An=L(),yy={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,An.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,An._)`{limit: ${r}}`},$y={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:yy,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxItems"?An.operators.GT:An.operators.LT;r.fail$data((0,An._)`${t}.length ${s} ${n}`)}};wa.default=$y});var Rs=_(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});var Pf=Ji();Pf.code='require("ajv/dist/runtime/equal").default';ba.default=Pf});var Rf=_(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});var Sa=$n(),pe=L(),Ey=G(),wy=Rs(),by={message:({params:{i:r,j:e}})=>(0,pe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,pe._)`{i: ${r}, j: ${e}}`},Sy={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:by,code(r){let{gen:e,data:t,$data:n,schema:s,parentSchema:i,schemaCode:a,it:c}=r;if(!n&&!s)return;let u=e.let("valid"),o=i.items?(0,Sa.getSchemaTypes)(i.items):[];r.block$data(u,l,(0,pe._)`${a} === false`),r.ok(u);function l(){let $=e.let("i",(0,pe._)`${t}.length`),E=e.let("j");r.setParams({i:$,j:E}),e.assign(u,!0),e.if((0,pe._)`${$} > 1`,()=>(d()?y:m)($,E))}function d(){return o.length>0&&!o.some($=>$==="object"||$==="array")}function y($,E){let w=e.name("item"),b=(0,Sa.checkDataTypes)(o,w,c.opts.strictNumbers,Sa.DataType.Wrong),D=e.const("indices",(0,pe._)`{}`);e.for((0,pe._)`;${$}--;`,()=>{e.let(w,(0,pe._)`${t}[${$}]`),e.if(b,(0,pe._)`continue`),o.length>1&&e.if((0,pe._)`typeof ${w} == "string"`,(0,pe._)`${w} += "_"`),e.if((0,pe._)`typeof ${D}[${w}] == "number"`,()=>{e.assign(E,(0,pe._)`${D}[${w}]`),r.error(),e.assign(u,!1).break()}).code((0,pe._)`${D}[${w}] = ${$}`)})}function m($,E){let w=(0,Ey.useFunc)(e,wy.default),b=e.name("outer");e.label(b).for((0,pe._)`;${$}--;`,()=>e.for((0,pe._)`${E} = ${$}; ${E}--;`,()=>e.if((0,pe._)`${w}(${t}[${$}], ${t}[${E}])`,()=>{r.error(),e.assign(u,!1).break(b)})))}}};Oa.default=Sy});var Cf=_(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var Pa=L(),Oy=G(),Py=Rs(),Ry={message:"must be equal to constant",params:({schemaCode:r})=>(0,Pa._)`{allowedValue: ${r}}`},Cy={keyword:"const",$data:!0,error:Ry,code(r){let{gen:e,data:t,$data:n,schemaCode:s,schema:i}=r;n||i&&typeof i=="object"?r.fail$data((0,Pa._)`!${(0,Oy.useFunc)(e,Py.default)}(${t}, ${s})`):r.fail((0,Pa._)`${i} !== ${t}`)}};Ra.default=Cy});var Nf=_(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});var qn=L(),Ny=G(),Iy=Rs(),Ty={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,qn._)`{allowedValues: ${r}}`},Ay={keyword:"enum",schemaType:"array",$data:!0,error:Ty,code(r){let{gen:e,data:t,$data:n,schema:s,schemaCode:i,it:a}=r;if(!n&&s.length===0)throw new Error("enum must have non-empty array");let c=s.length>=a.opts.loopEnum,u,o=()=>u!=null?u:u=(0,Ny.useFunc)(e,Iy.default),l;if(c||n)l=e.let("valid"),r.block$data(l,d);else{if(!Array.isArray(s))throw new Error("ajv implementation error");let m=e.const("vSchema",i);l=(0,qn.or)(...s.map(($,E)=>y(m,E)))}r.pass(l);function d(){e.assign(l,!1),e.forOf("v",i,m=>e.if((0,qn._)`${o()}(${t}, ${m})`,()=>e.assign(l,!0).break()))}function y(m,$){let E=s[$];return typeof E=="object"&&E!==null?(0,qn._)`${o()}(${t}, ${m}[${$}])`:(0,qn._)`${t} === ${E}`}}};Ca.default=Ay});var If=_(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var qy=vf(),Dy=_f(),jy=Ef(),ky=wf(),xy=bf(),Ly=Sf(),My=Of(),Fy=Rf(),Vy=Cf(),Hy=Nf(),Uy=[qy.default,Dy.default,jy.default,ky.default,xy.default,Ly.default,My.default,Fy.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Vy.default,Hy.default];Na.default=Uy});var Ta=_(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.validateAdditionalItems=void 0;var Qt=L(),Ia=G(),Gy={message:({params:{len:r}})=>(0,Qt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Qt._)`{limit: ${r}}`},zy={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Gy,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Ia.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}Tf(r,n)}};function Tf(r,e){let{gen:t,schema:n,data:s,keyword:i,it:a}=r;a.items=!0;let c=t.const("len",(0,Qt._)`${s}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Qt._)`${c} <= ${e.length}`);else if(typeof n=="object"&&!(0,Ia.alwaysValidSchema)(a,n)){let o=t.var("valid",(0,Qt._)`${c} <= ${e.length}`);t.if((0,Qt.not)(o),()=>u(o)),r.ok(o)}function u(o){t.forRange("i",e.length,c,l=>{r.subschema({keyword:i,dataProp:l,dataPropType:Ia.Type.Num},o),a.allErrors||t.if((0,Qt.not)(o),()=>t.break())})}}Dn.validateAdditionalItems=Tf;Dn.default=zy});var Aa=_(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.validateTuple=void 0;var Af=L(),Cs=G(),Ky=ze(),Xy={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return qf(r,"additionalItems",e);t.items=!0,!(0,Cs.alwaysValidSchema)(t,e)&&r.ok((0,Ky.validateArray)(r))}};function qf(r,e,t=r.schema){let{gen:n,parentSchema:s,data:i,keyword:a,it:c}=r;l(s),c.opts.unevaluated&&t.length&&c.items!==!0&&(c.items=Cs.mergeEvaluated.items(n,t.length,c.items));let u=n.name("valid"),o=n.const("len",(0,Af._)`${i}.length`);t.forEach((d,y)=>{(0,Cs.alwaysValidSchema)(c,d)||(n.if((0,Af._)`${o} > ${y}`,()=>r.subschema({keyword:a,schemaProp:y,dataProp:y},u)),r.ok(u))});function l(d){let{opts:y,errSchemaPath:m}=c,$=t.length,E=$===d.minItems&&($===d.maxItems||d[e]===!1);if(y.strictTuples&&!E){let w=`"${a}" is ${$}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Cs.checkStrictMode)(c,w,y.strictTuples)}}}jn.validateTuple=qf;jn.default=Xy});var Df=_(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var Wy=Aa(),By={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,Wy.validateTuple)(r,"items")};qa.default=By});var kf=_(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});var jf=L(),Jy=G(),Yy=ze(),Zy=Ta(),Qy={message:({params:{len:r}})=>(0,jf.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,jf._)`{limit: ${r}}`},e0={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Qy,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:s}=t;n.items=!0,!(0,Jy.alwaysValidSchema)(n,e)&&(s?(0,Zy.validateAdditionalItems)(r,s):r.ok((0,Yy.validateArray)(r)))}};Da.default=e0});var xf=_(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});var Xe=L(),Ns=G(),t0={message:({params:{min:r,max:e}})=>e===void 0?(0,Xe.str)`must contain at least ${r} valid item(s)`:(0,Xe.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,Xe._)`{minContains: ${r}}`:(0,Xe._)`{minContains: ${r}, maxContains: ${e}}`},r0={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:t0,code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r,a,c,{minContains:u,maxContains:o}=n;i.opts.next?(a=u===void 0?1:u,c=o):a=1;let l=e.const("len",(0,Xe._)`${s}.length`);if(r.setParams({min:a,max:c}),c===void 0&&a===0){(0,Ns.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&a>c){(0,Ns.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,Ns.alwaysValidSchema)(i,t)){let E=(0,Xe._)`${l} >= ${a}`;c!==void 0&&(E=(0,Xe._)`${E} && ${l} <= ${c}`),r.pass(E);return}i.items=!0;let d=e.name("valid");c===void 0&&a===1?m(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),c!==void 0&&e.if((0,Xe._)`${s}.length > 0`,y)):(e.let(d,!1),y()),r.result(d,()=>r.reset());function y(){let E=e.name("_valid"),w=e.let("count",0);m(E,()=>e.if(E,()=>$(w)))}function m(E,w){e.forRange("i",0,l,b=>{r.subschema({keyword:"contains",dataProp:b,dataPropType:Ns.Type.Num,compositeRule:!0},E),w()})}function $(E){e.code((0,Xe._)`${E}++`),c===void 0?e.if((0,Xe._)`${E} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,Xe._)`${E} > ${c}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,Xe._)`${E} >= ${a}`,()=>e.assign(d,!0)))}}};ja.default=r0});var Ff=_(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.validateSchemaDeps=ct.validatePropertyDeps=ct.error=void 0;var ka=L(),n0=G(),kn=ze();ct.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,ka.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,ka._)`{property: ${r},
26
26
  missingProperty: ${n},
27
27
  depsCount: ${e},
28
- deps: ${t}}`};var h0={keyword:"dependencies",type:"object",schemaType:"object",error:lt.error,code(r){let[e,t]=p0(r);Hf(r,e),Uf(r,t)}};function p0({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let s=Array.isArray(r[n])?e:t;s[n]=r[n]}return[e,t]}function Hf(r,e=r.schema){let{gen:t,data:n,it:s}=r;if(Object.keys(e).length===0)return;let i=t.let("missing");for(let a in e){let c=e[a];if(c.length===0)continue;let u=(0,Ln.propertyInData)(t,n,a,s.opts.ownProperties);r.setParams({property:a,depsCount:c.length,deps:c.join(", ")}),s.allErrors?t.if(u,()=>{for(let o of c)(0,Ln.checkReportMissingProp)(r,o)}):(t.if((0,La._)`${u} && (${(0,Ln.checkMissingProp)(r,c,i)})`),(0,Ln.reportMissingProp)(r,i),t.else())}}lt.validatePropertyDeps=Hf;function Uf(r,e=r.schema){let{gen:t,data:n,keyword:s,it:i}=r,a=t.name("valid");for(let c in e)(0,d0.alwaysValidSchema)(i,e[c])||(t.if((0,Ln.propertyInData)(t,n,c,i.opts.ownProperties),()=>{let u=r.subschema({keyword:s,schemaProp:c},a);r.mergeValidEvaluated(u,a)},()=>t.var(a,!0)),r.ok(a))}lt.validateSchemaDeps=Uf;lt.default=h0});var Kf=_(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});var zf=L(),m0=G(),g0={message:"property name must be valid",params:({params:r})=>(0,zf._)`{propertyName: ${r.propertyName}}`},v0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:g0,code(r){let{gen:e,schema:t,data:n,it:s}=r;if((0,m0.alwaysValidSchema)(s,t))return;let i=e.name("valid");e.forIn("key",n,a=>{r.setParams({propertyName:a}),r.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),e.if((0,zf.not)(i),()=>{r.error(!0),s.allErrors||e.break()})}),r.ok(i)}};Ma.default=v0});var Va=_(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});var As=Xe(),tt=L(),_0=wt(),qs=G(),y0={message:"must NOT have additional properties",params:({params:r})=>(0,tt._)`{additionalProperty: ${r.additionalProperty}}`},$0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:y0,code(r){let{gen:e,schema:t,parentSchema:n,data:s,errsCount:i,it:a}=r;if(!i)throw new Error("ajv implementation error");let{allErrors:c,opts:u}=a;if(a.props=!0,u.removeAdditional!=="all"&&(0,qs.alwaysValidSchema)(a,t))return;let o=(0,As.allSchemaProperties)(n.properties),l=(0,As.allSchemaProperties)(n.patternProperties);d(),r.ok((0,tt._)`${i} === ${_0.default.errors}`);function d(){e.forIn("key",s,w=>{!o.length&&!l.length?$(w):e.if(y(w),()=>$(w))})}function y(w){let b;if(o.length>8){let D=(0,qs.schemaRefOrVal)(a,n.properties,"properties");b=(0,As.isOwnProperty)(e,D,w)}else o.length?b=(0,tt.or)(...o.map(D=>(0,tt._)`${w} === ${D}`)):b=tt.nil;return l.length&&(b=(0,tt.or)(b,...l.map(D=>(0,tt._)`${(0,As.usePattern)(r,D)}.test(${w})`))),(0,tt.not)(b)}function m(w){e.code((0,tt._)`delete ${s}[${w}]`)}function $(w){if(u.removeAdditional==="all"||u.removeAdditional&&t===!1){m(w);return}if(t===!1){r.setParams({additionalProperty:w}),r.error(),c||e.break();return}if(typeof t=="object"&&!(0,qs.alwaysValidSchema)(a,t)){let b=e.name("valid");u.removeAdditional==="failing"?(E(w,b,!1),e.if((0,tt.not)(b),()=>{r.reset(),m(w)})):(E(w,b),c||e.if((0,tt.not)(b),()=>e.break()))}}function E(w,b,D){let T={keyword:"additionalProperties",dataProp:w,dataPropType:qs.Type.Str};D===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(T,b)}}};Fa.default=$0});var Bf=_(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});var E0=Pn(),Xf=Xe(),Ha=G(),Wf=Va(),w0={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Wf.default.code(new E0.KeywordCxt(i,Wf.default,"additionalProperties"));let a=(0,Xf.allSchemaProperties)(t);for(let d of a)i.definedProperties.add(d);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=Ha.mergeEvaluated.props(e,(0,Ha.toHash)(a),i.props));let c=a.filter(d=>!(0,Ha.alwaysValidSchema)(i,t[d]));if(c.length===0)return;let u=e.name("valid");for(let d of c)o(d)?l(d):(e.if((0,Xf.propertyInData)(e,s,d,i.opts.ownProperties)),l(d),i.allErrors||e.else().var(u,!0),e.endIf()),r.it.definedProperties.add(d),r.ok(u);function o(d){return i.opts.useDefaults&&!i.compositeRule&&t[d].default!==void 0}function l(d){r.subschema({keyword:"properties",schemaProp:d,dataProp:d},u)}}};Ua.default=w0});var Qf=_(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var Jf=Xe(),Ds=L(),Yf=G(),Zf=G(),b0={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:s,it:i}=r,{opts:a}=i,c=(0,Jf.allSchemaProperties)(t),u=c.filter(E=>(0,Yf.alwaysValidSchema)(i,t[E]));if(c.length===0||u.length===c.length&&(!i.opts.unevaluated||i.props===!0))return;let o=a.strictSchema&&!a.allowMatchingProperties&&s.properties,l=e.name("valid");i.props!==!0&&!(i.props instanceof Ds.Name)&&(i.props=(0,Zf.evaluatedPropsToName)(e,i.props));let{props:d}=i;y();function y(){for(let E of c)o&&m(E),i.allErrors?$(E):(e.var(l,!0),$(E),e.if(l))}function m(E){for(let w in o)new RegExp(E).test(w)&&(0,Yf.checkStrictMode)(i,`property ${w} matches pattern ${E} (use allowMatchingProperties)`)}function $(E){e.forIn("key",n,w=>{e.if((0,Ds._)`${(0,Jf.usePattern)(r,E)}.test(${w})`,()=>{let b=u.includes(E);b||r.subschema({keyword:"patternProperties",schemaProp:E,dataProp:w,dataPropType:Zf.Type.Str},l),i.opts.unevaluated&&d!==!0?e.assign((0,Ds._)`${d}[${w}]`,!0):!b&&!i.allErrors&&e.if((0,Ds.not)(l),()=>e.break())})})}}};Ga.default=b0});var ed=_(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var S0=G(),O0={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,S0.alwaysValidSchema)(n,t)){r.fail();return}let s=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};za.default=O0});var td=_(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var P0=Xe(),R0={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:P0.validateUnion,error:{message:"must match a schema in anyOf"}};Ka.default=R0});var rd=_(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});var js=L(),C0=G(),N0={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,js._)`{passingSchemas: ${r.passing}}`},I0={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:N0,code(r){let{gen:e,schema:t,parentSchema:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;let i=t,a=e.let("valid",!1),c=e.let("passing",null),u=e.name("_valid");r.setParams({passing:c}),e.block(o),r.result(a,()=>r.reset(),()=>r.error(!0));function o(){i.forEach((l,d)=>{let y;(0,C0.alwaysValidSchema)(s,l)?e.var(u,!0):y=r.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},u),d>0&&e.if((0,js._)`${u} && ${a}`).assign(a,!1).assign(c,(0,js._)`[${c}, ${d}]`).else(),e.if(u,()=>{e.assign(a,!0),e.assign(c,d),y&&r.mergeEvaluated(y,js.Name)})})}}};Xa.default=I0});var nd=_(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});var T0=G(),A0={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let s=e.name("valid");t.forEach((i,a)=>{if((0,T0.alwaysValidSchema)(n,i))return;let c=r.subschema({keyword:"allOf",schemaProp:a},s);r.ok(s),r.mergeEvaluated(c)})}};Wa.default=A0});var ad=_(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var ks=L(),id=G(),q0={message:({params:r})=>(0,ks.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,ks._)`{failingKeyword: ${r.ifClause}}`},D0={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:q0,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,id.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let s=sd(n,"then"),i=sd(n,"else");if(!s&&!i)return;let a=e.let("valid",!0),c=e.name("_valid");if(u(),r.reset(),s&&i){let l=e.let("ifClause");r.setParams({ifClause:l}),e.if(c,o("then",l),o("else",l))}else s?e.if(c,o("then")):e.if((0,ks.not)(c),o("else"));r.pass(a,()=>r.error(!0));function u(){let l=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);r.mergeEvaluated(l)}function o(l,d){return()=>{let y=r.subschema({keyword:l},c);e.assign(a,c),r.mergeValidEvaluated(y,a),d?e.assign(d,(0,ks._)`${l}`):r.setParams({ifClause:l})}}}};function sd(r,e){let t=r.schema[e];return t!==void 0&&!(0,id.alwaysValidSchema)(r,t)}Ba.default=D0});var od=_(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var j0=G(),k0={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,j0.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};Ja.default=k0});var cd=_(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});var x0=qa(),L0=Lf(),M0=Da(),F0=Ff(),V0=Vf(),H0=Gf(),U0=Kf(),G0=Va(),z0=Bf(),K0=Qf(),X0=ed(),W0=td(),B0=rd(),J0=nd(),Y0=ad(),Z0=od();function Q0(r=!1){let e=[X0.default,W0.default,B0.default,J0.default,Y0.default,Z0.default,U0.default,G0.default,H0.default,z0.default,K0.default];return r?e.push(L0.default,F0.default):e.push(x0.default,M0.default),e.push(V0.default),e}Ya.default=Q0});var ud=_(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var ce=L(),e$={message:({schemaCode:r})=>(0,ce.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,ce._)`{format: ${r}}`},t$={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:e$,code(r,e){let{gen:t,data:n,$data:s,schema:i,schemaCode:a,it:c}=r,{opts:u,errSchemaPath:o,schemaEnv:l,self:d}=c;if(!u.validateFormats)return;s?y():m();function y(){let $=t.scopeValue("formats",{ref:d.formats,code:u.code.formats}),E=t.const("fDef",(0,ce._)`${$}[${a}]`),w=t.let("fType"),b=t.let("format");t.if((0,ce._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>t.assign(w,(0,ce._)`${E}.type || "string"`).assign(b,(0,ce._)`${E}.validate`),()=>t.assign(w,(0,ce._)`"string"`).assign(b,E)),r.fail$data((0,ce.or)(D(),T()));function D(){return u.strictSchema===!1?ce.nil:(0,ce._)`${a} && !${b}`}function T(){let z=l.$async?(0,ce._)`(${E}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,ce._)`${b}(${n})`,C=(0,ce._)`(typeof ${b} == "function" ? ${z} : ${b}.test(${n}))`;return(0,ce._)`${b} && ${b} !== true && ${w} === ${e} && !${C}`}}function m(){let $=d.formats[i];if(!$){D();return}if($===!0)return;let[E,w,b]=T($);E===e&&r.pass(z());function D(){if(u.strictSchema===!1){d.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${i}" ignored in schema at path "${o}"`}}function T(C){let ge=C instanceof RegExp?(0,ce.regexpCode)(C):u.code.formats?(0,ce._)`${u.code.formats}${(0,ce.getProperty)(i)}`:void 0,xe=t.scopeValue("formats",{key:i,ref:C,code:ge});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,ce._)`${xe}.validate`]:["string",C,xe]}function z(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!l.$async)throw new Error("async format in sync schema");return(0,ce._)`await ${b}(${n})`}return typeof w=="function"?(0,ce._)`${b}(${n})`:(0,ce._)`${b}.test(${n})`}}}};Za.default=t$});var ld=_(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});var r$=ud(),n$=[r$.default];Qa.default=n$});var fd=_(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.contentVocabulary=Ar.metadataVocabulary=void 0;Ar.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ar.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var hd=_(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var s$=$f(),i$=Df(),a$=cd(),o$=ld(),dd=fd(),c$=[s$.default,i$.default,(0,a$.default)(),o$.default,dd.metadataVocabulary,dd.contentVocabulary];eo.default=c$});var pd=_(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.DiscrError=void 0;var u$;(function(r){r.Tag="tag",r.Mapping="mapping"})(u$=Mn.DiscrError||(Mn.DiscrError={}))});var gd=_(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});var qr=L(),to=pd(),md=Es(),l$=G(),f$={message:({params:{discrError:r,tagName:e}})=>r===to.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,qr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},d$={keyword:"discriminator",type:"object",schemaType:"object",error:f$,code(r){let{gen:e,data:t,schema:n,parentSchema:s,it:i}=r,{oneOf:a}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let 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(!a)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),o=e.const("tag",(0,qr._)`${t}${(0,qr.getProperty)(c)}`);e.if((0,qr._)`typeof ${o} == "string"`,()=>l(),()=>r.error(!1,{discrError:to.DiscrError.Tag,tag:o,tagName:c})),r.ok(u);function l(){let m=y();e.if(!1);for(let $ in m)e.elseIf((0,qr._)`${o} === ${$}`),e.assign(u,d(m[$]));e.else(),r.error(!1,{discrError:to.DiscrError.Mapping,tag:o,tagName:c}),e.endIf()}function d(m){let $=e.name("valid"),E=r.subschema({keyword:"oneOf",schemaProp:m},$);return r.mergeEvaluated(E,qr.Name),$}function y(){var m;let $={},E=b(s),w=!0;for(let z=0;z<a.length;z++){let C=a[z];(C==null?void 0:C.$ref)&&!(0,l$.schemaHasRulesButRef)(C,i.self.RULES)&&(C=md.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,C==null?void 0:C.$ref),C instanceof md.SchemaEnv&&(C=C.schema));let ge=(m=C==null?void 0:C.properties)===null||m===void 0?void 0:m[c];if(typeof ge!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${c}"`);w=w&&(E||b(C)),D(ge,z)}if(!w)throw new Error(`discriminator: "${c}" must be required`);return $;function b({required:z}){return Array.isArray(z)&&z.includes(c)}function D(z,C){if(z.const)T(z.const,C);else if(z.enum)for(let ge of z.enum)T(ge,C);else throw new Error(`discriminator: "properties/${c}" must have "const" or "enum"`)}function T(z,C){if(typeof z!="string"||z in $)throw new Error(`discriminator: "${c}" values must be unique strings`);$[z]=C}}}};ro.default=d$});var vd=_((Xb,h$)=>{h$.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{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:[]}},type:["object","boolean"],properties:{$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:"#"}},default:!0}});var $d=_((fe,yd)=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.CodeGen=fe.Name=fe.nil=fe.stringify=fe.str=fe._=fe.KeywordCxt=void 0;var p$=pf(),m$=hd(),g$=gd(),_d=vd(),v$=["/properties"],xs="http://json-schema.org/draft-07/schema",Ls=class extends p$.default{_addVocabularies(){super._addVocabularies(),m$.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(g$.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(_d,v$):_d;this.addMetaSchema(e,xs,!1),this.refs["http://json-schema.org/schema"]=xs}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(xs)?xs:void 0)}};yd.exports=fe=Ls;Object.defineProperty(fe,"__esModule",{value:!0});fe.default=Ls;var _$=Pn();Object.defineProperty(fe,"KeywordCxt",{enumerable:!0,get:function(){return _$.KeywordCxt}});var Dr=L();Object.defineProperty(fe,"_",{enumerable:!0,get:function(){return Dr._}});Object.defineProperty(fe,"str",{enumerable:!0,get:function(){return Dr.str}});Object.defineProperty(fe,"stringify",{enumerable:!0,get:function(){return Dr.stringify}});Object.defineProperty(fe,"nil",{enumerable:!0,get:function(){return Dr.nil}});Object.defineProperty(fe,"Name",{enumerable:!0,get:function(){return Dr.Name}});Object.defineProperty(fe,"CodeGen",{enumerable:!0,get:function(){return Dr.CodeGen}})});var rr=_(jr=>{"use strict";var y$=jr&&jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jr,"__esModule",{value:!0});jr.ServerlessError=void 0;var $$=y$(yt()),E$=$$.default.Logger,w$=new E$("S-CLI-ERROR"),b$=function(){function r(e,t,n){w$.error(e+": "+t,n),process.exit(1)}return r}();jr.ServerlessError=b$});var Ed=_(kr=>{"use strict";var S$=kr&&kr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(kr,"__esModule",{value:!0});kr.CommandError=void 0;var O$=rr(),P$=function(r){S$(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(O$.ServerlessError);kr.CommandError=P$});var wd=_(xr=>{"use strict";var R$=xr&&xr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(xr,"__esModule",{value:!0});xr.ConfigDeleteError=void 0;var C$=rr(),N$=function(r){R$(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(C$.ServerlessError);xr.ConfigDeleteError=N$});var bd=_(Lr=>{"use strict";var I$=Lr&&Lr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.ConfigError=void 0;var T$=rr(),A$=function(r){I$(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(T$.ServerlessError);Lr.ConfigError=A$});var Sd=_(Mr=>{"use strict";var q$=Mr&&Mr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.ConfigGetError=void 0;var D$=rr(),j$=function(r){q$(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(D$.ServerlessError);Mr.ConfigGetError=j$});var Od=_(Fr=>{"use strict";var k$=Fr&&Fr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Fr,"__esModule",{value:!0});Fr.InitError=void 0;var x$=rr(),L$=function(r){k$(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(x$.ServerlessError);Fr.InitError=L$});var Rd=_(ft=>{"use strict";var M$=ft&&ft.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},F$=ft&&ft.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},V$=ft&&ft.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ft,"__esModule",{value:!0});ft.HumanError=void 0;var Pd=V$(yt()),Ms=fn(),H$=Pd.default.colors,U$=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,Ms.logger.log(`
29
- `.concat((0,Ms.bgRed)("ERROR:"))),Ms.logger.log("TypeError: ".concat(t,`
30
- `)),n&&Ms.logger.log("".concat(H$.gray(n),`
31
- `))}return r.prototype.report=function(e){return M$(this,void 0,void 0,function(){var t;return F$(this,function(n){switch(n.label){case 0:return t=e.error,[4,Pd.default.report({type:"jsError",content:"".concat(this.errorMessage,"||").concat(t.stack)})];case 1:return n.sent(),[2]}})})},r}();ft.HumanError=U$});var Nd=_(Vr=>{"use strict";var G$=Vr&&Vr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.HumanWarning=void 0;var z$=G$(yt()),no=fn(),Cd=z$.default.colors,K$=function(){function r(e){var t=e.warningMessage,n=e.tips;no.logger.log(`
32
- `.concat(Cd.hex("#000").bgYellow("WARNING:"))),no.logger.log("".concat(t,`
33
- `)),n&&no.logger.log("".concat(Cd.gray(n),`
34
- `))}return r}();Vr.HumanWarning=K$});var Id=_(ee=>{"use strict";var X$=ee&&ee.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},W$=ee&&ee.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},B$=ee&&ee.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ee,"__esModule",{value:!0});ee.HandleError=ee.HumanWarning=ee.HumanError=ee.ServerlessError=ee.InitError=ee.ConfigGetError=ee.ConfigError=ee.ConfigDeleteError=ee.CommandError=void 0;var Q=fn(),Fn=B$(yt()),jt=Fn.default.colors,J$=Fn.default.report,so=Fn.default.isDebugMode,Y$=Fn.default.makeUnderLine,io=Fn.default.isDocker,Z$=Ed();Object.defineProperty(ee,"CommandError",{enumerable:!0,get:function(){return Z$.CommandError}});var Q$=wd();Object.defineProperty(ee,"ConfigDeleteError",{enumerable:!0,get:function(){return Q$.ConfigDeleteError}});var eE=bd();Object.defineProperty(ee,"ConfigError",{enumerable:!0,get:function(){return eE.ConfigError}});var tE=Sd();Object.defineProperty(ee,"ConfigGetError",{enumerable:!0,get:function(){return tE.ConfigGetError}});var rE=Od();Object.defineProperty(ee,"InitError",{enumerable:!0,get:function(){return rE.InitError}});var nE=rr();Object.defineProperty(ee,"ServerlessError",{enumerable:!0,get:function(){return nE.ServerlessError}});var sE=Rd();Object.defineProperty(ee,"HumanError",{enumerable:!0,get:function(){return sE.HumanError}});var iE=Nd();Object.defineProperty(ee,"HumanWarning",{enumerable:!0,get:function(){return iE.HumanWarning}});function Fs(r,e){return"".concat(jt.gray(r)).concat(jt.gray.underline(e))}var aE=function(r){return X$(void 0,void 0,void 0,function(){var e,t,n,s,i,a,c,u;return W$(this,function(o){switch(o.label){case 0:e="Message:",t={traceId:"",catchableError:!1},n=r,s=(0,Q.getConfig)("analysis"),s!=="disable"&&(t.traceId=process.env.serverless_devs_trace_id),i=r.message?r.message:"";try{a=JSON.parse(i)}catch{}return a&&a.tips?(c=a.message?"Message: ".concat(a.message,`
35
- `):"",u=a.tips?"* ".concat(Y$(a.tips.replace(/\n/,`
28
+ deps: ${t}}`};var s0={keyword:"dependencies",type:"object",schemaType:"object",error:ct.error,code(r){let[e,t]=i0(r);Lf(r,e),Mf(r,t)}};function i0({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let s=Array.isArray(r[n])?e:t;s[n]=r[n]}return[e,t]}function Lf(r,e=r.schema){let{gen:t,data:n,it:s}=r;if(Object.keys(e).length===0)return;let i=t.let("missing");for(let a in e){let c=e[a];if(c.length===0)continue;let u=(0,kn.propertyInData)(t,n,a,s.opts.ownProperties);r.setParams({property:a,depsCount:c.length,deps:c.join(", ")}),s.allErrors?t.if(u,()=>{for(let o of c)(0,kn.checkReportMissingProp)(r,o)}):(t.if((0,ka._)`${u} && (${(0,kn.checkMissingProp)(r,c,i)})`),(0,kn.reportMissingProp)(r,i),t.else())}}ct.validatePropertyDeps=Lf;function Mf(r,e=r.schema){let{gen:t,data:n,keyword:s,it:i}=r,a=t.name("valid");for(let c in e)(0,n0.alwaysValidSchema)(i,e[c])||(t.if((0,kn.propertyInData)(t,n,c,i.opts.ownProperties),()=>{let u=r.subschema({keyword:s,schemaProp:c},a);r.mergeValidEvaluated(u,a)},()=>t.var(a,!0)),r.ok(a))}ct.validateSchemaDeps=Mf;ct.default=s0});var Hf=_(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});var Vf=L(),a0=G(),o0={message:"property name must be valid",params:({params:r})=>(0,Vf._)`{propertyName: ${r.propertyName}}`},c0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:o0,code(r){let{gen:e,schema:t,data:n,it:s}=r;if((0,a0.alwaysValidSchema)(s,t))return;let i=e.name("valid");e.forIn("key",n,a=>{r.setParams({propertyName:a}),r.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),e.if((0,Vf.not)(i),()=>{r.error(!0),s.allErrors||e.break()})}),r.ok(i)}};xa.default=c0});var Ma=_(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var Is=ze(),Qe=L(),u0=$t(),Ts=G(),l0={message:"must NOT have additional properties",params:({params:r})=>(0,Qe._)`{additionalProperty: ${r.additionalProperty}}`},f0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:l0,code(r){let{gen:e,schema:t,parentSchema:n,data:s,errsCount:i,it:a}=r;if(!i)throw new Error("ajv implementation error");let{allErrors:c,opts:u}=a;if(a.props=!0,u.removeAdditional!=="all"&&(0,Ts.alwaysValidSchema)(a,t))return;let o=(0,Is.allSchemaProperties)(n.properties),l=(0,Is.allSchemaProperties)(n.patternProperties);d(),r.ok((0,Qe._)`${i} === ${u0.default.errors}`);function d(){e.forIn("key",s,w=>{!o.length&&!l.length?$(w):e.if(y(w),()=>$(w))})}function y(w){let b;if(o.length>8){let D=(0,Ts.schemaRefOrVal)(a,n.properties,"properties");b=(0,Is.isOwnProperty)(e,D,w)}else o.length?b=(0,Qe.or)(...o.map(D=>(0,Qe._)`${w} === ${D}`)):b=Qe.nil;return l.length&&(b=(0,Qe.or)(b,...l.map(D=>(0,Qe._)`${(0,Is.usePattern)(r,D)}.test(${w})`))),(0,Qe.not)(b)}function m(w){e.code((0,Qe._)`delete ${s}[${w}]`)}function $(w){if(u.removeAdditional==="all"||u.removeAdditional&&t===!1){m(w);return}if(t===!1){r.setParams({additionalProperty:w}),r.error(),c||e.break();return}if(typeof t=="object"&&!(0,Ts.alwaysValidSchema)(a,t)){let b=e.name("valid");u.removeAdditional==="failing"?(E(w,b,!1),e.if((0,Qe.not)(b),()=>{r.reset(),m(w)})):(E(w,b),c||e.if((0,Qe.not)(b),()=>e.break()))}}function E(w,b,D){let T={keyword:"additionalProperties",dataProp:w,dataPropType:Ts.Type.Str};D===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(T,b)}}};La.default=f0});var zf=_(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});var d0=Sn(),Uf=ze(),Fa=G(),Gf=Ma(),h0={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Gf.default.code(new d0.KeywordCxt(i,Gf.default,"additionalProperties"));let a=(0,Uf.allSchemaProperties)(t);for(let d of a)i.definedProperties.add(d);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=Fa.mergeEvaluated.props(e,(0,Fa.toHash)(a),i.props));let c=a.filter(d=>!(0,Fa.alwaysValidSchema)(i,t[d]));if(c.length===0)return;let u=e.name("valid");for(let d of c)o(d)?l(d):(e.if((0,Uf.propertyInData)(e,s,d,i.opts.ownProperties)),l(d),i.allErrors||e.else().var(u,!0),e.endIf()),r.it.definedProperties.add(d),r.ok(u);function o(d){return i.opts.useDefaults&&!i.compositeRule&&t[d].default!==void 0}function l(d){r.subschema({keyword:"properties",schemaProp:d,dataProp:d},u)}}};Va.default=h0});var Bf=_(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var Kf=ze(),As=L(),Xf=G(),Wf=G(),p0={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:s,it:i}=r,{opts:a}=i,c=(0,Kf.allSchemaProperties)(t),u=c.filter(E=>(0,Xf.alwaysValidSchema)(i,t[E]));if(c.length===0||u.length===c.length&&(!i.opts.unevaluated||i.props===!0))return;let o=a.strictSchema&&!a.allowMatchingProperties&&s.properties,l=e.name("valid");i.props!==!0&&!(i.props instanceof As.Name)&&(i.props=(0,Wf.evaluatedPropsToName)(e,i.props));let{props:d}=i;y();function y(){for(let E of c)o&&m(E),i.allErrors?$(E):(e.var(l,!0),$(E),e.if(l))}function m(E){for(let w in o)new RegExp(E).test(w)&&(0,Xf.checkStrictMode)(i,`property ${w} matches pattern ${E} (use allowMatchingProperties)`)}function $(E){e.forIn("key",n,w=>{e.if((0,As._)`${(0,Kf.usePattern)(r,E)}.test(${w})`,()=>{let b=u.includes(E);b||r.subschema({keyword:"patternProperties",schemaProp:E,dataProp:w,dataPropType:Wf.Type.Str},l),i.opts.unevaluated&&d!==!0?e.assign((0,As._)`${d}[${w}]`,!0):!b&&!i.allErrors&&e.if((0,As.not)(l),()=>e.break())})})}}};Ha.default=p0});var Jf=_(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});var m0=G(),g0={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,m0.alwaysValidSchema)(n,t)){r.fail();return}let s=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};Ua.default=g0});var Yf=_(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var v0=ze(),_0={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:v0.validateUnion,error:{message:"must match a schema in anyOf"}};Ga.default=_0});var Zf=_(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var qs=L(),y0=G(),$0={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,qs._)`{passingSchemas: ${r.passing}}`},E0={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$0,code(r){let{gen:e,schema:t,parentSchema:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;let i=t,a=e.let("valid",!1),c=e.let("passing",null),u=e.name("_valid");r.setParams({passing:c}),e.block(o),r.result(a,()=>r.reset(),()=>r.error(!0));function o(){i.forEach((l,d)=>{let y;(0,y0.alwaysValidSchema)(s,l)?e.var(u,!0):y=r.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},u),d>0&&e.if((0,qs._)`${u} && ${a}`).assign(a,!1).assign(c,(0,qs._)`[${c}, ${d}]`).else(),e.if(u,()=>{e.assign(a,!0),e.assign(c,d),y&&r.mergeEvaluated(y,qs.Name)})})}}};za.default=E0});var Qf=_(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var w0=G(),b0={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let s=e.name("valid");t.forEach((i,a)=>{if((0,w0.alwaysValidSchema)(n,i))return;let c=r.subschema({keyword:"allOf",schemaProp:a},s);r.ok(s),r.mergeEvaluated(c)})}};Ka.default=b0});var rd=_(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});var Ds=L(),td=G(),S0={message:({params:r})=>(0,Ds.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,Ds._)`{failingKeyword: ${r.ifClause}}`},O0={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:S0,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,td.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let s=ed(n,"then"),i=ed(n,"else");if(!s&&!i)return;let a=e.let("valid",!0),c=e.name("_valid");if(u(),r.reset(),s&&i){let l=e.let("ifClause");r.setParams({ifClause:l}),e.if(c,o("then",l),o("else",l))}else s?e.if(c,o("then")):e.if((0,Ds.not)(c),o("else"));r.pass(a,()=>r.error(!0));function u(){let l=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);r.mergeEvaluated(l)}function o(l,d){return()=>{let y=r.subschema({keyword:l},c);e.assign(a,c),r.mergeValidEvaluated(y,a),d?e.assign(d,(0,Ds._)`${l}`):r.setParams({ifClause:l})}}}};function ed(r,e){let t=r.schema[e];return t!==void 0&&!(0,td.alwaysValidSchema)(r,t)}Xa.default=O0});var nd=_(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});var P0=G(),R0={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,P0.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};Wa.default=R0});var sd=_(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var C0=Ta(),N0=Df(),I0=Aa(),T0=kf(),A0=xf(),q0=Ff(),D0=Hf(),j0=Ma(),k0=zf(),x0=Bf(),L0=Jf(),M0=Yf(),F0=Zf(),V0=Qf(),H0=rd(),U0=nd();function G0(r=!1){let e=[L0.default,M0.default,F0.default,V0.default,H0.default,U0.default,D0.default,j0.default,q0.default,k0.default,x0.default];return r?e.push(N0.default,T0.default):e.push(C0.default,I0.default),e.push(A0.default),e}Ba.default=G0});var id=_(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var oe=L(),z0={message:({schemaCode:r})=>(0,oe.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,oe._)`{format: ${r}}`},K0={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:z0,code(r,e){let{gen:t,data:n,$data:s,schema:i,schemaCode:a,it:c}=r,{opts:u,errSchemaPath:o,schemaEnv:l,self:d}=c;if(!u.validateFormats)return;s?y():m();function y(){let $=t.scopeValue("formats",{ref:d.formats,code:u.code.formats}),E=t.const("fDef",(0,oe._)`${$}[${a}]`),w=t.let("fType"),b=t.let("format");t.if((0,oe._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>t.assign(w,(0,oe._)`${E}.type || "string"`).assign(b,(0,oe._)`${E}.validate`),()=>t.assign(w,(0,oe._)`"string"`).assign(b,E)),r.fail$data((0,oe.or)(D(),T()));function D(){return u.strictSchema===!1?oe.nil:(0,oe._)`${a} && !${b}`}function T(){let z=l.$async?(0,oe._)`(${E}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,oe._)`${b}(${n})`,C=(0,oe._)`(typeof ${b} == "function" ? ${z} : ${b}.test(${n}))`;return(0,oe._)`${b} && ${b} !== true && ${w} === ${e} && !${C}`}}function m(){let $=d.formats[i];if(!$){D();return}if($===!0)return;let[E,w,b]=T($);E===e&&r.pass(z());function D(){if(u.strictSchema===!1){d.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${i}" ignored in schema at path "${o}"`}}function T(C){let me=C instanceof RegExp?(0,oe.regexpCode)(C):u.code.formats?(0,oe._)`${u.code.formats}${(0,oe.getProperty)(i)}`:void 0,ke=t.scopeValue("formats",{key:i,ref:C,code:me});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,oe._)`${ke}.validate`]:["string",C,ke]}function z(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!l.$async)throw new Error("async format in sync schema");return(0,oe._)`await ${b}(${n})`}return typeof w=="function"?(0,oe._)`${b}(${n})`:(0,oe._)`${b}.test(${n})`}}}};Ja.default=K0});var ad=_(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});var X0=id(),W0=[X0.default];Ya.default=W0});var od=_(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.contentVocabulary=Ir.metadataVocabulary=void 0;Ir.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ir.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var ud=_(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var B0=gf(),J0=If(),Y0=sd(),Z0=ad(),cd=od(),Q0=[B0.default,J0.default,(0,Y0.default)(),Z0.default,cd.metadataVocabulary,cd.contentVocabulary];Za.default=Q0});var ld=_(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.DiscrError=void 0;var e$;(function(r){r.Tag="tag",r.Mapping="mapping"})(e$=xn.DiscrError||(xn.DiscrError={}))});var dd=_(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var Tr=L(),Qa=ld(),fd=ys(),t$=G(),r$={message:({params:{discrError:r,tagName:e}})=>r===Qa.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,Tr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},n$={keyword:"discriminator",type:"object",schemaType:"object",error:r$,code(r){let{gen:e,data:t,schema:n,parentSchema:s,it:i}=r,{oneOf:a}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let 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(!a)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),o=e.const("tag",(0,Tr._)`${t}${(0,Tr.getProperty)(c)}`);e.if((0,Tr._)`typeof ${o} == "string"`,()=>l(),()=>r.error(!1,{discrError:Qa.DiscrError.Tag,tag:o,tagName:c})),r.ok(u);function l(){let m=y();e.if(!1);for(let $ in m)e.elseIf((0,Tr._)`${o} === ${$}`),e.assign(u,d(m[$]));e.else(),r.error(!1,{discrError:Qa.DiscrError.Mapping,tag:o,tagName:c}),e.endIf()}function d(m){let $=e.name("valid"),E=r.subschema({keyword:"oneOf",schemaProp:m},$);return r.mergeEvaluated(E,Tr.Name),$}function y(){var m;let $={},E=b(s),w=!0;for(let z=0;z<a.length;z++){let C=a[z];(C==null?void 0:C.$ref)&&!(0,t$.schemaHasRulesButRef)(C,i.self.RULES)&&(C=fd.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,C==null?void 0:C.$ref),C instanceof fd.SchemaEnv&&(C=C.schema));let me=(m=C==null?void 0:C.properties)===null||m===void 0?void 0:m[c];if(typeof me!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${c}"`);w=w&&(E||b(C)),D(me,z)}if(!w)throw new Error(`discriminator: "${c}" must be required`);return $;function b({required:z}){return Array.isArray(z)&&z.includes(c)}function D(z,C){if(z.const)T(z.const,C);else if(z.enum)for(let me of z.enum)T(me,C);else throw new Error(`discriminator: "properties/${c}" must have "const" or "enum"`)}function T(z,C){if(typeof z!="string"||z in $)throw new Error(`discriminator: "${c}" values must be unique strings`);$[z]=C}}}};eo.default=n$});var hd=_((Lb,s$)=>{s$.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{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:[]}},type:["object","boolean"],properties:{$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:"#"}},default:!0}});var gd=_((le,md)=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.CodeGen=le.Name=le.nil=le.stringify=le.str=le._=le.KeywordCxt=void 0;var i$=lf(),a$=ud(),o$=dd(),pd=hd(),c$=["/properties"],js="http://json-schema.org/draft-07/schema",ks=class extends i$.default{_addVocabularies(){super._addVocabularies(),a$.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o$.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(pd,c$):pd;this.addMetaSchema(e,js,!1),this.refs["http://json-schema.org/schema"]=js}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(js)?js:void 0)}};md.exports=le=ks;Object.defineProperty(le,"__esModule",{value:!0});le.default=ks;var u$=Sn();Object.defineProperty(le,"KeywordCxt",{enumerable:!0,get:function(){return u$.KeywordCxt}});var Ar=L();Object.defineProperty(le,"_",{enumerable:!0,get:function(){return Ar._}});Object.defineProperty(le,"str",{enumerable:!0,get:function(){return Ar.str}});Object.defineProperty(le,"stringify",{enumerable:!0,get:function(){return Ar.stringify}});Object.defineProperty(le,"nil",{enumerable:!0,get:function(){return Ar.nil}});Object.defineProperty(le,"Name",{enumerable:!0,get:function(){return Ar.Name}});Object.defineProperty(le,"CodeGen",{enumerable:!0,get:function(){return Ar.CodeGen}})});var er=_(qr=>{"use strict";var l$=qr&&qr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qr,"__esModule",{value:!0});qr.ServerlessError=void 0;var f$=l$(vt()),d$=f$.default.Logger,h$=new d$("S-CLI-ERROR"),p$=function(){function r(e,t,n){h$.error(e+": "+t,n),process.exit(1)}return r}();qr.ServerlessError=p$});var vd=_(Dr=>{"use strict";var m$=Dr&&Dr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.CommandError=void 0;var g$=er(),v$=function(r){m$(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(g$.ServerlessError);Dr.CommandError=v$});var _d=_(jr=>{"use strict";var _$=jr&&jr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(jr,"__esModule",{value:!0});jr.ConfigDeleteError=void 0;var y$=er(),$$=function(r){_$(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(y$.ServerlessError);jr.ConfigDeleteError=$$});var yd=_(kr=>{"use strict";var E$=kr&&kr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(kr,"__esModule",{value:!0});kr.ConfigError=void 0;var w$=er(),b$=function(r){E$(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(w$.ServerlessError);kr.ConfigError=b$});var $d=_(xr=>{"use strict";var S$=xr&&xr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(xr,"__esModule",{value:!0});xr.ConfigGetError=void 0;var O$=er(),P$=function(r){S$(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(O$.ServerlessError);xr.ConfigGetError=P$});var Ed=_(Lr=>{"use strict";var R$=Lr&&Lr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.InitError=void 0;var C$=er(),N$=function(r){R$(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(C$.ServerlessError);Lr.InitError=N$});var bd=_(ut=>{"use strict";var I$=ut&&ut.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},T$=ut&&ut.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},A$=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ut,"__esModule",{value:!0});ut.HumanError=void 0;var wd=A$(vt()),xs=un(),q$=wd.default.colors,D$=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,xs.logger.log(`
29
+ `.concat((0,xs.bgRed)("ERROR:"))),xs.logger.log("TypeError: ".concat(t,`
30
+ `)),n&&xs.logger.log("".concat(q$.gray(n),`
31
+ `))}return r.prototype.report=function(e){return I$(this,void 0,void 0,function(){var t;return T$(this,function(n){switch(n.label){case 0:return t=e.error,[4,wd.default.report({type:"jsError",content:"".concat(this.errorMessage,"||").concat(t.stack)})];case 1:return n.sent(),[2]}})})},r}();ut.HumanError=D$});var Od=_(Mr=>{"use strict";var j$=Mr&&Mr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.HumanWarning=void 0;var k$=j$(vt()),to=un(),Sd=k$.default.colors,x$=function(){function r(e){var t=e.warningMessage,n=e.tips;to.logger.log(`
32
+ `.concat(Sd.hex("#000").bgYellow("WARNING:"))),to.logger.log("".concat(t,`
33
+ `)),n&&to.logger.log("".concat(Sd.gray(n),`
34
+ `))}return r}();Mr.HumanWarning=x$});var Pd=_(ee=>{"use strict";var L$=ee&&ee.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},M$=ee&&ee.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},F$=ee&&ee.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ee,"__esModule",{value:!0});ee.HandleError=ee.HumanWarning=ee.HumanError=ee.ServerlessError=ee.InitError=ee.ConfigGetError=ee.ConfigError=ee.ConfigDeleteError=ee.CommandError=void 0;var Q=un(),Ln=F$(vt()),qt=Ln.default.colors,V$=Ln.default.report,ro=Ln.default.isDebugMode,H$=Ln.default.makeUnderLine,no=Ln.default.isDocker,U$=vd();Object.defineProperty(ee,"CommandError",{enumerable:!0,get:function(){return U$.CommandError}});var G$=_d();Object.defineProperty(ee,"ConfigDeleteError",{enumerable:!0,get:function(){return G$.ConfigDeleteError}});var z$=yd();Object.defineProperty(ee,"ConfigError",{enumerable:!0,get:function(){return z$.ConfigError}});var K$=$d();Object.defineProperty(ee,"ConfigGetError",{enumerable:!0,get:function(){return K$.ConfigGetError}});var X$=Ed();Object.defineProperty(ee,"InitError",{enumerable:!0,get:function(){return X$.InitError}});var W$=er();Object.defineProperty(ee,"ServerlessError",{enumerable:!0,get:function(){return W$.ServerlessError}});var B$=bd();Object.defineProperty(ee,"HumanError",{enumerable:!0,get:function(){return B$.HumanError}});var J$=Od();Object.defineProperty(ee,"HumanWarning",{enumerable:!0,get:function(){return J$.HumanWarning}});function Ls(r,e){return"".concat(qt.gray(r)).concat(qt.gray.underline(e))}var Y$=function(r){return L$(void 0,void 0,void 0,function(){var e,t,n,s,i,a,c,u;return M$(this,function(o){switch(o.label){case 0:e="Message:",t={traceId:"",catchableError:!1},n=r,s=(0,Q.getConfig)("analysis"),s!=="disable"&&(t.traceId=process.env.serverless_devs_trace_id),i=r.message?r.message:"";try{a=JSON.parse(i)}catch{}return a&&a.tips?(c=a.message?"Message: ".concat(a.message,`
35
+ `):"",u=a.tips?"* ".concat(H$(a.tips.replace(/\n/,`
36
36
  * `))):"",Q.logger.log(`
37
- `.concat(jt.hex("#000").bgYellow("WARNING:"),`
37
+ `.concat(qt.hex("#000").bgYellow("WARNING:"),`
38
38
  ======================
39
39
  `).concat(u,`
40
- `),"yellow"),so()?Q.logger.log(r.stack):Q.logger.log(jt.grey(c)),t.catchableError=!0,n=a,[3,5]):[3,1];case 1:return a&&a.code?(Q.logger.log((0,Q.red)("\u2716 ".concat(a.prefix||e,`
40
+ `),"yellow"),ro()?Q.logger.log(r.stack):Q.logger.log(qt.grey(c)),t.catchableError=!0,n=a,[3,5]):[3,1];case 1:return a&&a.code?(Q.logger.log((0,Q.red)("\u2716 ".concat(a.prefix||e,`
41
41
  `))),Q.logger.log("".concat((0,Q.bgRed)("ERROR:"),`
42
- `)),so()?Q.logger.log("".concat(a.stack,`
42
+ `)),ro()?Q.logger.log("".concat(a.stack,`
43
43
  `)):Q.logger.log("".concat(a.message,`
44
44
  `)),[4,(0,Q.aiRequest)(a.message)]):[3,3];case 2:return o.sent(),n=a,[3,5];case 3:return Q.logger.log((0,Q.red)("\u2716 ".concat(e,`
45
45
  `))),Q.logger.log("".concat((0,Q.bgRed)("ERROR:"),`
46
- `)),Q.logger.log(so()||io()?r.stack:"".concat(i,`
47
- `)),[4,(0,Q.aiRequest)(i)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&Q.logger.log(jt.gray("TraceId: ".concat(t.traceId))),io()||(Q.logger.log(jt.gray("Environment: ".concat((0,Q.getVersion)()))),Q.logger.log(Fs("Documents: ","https://www.serverless-devs.com")),Q.logger.log(Fs("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),Q.logger.log(Fs("Issues: ","https://github.com/Serverless-Devs/Serverless-Devs/issues")),Q.logger.log(Fs("Regsitry: ",`https://registry.serverless-devs.com
48
- `)),t.traceId&&Q.logger.log(jt.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))))),!io()&&Q.logger.log(jt.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,J$({type:"jsError",content:"".concat(n.message,"||").concat(n.stack),traceId:t.traceId})]:[3,7];case 6:o.sent(),o.label=7;case 7:return process.exit(n.code||1),[2]}})})};ee.HandleError=aE});var Td=exports&&exports.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},Ad=exports&&exports.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Vn=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var oE=Vn(Fo()),St=Vn(yt()),cE=Vn(Ei()),Hr=fn(),uE=Vn(require("path")),lE=Vn($d()),fE=Id(),ao=St.default.colors,dE=St.default.getYamlContent,Ae=St.default.lodash,hE=St.default.loadComponent,pE=St.default.fse,mE=St.default.parseYaml,gE=St.default.spinner,qd=Ae.get,vE=Ae.keys,_E=Ae.omit,yE=Ae.isEmpty,$E=Ae.replace,Dd=Ae.isPlainObject,oo=Ae.isArray,jd=Ae.each,EE=Ae.last,wE=Ae.split,bE=Ae.uniq,kd=Ae.map,SE=Ae.concat,xd=Ae.filter,OE=`Application verification.
46
+ `)),Q.logger.log(ro()||no()?r.stack:"".concat(i,`
47
+ `)),[4,(0,Q.aiRequest)(i)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&Q.logger.log(qt.gray("TraceId: ".concat(t.traceId))),no()||(Q.logger.log(qt.gray("Environment: ".concat((0,Q.getVersion)()))),Q.logger.log(Ls("Documents: ","https://www.serverless-devs.com")),Q.logger.log(Ls("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),Q.logger.log(Ls("Issues: ","https://github.com/Serverless-Devs/Serverless-Devs/issues")),Q.logger.log(Ls("Regsitry: ",`https://registry.serverless-devs.com
48
+ `)),t.traceId&&Q.logger.log(qt.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))))),!no()&&Q.logger.log(qt.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,V$({type:"jsError",content:"".concat(n.message,"||").concat(n.stack),traceId:t.traceId})]:[3,7];case 6:o.sent(),o.label=7;case 7:return process.exit(n.code||1),[2]}})})};ee.HandleError=Y$});var Rd=exports&&exports.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},Cd=exports&&exports.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Mn=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var Z$=Mn(ko()),wt=Mn(vt()),Q$=Mn(yi()),Fr=un(),eE=Mn(require("path")),tE=Mn(gd()),rE=Pd(),so=wt.default.colors,nE=wt.default.getYamlContent,Te=wt.default.lodash,sE=wt.default.loadComponent,iE=wt.default.fse,aE=wt.default.parseYaml,oE=wt.default.spinner,Nd=Te.get,cE=Te.keys,uE=Te.omit,lE=Te.isEmpty,fE=Te.replace,Id=Te.isPlainObject,io=Te.isArray,Td=Te.each,dE=Te.last,hE=Te.split,pE=Te.uniq,Ad=Te.map,mE=Te.concat,qd=Te.filter,gE=`Application verification.
49
49
 
50
50
  Example:
51
51
  $ s verify
52
52
 
53
- `.concat((0,Hr.emoji)("\u{1F4D6}")," Document: ").concat(ao.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/verify.md")),PE=oE.default.name("s verify").usage("[options]").option("-t, --template [templatePath]","Specify the template file").helpOption("-h, --help",(0,cE.default)("display_help_for_command")).description(OE).addHelpCommand(!1).parse(process.argv);function Ld(r){var e=oo(r)?[]:{};if(typeof r=="object"){var t=vE(r).filter(function(i){return i.startsWith("x-")}),n=_E(r,t);for(var s in n)e[s]=typeof r[s]=="object"?Ld(r[s]):r[s]}else e=r;return e}function RE(r){var e=Ld(r),t=[];function n(i,a){if(a===void 0&&(a=""),Dd(i)){if(i.required===!0){var c=wE(a,"."),u=c.slice(0,c.length-2).join(".");t.push({key:u,name:EE(c)})}typeof i.required=="boolean"&&delete i.required,a!==""&&(a="".concat(a,"."));for(var o in i)n(i[o],"".concat(a).concat(o))}oo(i)&&jd(i,function(l,d){n(l,"".concat(a,"[").concat(d,"]"))})}function s(i,a){if(a===void 0&&(a=""),Dd(i)){var c=xd(t,function(l){return l.key===a});if(c.length>0){var u=kd(c,function(l){return l.name});i.required=i.required?bE(SE(i.required,u)):u}a!==""&&(a="".concat(a,"."));for(var o in i)s(i[o],"".concat(a).concat(o))}oo(i)&&jd(i,function(l,d){s(l,"".concat(a,"[").concat(d,"]"))})}return n(e),s(e),e}(function(){return Td(void 0,void 0,void 0,function(){var r,e,t,n,s,i,a,c,u,o,l,d,y,m,$,E,w,b,D,T,z,C,ge,xe,Ot,Le;return Ad(this,function(re){switch(re.label){case 0:return r=(0,Hr.getProcessArgv)(),e=r.help,t=r.template,e&&PE.help(),[4,St.default.getTemplatePath(t)];case 1:return n=re.sent(),[4,St.default.transforYamlPath(n)];case 2:s=re.sent(),i=pE.readFileSync(s,"utf8"),a=mE(i),c=a.services,u=[];for(o in c)l=c[o],u.push({component:l.component,props:l.props,service:o});d=[],y=0,m=u,re.label=3;case 3:return y<m.length?($=m[y],[4,hE($.component)]):[3,7];case 4:return E=re.sent(),[4,dE(uE.default.join(E.__path,"publish.yaml"))];case 5:if(w=re.sent(),b=qd(w,"Properties",{}),yE(b.properties))return[3,6];if(D=new lE.default({strict:!1}),T=D.compile(RE(b)),z=T($.props),!z)return d.push(!0),C=T.errors,ge=xd(C,function(Me){return Me.keyword!=="oneOf"}),Hr.logger.log("".concat((0,Hr.red)("\u2716")," Format verification failed.")),xe=qd(ge,"[0].instancePath"),xe&&(Ot=$E(xe.slice(1),/\//g,"."),Hr.logger.log("The ".concat(ao.yellow(Ot)," field in ").concat(ao.yellow($.service),` service is incorrect.
54
- `))),Le=kd(ge,function(Me){return{message:Me.message,params:Me.params}}),Hr.logger.output(Le.length>1?Le:Le[0]),[3,7];re.label=6;case 6:return y++,[3,3];case 7:return d.length===0&&gE("Format verification passed.").succeed(),[2]}})})})().catch(function(r){return Td(void 0,void 0,void 0,function(){return Ad(this,function(e){switch(e.label){case 0:return[4,(0,fE.HandleError)(r)];case 1:return e.sent(),[2]}})})});
53
+ `.concat((0,Fr.emoji)("\u{1F4D6}")," Document: ").concat(so.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/verify.md")),vE=Z$.default.name("s verify").usage("[options]").option("-t, --template [templatePath]","Specify the template file").helpOption("-h, --help",(0,Q$.default)("display_help_for_command")).description(gE).addHelpCommand(!1).parse(process.argv);function Dd(r){var e=io(r)?[]:{};if(typeof r=="object"){var t=cE(r).filter(function(i){return i.startsWith("x-")}),n=uE(r,t);for(var s in n)e[s]=typeof r[s]=="object"?Dd(r[s]):r[s]}else e=r;return e}function _E(r){var e=Dd(r),t=[];function n(i,a){if(a===void 0&&(a=""),Id(i)){if(i.required===!0){var c=hE(a,"."),u=c.slice(0,c.length-2).join(".");t.push({key:u,name:dE(c)})}typeof i.required=="boolean"&&delete i.required,a!==""&&(a="".concat(a,"."));for(var o in i)n(i[o],"".concat(a).concat(o))}io(i)&&Td(i,function(l,d){n(l,"".concat(a,"[").concat(d,"]"))})}function s(i,a){if(a===void 0&&(a=""),Id(i)){var c=qd(t,function(l){return l.key===a});if(c.length>0){var u=Ad(c,function(l){return l.name});i.required=i.required?pE(mE(i.required,u)):u}a!==""&&(a="".concat(a,"."));for(var o in i)s(i[o],"".concat(a).concat(o))}io(i)&&Td(i,function(l,d){s(l,"".concat(a,"[").concat(d,"]"))})}return n(e),s(e),e}(function(){return Rd(void 0,void 0,void 0,function(){var r,e,t,n,s,i,a,c,u,o,l,d,y,m,$,E,w,b,D,T,z,C,me,ke,bt,xe;return Cd(this,function(re){switch(re.label){case 0:return r=(0,Fr.getProcessArgv)(),e=r.help,t=r.template,e&&vE.help(),[4,wt.default.getTemplatePath(t)];case 1:return n=re.sent(),[4,wt.default.transforYamlPath(n)];case 2:s=re.sent(),i=iE.readFileSync(s,"utf8"),a=aE(i),c=a.services,u=[];for(o in c)l=c[o],u.push({component:l.component,props:l.props,service:o});d=[],y=0,m=u,re.label=3;case 3:return y<m.length?($=m[y],[4,sE($.component)]):[3,7];case 4:return E=re.sent(),[4,nE(eE.default.join(E.__path,"publish.yaml"))];case 5:if(w=re.sent(),b=Nd(w,"Properties",{}),lE(b.properties))return[3,6];if(D=new tE.default({strict:!1}),T=D.compile(_E(b)),z=T($.props),!z)return d.push(!0),C=T.errors,me=qd(C,function(Le){return Le.keyword!=="oneOf"}),Fr.logger.log("".concat((0,Fr.red)("\u2716")," Format verification failed.")),ke=Nd(me,"[0].instancePath"),ke&&(bt=fE(ke.slice(1),/\//g,"."),Fr.logger.log("The ".concat(so.yellow(bt)," field in ").concat(so.yellow($.service),` service is incorrect.
54
+ `))),xe=Ad(me,function(Le){return{message:Le.message,params:Le.params}}),Fr.logger.output(xe.length>1?xe:xe[0]),[3,7];re.label=6;case 6:return y++,[3,3];case 7:return d.length===0&&oE("Format verification passed.").succeed(),[2]}})})})().catch(function(r){return Rd(void 0,void 0,void 0,function(){return Cd(this,function(e){switch(e.label){case 0:return[4,(0,rE.HandleError)(r)];case 1:return e.sent(),[2]}})})});
55
55
  /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */