create-zuplo-api 7.1.0 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,10 +2,10 @@
2
2
  (()=>{var t={7213:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.createFileSystemAdapter=u.FILE_SYSTEM_ADAPTER=void 0;const m=p(9896);u.FILE_SYSTEM_ADAPTER={lstat:m.lstat,stat:m.stat,lstatSync:m.lstatSync,statSync:m.statSync,readdir:m.readdir,readdirSync:m.readdirSync};function createFileSystemAdapter(t){if(t===undefined){return u.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},u.FILE_SYSTEM_ADAPTER),t)}u.createFileSystemAdapter=createFileSystemAdapter},7190:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const p=process.versions.node.split(".");if(p[0]===undefined||p[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const m=Number.parseInt(p[0],10);const g=Number.parseInt(p[1],10);const v=10;const b=10;const w=m>v;const E=m===v&&g>=b;u.IS_SUPPORT_READDIR_WITH_FILE_TYPES=w||E},4227:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.Settings=u.scandirSync=u.scandir=void 0;const m=p(1250);const g=p(5959);const v=p(6);u.Settings=v.default;function scandir(t,u,p){if(typeof u==="function"){m.read(t,getSettings(),u);return}m.read(t,getSettings(u),p)}u.scandir=scandir;function scandirSync(t,u){const p=getSettings(u);return g.read(t,p)}u.scandirSync=scandirSync;function getSettings(t={}){if(t instanceof v.default){return t}return new v.default(t)}},1250:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.readdir=u.readdirWithFileTypes=u.read=void 0;const m=p(9321);const g=p(5876);const v=p(7190);const b=p(2829);const w=p(5521);function read(t,u,p){if(!u.stats&&v.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(t,u,p);return}readdir(t,u,p)}u.read=read;function readdirWithFileTypes(t,u,p){u.fs.readdir(t,{withFileTypes:true},((m,v)=>{if(m!==null){callFailureCallback(p,m);return}const b=v.map((p=>({dirent:p,name:p.name,path:w.joinPathSegments(t,p.name,u.pathSegmentSeparator)})));if(!u.followSymbolicLinks){callSuccessCallback(p,b);return}const E=b.map((t=>makeRplTaskEntry(t,u)));g(E,((t,u)=>{if(t!==null){callFailureCallback(p,t);return}callSuccessCallback(p,u)}))}))}u.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(t,u){return p=>{if(!t.dirent.isSymbolicLink()){p(null,t);return}u.fs.stat(t.path,((m,g)=>{if(m!==null){if(u.throwErrorOnBrokenSymbolicLink){p(m);return}p(null,t);return}t.dirent=b.fs.createDirentFromStats(t.name,g);p(null,t)}))}}function readdir(t,u,p){u.fs.readdir(t,((v,E)=>{if(v!==null){callFailureCallback(p,v);return}const S=E.map((p=>{const g=w.joinPathSegments(t,p,u.pathSegmentSeparator);return t=>{m.stat(g,u.fsStatSettings,((m,v)=>{if(m!==null){t(m);return}const w={name:p,path:g,dirent:b.fs.createDirentFromStats(p,v)};if(u.stats){w.stats=v}t(null,w)}))}}));g(S,((t,u)=>{if(t!==null){callFailureCallback(p,t);return}callSuccessCallback(p,u)}))}))}u.readdir=readdir;function callFailureCallback(t,u){t(u)}function callSuccessCallback(t,u){t(null,u)}},5521:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.joinPathSegments=void 0;function joinPathSegments(t,u,p){if(t.endsWith(p)){return t+u}return t+p+u}u.joinPathSegments=joinPathSegments},5959:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.readdir=u.readdirWithFileTypes=u.read=void 0;const m=p(9321);const g=p(7190);const v=p(2829);const b=p(5521);function read(t,u){if(!u.stats&&g.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(t,u)}return readdir(t,u)}u.read=read;function readdirWithFileTypes(t,u){const p=u.fs.readdirSync(t,{withFileTypes:true});return p.map((p=>{const m={dirent:p,name:p.name,path:b.joinPathSegments(t,p.name,u.pathSegmentSeparator)};if(m.dirent.isSymbolicLink()&&u.followSymbolicLinks){try{const t=u.fs.statSync(m.path);m.dirent=v.fs.createDirentFromStats(m.name,t)}catch(t){if(u.throwErrorOnBrokenSymbolicLink){throw t}}}return m}))}u.readdirWithFileTypes=readdirWithFileTypes;function readdir(t,u){const p=u.fs.readdirSync(t);return p.map((p=>{const g=b.joinPathSegments(t,p,u.pathSegmentSeparator);const w=m.statSync(g,u.fsStatSettings);const E={name:p,path:g,dirent:v.fs.createDirentFromStats(p,w)};if(u.stats){E.stats=w}return E}))}u.readdir=readdir},6:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6928);const g=p(9321);const v=p(7213);class Settings{constructor(t={}){this._options=t;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=v.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,m.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new g.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,u){return t!==null&&t!==void 0?t:u}}u["default"]=Settings},426:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.createDirentFromStats=void 0;class DirentFromStats{constructor(t,u){this.name=t;this.isBlockDevice=u.isBlockDevice.bind(u);this.isCharacterDevice=u.isCharacterDevice.bind(u);this.isDirectory=u.isDirectory.bind(u);this.isFIFO=u.isFIFO.bind(u);this.isFile=u.isFile.bind(u);this.isSocket=u.isSocket.bind(u);this.isSymbolicLink=u.isSymbolicLink.bind(u)}}function createDirentFromStats(t,u){return new DirentFromStats(t,u)}u.createDirentFromStats=createDirentFromStats},2829:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.fs=void 0;const m=p(426);u.fs=m},7323:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.createFileSystemAdapter=u.FILE_SYSTEM_ADAPTER=void 0;const m=p(9896);u.FILE_SYSTEM_ADAPTER={lstat:m.lstat,stat:m.stat,lstatSync:m.lstatSync,statSync:m.statSync};function createFileSystemAdapter(t){if(t===undefined){return u.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},u.FILE_SYSTEM_ADAPTER),t)}u.createFileSystemAdapter=createFileSystemAdapter},9321:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.statSync=u.stat=u.Settings=void 0;const m=p(1968);const g=p(5249);const v=p(9172);u.Settings=v.default;function stat(t,u,p){if(typeof u==="function"){m.read(t,getSettings(),u);return}m.read(t,getSettings(u),p)}u.stat=stat;function statSync(t,u){const p=getSettings(u);return g.read(t,p)}u.statSync=statSync;function getSettings(t={}){if(t instanceof v.default){return t}return new v.default(t)}},1968:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.read=void 0;function read(t,u,p){u.fs.lstat(t,((m,g)=>{if(m!==null){callFailureCallback(p,m);return}if(!g.isSymbolicLink()||!u.followSymbolicLink){callSuccessCallback(p,g);return}u.fs.stat(t,((t,m)=>{if(t!==null){if(u.throwErrorOnBrokenSymbolicLink){callFailureCallback(p,t);return}callSuccessCallback(p,g);return}if(u.markSymbolicLink){m.isSymbolicLink=()=>true}callSuccessCallback(p,m)}))}))}u.read=read;function callFailureCallback(t,u){t(u)}function callSuccessCallback(t,u){t(null,u)}},5249:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.read=void 0;function read(t,u){const p=u.fs.lstatSync(t);if(!p.isSymbolicLink()||!u.followSymbolicLink){return p}try{const p=u.fs.statSync(t);if(u.markSymbolicLink){p.isSymbolicLink=()=>true}return p}catch(t){if(!u.throwErrorOnBrokenSymbolicLink){return p}throw t}}u.read=read},9172:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(7323);class Settings{constructor(t={}){this._options=t;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=m.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(t,u){return t!==null&&t!==void 0?t:u}}u["default"]=Settings},3882:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.Settings=u.walkStream=u.walkSync=u.walk=void 0;const m=p(6279);const g=p(7291);const v=p(4844);const b=p(1305);u.Settings=b.default;function walk(t,u,p){if(typeof u==="function"){new m.default(t,getSettings()).read(u);return}new m.default(t,getSettings(u)).read(p)}u.walk=walk;function walkSync(t,u){const p=getSettings(u);const m=new v.default(t,p);return m.read()}u.walkSync=walkSync;function walkStream(t,u){const p=getSettings(u);const m=new g.default(t,p);return m.read()}u.walkStream=walkStream;function getSettings(t={}){if(t instanceof b.default){return t}return new b.default(t)}},6279:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(997);class AsyncProvider{constructor(t,u){this._root=t;this._settings=u;this._reader=new m.default(this._root,this._settings);this._storage=[]}read(t){this._reader.onError((u=>{callFailureCallback(t,u)}));this._reader.onEntry((t=>{this._storage.push(t)}));this._reader.onEnd((()=>{callSuccessCallback(t,this._storage)}));this._reader.read()}}u["default"]=AsyncProvider;function callFailureCallback(t,u){t(u)}function callSuccessCallback(t,u){t(null,u)}},7291:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(2203);const g=p(997);class StreamProvider{constructor(t,u){this._root=t;this._settings=u;this._reader=new g.default(this._root,this._settings);this._stream=new m.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((t=>{this._stream.emit("error",t)}));this._reader.onEntry((t=>{this._stream.push(t)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}u["default"]=StreamProvider},4844:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(7942);class SyncProvider{constructor(t,u){this._root=t;this._settings=u;this._reader=new m.default(this._root,this._settings)}read(){return this._reader.read()}}u["default"]=SyncProvider},997:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4434);const g=p(4227);const v=p(3451);const b=p(6628);const w=p(6914);class AsyncReader extends w.default{constructor(t,u){super(t,u);this._settings=u;this._scandir=g.scandir;this._emitter=new m.EventEmitter;this._queue=v(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,u){const p={directory:t,base:u};this._queue.push(p,(t=>{if(t!==null){this._handleError(t)}}))}_worker(t,u){this._scandir(t.directory,this._settings.fsScandirSettings,((p,m)=>{if(p!==null){u(p,undefined);return}for(const u of m){this._handleEntry(u,t.base)}u(null,undefined)}))}_handleError(t){if(this._isDestroyed||!b.isFatalError(this._settings,t)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",t)}_handleEntry(t,u){if(this._isDestroyed||this._isFatalError){return}const p=t.path;if(u!==undefined){t.path=b.joinPathSegments(u,t.name,this._settings.pathSegmentSeparator)}if(b.isAppliedFilter(this._settings.entryFilter,t)){this._emitEntry(t)}if(t.dirent.isDirectory()&&b.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(p,u===undefined?undefined:t.path)}}_emitEntry(t){this._emitter.emit("entry",t)}}u["default"]=AsyncReader},6628:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.joinPathSegments=u.replacePathSegmentSeparator=u.isAppliedFilter=u.isFatalError=void 0;function isFatalError(t,u){if(t.errorFilter===null){return true}return!t.errorFilter(u)}u.isFatalError=isFatalError;function isAppliedFilter(t,u){return t===null||t(u)}u.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(t,u){return t.split(/[/\\]/).join(u)}u.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(t,u,p){if(t===""){return u}if(t.endsWith(p)){return t+u}return t+p+u}u.joinPathSegments=joinPathSegments},6914:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6628);class Reader{constructor(t,u){this._root=t;this._settings=u;this._root=m.replacePathSegmentSeparator(t,u.pathSegmentSeparator)}}u["default"]=Reader},7942:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4227);const g=p(6628);const v=p(6914);class SyncReader extends v.default{constructor(){super(...arguments);this._scandir=m.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(t,u){this._queue.add({directory:t,base:u})}_handleQueue(){for(const t of this._queue.values()){this._handleDirectory(t.directory,t.base)}}_handleDirectory(t,u){try{const p=this._scandir(t,this._settings.fsScandirSettings);for(const t of p){this._handleEntry(t,u)}}catch(t){this._handleError(t)}}_handleError(t){if(!g.isFatalError(this._settings,t)){return}throw t}_handleEntry(t,u){const p=t.path;if(u!==undefined){t.path=g.joinPathSegments(u,t.name,this._settings.pathSegmentSeparator)}if(g.isAppliedFilter(this._settings.entryFilter,t)){this._pushToStorage(t)}if(t.dirent.isDirectory()&&g.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(p,u===undefined?undefined:t.path)}}_pushToStorage(t){this._storage.push(t)}}u["default"]=SyncReader},1305:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6928);const g=p(4227);class Settings{constructor(t={}){this._options=t;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,m.sep);this.fsScandirSettings=new g.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,u){return t!==null&&t!==void 0?t:u}}u["default"]=Settings},9888:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.formatNames=u.fastFormats=u.fullFormats=void 0;function fmtDef(t,u){return{validate:t,compare:u}}u.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(getTime(true),compareTime),"date-time":fmtDef(getDateTime(true),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:true,binary:true};u.fastFormats={...u.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};u.formatNames=Object.keys(u.fullFormats);function isLeapYear(t){return t%4===0&&(t%100!==0||t%400===0)}const p=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;const m=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(t){const u=p.exec(t);if(!u)return false;const g=+u[1];const v=+u[2];const b=+u[3];return v>=1&&v<=12&&b>=1&&b<=(v===2&&isLeapYear(g)?29:m[v])}function compareDate(t,u){if(!(t&&u))return undefined;if(t>u)return 1;if(t<u)return-1;return 0}const g=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(t){return function time(u){const p=g.exec(u);if(!p)return false;const m=+p[1];const v=+p[2];const b=+p[3];const w=p[4];const E=p[5]==="-"?-1:1;const S=+(p[6]||0);const $=+(p[7]||0);if(S>23||$>59||t&&!w)return false;if(m<=23&&v<=59&&b<60)return true;const P=v-$*E;const R=m-S*E-(P<0?1:0);return(R===23||R===-1)&&(P===59||P===-1)&&b<61}}function compareTime(t,u){if(!(t&&u))return undefined;const p=new Date("2020-01-01T"+t).valueOf();const m=new Date("2020-01-01T"+u).valueOf();if(!(p&&m))return undefined;return p-m}function compareIsoTime(t,u){if(!(t&&u))return undefined;const p=g.exec(t);const m=g.exec(u);if(!(p&&m))return undefined;t=p[1]+p[2]+p[3];u=m[1]+m[2]+m[3];if(t>u)return 1;if(t<u)return-1;return 0}const v=/t|\s/i;function getDateTime(t){const u=getTime(t);return function date_time(t){const p=t.split(v);return p.length===2&&date(p[0])&&u(p[1])}}function compareDateTime(t,u){if(!(t&&u))return undefined;const p=new Date(t).valueOf();const m=new Date(u).valueOf();if(!(p&&m))return undefined;return p-m}function compareIsoDateTime(t,u){if(!(t&&u))return undefined;const[p,m]=t.split(v);const[g,b]=u.split(v);const w=compareDate(p,g);if(w===undefined)return undefined;return w||compareTime(m,b)}const b=/\/|:/;const w=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function uri(t){return b.test(t)&&w.test(t)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function byte(t){E.lastIndex=0;return E.test(t)}const S=-(2**31);const $=2**31-1;function validateInt32(t){return Number.isInteger(t)&&t<=$&&t>=S}function validateInt64(t){return Number.isInteger(t)}function validateNumber(){return true}const P=/[^\\]\\Z/;function regex(t){if(P.test(t))return false;try{new RegExp(t);return true}catch(t){return false}}},6848:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9888);const g=p(5755);const v=p(4671);const b=new v.Name("fullFormats");const w=new v.Name("fastFormats");const formatsPlugin=(t,u={keywords:true})=>{if(Array.isArray(u)){addFormats(t,u,m.fullFormats,b);return t}const[p,v]=u.mode==="fast"?[m.fastFormats,w]:[m.fullFormats,b];const E=u.formats||m.formatNames;addFormats(t,E,p,v);if(u.keywords)(0,g.default)(t);return t};formatsPlugin.get=(t,u="full")=>{const p=u==="fast"?m.fastFormats:m.fullFormats;const g=p[t];if(!g)throw new Error(`Unknown format "${t}"`);return g};function addFormats(t,u,p,m){var g;var b;(g=(b=t.opts.code).formats)!==null&&g!==void 0?g:b.formats=(0,v._)`require("ajv-formats/dist/formats").${m}`;for(const m of u)t.addFormat(m,p[m])}t.exports=u=formatsPlugin;Object.defineProperty(u,"__esModule",{value:true});u["default"]=formatsPlugin},5755:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.formatLimitDefinition=void 0;const m=p(5984);const g=p(4671);const v=g.operators;const b={formatMaximum:{okStr:"<=",ok:v.LTE,fail:v.GT},formatMinimum:{okStr:">=",ok:v.GTE,fail:v.LT},formatExclusiveMaximum:{okStr:"<",ok:v.LT,fail:v.GTE},formatExclusiveMinimum:{okStr:">",ok:v.GT,fail:v.LTE}};const w={message:({keyword:t,schemaCode:u})=>(0,g.str)`should be ${b[t].okStr} ${u}`,params:({keyword:t,schemaCode:u})=>(0,g._)`{comparison: ${b[t].okStr}, limit: ${u}}`};u.formatLimitDefinition={keyword:Object.keys(b),type:"string",schemaType:"string",$data:true,error:w,code(t){const{gen:u,data:p,schemaCode:v,keyword:w,it:E}=t;const{opts:S,self:$}=E;if(!S.validateFormats)return;const P=new m.KeywordCxt(E,$.RULES.all.format.definition,"format");if(P.$data)validate$DataFormat();else validateFormat();function validate$DataFormat(){const p=u.scopeValue("formats",{ref:$.formats,code:S.code.formats});const m=u.const("fmt",(0,g._)`${p}[${P.schemaCode}]`);t.fail$data((0,g.or)((0,g._)`typeof ${m} != "object"`,(0,g._)`${m} instanceof RegExp`,(0,g._)`typeof ${m}.compare != "function"`,compareCode(m)))}function validateFormat(){const p=P.schema;const m=$.formats[p];if(!m||m===true)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function"){throw new Error(`"${w}": format "${p}" does not define "compare" function`)}const v=u.scopeValue("formats",{key:p,ref:m,code:S.code.formats?(0,g._)`${S.code.formats}${(0,g.getProperty)(p)}`:undefined});t.fail$data(compareCode(v))}function compareCode(t){return(0,g._)`${t}.compare(${p}, ${v}) ${b[w].fail} 0`}},dependencies:["format"]};const formatLimitPlugin=t=>{t.addKeyword(u.formatLimitDefinition);return t};u["default"]=formatLimitPlugin},939:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.MissingRefError=u.ValidationError=u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=u.Ajv2020=void 0;const m=p(6952);const g=p(4231);const v=p(9099);const b=p(4010);const w="https://json-schema.org/draft/2020-12/schema";class Ajv2020 extends m.default{constructor(t={}){super({...t,dynamicRef:true,next:true,unevaluated:true})}_addVocabularies(){super._addVocabularies();g.default.forEach((t=>this.addVocabulary(t)));if(this.opts.discriminator)this.addKeyword(v.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:t,meta:u}=this.opts;if(!u)return;b.default.call(this,t);this.refs["http://json-schema.org/schema"]=w}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(w)?w:undefined)}}u.Ajv2020=Ajv2020;t.exports=u=Ajv2020;t.exports.Ajv2020=Ajv2020;Object.defineProperty(u,"__esModule",{value:true});u["default"]=Ajv2020;var E=p(324);Object.defineProperty(u,"KeywordCxt",{enumerable:true,get:function(){return E.KeywordCxt}});var S=p(4671);Object.defineProperty(u,"_",{enumerable:true,get:function(){return S._}});Object.defineProperty(u,"str",{enumerable:true,get:function(){return S.str}});Object.defineProperty(u,"stringify",{enumerable:true,get:function(){return S.stringify}});Object.defineProperty(u,"nil",{enumerable:true,get:function(){return S.nil}});Object.defineProperty(u,"Name",{enumerable:true,get:function(){return S.Name}});Object.defineProperty(u,"CodeGen",{enumerable:true,get:function(){return S.CodeGen}});var $=p(4068);Object.defineProperty(u,"ValidationError",{enumerable:true,get:function(){return $.default}});var P=p(909);Object.defineProperty(u,"MissingRefError",{enumerable:true,get:function(){return P.default}})},5984:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.MissingRefError=u.ValidationError=u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=u.Ajv=void 0;const m=p(6952);const g=p(1982);const v=p(9099);const b=p(3928);const w=["/properties"];const E="http://json-schema.org/draft-07/schema";class Ajv extends m.default{_addVocabularies(){super._addVocabularies();g.default.forEach((t=>this.addVocabulary(t)));if(this.opts.discriminator)this.addKeyword(v.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();if(!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(b,w):b;this.addMetaSchema(t,E,false);this.refs["http://json-schema.org/schema"]=E}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(E)?E:undefined)}}u.Ajv=Ajv;t.exports=u=Ajv;t.exports.Ajv=Ajv;Object.defineProperty(u,"__esModule",{value:true});u["default"]=Ajv;var S=p(324);Object.defineProperty(u,"KeywordCxt",{enumerable:true,get:function(){return S.KeywordCxt}});var $=p(4671);Object.defineProperty(u,"_",{enumerable:true,get:function(){return $._}});Object.defineProperty(u,"str",{enumerable:true,get:function(){return $.str}});Object.defineProperty(u,"stringify",{enumerable:true,get:function(){return $.stringify}});Object.defineProperty(u,"nil",{enumerable:true,get:function(){return $.nil}});Object.defineProperty(u,"Name",{enumerable:true,get:function(){return $.Name}});Object.defineProperty(u,"CodeGen",{enumerable:true,get:function(){return $.CodeGen}});var P=p(4068);Object.defineProperty(u,"ValidationError",{enumerable:true,get:function(){return P.default}});var R=p(909);Object.defineProperty(u,"MissingRefError",{enumerable:true,get:function(){return R.default}})},5554:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});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;class _CodeOrName{}u._CodeOrName=_CodeOrName;u.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(t){super();if(!u.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return false}get names(){return{[this.str]:1}}}u.Name=Name;class _Code extends _CodeOrName{constructor(t){super();this._items=typeof t==="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return false;const t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce(((t,u)=>`${t}${u}`),"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce(((t,u)=>{if(u instanceof Name)t[u.str]=(t[u.str]||0)+1;return t}),{})}}u._Code=_Code;u.nil=new _Code("");function _(t,...u){const p=[t[0]];let m=0;while(m<u.length){addCodeArg(p,u[m]);p.push(t[++m])}return new _Code(p)}u._=_;const p=new _Code("+");function str(t,...u){const m=[safeStringify(t[0])];let g=0;while(g<u.length){m.push(p);addCodeArg(m,u[g]);m.push(p,safeStringify(t[++g]))}optimize(m);return new _Code(m)}u.str=str;function addCodeArg(t,u){if(u instanceof _Code)t.push(...u._items);else if(u instanceof Name)t.push(u);else t.push(interpolate(u))}u.addCodeArg=addCodeArg;function optimize(t){let u=1;while(u<t.length-1){if(t[u]===p){const p=mergeExprItems(t[u-1],t[u+1]);if(p!==undefined){t.splice(u-1,3,p);continue}t[u++]="+"}u++}}function mergeExprItems(t,u){if(u==='""')return t;if(t==='""')return u;if(typeof t=="string"){if(u instanceof Name||t[t.length-1]!=='"')return;if(typeof u!="string")return`${t.slice(0,-1)}${u}"`;if(u[0]==='"')return t.slice(0,-1)+u.slice(1);return}if(typeof u=="string"&&u[0]==='"'&&!(t instanceof Name))return`"${t}${u.slice(1)}`;return}function strConcat(t,u){return u.emptyStr()?t:t.emptyStr()?u:str`${t}${u}`}u.strConcat=strConcat;function interpolate(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:safeStringify(Array.isArray(t)?t.join(","):t)}function stringify(t){return new _Code(safeStringify(t))}u.stringify=stringify;function safeStringify(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}u.safeStringify=safeStringify;function getProperty(t){return typeof t=="string"&&u.IDENTIFIER.test(t)?new _Code(`.${t}`):_`[${t}]`}u.getProperty=getProperty;function getEsmExportName(t){if(typeof t=="string"&&u.IDENTIFIER.test(t)){return new _Code(`${t}`)}throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}u.getEsmExportName=getEsmExportName;function regexpCode(t){return new _Code(t.toString())}u.regexpCode=regexpCode},4671:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.or=u.and=u.not=u.CodeGen=u.operators=u.varKinds=u.ValueScopeName=u.ValueScope=u.Scope=u.Name=u.regexpCode=u.stringify=u.getProperty=u.nil=u.strConcat=u.str=u._=void 0;const m=p(5554);const g=p(183);var v=p(5554);Object.defineProperty(u,"_",{enumerable:true,get:function(){return v._}});Object.defineProperty(u,"str",{enumerable:true,get:function(){return v.str}});Object.defineProperty(u,"strConcat",{enumerable:true,get:function(){return v.strConcat}});Object.defineProperty(u,"nil",{enumerable:true,get:function(){return v.nil}});Object.defineProperty(u,"getProperty",{enumerable:true,get:function(){return v.getProperty}});Object.defineProperty(u,"stringify",{enumerable:true,get:function(){return v.stringify}});Object.defineProperty(u,"regexpCode",{enumerable:true,get:function(){return v.regexpCode}});Object.defineProperty(u,"Name",{enumerable:true,get:function(){return v.Name}});var b=p(183);Object.defineProperty(u,"Scope",{enumerable:true,get:function(){return b.Scope}});Object.defineProperty(u,"ValueScope",{enumerable:true,get:function(){return b.ValueScope}});Object.defineProperty(u,"ValueScopeName",{enumerable:true,get:function(){return b.ValueScopeName}});Object.defineProperty(u,"varKinds",{enumerable:true,get:function(){return b.varKinds}});u.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("+")};class Node{optimizeNodes(){return this}optimizeNames(t,u){return this}}class Def extends Node{constructor(t,u,p){super();this.varKind=t;this.name=u;this.rhs=p}render({es5:t,_n:u}){const p=t?g.varKinds.var:this.varKind;const m=this.rhs===undefined?"":` = ${this.rhs}`;return`${p} ${this.name}${m};`+u}optimizeNames(t,u){if(!t[this.name.str])return;if(this.rhs)this.rhs=optimizeExpr(this.rhs,t,u);return this}get names(){return this.rhs instanceof m._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(t,u,p){super();this.lhs=t;this.rhs=u;this.sideEffects=p}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,u){if(this.lhs instanceof m.Name&&!t[this.lhs.str]&&!this.sideEffects)return;this.rhs=optimizeExpr(this.rhs,t,u);return this}get names(){const t=this.lhs instanceof m.Name?{}:{...this.lhs.names};return addExprNames(t,this.rhs)}}class AssignOp extends Assign{constructor(t,u,p,m){super(t,p,m);this.op=u}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class Label extends Node{constructor(t){super();this.label=t;this.names={}}render({_n:t}){return`${this.label}:`+t}}class Break extends Node{constructor(t){super();this.label=t;this.names={}}render({_n:t}){const u=this.label?` ${this.label}`:"";return`break${u};`+t}}class Throw extends Node{constructor(t){super();this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class AnyCode extends Node{constructor(t){super();this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:undefined}optimizeNames(t,u){this.code=optimizeExpr(this.code,t,u);return this}get names(){return this.code instanceof m._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(t=[]){super();this.nodes=t}render(t){return this.nodes.reduce(((u,p)=>u+p.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let u=t.length;while(u--){const p=t[u].optimizeNodes();if(Array.isArray(p))t.splice(u,1,...p);else if(p)t[u]=p;else t.splice(u,1)}return t.length>0?this:undefined}optimizeNames(t,u){const{nodes:p}=this;let m=p.length;while(m--){const g=p[m];if(g.optimizeNames(t,u))continue;subtractNames(t,g.names);p.splice(m,1)}return p.length>0?this:undefined}get names(){return this.nodes.reduce(((t,u)=>addNames(t,u.names)),{})}}class BlockNode extends ParentNode{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(t,u){super(u);this.condition=t}render(t){let u=`if(${this.condition})`+super.render(t);if(this.else)u+="else "+this.else.render(t);return u}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(t===true)return this.nodes;let u=this.else;if(u){const t=u.optimizeNodes();u=this.else=Array.isArray(t)?new Else(t):t}if(u){if(t===false)return u instanceof If?u:u.nodes;if(this.nodes.length)return this;return new If(not(t),u instanceof If?[u]:u.nodes)}if(t===false||!this.nodes.length)return undefined;return this}optimizeNames(t,u){var p;this.else=(p=this.else)===null||p===void 0?void 0:p.optimizeNames(t,u);if(!(super.optimizeNames(t,u)||this.else))return;this.condition=optimizeExpr(this.condition,t,u);return this}get names(){const t=super.names;addExprNames(t,this.condition);if(this.else)addNames(t,this.else.names);return t}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(t){super();this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,u){if(!super.optimizeNames(t,u))return;this.iteration=optimizeExpr(this.iteration,t,u);return this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(t,u,p,m){super();this.varKind=t;this.name=u;this.from=p;this.to=m}render(t){const u=t.es5?g.varKinds.var:this.varKind;const{name:p,from:m,to:v}=this;return`for(${u} ${p}=${m}; ${p}<${v}; ${p}++)`+super.render(t)}get names(){const t=addExprNames(super.names,this.from);return addExprNames(t,this.to)}}class ForIter extends For{constructor(t,u,p,m){super();this.loop=t;this.varKind=u;this.name=p;this.iterable=m}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,u){if(!super.optimizeNames(t,u))return;this.iterable=optimizeExpr(this.iterable,t,u);return this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(t,u,p){super();this.name=t;this.args=u;this.async=p}render(t){const u=this.async?"async ":"";return`${u}function ${this.name}(${this.args})`+super.render(t)}}Func.kind="func";class Return extends ParentNode{render(t){return"return "+super.render(t)}}Return.kind="return";class Try extends BlockNode{render(t){let u="try"+super.render(t);if(this.catch)u+=this.catch.render(t);if(this.finally)u+=this.finally.render(t);return u}optimizeNodes(){var t,u;super.optimizeNodes();(t=this.catch)===null||t===void 0?void 0:t.optimizeNodes();(u=this.finally)===null||u===void 0?void 0:u.optimizeNodes();return this}optimizeNames(t,u){var p,m;super.optimizeNames(t,u);(p=this.catch)===null||p===void 0?void 0:p.optimizeNames(t,u);(m=this.finally)===null||m===void 0?void 0:m.optimizeNames(t,u);return this}get names(){const t=super.names;if(this.catch)addNames(t,this.catch.names);if(this.finally)addNames(t,this.finally.names);return t}}class Catch extends BlockNode{constructor(t){super();this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}Catch.kind="catch";class Finally extends BlockNode{render(t){return"finally"+super.render(t)}}Finally.kind="finally";class CodeGen{constructor(t,u={}){this._values={};this._blockStarts=[];this._constants={};this.opts={...u,_n:u.lines?"\n":""};this._extScope=t;this._scope=new g.Scope({parent:t});this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,u){const p=this._extScope.value(t,u);const m=this._values[p.prefix]||(this._values[p.prefix]=new Set);m.add(p);return p}getScopeValue(t,u){return this._extScope.getValue(t,u)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,u,p,m){const g=this._scope.toName(u);if(p!==undefined&&m)this._constants[g.str]=p;this._leafNode(new Def(t,g,p));return g}const(t,u,p){return this._def(g.varKinds.const,t,u,p)}let(t,u,p){return this._def(g.varKinds.let,t,u,p)}var(t,u,p){return this._def(g.varKinds.var,t,u,p)}assign(t,u,p){return this._leafNode(new Assign(t,u,p))}add(t,p){return this._leafNode(new AssignOp(t,u.operators.ADD,p))}code(t){if(typeof t=="function")t();else if(t!==m.nil)this._leafNode(new AnyCode(t));return this}object(...t){const u=["{"];for(const[p,g]of t){if(u.length>1)u.push(",");u.push(p);if(p!==g||this.opts.es5){u.push(":");(0,m.addCodeArg)(u,g)}}u.push("}");return new m._Code(u)}if(t,u,p){this._blockNode(new If(t));if(u&&p){this.code(u).else().code(p).endIf()}else if(u){this.code(u).endIf()}else if(p){throw new Error('CodeGen: "else" body without "then" body')}return this}elseIf(t){return this._elseNode(new If(t))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(t,u){this._blockNode(t);if(u)this.code(u).endFor();return this}for(t,u){return this._for(new ForLoop(t),u)}forRange(t,u,p,m,v=(this.opts.es5?g.varKinds.var:g.varKinds.let)){const b=this._scope.toName(t);return this._for(new ForRange(v,b,u,p),(()=>m(b)))}forOf(t,u,p,v=g.varKinds.const){const b=this._scope.toName(t);if(this.opts.es5){const t=u instanceof m.Name?u:this.var("_arr",u);return this.forRange("_i",0,(0,m._)`${t}.length`,(u=>{this.var(b,(0,m._)`${t}[${u}]`);p(b)}))}return this._for(new ForIter("of",v,b,u),(()=>p(b)))}forIn(t,u,p,v=(this.opts.es5?g.varKinds.var:g.varKinds.const)){if(this.opts.ownProperties){return this.forOf(t,(0,m._)`Object.keys(${u})`,p)}const b=this._scope.toName(t);return this._for(new ForIter("in",v,b,u),(()=>p(b)))}endFor(){return this._endBlockNode(For)}label(t){return this._leafNode(new Label(t))}break(t){return this._leafNode(new Break(t))}return(t){const u=new Return;this._blockNode(u);this.code(t);if(u.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(t,u,p){if(!u&&!p)throw new Error('CodeGen: "try" without "catch" and "finally"');const m=new Try;this._blockNode(m);this.code(t);if(u){const t=this.name("e");this._currNode=m.catch=new Catch(t);u(t)}if(p){this._currNode=m.finally=new Finally;this.code(p)}return this._endBlockNode(Catch,Finally)}throw(t){return this._leafNode(new Throw(t))}block(t,u){this._blockStarts.push(this._nodes.length);if(t)this.code(t).endBlock(u);return this}endBlock(t){const u=this._blockStarts.pop();if(u===undefined)throw new Error("CodeGen: not in self-balancing block");const p=this._nodes.length-u;if(p<0||t!==undefined&&p!==t){throw new Error(`CodeGen: wrong number of nodes: ${p} vs ${t} expected`)}this._nodes.length=u;return this}func(t,u=m.nil,p,g){this._blockNode(new Func(t,u,p));if(g)this.code(g).endFunc();return this}endFunc(){return this._endBlockNode(Func)}optimize(t=1){while(t-- >0){this._root.optimizeNodes();this._root.optimizeNames(this._root.names,this._constants)}}_leafNode(t){this._currNode.nodes.push(t);return this}_blockNode(t){this._currNode.nodes.push(t);this._nodes.push(t)}_endBlockNode(t,u){const p=this._currNode;if(p instanceof t||u&&p instanceof u){this._nodes.pop();return this}throw new Error(`CodeGen: not in block "${u?`${t.kind}/${u.kind}`:t.kind}"`)}_elseNode(t){const u=this._currNode;if(!(u instanceof If)){throw new Error('CodeGen: "else" without "if"')}this._currNode=u.else=t;return this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const u=this._nodes;u[u.length-1]=t}}u.CodeGen=CodeGen;function addNames(t,u){for(const p in u)t[p]=(t[p]||0)+(u[p]||0);return t}function addExprNames(t,u){return u instanceof m._CodeOrName?addNames(t,u.names):t}function optimizeExpr(t,u,p){if(t instanceof m.Name)return replaceName(t);if(!canOptimize(t))return t;return new m._Code(t._items.reduce(((t,u)=>{if(u instanceof m.Name)u=replaceName(u);if(u instanceof m._Code)t.push(...u._items);else t.push(u);return t}),[]));function replaceName(t){const m=p[t.str];if(m===undefined||u[t.str]!==1)return t;delete u[t.str];return m}function canOptimize(t){return t instanceof m._Code&&t._items.some((t=>t instanceof m.Name&&u[t.str]===1&&p[t.str]!==undefined))}}function subtractNames(t,u){for(const p in u)t[p]=(t[p]||0)-(u[p]||0)}function not(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,m._)`!${par(t)}`}u.not=not;const w=mappend(u.operators.AND);function and(...t){return t.reduce(w)}u.and=and;const E=mappend(u.operators.OR);function or(...t){return t.reduce(E)}u.or=or;function mappend(t){return(u,p)=>u===m.nil?p:p===m.nil?u:(0,m._)`${par(u)} ${t} ${par(p)}`}function par(t){return t instanceof m.Name?t:(0,m._)`(${t})`}},183:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.ValueScope=u.ValueScopeName=u.Scope=u.varKinds=u.UsedValueState=void 0;const m=p(5554);class ValueError extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`);this.value=t.value}}var g;(function(t){t[t["Started"]=0]="Started";t[t["Completed"]=1]="Completed"})(g||(u.UsedValueState=g={}));u.varKinds={const:new m.Name("const"),let:new m.Name("let"),var:new m.Name("var")};class Scope{constructor({prefixes:t,parent:u}={}){this._names={};this._prefixes=t;this._parent=u}toName(t){return t instanceof m.Name?t:this.name(t)}name(t){return new m.Name(this._newName(t))}_newName(t){const u=this._names[t]||this._nameGroup(t);return`${t}${u.index++}`}_nameGroup(t){var u,p;if(((p=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||p===void 0?void 0:p.has(t))||this._prefixes&&!this._prefixes.has(t)){throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`)}return this._names[t]={prefix:t,index:0}}}u.Scope=Scope;class ValueScopeName extends m.Name{constructor(t,u){super(u);this.prefix=t}setValue(t,{property:u,itemIndex:p}){this.value=t;this.scopePath=(0,m._)`.${new m.Name(u)}[${p}]`}}u.ValueScopeName=ValueScopeName;const v=(0,m._)`\n`;class ValueScope extends Scope{constructor(t){super(t);this._values={};this._scope=t.scope;this.opts={...t,_n:t.lines?v:m.nil}}get(){return this._scope}name(t){return new ValueScopeName(t,this._newName(t))}value(t,u){var p;if(u.ref===undefined)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(t);const{prefix:g}=m;const v=(p=u.key)!==null&&p!==void 0?p:u.ref;let b=this._values[g];if(b){const t=b.get(v);if(t)return t}else{b=this._values[g]=new Map}b.set(v,m);const w=this._scope[g]||(this._scope[g]=[]);const E=w.length;w[E]=u.ref;m.setValue(u,{property:g,itemIndex:E});return m}getValue(t,u){const p=this._values[t];if(!p)return;return p.get(u)}scopeRefs(t,u=this._values){return this._reduceValues(u,(u=>{if(u.scopePath===undefined)throw new Error(`CodeGen: name "${u}" has no value`);return(0,m._)`${t}${u.scopePath}`}))}scopeCode(t=this._values,u,p){return this._reduceValues(t,(t=>{if(t.value===undefined)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),u,p)}_reduceValues(t,p,v={},b){let w=m.nil;for(const E in t){const S=t[E];if(!S)continue;const $=v[E]=v[E]||new Map;S.forEach((t=>{if($.has(t))return;$.set(t,g.Started);let v=p(t);if(v){const p=this.opts.es5?u.varKinds.var:u.varKinds.const;w=(0,m._)`${w}${p} ${t} = ${v};${this.opts._n}`}else if(v=b===null||b===void 0?void 0:b(t)){w=(0,m._)`${w}${v}${this.opts._n}`}else{throw new ValueError(t)}$.set(t,g.Completed)}))}return w}}u.ValueScope=ValueScope},7446:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.extendErrors=u.resetErrorsCount=u.reportExtraError=u.reportError=u.keyword$DataError=u.keywordError=void 0;const m=p(4671);const g=p(5049);const v=p(1529);u.keywordError={message:({keyword:t})=>(0,m.str)`must pass "${t}" keyword validation`};u.keyword$DataError={message:({keyword:t,schemaType:u})=>u?(0,m.str)`"${t}" keyword must be ${u} ($data)`:(0,m.str)`"${t}" keyword is invalid ($data)`};function reportError(t,p=u.keywordError,g,v){const{it:b}=t;const{gen:w,compositeRule:E,allErrors:S}=b;const $=errorObjectCode(t,p,g);if(v!==null&&v!==void 0?v:E||S){addError(w,$)}else{returnErrors(b,(0,m._)`[${$}]`)}}u.reportError=reportError;function reportExtraError(t,p=u.keywordError,m){const{it:g}=t;const{gen:b,compositeRule:w,allErrors:E}=g;const S=errorObjectCode(t,p,m);addError(b,S);if(!(w||E)){returnErrors(g,v.default.vErrors)}}u.reportExtraError=reportExtraError;function resetErrorsCount(t,u){t.assign(v.default.errors,u);t.if((0,m._)`${v.default.vErrors} !== null`,(()=>t.if(u,(()=>t.assign((0,m._)`${v.default.vErrors}.length`,u)),(()=>t.assign(v.default.vErrors,null)))))}u.resetErrorsCount=resetErrorsCount;function extendErrors({gen:t,keyword:u,schemaValue:p,data:g,errsCount:b,it:w}){if(b===undefined)throw new Error("ajv implementation error");const E=t.name("err");t.forRange("i",b,v.default.errors,(b=>{t.const(E,(0,m._)`${v.default.vErrors}[${b}]`);t.if((0,m._)`${E}.instancePath === undefined`,(()=>t.assign((0,m._)`${E}.instancePath`,(0,m.strConcat)(v.default.instancePath,w.errorPath))));t.assign((0,m._)`${E}.schemaPath`,(0,m.str)`${w.errSchemaPath}/${u}`);if(w.opts.verbose){t.assign((0,m._)`${E}.schema`,p);t.assign((0,m._)`${E}.data`,g)}}))}u.extendErrors=extendErrors;function addError(t,u){const p=t.const("err",u);t.if((0,m._)`${v.default.vErrors} === null`,(()=>t.assign(v.default.vErrors,(0,m._)`[${p}]`)),(0,m._)`${v.default.vErrors}.push(${p})`);t.code((0,m._)`${v.default.errors}++`)}function returnErrors(t,u){const{gen:p,validateName:g,schemaEnv:v}=t;if(v.$async){p.throw((0,m._)`new ${t.ValidationError}(${u})`)}else{p.assign((0,m._)`${g}.errors`,u);p.return(false)}}const b={keyword:new m.Name("keyword"),schemaPath:new m.Name("schemaPath"),params:new m.Name("params"),propertyName:new m.Name("propertyName"),message:new m.Name("message"),schema:new m.Name("schema"),parentSchema:new m.Name("parentSchema")};function errorObjectCode(t,u,p){const{createErrors:g}=t.it;if(g===false)return(0,m._)`{}`;return errorObject(t,u,p)}function errorObject(t,u,p={}){const{gen:m,it:g}=t;const v=[errorInstancePath(g,p),errorSchemaPath(t,p)];extraErrorProps(t,u,v);return m.object(...v)}function errorInstancePath({errorPath:t},{instancePath:u}){const p=u?(0,m.str)`${t}${(0,g.getErrorPath)(u,g.Type.Str)}`:t;return[v.default.instancePath,(0,m.strConcat)(v.default.instancePath,p)]}function errorSchemaPath({keyword:t,it:{errSchemaPath:u}},{schemaPath:p,parentSchema:v}){let w=v?u:(0,m.str)`${u}/${t}`;if(p){w=(0,m.str)`${w}${(0,g.getErrorPath)(p,g.Type.Str)}`}return[b.schemaPath,w]}function extraErrorProps(t,{params:u,message:p},g){const{keyword:w,data:E,schemaValue:S,it:$}=t;const{opts:P,propertyName:R,topSchemaRef:x,schemaPath:O}=$;g.push([b.keyword,w],[b.params,typeof u=="function"?u(t):u||(0,m._)`{}`]);if(P.messages){g.push([b.message,typeof p=="function"?p(t):p])}if(P.verbose){g.push([b.schema,S],[b.parentSchema,(0,m._)`${x}${O}`],[v.default.data,E])}if(R)g.push([b.propertyName,R])}},4033:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.resolveSchema=u.getCompilingSchema=u.resolveRef=u.compileSchema=u.SchemaEnv=void 0;const m=p(4671);const g=p(4068);const v=p(1529);const b=p(9749);const w=p(5049);const E=p(324);class SchemaEnv{constructor(t){var u;this.refs={};this.dynamicAnchors={};let p;if(typeof t.schema=="object")p=t.schema;this.schema=t.schema;this.schemaId=t.schemaId;this.root=t.root||this;this.baseId=(u=t.baseId)!==null&&u!==void 0?u:(0,b.normalizeId)(p===null||p===void 0?void 0:p[t.schemaId||"$id"]);this.schemaPath=t.schemaPath;this.localRefs=t.localRefs;this.meta=t.meta;this.$async=p===null||p===void 0?void 0:p.$async;this.refs={}}}u.SchemaEnv=SchemaEnv;function compileSchema(t){const u=getCompilingSchema.call(this,t);if(u)return u;const p=(0,b.getFullPath)(this.opts.uriResolver,t.root.baseId);const{es5:w,lines:S}=this.opts.code;const{ownProperties:$}=this.opts;const P=new m.CodeGen(this.scope,{es5:w,lines:S,ownProperties:$});let R;if(t.$async){R=P.scopeValue("Error",{ref:g.default,code:(0,m._)`require("ajv/dist/runtime/validation_error").default`})}const x=P.scopeName("validate");t.validateName=x;const O={gen:P,allErrors:this.opts.allErrors,data:v.default.data,parentData:v.default.parentData,parentDataProperty:v.default.parentDataProperty,dataNames:[v.default.data],dataPathArr:[m.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:P.scopeValue("schema",this.opts.code.source===true?{ref:t.schema,code:(0,m.stringify)(t.schema)}:{ref:t.schema}),validateName:x,ValidationError:R,schema:t.schema,schemaEnv:t,rootId:p,baseId:t.baseId||p,schemaPath:m.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,m._)`""`,opts:this.opts,self:this};let A;try{this._compilations.add(t);(0,E.validateFunctionCode)(O);P.optimize(this.opts.code.optimize);const u=P.toString();A=`${P.scopeRefs(v.default.scope)}return ${u}`;if(this.opts.code.process)A=this.opts.code.process(A,t);const p=new Function(`${v.default.self}`,`${v.default.scope}`,A);const g=p(this,this.scope.get());this.scope.value(x,{ref:g});g.errors=null;g.schema=t.schema;g.schemaEnv=t;if(t.$async)g.$async=true;if(this.opts.code.source===true){g.source={validateName:x,validateCode:u,scopeValues:P._values}}if(this.opts.unevaluated){const{props:t,items:u}=O;g.evaluated={props:t instanceof m.Name?undefined:t,items:u instanceof m.Name?undefined:u,dynamicProps:t instanceof m.Name,dynamicItems:u instanceof m.Name};if(g.source)g.source.evaluated=(0,m.stringify)(g.evaluated)}t.validate=g;return t}catch(u){delete t.validate;delete t.validateName;if(A)this.logger.error("Error compiling schema, function code:",A);throw u}finally{this._compilations.delete(t)}}u.compileSchema=compileSchema;function resolveRef(t,u,p){var m;p=(0,b.resolveUrl)(this.opts.uriResolver,u,p);const g=t.refs[p];if(g)return g;let v=resolve.call(this,t,p);if(v===undefined){const g=(m=t.localRefs)===null||m===void 0?void 0:m[p];const{schemaId:b}=this.opts;if(g)v=new SchemaEnv({schema:g,schemaId:b,root:t,baseId:u})}if(v===undefined)return;return t.refs[p]=inlineOrCompile.call(this,v)}u.resolveRef=resolveRef;function inlineOrCompile(t){if((0,b.inlineRef)(t.schema,this.opts.inlineRefs))return t.schema;return t.validate?t:compileSchema.call(this,t)}function getCompilingSchema(t){for(const u of this._compilations){if(sameSchemaEnv(u,t))return u}}u.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(t,u){return t.schema===u.schema&&t.root===u.root&&t.baseId===u.baseId}function resolve(t,u){let p;while(typeof(p=this.refs[u])=="string")u=p;return p||this.schemas[u]||resolveSchema.call(this,t,u)}function resolveSchema(t,u){const p=this.opts.uriResolver.parse(u);const m=(0,b._getFullPath)(this.opts.uriResolver,p);let g=(0,b.getFullPath)(this.opts.uriResolver,t.baseId,undefined);if(Object.keys(t.schema).length>0&&m===g){return getJsonPointer.call(this,p,t)}const v=(0,b.normalizeId)(m);const w=this.refs[v]||this.schemas[v];if(typeof w=="string"){const u=resolveSchema.call(this,t,w);if(typeof(u===null||u===void 0?void 0:u.schema)!=="object")return;return getJsonPointer.call(this,p,u)}if(typeof(w===null||w===void 0?void 0:w.schema)!=="object")return;if(!w.validate)compileSchema.call(this,w);if(v===(0,b.normalizeId)(u)){const{schema:u}=w;const{schemaId:p}=this.opts;const m=u[p];if(m)g=(0,b.resolveUrl)(this.opts.uriResolver,g,m);return new SchemaEnv({schema:u,schemaId:p,root:t,baseId:g})}return getJsonPointer.call(this,p,w)}u.resolveSchema=resolveSchema;const S=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(t,{baseId:u,schema:p,root:m}){var g;if(((g=t.fragment)===null||g===void 0?void 0:g[0])!=="/")return;for(const m of t.fragment.slice(1).split("/")){if(typeof p==="boolean")return;const t=p[(0,w.unescapeFragment)(m)];if(t===undefined)return;p=t;const g=typeof p==="object"&&p[this.opts.schemaId];if(!S.has(m)&&g){u=(0,b.resolveUrl)(this.opts.uriResolver,u,g)}}let v;if(typeof p!="boolean"&&p.$ref&&!(0,w.schemaHasRulesButRef)(p,this.RULES)){const t=(0,b.resolveUrl)(this.opts.uriResolver,u,p.$ref);v=resolveSchema.call(this,m,t)}const{schemaId:E}=this.opts;v=v||new SchemaEnv({schema:p,schemaId:E,root:m,baseId:u});if(v.schema!==v.root.schema)return v;return undefined}},1529:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g={data:new m.Name("data"),valCxt:new m.Name("valCxt"),instancePath:new m.Name("instancePath"),parentData:new m.Name("parentData"),parentDataProperty:new m.Name("parentDataProperty"),rootData:new m.Name("rootData"),dynamicAnchors:new m.Name("dynamicAnchors"),vErrors:new m.Name("vErrors"),errors:new m.Name("errors"),this:new m.Name("this"),self:new m.Name("self"),scope:new m.Name("scope"),json:new m.Name("json"),jsonPos:new m.Name("jsonPos"),jsonLen:new m.Name("jsonLen"),jsonPart:new m.Name("jsonPart")};u["default"]=g},909:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9749);class MissingRefError extends Error{constructor(t,u,p,g){super(g||`can't resolve reference ${p} from id ${u}`);this.missingRef=(0,m.resolveUrl)(t,u,p);this.missingSchema=(0,m.normalizeId)((0,m.getFullPath)(t,this.missingRef))}}u["default"]=MissingRefError},9749:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.getSchemaRefs=u.resolveUrl=u.normalizeId=u._getFullPath=u.getFullPath=u.inlineRef=void 0;const m=p(5049);const g=p(7407);const v=p(7564);const b=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(t,u=true){if(typeof t=="boolean")return true;if(u===true)return!hasRef(t);if(!u)return false;return countKeys(t)<=u}u.inlineRef=inlineRef;const w=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(t){for(const u in t){if(w.has(u))return true;const p=t[u];if(Array.isArray(p)&&p.some(hasRef))return true;if(typeof p=="object"&&hasRef(p))return true}return false}function countKeys(t){let u=0;for(const p in t){if(p==="$ref")return Infinity;u++;if(b.has(p))continue;if(typeof t[p]=="object"){(0,m.eachItem)(t[p],(t=>u+=countKeys(t)))}if(u===Infinity)return Infinity}return u}function getFullPath(t,u="",p){if(p!==false)u=normalizeId(u);const m=t.parse(u);return _getFullPath(t,m)}u.getFullPath=getFullPath;function _getFullPath(t,u){const p=t.serialize(u);return p.split("#")[0]+"#"}u._getFullPath=_getFullPath;const E=/#\/?$/;function normalizeId(t){return t?t.replace(E,""):""}u.normalizeId=normalizeId;function resolveUrl(t,u,p){p=normalizeId(p);return t.resolve(u,p)}u.resolveUrl=resolveUrl;const S=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(t,u){if(typeof t=="boolean")return{};const{schemaId:p,uriResolver:m}=this.opts;const b=normalizeId(t[p]||u);const w={"":b};const E=getFullPath(m,b,false);const $={};const P=new Set;v(t,{allKeys:true},((t,u,m,g)=>{if(g===undefined)return;const v=E+u;let b=w[g];if(typeof t[p]=="string")b=addRef.call(this,t[p]);addAnchor.call(this,t.$anchor);addAnchor.call(this,t.$dynamicAnchor);w[u]=b;function addRef(u){const p=this.opts.uriResolver.resolve;u=normalizeId(b?p(b,u):u);if(P.has(u))throw ambiguos(u);P.add(u);let m=this.refs[u];if(typeof m=="string")m=this.refs[m];if(typeof m=="object"){checkAmbiguosRef(t,m.schema,u)}else if(u!==normalizeId(v)){if(u[0]==="#"){checkAmbiguosRef(t,$[u],u);$[u]=t}else{this.refs[u]=v}}return u}function addAnchor(t){if(typeof t=="string"){if(!S.test(t))throw new Error(`invalid anchor "${t}"`);addRef.call(this,`#${t}`)}}}));return $;function checkAmbiguosRef(t,u,p){if(u!==undefined&&!g(t,u))throw ambiguos(p)}function ambiguos(t){return new Error(`reference "${t}" resolves to more than one schema`)}}u.getSchemaRefs=getSchemaRefs},2166:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.getRules=u.isJSONType=void 0;const p=["string","number","integer","boolean","null","object","array"];const m=new Set(p);function isJSONType(t){return typeof t=="string"&&m.has(t)}u.isJSONType=isJSONType;function getRules(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:true,boolean:true,null:true},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}u.getRules=getRules},5049:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.checkStrictMode=u.getErrorPath=u.Type=u.useFunc=u.setEvaluated=u.evaluatedPropsToName=u.mergeEvaluated=u.eachItem=u.unescapeJsonPointer=u.escapeJsonPointer=u.escapeFragment=u.unescapeFragment=u.schemaRefOrVal=u.schemaHasRulesButRef=u.schemaHasRules=u.checkUnknownRules=u.alwaysValidSchema=u.toHash=void 0;const m=p(4671);const g=p(5554);function toHash(t){const u={};for(const p of t)u[p]=true;return u}u.toHash=toHash;function alwaysValidSchema(t,u){if(typeof u=="boolean")return u;if(Object.keys(u).length===0)return true;checkUnknownRules(t,u);return!schemaHasRules(u,t.self.RULES.all)}u.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(t,u=t.schema){const{opts:p,self:m}=t;if(!p.strictSchema)return;if(typeof u==="boolean")return;const g=m.RULES.keywords;for(const p in u){if(!g[p])checkStrictMode(t,`unknown keyword: "${p}"`)}}u.checkUnknownRules=checkUnknownRules;function schemaHasRules(t,u){if(typeof t=="boolean")return!t;for(const p in t)if(u[p])return true;return false}u.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(t,u){if(typeof t=="boolean")return!t;for(const p in t)if(p!=="$ref"&&u.all[p])return true;return false}u.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef:t,schemaPath:u},p,g,v){if(!v){if(typeof p=="number"||typeof p=="boolean")return p;if(typeof p=="string")return(0,m._)`${p}`}return(0,m._)`${t}${u}${(0,m.getProperty)(g)}`}u.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(t){return unescapeJsonPointer(decodeURIComponent(t))}u.unescapeFragment=unescapeFragment;function escapeFragment(t){return encodeURIComponent(escapeJsonPointer(t))}u.escapeFragment=escapeFragment;function escapeJsonPointer(t){if(typeof t=="number")return`${t}`;return t.replace(/~/g,"~0").replace(/\//g,"~1")}u.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}u.unescapeJsonPointer=unescapeJsonPointer;function eachItem(t,u){if(Array.isArray(t)){for(const p of t)u(p)}else{u(t)}}u.eachItem=eachItem;function makeMergeEvaluated({mergeNames:t,mergeToName:u,mergeValues:p,resultToName:g}){return(v,b,w,E)=>{const S=w===undefined?b:w instanceof m.Name?(b instanceof m.Name?t(v,b,w):u(v,b,w),w):b instanceof m.Name?(u(v,w,b),b):p(b,w);return E===m.Name&&!(S instanceof m.Name)?g(v,S):S}}u.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(t,u,p)=>t.if((0,m._)`${p} !== true && ${u} !== undefined`,(()=>{t.if((0,m._)`${u} === true`,(()=>t.assign(p,true)),(()=>t.assign(p,(0,m._)`${p} || {}`).code((0,m._)`Object.assign(${p}, ${u})`)))})),mergeToName:(t,u,p)=>t.if((0,m._)`${p} !== true`,(()=>{if(u===true){t.assign(p,true)}else{t.assign(p,(0,m._)`${p} || {}`);setEvaluated(t,p,u)}})),mergeValues:(t,u)=>t===true?true:{...t,...u},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(t,u,p)=>t.if((0,m._)`${p} !== true && ${u} !== undefined`,(()=>t.assign(p,(0,m._)`${u} === true ? true : ${p} > ${u} ? ${p} : ${u}`))),mergeToName:(t,u,p)=>t.if((0,m._)`${p} !== true`,(()=>t.assign(p,u===true?true:(0,m._)`${p} > ${u} ? ${p} : ${u}`))),mergeValues:(t,u)=>t===true?true:Math.max(t,u),resultToName:(t,u)=>t.var("items",u)})};function evaluatedPropsToName(t,u){if(u===true)return t.var("props",true);const p=t.var("props",(0,m._)`{}`);if(u!==undefined)setEvaluated(t,p,u);return p}u.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(t,u,p){Object.keys(p).forEach((p=>t.assign((0,m._)`${u}${(0,m.getProperty)(p)}`,true)))}u.setEvaluated=setEvaluated;const v={};function useFunc(t,u){return t.scopeValue("func",{ref:u,code:v[u.code]||(v[u.code]=new g._Code(u.code))})}u.useFunc=useFunc;var b;(function(t){t[t["Num"]=0]="Num";t[t["Str"]=1]="Str"})(b||(u.Type=b={}));function getErrorPath(t,u,p){if(t instanceof m.Name){const g=u===b.Num;return p?g?(0,m._)`"[" + ${t} + "]"`:(0,m._)`"['" + ${t} + "']"`:g?(0,m._)`"/" + ${t}`:(0,m._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return p?(0,m.getProperty)(t).toString():"/"+escapeJsonPointer(t)}u.getErrorPath=getErrorPath;function checkStrictMode(t,u,p=t.opts.strictSchema){if(!p)return;u=`strict mode: ${u}`;if(p===true)throw new Error(u);t.self.logger.warn(u)}u.checkStrictMode=checkStrictMode},7837:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.shouldUseRule=u.shouldUseGroup=u.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema:t,self:u},p){const m=u.RULES.types[p];return m&&m!==true&&shouldUseGroup(t,m)}u.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(t,u){return u.rules.some((u=>shouldUseRule(t,u)))}u.shouldUseGroup=shouldUseGroup;function shouldUseRule(t,u){var p;return t[u.keyword]!==undefined||((p=u.definition.implements)===null||p===void 0?void 0:p.some((u=>t[u]!==undefined)))}u.shouldUseRule=shouldUseRule},5885:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.boolOrEmptySchema=u.topBoolOrEmptySchema=void 0;const m=p(7446);const g=p(4671);const v=p(1529);const b={message:"boolean schema is false"};function topBoolOrEmptySchema(t){const{gen:u,schema:p,validateName:m}=t;if(p===false){falseSchemaError(t,false)}else if(typeof p=="object"&&p.$async===true){u.return(v.default.data)}else{u.assign((0,g._)`${m}.errors`,null);u.return(true)}}u.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(t,u){const{gen:p,schema:m}=t;if(m===false){p.var(u,false);falseSchemaError(t)}else{p.var(u,true)}}u.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(t,u){const{gen:p,data:g}=t;const v={gen:p,keyword:"false schema",data:g,schema:false,schemaCode:false,schemaValue:false,params:{},it:t};(0,m.reportError)(v,b,undefined,u)}},3330:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.reportTypeError=u.checkDataTypes=u.checkDataType=u.coerceAndCheckDataType=u.getJSONTypes=u.getSchemaTypes=u.DataType=void 0;const m=p(2166);const g=p(7837);const v=p(7446);const b=p(4671);const w=p(5049);var E;(function(t){t[t["Correct"]=0]="Correct";t[t["Wrong"]=1]="Wrong"})(E||(u.DataType=E={}));function getSchemaTypes(t){const u=getJSONTypes(t.type);const p=u.includes("null");if(p){if(t.nullable===false)throw new Error("type: null contradicts nullable: false")}else{if(!u.length&&t.nullable!==undefined){throw new Error('"nullable" cannot be used without "type"')}if(t.nullable===true)u.push("null")}return u}u.getSchemaTypes=getSchemaTypes;function getJSONTypes(t){const u=Array.isArray(t)?t:t?[t]:[];if(u.every(m.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}u.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(t,u){const{gen:p,data:m,opts:v}=t;const b=coerceToTypes(u,v.coerceTypes);const w=u.length>0&&!(b.length===0&&u.length===1&&(0,g.schemaHasRulesForType)(t,u[0]));if(w){const g=checkDataTypes(u,m,v.strictNumbers,E.Wrong);p.if(g,(()=>{if(b.length)coerceData(t,u,b);else reportTypeError(t)}))}return w}u.coerceAndCheckDataType=coerceAndCheckDataType;const S=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(t,u){return u?t.filter((t=>S.has(t)||u==="array"&&t==="array")):[]}function coerceData(t,u,p){const{gen:m,data:g,opts:v}=t;const w=m.let("dataType",(0,b._)`typeof ${g}`);const E=m.let("coerced",(0,b._)`undefined`);if(v.coerceTypes==="array"){m.if((0,b._)`${w} == 'object' && Array.isArray(${g}) && ${g}.length == 1`,(()=>m.assign(g,(0,b._)`${g}[0]`).assign(w,(0,b._)`typeof ${g}`).if(checkDataTypes(u,g,v.strictNumbers),(()=>m.assign(E,g)))))}m.if((0,b._)`${E} !== undefined`);for(const t of p){if(S.has(t)||t==="array"&&v.coerceTypes==="array"){coerceSpecificType(t)}}m.else();reportTypeError(t);m.endIf();m.if((0,b._)`${E} !== undefined`,(()=>{m.assign(g,E);assignParentData(t,E)}));function coerceSpecificType(t){switch(t){case"string":m.elseIf((0,b._)`${w} == "number" || ${w} == "boolean"`).assign(E,(0,b._)`"" + ${g}`).elseIf((0,b._)`${g} === null`).assign(E,(0,b._)`""`);return;case"number":m.elseIf((0,b._)`${w} == "boolean" || ${g} === null
3
3
  || (${w} == "string" && ${g} && ${g} == +${g})`).assign(E,(0,b._)`+${g}`);return;case"integer":m.elseIf((0,b._)`${w} === "boolean" || ${g} === null
4
4
  || (${w} === "string" && ${g} && ${g} == +${g} && !(${g} % 1))`).assign(E,(0,b._)`+${g}`);return;case"boolean":m.elseIf((0,b._)`${g} === "false" || ${g} === 0 || ${g} === null`).assign(E,false).elseIf((0,b._)`${g} === "true" || ${g} === 1`).assign(E,true);return;case"null":m.elseIf((0,b._)`${g} === "" || ${g} === 0 || ${g} === false`);m.assign(E,null);return;case"array":m.elseIf((0,b._)`${w} === "string" || ${w} === "number"
5
- || ${w} === "boolean" || ${g} === null`).assign(E,(0,b._)`[${g}]`)}}}function assignParentData({gen:t,parentData:u,parentDataProperty:p},m){t.if((0,b._)`${u} !== undefined`,(()=>t.assign((0,b._)`${u}[${p}]`,m)))}function checkDataType(t,u,p,m=E.Correct){const g=m===E.Correct?b.operators.EQ:b.operators.NEQ;let v;switch(t){case"null":return(0,b._)`${u} ${g} null`;case"array":v=(0,b._)`Array.isArray(${u})`;break;case"object":v=(0,b._)`${u} && typeof ${u} == "object" && !Array.isArray(${u})`;break;case"integer":v=numCond((0,b._)`!(${u} % 1) && !isNaN(${u})`);break;case"number":v=numCond();break;default:return(0,b._)`typeof ${u} ${g} ${t}`}return m===E.Correct?v:(0,b.not)(v);function numCond(t=b.nil){return(0,b.and)((0,b._)`typeof ${u} == "number"`,t,p?(0,b._)`isFinite(${u})`:b.nil)}}u.checkDataType=checkDataType;function checkDataTypes(t,u,p,m){if(t.length===1){return checkDataType(t[0],u,p,m)}let g;const v=(0,w.toHash)(t);if(v.array&&v.object){const t=(0,b._)`typeof ${u} != "object"`;g=v.null?t:(0,b._)`!${u} || ${t}`;delete v.null;delete v.array;delete v.object}else{g=b.nil}if(v.number)delete v.integer;for(const t in v)g=(0,b.and)(g,checkDataType(t,u,p,m));return g}u.checkDataTypes=checkDataTypes;const $={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:u})=>typeof t=="string"?(0,b._)`{type: ${t}}`:(0,b._)`{type: ${u}}`};function reportTypeError(t){const u=getTypeErrorContext(t);(0,v.reportError)(u,$)}u.reportTypeError=reportTypeError;function getTypeErrorContext(t){const{gen:u,data:p,schema:m}=t;const g=(0,w.schemaRefOrVal)(t,m,"type");return{gen:u,keyword:"type",data:p,schema:m.type,schemaCode:g,schemaValue:g,parentSchema:m,params:{},it:t}}},2168:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.assignDefaults=void 0;const m=p(4671);const g=p(5049);function assignDefaults(t,u){const{properties:p,items:m}=t.schema;if(u==="object"&&p){for(const u in p){assignDefault(t,u,p[u].default)}}else if(u==="array"&&Array.isArray(m)){m.forEach(((u,p)=>assignDefault(t,p,u.default)))}}u.assignDefaults=assignDefaults;function assignDefault(t,u,p){const{gen:v,compositeRule:b,data:w,opts:E}=t;if(p===undefined)return;const S=(0,m._)`${w}${(0,m.getProperty)(u)}`;if(b){(0,g.checkStrictMode)(t,`default is ignored for: ${S}`);return}let $=(0,m._)`${S} === undefined`;if(E.useDefaults==="empty"){$=(0,m._)`${$} || ${S} === null || ${S} === ""`}v.if($,(0,m._)`${S} = ${(0,m.stringify)(p)}`)}},324:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.getData=u.KeywordCxt=u.validateFunctionCode=void 0;const m=p(5885);const g=p(3330);const v=p(7837);const b=p(3330);const w=p(2168);const E=p(9007);const S=p(3893);const $=p(4671);const P=p(1529);const R=p(9749);const x=p(5049);const O=p(7446);function validateFunctionCode(t){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){topSchemaObjCode(t);return}}validateFunction(t,(()=>(0,m.topBoolOrEmptySchema)(t)))}u.validateFunctionCode=validateFunctionCode;function validateFunction({gen:t,validateName:u,schema:p,schemaEnv:m,opts:g},v){if(g.code.es5){t.func(u,(0,$._)`${P.default.data}, ${P.default.valCxt}`,m.$async,(()=>{t.code((0,$._)`"use strict"; ${funcSourceUrl(p,g)}`);destructureValCxtES5(t,g);t.code(v)}))}else{t.func(u,(0,$._)`${P.default.data}, ${destructureValCxt(g)}`,m.$async,(()=>t.code(funcSourceUrl(p,g)).code(v)))}}function destructureValCxt(t){return(0,$._)`{${P.default.instancePath}="", ${P.default.parentData}, ${P.default.parentDataProperty}, ${P.default.rootData}=${P.default.data}${t.dynamicRef?(0,$._)`, ${P.default.dynamicAnchors}={}`:$.nil}}={}`}function destructureValCxtES5(t,u){t.if(P.default.valCxt,(()=>{t.var(P.default.instancePath,(0,$._)`${P.default.valCxt}.${P.default.instancePath}`);t.var(P.default.parentData,(0,$._)`${P.default.valCxt}.${P.default.parentData}`);t.var(P.default.parentDataProperty,(0,$._)`${P.default.valCxt}.${P.default.parentDataProperty}`);t.var(P.default.rootData,(0,$._)`${P.default.valCxt}.${P.default.rootData}`);if(u.dynamicRef)t.var(P.default.dynamicAnchors,(0,$._)`${P.default.valCxt}.${P.default.dynamicAnchors}`)}),(()=>{t.var(P.default.instancePath,(0,$._)`""`);t.var(P.default.parentData,(0,$._)`undefined`);t.var(P.default.parentDataProperty,(0,$._)`undefined`);t.var(P.default.rootData,P.default.data);if(u.dynamicRef)t.var(P.default.dynamicAnchors,(0,$._)`{}`)}))}function topSchemaObjCode(t){const{schema:u,opts:p,gen:m}=t;validateFunction(t,(()=>{if(p.$comment&&u.$comment)commentKeyword(t);checkNoDefault(t);m.let(P.default.vErrors,null);m.let(P.default.errors,0);if(p.unevaluated)resetEvaluated(t);typeAndKeywords(t);returnResults(t)}));return}function resetEvaluated(t){const{gen:u,validateName:p}=t;t.evaluated=u.const("evaluated",(0,$._)`${p}.evaluated`);u.if((0,$._)`${t.evaluated}.dynamicProps`,(()=>u.assign((0,$._)`${t.evaluated}.props`,(0,$._)`undefined`)));u.if((0,$._)`${t.evaluated}.dynamicItems`,(()=>u.assign((0,$._)`${t.evaluated}.items`,(0,$._)`undefined`)))}function funcSourceUrl(t,u){const p=typeof t=="object"&&t[u.schemaId];return p&&(u.code.source||u.code.process)?(0,$._)`/*# sourceURL=${p} */`:$.nil}function subschemaCode(t,u){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){subSchemaObjCode(t,u);return}}(0,m.boolOrEmptySchema)(t,u)}function schemaCxtHasRules({schema:t,self:u}){if(typeof t=="boolean")return!t;for(const p in t)if(u.RULES.all[p])return true;return false}function isSchemaObj(t){return typeof t.schema!="boolean"}function subSchemaObjCode(t,u){const{schema:p,gen:m,opts:g}=t;if(g.$comment&&p.$comment)commentKeyword(t);updateContext(t);checkAsyncSchema(t);const v=m.const("_errs",P.default.errors);typeAndKeywords(t,v);m.var(u,(0,$._)`${v} === ${P.default.errors}`)}function checkKeywords(t){(0,x.checkUnknownRules)(t);checkRefsAndKeywords(t)}function typeAndKeywords(t,u){if(t.opts.jtd)return schemaKeywords(t,[],false,u);const p=(0,g.getSchemaTypes)(t.schema);const m=(0,g.coerceAndCheckDataType)(t,p);schemaKeywords(t,p,!m,u)}function checkRefsAndKeywords(t){const{schema:u,errSchemaPath:p,opts:m,self:g}=t;if(u.$ref&&m.ignoreKeywordsWithRef&&(0,x.schemaHasRulesButRef)(u,g.RULES)){g.logger.warn(`$ref: keywords ignored in schema at path "${p}"`)}}function checkNoDefault(t){const{schema:u,opts:p}=t;if(u.default!==undefined&&p.useDefaults&&p.strictSchema){(0,x.checkStrictMode)(t,"default is ignored in the schema root")}}function updateContext(t){const u=t.schema[t.opts.schemaId];if(u)t.baseId=(0,R.resolveUrl)(t.opts.uriResolver,t.baseId,u)}function checkAsyncSchema(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen:t,schemaEnv:u,schema:p,errSchemaPath:m,opts:g}){const v=p.$comment;if(g.$comment===true){t.code((0,$._)`${P.default.self}.logger.log(${v})`)}else if(typeof g.$comment=="function"){const p=(0,$.str)`${m}/$comment`;const g=t.scopeValue("root",{ref:u.root});t.code((0,$._)`${P.default.self}.opts.$comment(${v}, ${p}, ${g}.schema)`)}}function returnResults(t){const{gen:u,schemaEnv:p,validateName:m,ValidationError:g,opts:v}=t;if(p.$async){u.if((0,$._)`${P.default.errors} === 0`,(()=>u.return(P.default.data)),(()=>u.throw((0,$._)`new ${g}(${P.default.vErrors})`)))}else{u.assign((0,$._)`${m}.errors`,P.default.vErrors);if(v.unevaluated)assignEvaluated(t);u.return((0,$._)`${P.default.errors} === 0`)}}function assignEvaluated({gen:t,evaluated:u,props:p,items:m}){if(p instanceof $.Name)t.assign((0,$._)`${u}.props`,p);if(m instanceof $.Name)t.assign((0,$._)`${u}.items`,m)}function schemaKeywords(t,u,p,m){const{gen:g,schema:w,data:E,allErrors:S,opts:R,self:O}=t;const{RULES:A}=O;if(w.$ref&&(R.ignoreKeywordsWithRef||!(0,x.schemaHasRulesButRef)(w,A))){g.block((()=>keywordCode(t,"$ref",A.all.$ref.definition)));return}if(!R.jtd)checkStrictTypes(t,u);g.block((()=>{for(const t of A.rules)groupKeywords(t);groupKeywords(A.post)}));function groupKeywords(x){if(!(0,v.shouldUseGroup)(w,x))return;if(x.type){g.if((0,b.checkDataType)(x.type,E,R.strictNumbers));iterateKeywords(t,x);if(u.length===1&&u[0]===x.type&&p){g.else();(0,b.reportTypeError)(t)}g.endIf()}else{iterateKeywords(t,x)}if(!S)g.if((0,$._)`${P.default.errors} === ${m||0}`)}}function iterateKeywords(t,u){const{gen:p,schema:m,opts:{useDefaults:g}}=t;if(g)(0,w.assignDefaults)(t,u.type);p.block((()=>{for(const p of u.rules){if((0,v.shouldUseRule)(m,p)){keywordCode(t,p.keyword,p.definition,u.type)}}}))}function checkStrictTypes(t,u){if(t.schemaEnv.meta||!t.opts.strictTypes)return;checkContextTypes(t,u);if(!t.opts.allowUnionTypes)checkMultipleTypes(t,u);checkKeywordTypes(t,t.dataTypes)}function checkContextTypes(t,u){if(!u.length)return;if(!t.dataTypes.length){t.dataTypes=u;return}u.forEach((u=>{if(!includesType(t.dataTypes,u)){strictTypesError(t,`type "${u}" not allowed by context "${t.dataTypes.join(",")}"`)}}));narrowSchemaTypes(t,u)}function checkMultipleTypes(t,u){if(u.length>1&&!(u.length===2&&u.includes("null"))){strictTypesError(t,"use allowUnionTypes to allow union type keyword")}}function checkKeywordTypes(t,u){const p=t.self.RULES.all;for(const m in p){const g=p[m];if(typeof g=="object"&&(0,v.shouldUseRule)(t.schema,g)){const{type:p}=g.definition;if(p.length&&!p.some((t=>hasApplicableType(u,t)))){strictTypesError(t,`missing type "${p.join(",")}" for keyword "${m}"`)}}}}function hasApplicableType(t,u){return t.includes(u)||u==="number"&&t.includes("integer")}function includesType(t,u){return t.includes(u)||u==="integer"&&t.includes("number")}function narrowSchemaTypes(t,u){const p=[];for(const m of t.dataTypes){if(includesType(u,m))p.push(m);else if(u.includes("integer")&&m==="number")p.push("integer")}t.dataTypes=p}function strictTypesError(t,u){const p=t.schemaEnv.baseId+t.errSchemaPath;u+=` at "${p}" (strictTypes)`;(0,x.checkStrictMode)(t,u,t.opts.strictTypes)}class KeywordCxt{constructor(t,u,p){(0,E.validateKeywordUsage)(t,u,p);this.gen=t.gen;this.allErrors=t.allErrors;this.keyword=p;this.data=t.data;this.schema=t.schema[p];this.$data=u.$data&&t.opts.$data&&this.schema&&this.schema.$data;this.schemaValue=(0,x.schemaRefOrVal)(t,this.schema,p,this.$data);this.schemaType=u.schemaType;this.parentSchema=t.schema;this.params={};this.it=t;this.def=u;if(this.$data){this.schemaCode=t.gen.const("vSchema",getData(this.$data,t))}else{this.schemaCode=this.schemaValue;if(!(0,E.validSchemaType)(this.schema,u.schemaType,u.allowUndefined)){throw new Error(`${p} value must be ${JSON.stringify(u.schemaType)}`)}}if("code"in u?u.trackErrors:u.errors!==false){this.errsCount=t.gen.const("_errs",P.default.errors)}}result(t,u,p){this.failResult((0,$.not)(t),u,p)}failResult(t,u,p){this.gen.if(t);if(p)p();else this.error();if(u){this.gen.else();u();if(this.allErrors)this.gen.endIf()}else{if(this.allErrors)this.gen.endIf();else this.gen.else()}}pass(t,u){this.failResult((0,$.not)(t),undefined,u)}fail(t){if(t===undefined){this.error();if(!this.allErrors)this.gen.if(false);return}this.gen.if(t);this.error();if(this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:u}=this;this.fail((0,$._)`${u} !== undefined && (${(0,$.or)(this.invalid$data(),t)})`)}error(t,u,p){if(u){this.setParams(u);this._error(t,p);this.setParams({});return}this._error(t,p)}_error(t,u){(t?O.reportExtraError:O.reportError)(this,this.def.error,u)}$dataError(){(0,O.reportError)(this,this.def.$dataError||O.keyword$DataError)}reset(){if(this.errsCount===undefined)throw new Error('add "trackErrors" to keyword definition');(0,O.resetErrorsCount)(this.gen,this.errsCount)}ok(t){if(!this.allErrors)this.gen.if(t)}setParams(t,u){if(u)Object.assign(this.params,t);else this.params=t}block$data(t,u,p=$.nil){this.gen.block((()=>{this.check$data(t,p);u()}))}check$data(t=$.nil,u=$.nil){if(!this.$data)return;const{gen:p,schemaCode:m,schemaType:g,def:v}=this;p.if((0,$.or)((0,$._)`${m} === undefined`,u));if(t!==$.nil)p.assign(t,true);if(g.length||v.validateSchema){p.elseIf(this.invalid$data());this.$dataError();if(t!==$.nil)p.assign(t,false)}p.else()}invalid$data(){const{gen:t,schemaCode:u,schemaType:p,def:m,it:g}=this;return(0,$.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(p.length){if(!(u instanceof $.Name))throw new Error("ajv implementation error");const t=Array.isArray(p)?p:[p];return(0,$._)`${(0,b.checkDataTypes)(t,u,g.opts.strictNumbers,b.DataType.Wrong)}`}return $.nil}function invalid$DataSchema(){if(m.validateSchema){const p=t.scopeValue("validate$data",{ref:m.validateSchema});return(0,$._)`!${p}(${u})`}return $.nil}}subschema(t,u){const p=(0,S.getSubschema)(this.it,t);(0,S.extendSubschemaData)(p,this.it,t);(0,S.extendSubschemaMode)(p,t);const m={...this.it,...p,items:undefined,props:undefined};subschemaCode(m,u);return m}mergeEvaluated(t,u){const{it:p,gen:m}=this;if(!p.opts.unevaluated)return;if(p.props!==true&&t.props!==undefined){p.props=x.mergeEvaluated.props(m,t.props,p.props,u)}if(p.items!==true&&t.items!==undefined){p.items=x.mergeEvaluated.items(m,t.items,p.items,u)}}mergeValidEvaluated(t,u){const{it:p,gen:m}=this;if(p.opts.unevaluated&&(p.props!==true||p.items!==true)){m.if(u,(()=>this.mergeEvaluated(t,$.Name)));return true}}}u.KeywordCxt=KeywordCxt;function keywordCode(t,u,p,m){const g=new KeywordCxt(t,p,u);if("code"in p){p.code(g,m)}else if(g.$data&&p.validate){(0,E.funcKeywordCode)(g,p)}else if("macro"in p){(0,E.macroKeywordCode)(g,p)}else if(p.compile||p.validate){(0,E.funcKeywordCode)(g,p)}}const A=/^\/(?:[^~]|~0|~1)*$/;const k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(t,{dataLevel:u,dataNames:p,dataPathArr:m}){let g;let v;if(t==="")return P.default.rootData;if(t[0]==="/"){if(!A.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);g=t;v=P.default.rootData}else{const b=k.exec(t);if(!b)throw new Error(`Invalid JSON-pointer: ${t}`);const w=+b[1];g=b[2];if(g==="#"){if(w>=u)throw new Error(errorMsg("property/index",w));return m[u-w]}if(w>u)throw new Error(errorMsg("data",w));v=p[u-w];if(!g)return v}let b=v;const w=g.split("/");for(const t of w){if(t){v=(0,$._)`${v}${(0,$.getProperty)((0,x.unescapeJsonPointer)(t))}`;b=(0,$._)`${b} && ${v}`}}return b;function errorMsg(t,p){return`Cannot access ${t} ${p} levels up, current level is ${u}`}}u.getData=getData},9007:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateKeywordUsage=u.validSchemaType=u.funcKeywordCode=u.macroKeywordCode=void 0;const m=p(4671);const g=p(1529);const v=p(1919);const b=p(7446);function macroKeywordCode(t,u){const{gen:p,keyword:g,schema:v,parentSchema:b,it:w}=t;const E=u.macro.call(w.self,v,b,w);const S=useKeyword(p,g,E);if(w.opts.validateSchema!==false)w.self.validateSchema(E,true);const $=p.name("valid");t.subschema({schema:E,schemaPath:m.nil,errSchemaPath:`${w.errSchemaPath}/${g}`,topSchemaRef:S,compositeRule:true},$);t.pass($,(()=>t.error(true)))}u.macroKeywordCode=macroKeywordCode;function funcKeywordCode(t,u){var p;const{gen:b,keyword:w,schema:E,parentSchema:S,$data:$,it:P}=t;checkAsyncKeyword(P,u);const R=!$&&u.compile?u.compile.call(P.self,E,S,P):u.validate;const x=useKeyword(b,w,R);const O=b.let("valid");t.block$data(O,validateKeyword);t.ok((p=u.valid)!==null&&p!==void 0?p:O);function validateKeyword(){if(u.errors===false){assignValid();if(u.modifying)modifyData(t);reportErrs((()=>t.error()))}else{const p=u.async?validateAsync():validateSync();if(u.modifying)modifyData(t);reportErrs((()=>addErrs(t,p)))}}function validateAsync(){const t=b.let("ruleErrs",null);b.try((()=>assignValid((0,m._)`await `)),(u=>b.assign(O,false).if((0,m._)`${u} instanceof ${P.ValidationError}`,(()=>b.assign(t,(0,m._)`${u}.errors`)),(()=>b.throw(u)))));return t}function validateSync(){const t=(0,m._)`${x}.errors`;b.assign(t,null);assignValid(m.nil);return t}function assignValid(p=(u.async?(0,m._)`await `:m.nil)){const w=P.opts.passContext?g.default.this:g.default.self;const E=!("compile"in u&&!$||u.schema===false);b.assign(O,(0,m._)`${p}${(0,v.callValidateCode)(t,x,w,E)}`,u.modifying)}function reportErrs(t){var p;b.if((0,m.not)((p=u.valid)!==null&&p!==void 0?p:O),t)}}u.funcKeywordCode=funcKeywordCode;function modifyData(t){const{gen:u,data:p,it:g}=t;u.if(g.parentData,(()=>u.assign(p,(0,m._)`${g.parentData}[${g.parentDataProperty}]`)))}function addErrs(t,u){const{gen:p}=t;p.if((0,m._)`Array.isArray(${u})`,(()=>{p.assign(g.default.vErrors,(0,m._)`${g.default.vErrors} === null ? ${u} : ${g.default.vErrors}.concat(${u})`).assign(g.default.errors,(0,m._)`${g.default.vErrors}.length`);(0,b.extendErrors)(t)}),(()=>t.error()))}function checkAsyncKeyword({schemaEnv:t},u){if(u.async&&!t.$async)throw new Error("async keyword in sync schema")}function useKeyword(t,u,p){if(p===undefined)throw new Error(`keyword "${u}" failed to compile`);return t.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0,m.stringify)(p)})}function validSchemaType(t,u,p=false){return!u.length||u.some((u=>u==="array"?Array.isArray(t):u==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==u||p&&typeof t=="undefined"))}u.validSchemaType=validSchemaType;function validateKeywordUsage({schema:t,opts:u,self:p,errSchemaPath:m},g,v){if(Array.isArray(g.keyword)?!g.keyword.includes(v):g.keyword!==v){throw new Error("ajv implementation error")}const b=g.dependencies;if(b===null||b===void 0?void 0:b.some((u=>!Object.prototype.hasOwnProperty.call(t,u)))){throw new Error(`parent schema must have dependencies of ${v}: ${b.join(",")}`)}if(g.validateSchema){const b=g.validateSchema(t[v]);if(!b){const t=`keyword "${v}" value is invalid at path "${m}": `+p.errorsText(g.validateSchema.errors);if(u.validateSchema==="log")p.logger.error(t);else throw new Error(t)}}}u.validateKeywordUsage=validateKeywordUsage},3893:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.extendSubschemaMode=u.extendSubschemaData=u.getSubschema=void 0;const m=p(4671);const g=p(5049);function getSubschema(t,{keyword:u,schemaProp:p,schema:v,schemaPath:b,errSchemaPath:w,topSchemaRef:E}){if(u!==undefined&&v!==undefined){throw new Error('both "keyword" and "schema" passed, only one allowed')}if(u!==undefined){const v=t.schema[u];return p===undefined?{schema:v,schemaPath:(0,m._)`${t.schemaPath}${(0,m.getProperty)(u)}`,errSchemaPath:`${t.errSchemaPath}/${u}`}:{schema:v[p],schemaPath:(0,m._)`${t.schemaPath}${(0,m.getProperty)(u)}${(0,m.getProperty)(p)}`,errSchemaPath:`${t.errSchemaPath}/${u}/${(0,g.escapeFragment)(p)}`}}if(v!==undefined){if(b===undefined||w===undefined||E===undefined){throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')}return{schema:v,schemaPath:b,topSchemaRef:E,errSchemaPath:w}}throw new Error('either "keyword" or "schema" must be passed')}u.getSubschema=getSubschema;function extendSubschemaData(t,u,{dataProp:p,dataPropType:v,data:b,dataTypes:w,propertyName:E}){if(b!==undefined&&p!==undefined){throw new Error('both "data" and "dataProp" passed, only one allowed')}const{gen:S}=u;if(p!==undefined){const{errorPath:b,dataPathArr:w,opts:E}=u;const $=S.let("data",(0,m._)`${u.data}${(0,m.getProperty)(p)}`,true);dataContextProps($);t.errorPath=(0,m.str)`${b}${(0,g.getErrorPath)(p,v,E.jsPropertySyntax)}`;t.parentDataProperty=(0,m._)`${p}`;t.dataPathArr=[...w,t.parentDataProperty]}if(b!==undefined){const u=b instanceof m.Name?b:S.let("data",b,true);dataContextProps(u);if(E!==undefined)t.propertyName=E}if(w)t.dataTypes=w;function dataContextProps(p){t.data=p;t.dataLevel=u.dataLevel+1;t.dataTypes=[];u.definedProperties=new Set;t.parentData=u.data;t.dataNames=[...u.dataNames,p]}}u.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(t,{jtdDiscriminator:u,jtdMetadata:p,compositeRule:m,createErrors:g,allErrors:v}){if(m!==undefined)t.compositeRule=m;if(g!==undefined)t.createErrors=g;if(v!==undefined)t.allErrors=v;t.jtdDiscriminator=u;t.jtdMetadata=p}u.extendSubschemaMode=extendSubschemaMode},6952:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=void 0;var m=p(324);Object.defineProperty(u,"KeywordCxt",{enumerable:true,get:function(){return m.KeywordCxt}});var g=p(4671);Object.defineProperty(u,"_",{enumerable:true,get:function(){return g._}});Object.defineProperty(u,"str",{enumerable:true,get:function(){return g.str}});Object.defineProperty(u,"stringify",{enumerable:true,get:function(){return g.stringify}});Object.defineProperty(u,"nil",{enumerable:true,get:function(){return g.nil}});Object.defineProperty(u,"Name",{enumerable:true,get:function(){return g.Name}});Object.defineProperty(u,"CodeGen",{enumerable:true,get:function(){return g.CodeGen}});const v=p(4068);const b=p(909);const w=p(2166);const E=p(4033);const S=p(4671);const $=p(9749);const P=p(3330);const R=p(5049);const x=p(3770);const O=p(7438);const defaultRegExp=(t,u)=>new RegExp(t,u);defaultRegExp.code="new RegExp";const A=["removeAdditional","useDefaults","coerceTypes"];const k=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]);const T={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."};const C={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};const I=200;function requiredOptions(t){var u,p,m,g,v,b,w,E,S,$,P,R,x,A,k,T,C,N,D,j,L,M,U,B,H;const z=t.strict;const V=(u=t.code)===null||u===void 0?void 0:u.optimize;const G=V===true||V===undefined?1:V||0;const q=(m=(p=t.code)===null||p===void 0?void 0:p.regExp)!==null&&m!==void 0?m:defaultRegExp;const W=(g=t.uriResolver)!==null&&g!==void 0?g:O.default;return{strictSchema:(b=(v=t.strictSchema)!==null&&v!==void 0?v:z)!==null&&b!==void 0?b:true,strictNumbers:(E=(w=t.strictNumbers)!==null&&w!==void 0?w:z)!==null&&E!==void 0?E:true,strictTypes:($=(S=t.strictTypes)!==null&&S!==void 0?S:z)!==null&&$!==void 0?$:"log",strictTuples:(R=(P=t.strictTuples)!==null&&P!==void 0?P:z)!==null&&R!==void 0?R:"log",strictRequired:(A=(x=t.strictRequired)!==null&&x!==void 0?x:z)!==null&&A!==void 0?A:false,code:t.code?{...t.code,optimize:G,regExp:q}:{optimize:G,regExp:q},loopRequired:(k=t.loopRequired)!==null&&k!==void 0?k:I,loopEnum:(T=t.loopEnum)!==null&&T!==void 0?T:I,meta:(C=t.meta)!==null&&C!==void 0?C:true,messages:(N=t.messages)!==null&&N!==void 0?N:true,inlineRefs:(D=t.inlineRefs)!==null&&D!==void 0?D:true,schemaId:(j=t.schemaId)!==null&&j!==void 0?j:"$id",addUsedSchema:(L=t.addUsedSchema)!==null&&L!==void 0?L:true,validateSchema:(M=t.validateSchema)!==null&&M!==void 0?M:true,validateFormats:(U=t.validateFormats)!==null&&U!==void 0?U:true,unicodeRegExp:(B=t.unicodeRegExp)!==null&&B!==void 0?B:true,int32range:(H=t.int32range)!==null&&H!==void 0?H:true,uriResolver:W}}class Ajv{constructor(t={}){this.schemas={};this.refs={};this.formats={};this._compilations=new Set;this._loading={};this._cache=new Map;t=this.opts={...t,...requiredOptions(t)};const{es5:u,lines:p}=this.opts.code;this.scope=new S.ValueScope({scope:{},prefixes:k,es5:u,lines:p});this.logger=getLogger(t.logger);const m=t.validateFormats;t.validateFormats=false;this.RULES=(0,w.getRules)();checkOptions.call(this,T,t,"NOT SUPPORTED");checkOptions.call(this,C,t,"DEPRECATED","warn");this._metaOpts=getMetaSchemaOptions.call(this);if(t.formats)addInitialFormats.call(this);this._addVocabularies();this._addDefaultMetaSchema();if(t.keywords)addInitialKeywords.call(this,t.keywords);if(typeof t.meta=="object")this.addMetaSchema(t.meta);addInitialSchemas.call(this);t.validateFormats=m}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:u,schemaId:p}=this.opts;let m=x;if(p==="id"){m={...x};m.id=m.$id;delete m.$id}if(u&&t)this.addMetaSchema(m,m[p],false)}defaultMeta(){const{meta:t,schemaId:u}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[u]||t:undefined}validate(t,u){let p;if(typeof t=="string"){p=this.getSchema(t);if(!p)throw new Error(`no schema with key or ref "${t}"`)}else{p=this.compile(t)}const m=p(u);if(!("$async"in p))this.errors=p.errors;return m}compile(t,u){const p=this._addSchema(t,u);return p.validate||this._compileSchemaEnv(p)}compileAsync(t,u){if(typeof this.opts.loadSchema!="function"){throw new Error("options.loadSchema should be a function")}const{loadSchema:p}=this.opts;return runCompileAsync.call(this,t,u);async function runCompileAsync(t,u){await loadMetaSchema.call(this,t.$schema);const p=this._addSchema(t,u);return p.validate||_compileAsync.call(this,p)}async function loadMetaSchema(t){if(t&&!this.getSchema(t)){await runCompileAsync.call(this,{$ref:t},true)}}async function _compileAsync(t){try{return this._compileSchemaEnv(t)}catch(u){if(!(u instanceof b.default))throw u;checkLoaded.call(this,u);await loadMissingSchema.call(this,u.missingSchema);return _compileAsync.call(this,t)}}function checkLoaded({missingSchema:t,missingRef:u}){if(this.refs[t]){throw new Error(`AnySchema ${t} is loaded but ${u} cannot be resolved`)}}async function loadMissingSchema(t){const p=await _loadSchema.call(this,t);if(!this.refs[t])await loadMetaSchema.call(this,p.$schema);if(!this.refs[t])this.addSchema(p,t,u)}async function _loadSchema(t){const u=this._loading[t];if(u)return u;try{return await(this._loading[t]=p(t))}finally{delete this._loading[t]}}}addSchema(t,u,p,m=this.opts.validateSchema){if(Array.isArray(t)){for(const u of t)this.addSchema(u,undefined,p,m);return this}let g;if(typeof t==="object"){const{schemaId:u}=this.opts;g=t[u];if(g!==undefined&&typeof g!="string"){throw new Error(`schema ${u} must be string`)}}u=(0,$.normalizeId)(u||g);this._checkUnique(u);this.schemas[u]=this._addSchema(t,p,u,m,true);return this}addMetaSchema(t,u,p=this.opts.validateSchema){this.addSchema(t,u,true,p);return this}validateSchema(t,u){if(typeof t=="boolean")return true;let p;p=t.$schema;if(p!==undefined&&typeof p!="string"){throw new Error("$schema must be a string")}p=p||this.opts.defaultMeta||this.defaultMeta();if(!p){this.logger.warn("meta-schema not available");this.errors=null;return true}const m=this.validate(p,t);if(!m&&u){const t="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(t);else throw new Error(t)}return m}getSchema(t){let u;while(typeof(u=getSchEnv.call(this,t))=="string")t=u;if(u===undefined){const{schemaId:p}=this.opts;const m=new E.SchemaEnv({schema:{},schemaId:p});u=E.resolveSchema.call(this,m,t);if(!u)return;this.refs[t]=u}return u.validate||this._compileSchemaEnv(u)}removeSchema(t){if(t instanceof RegExp){this._removeAllSchemas(this.schemas,t);this._removeAllSchemas(this.refs,t);return this}switch(typeof t){case"undefined":this._removeAllSchemas(this.schemas);this._removeAllSchemas(this.refs);this._cache.clear();return this;case"string":{const u=getSchEnv.call(this,t);if(typeof u=="object")this._cache.delete(u.schema);delete this.schemas[t];delete this.refs[t];return this}case"object":{const u=t;this._cache.delete(u);let p=t[this.opts.schemaId];if(p){p=(0,$.normalizeId)(p);delete this.schemas[p];delete this.refs[p]}return this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const u of t)this.addKeyword(u);return this}addKeyword(t,u){let p;if(typeof t=="string"){p=t;if(typeof u=="object"){this.logger.warn("these parameters are deprecated, see docs for addKeyword");u.keyword=p}}else if(typeof t=="object"&&u===undefined){u=t;p=u.keyword;if(Array.isArray(p)&&!p.length){throw new Error("addKeywords: keyword must be string or non-empty array")}}else{throw new Error("invalid addKeywords parameters")}checkKeyword.call(this,p,u);if(!u){(0,R.eachItem)(p,(t=>addRule.call(this,t)));return this}keywordMetaschema.call(this,u);const m={...u,type:(0,P.getJSONTypes)(u.type),schemaType:(0,P.getJSONTypes)(u.schemaType)};(0,R.eachItem)(p,m.type.length===0?t=>addRule.call(this,t,m):t=>m.type.forEach((u=>addRule.call(this,t,m,u))));return this}getKeyword(t){const u=this.RULES.all[t];return typeof u=="object"?u.definition:!!u}removeKeyword(t){const{RULES:u}=this;delete u.keywords[t];delete u.all[t];for(const p of u.rules){const u=p.rules.findIndex((u=>u.keyword===t));if(u>=0)p.rules.splice(u,1)}return this}addFormat(t,u){if(typeof u=="string")u=new RegExp(u);this.formats[t]=u;return this}errorsText(t=this.errors,{separator:u=", ",dataVar:p="data"}={}){if(!t||t.length===0)return"No errors";return t.map((t=>`${p}${t.instancePath} ${t.message}`)).reduce(((t,p)=>t+u+p))}$dataMetaSchema(t,u){const p=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const m of u){const u=m.split("/").slice(1);let g=t;for(const t of u)g=g[t];for(const t in p){const u=p[t];if(typeof u!="object")continue;const{$data:m}=u.definition;const v=g[t];if(m&&v)g[t]=schemaOrData(v)}}return t}_removeAllSchemas(t,u){for(const p in t){const m=t[p];if(!u||u.test(p)){if(typeof m=="string"){delete t[p]}else if(m&&!m.meta){this._cache.delete(m.schema);delete t[p]}}}}_addSchema(t,u,p,m=this.opts.validateSchema,g=this.opts.addUsedSchema){let v;const{schemaId:b}=this.opts;if(typeof t=="object"){v=t[b]}else{if(this.opts.jtd)throw new Error("schema must be object");else if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let w=this._cache.get(t);if(w!==undefined)return w;p=(0,$.normalizeId)(v||p);const S=$.getSchemaRefs.call(this,t,p);w=new E.SchemaEnv({schema:t,schemaId:b,meta:u,baseId:p,localRefs:S});this._cache.set(w.schema,w);if(g&&!p.startsWith("#")){if(p)this._checkUnique(p);this.refs[p]=w}if(m)this.validateSchema(t,true);return w}_checkUnique(t){if(this.schemas[t]||this.refs[t]){throw new Error(`schema with key or id "${t}" already exists`)}}_compileSchemaEnv(t){if(t.meta)this._compileMetaSchema(t);else E.compileSchema.call(this,t);if(!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const u=this.opts;this.opts=this._metaOpts;try{E.compileSchema.call(this,t)}finally{this.opts=u}}}Ajv.ValidationError=v.default;Ajv.MissingRefError=b.default;u["default"]=Ajv;function checkOptions(t,u,p,m="error"){for(const g in t){const v=g;if(v in u)this.logger[m](`${p}: option ${g}. ${t[v]}`)}}function getSchEnv(t){t=(0,$.normalizeId)(t);return this.schemas[t]||this.refs[t]}function addInitialSchemas(){const t=this.opts.schemas;if(!t)return;if(Array.isArray(t))this.addSchema(t);else for(const u in t)this.addSchema(t[u],u)}function addInitialFormats(){for(const t in this.opts.formats){const u=this.opts.formats[t];if(u)this.addFormat(t,u)}}function addInitialKeywords(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const u in t){const p=t[u];if(!p.keyword)p.keyword=u;this.addKeyword(p)}}function getMetaSchemaOptions(){const t={...this.opts};for(const u of A)delete t[u];return t}const N={log(){},warn(){},error(){}};function getLogger(t){if(t===false)return N;if(t===undefined)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}const D=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(t,u){const{RULES:p}=this;(0,R.eachItem)(t,(t=>{if(p.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!D.test(t))throw new Error(`Keyword ${t} has invalid name`)}));if(!u)return;if(u.$data&&!("code"in u||"validate"in u)){throw new Error('$data keyword must have "code" or "validate" function')}}function addRule(t,u,p){var m;const g=u===null||u===void 0?void 0:u.post;if(p&&g)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:v}=this;let b=g?v.post:v.rules.find((({type:t})=>t===p));if(!b){b={type:p,rules:[]};v.rules.push(b)}v.keywords[t]=true;if(!u)return;const w={keyword:t,definition:{...u,type:(0,P.getJSONTypes)(u.type),schemaType:(0,P.getJSONTypes)(u.schemaType)}};if(u.before)addBeforeRule.call(this,b,w,u.before);else b.rules.push(w);v.all[t]=w;(m=u.implements)===null||m===void 0?void 0:m.forEach((t=>this.addKeyword(t)))}function addBeforeRule(t,u,p){const m=t.rules.findIndex((t=>t.keyword===p));if(m>=0){t.rules.splice(m,0,u)}else{t.rules.push(u);this.logger.warn(`rule ${p} is not defined`)}}function keywordMetaschema(t){let{metaSchema:u}=t;if(u===undefined)return;if(t.$data&&this.opts.$data)u=schemaOrData(u);t.validateSchema=this.compile(u,true)}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(t){return{anyOf:[t,j]}}},4010:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6261);const g=p(13);const v=p(7388);const b=p(2394);const w=p(4771);const E=p(9567);const S=p(8364);const $=p(2943);const P=["/properties"];function addMetaSchema2020(t){[m,g,v,b,w,with$data(this,E),S,with$data(this,$)].forEach((t=>this.addMetaSchema(t,undefined,false)));return this;function with$data(u,p){return t?u.$dataMetaSchema(p,P):p}}u["default"]=addMetaSchema2020},9804:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(7407);m.code='require("ajv/dist/runtime/equal").default';u["default"]=m},4679:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});function ucs2length(t){const u=t.length;let p=0;let m=0;let g;while(m<u){p++;g=t.charCodeAt(m++);if(g>=55296&&g<=56319&&m<u){g=t.charCodeAt(m);if((g&64512)===56320)m++}}return p}u["default"]=ucs2length;ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},7438:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1311);m.code='require("ajv/dist/runtime/uri").default';u["default"]=m},4068:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});class ValidationError extends Error{constructor(t){super("validation failed");this.errors=t;this.ajv=this.validation=true}}u["default"]=ValidationError},2063:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateAdditionalItems=void 0;const m=p(4671);const g=p(5049);const v={message:({params:{len:t}})=>(0,m.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,m._)`{limit: ${t}}`};const b={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:v,code(t){const{parentSchema:u,it:p}=t;const{items:m}=u;if(!Array.isArray(m)){(0,g.checkStrictMode)(p,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(t,m)}};function validateAdditionalItems(t,u){const{gen:p,schema:v,data:b,keyword:w,it:E}=t;E.items=true;const S=p.const("len",(0,m._)`${b}.length`);if(v===false){t.setParams({len:u.length});t.pass((0,m._)`${S} <= ${u.length}`)}else if(typeof v=="object"&&!(0,g.alwaysValidSchema)(E,v)){const g=p.var("valid",(0,m._)`${S} <= ${u.length}`);p.if((0,m.not)(g),(()=>validateItems(g)));t.ok(g)}function validateItems(v){p.forRange("i",u.length,S,(u=>{t.subschema({keyword:w,dataProp:u,dataPropType:g.Type.Num},v);if(!E.allErrors)p.if((0,m.not)(v),(()=>p.break()))}))}}u.validateAdditionalItems=validateAdditionalItems;u["default"]=b},8410:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g=p(4671);const v=p(1529);const b=p(5049);const w={message:"must NOT have additional properties",params:({params:t})=>(0,g._)`{additionalProperty: ${t.additionalProperty}}`};const E={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:w,code(t){const{gen:u,schema:p,parentSchema:w,data:E,errsCount:S,it:$}=t;if(!S)throw new Error("ajv implementation error");const{allErrors:P,opts:R}=$;$.props=true;if(R.removeAdditional!=="all"&&(0,b.alwaysValidSchema)($,p))return;const x=(0,m.allSchemaProperties)(w.properties);const O=(0,m.allSchemaProperties)(w.patternProperties);checkAdditionalProperties();t.ok((0,g._)`${S} === ${v.default.errors}`);function checkAdditionalProperties(){u.forIn("key",E,(t=>{if(!x.length&&!O.length)additionalPropertyCode(t);else u.if(isAdditional(t),(()=>additionalPropertyCode(t)))}))}function isAdditional(p){let v;if(x.length>8){const t=(0,b.schemaRefOrVal)($,w.properties,"properties");v=(0,m.isOwnProperty)(u,t,p)}else if(x.length){v=(0,g.or)(...x.map((t=>(0,g._)`${p} === ${t}`)))}else{v=g.nil}if(O.length){v=(0,g.or)(v,...O.map((u=>(0,g._)`${(0,m.usePattern)(t,u)}.test(${p})`)))}return(0,g.not)(v)}function deleteAdditional(t){u.code((0,g._)`delete ${E}[${t}]`)}function additionalPropertyCode(m){if(R.removeAdditional==="all"||R.removeAdditional&&p===false){deleteAdditional(m);return}if(p===false){t.setParams({additionalProperty:m});t.error();if(!P)u.break();return}if(typeof p=="object"&&!(0,b.alwaysValidSchema)($,p)){const p=u.name("valid");if(R.removeAdditional==="failing"){applyAdditionalSchema(m,p,false);u.if((0,g.not)(p),(()=>{t.reset();deleteAdditional(m)}))}else{applyAdditionalSchema(m,p);if(!P)u.if((0,g.not)(p),(()=>u.break()))}}}function applyAdditionalSchema(u,p,m){const g={keyword:"additionalProperties",dataProp:u,dataPropType:b.Type.Str};if(m===false){Object.assign(g,{compositeRule:true,createErrors:false,allErrors:false})}t.subschema(g,p)}}};u["default"]=E},382:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5049);const g={keyword:"allOf",schemaType:"array",code(t){const{gen:u,schema:p,it:g}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");const v=u.name("valid");p.forEach(((u,p)=>{if((0,m.alwaysValidSchema)(g,u))return;const b=t.subschema({keyword:"allOf",schemaProp:p},v);t.ok(v);t.mergeEvaluated(b)}))}};u["default"]=g},1151:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g={keyword:"anyOf",schemaType:"array",trackErrors:true,code:m.validateUnion,error:{message:"must match a schema in anyOf"}};u["default"]=g},4503:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:({params:{min:t,max:u}})=>u===undefined?(0,m.str)`must contain at least ${t} valid item(s)`:(0,m.str)`must contain at least ${t} and no more than ${u} valid item(s)`,params:({params:{min:t,max:u}})=>u===undefined?(0,m._)`{minContains: ${t}}`:(0,m._)`{minContains: ${t}, maxContains: ${u}}`};const b={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:v,code(t){const{gen:u,schema:p,parentSchema:v,data:b,it:w}=t;let E;let S;const{minContains:$,maxContains:P}=v;if(w.opts.next){E=$===undefined?1:$;S=P}else{E=1}const R=u.const("len",(0,m._)`${b}.length`);t.setParams({min:E,max:S});if(S===undefined&&E===0){(0,g.checkStrictMode)(w,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(S!==undefined&&E>S){(0,g.checkStrictMode)(w,`"minContains" > "maxContains" is always invalid`);t.fail();return}if((0,g.alwaysValidSchema)(w,p)){let u=(0,m._)`${R} >= ${E}`;if(S!==undefined)u=(0,m._)`${u} && ${R} <= ${S}`;t.pass(u);return}w.items=true;const x=u.name("valid");if(S===undefined&&E===1){validateItems(x,(()=>u.if(x,(()=>u.break()))))}else if(E===0){u.let(x,true);if(S!==undefined)u.if((0,m._)`${b}.length > 0`,validateItemsWithCount)}else{u.let(x,false);validateItemsWithCount()}t.result(x,(()=>t.reset()));function validateItemsWithCount(){const t=u.name("_valid");const p=u.let("count",0);validateItems(t,(()=>u.if(t,(()=>checkLimits(p)))))}function validateItems(p,m){u.forRange("i",0,R,(u=>{t.subschema({keyword:"contains",dataProp:u,dataPropType:g.Type.Num,compositeRule:true},p);m()}))}function checkLimits(t){u.code((0,m._)`${t}++`);if(S===undefined){u.if((0,m._)`${t} >= ${E}`,(()=>u.assign(x,true).break()))}else{u.if((0,m._)`${t} > ${S}`,(()=>u.assign(x,false).break()));if(E===1)u.assign(x,true);else u.if((0,m._)`${t} >= ${E}`,(()=>u.assign(x,true)))}}}};u["default"]=b},4239:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateSchemaDeps=u.validatePropertyDeps=u.error=void 0;const m=p(4671);const g=p(5049);const v=p(1919);u.error={message:({params:{property:t,depsCount:u,deps:p}})=>{const g=u===1?"property":"properties";return(0,m.str)`must have ${g} ${p} when property ${t} is present`},params:({params:{property:t,depsCount:u,deps:p,missingProperty:g}})=>(0,m._)`{property: ${t},
5
+ || ${w} === "boolean" || ${g} === null`).assign(E,(0,b._)`[${g}]`)}}}function assignParentData({gen:t,parentData:u,parentDataProperty:p},m){t.if((0,b._)`${u} !== undefined`,(()=>t.assign((0,b._)`${u}[${p}]`,m)))}function checkDataType(t,u,p,m=E.Correct){const g=m===E.Correct?b.operators.EQ:b.operators.NEQ;let v;switch(t){case"null":return(0,b._)`${u} ${g} null`;case"array":v=(0,b._)`Array.isArray(${u})`;break;case"object":v=(0,b._)`${u} && typeof ${u} == "object" && !Array.isArray(${u})`;break;case"integer":v=numCond((0,b._)`!(${u} % 1) && !isNaN(${u})`);break;case"number":v=numCond();break;default:return(0,b._)`typeof ${u} ${g} ${t}`}return m===E.Correct?v:(0,b.not)(v);function numCond(t=b.nil){return(0,b.and)((0,b._)`typeof ${u} == "number"`,t,p?(0,b._)`isFinite(${u})`:b.nil)}}u.checkDataType=checkDataType;function checkDataTypes(t,u,p,m){if(t.length===1){return checkDataType(t[0],u,p,m)}let g;const v=(0,w.toHash)(t);if(v.array&&v.object){const t=(0,b._)`typeof ${u} != "object"`;g=v.null?t:(0,b._)`!${u} || ${t}`;delete v.null;delete v.array;delete v.object}else{g=b.nil}if(v.number)delete v.integer;for(const t in v)g=(0,b.and)(g,checkDataType(t,u,p,m));return g}u.checkDataTypes=checkDataTypes;const $={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:u})=>typeof t=="string"?(0,b._)`{type: ${t}}`:(0,b._)`{type: ${u}}`};function reportTypeError(t){const u=getTypeErrorContext(t);(0,v.reportError)(u,$)}u.reportTypeError=reportTypeError;function getTypeErrorContext(t){const{gen:u,data:p,schema:m}=t;const g=(0,w.schemaRefOrVal)(t,m,"type");return{gen:u,keyword:"type",data:p,schema:m.type,schemaCode:g,schemaValue:g,parentSchema:m,params:{},it:t}}},2168:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.assignDefaults=void 0;const m=p(4671);const g=p(5049);function assignDefaults(t,u){const{properties:p,items:m}=t.schema;if(u==="object"&&p){for(const u in p){assignDefault(t,u,p[u].default)}}else if(u==="array"&&Array.isArray(m)){m.forEach(((u,p)=>assignDefault(t,p,u.default)))}}u.assignDefaults=assignDefaults;function assignDefault(t,u,p){const{gen:v,compositeRule:b,data:w,opts:E}=t;if(p===undefined)return;const S=(0,m._)`${w}${(0,m.getProperty)(u)}`;if(b){(0,g.checkStrictMode)(t,`default is ignored for: ${S}`);return}let $=(0,m._)`${S} === undefined`;if(E.useDefaults==="empty"){$=(0,m._)`${$} || ${S} === null || ${S} === ""`}v.if($,(0,m._)`${S} = ${(0,m.stringify)(p)}`)}},324:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.getData=u.KeywordCxt=u.validateFunctionCode=void 0;const m=p(5885);const g=p(3330);const v=p(7837);const b=p(3330);const w=p(2168);const E=p(9007);const S=p(3893);const $=p(4671);const P=p(1529);const R=p(9749);const x=p(5049);const O=p(7446);function validateFunctionCode(t){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){topSchemaObjCode(t);return}}validateFunction(t,(()=>(0,m.topBoolOrEmptySchema)(t)))}u.validateFunctionCode=validateFunctionCode;function validateFunction({gen:t,validateName:u,schema:p,schemaEnv:m,opts:g},v){if(g.code.es5){t.func(u,(0,$._)`${P.default.data}, ${P.default.valCxt}`,m.$async,(()=>{t.code((0,$._)`"use strict"; ${funcSourceUrl(p,g)}`);destructureValCxtES5(t,g);t.code(v)}))}else{t.func(u,(0,$._)`${P.default.data}, ${destructureValCxt(g)}`,m.$async,(()=>t.code(funcSourceUrl(p,g)).code(v)))}}function destructureValCxt(t){return(0,$._)`{${P.default.instancePath}="", ${P.default.parentData}, ${P.default.parentDataProperty}, ${P.default.rootData}=${P.default.data}${t.dynamicRef?(0,$._)`, ${P.default.dynamicAnchors}={}`:$.nil}}={}`}function destructureValCxtES5(t,u){t.if(P.default.valCxt,(()=>{t.var(P.default.instancePath,(0,$._)`${P.default.valCxt}.${P.default.instancePath}`);t.var(P.default.parentData,(0,$._)`${P.default.valCxt}.${P.default.parentData}`);t.var(P.default.parentDataProperty,(0,$._)`${P.default.valCxt}.${P.default.parentDataProperty}`);t.var(P.default.rootData,(0,$._)`${P.default.valCxt}.${P.default.rootData}`);if(u.dynamicRef)t.var(P.default.dynamicAnchors,(0,$._)`${P.default.valCxt}.${P.default.dynamicAnchors}`)}),(()=>{t.var(P.default.instancePath,(0,$._)`""`);t.var(P.default.parentData,(0,$._)`undefined`);t.var(P.default.parentDataProperty,(0,$._)`undefined`);t.var(P.default.rootData,P.default.data);if(u.dynamicRef)t.var(P.default.dynamicAnchors,(0,$._)`{}`)}))}function topSchemaObjCode(t){const{schema:u,opts:p,gen:m}=t;validateFunction(t,(()=>{if(p.$comment&&u.$comment)commentKeyword(t);checkNoDefault(t);m.let(P.default.vErrors,null);m.let(P.default.errors,0);if(p.unevaluated)resetEvaluated(t);typeAndKeywords(t);returnResults(t)}));return}function resetEvaluated(t){const{gen:u,validateName:p}=t;t.evaluated=u.const("evaluated",(0,$._)`${p}.evaluated`);u.if((0,$._)`${t.evaluated}.dynamicProps`,(()=>u.assign((0,$._)`${t.evaluated}.props`,(0,$._)`undefined`)));u.if((0,$._)`${t.evaluated}.dynamicItems`,(()=>u.assign((0,$._)`${t.evaluated}.items`,(0,$._)`undefined`)))}function funcSourceUrl(t,u){const p=typeof t=="object"&&t[u.schemaId];return p&&(u.code.source||u.code.process)?(0,$._)`/*# sourceURL=${p} */`:$.nil}function subschemaCode(t,u){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){subSchemaObjCode(t,u);return}}(0,m.boolOrEmptySchema)(t,u)}function schemaCxtHasRules({schema:t,self:u}){if(typeof t=="boolean")return!t;for(const p in t)if(u.RULES.all[p])return true;return false}function isSchemaObj(t){return typeof t.schema!="boolean"}function subSchemaObjCode(t,u){const{schema:p,gen:m,opts:g}=t;if(g.$comment&&p.$comment)commentKeyword(t);updateContext(t);checkAsyncSchema(t);const v=m.const("_errs",P.default.errors);typeAndKeywords(t,v);m.var(u,(0,$._)`${v} === ${P.default.errors}`)}function checkKeywords(t){(0,x.checkUnknownRules)(t);checkRefsAndKeywords(t)}function typeAndKeywords(t,u){if(t.opts.jtd)return schemaKeywords(t,[],false,u);const p=(0,g.getSchemaTypes)(t.schema);const m=(0,g.coerceAndCheckDataType)(t,p);schemaKeywords(t,p,!m,u)}function checkRefsAndKeywords(t){const{schema:u,errSchemaPath:p,opts:m,self:g}=t;if(u.$ref&&m.ignoreKeywordsWithRef&&(0,x.schemaHasRulesButRef)(u,g.RULES)){g.logger.warn(`$ref: keywords ignored in schema at path "${p}"`)}}function checkNoDefault(t){const{schema:u,opts:p}=t;if(u.default!==undefined&&p.useDefaults&&p.strictSchema){(0,x.checkStrictMode)(t,"default is ignored in the schema root")}}function updateContext(t){const u=t.schema[t.opts.schemaId];if(u)t.baseId=(0,R.resolveUrl)(t.opts.uriResolver,t.baseId,u)}function checkAsyncSchema(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen:t,schemaEnv:u,schema:p,errSchemaPath:m,opts:g}){const v=p.$comment;if(g.$comment===true){t.code((0,$._)`${P.default.self}.logger.log(${v})`)}else if(typeof g.$comment=="function"){const p=(0,$.str)`${m}/$comment`;const g=t.scopeValue("root",{ref:u.root});t.code((0,$._)`${P.default.self}.opts.$comment(${v}, ${p}, ${g}.schema)`)}}function returnResults(t){const{gen:u,schemaEnv:p,validateName:m,ValidationError:g,opts:v}=t;if(p.$async){u.if((0,$._)`${P.default.errors} === 0`,(()=>u.return(P.default.data)),(()=>u.throw((0,$._)`new ${g}(${P.default.vErrors})`)))}else{u.assign((0,$._)`${m}.errors`,P.default.vErrors);if(v.unevaluated)assignEvaluated(t);u.return((0,$._)`${P.default.errors} === 0`)}}function assignEvaluated({gen:t,evaluated:u,props:p,items:m}){if(p instanceof $.Name)t.assign((0,$._)`${u}.props`,p);if(m instanceof $.Name)t.assign((0,$._)`${u}.items`,m)}function schemaKeywords(t,u,p,m){const{gen:g,schema:w,data:E,allErrors:S,opts:R,self:O}=t;const{RULES:A}=O;if(w.$ref&&(R.ignoreKeywordsWithRef||!(0,x.schemaHasRulesButRef)(w,A))){g.block((()=>keywordCode(t,"$ref",A.all.$ref.definition)));return}if(!R.jtd)checkStrictTypes(t,u);g.block((()=>{for(const t of A.rules)groupKeywords(t);groupKeywords(A.post)}));function groupKeywords(x){if(!(0,v.shouldUseGroup)(w,x))return;if(x.type){g.if((0,b.checkDataType)(x.type,E,R.strictNumbers));iterateKeywords(t,x);if(u.length===1&&u[0]===x.type&&p){g.else();(0,b.reportTypeError)(t)}g.endIf()}else{iterateKeywords(t,x)}if(!S)g.if((0,$._)`${P.default.errors} === ${m||0}`)}}function iterateKeywords(t,u){const{gen:p,schema:m,opts:{useDefaults:g}}=t;if(g)(0,w.assignDefaults)(t,u.type);p.block((()=>{for(const p of u.rules){if((0,v.shouldUseRule)(m,p)){keywordCode(t,p.keyword,p.definition,u.type)}}}))}function checkStrictTypes(t,u){if(t.schemaEnv.meta||!t.opts.strictTypes)return;checkContextTypes(t,u);if(!t.opts.allowUnionTypes)checkMultipleTypes(t,u);checkKeywordTypes(t,t.dataTypes)}function checkContextTypes(t,u){if(!u.length)return;if(!t.dataTypes.length){t.dataTypes=u;return}u.forEach((u=>{if(!includesType(t.dataTypes,u)){strictTypesError(t,`type "${u}" not allowed by context "${t.dataTypes.join(",")}"`)}}));narrowSchemaTypes(t,u)}function checkMultipleTypes(t,u){if(u.length>1&&!(u.length===2&&u.includes("null"))){strictTypesError(t,"use allowUnionTypes to allow union type keyword")}}function checkKeywordTypes(t,u){const p=t.self.RULES.all;for(const m in p){const g=p[m];if(typeof g=="object"&&(0,v.shouldUseRule)(t.schema,g)){const{type:p}=g.definition;if(p.length&&!p.some((t=>hasApplicableType(u,t)))){strictTypesError(t,`missing type "${p.join(",")}" for keyword "${m}"`)}}}}function hasApplicableType(t,u){return t.includes(u)||u==="number"&&t.includes("integer")}function includesType(t,u){return t.includes(u)||u==="integer"&&t.includes("number")}function narrowSchemaTypes(t,u){const p=[];for(const m of t.dataTypes){if(includesType(u,m))p.push(m);else if(u.includes("integer")&&m==="number")p.push("integer")}t.dataTypes=p}function strictTypesError(t,u){const p=t.schemaEnv.baseId+t.errSchemaPath;u+=` at "${p}" (strictTypes)`;(0,x.checkStrictMode)(t,u,t.opts.strictTypes)}class KeywordCxt{constructor(t,u,p){(0,E.validateKeywordUsage)(t,u,p);this.gen=t.gen;this.allErrors=t.allErrors;this.keyword=p;this.data=t.data;this.schema=t.schema[p];this.$data=u.$data&&t.opts.$data&&this.schema&&this.schema.$data;this.schemaValue=(0,x.schemaRefOrVal)(t,this.schema,p,this.$data);this.schemaType=u.schemaType;this.parentSchema=t.schema;this.params={};this.it=t;this.def=u;if(this.$data){this.schemaCode=t.gen.const("vSchema",getData(this.$data,t))}else{this.schemaCode=this.schemaValue;if(!(0,E.validSchemaType)(this.schema,u.schemaType,u.allowUndefined)){throw new Error(`${p} value must be ${JSON.stringify(u.schemaType)}`)}}if("code"in u?u.trackErrors:u.errors!==false){this.errsCount=t.gen.const("_errs",P.default.errors)}}result(t,u,p){this.failResult((0,$.not)(t),u,p)}failResult(t,u,p){this.gen.if(t);if(p)p();else this.error();if(u){this.gen.else();u();if(this.allErrors)this.gen.endIf()}else{if(this.allErrors)this.gen.endIf();else this.gen.else()}}pass(t,u){this.failResult((0,$.not)(t),undefined,u)}fail(t){if(t===undefined){this.error();if(!this.allErrors)this.gen.if(false);return}this.gen.if(t);this.error();if(this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:u}=this;this.fail((0,$._)`${u} !== undefined && (${(0,$.or)(this.invalid$data(),t)})`)}error(t,u,p){if(u){this.setParams(u);this._error(t,p);this.setParams({});return}this._error(t,p)}_error(t,u){(t?O.reportExtraError:O.reportError)(this,this.def.error,u)}$dataError(){(0,O.reportError)(this,this.def.$dataError||O.keyword$DataError)}reset(){if(this.errsCount===undefined)throw new Error('add "trackErrors" to keyword definition');(0,O.resetErrorsCount)(this.gen,this.errsCount)}ok(t){if(!this.allErrors)this.gen.if(t)}setParams(t,u){if(u)Object.assign(this.params,t);else this.params=t}block$data(t,u,p=$.nil){this.gen.block((()=>{this.check$data(t,p);u()}))}check$data(t=$.nil,u=$.nil){if(!this.$data)return;const{gen:p,schemaCode:m,schemaType:g,def:v}=this;p.if((0,$.or)((0,$._)`${m} === undefined`,u));if(t!==$.nil)p.assign(t,true);if(g.length||v.validateSchema){p.elseIf(this.invalid$data());this.$dataError();if(t!==$.nil)p.assign(t,false)}p.else()}invalid$data(){const{gen:t,schemaCode:u,schemaType:p,def:m,it:g}=this;return(0,$.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(p.length){if(!(u instanceof $.Name))throw new Error("ajv implementation error");const t=Array.isArray(p)?p:[p];return(0,$._)`${(0,b.checkDataTypes)(t,u,g.opts.strictNumbers,b.DataType.Wrong)}`}return $.nil}function invalid$DataSchema(){if(m.validateSchema){const p=t.scopeValue("validate$data",{ref:m.validateSchema});return(0,$._)`!${p}(${u})`}return $.nil}}subschema(t,u){const p=(0,S.getSubschema)(this.it,t);(0,S.extendSubschemaData)(p,this.it,t);(0,S.extendSubschemaMode)(p,t);const m={...this.it,...p,items:undefined,props:undefined};subschemaCode(m,u);return m}mergeEvaluated(t,u){const{it:p,gen:m}=this;if(!p.opts.unevaluated)return;if(p.props!==true&&t.props!==undefined){p.props=x.mergeEvaluated.props(m,t.props,p.props,u)}if(p.items!==true&&t.items!==undefined){p.items=x.mergeEvaluated.items(m,t.items,p.items,u)}}mergeValidEvaluated(t,u){const{it:p,gen:m}=this;if(p.opts.unevaluated&&(p.props!==true||p.items!==true)){m.if(u,(()=>this.mergeEvaluated(t,$.Name)));return true}}}u.KeywordCxt=KeywordCxt;function keywordCode(t,u,p,m){const g=new KeywordCxt(t,p,u);if("code"in p){p.code(g,m)}else if(g.$data&&p.validate){(0,E.funcKeywordCode)(g,p)}else if("macro"in p){(0,E.macroKeywordCode)(g,p)}else if(p.compile||p.validate){(0,E.funcKeywordCode)(g,p)}}const A=/^\/(?:[^~]|~0|~1)*$/;const k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(t,{dataLevel:u,dataNames:p,dataPathArr:m}){let g;let v;if(t==="")return P.default.rootData;if(t[0]==="/"){if(!A.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);g=t;v=P.default.rootData}else{const b=k.exec(t);if(!b)throw new Error(`Invalid JSON-pointer: ${t}`);const w=+b[1];g=b[2];if(g==="#"){if(w>=u)throw new Error(errorMsg("property/index",w));return m[u-w]}if(w>u)throw new Error(errorMsg("data",w));v=p[u-w];if(!g)return v}let b=v;const w=g.split("/");for(const t of w){if(t){v=(0,$._)`${v}${(0,$.getProperty)((0,x.unescapeJsonPointer)(t))}`;b=(0,$._)`${b} && ${v}`}}return b;function errorMsg(t,p){return`Cannot access ${t} ${p} levels up, current level is ${u}`}}u.getData=getData},9007:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateKeywordUsage=u.validSchemaType=u.funcKeywordCode=u.macroKeywordCode=void 0;const m=p(4671);const g=p(1529);const v=p(1919);const b=p(7446);function macroKeywordCode(t,u){const{gen:p,keyword:g,schema:v,parentSchema:b,it:w}=t;const E=u.macro.call(w.self,v,b,w);const S=useKeyword(p,g,E);if(w.opts.validateSchema!==false)w.self.validateSchema(E,true);const $=p.name("valid");t.subschema({schema:E,schemaPath:m.nil,errSchemaPath:`${w.errSchemaPath}/${g}`,topSchemaRef:S,compositeRule:true},$);t.pass($,(()=>t.error(true)))}u.macroKeywordCode=macroKeywordCode;function funcKeywordCode(t,u){var p;const{gen:b,keyword:w,schema:E,parentSchema:S,$data:$,it:P}=t;checkAsyncKeyword(P,u);const R=!$&&u.compile?u.compile.call(P.self,E,S,P):u.validate;const x=useKeyword(b,w,R);const O=b.let("valid");t.block$data(O,validateKeyword);t.ok((p=u.valid)!==null&&p!==void 0?p:O);function validateKeyword(){if(u.errors===false){assignValid();if(u.modifying)modifyData(t);reportErrs((()=>t.error()))}else{const p=u.async?validateAsync():validateSync();if(u.modifying)modifyData(t);reportErrs((()=>addErrs(t,p)))}}function validateAsync(){const t=b.let("ruleErrs",null);b.try((()=>assignValid((0,m._)`await `)),(u=>b.assign(O,false).if((0,m._)`${u} instanceof ${P.ValidationError}`,(()=>b.assign(t,(0,m._)`${u}.errors`)),(()=>b.throw(u)))));return t}function validateSync(){const t=(0,m._)`${x}.errors`;b.assign(t,null);assignValid(m.nil);return t}function assignValid(p=(u.async?(0,m._)`await `:m.nil)){const w=P.opts.passContext?g.default.this:g.default.self;const E=!("compile"in u&&!$||u.schema===false);b.assign(O,(0,m._)`${p}${(0,v.callValidateCode)(t,x,w,E)}`,u.modifying)}function reportErrs(t){var p;b.if((0,m.not)((p=u.valid)!==null&&p!==void 0?p:O),t)}}u.funcKeywordCode=funcKeywordCode;function modifyData(t){const{gen:u,data:p,it:g}=t;u.if(g.parentData,(()=>u.assign(p,(0,m._)`${g.parentData}[${g.parentDataProperty}]`)))}function addErrs(t,u){const{gen:p}=t;p.if((0,m._)`Array.isArray(${u})`,(()=>{p.assign(g.default.vErrors,(0,m._)`${g.default.vErrors} === null ? ${u} : ${g.default.vErrors}.concat(${u})`).assign(g.default.errors,(0,m._)`${g.default.vErrors}.length`);(0,b.extendErrors)(t)}),(()=>t.error()))}function checkAsyncKeyword({schemaEnv:t},u){if(u.async&&!t.$async)throw new Error("async keyword in sync schema")}function useKeyword(t,u,p){if(p===undefined)throw new Error(`keyword "${u}" failed to compile`);return t.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0,m.stringify)(p)})}function validSchemaType(t,u,p=false){return!u.length||u.some((u=>u==="array"?Array.isArray(t):u==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==u||p&&typeof t=="undefined"))}u.validSchemaType=validSchemaType;function validateKeywordUsage({schema:t,opts:u,self:p,errSchemaPath:m},g,v){if(Array.isArray(g.keyword)?!g.keyword.includes(v):g.keyword!==v){throw new Error("ajv implementation error")}const b=g.dependencies;if(b===null||b===void 0?void 0:b.some((u=>!Object.prototype.hasOwnProperty.call(t,u)))){throw new Error(`parent schema must have dependencies of ${v}: ${b.join(",")}`)}if(g.validateSchema){const b=g.validateSchema(t[v]);if(!b){const t=`keyword "${v}" value is invalid at path "${m}": `+p.errorsText(g.validateSchema.errors);if(u.validateSchema==="log")p.logger.error(t);else throw new Error(t)}}}u.validateKeywordUsage=validateKeywordUsage},3893:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.extendSubschemaMode=u.extendSubschemaData=u.getSubschema=void 0;const m=p(4671);const g=p(5049);function getSubschema(t,{keyword:u,schemaProp:p,schema:v,schemaPath:b,errSchemaPath:w,topSchemaRef:E}){if(u!==undefined&&v!==undefined){throw new Error('both "keyword" and "schema" passed, only one allowed')}if(u!==undefined){const v=t.schema[u];return p===undefined?{schema:v,schemaPath:(0,m._)`${t.schemaPath}${(0,m.getProperty)(u)}`,errSchemaPath:`${t.errSchemaPath}/${u}`}:{schema:v[p],schemaPath:(0,m._)`${t.schemaPath}${(0,m.getProperty)(u)}${(0,m.getProperty)(p)}`,errSchemaPath:`${t.errSchemaPath}/${u}/${(0,g.escapeFragment)(p)}`}}if(v!==undefined){if(b===undefined||w===undefined||E===undefined){throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')}return{schema:v,schemaPath:b,topSchemaRef:E,errSchemaPath:w}}throw new Error('either "keyword" or "schema" must be passed')}u.getSubschema=getSubschema;function extendSubschemaData(t,u,{dataProp:p,dataPropType:v,data:b,dataTypes:w,propertyName:E}){if(b!==undefined&&p!==undefined){throw new Error('both "data" and "dataProp" passed, only one allowed')}const{gen:S}=u;if(p!==undefined){const{errorPath:b,dataPathArr:w,opts:E}=u;const $=S.let("data",(0,m._)`${u.data}${(0,m.getProperty)(p)}`,true);dataContextProps($);t.errorPath=(0,m.str)`${b}${(0,g.getErrorPath)(p,v,E.jsPropertySyntax)}`;t.parentDataProperty=(0,m._)`${p}`;t.dataPathArr=[...w,t.parentDataProperty]}if(b!==undefined){const u=b instanceof m.Name?b:S.let("data",b,true);dataContextProps(u);if(E!==undefined)t.propertyName=E}if(w)t.dataTypes=w;function dataContextProps(p){t.data=p;t.dataLevel=u.dataLevel+1;t.dataTypes=[];u.definedProperties=new Set;t.parentData=u.data;t.dataNames=[...u.dataNames,p]}}u.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(t,{jtdDiscriminator:u,jtdMetadata:p,compositeRule:m,createErrors:g,allErrors:v}){if(m!==undefined)t.compositeRule=m;if(g!==undefined)t.createErrors=g;if(v!==undefined)t.allErrors=v;t.jtdDiscriminator=u;t.jtdMetadata=p}u.extendSubschemaMode=extendSubschemaMode},6952:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=void 0;var m=p(324);Object.defineProperty(u,"KeywordCxt",{enumerable:true,get:function(){return m.KeywordCxt}});var g=p(4671);Object.defineProperty(u,"_",{enumerable:true,get:function(){return g._}});Object.defineProperty(u,"str",{enumerable:true,get:function(){return g.str}});Object.defineProperty(u,"stringify",{enumerable:true,get:function(){return g.stringify}});Object.defineProperty(u,"nil",{enumerable:true,get:function(){return g.nil}});Object.defineProperty(u,"Name",{enumerable:true,get:function(){return g.Name}});Object.defineProperty(u,"CodeGen",{enumerable:true,get:function(){return g.CodeGen}});const v=p(4068);const b=p(909);const w=p(2166);const E=p(4033);const S=p(4671);const $=p(9749);const P=p(3330);const R=p(5049);const x=p(3770);const O=p(7438);const defaultRegExp=(t,u)=>new RegExp(t,u);defaultRegExp.code="new RegExp";const A=["removeAdditional","useDefaults","coerceTypes"];const k=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]);const T={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."};const C={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};const I=200;function requiredOptions(t){var u,p,m,g,v,b,w,E,S,$,P,R,x,A,k,T,C,N,D,j,L,M,U,B,H;const z=t.strict;const V=(u=t.code)===null||u===void 0?void 0:u.optimize;const G=V===true||V===undefined?1:V||0;const q=(m=(p=t.code)===null||p===void 0?void 0:p.regExp)!==null&&m!==void 0?m:defaultRegExp;const W=(g=t.uriResolver)!==null&&g!==void 0?g:O.default;return{strictSchema:(b=(v=t.strictSchema)!==null&&v!==void 0?v:z)!==null&&b!==void 0?b:true,strictNumbers:(E=(w=t.strictNumbers)!==null&&w!==void 0?w:z)!==null&&E!==void 0?E:true,strictTypes:($=(S=t.strictTypes)!==null&&S!==void 0?S:z)!==null&&$!==void 0?$:"log",strictTuples:(R=(P=t.strictTuples)!==null&&P!==void 0?P:z)!==null&&R!==void 0?R:"log",strictRequired:(A=(x=t.strictRequired)!==null&&x!==void 0?x:z)!==null&&A!==void 0?A:false,code:t.code?{...t.code,optimize:G,regExp:q}:{optimize:G,regExp:q},loopRequired:(k=t.loopRequired)!==null&&k!==void 0?k:I,loopEnum:(T=t.loopEnum)!==null&&T!==void 0?T:I,meta:(C=t.meta)!==null&&C!==void 0?C:true,messages:(N=t.messages)!==null&&N!==void 0?N:true,inlineRefs:(D=t.inlineRefs)!==null&&D!==void 0?D:true,schemaId:(j=t.schemaId)!==null&&j!==void 0?j:"$id",addUsedSchema:(L=t.addUsedSchema)!==null&&L!==void 0?L:true,validateSchema:(M=t.validateSchema)!==null&&M!==void 0?M:true,validateFormats:(U=t.validateFormats)!==null&&U!==void 0?U:true,unicodeRegExp:(B=t.unicodeRegExp)!==null&&B!==void 0?B:true,int32range:(H=t.int32range)!==null&&H!==void 0?H:true,uriResolver:W}}class Ajv{constructor(t={}){this.schemas={};this.refs={};this.formats=Object.create(null);this._compilations=new Set;this._loading={};this._cache=new Map;t=this.opts={...t,...requiredOptions(t)};const{es5:u,lines:p}=this.opts.code;this.scope=new S.ValueScope({scope:{},prefixes:k,es5:u,lines:p});this.logger=getLogger(t.logger);const m=t.validateFormats;t.validateFormats=false;this.RULES=(0,w.getRules)();checkOptions.call(this,T,t,"NOT SUPPORTED");checkOptions.call(this,C,t,"DEPRECATED","warn");this._metaOpts=getMetaSchemaOptions.call(this);if(t.formats)addInitialFormats.call(this);this._addVocabularies();this._addDefaultMetaSchema();if(t.keywords)addInitialKeywords.call(this,t.keywords);if(typeof t.meta=="object")this.addMetaSchema(t.meta);addInitialSchemas.call(this);t.validateFormats=m}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:u,schemaId:p}=this.opts;let m=x;if(p==="id"){m={...x};m.id=m.$id;delete m.$id}if(u&&t)this.addMetaSchema(m,m[p],false)}defaultMeta(){const{meta:t,schemaId:u}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[u]||t:undefined}validate(t,u){let p;if(typeof t=="string"){p=this.getSchema(t);if(!p)throw new Error(`no schema with key or ref "${t}"`)}else{p=this.compile(t)}const m=p(u);if(!("$async"in p))this.errors=p.errors;return m}compile(t,u){const p=this._addSchema(t,u);return p.validate||this._compileSchemaEnv(p)}compileAsync(t,u){if(typeof this.opts.loadSchema!="function"){throw new Error("options.loadSchema should be a function")}const{loadSchema:p}=this.opts;return runCompileAsync.call(this,t,u);async function runCompileAsync(t,u){await loadMetaSchema.call(this,t.$schema);const p=this._addSchema(t,u);return p.validate||_compileAsync.call(this,p)}async function loadMetaSchema(t){if(t&&!this.getSchema(t)){await runCompileAsync.call(this,{$ref:t},true)}}async function _compileAsync(t){try{return this._compileSchemaEnv(t)}catch(u){if(!(u instanceof b.default))throw u;checkLoaded.call(this,u);await loadMissingSchema.call(this,u.missingSchema);return _compileAsync.call(this,t)}}function checkLoaded({missingSchema:t,missingRef:u}){if(this.refs[t]){throw new Error(`AnySchema ${t} is loaded but ${u} cannot be resolved`)}}async function loadMissingSchema(t){const p=await _loadSchema.call(this,t);if(!this.refs[t])await loadMetaSchema.call(this,p.$schema);if(!this.refs[t])this.addSchema(p,t,u)}async function _loadSchema(t){const u=this._loading[t];if(u)return u;try{return await(this._loading[t]=p(t))}finally{delete this._loading[t]}}}addSchema(t,u,p,m=this.opts.validateSchema){if(Array.isArray(t)){for(const u of t)this.addSchema(u,undefined,p,m);return this}let g;if(typeof t==="object"){const{schemaId:u}=this.opts;g=t[u];if(g!==undefined&&typeof g!="string"){throw new Error(`schema ${u} must be string`)}}u=(0,$.normalizeId)(u||g);this._checkUnique(u);this.schemas[u]=this._addSchema(t,p,u,m,true);return this}addMetaSchema(t,u,p=this.opts.validateSchema){this.addSchema(t,u,true,p);return this}validateSchema(t,u){if(typeof t=="boolean")return true;let p;p=t.$schema;if(p!==undefined&&typeof p!="string"){throw new Error("$schema must be a string")}p=p||this.opts.defaultMeta||this.defaultMeta();if(!p){this.logger.warn("meta-schema not available");this.errors=null;return true}const m=this.validate(p,t);if(!m&&u){const t="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(t);else throw new Error(t)}return m}getSchema(t){let u;while(typeof(u=getSchEnv.call(this,t))=="string")t=u;if(u===undefined){const{schemaId:p}=this.opts;const m=new E.SchemaEnv({schema:{},schemaId:p});u=E.resolveSchema.call(this,m,t);if(!u)return;this.refs[t]=u}return u.validate||this._compileSchemaEnv(u)}removeSchema(t){if(t instanceof RegExp){this._removeAllSchemas(this.schemas,t);this._removeAllSchemas(this.refs,t);return this}switch(typeof t){case"undefined":this._removeAllSchemas(this.schemas);this._removeAllSchemas(this.refs);this._cache.clear();return this;case"string":{const u=getSchEnv.call(this,t);if(typeof u=="object")this._cache.delete(u.schema);delete this.schemas[t];delete this.refs[t];return this}case"object":{const u=t;this._cache.delete(u);let p=t[this.opts.schemaId];if(p){p=(0,$.normalizeId)(p);delete this.schemas[p];delete this.refs[p]}return this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const u of t)this.addKeyword(u);return this}addKeyword(t,u){let p;if(typeof t=="string"){p=t;if(typeof u=="object"){this.logger.warn("these parameters are deprecated, see docs for addKeyword");u.keyword=p}}else if(typeof t=="object"&&u===undefined){u=t;p=u.keyword;if(Array.isArray(p)&&!p.length){throw new Error("addKeywords: keyword must be string or non-empty array")}}else{throw new Error("invalid addKeywords parameters")}checkKeyword.call(this,p,u);if(!u){(0,R.eachItem)(p,(t=>addRule.call(this,t)));return this}keywordMetaschema.call(this,u);const m={...u,type:(0,P.getJSONTypes)(u.type),schemaType:(0,P.getJSONTypes)(u.schemaType)};(0,R.eachItem)(p,m.type.length===0?t=>addRule.call(this,t,m):t=>m.type.forEach((u=>addRule.call(this,t,m,u))));return this}getKeyword(t){const u=this.RULES.all[t];return typeof u=="object"?u.definition:!!u}removeKeyword(t){const{RULES:u}=this;delete u.keywords[t];delete u.all[t];for(const p of u.rules){const u=p.rules.findIndex((u=>u.keyword===t));if(u>=0)p.rules.splice(u,1)}return this}addFormat(t,u){if(typeof u=="string")u=new RegExp(u);this.formats[t]=u;return this}errorsText(t=this.errors,{separator:u=", ",dataVar:p="data"}={}){if(!t||t.length===0)return"No errors";return t.map((t=>`${p}${t.instancePath} ${t.message}`)).reduce(((t,p)=>t+u+p))}$dataMetaSchema(t,u){const p=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const m of u){const u=m.split("/").slice(1);let g=t;for(const t of u)g=g[t];for(const t in p){const u=p[t];if(typeof u!="object")continue;const{$data:m}=u.definition;const v=g[t];if(m&&v)g[t]=schemaOrData(v)}}return t}_removeAllSchemas(t,u){for(const p in t){const m=t[p];if(!u||u.test(p)){if(typeof m=="string"){delete t[p]}else if(m&&!m.meta){this._cache.delete(m.schema);delete t[p]}}}}_addSchema(t,u,p,m=this.opts.validateSchema,g=this.opts.addUsedSchema){let v;const{schemaId:b}=this.opts;if(typeof t=="object"){v=t[b]}else{if(this.opts.jtd)throw new Error("schema must be object");else if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let w=this._cache.get(t);if(w!==undefined)return w;p=(0,$.normalizeId)(v||p);const S=$.getSchemaRefs.call(this,t,p);w=new E.SchemaEnv({schema:t,schemaId:b,meta:u,baseId:p,localRefs:S});this._cache.set(w.schema,w);if(g&&!p.startsWith("#")){if(p)this._checkUnique(p);this.refs[p]=w}if(m)this.validateSchema(t,true);return w}_checkUnique(t){if(this.schemas[t]||this.refs[t]){throw new Error(`schema with key or id "${t}" already exists`)}}_compileSchemaEnv(t){if(t.meta)this._compileMetaSchema(t);else E.compileSchema.call(this,t);if(!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const u=this.opts;this.opts=this._metaOpts;try{E.compileSchema.call(this,t)}finally{this.opts=u}}}Ajv.ValidationError=v.default;Ajv.MissingRefError=b.default;u["default"]=Ajv;function checkOptions(t,u,p,m="error"){for(const g in t){const v=g;if(v in u)this.logger[m](`${p}: option ${g}. ${t[v]}`)}}function getSchEnv(t){t=(0,$.normalizeId)(t);return this.schemas[t]||this.refs[t]}function addInitialSchemas(){const t=this.opts.schemas;if(!t)return;if(Array.isArray(t))this.addSchema(t);else for(const u in t)this.addSchema(t[u],u)}function addInitialFormats(){for(const t in this.opts.formats){const u=this.opts.formats[t];if(u)this.addFormat(t,u)}}function addInitialKeywords(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const u in t){const p=t[u];if(!p.keyword)p.keyword=u;this.addKeyword(p)}}function getMetaSchemaOptions(){const t={...this.opts};for(const u of A)delete t[u];return t}const N={log(){},warn(){},error(){}};function getLogger(t){if(t===false)return N;if(t===undefined)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}const D=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(t,u){const{RULES:p}=this;(0,R.eachItem)(t,(t=>{if(p.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!D.test(t))throw new Error(`Keyword ${t} has invalid name`)}));if(!u)return;if(u.$data&&!("code"in u||"validate"in u)){throw new Error('$data keyword must have "code" or "validate" function')}}function addRule(t,u,p){var m;const g=u===null||u===void 0?void 0:u.post;if(p&&g)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:v}=this;let b=g?v.post:v.rules.find((({type:t})=>t===p));if(!b){b={type:p,rules:[]};v.rules.push(b)}v.keywords[t]=true;if(!u)return;const w={keyword:t,definition:{...u,type:(0,P.getJSONTypes)(u.type),schemaType:(0,P.getJSONTypes)(u.schemaType)}};if(u.before)addBeforeRule.call(this,b,w,u.before);else b.rules.push(w);v.all[t]=w;(m=u.implements)===null||m===void 0?void 0:m.forEach((t=>this.addKeyword(t)))}function addBeforeRule(t,u,p){const m=t.rules.findIndex((t=>t.keyword===p));if(m>=0){t.rules.splice(m,0,u)}else{t.rules.push(u);this.logger.warn(`rule ${p} is not defined`)}}function keywordMetaschema(t){let{metaSchema:u}=t;if(u===undefined)return;if(t.$data&&this.opts.$data)u=schemaOrData(u);t.validateSchema=this.compile(u,true)}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(t){return{anyOf:[t,j]}}},4010:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6261);const g=p(13);const v=p(7388);const b=p(2394);const w=p(4771);const E=p(9567);const S=p(8364);const $=p(2943);const P=["/properties"];function addMetaSchema2020(t){[m,g,v,b,w,with$data(this,E),S,with$data(this,$)].forEach((t=>this.addMetaSchema(t,undefined,false)));return this;function with$data(u,p){return t?u.$dataMetaSchema(p,P):p}}u["default"]=addMetaSchema2020},9804:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(7407);m.code='require("ajv/dist/runtime/equal").default';u["default"]=m},4679:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});function ucs2length(t){const u=t.length;let p=0;let m=0;let g;while(m<u){p++;g=t.charCodeAt(m++);if(g>=55296&&g<=56319&&m<u){g=t.charCodeAt(m);if((g&64512)===56320)m++}}return p}u["default"]=ucs2length;ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},7438:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1311);m.code='require("ajv/dist/runtime/uri").default';u["default"]=m},4068:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});class ValidationError extends Error{constructor(t){super("validation failed");this.errors=t;this.ajv=this.validation=true}}u["default"]=ValidationError},2063:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateAdditionalItems=void 0;const m=p(4671);const g=p(5049);const v={message:({params:{len:t}})=>(0,m.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,m._)`{limit: ${t}}`};const b={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:v,code(t){const{parentSchema:u,it:p}=t;const{items:m}=u;if(!Array.isArray(m)){(0,g.checkStrictMode)(p,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(t,m)}};function validateAdditionalItems(t,u){const{gen:p,schema:v,data:b,keyword:w,it:E}=t;E.items=true;const S=p.const("len",(0,m._)`${b}.length`);if(v===false){t.setParams({len:u.length});t.pass((0,m._)`${S} <= ${u.length}`)}else if(typeof v=="object"&&!(0,g.alwaysValidSchema)(E,v)){const g=p.var("valid",(0,m._)`${S} <= ${u.length}`);p.if((0,m.not)(g),(()=>validateItems(g)));t.ok(g)}function validateItems(v){p.forRange("i",u.length,S,(u=>{t.subschema({keyword:w,dataProp:u,dataPropType:g.Type.Num},v);if(!E.allErrors)p.if((0,m.not)(v),(()=>p.break()))}))}}u.validateAdditionalItems=validateAdditionalItems;u["default"]=b},8410:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g=p(4671);const v=p(1529);const b=p(5049);const w={message:"must NOT have additional properties",params:({params:t})=>(0,g._)`{additionalProperty: ${t.additionalProperty}}`};const E={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:w,code(t){const{gen:u,schema:p,parentSchema:w,data:E,errsCount:S,it:$}=t;if(!S)throw new Error("ajv implementation error");const{allErrors:P,opts:R}=$;$.props=true;if(R.removeAdditional!=="all"&&(0,b.alwaysValidSchema)($,p))return;const x=(0,m.allSchemaProperties)(w.properties);const O=(0,m.allSchemaProperties)(w.patternProperties);checkAdditionalProperties();t.ok((0,g._)`${S} === ${v.default.errors}`);function checkAdditionalProperties(){u.forIn("key",E,(t=>{if(!x.length&&!O.length)additionalPropertyCode(t);else u.if(isAdditional(t),(()=>additionalPropertyCode(t)))}))}function isAdditional(p){let v;if(x.length>8){const t=(0,b.schemaRefOrVal)($,w.properties,"properties");v=(0,m.isOwnProperty)(u,t,p)}else if(x.length){v=(0,g.or)(...x.map((t=>(0,g._)`${p} === ${t}`)))}else{v=g.nil}if(O.length){v=(0,g.or)(v,...O.map((u=>(0,g._)`${(0,m.usePattern)(t,u)}.test(${p})`)))}return(0,g.not)(v)}function deleteAdditional(t){u.code((0,g._)`delete ${E}[${t}]`)}function additionalPropertyCode(m){if(R.removeAdditional==="all"||R.removeAdditional&&p===false){deleteAdditional(m);return}if(p===false){t.setParams({additionalProperty:m});t.error();if(!P)u.break();return}if(typeof p=="object"&&!(0,b.alwaysValidSchema)($,p)){const p=u.name("valid");if(R.removeAdditional==="failing"){applyAdditionalSchema(m,p,false);u.if((0,g.not)(p),(()=>{t.reset();deleteAdditional(m)}))}else{applyAdditionalSchema(m,p);if(!P)u.if((0,g.not)(p),(()=>u.break()))}}}function applyAdditionalSchema(u,p,m){const g={keyword:"additionalProperties",dataProp:u,dataPropType:b.Type.Str};if(m===false){Object.assign(g,{compositeRule:true,createErrors:false,allErrors:false})}t.subschema(g,p)}}};u["default"]=E},382:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5049);const g={keyword:"allOf",schemaType:"array",code(t){const{gen:u,schema:p,it:g}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");const v=u.name("valid");p.forEach(((u,p)=>{if((0,m.alwaysValidSchema)(g,u))return;const b=t.subschema({keyword:"allOf",schemaProp:p},v);t.ok(v);t.mergeEvaluated(b)}))}};u["default"]=g},1151:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g={keyword:"anyOf",schemaType:"array",trackErrors:true,code:m.validateUnion,error:{message:"must match a schema in anyOf"}};u["default"]=g},4503:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:({params:{min:t,max:u}})=>u===undefined?(0,m.str)`must contain at least ${t} valid item(s)`:(0,m.str)`must contain at least ${t} and no more than ${u} valid item(s)`,params:({params:{min:t,max:u}})=>u===undefined?(0,m._)`{minContains: ${t}}`:(0,m._)`{minContains: ${t}, maxContains: ${u}}`};const b={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:v,code(t){const{gen:u,schema:p,parentSchema:v,data:b,it:w}=t;let E;let S;const{minContains:$,maxContains:P}=v;if(w.opts.next){E=$===undefined?1:$;S=P}else{E=1}const R=u.const("len",(0,m._)`${b}.length`);t.setParams({min:E,max:S});if(S===undefined&&E===0){(0,g.checkStrictMode)(w,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(S!==undefined&&E>S){(0,g.checkStrictMode)(w,`"minContains" > "maxContains" is always invalid`);t.fail();return}if((0,g.alwaysValidSchema)(w,p)){let u=(0,m._)`${R} >= ${E}`;if(S!==undefined)u=(0,m._)`${u} && ${R} <= ${S}`;t.pass(u);return}w.items=true;const x=u.name("valid");if(S===undefined&&E===1){validateItems(x,(()=>u.if(x,(()=>u.break()))))}else if(E===0){u.let(x,true);if(S!==undefined)u.if((0,m._)`${b}.length > 0`,validateItemsWithCount)}else{u.let(x,false);validateItemsWithCount()}t.result(x,(()=>t.reset()));function validateItemsWithCount(){const t=u.name("_valid");const p=u.let("count",0);validateItems(t,(()=>u.if(t,(()=>checkLimits(p)))))}function validateItems(p,m){u.forRange("i",0,R,(u=>{t.subschema({keyword:"contains",dataProp:u,dataPropType:g.Type.Num,compositeRule:true},p);m()}))}function checkLimits(t){u.code((0,m._)`${t}++`);if(S===undefined){u.if((0,m._)`${t} >= ${E}`,(()=>u.assign(x,true).break()))}else{u.if((0,m._)`${t} > ${S}`,(()=>u.assign(x,false).break()));if(E===1)u.assign(x,true);else u.if((0,m._)`${t} >= ${E}`,(()=>u.assign(x,true)))}}}};u["default"]=b},4239:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateSchemaDeps=u.validatePropertyDeps=u.error=void 0;const m=p(4671);const g=p(5049);const v=p(1919);u.error={message:({params:{property:t,depsCount:u,deps:p}})=>{const g=u===1?"property":"properties";return(0,m.str)`must have ${g} ${p} when property ${t} is present`},params:({params:{property:t,depsCount:u,deps:p,missingProperty:g}})=>(0,m._)`{property: ${t},
6
6
  missingProperty: ${g},
7
7
  depsCount: ${u},
8
- deps: ${p}}`};const b={keyword:"dependencies",type:"object",schemaType:"object",error:u.error,code(t){const[u,p]=splitDependencies(t);validatePropertyDeps(t,u);validateSchemaDeps(t,p)}};function splitDependencies({schema:t}){const u={};const p={};for(const m in t){if(m==="__proto__")continue;const g=Array.isArray(t[m])?u:p;g[m]=t[m]}return[u,p]}function validatePropertyDeps(t,u=t.schema){const{gen:p,data:g,it:b}=t;if(Object.keys(u).length===0)return;const w=p.let("missing");for(const E in u){const S=u[E];if(S.length===0)continue;const $=(0,v.propertyInData)(p,g,E,b.opts.ownProperties);t.setParams({property:E,depsCount:S.length,deps:S.join(", ")});if(b.allErrors){p.if($,(()=>{for(const u of S){(0,v.checkReportMissingProp)(t,u)}}))}else{p.if((0,m._)`${$} && (${(0,v.checkMissingProp)(t,S,w)})`);(0,v.reportMissingProp)(t,w);p.else()}}}u.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(t,u=t.schema){const{gen:p,data:m,keyword:b,it:w}=t;const E=p.name("valid");for(const S in u){if((0,g.alwaysValidSchema)(w,u[S]))continue;p.if((0,v.propertyInData)(p,m,S,w.opts.ownProperties),(()=>{const u=t.subschema({keyword:b,schemaProp:S},E);t.mergeValidEvaluated(u,E)}),(()=>p.var(E,true)));t.ok(E)}}u.validateSchemaDeps=validateSchemaDeps;u["default"]=b},2663:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4239);const g={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,m.validateSchemaDeps)(t)};u["default"]=g},6057:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:({params:t})=>(0,m.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,m._)`{failingKeyword: ${t.ifClause}}`};const b={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:v,code(t){const{gen:u,parentSchema:p,it:v}=t;if(p.then===undefined&&p.else===undefined){(0,g.checkStrictMode)(v,'"if" without "then" and "else" is ignored')}const b=hasSchema(v,"then");const w=hasSchema(v,"else");if(!b&&!w)return;const E=u.let("valid",true);const S=u.name("_valid");validateIf();t.reset();if(b&&w){const p=u.let("ifClause");t.setParams({ifClause:p});u.if(S,validateClause("then",p),validateClause("else",p))}else if(b){u.if(S,validateClause("then"))}else{u.if((0,m.not)(S),validateClause("else"))}t.pass(E,(()=>t.error(true)));function validateIf(){const u=t.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},S);t.mergeEvaluated(u)}function validateClause(p,g){return()=>{const v=t.subschema({keyword:p},S);u.assign(E,S);t.mergeValidEvaluated(v,E);if(g)u.assign(g,(0,m._)`${p}`);else t.setParams({ifClause:p})}}}};function hasSchema(t,u){const p=t.schema[u];return p!==undefined&&!(0,g.alwaysValidSchema)(t,p)}u["default"]=b},8112:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(2063);const g=p(8120);const v=p(6604);const b=p(8844);const w=p(4503);const E=p(4239);const S=p(1023);const $=p(8410);const P=p(8563);const R=p(9527);const x=p(8573);const O=p(1151);const A=p(8037);const k=p(382);const T=p(6057);const C=p(8472);function getApplicator(t=false){const u=[x.default,O.default,A.default,k.default,T.default,C.default,S.default,$.default,E.default,P.default,R.default];if(t)u.push(g.default,b.default);else u.push(m.default,v.default);u.push(w.default);return u}u["default"]=getApplicator},6604:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateTuple=void 0;const m=p(4671);const g=p(5049);const v=p(1919);const b={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:u,it:p}=t;if(Array.isArray(u))return validateTuple(t,"additionalItems",u);p.items=true;if((0,g.alwaysValidSchema)(p,u))return;t.ok((0,v.validateArray)(t))}};function validateTuple(t,u,p=t.schema){const{gen:v,parentSchema:b,data:w,keyword:E,it:S}=t;checkStrictTuple(b);if(S.opts.unevaluated&&p.length&&S.items!==true){S.items=g.mergeEvaluated.items(v,p.length,S.items)}const $=v.name("valid");const P=v.const("len",(0,m._)`${w}.length`);p.forEach(((u,p)=>{if((0,g.alwaysValidSchema)(S,u))return;v.if((0,m._)`${P} > ${p}`,(()=>t.subschema({keyword:E,schemaProp:p,dataProp:p},$)));t.ok($)}));function checkStrictTuple(t){const{opts:m,errSchemaPath:v}=S;const b=p.length;const w=b===t.minItems&&(b===t.maxItems||t[u]===false);if(m.strictTuples&&!w){const t=`"${E}" is ${b}-tuple, but minItems or maxItems/${u} are not specified or different at path "${v}"`;(0,g.checkStrictMode)(S,t,m.strictTuples)}}}u.validateTuple=validateTuple;u["default"]=b},8844:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(1919);const b=p(2063);const w={message:({params:{len:t}})=>(0,m.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,m._)`{limit: ${t}}`};const E={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:w,code(t){const{schema:u,parentSchema:p,it:m}=t;const{prefixItems:w}=p;m.items=true;if((0,g.alwaysValidSchema)(m,u))return;if(w)(0,b.validateAdditionalItems)(t,w);else t.ok((0,v.validateArray)(t))}};u["default"]=E},8573:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5049);const g={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(t){const{gen:u,schema:p,it:g}=t;if((0,m.alwaysValidSchema)(g,p)){t.fail();return}const v=u.name("valid");t.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},v);t.failResult(v,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}};u["default"]=g},8037:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,m._)`{passingSchemas: ${t.passing}}`};const b={keyword:"oneOf",schemaType:"array",trackErrors:true,error:v,code(t){const{gen:u,schema:p,parentSchema:v,it:b}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");if(b.opts.discriminator&&v.discriminator)return;const w=p;const E=u.let("valid",false);const S=u.let("passing",null);const $=u.name("_valid");t.setParams({passing:S});u.block(validateOneOf);t.result(E,(()=>t.reset()),(()=>t.error(true)));function validateOneOf(){w.forEach(((p,v)=>{let w;if((0,g.alwaysValidSchema)(b,p)){u.var($,true)}else{w=t.subschema({keyword:"oneOf",schemaProp:v,compositeRule:true},$)}if(v>0){u.if((0,m._)`${$} && ${E}`).assign(E,false).assign(S,(0,m._)`[${S}, ${v}]`).else()}u.if($,(()=>{u.assign(E,true);u.assign(S,v);if(w)t.mergeEvaluated(w,m.Name)}))}))}}};u["default"]=b},9527:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g=p(4671);const v=p(5049);const b=p(5049);const w={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:u,schema:p,data:w,parentSchema:E,it:S}=t;const{opts:$}=S;const P=(0,m.allSchemaProperties)(p);const R=P.filter((t=>(0,v.alwaysValidSchema)(S,p[t])));if(P.length===0||R.length===P.length&&(!S.opts.unevaluated||S.props===true)){return}const x=$.strictSchema&&!$.allowMatchingProperties&&E.properties;const O=u.name("valid");if(S.props!==true&&!(S.props instanceof g.Name)){S.props=(0,b.evaluatedPropsToName)(u,S.props)}const{props:A}=S;validatePatternProperties();function validatePatternProperties(){for(const t of P){if(x)checkMatchingProperties(t);if(S.allErrors){validateProperties(t)}else{u.var(O,true);validateProperties(t);u.if(O)}}}function checkMatchingProperties(t){for(const u in x){if(new RegExp(t).test(u)){(0,v.checkStrictMode)(S,`property ${u} matches pattern ${t} (use allowMatchingProperties)`)}}}function validateProperties(p){u.forIn("key",w,(v=>{u.if((0,g._)`${(0,m.usePattern)(t,p)}.test(${v})`,(()=>{const m=R.includes(p);if(!m){t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:v,dataPropType:b.Type.Str},O)}if(S.opts.unevaluated&&A!==true){u.assign((0,g._)`${A}[${v}]`,true)}else if(!m&&!S.allErrors){u.if((0,g.not)(O),(()=>u.break()))}}))}))}}};u["default"]=w},8120:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6604);const g={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,m.validateTuple)(t,"items")};u["default"]=g},8563:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(324);const g=p(1919);const v=p(5049);const b=p(8410);const w={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:u,schema:p,parentSchema:w,data:E,it:S}=t;if(S.opts.removeAdditional==="all"&&w.additionalProperties===undefined){b.default.code(new m.KeywordCxt(S,b.default,"additionalProperties"))}const $=(0,g.allSchemaProperties)(p);for(const t of $){S.definedProperties.add(t)}if(S.opts.unevaluated&&$.length&&S.props!==true){S.props=v.mergeEvaluated.props(u,(0,v.toHash)($),S.props)}const P=$.filter((t=>!(0,v.alwaysValidSchema)(S,p[t])));if(P.length===0)return;const R=u.name("valid");for(const p of P){if(hasDefault(p)){applyPropertySchema(p)}else{u.if((0,g.propertyInData)(u,E,p,S.opts.ownProperties));applyPropertySchema(p);if(!S.allErrors)u.else().var(R,true);u.endIf()}t.it.definedProperties.add(p);t.ok(R)}function hasDefault(t){return S.opts.useDefaults&&!S.compositeRule&&p[t].default!==undefined}function applyPropertySchema(u){t.subschema({keyword:"properties",schemaProp:u,dataProp:u},R)}}};u["default"]=w},1023:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:"property name must be valid",params:({params:t})=>(0,m._)`{propertyName: ${t.propertyName}}`};const b={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:v,code(t){const{gen:u,schema:p,data:v,it:b}=t;if((0,g.alwaysValidSchema)(b,p))return;const w=u.name("valid");u.forIn("key",v,(p=>{t.setParams({propertyName:p});t.subschema({keyword:"propertyNames",data:p,dataTypes:["string"],propertyName:p,compositeRule:true},w);u.if((0,m.not)(w),(()=>{t.error(true);if(!b.allErrors)u.break()}))}));t.ok(w)}};u["default"]=b},8472:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5049);const g={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:u,it:p}){if(u.if===undefined)(0,m.checkStrictMode)(p,`"${t}" without "if" is ignored`)}};u["default"]=g},1919:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateUnion=u.validateArray=u.usePattern=u.callValidateCode=u.schemaProperties=u.allSchemaProperties=u.noPropertyInData=u.propertyInData=u.isOwnProperty=u.hasPropFunc=u.reportMissingProp=u.checkMissingProp=u.checkReportMissingProp=void 0;const m=p(4671);const g=p(5049);const v=p(1529);const b=p(5049);function checkReportMissingProp(t,u){const{gen:p,data:g,it:v}=t;p.if(noPropertyInData(p,g,u,v.opts.ownProperties),(()=>{t.setParams({missingProperty:(0,m._)`${u}`},true);t.error()}))}u.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen:t,data:u,it:{opts:p}},g,v){return(0,m.or)(...g.map((g=>(0,m.and)(noPropertyInData(t,u,g,p.ownProperties),(0,m._)`${v} = ${g}`))))}u.checkMissingProp=checkMissingProp;function reportMissingProp(t,u){t.setParams({missingProperty:u},true);t.error()}u.reportMissingProp=reportMissingProp;function hasPropFunc(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,m._)`Object.prototype.hasOwnProperty`})}u.hasPropFunc=hasPropFunc;function isOwnProperty(t,u,p){return(0,m._)`${hasPropFunc(t)}.call(${u}, ${p})`}u.isOwnProperty=isOwnProperty;function propertyInData(t,u,p,g){const v=(0,m._)`${u}${(0,m.getProperty)(p)} !== undefined`;return g?(0,m._)`${v} && ${isOwnProperty(t,u,p)}`:v}u.propertyInData=propertyInData;function noPropertyInData(t,u,p,g){const v=(0,m._)`${u}${(0,m.getProperty)(p)} === undefined`;return g?(0,m.or)(v,(0,m.not)(isOwnProperty(t,u,p))):v}u.noPropertyInData=noPropertyInData;function allSchemaProperties(t){return t?Object.keys(t).filter((t=>t!=="__proto__")):[]}u.allSchemaProperties=allSchemaProperties;function schemaProperties(t,u){return allSchemaProperties(u).filter((p=>!(0,g.alwaysValidSchema)(t,u[p])))}u.schemaProperties=schemaProperties;function callValidateCode({schemaCode:t,data:u,it:{gen:p,topSchemaRef:g,schemaPath:b,errorPath:w},it:E},S,$,P){const R=P?(0,m._)`${t}, ${u}, ${g}${b}`:u;const x=[[v.default.instancePath,(0,m.strConcat)(v.default.instancePath,w)],[v.default.parentData,E.parentData],[v.default.parentDataProperty,E.parentDataProperty],[v.default.rootData,v.default.rootData]];if(E.opts.dynamicRef)x.push([v.default.dynamicAnchors,v.default.dynamicAnchors]);const O=(0,m._)`${R}, ${p.object(...x)}`;return $!==m.nil?(0,m._)`${S}.call(${$}, ${O})`:(0,m._)`${S}(${O})`}u.callValidateCode=callValidateCode;const w=(0,m._)`new RegExp`;function usePattern({gen:t,it:{opts:u}},p){const g=u.unicodeRegExp?"u":"";const{regExp:v}=u.code;const E=v(p,g);return t.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,m._)`${v.code==="new RegExp"?w:(0,b.useFunc)(t,v)}(${p}, ${g})`})}u.usePattern=usePattern;function validateArray(t){const{gen:u,data:p,keyword:v,it:b}=t;const w=u.name("valid");if(b.allErrors){const t=u.let("valid",true);validateItems((()=>u.assign(t,false)));return t}u.var(w,true);validateItems((()=>u.break()));return w;function validateItems(b){const E=u.const("len",(0,m._)`${p}.length`);u.forRange("i",0,E,(p=>{t.subschema({keyword:v,dataProp:p,dataPropType:g.Type.Num},w);u.if((0,m.not)(w),b)}))}}u.validateArray=validateArray;function validateUnion(t){const{gen:u,schema:p,keyword:v,it:b}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");const w=p.some((t=>(0,g.alwaysValidSchema)(b,t)));if(w&&!b.opts.unevaluated)return;const E=u.let("valid",false);const S=u.name("_valid");u.block((()=>p.forEach(((p,g)=>{const b=t.subschema({keyword:v,schemaProp:g,compositeRule:true},S);u.assign(E,(0,m._)`${E} || ${S}`);const w=t.mergeValidEvaluated(b,S);if(!w)u.if((0,m.not)(E))}))));t.result(E,(()=>t.reset()),(()=>t.error(true)))}u.validateUnion=validateUnion},9069:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const p={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};u["default"]=p},6550:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9069);const g=p(4247);const v=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",m.default,g.default];u["default"]=v},4247:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.callRef=u.getValidate=void 0;const m=p(909);const g=p(1919);const v=p(4671);const b=p(1529);const w=p(4033);const E=p(5049);const S={keyword:"$ref",schemaType:"string",code(t){const{gen:u,schema:p,it:g}=t;const{baseId:b,schemaEnv:E,validateName:S,opts:$,self:P}=g;const{root:R}=E;if((p==="#"||p==="#/")&&b===R.baseId)return callRootRef();const x=w.resolveRef.call(P,R,b,p);if(x===undefined)throw new m.default(g.opts.uriResolver,b,p);if(x instanceof w.SchemaEnv)return callValidate(x);return inlineRefSchema(x);function callRootRef(){if(E===R)return callRef(t,S,E,E.$async);const p=u.scopeValue("root",{ref:R});return callRef(t,(0,v._)`${p}.validate`,R,R.$async)}function callValidate(u){const p=getValidate(t,u);callRef(t,p,u,u.$async)}function inlineRefSchema(m){const g=u.scopeValue("schema",$.code.source===true?{ref:m,code:(0,v.stringify)(m)}:{ref:m});const b=u.name("valid");const w=t.subschema({schema:m,dataTypes:[],schemaPath:v.nil,topSchemaRef:g,errSchemaPath:p},b);t.mergeEvaluated(w);t.ok(b)}}};function getValidate(t,u){const{gen:p}=t;return u.validate?p.scopeValue("validate",{ref:u.validate}):(0,v._)`${p.scopeValue("wrapper",{ref:u})}.validate`}u.getValidate=getValidate;function callRef(t,u,p,m){const{gen:w,it:S}=t;const{allErrors:$,schemaEnv:P,opts:R}=S;const x=R.passContext?b.default.this:v.nil;if(m)callAsyncRef();else callSyncRef();function callAsyncRef(){if(!P.$async)throw new Error("async schema referenced by sync schema");const p=w.let("valid");w.try((()=>{w.code((0,v._)`await ${(0,g.callValidateCode)(t,u,x)}`);addEvaluatedFrom(u);if(!$)w.assign(p,true)}),(t=>{w.if((0,v._)`!(${t} instanceof ${S.ValidationError})`,(()=>w.throw(t)));addErrorsFrom(t);if(!$)w.assign(p,false)}));t.ok(p)}function callSyncRef(){t.result((0,g.callValidateCode)(t,u,x),(()=>addEvaluatedFrom(u)),(()=>addErrorsFrom(u)))}function addErrorsFrom(t){const u=(0,v._)`${t}.errors`;w.assign(b.default.vErrors,(0,v._)`${b.default.vErrors} === null ? ${u} : ${b.default.vErrors}.concat(${u})`);w.assign(b.default.errors,(0,v._)`${b.default.vErrors}.length`)}function addEvaluatedFrom(t){var u;if(!S.opts.unevaluated)return;const m=(u=p===null||p===void 0?void 0:p.validate)===null||u===void 0?void 0:u.evaluated;if(S.props!==true){if(m&&!m.dynamicProps){if(m.props!==undefined){S.props=E.mergeEvaluated.props(w,m.props,S.props)}}else{const u=w.var("props",(0,v._)`${t}.evaluated.props`);S.props=E.mergeEvaluated.props(w,u,S.props,v.Name)}}if(S.items!==true){if(m&&!m.dynamicItems){if(m.items!==undefined){S.items=E.mergeEvaluated.items(w,m.items,S.items)}}else{const u=w.var("items",(0,v._)`${t}.evaluated.items`);S.items=E.mergeEvaluated.items(w,u,S.items,v.Name)}}}}u.callRef=callRef;u["default"]=S},9099:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(2330);const v=p(4033);const b=p(909);const w=p(5049);const E={message:({params:{discrError:t,tagName:u}})=>t===g.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:t,tag:u,tagName:p}})=>(0,m._)`{error: ${t}, tag: ${p}, tagValue: ${u}}`};const S={keyword:"discriminator",type:"object",schemaType:"object",error:E,code(t){const{gen:u,data:p,schema:E,parentSchema:S,it:$}=t;const{oneOf:P}=S;if(!$.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const R=E.propertyName;if(typeof R!="string")throw new Error("discriminator: requires propertyName");if(E.mapping)throw new Error("discriminator: mapping is not supported");if(!P)throw new Error("discriminator: requires oneOf keyword");const x=u.let("valid",false);const O=u.const("tag",(0,m._)`${p}${(0,m.getProperty)(R)}`);u.if((0,m._)`typeof ${O} == "string"`,(()=>validateMapping()),(()=>t.error(false,{discrError:g.DiscrError.Tag,tag:O,tagName:R})));t.ok(x);function validateMapping(){const p=getMapping();u.if(false);for(const t in p){u.elseIf((0,m._)`${O} === ${t}`);u.assign(x,applyTagSchema(p[t]))}u.else();t.error(false,{discrError:g.DiscrError.Mapping,tag:O,tagName:R});u.endIf()}function applyTagSchema(p){const g=u.name("valid");const v=t.subschema({keyword:"oneOf",schemaProp:p},g);t.mergeEvaluated(v,m.Name);return g}function getMapping(){var t;const u={};const p=hasRequired(S);let m=true;for(let u=0;u<P.length;u++){let g=P[u];if((g===null||g===void 0?void 0:g.$ref)&&!(0,w.schemaHasRulesButRef)(g,$.self.RULES)){const t=g.$ref;g=v.resolveRef.call($.self,$.schemaEnv.root,$.baseId,t);if(g instanceof v.SchemaEnv)g=g.schema;if(g===undefined)throw new b.default($.opts.uriResolver,$.baseId,t)}const E=(t=g===null||g===void 0?void 0:g.properties)===null||t===void 0?void 0:t[R];if(typeof E!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${R}"`)}m=m&&(p||hasRequired(g));addMappings(E,u)}if(!m)throw new Error(`discriminator: "${R}" must be required`);return u;function hasRequired({required:t}){return Array.isArray(t)&&t.includes(R)}function addMappings(t,u){if(t.const){addMapping(t.const,u)}else if(t.enum){for(const p of t.enum){addMapping(p,u)}}else{throw new Error(`discriminator: "properties/${R}" must have "const" or "enum"`)}}function addMapping(t,p){if(typeof t!="string"||t in u){throw new Error(`discriminator: "${R}" values must be unique strings`)}u[t]=p}}}};u["default"]=S},2330:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.DiscrError=void 0;var p;(function(t){t["Tag"]="tag";t["Mapping"]="mapping"})(p||(u.DiscrError=p={}))},4231:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6550);const g=p(9706);const v=p(8112);const b=p(6774);const w=p(2043);const E=p(5119);const S=p(6242);const $=p(7123);const P=[b.default,m.default,g.default,(0,v.default)(true),S.default,$.metadataVocabulary,$.contentVocabulary,w.default,E.default];u["default"]=P},1982:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6550);const g=p(9706);const v=p(8112);const b=p(6242);const w=p(7123);const E=[m.default,g.default,(0,v.default)(),b.default,w.metadataVocabulary,w.contentVocabulary];u["default"]=E},6758:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.dynamicAnchor=void 0;const m=p(4671);const g=p(1529);const v=p(4033);const b=p(4247);const w={keyword:"$dynamicAnchor",schemaType:"string",code:t=>dynamicAnchor(t,t.schema)};function dynamicAnchor(t,u){const{gen:p,it:v}=t;v.schemaEnv.root.dynamicAnchors[u]=true;const b=(0,m._)`${g.default.dynamicAnchors}${(0,m.getProperty)(u)}`;const w=v.errSchemaPath==="#"?v.validateName:_getValidate(t);p.if((0,m._)`!${b}`,(()=>p.assign(b,w)))}u.dynamicAnchor=dynamicAnchor;function _getValidate(t){const{schemaEnv:u,schema:p,self:m}=t.it;const{root:g,baseId:w,localRefs:E,meta:S}=u.root;const{schemaId:$}=m.opts;const P=new v.SchemaEnv({schema:p,schemaId:$,root:g,baseId:w,localRefs:E,meta:S});v.compileSchema.call(m,P);return(0,b.getValidate)(t,P)}u["default"]=w},1178:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.dynamicRef=void 0;const m=p(4671);const g=p(1529);const v=p(4247);const b={keyword:"$dynamicRef",schemaType:"string",code:t=>dynamicRef(t,t.schema)};function dynamicRef(t,u){const{gen:p,keyword:b,it:w}=t;if(u[0]!=="#")throw new Error(`"${b}" only supports hash fragment reference`);const E=u.slice(1);if(w.allErrors){_dynamicRef()}else{const u=p.let("valid",false);_dynamicRef(u);t.ok(u)}function _dynamicRef(t){if(w.schemaEnv.root.dynamicAnchors[E]){const u=p.let("_v",(0,m._)`${g.default.dynamicAnchors}${(0,m.getProperty)(E)}`);p.if(u,_callRef(u,t),_callRef(w.validateName,t))}else{_callRef(w.validateName,t)()}}function _callRef(u,m){return m?()=>p.block((()=>{(0,v.callRef)(t,u);p.let(m,true)})):()=>(0,v.callRef)(t,u)}}u.dynamicRef=dynamicRef;u["default"]=b},6774:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6758);const g=p(1178);const v=p(2719);const b=p(8249);const w=[m.default,g.default,v.default,b.default];u["default"]=w},2719:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6758);const g=p(5049);const v={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){if(t.schema)(0,m.dynamicAnchor)(t,"");else(0,g.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};u["default"]=v},8249:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1178);const g={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,m.dynamicRef)(t,t.schema)};u["default"]=g},3779:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g={message:({schemaCode:t})=>(0,m.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,m._)`{format: ${t}}`};const v={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:g,code(t,u){const{gen:p,data:g,$data:v,schema:b,schemaCode:w,it:E}=t;const{opts:S,errSchemaPath:$,schemaEnv:P,self:R}=E;if(!S.validateFormats)return;if(v)validate$DataFormat();else validateFormat();function validate$DataFormat(){const v=p.scopeValue("formats",{ref:R.formats,code:S.code.formats});const b=p.const("fDef",(0,m._)`${v}[${w}]`);const E=p.let("fType");const $=p.let("format");p.if((0,m._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,(()=>p.assign(E,(0,m._)`${b}.type || "string"`).assign($,(0,m._)`${b}.validate`)),(()=>p.assign(E,(0,m._)`"string"`).assign($,b)));t.fail$data((0,m.or)(unknownFmt(),invalidFmt()));function unknownFmt(){if(S.strictSchema===false)return m.nil;return(0,m._)`${w} && !${$}`}function invalidFmt(){const t=P.$async?(0,m._)`(${b}.async ? await ${$}(${g}) : ${$}(${g}))`:(0,m._)`${$}(${g})`;const p=(0,m._)`(typeof ${$} == "function" ? ${t} : ${$}.test(${g}))`;return(0,m._)`${$} && ${$} !== true && ${E} === ${u} && !${p}`}}function validateFormat(){const v=R.formats[b];if(!v){unknownFormat();return}if(v===true)return;const[w,E,x]=getFormat(v);if(w===u)t.pass(validCondition());function unknownFormat(){if(S.strictSchema===false){R.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${b}" ignored in schema at path "${$}"`}}function getFormat(t){const u=t instanceof RegExp?(0,m.regexpCode)(t):S.code.formats?(0,m._)`${S.code.formats}${(0,m.getProperty)(b)}`:undefined;const g=p.scopeValue("formats",{key:b,ref:t,code:u});if(typeof t=="object"&&!(t instanceof RegExp)){return[t.type||"string",t.validate,(0,m._)`${g}.validate`]}return["string",t,g]}function validCondition(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!P.$async)throw new Error("async format in sync schema");return(0,m._)`await ${x}(${g})`}return typeof E=="function"?(0,m._)`${x}(${g})`:(0,m._)`${x}.test(${g})`}}}};u["default"]=v},6242:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(3779);const g=[m.default];u["default"]=g},7123:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.contentVocabulary=u.metadataVocabulary=void 0;u.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];u.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},2043:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(7800);const g=p(2663);const v=p(7928);const b=[m.default,g.default,v.default];u["default"]=b},5119:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9250);const g=p(3703);const v=[m.default,g.default];u["default"]=v},3703:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:({params:{len:t}})=>(0,m.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,m._)`{limit: ${t}}`};const b={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:v,code(t){const{gen:u,schema:p,data:v,it:b}=t;const w=b.items||0;if(w===true)return;const E=u.const("len",(0,m._)`${v}.length`);if(p===false){t.setParams({len:w});t.fail((0,m._)`${E} > ${w}`)}else if(typeof p=="object"&&!(0,g.alwaysValidSchema)(b,p)){const p=u.var("valid",(0,m._)`${E} <= ${w}`);u.if((0,m.not)(p),(()=>validateItems(p,w)));t.ok(p)}b.items=true;function validateItems(p,v){u.forRange("i",v,E,(v=>{t.subschema({keyword:"unevaluatedItems",dataProp:v,dataPropType:g.Type.Num},p);if(!b.allErrors)u.if((0,m.not)(p),(()=>u.break()))}))}}};u["default"]=b},9250:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(1529);const b={message:"must NOT have unevaluated properties",params:({params:t})=>(0,m._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`};const w={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:true,error:b,code(t){const{gen:u,schema:p,data:b,errsCount:w,it:E}=t;if(!w)throw new Error("ajv implementation error");const{allErrors:S,props:$}=E;if($ instanceof m.Name){u.if((0,m._)`${$} !== true`,(()=>u.forIn("key",b,(t=>u.if(unevaluatedDynamic($,t),(()=>unevaluatedPropCode(t)))))))}else if($!==true){u.forIn("key",b,(t=>$===undefined?unevaluatedPropCode(t):u.if(unevaluatedStatic($,t),(()=>unevaluatedPropCode(t)))))}E.props=true;t.ok((0,m._)`${w} === ${v.default.errors}`);function unevaluatedPropCode(v){if(p===false){t.setParams({unevaluatedProperty:v});t.error();if(!S)u.break();return}if(!(0,g.alwaysValidSchema)(E,p)){const p=u.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:v,dataPropType:g.Type.Str},p);if(!S)u.if((0,m.not)(p),(()=>u.break()))}}function unevaluatedDynamic(t,u){return(0,m._)`!${t} || !${t}[${u}]`}function unevaluatedStatic(t,u){const p=[];for(const g in t){if(t[g]===true)p.push((0,m._)`${u} !== ${g}`)}return(0,m.and)(...p)}}};u["default"]=w},1793:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(9804);const b={message:"must be equal to constant",params:({schemaCode:t})=>(0,m._)`{allowedValue: ${t}}`};const w={keyword:"const",$data:true,error:b,code(t){const{gen:u,data:p,$data:b,schemaCode:w,schema:E}=t;if(b||E&&typeof E=="object"){t.fail$data((0,m._)`!${(0,g.useFunc)(u,v.default)}(${p}, ${w})`)}else{t.fail((0,m._)`${E} !== ${p}`)}}};u["default"]=w},7800:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4239);const g={keyword:"dependentRequired",type:"object",schemaType:"object",error:m.error,code:t=>(0,m.validatePropertyDeps)(t)};u["default"]=g},3429:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(9804);const b={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,m._)`{allowedValues: ${t}}`};const w={keyword:"enum",schemaType:"array",$data:true,error:b,code(t){const{gen:u,data:p,$data:b,schema:w,schemaCode:E,it:S}=t;if(!b&&w.length===0)throw new Error("enum must have non-empty array");const $=w.length>=S.opts.loopEnum;let P;const getEql=()=>P!==null&&P!==void 0?P:P=(0,g.useFunc)(u,v.default);let R;if($||b){R=u.let("valid");t.block$data(R,loopEnum)}else{if(!Array.isArray(w))throw new Error("ajv implementation error");const t=u.const("vSchema",E);R=(0,m.or)(...w.map(((u,p)=>equalCode(t,p))))}t.pass(R);function loopEnum(){u.assign(R,false);u.forOf("v",E,(t=>u.if((0,m._)`${getEql()}(${p}, ${t})`,(()=>u.assign(R,true).break()))))}function equalCode(t,u){const g=w[u];return typeof g==="object"&&g!==null?(0,m._)`${getEql()}(${p}, ${t}[${u}])`:(0,m._)`${p} === ${g}`}}};u["default"]=w},9706:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(7560);const g=p(7677);const v=p(7453);const b=p(3744);const w=p(6088);const E=p(9185);const S=p(2085);const $=p(8835);const P=p(1793);const R=p(3429);const x=[m.default,g.default,v.default,b.default,w.default,E.default,S.default,$.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},P.default,R.default];u["default"]=x},7928:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5049);const g={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:u,it:p}){if(u.contains===undefined){(0,m.checkStrictMode)(p,`"${t}" without "contains" is ignored`)}}};u["default"]=g},2085:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g={message({keyword:t,schemaCode:u}){const p=t==="maxItems"?"more":"fewer";return(0,m.str)`must NOT have ${p} than ${u} items`},params:({schemaCode:t})=>(0,m._)`{limit: ${t}}`};const v={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:g,code(t){const{keyword:u,data:p,schemaCode:g}=t;const v=u==="maxItems"?m.operators.GT:m.operators.LT;t.fail$data((0,m._)`${p}.length ${v} ${g}`)}};u["default"]=v},7453:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(4679);const b={message({keyword:t,schemaCode:u}){const p=t==="maxLength"?"more":"fewer";return(0,m.str)`must NOT have ${p} than ${u} characters`},params:({schemaCode:t})=>(0,m._)`{limit: ${t}}`};const w={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:b,code(t){const{keyword:u,data:p,schemaCode:b,it:w}=t;const E=u==="maxLength"?m.operators.GT:m.operators.LT;const S=w.opts.unicode===false?(0,m._)`${p}.length`:(0,m._)`${(0,g.useFunc)(t.gen,v.default)}(${p})`;t.fail$data((0,m._)`${S} ${E} ${b}`)}};u["default"]=w},7560:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=m.operators;const v={maximum:{okStr:"<=",ok:g.LTE,fail:g.GT},minimum:{okStr:">=",ok:g.GTE,fail:g.LT},exclusiveMaximum:{okStr:"<",ok:g.LT,fail:g.GTE},exclusiveMinimum:{okStr:">",ok:g.GT,fail:g.LTE}};const b={message:({keyword:t,schemaCode:u})=>(0,m.str)`must be ${v[t].okStr} ${u}`,params:({keyword:t,schemaCode:u})=>(0,m._)`{comparison: ${v[t].okStr}, limit: ${u}}`};const w={keyword:Object.keys(v),type:"number",schemaType:"number",$data:true,error:b,code(t){const{keyword:u,data:p,schemaCode:g}=t;t.fail$data((0,m._)`${p} ${v[u].fail} ${g} || isNaN(${p})`)}};u["default"]=w},6088:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g={message({keyword:t,schemaCode:u}){const p=t==="maxProperties"?"more":"fewer";return(0,m.str)`must NOT have ${p} than ${u} properties`},params:({schemaCode:t})=>(0,m._)`{limit: ${t}}`};const v={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:g,code(t){const{keyword:u,data:p,schemaCode:g}=t;const v=u==="maxProperties"?m.operators.GT:m.operators.LT;t.fail$data((0,m._)`Object.keys(${p}).length ${v} ${g}`)}};u["default"]=v},7677:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g={message:({schemaCode:t})=>(0,m.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,m._)`{multipleOf: ${t}}`};const v={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:g,code(t){const{gen:u,data:p,schemaCode:g,it:v}=t;const b=v.opts.multipleOfPrecision;const w=u.let("res");const E=b?(0,m._)`Math.abs(Math.round(${w}) - ${w}) > 1e-${b}`:(0,m._)`${w} !== parseInt(${w})`;t.fail$data((0,m._)`(${g} === 0 || (${w} = ${p}/${g}, ${E}))`)}};u["default"]=v},3744:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g=p(4671);const v={message:({schemaCode:t})=>(0,g.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,g._)`{pattern: ${t}}`};const b={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:v,code(t){const{data:u,$data:p,schema:v,schemaCode:b,it:w}=t;const E=w.opts.unicodeRegExp?"u":"";const S=p?(0,g._)`(new RegExp(${b}, ${E}))`:(0,m.usePattern)(t,v);t.fail$data((0,g._)`!${S}.test(${u})`)}};u["default"]=b},9185:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g=p(4671);const v=p(5049);const b={message:({params:{missingProperty:t}})=>(0,g.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,g._)`{missingProperty: ${t}}`};const w={keyword:"required",type:"object",schemaType:"array",$data:true,error:b,code(t){const{gen:u,schema:p,schemaCode:b,data:w,$data:E,it:S}=t;const{opts:$}=S;if(!E&&p.length===0)return;const P=p.length>=$.loopRequired;if(S.allErrors)allErrorsMode();else exitOnErrorMode();if($.strictRequired){const u=t.parentSchema.properties;const{definedProperties:m}=t.it;for(const t of p){if((u===null||u===void 0?void 0:u[t])===undefined&&!m.has(t)){const u=S.schemaEnv.baseId+S.errSchemaPath;const p=`required property "${t}" is not defined at "${u}" (strictRequired)`;(0,v.checkStrictMode)(S,p,S.opts.strictRequired)}}}function allErrorsMode(){if(P||E){t.block$data(g.nil,loopAllRequired)}else{for(const u of p){(0,m.checkReportMissingProp)(t,u)}}}function exitOnErrorMode(){const g=u.let("missing");if(P||E){const p=u.let("valid",true);t.block$data(p,(()=>loopUntilMissing(g,p)));t.ok(p)}else{u.if((0,m.checkMissingProp)(t,p,g));(0,m.reportMissingProp)(t,g);u.else()}}function loopAllRequired(){u.forOf("prop",b,(p=>{t.setParams({missingProperty:p});u.if((0,m.noPropertyInData)(u,w,p,$.ownProperties),(()=>t.error()))}))}function loopUntilMissing(p,v){t.setParams({missingProperty:p});u.forOf(p,b,(()=>{u.assign(v,(0,m.propertyInData)(u,w,p,$.ownProperties));u.if((0,g.not)(v),(()=>{t.error();u.break()}))}),g.nil)}}};u["default"]=w},8835:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(3330);const g=p(4671);const v=p(5049);const b=p(9804);const w={message:({params:{i:t,j:u}})=>(0,g.str)`must NOT have duplicate items (items ## ${u} and ${t} are identical)`,params:({params:{i:t,j:u}})=>(0,g._)`{i: ${t}, j: ${u}}`};const E={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:w,code(t){const{gen:u,data:p,$data:w,schema:E,parentSchema:S,schemaCode:$,it:P}=t;if(!w&&!E)return;const R=u.let("valid");const x=S.items?(0,m.getSchemaTypes)(S.items):[];t.block$data(R,validateUniqueItems,(0,g._)`${$} === false`);t.ok(R);function validateUniqueItems(){const m=u.let("i",(0,g._)`${p}.length`);const v=u.let("j");t.setParams({i:m,j:v});u.assign(R,true);u.if((0,g._)`${m} > 1`,(()=>(canOptimize()?loopN:loopN2)(m,v)))}function canOptimize(){return x.length>0&&!x.some((t=>t==="object"||t==="array"))}function loopN(v,b){const w=u.name("item");const E=(0,m.checkDataTypes)(x,w,P.opts.strictNumbers,m.DataType.Wrong);const S=u.const("indices",(0,g._)`{}`);u.for((0,g._)`;${v}--;`,(()=>{u.let(w,(0,g._)`${p}[${v}]`);u.if(E,(0,g._)`continue`);if(x.length>1)u.if((0,g._)`typeof ${w} == "string"`,(0,g._)`${w} += "_"`);u.if((0,g._)`typeof ${S}[${w}] == "number"`,(()=>{u.assign(b,(0,g._)`${S}[${w}]`);t.error();u.assign(R,false).break()})).code((0,g._)`${S}[${w}] = ${v}`)}))}function loopN2(m,w){const E=(0,v.useFunc)(u,b.default);const S=u.name("outer");u.label(S).for((0,g._)`;${m}--;`,(()=>u.for((0,g._)`${w} = ${m}; ${w}--;`,(()=>u.if((0,g._)`${E}(${p}[${m}], ${p}[${w}])`,(()=>{t.error();u.assign(R,false).break(S)}))))))}}};u["default"]=E},9850:(t,u,p)=>{var m=p(6647);function retry(t,u){function run(p,g){var v=u||{};var b;if(!("randomize"in v)){v.randomize=true}b=m.operation(v);function bail(t){g(t||new Error("Aborted"))}function onError(t,u){if(t.bail){bail(t);return}if(!b.retry(t)){g(b.mainError())}else if(v.onRetry){v.onRetry(t,u)}}function runAttempt(u){var m;try{m=t(bail,u)}catch(t){onError(t,u);return}Promise.resolve(m).then(p).catch((function catchIt(t){onError(t,u)}))}b.attempt(runAttempt)}return new Promise(run)}t.exports=retry},1483:(t,u,p)=>{"use strict";const m=p(7386);const g=p(3638);const v=p(6135);const b=p(6148);const braces=(t,u={})=>{let p=[];if(Array.isArray(t)){for(const m of t){const t=braces.create(m,u);if(Array.isArray(t)){p.push(...t)}else{p.push(t)}}}else{p=[].concat(braces.create(t,u))}if(u&&u.expand===true&&u.nodupes===true){p=[...new Set(p)]}return p};braces.parse=(t,u={})=>b(t,u);braces.stringify=(t,u={})=>{if(typeof t==="string"){return m(braces.parse(t,u),u)}return m(t,u)};braces.compile=(t,u={})=>{if(typeof t==="string"){t=braces.parse(t,u)}return g(t,u)};braces.expand=(t,u={})=>{if(typeof t==="string"){t=braces.parse(t,u)}let p=v(t,u);if(u.noempty===true){p=p.filter(Boolean)}if(u.nodupes===true){p=[...new Set(p)]}return p};braces.create=(t,u={})=>{if(t===""||t.length<3){return[t]}return u.expand!==true?braces.compile(t,u):braces.expand(t,u)};t.exports=braces},3638:(t,u,p)=>{"use strict";const m=p(1430);const g=p(8886);const compile=(t,u={})=>{const walk=(t,p={})=>{const v=g.isInvalidBrace(p);const b=t.invalid===true&&u.escapeInvalid===true;const w=v===true||b===true;const E=u.escapeInvalid===true?"\\":"";let S="";if(t.isOpen===true){return E+t.value}if(t.isClose===true){console.log("node.isClose",E,t.value);return E+t.value}if(t.type==="open"){return w?E+t.value:"("}if(t.type==="close"){return w?E+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":w?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){const p=g.reduce(t.nodes);const v=m(...p,{...u,wrap:false,toRegex:true,strictZeros:true});if(v.length!==0){return p.length>1&&v.length>1?`(${v})`:v}}if(t.nodes){for(const u of t.nodes){S+=walk(u,t)}}return S};return walk(t)};t.exports=compile},1134:t=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},6135:(t,u,p)=>{"use strict";const m=p(1430);const g=p(7386);const v=p(8886);const append=(t="",u="",p=false)=>{const m=[];t=[].concat(t);u=[].concat(u);if(!u.length)return t;if(!t.length){return p?v.flatten(u).map((t=>`{${t}}`)):u}for(const g of t){if(Array.isArray(g)){for(const t of g){m.push(append(t,u,p))}}else{for(let t of u){if(p===true&&typeof t==="string")t=`{${t}}`;m.push(Array.isArray(t)?append(g,t,p):g+t)}}}return v.flatten(m)};const expand=(t,u={})=>{const p=u.rangeLimit===undefined?1e3:u.rangeLimit;const walk=(t,b={})=>{t.queue=[];let w=b;let E=b.queue;while(w.type!=="brace"&&w.type!=="root"&&w.parent){w=w.parent;E=w.queue}if(t.invalid||t.dollar){E.push(append(E.pop(),g(t,u)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){E.push(append(E.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){const b=v.reduce(t.nodes);if(v.exceedsLimit(...b,u.step,p)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let w=m(...b,u);if(w.length===0){w=g(t,u)}E.push(append(E.pop(),w));t.nodes=[];return}const S=v.encloseBrace(t);let $=t.queue;let P=t;while(P.type!=="brace"&&P.type!=="root"&&P.parent){P=P.parent;$=P.queue}for(let u=0;u<t.nodes.length;u++){const p=t.nodes[u];if(p.type==="comma"&&t.type==="brace"){if(u===1)$.push("");$.push("");continue}if(p.type==="close"){E.push(append(E.pop(),$,S));continue}if(p.value&&p.type!=="open"){$.push(append($.pop(),p.value));continue}if(p.nodes){walk(p,t)}}return $};return v.flatten(walk(t))};t.exports=expand},6148:(t,u,p)=>{"use strict";const m=p(7386);const{MAX_LENGTH:g,CHAR_BACKSLASH:v,CHAR_BACKTICK:b,CHAR_COMMA:w,CHAR_DOT:E,CHAR_LEFT_PARENTHESES:S,CHAR_RIGHT_PARENTHESES:$,CHAR_LEFT_CURLY_BRACE:P,CHAR_RIGHT_CURLY_BRACE:R,CHAR_LEFT_SQUARE_BRACKET:x,CHAR_RIGHT_SQUARE_BRACKET:O,CHAR_DOUBLE_QUOTE:A,CHAR_SINGLE_QUOTE:k,CHAR_NO_BREAK_SPACE:T,CHAR_ZERO_WIDTH_NOBREAK_SPACE:C}=p(1134);const parse=(t,u={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}const p=u||{};const I=typeof p.maxLength==="number"?Math.min(g,p.maxLength):g;if(t.length>I){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${I})`)}const N={type:"root",input:t,nodes:[]};const D=[N];let j=N;let L=N;let M=0;const U=t.length;let B=0;let H=0;let z;const advance=()=>t[B++];const push=t=>{if(t.type==="text"&&L.type==="dot"){L.type="text"}if(L&&L.type==="text"&&t.type==="text"){L.value+=t.value;return}j.nodes.push(t);t.parent=j;t.prev=L;L=t;return t};push({type:"bos"});while(B<U){j=D[D.length-1];z=advance();if(z===C||z===T){continue}if(z===v){push({type:"text",value:(u.keepEscaping?z:"")+advance()});continue}if(z===O){push({type:"text",value:"\\"+z});continue}if(z===x){M++;let t;while(B<U&&(t=advance())){z+=t;if(t===x){M++;continue}if(t===v){z+=advance();continue}if(t===O){M--;if(M===0){break}}}push({type:"text",value:z});continue}if(z===S){j=push({type:"paren",nodes:[]});D.push(j);push({type:"text",value:z});continue}if(z===$){if(j.type!=="paren"){push({type:"text",value:z});continue}j=D.pop();push({type:"text",value:z});j=D[D.length-1];continue}if(z===A||z===k||z===b){const t=z;let p;if(u.keepQuotes!==true){z=""}while(B<U&&(p=advance())){if(p===v){z+=p+advance();continue}if(p===t){if(u.keepQuotes===true)z+=p;break}z+=p}push({type:"text",value:z});continue}if(z===P){H++;const t=L.value&&L.value.slice(-1)==="$"||j.dollar===true;const u={type:"brace",open:true,close:false,dollar:t,depth:H,commas:0,ranges:0,nodes:[]};j=push(u);D.push(j);push({type:"open",value:z});continue}if(z===R){if(j.type!=="brace"){push({type:"text",value:z});continue}const t="close";j=D.pop();j.close=true;push({type:t,value:z});H--;j=D[D.length-1];continue}if(z===w&&H>0){if(j.ranges>0){j.ranges=0;const t=j.nodes.shift();j.nodes=[t,{type:"text",value:m(j)}]}push({type:"comma",value:z});j.commas++;continue}if(z===E&&H>0&&j.commas===0){const t=j.nodes;if(H===0||t.length===0){push({type:"text",value:z});continue}if(L.type==="dot"){j.range=[];L.value+=z;L.type="range";if(j.nodes.length!==3&&j.nodes.length!==5){j.invalid=true;j.ranges=0;L.type="text";continue}j.ranges++;j.args=[];continue}if(L.type==="range"){t.pop();const u=t[t.length-1];u.value+=L.value+z;L=u;j.ranges--;continue}push({type:"dot",value:z});continue}push({type:"text",value:z})}do{j=D.pop();if(j.type!=="root"){j.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));const t=D[D.length-1];const u=t.nodes.indexOf(j);t.nodes.splice(u,1,...j.nodes)}}while(D.length>0);push({type:"eos"});return N};t.exports=parse},7386:(t,u,p)=>{"use strict";const m=p(8886);t.exports=(t,u={})=>{const stringify=(t,p={})=>{const g=u.escapeInvalid&&m.isInvalidBrace(p);const v=t.invalid===true&&u.escapeInvalid===true;let b="";if(t.value){if((g||v)&&m.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(const u of t.nodes){b+=stringify(u)}}return b};return stringify(t)}},8886:(t,u)=>{"use strict";u.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};u.find=(t,u)=>t.nodes.find((t=>t.type===u));u.exceedsLimit=(t,p,m=1,g)=>{if(g===false)return false;if(!u.isInteger(t)||!u.isInteger(p))return false;return(Number(p)-Number(t))/Number(m)>=g};u.escapeNode=(t,u=0,p)=>{const m=t.nodes[u];if(!m)return;if(p&&m.type===p||m.type==="open"||m.type==="close"){if(m.escaped!==true){m.value="\\"+m.value;m.escaped=true}}};u.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};u.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};u.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};u.reduce=t=>t.reduce(((t,u)=>{if(u.type==="text")t.push(u.value);if(u.type==="range")u.type="text";return t}),[]);u.flatten=(...t)=>{const u=[];const flat=t=>{for(let p=0;p<t.length;p++){const m=t[p];if(Array.isArray(m)){flat(m);continue}if(m!==undefined){u.push(m)}}return u};flat(t);return u}},4791:(t,u,p)=>{"use strict";const m=p(5317);const g=p(4160);const v=p(7894);function spawn(t,u,p){const b=g(t,u,p);const w=m.spawn(b.command,b.args,b.options);v.hookChildProcess(w,b);return w}function spawnSync(t,u,p){const b=g(t,u,p);const w=m.spawnSync(b.command,b.args,b.options);w.error=w.error||v.verifyENOENTSync(w.status,b);return w}t.exports=spawn;t.exports.spawn=spawn;t.exports.sync=spawnSync;t.exports._parse=g;t.exports._enoent=v},7894:t=>{"use strict";const u=process.platform==="win32";function notFoundError(t,u){return Object.assign(new Error(`${u} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${u} ${t.command}`,path:t.command,spawnargs:t.args})}function hookChildProcess(t,p){if(!u){return}const m=t.emit;t.emit=function(u,g){if(u==="exit"){const u=verifyENOENT(g,p);if(u){return m.call(t,"error",u)}}return m.apply(t,arguments)}}function verifyENOENT(t,p){if(u&&t===1&&!p.file){return notFoundError(p.original,"spawn")}return null}function verifyENOENTSync(t,p){if(u&&t===1&&!p.file){return notFoundError(p.original,"spawnSync")}return null}t.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},4160:(t,u,p)=>{"use strict";const m=p(6928);const g=p(2015);const v=p(1);const b=p(748);const w=process.platform==="win32";const E=/\.(?:com|exe)$/i;const S=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(t){t.file=g(t);const u=t.file&&b(t.file);if(u){t.args.unshift(t.file);t.command=u;return g(t)}return t.file}function parseNonShell(t){if(!w){return t}const u=detectShebang(t);const p=!E.test(u);if(t.options.forceShell||p){const p=S.test(u);t.command=m.normalize(t.command);t.command=v.command(t.command);t.args=t.args.map((t=>v.argument(t,p)));const g=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${g}"`];t.command=process.env.comspec||"cmd.exe";t.options.windowsVerbatimArguments=true}return t}function parse(t,u,p){if(u&&!Array.isArray(u)){p=u;u=null}u=u?u.slice(0):[];p=Object.assign({},p);const m={command:t,args:u,options:p,file:undefined,original:{command:t,args:u}};return p.shell?m:parseNonShell(m)}t.exports=parse},1:t=>{"use strict";const u=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(t){t=t.replace(u,"^$1");return t}function escapeArgument(t,p){t=`${t}`;t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"');t=t.replace(/(?=(\\+?)?)\1$/,"$1$1");t=`"${t}"`;t=t.replace(u,"^$1");if(p){t=t.replace(u,"^$1")}return t}t.exports.command=escapeCommand;t.exports.argument=escapeArgument},748:(t,u,p)=>{"use strict";const m=p(9896);const g=p(8309);function readShebang(t){const u=150;const p=Buffer.alloc(u);let v;try{v=m.openSync(t,"r");m.readSync(v,p,0,u,0);m.closeSync(v)}catch(t){}return g(p.toString())}t.exports=readShebang},2015:(t,u,p)=>{"use strict";const m=p(6928);const g=p(3969);const v=p(6334);function resolveCommandAttempt(t,u){const p=t.options.env||process.env;const b=process.cwd();const w=t.options.cwd!=null;const E=w&&process.chdir!==undefined&&!process.chdir.disabled;if(E){try{process.chdir(t.options.cwd)}catch(t){}}let S;try{S=g.sync(t.command,{path:p[v({env:p})],pathExt:u?m.delimiter:undefined})}catch(t){}finally{if(E){process.chdir(b)}}if(S){S=m.resolve(w?t.options.cwd:"",S)}return S}function resolveCommand(t){return resolveCommandAttempt(t)||resolveCommandAttempt(t,true)}t.exports=resolveCommand},6345:t=>{"use strict";
8
+ deps: ${p}}`};const b={keyword:"dependencies",type:"object",schemaType:"object",error:u.error,code(t){const[u,p]=splitDependencies(t);validatePropertyDeps(t,u);validateSchemaDeps(t,p)}};function splitDependencies({schema:t}){const u={};const p={};for(const m in t){if(m==="__proto__")continue;const g=Array.isArray(t[m])?u:p;g[m]=t[m]}return[u,p]}function validatePropertyDeps(t,u=t.schema){const{gen:p,data:g,it:b}=t;if(Object.keys(u).length===0)return;const w=p.let("missing");for(const E in u){const S=u[E];if(S.length===0)continue;const $=(0,v.propertyInData)(p,g,E,b.opts.ownProperties);t.setParams({property:E,depsCount:S.length,deps:S.join(", ")});if(b.allErrors){p.if($,(()=>{for(const u of S){(0,v.checkReportMissingProp)(t,u)}}))}else{p.if((0,m._)`${$} && (${(0,v.checkMissingProp)(t,S,w)})`);(0,v.reportMissingProp)(t,w);p.else()}}}u.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(t,u=t.schema){const{gen:p,data:m,keyword:b,it:w}=t;const E=p.name("valid");for(const S in u){if((0,g.alwaysValidSchema)(w,u[S]))continue;p.if((0,v.propertyInData)(p,m,S,w.opts.ownProperties),(()=>{const u=t.subschema({keyword:b,schemaProp:S},E);t.mergeValidEvaluated(u,E)}),(()=>p.var(E,true)));t.ok(E)}}u.validateSchemaDeps=validateSchemaDeps;u["default"]=b},2663:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4239);const g={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,m.validateSchemaDeps)(t)};u["default"]=g},6057:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:({params:t})=>(0,m.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,m._)`{failingKeyword: ${t.ifClause}}`};const b={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:v,code(t){const{gen:u,parentSchema:p,it:v}=t;if(p.then===undefined&&p.else===undefined){(0,g.checkStrictMode)(v,'"if" without "then" and "else" is ignored')}const b=hasSchema(v,"then");const w=hasSchema(v,"else");if(!b&&!w)return;const E=u.let("valid",true);const S=u.name("_valid");validateIf();t.reset();if(b&&w){const p=u.let("ifClause");t.setParams({ifClause:p});u.if(S,validateClause("then",p),validateClause("else",p))}else if(b){u.if(S,validateClause("then"))}else{u.if((0,m.not)(S),validateClause("else"))}t.pass(E,(()=>t.error(true)));function validateIf(){const u=t.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},S);t.mergeEvaluated(u)}function validateClause(p,g){return()=>{const v=t.subschema({keyword:p},S);u.assign(E,S);t.mergeValidEvaluated(v,E);if(g)u.assign(g,(0,m._)`${p}`);else t.setParams({ifClause:p})}}}};function hasSchema(t,u){const p=t.schema[u];return p!==undefined&&!(0,g.alwaysValidSchema)(t,p)}u["default"]=b},8112:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(2063);const g=p(8120);const v=p(6604);const b=p(8844);const w=p(4503);const E=p(4239);const S=p(1023);const $=p(8410);const P=p(8563);const R=p(9527);const x=p(8573);const O=p(1151);const A=p(8037);const k=p(382);const T=p(6057);const C=p(8472);function getApplicator(t=false){const u=[x.default,O.default,A.default,k.default,T.default,C.default,S.default,$.default,E.default,P.default,R.default];if(t)u.push(g.default,b.default);else u.push(m.default,v.default);u.push(w.default);return u}u["default"]=getApplicator},6604:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateTuple=void 0;const m=p(4671);const g=p(5049);const v=p(1919);const b={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:u,it:p}=t;if(Array.isArray(u))return validateTuple(t,"additionalItems",u);p.items=true;if((0,g.alwaysValidSchema)(p,u))return;t.ok((0,v.validateArray)(t))}};function validateTuple(t,u,p=t.schema){const{gen:v,parentSchema:b,data:w,keyword:E,it:S}=t;checkStrictTuple(b);if(S.opts.unevaluated&&p.length&&S.items!==true){S.items=g.mergeEvaluated.items(v,p.length,S.items)}const $=v.name("valid");const P=v.const("len",(0,m._)`${w}.length`);p.forEach(((u,p)=>{if((0,g.alwaysValidSchema)(S,u))return;v.if((0,m._)`${P} > ${p}`,(()=>t.subschema({keyword:E,schemaProp:p,dataProp:p},$)));t.ok($)}));function checkStrictTuple(t){const{opts:m,errSchemaPath:v}=S;const b=p.length;const w=b===t.minItems&&(b===t.maxItems||t[u]===false);if(m.strictTuples&&!w){const t=`"${E}" is ${b}-tuple, but minItems or maxItems/${u} are not specified or different at path "${v}"`;(0,g.checkStrictMode)(S,t,m.strictTuples)}}}u.validateTuple=validateTuple;u["default"]=b},8844:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(1919);const b=p(2063);const w={message:({params:{len:t}})=>(0,m.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,m._)`{limit: ${t}}`};const E={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:w,code(t){const{schema:u,parentSchema:p,it:m}=t;const{prefixItems:w}=p;m.items=true;if((0,g.alwaysValidSchema)(m,u))return;if(w)(0,b.validateAdditionalItems)(t,w);else t.ok((0,v.validateArray)(t))}};u["default"]=E},8573:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5049);const g={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(t){const{gen:u,schema:p,it:g}=t;if((0,m.alwaysValidSchema)(g,p)){t.fail();return}const v=u.name("valid");t.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},v);t.failResult(v,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}};u["default"]=g},8037:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,m._)`{passingSchemas: ${t.passing}}`};const b={keyword:"oneOf",schemaType:"array",trackErrors:true,error:v,code(t){const{gen:u,schema:p,parentSchema:v,it:b}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");if(b.opts.discriminator&&v.discriminator)return;const w=p;const E=u.let("valid",false);const S=u.let("passing",null);const $=u.name("_valid");t.setParams({passing:S});u.block(validateOneOf);t.result(E,(()=>t.reset()),(()=>t.error(true)));function validateOneOf(){w.forEach(((p,v)=>{let w;if((0,g.alwaysValidSchema)(b,p)){u.var($,true)}else{w=t.subschema({keyword:"oneOf",schemaProp:v,compositeRule:true},$)}if(v>0){u.if((0,m._)`${$} && ${E}`).assign(E,false).assign(S,(0,m._)`[${S}, ${v}]`).else()}u.if($,(()=>{u.assign(E,true);u.assign(S,v);if(w)t.mergeEvaluated(w,m.Name)}))}))}}};u["default"]=b},9527:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g=p(4671);const v=p(5049);const b=p(5049);const w={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:u,schema:p,data:w,parentSchema:E,it:S}=t;const{opts:$}=S;const P=(0,m.allSchemaProperties)(p);const R=P.filter((t=>(0,v.alwaysValidSchema)(S,p[t])));if(P.length===0||R.length===P.length&&(!S.opts.unevaluated||S.props===true)){return}const x=$.strictSchema&&!$.allowMatchingProperties&&E.properties;const O=u.name("valid");if(S.props!==true&&!(S.props instanceof g.Name)){S.props=(0,b.evaluatedPropsToName)(u,S.props)}const{props:A}=S;validatePatternProperties();function validatePatternProperties(){for(const t of P){if(x)checkMatchingProperties(t);if(S.allErrors){validateProperties(t)}else{u.var(O,true);validateProperties(t);u.if(O)}}}function checkMatchingProperties(t){for(const u in x){if(new RegExp(t).test(u)){(0,v.checkStrictMode)(S,`property ${u} matches pattern ${t} (use allowMatchingProperties)`)}}}function validateProperties(p){u.forIn("key",w,(v=>{u.if((0,g._)`${(0,m.usePattern)(t,p)}.test(${v})`,(()=>{const m=R.includes(p);if(!m){t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:v,dataPropType:b.Type.Str},O)}if(S.opts.unevaluated&&A!==true){u.assign((0,g._)`${A}[${v}]`,true)}else if(!m&&!S.allErrors){u.if((0,g.not)(O),(()=>u.break()))}}))}))}}};u["default"]=w},8120:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6604);const g={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,m.validateTuple)(t,"items")};u["default"]=g},8563:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(324);const g=p(1919);const v=p(5049);const b=p(8410);const w={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:u,schema:p,parentSchema:w,data:E,it:S}=t;if(S.opts.removeAdditional==="all"&&w.additionalProperties===undefined){b.default.code(new m.KeywordCxt(S,b.default,"additionalProperties"))}const $=(0,g.allSchemaProperties)(p);for(const t of $){S.definedProperties.add(t)}if(S.opts.unevaluated&&$.length&&S.props!==true){S.props=v.mergeEvaluated.props(u,(0,v.toHash)($),S.props)}const P=$.filter((t=>!(0,v.alwaysValidSchema)(S,p[t])));if(P.length===0)return;const R=u.name("valid");for(const p of P){if(hasDefault(p)){applyPropertySchema(p)}else{u.if((0,g.propertyInData)(u,E,p,S.opts.ownProperties));applyPropertySchema(p);if(!S.allErrors)u.else().var(R,true);u.endIf()}t.it.definedProperties.add(p);t.ok(R)}function hasDefault(t){return S.opts.useDefaults&&!S.compositeRule&&p[t].default!==undefined}function applyPropertySchema(u){t.subschema({keyword:"properties",schemaProp:u,dataProp:u},R)}}};u["default"]=w},1023:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:"property name must be valid",params:({params:t})=>(0,m._)`{propertyName: ${t.propertyName}}`};const b={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:v,code(t){const{gen:u,schema:p,data:v,it:b}=t;if((0,g.alwaysValidSchema)(b,p))return;const w=u.name("valid");u.forIn("key",v,(p=>{t.setParams({propertyName:p});t.subschema({keyword:"propertyNames",data:p,dataTypes:["string"],propertyName:p,compositeRule:true},w);u.if((0,m.not)(w),(()=>{t.error(true);if(!b.allErrors)u.break()}))}));t.ok(w)}};u["default"]=b},8472:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5049);const g={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:u,it:p}){if(u.if===undefined)(0,m.checkStrictMode)(p,`"${t}" without "if" is ignored`)}};u["default"]=g},1919:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateUnion=u.validateArray=u.usePattern=u.callValidateCode=u.schemaProperties=u.allSchemaProperties=u.noPropertyInData=u.propertyInData=u.isOwnProperty=u.hasPropFunc=u.reportMissingProp=u.checkMissingProp=u.checkReportMissingProp=void 0;const m=p(4671);const g=p(5049);const v=p(1529);const b=p(5049);function checkReportMissingProp(t,u){const{gen:p,data:g,it:v}=t;p.if(noPropertyInData(p,g,u,v.opts.ownProperties),(()=>{t.setParams({missingProperty:(0,m._)`${u}`},true);t.error()}))}u.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen:t,data:u,it:{opts:p}},g,v){return(0,m.or)(...g.map((g=>(0,m.and)(noPropertyInData(t,u,g,p.ownProperties),(0,m._)`${v} = ${g}`))))}u.checkMissingProp=checkMissingProp;function reportMissingProp(t,u){t.setParams({missingProperty:u},true);t.error()}u.reportMissingProp=reportMissingProp;function hasPropFunc(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,m._)`Object.prototype.hasOwnProperty`})}u.hasPropFunc=hasPropFunc;function isOwnProperty(t,u,p){return(0,m._)`${hasPropFunc(t)}.call(${u}, ${p})`}u.isOwnProperty=isOwnProperty;function propertyInData(t,u,p,g){const v=(0,m._)`${u}${(0,m.getProperty)(p)} !== undefined`;return g?(0,m._)`${v} && ${isOwnProperty(t,u,p)}`:v}u.propertyInData=propertyInData;function noPropertyInData(t,u,p,g){const v=(0,m._)`${u}${(0,m.getProperty)(p)} === undefined`;return g?(0,m.or)(v,(0,m.not)(isOwnProperty(t,u,p))):v}u.noPropertyInData=noPropertyInData;function allSchemaProperties(t){return t?Object.keys(t).filter((t=>t!=="__proto__")):[]}u.allSchemaProperties=allSchemaProperties;function schemaProperties(t,u){return allSchemaProperties(u).filter((p=>!(0,g.alwaysValidSchema)(t,u[p])))}u.schemaProperties=schemaProperties;function callValidateCode({schemaCode:t,data:u,it:{gen:p,topSchemaRef:g,schemaPath:b,errorPath:w},it:E},S,$,P){const R=P?(0,m._)`${t}, ${u}, ${g}${b}`:u;const x=[[v.default.instancePath,(0,m.strConcat)(v.default.instancePath,w)],[v.default.parentData,E.parentData],[v.default.parentDataProperty,E.parentDataProperty],[v.default.rootData,v.default.rootData]];if(E.opts.dynamicRef)x.push([v.default.dynamicAnchors,v.default.dynamicAnchors]);const O=(0,m._)`${R}, ${p.object(...x)}`;return $!==m.nil?(0,m._)`${S}.call(${$}, ${O})`:(0,m._)`${S}(${O})`}u.callValidateCode=callValidateCode;const w=(0,m._)`new RegExp`;function usePattern({gen:t,it:{opts:u}},p){const g=u.unicodeRegExp?"u":"";const{regExp:v}=u.code;const E=v(p,g);return t.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,m._)`${v.code==="new RegExp"?w:(0,b.useFunc)(t,v)}(${p}, ${g})`})}u.usePattern=usePattern;function validateArray(t){const{gen:u,data:p,keyword:v,it:b}=t;const w=u.name("valid");if(b.allErrors){const t=u.let("valid",true);validateItems((()=>u.assign(t,false)));return t}u.var(w,true);validateItems((()=>u.break()));return w;function validateItems(b){const E=u.const("len",(0,m._)`${p}.length`);u.forRange("i",0,E,(p=>{t.subschema({keyword:v,dataProp:p,dataPropType:g.Type.Num},w);u.if((0,m.not)(w),b)}))}}u.validateArray=validateArray;function validateUnion(t){const{gen:u,schema:p,keyword:v,it:b}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");const w=p.some((t=>(0,g.alwaysValidSchema)(b,t)));if(w&&!b.opts.unevaluated)return;const E=u.let("valid",false);const S=u.name("_valid");u.block((()=>p.forEach(((p,g)=>{const b=t.subschema({keyword:v,schemaProp:g,compositeRule:true},S);u.assign(E,(0,m._)`${E} || ${S}`);const w=t.mergeValidEvaluated(b,S);if(!w)u.if((0,m.not)(E))}))));t.result(E,(()=>t.reset()),(()=>t.error(true)))}u.validateUnion=validateUnion},9069:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const p={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};u["default"]=p},6550:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9069);const g=p(4247);const v=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",m.default,g.default];u["default"]=v},4247:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.callRef=u.getValidate=void 0;const m=p(909);const g=p(1919);const v=p(4671);const b=p(1529);const w=p(4033);const E=p(5049);const S={keyword:"$ref",schemaType:"string",code(t){const{gen:u,schema:p,it:g}=t;const{baseId:b,schemaEnv:E,validateName:S,opts:$,self:P}=g;const{root:R}=E;if((p==="#"||p==="#/")&&b===R.baseId)return callRootRef();const x=w.resolveRef.call(P,R,b,p);if(x===undefined)throw new m.default(g.opts.uriResolver,b,p);if(x instanceof w.SchemaEnv)return callValidate(x);return inlineRefSchema(x);function callRootRef(){if(E===R)return callRef(t,S,E,E.$async);const p=u.scopeValue("root",{ref:R});return callRef(t,(0,v._)`${p}.validate`,R,R.$async)}function callValidate(u){const p=getValidate(t,u);callRef(t,p,u,u.$async)}function inlineRefSchema(m){const g=u.scopeValue("schema",$.code.source===true?{ref:m,code:(0,v.stringify)(m)}:{ref:m});const b=u.name("valid");const w=t.subschema({schema:m,dataTypes:[],schemaPath:v.nil,topSchemaRef:g,errSchemaPath:p},b);t.mergeEvaluated(w);t.ok(b)}}};function getValidate(t,u){const{gen:p}=t;return u.validate?p.scopeValue("validate",{ref:u.validate}):(0,v._)`${p.scopeValue("wrapper",{ref:u})}.validate`}u.getValidate=getValidate;function callRef(t,u,p,m){const{gen:w,it:S}=t;const{allErrors:$,schemaEnv:P,opts:R}=S;const x=R.passContext?b.default.this:v.nil;if(m)callAsyncRef();else callSyncRef();function callAsyncRef(){if(!P.$async)throw new Error("async schema referenced by sync schema");const p=w.let("valid");w.try((()=>{w.code((0,v._)`await ${(0,g.callValidateCode)(t,u,x)}`);addEvaluatedFrom(u);if(!$)w.assign(p,true)}),(t=>{w.if((0,v._)`!(${t} instanceof ${S.ValidationError})`,(()=>w.throw(t)));addErrorsFrom(t);if(!$)w.assign(p,false)}));t.ok(p)}function callSyncRef(){t.result((0,g.callValidateCode)(t,u,x),(()=>addEvaluatedFrom(u)),(()=>addErrorsFrom(u)))}function addErrorsFrom(t){const u=(0,v._)`${t}.errors`;w.assign(b.default.vErrors,(0,v._)`${b.default.vErrors} === null ? ${u} : ${b.default.vErrors}.concat(${u})`);w.assign(b.default.errors,(0,v._)`${b.default.vErrors}.length`)}function addEvaluatedFrom(t){var u;if(!S.opts.unevaluated)return;const m=(u=p===null||p===void 0?void 0:p.validate)===null||u===void 0?void 0:u.evaluated;if(S.props!==true){if(m&&!m.dynamicProps){if(m.props!==undefined){S.props=E.mergeEvaluated.props(w,m.props,S.props)}}else{const u=w.var("props",(0,v._)`${t}.evaluated.props`);S.props=E.mergeEvaluated.props(w,u,S.props,v.Name)}}if(S.items!==true){if(m&&!m.dynamicItems){if(m.items!==undefined){S.items=E.mergeEvaluated.items(w,m.items,S.items)}}else{const u=w.var("items",(0,v._)`${t}.evaluated.items`);S.items=E.mergeEvaluated.items(w,u,S.items,v.Name)}}}}u.callRef=callRef;u["default"]=S},9099:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(2330);const v=p(4033);const b=p(909);const w=p(5049);const E={message:({params:{discrError:t,tagName:u}})=>t===g.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:t,tag:u,tagName:p}})=>(0,m._)`{error: ${t}, tag: ${p}, tagValue: ${u}}`};const S={keyword:"discriminator",type:"object",schemaType:"object",error:E,code(t){const{gen:u,data:p,schema:E,parentSchema:S,it:$}=t;const{oneOf:P}=S;if(!$.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const R=E.propertyName;if(typeof R!="string")throw new Error("discriminator: requires propertyName");if(E.mapping)throw new Error("discriminator: mapping is not supported");if(!P)throw new Error("discriminator: requires oneOf keyword");const x=u.let("valid",false);const O=u.const("tag",(0,m._)`${p}${(0,m.getProperty)(R)}`);u.if((0,m._)`typeof ${O} == "string"`,(()=>validateMapping()),(()=>t.error(false,{discrError:g.DiscrError.Tag,tag:O,tagName:R})));t.ok(x);function validateMapping(){const p=getMapping();u.if(false);for(const t in p){u.elseIf((0,m._)`${O} === ${t}`);u.assign(x,applyTagSchema(p[t]))}u.else();t.error(false,{discrError:g.DiscrError.Mapping,tag:O,tagName:R});u.endIf()}function applyTagSchema(p){const g=u.name("valid");const v=t.subschema({keyword:"oneOf",schemaProp:p},g);t.mergeEvaluated(v,m.Name);return g}function getMapping(){var t;const u={};const p=hasRequired(S);let m=true;for(let u=0;u<P.length;u++){let g=P[u];if((g===null||g===void 0?void 0:g.$ref)&&!(0,w.schemaHasRulesButRef)(g,$.self.RULES)){const t=g.$ref;g=v.resolveRef.call($.self,$.schemaEnv.root,$.baseId,t);if(g instanceof v.SchemaEnv)g=g.schema;if(g===undefined)throw new b.default($.opts.uriResolver,$.baseId,t)}const E=(t=g===null||g===void 0?void 0:g.properties)===null||t===void 0?void 0:t[R];if(typeof E!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${R}"`)}m=m&&(p||hasRequired(g));addMappings(E,u)}if(!m)throw new Error(`discriminator: "${R}" must be required`);return u;function hasRequired({required:t}){return Array.isArray(t)&&t.includes(R)}function addMappings(t,u){if(t.const){addMapping(t.const,u)}else if(t.enum){for(const p of t.enum){addMapping(p,u)}}else{throw new Error(`discriminator: "properties/${R}" must have "const" or "enum"`)}}function addMapping(t,p){if(typeof t!="string"||t in u){throw new Error(`discriminator: "${R}" values must be unique strings`)}u[t]=p}}}};u["default"]=S},2330:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.DiscrError=void 0;var p;(function(t){t["Tag"]="tag";t["Mapping"]="mapping"})(p||(u.DiscrError=p={}))},4231:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6550);const g=p(9706);const v=p(8112);const b=p(6774);const w=p(2043);const E=p(5119);const S=p(6242);const $=p(7123);const P=[b.default,m.default,g.default,(0,v.default)(true),S.default,$.metadataVocabulary,$.contentVocabulary,w.default,E.default];u["default"]=P},1982:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6550);const g=p(9706);const v=p(8112);const b=p(6242);const w=p(7123);const E=[m.default,g.default,(0,v.default)(),b.default,w.metadataVocabulary,w.contentVocabulary];u["default"]=E},6758:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.dynamicAnchor=void 0;const m=p(4671);const g=p(1529);const v=p(4033);const b=p(4247);const w={keyword:"$dynamicAnchor",schemaType:"string",code:t=>dynamicAnchor(t,t.schema)};function dynamicAnchor(t,u){const{gen:p,it:v}=t;v.schemaEnv.root.dynamicAnchors[u]=true;const b=(0,m._)`${g.default.dynamicAnchors}${(0,m.getProperty)(u)}`;const w=v.errSchemaPath==="#"?v.validateName:_getValidate(t);p.if((0,m._)`!${b}`,(()=>p.assign(b,w)))}u.dynamicAnchor=dynamicAnchor;function _getValidate(t){const{schemaEnv:u,schema:p,self:m}=t.it;const{root:g,baseId:w,localRefs:E,meta:S}=u.root;const{schemaId:$}=m.opts;const P=new v.SchemaEnv({schema:p,schemaId:$,root:g,baseId:w,localRefs:E,meta:S});v.compileSchema.call(m,P);return(0,b.getValidate)(t,P)}u["default"]=w},1178:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.dynamicRef=void 0;const m=p(4671);const g=p(1529);const v=p(4247);const b={keyword:"$dynamicRef",schemaType:"string",code:t=>dynamicRef(t,t.schema)};function dynamicRef(t,u){const{gen:p,keyword:b,it:w}=t;if(u[0]!=="#")throw new Error(`"${b}" only supports hash fragment reference`);const E=u.slice(1);if(w.allErrors){_dynamicRef()}else{const u=p.let("valid",false);_dynamicRef(u);t.ok(u)}function _dynamicRef(t){if(w.schemaEnv.root.dynamicAnchors[E]){const u=p.let("_v",(0,m._)`${g.default.dynamicAnchors}${(0,m.getProperty)(E)}`);p.if(u,_callRef(u,t),_callRef(w.validateName,t))}else{_callRef(w.validateName,t)()}}function _callRef(u,m){return m?()=>p.block((()=>{(0,v.callRef)(t,u);p.let(m,true)})):()=>(0,v.callRef)(t,u)}}u.dynamicRef=dynamicRef;u["default"]=b},6774:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6758);const g=p(1178);const v=p(2719);const b=p(8249);const w=[m.default,g.default,v.default,b.default];u["default"]=w},2719:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6758);const g=p(5049);const v={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){if(t.schema)(0,m.dynamicAnchor)(t,"");else(0,g.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};u["default"]=v},8249:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1178);const g={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,m.dynamicRef)(t,t.schema)};u["default"]=g},3779:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g={message:({schemaCode:t})=>(0,m.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,m._)`{format: ${t}}`};const v={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:g,code(t,u){const{gen:p,data:g,$data:v,schema:b,schemaCode:w,it:E}=t;const{opts:S,errSchemaPath:$,schemaEnv:P,self:R}=E;if(!S.validateFormats)return;if(v)validate$DataFormat();else validateFormat();function validate$DataFormat(){const v=p.scopeValue("formats",{ref:R.formats,code:S.code.formats});const b=p.const("fDef",(0,m._)`${v}[${w}]`);const E=p.let("fType");const $=p.let("format");p.if((0,m._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,(()=>p.assign(E,(0,m._)`${b}.type || "string"`).assign($,(0,m._)`${b}.validate`)),(()=>p.assign(E,(0,m._)`"string"`).assign($,b)));t.fail$data((0,m.or)(unknownFmt(),invalidFmt()));function unknownFmt(){if(S.strictSchema===false)return m.nil;return(0,m._)`${w} && !${$}`}function invalidFmt(){const t=P.$async?(0,m._)`(${b}.async ? await ${$}(${g}) : ${$}(${g}))`:(0,m._)`${$}(${g})`;const p=(0,m._)`(typeof ${$} == "function" ? ${t} : ${$}.test(${g}))`;return(0,m._)`${$} && ${$} !== true && ${E} === ${u} && !${p}`}}function validateFormat(){const v=R.formats[b];if(!v){unknownFormat();return}if(v===true)return;const[w,E,x]=getFormat(v);if(w===u)t.pass(validCondition());function unknownFormat(){if(S.strictSchema===false){R.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${b}" ignored in schema at path "${$}"`}}function getFormat(t){const u=t instanceof RegExp?(0,m.regexpCode)(t):S.code.formats?(0,m._)`${S.code.formats}${(0,m.getProperty)(b)}`:undefined;const g=p.scopeValue("formats",{key:b,ref:t,code:u});if(typeof t=="object"&&!(t instanceof RegExp)){return[t.type||"string",t.validate,(0,m._)`${g}.validate`]}return["string",t,g]}function validCondition(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!P.$async)throw new Error("async format in sync schema");return(0,m._)`await ${x}(${g})`}return typeof E=="function"?(0,m._)`${x}(${g})`:(0,m._)`${x}.test(${g})`}}}};u["default"]=v},6242:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(3779);const g=[m.default];u["default"]=g},7123:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.contentVocabulary=u.metadataVocabulary=void 0;u.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];u.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},2043:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(7800);const g=p(2663);const v=p(7928);const b=[m.default,g.default,v.default];u["default"]=b},5119:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9250);const g=p(3703);const v=[m.default,g.default];u["default"]=v},3703:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v={message:({params:{len:t}})=>(0,m.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,m._)`{limit: ${t}}`};const b={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:v,code(t){const{gen:u,schema:p,data:v,it:b}=t;const w=b.items||0;if(w===true)return;const E=u.const("len",(0,m._)`${v}.length`);if(p===false){t.setParams({len:w});t.fail((0,m._)`${E} > ${w}`)}else if(typeof p=="object"&&!(0,g.alwaysValidSchema)(b,p)){const p=u.var("valid",(0,m._)`${E} <= ${w}`);u.if((0,m.not)(p),(()=>validateItems(p,w)));t.ok(p)}b.items=true;function validateItems(p,v){u.forRange("i",v,E,(v=>{t.subschema({keyword:"unevaluatedItems",dataProp:v,dataPropType:g.Type.Num},p);if(!b.allErrors)u.if((0,m.not)(p),(()=>u.break()))}))}}};u["default"]=b},9250:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(1529);const b={message:"must NOT have unevaluated properties",params:({params:t})=>(0,m._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`};const w={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:true,error:b,code(t){const{gen:u,schema:p,data:b,errsCount:w,it:E}=t;if(!w)throw new Error("ajv implementation error");const{allErrors:S,props:$}=E;if($ instanceof m.Name){u.if((0,m._)`${$} !== true`,(()=>u.forIn("key",b,(t=>u.if(unevaluatedDynamic($,t),(()=>unevaluatedPropCode(t)))))))}else if($!==true){u.forIn("key",b,(t=>$===undefined?unevaluatedPropCode(t):u.if(unevaluatedStatic($,t),(()=>unevaluatedPropCode(t)))))}E.props=true;t.ok((0,m._)`${w} === ${v.default.errors}`);function unevaluatedPropCode(v){if(p===false){t.setParams({unevaluatedProperty:v});t.error();if(!S)u.break();return}if(!(0,g.alwaysValidSchema)(E,p)){const p=u.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:v,dataPropType:g.Type.Str},p);if(!S)u.if((0,m.not)(p),(()=>u.break()))}}function unevaluatedDynamic(t,u){return(0,m._)`!${t} || !${t}[${u}]`}function unevaluatedStatic(t,u){const p=[];for(const g in t){if(t[g]===true)p.push((0,m._)`${u} !== ${g}`)}return(0,m.and)(...p)}}};u["default"]=w},1793:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(9804);const b={message:"must be equal to constant",params:({schemaCode:t})=>(0,m._)`{allowedValue: ${t}}`};const w={keyword:"const",$data:true,error:b,code(t){const{gen:u,data:p,$data:b,schemaCode:w,schema:E}=t;if(b||E&&typeof E=="object"){t.fail$data((0,m._)`!${(0,g.useFunc)(u,v.default)}(${p}, ${w})`)}else{t.fail((0,m._)`${E} !== ${p}`)}}};u["default"]=w},7800:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4239);const g={keyword:"dependentRequired",type:"object",schemaType:"object",error:m.error,code:t=>(0,m.validatePropertyDeps)(t)};u["default"]=g},3429:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(9804);const b={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,m._)`{allowedValues: ${t}}`};const w={keyword:"enum",schemaType:"array",$data:true,error:b,code(t){const{gen:u,data:p,$data:b,schema:w,schemaCode:E,it:S}=t;if(!b&&w.length===0)throw new Error("enum must have non-empty array");const $=w.length>=S.opts.loopEnum;let P;const getEql=()=>P!==null&&P!==void 0?P:P=(0,g.useFunc)(u,v.default);let R;if($||b){R=u.let("valid");t.block$data(R,loopEnum)}else{if(!Array.isArray(w))throw new Error("ajv implementation error");const t=u.const("vSchema",E);R=(0,m.or)(...w.map(((u,p)=>equalCode(t,p))))}t.pass(R);function loopEnum(){u.assign(R,false);u.forOf("v",E,(t=>u.if((0,m._)`${getEql()}(${p}, ${t})`,(()=>u.assign(R,true).break()))))}function equalCode(t,u){const g=w[u];return typeof g==="object"&&g!==null?(0,m._)`${getEql()}(${p}, ${t}[${u}])`:(0,m._)`${p} === ${g}`}}};u["default"]=w},9706:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(7560);const g=p(7677);const v=p(7453);const b=p(3744);const w=p(6088);const E=p(9185);const S=p(2085);const $=p(8835);const P=p(1793);const R=p(3429);const x=[m.default,g.default,v.default,b.default,w.default,E.default,S.default,$.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},P.default,R.default];u["default"]=x},7928:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5049);const g={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:u,it:p}){if(u.contains===undefined){(0,m.checkStrictMode)(p,`"${t}" without "contains" is ignored`)}}};u["default"]=g},2085:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g={message({keyword:t,schemaCode:u}){const p=t==="maxItems"?"more":"fewer";return(0,m.str)`must NOT have ${p} than ${u} items`},params:({schemaCode:t})=>(0,m._)`{limit: ${t}}`};const v={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:g,code(t){const{keyword:u,data:p,schemaCode:g}=t;const v=u==="maxItems"?m.operators.GT:m.operators.LT;t.fail$data((0,m._)`${p}.length ${v} ${g}`)}};u["default"]=v},7453:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=p(5049);const v=p(4679);const b={message({keyword:t,schemaCode:u}){const p=t==="maxLength"?"more":"fewer";return(0,m.str)`must NOT have ${p} than ${u} characters`},params:({schemaCode:t})=>(0,m._)`{limit: ${t}}`};const w={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:b,code(t){const{keyword:u,data:p,schemaCode:b,it:w}=t;const E=u==="maxLength"?m.operators.GT:m.operators.LT;const S=w.opts.unicode===false?(0,m._)`${p}.length`:(0,m._)`${(0,g.useFunc)(t.gen,v.default)}(${p})`;t.fail$data((0,m._)`${S} ${E} ${b}`)}};u["default"]=w},7560:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g=m.operators;const v={maximum:{okStr:"<=",ok:g.LTE,fail:g.GT},minimum:{okStr:">=",ok:g.GTE,fail:g.LT},exclusiveMaximum:{okStr:"<",ok:g.LT,fail:g.GTE},exclusiveMinimum:{okStr:">",ok:g.GT,fail:g.LTE}};const b={message:({keyword:t,schemaCode:u})=>(0,m.str)`must be ${v[t].okStr} ${u}`,params:({keyword:t,schemaCode:u})=>(0,m._)`{comparison: ${v[t].okStr}, limit: ${u}}`};const w={keyword:Object.keys(v),type:"number",schemaType:"number",$data:true,error:b,code(t){const{keyword:u,data:p,schemaCode:g}=t;t.fail$data((0,m._)`${p} ${v[u].fail} ${g} || isNaN(${p})`)}};u["default"]=w},6088:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g={message({keyword:t,schemaCode:u}){const p=t==="maxProperties"?"more":"fewer";return(0,m.str)`must NOT have ${p} than ${u} properties`},params:({schemaCode:t})=>(0,m._)`{limit: ${t}}`};const v={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:g,code(t){const{keyword:u,data:p,schemaCode:g}=t;const v=u==="maxProperties"?m.operators.GT:m.operators.LT;t.fail$data((0,m._)`Object.keys(${p}).length ${v} ${g}`)}};u["default"]=v},7677:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4671);const g={message:({schemaCode:t})=>(0,m.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,m._)`{multipleOf: ${t}}`};const v={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:g,code(t){const{gen:u,data:p,schemaCode:g,it:v}=t;const b=v.opts.multipleOfPrecision;const w=u.let("res");const E=b?(0,m._)`Math.abs(Math.round(${w}) - ${w}) > 1e-${b}`:(0,m._)`${w} !== parseInt(${w})`;t.fail$data((0,m._)`(${g} === 0 || (${w} = ${p}/${g}, ${E}))`)}};u["default"]=v},3744:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g=p(5049);const v=p(4671);const b={message:({schemaCode:t})=>(0,v.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,v._)`{pattern: ${t}}`};const w={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:b,code(t){const{gen:u,data:p,$data:b,schema:w,schemaCode:E,it:S}=t;const $=S.opts.unicodeRegExp?"u":"";if(b){const{regExp:m}=S.opts.code;const b=m.code==="new RegExp"?(0,v._)`new RegExp`:(0,g.useFunc)(u,m);const w=u.let("valid");u.try((()=>u.assign(w,(0,v._)`${b}(${E}, ${$}).test(${p})`)),(()=>u.assign(w,false)));t.fail$data((0,v._)`!${w}`)}else{const u=(0,m.usePattern)(t,w);t.fail$data((0,v._)`!${u}.test(${p})`)}}};u["default"]=w},9185:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1919);const g=p(4671);const v=p(5049);const b={message:({params:{missingProperty:t}})=>(0,g.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,g._)`{missingProperty: ${t}}`};const w={keyword:"required",type:"object",schemaType:"array",$data:true,error:b,code(t){const{gen:u,schema:p,schemaCode:b,data:w,$data:E,it:S}=t;const{opts:$}=S;if(!E&&p.length===0)return;const P=p.length>=$.loopRequired;if(S.allErrors)allErrorsMode();else exitOnErrorMode();if($.strictRequired){const u=t.parentSchema.properties;const{definedProperties:m}=t.it;for(const t of p){if((u===null||u===void 0?void 0:u[t])===undefined&&!m.has(t)){const u=S.schemaEnv.baseId+S.errSchemaPath;const p=`required property "${t}" is not defined at "${u}" (strictRequired)`;(0,v.checkStrictMode)(S,p,S.opts.strictRequired)}}}function allErrorsMode(){if(P||E){t.block$data(g.nil,loopAllRequired)}else{for(const u of p){(0,m.checkReportMissingProp)(t,u)}}}function exitOnErrorMode(){const g=u.let("missing");if(P||E){const p=u.let("valid",true);t.block$data(p,(()=>loopUntilMissing(g,p)));t.ok(p)}else{u.if((0,m.checkMissingProp)(t,p,g));(0,m.reportMissingProp)(t,g);u.else()}}function loopAllRequired(){u.forOf("prop",b,(p=>{t.setParams({missingProperty:p});u.if((0,m.noPropertyInData)(u,w,p,$.ownProperties),(()=>t.error()))}))}function loopUntilMissing(p,v){t.setParams({missingProperty:p});u.forOf(p,b,(()=>{u.assign(v,(0,m.propertyInData)(u,w,p,$.ownProperties));u.if((0,g.not)(v),(()=>{t.error();u.break()}))}),g.nil)}}};u["default"]=w},8835:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(3330);const g=p(4671);const v=p(5049);const b=p(9804);const w={message:({params:{i:t,j:u}})=>(0,g.str)`must NOT have duplicate items (items ## ${u} and ${t} are identical)`,params:({params:{i:t,j:u}})=>(0,g._)`{i: ${t}, j: ${u}}`};const E={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:w,code(t){const{gen:u,data:p,$data:w,schema:E,parentSchema:S,schemaCode:$,it:P}=t;if(!w&&!E)return;const R=u.let("valid");const x=S.items?(0,m.getSchemaTypes)(S.items):[];t.block$data(R,validateUniqueItems,(0,g._)`${$} === false`);t.ok(R);function validateUniqueItems(){const m=u.let("i",(0,g._)`${p}.length`);const v=u.let("j");t.setParams({i:m,j:v});u.assign(R,true);u.if((0,g._)`${m} > 1`,(()=>(canOptimize()?loopN:loopN2)(m,v)))}function canOptimize(){return x.length>0&&!x.some((t=>t==="object"||t==="array"))}function loopN(v,b){const w=u.name("item");const E=(0,m.checkDataTypes)(x,w,P.opts.strictNumbers,m.DataType.Wrong);const S=u.const("indices",(0,g._)`{}`);u.for((0,g._)`;${v}--;`,(()=>{u.let(w,(0,g._)`${p}[${v}]`);u.if(E,(0,g._)`continue`);if(x.length>1)u.if((0,g._)`typeof ${w} == "string"`,(0,g._)`${w} += "_"`);u.if((0,g._)`typeof ${S}[${w}] == "number"`,(()=>{u.assign(b,(0,g._)`${S}[${w}]`);t.error();u.assign(R,false).break()})).code((0,g._)`${S}[${w}] = ${v}`)}))}function loopN2(m,w){const E=(0,v.useFunc)(u,b.default);const S=u.name("outer");u.label(S).for((0,g._)`;${m}--;`,(()=>u.for((0,g._)`${w} = ${m}; ${w}--;`,(()=>u.if((0,g._)`${E}(${p}[${m}], ${p}[${w}])`,(()=>{t.error();u.assign(R,false).break(S)}))))))}}};u["default"]=E},9850:(t,u,p)=>{var m=p(6647);function retry(t,u){function run(p,g){var v=u||{};var b;if(!("randomize"in v)){v.randomize=true}b=m.operation(v);function bail(t){g(t||new Error("Aborted"))}function onError(t,u){if(t.bail){bail(t);return}if(!b.retry(t)){g(b.mainError())}else if(v.onRetry){v.onRetry(t,u)}}function runAttempt(u){var m;try{m=t(bail,u)}catch(t){onError(t,u);return}Promise.resolve(m).then(p).catch((function catchIt(t){onError(t,u)}))}b.attempt(runAttempt)}return new Promise(run)}t.exports=retry},1483:(t,u,p)=>{"use strict";const m=p(7386);const g=p(3638);const v=p(6135);const b=p(6148);const braces=(t,u={})=>{let p=[];if(Array.isArray(t)){for(const m of t){const t=braces.create(m,u);if(Array.isArray(t)){p.push(...t)}else{p.push(t)}}}else{p=[].concat(braces.create(t,u))}if(u&&u.expand===true&&u.nodupes===true){p=[...new Set(p)]}return p};braces.parse=(t,u={})=>b(t,u);braces.stringify=(t,u={})=>{if(typeof t==="string"){return m(braces.parse(t,u),u)}return m(t,u)};braces.compile=(t,u={})=>{if(typeof t==="string"){t=braces.parse(t,u)}return g(t,u)};braces.expand=(t,u={})=>{if(typeof t==="string"){t=braces.parse(t,u)}let p=v(t,u);if(u.noempty===true){p=p.filter(Boolean)}if(u.nodupes===true){p=[...new Set(p)]}return p};braces.create=(t,u={})=>{if(t===""||t.length<3){return[t]}return u.expand!==true?braces.compile(t,u):braces.expand(t,u)};t.exports=braces},3638:(t,u,p)=>{"use strict";const m=p(1430);const g=p(8886);const compile=(t,u={})=>{const walk=(t,p={})=>{const v=g.isInvalidBrace(p);const b=t.invalid===true&&u.escapeInvalid===true;const w=v===true||b===true;const E=u.escapeInvalid===true?"\\":"";let S="";if(t.isOpen===true){return E+t.value}if(t.isClose===true){console.log("node.isClose",E,t.value);return E+t.value}if(t.type==="open"){return w?E+t.value:"("}if(t.type==="close"){return w?E+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":w?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){const p=g.reduce(t.nodes);const v=m(...p,{...u,wrap:false,toRegex:true,strictZeros:true});if(v.length!==0){return p.length>1&&v.length>1?`(${v})`:v}}if(t.nodes){for(const u of t.nodes){S+=walk(u,t)}}return S};return walk(t)};t.exports=compile},1134:t=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},6135:(t,u,p)=>{"use strict";const m=p(1430);const g=p(7386);const v=p(8886);const append=(t="",u="",p=false)=>{const m=[];t=[].concat(t);u=[].concat(u);if(!u.length)return t;if(!t.length){return p?v.flatten(u).map((t=>`{${t}}`)):u}for(const g of t){if(Array.isArray(g)){for(const t of g){m.push(append(t,u,p))}}else{for(let t of u){if(p===true&&typeof t==="string")t=`{${t}}`;m.push(Array.isArray(t)?append(g,t,p):g+t)}}}return v.flatten(m)};const expand=(t,u={})=>{const p=u.rangeLimit===undefined?1e3:u.rangeLimit;const walk=(t,b={})=>{t.queue=[];let w=b;let E=b.queue;while(w.type!=="brace"&&w.type!=="root"&&w.parent){w=w.parent;E=w.queue}if(t.invalid||t.dollar){E.push(append(E.pop(),g(t,u)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){E.push(append(E.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){const b=v.reduce(t.nodes);if(v.exceedsLimit(...b,u.step,p)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let w=m(...b,u);if(w.length===0){w=g(t,u)}E.push(append(E.pop(),w));t.nodes=[];return}const S=v.encloseBrace(t);let $=t.queue;let P=t;while(P.type!=="brace"&&P.type!=="root"&&P.parent){P=P.parent;$=P.queue}for(let u=0;u<t.nodes.length;u++){const p=t.nodes[u];if(p.type==="comma"&&t.type==="brace"){if(u===1)$.push("");$.push("");continue}if(p.type==="close"){E.push(append(E.pop(),$,S));continue}if(p.value&&p.type!=="open"){$.push(append($.pop(),p.value));continue}if(p.nodes){walk(p,t)}}return $};return v.flatten(walk(t))};t.exports=expand},6148:(t,u,p)=>{"use strict";const m=p(7386);const{MAX_LENGTH:g,CHAR_BACKSLASH:v,CHAR_BACKTICK:b,CHAR_COMMA:w,CHAR_DOT:E,CHAR_LEFT_PARENTHESES:S,CHAR_RIGHT_PARENTHESES:$,CHAR_LEFT_CURLY_BRACE:P,CHAR_RIGHT_CURLY_BRACE:R,CHAR_LEFT_SQUARE_BRACKET:x,CHAR_RIGHT_SQUARE_BRACKET:O,CHAR_DOUBLE_QUOTE:A,CHAR_SINGLE_QUOTE:k,CHAR_NO_BREAK_SPACE:T,CHAR_ZERO_WIDTH_NOBREAK_SPACE:C}=p(1134);const parse=(t,u={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}const p=u||{};const I=typeof p.maxLength==="number"?Math.min(g,p.maxLength):g;if(t.length>I){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${I})`)}const N={type:"root",input:t,nodes:[]};const D=[N];let j=N;let L=N;let M=0;const U=t.length;let B=0;let H=0;let z;const advance=()=>t[B++];const push=t=>{if(t.type==="text"&&L.type==="dot"){L.type="text"}if(L&&L.type==="text"&&t.type==="text"){L.value+=t.value;return}j.nodes.push(t);t.parent=j;t.prev=L;L=t;return t};push({type:"bos"});while(B<U){j=D[D.length-1];z=advance();if(z===C||z===T){continue}if(z===v){push({type:"text",value:(u.keepEscaping?z:"")+advance()});continue}if(z===O){push({type:"text",value:"\\"+z});continue}if(z===x){M++;let t;while(B<U&&(t=advance())){z+=t;if(t===x){M++;continue}if(t===v){z+=advance();continue}if(t===O){M--;if(M===0){break}}}push({type:"text",value:z});continue}if(z===S){j=push({type:"paren",nodes:[]});D.push(j);push({type:"text",value:z});continue}if(z===$){if(j.type!=="paren"){push({type:"text",value:z});continue}j=D.pop();push({type:"text",value:z});j=D[D.length-1];continue}if(z===A||z===k||z===b){const t=z;let p;if(u.keepQuotes!==true){z=""}while(B<U&&(p=advance())){if(p===v){z+=p+advance();continue}if(p===t){if(u.keepQuotes===true)z+=p;break}z+=p}push({type:"text",value:z});continue}if(z===P){H++;const t=L.value&&L.value.slice(-1)==="$"||j.dollar===true;const u={type:"brace",open:true,close:false,dollar:t,depth:H,commas:0,ranges:0,nodes:[]};j=push(u);D.push(j);push({type:"open",value:z});continue}if(z===R){if(j.type!=="brace"){push({type:"text",value:z});continue}const t="close";j=D.pop();j.close=true;push({type:t,value:z});H--;j=D[D.length-1];continue}if(z===w&&H>0){if(j.ranges>0){j.ranges=0;const t=j.nodes.shift();j.nodes=[t,{type:"text",value:m(j)}]}push({type:"comma",value:z});j.commas++;continue}if(z===E&&H>0&&j.commas===0){const t=j.nodes;if(H===0||t.length===0){push({type:"text",value:z});continue}if(L.type==="dot"){j.range=[];L.value+=z;L.type="range";if(j.nodes.length!==3&&j.nodes.length!==5){j.invalid=true;j.ranges=0;L.type="text";continue}j.ranges++;j.args=[];continue}if(L.type==="range"){t.pop();const u=t[t.length-1];u.value+=L.value+z;L=u;j.ranges--;continue}push({type:"dot",value:z});continue}push({type:"text",value:z})}do{j=D.pop();if(j.type!=="root"){j.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));const t=D[D.length-1];const u=t.nodes.indexOf(j);t.nodes.splice(u,1,...j.nodes)}}while(D.length>0);push({type:"eos"});return N};t.exports=parse},7386:(t,u,p)=>{"use strict";const m=p(8886);t.exports=(t,u={})=>{const stringify=(t,p={})=>{const g=u.escapeInvalid&&m.isInvalidBrace(p);const v=t.invalid===true&&u.escapeInvalid===true;let b="";if(t.value){if((g||v)&&m.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(const u of t.nodes){b+=stringify(u)}}return b};return stringify(t)}},8886:(t,u)=>{"use strict";u.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};u.find=(t,u)=>t.nodes.find((t=>t.type===u));u.exceedsLimit=(t,p,m=1,g)=>{if(g===false)return false;if(!u.isInteger(t)||!u.isInteger(p))return false;return(Number(p)-Number(t))/Number(m)>=g};u.escapeNode=(t,u=0,p)=>{const m=t.nodes[u];if(!m)return;if(p&&m.type===p||m.type==="open"||m.type==="close"){if(m.escaped!==true){m.value="\\"+m.value;m.escaped=true}}};u.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};u.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};u.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};u.reduce=t=>t.reduce(((t,u)=>{if(u.type==="text")t.push(u.value);if(u.type==="range")u.type="text";return t}),[]);u.flatten=(...t)=>{const u=[];const flat=t=>{for(let p=0;p<t.length;p++){const m=t[p];if(Array.isArray(m)){flat(m);continue}if(m!==undefined){u.push(m)}}return u};flat(t);return u}},4791:(t,u,p)=>{"use strict";const m=p(5317);const g=p(4160);const v=p(7894);function spawn(t,u,p){const b=g(t,u,p);const w=m.spawn(b.command,b.args,b.options);v.hookChildProcess(w,b);return w}function spawnSync(t,u,p){const b=g(t,u,p);const w=m.spawnSync(b.command,b.args,b.options);w.error=w.error||v.verifyENOENTSync(w.status,b);return w}t.exports=spawn;t.exports.spawn=spawn;t.exports.sync=spawnSync;t.exports._parse=g;t.exports._enoent=v},7894:t=>{"use strict";const u=process.platform==="win32";function notFoundError(t,u){return Object.assign(new Error(`${u} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${u} ${t.command}`,path:t.command,spawnargs:t.args})}function hookChildProcess(t,p){if(!u){return}const m=t.emit;t.emit=function(u,g){if(u==="exit"){const u=verifyENOENT(g,p);if(u){return m.call(t,"error",u)}}return m.apply(t,arguments)}}function verifyENOENT(t,p){if(u&&t===1&&!p.file){return notFoundError(p.original,"spawn")}return null}function verifyENOENTSync(t,p){if(u&&t===1&&!p.file){return notFoundError(p.original,"spawnSync")}return null}t.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},4160:(t,u,p)=>{"use strict";const m=p(6928);const g=p(2015);const v=p(1);const b=p(748);const w=process.platform==="win32";const E=/\.(?:com|exe)$/i;const S=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(t){t.file=g(t);const u=t.file&&b(t.file);if(u){t.args.unshift(t.file);t.command=u;return g(t)}return t.file}function parseNonShell(t){if(!w){return t}const u=detectShebang(t);const p=!E.test(u);if(t.options.forceShell||p){const p=S.test(u);t.command=m.normalize(t.command);t.command=v.command(t.command);t.args=t.args.map((t=>v.argument(t,p)));const g=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${g}"`];t.command=process.env.comspec||"cmd.exe";t.options.windowsVerbatimArguments=true}return t}function parse(t,u,p){if(u&&!Array.isArray(u)){p=u;u=null}u=u?u.slice(0):[];p=Object.assign({},p);const m={command:t,args:u,options:p,file:undefined,original:{command:t,args:u}};return p.shell?m:parseNonShell(m)}t.exports=parse},1:t=>{"use strict";const u=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(t){t=t.replace(u,"^$1");return t}function escapeArgument(t,p){t=`${t}`;t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"');t=t.replace(/(?=(\\+?)?)\1$/,"$1$1");t=`"${t}"`;t=t.replace(u,"^$1");if(p){t=t.replace(u,"^$1")}return t}t.exports.command=escapeCommand;t.exports.argument=escapeArgument},748:(t,u,p)=>{"use strict";const m=p(9896);const g=p(8309);function readShebang(t){const u=150;const p=Buffer.alloc(u);let v;try{v=m.openSync(t,"r");m.readSync(v,p,0,u,0);m.closeSync(v)}catch(t){}return g(p.toString())}t.exports=readShebang},2015:(t,u,p)=>{"use strict";const m=p(6928);const g=p(3969);const v=p(6334);function resolveCommandAttempt(t,u){const p=t.options.env||process.env;const b=process.cwd();const w=t.options.cwd!=null;const E=w&&process.chdir!==undefined&&!process.chdir.disabled;if(E){try{process.chdir(t.options.cwd)}catch(t){}}let S;try{S=g.sync(t.command,{path:p[v({env:p})],pathExt:u?m.delimiter:undefined})}catch(t){}finally{if(E){process.chdir(b)}}if(S){S=m.resolve(w?t.options.cwd:"",S)}return S}function resolveCommand(t){return resolveCommandAttempt(t)||resolveCommandAttempt(t,true)}t.exports=resolveCommand},6345:t=>{"use strict";
9
9
  /*!
10
10
  * @description Recursive object extending
11
11
  * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
@@ -2,7 +2,9 @@
2
2
 
3
3
  This project is a Zuplo AI Gateway. It exposes the canonical AI Gateway
4
4
  operations (`/v1/chat/completions`, `/v1/messages`, `/v1/responses`, and
5
- `/v1/embeddings`) through `aiGatewayHandlerV2` under `/{app_id}/v1/*`.
5
+ `/v1/embeddings`) through `aiGatewayHandlerV2` under `/{app_id}/*`. Only paths
6
+ whose suffix is a supported `/v1/...` operation succeed; other paths under
7
+ `/{app_id}` return 404.
6
8
 
7
9
  Each route invokes `ai-gateway-configuration-executor-v2-inbound`, which loads
8
10
  the application's configuration from the `app_id` path segment and runs its
@@ -3,16 +3,16 @@
3
3
  "info": {
4
4
  "version": "1.0.0",
5
5
  "title": "AI Gateway API",
6
- "description": "A unified API gateway for multiple AI providers. All OpenAI-compatible ops are served under /{app_id}/v1/*."
6
+ "description": "A unified API gateway for multiple AI providers. OpenAI-compatible ops are served under /{app_id}/v1/*; other paths under /{app_id} are rejected."
7
7
  },
8
8
  "paths": {
9
- "/:app_id/v1/(.*)": {
9
+ "/:app_id/(.*)": {
10
10
  "x-zuplo-path": {
11
11
  "pathMode": "url-pattern"
12
12
  },
13
13
  "get,post,delete": {
14
14
  "summary": "AI Gateway catch-all",
15
- "description": "Routes AI requests under /{app_id}/v1/* to the AI Gateway handler. The configuration executor loads the application configuration from the app_id path segment. Supported suffixes: /v1/chat/completions, /v1/embeddings, /v1/messages, /v1/responses and its sub-resources.",
15
+ "description": "Routes AI requests under /{app_id}/* to the AI Gateway handler. The configuration executor loads the application configuration from the app_id path segment. Only paths whose suffix is a supported /v1/... operation succeed (/v1/chat/completions, /v1/embeddings, /v1/messages, /v1/responses and its sub-resources); anything else under /{app_id} returns 404.",
16
16
  "operationId": "aiGatewayCatchAll",
17
17
  "responses": {
18
18
  "200": {
@@ -1,5 +1,4 @@
1
1
  <svg width="757" height="270" viewBox="0 0 757 270" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <title>Zuplo API documentation banner</title>
3
2
  <g clip-path="url(#clip0_162_322)">
4
3
  <rect width="757" height="270" rx="8" fill="#181822"/>
5
4
  <g filter="url(#filter0_f_162_322)">
@@ -1,5 +1,4 @@
1
1
  <svg width="757" height="270" viewBox="0 0 757 270" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <title>Zuplo API documentation banner</title>
3
2
  <g clip-path="url(#clip0_162_213)">
4
3
  <rect width="757" height="270" rx="8" fill="#FAFAFA"/>
5
4
  <g filter="url(#filter0_f_162_213)">
@@ -1,5 +1,4 @@
1
1
  <svg width="757" height="270" viewBox="0 0 757 270" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <title>Zuplo API documentation banner</title>
3
2
  <g clip-path="url(#clip0_162_322)">
4
3
  <rect width="757" height="270" rx="8" fill="#181822"/>
5
4
  <g filter="url(#filter0_f_162_322)">
@@ -1,5 +1,4 @@
1
1
  <svg width="757" height="270" viewBox="0 0 757 270" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <title>Zuplo API documentation banner</title>
3
2
  <g clip-path="url(#clip0_162_213)">
4
3
  <rect width="757" height="270" rx="8" fill="#FAFAFA"/>
5
4
  <g filter="url(#filter0_f_162_213)">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-zuplo-api",
3
- "version": "7.1.0",
3
+ "version": "7.1.2",
4
4
  "keywords": [
5
5
  "api",
6
6
  "openapi",