@wp-playground/client 0.9.13 → 0.9.14

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.
Files changed (3) hide show
  1. package/index.cjs +9 -9
  2. package/index.js +112 -110
  3. package/package.json +2 -2
package/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Qs=function(){var e;return typeof process<"u"&&((e=process.release)==null?void 0:e.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}();if(Qs==="NODE"){let e=function(r){return new Promise(function(n,s){r.onload=r.onerror=function(i){r.onload=r.onerror=null,i.type==="load"?n(r.result):s(new Error("Failed to read the blob/file"))}})},t=function(){const r=new Uint8Array([1,2,3,4]),s=new File([r],"test").stream();try{return s.getReader({mode:"byob"}),!0}catch{return!1}};if(typeof File>"u"){class r extends Blob{constructor(s,i,o){super(s);let u;o!=null&&o.lastModified&&(u=new Date),(!u||isNaN(u.getFullYear()))&&(u=new Date),this.lastModifiedDate=u,this.lastModified=u.getMilliseconds(),this.name=i||""}}global.File=r}typeof Blob.prototype.arrayBuffer>"u"&&(Blob.prototype.arrayBuffer=function(){const n=new FileReader;return n.readAsArrayBuffer(this),e(n)}),typeof Blob.prototype.text>"u"&&(Blob.prototype.text=function(){const n=new FileReader;return n.readAsText(this),e(n)}),(typeof Blob.prototype.stream>"u"||!t())&&(Blob.prototype.stream=function(){let r=0;const n=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:512*1024,async pull(s){const i=s.byobRequest.view,u=await n.slice(r,r+i.byteLength).arrayBuffer(),f=new Uint8Array(u);new Uint8Array(i.buffer).set(f);const l=f.byteLength;s.byobRequest.respond(l),r+=l,r>=n.size&&s.close()}})})}if(Qs==="NODE"&&typeof CustomEvent>"u"){class e extends Event{constructor(r,n={}){super(r,n),this.detail=n.detail}initCustomEvent(){}}globalThis.CustomEvent=e}const pn=["db.php","plugins/akismet","plugins/hello.php","plugins/wordpress-importer","mu-plugins/sqlite-database-integration","mu-plugins/playground-includes","mu-plugins/0-playground.php","mu-plugins/0-sqlite.php","themes/twentytwenty","themes/twentytwentyone","themes/twentytwentytwo","themes/twentytwentythree","themes/twentytwentyfour","themes/twentytwentyfive","themes/twentytwentysix"],Ys=Symbol("SleepFinished");function Io(e){return new Promise(t=>{setTimeout(()=>t(Ys),e)})}class jo extends Error{constructor(){super("Acquiring lock timed out")}}class Ao{constructor({concurrency:t,timeout:r}){this._running=0,this.concurrency=t,this.timeout=r,this.queue=[]}get remaining(){return this.concurrency-this.running}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency){const t=new Promise(r=>{this.queue.push(r)});this.timeout!==void 0?await Promise.race([t,Io(this.timeout)]).then(r=>{if(r===Ys)throw new jo}):await t}else{this._running++;let t=!1;return()=>{t||(t=!0,this._running--,this.queue.length>0&&this.queue.shift()())}}}async run(t){const r=await this.acquire();try{return await t()}finally{r()}}}function ue(...e){let t=e.join("/");const r=t[0]==="/",n=t.substring(t.length-1)==="/";return t=Xs(t),!t&&!r&&(t="."),t&&n&&(t+="/"),t}function Zs(e){if(e==="/")return"/";e=Xs(e);const t=e.lastIndexOf("/");return t===-1?"":t===0?"/":e.substr(0,t)}function Xs(e){const t=e[0]==="/";return e=Do(e.split("/").filter(r=>!!r),!t).join("/"),(t?"/":"")+e.replace(/\/$/,"")}function Do(e,t){let r=0;for(let n=e.length-1;n>=0;n--){const s=e[n];s==="."?e.splice(n,1):s===".."?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e}function ei(e=36,t="!@#$%^&*()_+=-[]/.,<>?"){const r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+t;let n="";for(let s=e;s>0;--s)n+=r[Math.floor(Math.random()*r.length)];return n}function Mo(){return ei(36,"-_")}function pe(e){return`json_decode(base64_decode('${Lo(JSON.stringify(e))}'), true)`}function Zt(e){const t={};for(const r in e)t[r]=pe(e[r]);return t}function Lo(e){return Fo(new TextEncoder().encode(e))}function Fo(e){const t=String.fromCodePoint(...e);return btoa(t)}const qo="playground-log",$s=(e,...t)=>{ye.dispatchEvent(new CustomEvent(qo,{detail:{log:e,args:t}}))},Uo=(e,...t)=>{switch(typeof e.message=="string"?e.message=rn(e.message):e.message.message&&typeof e.message.message=="string"&&(e.message.message=rn(e.message.message)),e.severity){case"Debug":console.debug(e.message,...t);break;case"Info":console.info(e.message,...t);break;case"Warn":console.warn(e.message,...t);break;case"Error":console.error(e.message,...t);break;case"Fatal":console.error(e.message,...t);break;default:console.log(e.message,...t)}},Vo=e=>e instanceof Error?[e.message,e.stack].join(`
2
- `):JSON.stringify(e,null,2),ti=[],_s=e=>{ti.push(e)},tn=e=>{if(e.raw===!0)_s(e.message);else{const t=Ho(typeof e.message=="object"?Vo(e.message):e.message,e.severity??"Info",e.prefix??"JavaScript");_s(t)}};class zo extends EventTarget{constructor(t=[]){super(),this.handlers=t,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes(tn)?[...ti]:(this.error(`Logs aren't stored because the logToMemory handler isn't registered.
2
+ `):JSON.stringify(e,null,2),ti=[],_s=e=>{ti.push(e)},tn=e=>{if(e.raw===!0)_s(e.message);else{const t=xo(typeof e.message=="object"?Vo(e.message):e.message,e.severity??"Info",e.prefix??"JavaScript");_s(t)}};class zo extends EventTarget{constructor(t=[]){super(),this.handlers=t,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes(tn)?[...ti]:(this.error(`Logs aren't stored because the logToMemory handler isn't registered.
3
3
  If you're using a custom logger instance, make sure to register logToMemory handler.
4
- `),[])}logMessage(t,...r){for(const n of this.handlers)n(t,...r)}log(t,...r){this.logMessage({message:t,severity:void 0,prefix:"JavaScript",raw:!1},...r)}debug(t,...r){this.logMessage({message:t,severity:"Debug",prefix:"JavaScript",raw:!1},...r)}info(t,...r){this.logMessage({message:t,severity:"Info",prefix:"JavaScript",raw:!1},...r)}warn(t,...r){this.logMessage({message:t,severity:"Warn",prefix:"JavaScript",raw:!1},...r)}error(t,...r){this.logMessage({message:t,severity:"Error",prefix:"JavaScript",raw:!1},...r)}}const Wo=()=>{try{if(process.env.NODE_ENV==="test")return[tn,$s]}catch{}return[tn,Uo,$s]},ye=new zo(Wo()),rn=e=>e.replace(/\t/g,""),Ho=(e,t,r)=>{const n=new Date,s=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"short",day:"2-digit",timeZone:"UTC"}).format(n).replace(/ /g,"-"),i=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"UTC",timeZoneName:"short"}).format(n),o=s+" "+i;return e=rn(e),`[${o}] ${r} ${t}: ${e}`};let Hr=0;const ws="/wordpress/wp-content/debug.log",xo=async e=>await e.fileExists(ws)?await e.readFileAsText(ws):"",Bo=(e,t)=>{t.addEventListener("request.end",async()=>{const r=await xo(t);if(r.length>Hr){const n=r.substring(Hr);e.logMessage({message:n,raw:!0}),Hr=r.length}}),t.addEventListener("request.error",r=>{r=r,r.error&&(e.logMessage({message:`${r.error.message} ${r.error.stack}`,severity:"Fatal",prefix:r.source==="request"?"PHP":"WASM Crash"}),e.dispatchEvent(new CustomEvent(e.fatalErrorEvent,{detail:{logs:e.getLogs(),source:r.source}})))})},Ar=async(e,{pluginPath:t,pluginName:r},n)=>{n==null||n.tracker.setCaption(`Activating ${r||t}`);const s=await e.documentRoot,i=await e.run({code:`<?php
4
+ `),[])}logMessage(t,...r){for(const n of this.handlers)n(t,...r)}log(t,...r){this.logMessage({message:t,severity:void 0,prefix:"JavaScript",raw:!1},...r)}debug(t,...r){this.logMessage({message:t,severity:"Debug",prefix:"JavaScript",raw:!1},...r)}info(t,...r){this.logMessage({message:t,severity:"Info",prefix:"JavaScript",raw:!1},...r)}warn(t,...r){this.logMessage({message:t,severity:"Warn",prefix:"JavaScript",raw:!1},...r)}error(t,...r){this.logMessage({message:t,severity:"Error",prefix:"JavaScript",raw:!1},...r)}}const Wo=()=>{try{if(process.env.NODE_ENV==="test")return[tn,$s]}catch{}return[tn,Uo,$s]},ye=new zo(Wo()),rn=e=>e.replace(/\t/g,""),xo=(e,t,r)=>{const n=new Date,s=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"short",day:"2-digit",timeZone:"UTC"}).format(n).replace(/ /g,"-"),i=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"UTC",timeZoneName:"short"}).format(n),o=s+" "+i;return e=rn(e),`[${o}] ${r} ${t}: ${e}`};let xr=0;const ws="/wordpress/wp-content/debug.log",Ho=async e=>await e.fileExists(ws)?await e.readFileAsText(ws):"",Bo=(e,t)=>{t.addEventListener("request.end",async()=>{const r=await Ho(t);if(r.length>xr){const n=r.substring(xr);e.logMessage({message:n,raw:!0}),xr=r.length}}),t.addEventListener("request.error",r=>{r=r,r.error&&(e.logMessage({message:`${r.error.message} ${r.error.stack}`,severity:"Fatal",prefix:r.source==="request"?"PHP":"WASM Crash"}),e.dispatchEvent(new CustomEvent(e.fatalErrorEvent,{detail:{logs:e.getLogs(),source:r.source}})))})},Ar=async(e,{pluginPath:t,pluginName:r},n)=>{n==null||n.tracker.setCaption(`Activating ${r||t}`);const s=await e.documentRoot,i=await e.run({code:`<?php
5
5
  define( 'WP_ADMIN', true );
6
6
  require_once( ${pe(s)}. "/wp-load.php" );
7
7
  require_once( ${pe(s)}. "/wp-admin/includes/plugin.php" );
@@ -482,7 +482,7 @@ echo json_encode($deactivated_plugins);
482
482
  });
483
483
 
484
484
  $result = $importer->import( '/tmp/import.wxr' );
485
- `})},xr="/tmp/file.zip",Zo=async(e,t,r)=>{if(t instanceof File){const s=t;t=xr,await e.writeFile(t,new Uint8Array(await s.arrayBuffer()))}const n=Zt({zipPath:t,extractToPath:r});await e.run({code:`<?php
485
+ `})},Hr="/tmp/file.zip",Zo=async(e,t,r)=>{if(t instanceof File){const s=t;t=Hr,await e.writeFile(t,new Uint8Array(await s.arrayBuffer()))}const n=Zt({zipPath:t,extractToPath:r});await e.run({code:`<?php
486
486
  function unzip($zipPath, $extractTo, $overwrite = true)
487
487
  {
488
488
  if (!is_dir($extractTo)) {
@@ -499,7 +499,7 @@ echo json_encode($deactivated_plugins);
499
499
  }
500
500
  }
501
501
  unzip(${n.zipPath}, ${n.extractToPath});
502
- `}),await e.fileExists(xr)&&await e.unlink(xr)},Dr=async(e,{zipFile:t,zipPath:r,extractToPath:n})=>{if(r)ye.warn('The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.');else if(!t)throw new Error("Either zipPath or zipFile must be provided");await Zo(e,t||r,n)},pi=async(e,{wordPressFilesZip:t,pathInZip:r=""})=>{const n=await e.documentRoot;let s=ue("/tmp","import");await e.mkdir(s),await Dr(e,{zipFile:t,extractToPath:s}),s=ue(s,r);const i=ue(s,"wp-content"),o=ue(n,"wp-content");for(const d of pn){const p=ue(i,d);await vs(e,p);const b=ue(o,d);await e.fileExists(b)&&(await e.mkdir(Zs(p)),await e.mv(b,p))}const u=ue(s,"wp-content","database");await e.fileExists(u)||await e.mv(ue(n,"wp-content","database"),u);const f=await e.listFiles(s);for(const d of f)await vs(e,ue(n,d)),await e.mv(ue(s,d),ue(n,d));await e.rmdir(s),await $n(e,{siteUrl:await e.absoluteUrl});const l=pe(ue(n,"wp-admin","upgrade.php"));await e.run({code:`<?php
502
+ `}),await e.fileExists(Hr)&&await e.unlink(Hr)},Dr=async(e,{zipFile:t,zipPath:r,extractToPath:n})=>{if(r)ye.warn('The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.');else if(!t)throw new Error("Either zipPath or zipFile must be provided");await Zo(e,t||r,n)},pi=async(e,{wordPressFilesZip:t,pathInZip:r=""})=>{const n=await e.documentRoot;let s=ue("/tmp","import");await e.mkdir(s),await Dr(e,{zipFile:t,extractToPath:s}),s=ue(s,r);const i=ue(s,"wp-content"),o=ue(n,"wp-content");for(const d of pn){const p=ue(i,d);await vs(e,p);const b=ue(o,d);await e.fileExists(b)&&(await e.mkdir(Zs(p)),await e.mv(b,p))}const u=ue(s,"wp-content","database");await e.fileExists(u)||await e.mv(ue(n,"wp-content","database"),u);const f=await e.listFiles(s);for(const d of f)await vs(e,ue(n,d)),await e.mv(ue(s,d),ue(n,d));await e.rmdir(s),await $n(e,{siteUrl:await e.absoluteUrl});const l=pe(ue(n,"wp-admin","upgrade.php"));await e.run({code:`<?php
503
503
  $_GET['step'] = 'upgrade_db';
504
504
  require ${l};
505
505
  `})};async function vs(e,t){await e.fileExists(t)&&(await e.isDir(t)?await e.rmdir(t):await e.unlink(t))}async function hi(e){const t=await e.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function mi(e,{targetPath:t,zipFile:r,ifAlreadyInstalled:n="overwrite"}){const i=r.name.replace(/\.zip$/,""),o=ue(await e.documentRoot,"wp-content"),u=ue(o,ei()),f=ue(u,"assets",i);await e.fileExists(f)&&await e.rmdir(u,{recursive:!0}),await e.mkdir(u);try{await Dr(e,{zipFile:r,extractToPath:f});let l=await e.listFiles(f,{prependPath:!0});l=l.filter(P=>!P.endsWith("/__MACOSX"));const d=l.length===1&&await e.isDir(l[0]);let p,b="";d?(b=l[0],p=l[0].split("/").pop()):(b=f,p=i);const E=`${t}/${p}`;if(await e.fileExists(E)){if(!await e.isDir(E))throw new Error(`Cannot install asset ${p} to ${E} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(n==="overwrite")await e.rmdir(E,{recursive:!0});else{if(n==="skip")return{assetFolderPath:E,assetFolderName:p};throw new Error(`Cannot install asset ${p} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${n}`)}}return await e.mv(b,E),{assetFolderPath:E,assetFolderName:p}}finally{await e.rmdir(u,{recursive:!0})}}function Mr(e){const t=e.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const yi=async(e,{pluginZipFile:t,ifAlreadyInstalled:r,options:n={}},s)=>{const i=t.name.split("/").pop()||"plugin.zip",o=Mr(i);s==null||s.tracker.setCaption(`Installing the ${o} plugin`);const{assetFolderPath:u}=await mi(e,{ifAlreadyInstalled:r,zipFile:t,targetPath:`${await e.documentRoot}/wp-content/plugins`});("activate"in n?n.activate:!0)&&await Ar(e,{pluginPath:u,pluginName:o},s)},gi=async(e,{themeZipFile:t,ifAlreadyInstalled:r,options:n={}},s)=>{const i=Mr(t.name);s==null||s.tracker.setCaption(`Installing the ${i} theme`);const{assetFolderName:o}=await mi(e,{ifAlreadyInstalled:r,zipFile:t,targetPath:`${await e.documentRoot}/wp-content/themes`});("activate"in n?n.activate:!0)&&await hn(e,{themeFolderName:o},s)},$i=async(e,t,r)=>{var s;(s=r==null?void 0:r.tracker)==null||s.setCaption("Resetting WordPress data");const n=await e.documentRoot;await e.run({env:{DOCROOT:n},code:`<?php
@@ -603,7 +603,7 @@ function join_paths()
603
603
  require( ${pe(r)} );
604
604
  `);const i=await e.run({scriptPath:"/wordpress/run-cli.php"});if(i.errors)throw new Error(i.errors);return i};function ta(e){let n=0,s="";const i=[];let o="";for(let u=0;u<e.length;u++){const f=e[u];n===0?f==='"'||f==="'"?(n=1,s=f):f.match(/\s/)?(o&&i.push(o),o=""):o+=f:n===1&&(f==="\\"?(u++,o+=e[u]):f===s?(n=0,s=""):o+=f)}return o&&i.push(o),i}const ra=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:Ar,activateTheme:hn,cp:ci,defineSiteUrl:$n,defineWpConfigConsts:Qt,enableMultisite:ai,exportWXR:hi,importWordPressFiles:pi,importWxr:fi,installPlugin:yi,installTheme:gi,login:Er,mkdir:ui,mv:li,request:br,resetData:$i,rm:mn,rmdir:di,runPHP:ri,runPHPWithOptions:ni,runSql:si,runWpInstallationWizard:_i,setSiteOptions:yn,unzip:Dr,updateUserMeta:ii,wpCLI:vi,writeFile:gn,zipWpContent:wi},Symbol.toStringTag,{value:"Module"})),na=5*1024*1024;function sa(e,t){const r=e.headers.get("content-length")||"",n=parseInt(r,10)||na;function s(i,o){t(new CustomEvent("progress",{detail:{loaded:i,total:o}}))}return new Response(new ReadableStream({async start(i){if(!e.body){i.close();return}const o=e.body.getReader();let u=0;for(;;)try{const{done:f,value:l}=await o.read();if(l&&(u+=l.byteLength),f){s(u,u),i.close();break}else s(u,n),i.enqueue(l)}catch(f){ye.error({e:f}),i.error(f);break}}}),{status:e.status,statusText:e.statusText,headers:e.headers})}const Br=1e-5;class Lr extends EventTarget{constructor({weight:t=1,caption:r="",fillTime:n=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=t,this._selfCaption=r,this._fillTime=n}stage(t,r=""){if(t||(t=this._selfWeight),this._selfWeight-t<-Br)throw new Error(`Cannot add a stage with weight ${t} as the total weight of registered stages would exceed 1.`);this._selfWeight-=t;const n=new Lr({caption:r,weight:t,fillTime:this._fillTime});return this._subTrackers.push(n),n.addEventListener("progress",()=>this.notifyProgress()),n.addEventListener("done",()=>{this.done&&this.notifyDone()}),n}fillSlowly({stopBeforeFinishing:t=!0}={}){if(this._isFilling)return;this._isFilling=!0;const r=100,n=this._fillTime/r;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),t&&this._selfProgress>=99&&clearInterval(this._fillInterval)},n)}set(t){this._selfProgress=Math.min(t,100),this.notifyProgress(),this._selfProgress+Br>=100&&this.finish()}finish(){this._fillInterval&&clearInterval(this._fillInterval),this._selfDone=!0,this._selfProgress=100,this._isFilling=!1,this._fillInterval=void 0,this.notifyProgress(),this.notifyDone()}get caption(){for(let t=this._subTrackers.length-1;t>=0;t--)if(!this._subTrackers[t].done){const r=this._subTrackers[t].caption;if(r)return r}return this._selfCaption}setCaption(t){this._selfCaption=t,this.notifyProgress()}get done(){return this.progress+Br>=100}get progress(){if(this._selfDone)return 100;const t=this._subTrackers.reduce((r,n)=>r+n.progress*n.weight,this._selfProgress*this._selfWeight);return Math.round(t*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=t=>{this.set(t)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=t=>{this.set(t.detail.loaded/t.detail.total*100)}),this._loadingListener}pipe(t){t.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",r=>{t.setProgress({progress:r.detail.progress,caption:r.detail.caption})}),this.addEventListener("done",()=>{t.setLoaded()})}addEventListener(t,r){super.addEventListener(t,r)}removeEventListener(t,r){super.removeEventListener(t,r)}notifyProgress(){const t=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return t.progress},get caption(){return t.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}const Pr={0:"No error occurred. System call completed successfully.",1:"Argument list too long.",2:"Permission denied.",3:"Address in use.",4:"Address not available.",5:"Address family not supported.",6:"Resource unavailable, or operation would block.",7:"Connection already in progress.",8:"Bad file descriptor.",9:"Bad message.",10:"Device or resource busy.",11:"Operation canceled.",12:"No child processes.",13:"Connection aborted.",14:"Connection refused.",15:"Connection reset.",16:"Resource deadlock would occur.",17:"Destination address required.",18:"Mathematics argument out of domain of function.",19:"Reserved.",20:"File exists.",21:"Bad address.",22:"File too large.",23:"Host is unreachable.",24:"Identifier removed.",25:"Illegal byte sequence.",26:"Operation in progress.",27:"Interrupted function.",28:"Invalid argument.",29:"I/O error.",30:"Socket is connected.",31:"There is a directory under that path.",32:"Too many levels of symbolic links.",33:"File descriptor value too large.",34:"Too many links.",35:"Message too large.",36:"Reserved.",37:"Filename too long.",38:"Network is down.",39:"Connection aborted by network.",40:"Network unreachable.",41:"Too many files open in system.",42:"No buffer space available.",43:"No such device.",44:"There is no such file or directory OR the parent directory does not exist.",45:"Executable file format error.",46:"No locks available.",47:"Reserved.",48:"Not enough space.",49:"No message of the desired type.",50:"Protocol not available.",51:"No space left on device.",52:"Function not supported.",53:"The socket is not connected.",54:"Not a directory or a symbolic link to a directory.",55:"Directory not empty.",56:"State not recoverable.",57:"Not a socket.",58:"Not supported, or operation not supported on socket.",59:"Inappropriate I/O control operation.",60:"No such device or address.",61:"Value too large to be stored in data type.",62:"Previous owner died.",63:"Operation not permitted.",64:"Broken pipe.",65:"Protocol error.",66:"Protocol not supported.",67:"Protocol wrong type for socket.",68:"Result too large.",69:"Read-only file system.",70:"Invalid seek.",71:"No such process.",72:"Reserved.",73:"Connection timed out.",74:"Text file busy.",75:"Cross-device link.",76:"Extension: Capabilities insufficient."};function ia(e){const t=typeof e=="object"?e==null?void 0:e.errno:null;if(t in Pr)return Pr[t]}function Ue(e=""){return function(r,n,s){const i=s.value;s.value=function(...o){try{return i.apply(this,o)}catch(u){const f=typeof u=="object"?u==null?void 0:u.errno:null;if(f in Pr){const l=Pr[f],d=typeof o[1]=="string"?o[1]:null,p=d!==null?e.replaceAll("{path}",d):e;throw new Error(`${p}: ${l}`,{cause:u})}throw u}}}}var oa=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,Ve=(e,t,r,n)=>{for(var s=n>1?void 0:n?aa(t,r):t,i=e.length-1,o;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&oa(t,r,s),s};const ze=class Te{static readFileAsText(t,r){return new TextDecoder().decode(Te.readFileAsBuffer(t,r))}static readFileAsBuffer(t,r){return t.readFile(r)}static writeFile(t,r,n){t.writeFile(r,n)}static unlink(t,r){t.unlink(r)}static mv(t,r,n){try{const s=t.lookupPath(r).node.mount,i=Te.fileExists(t,n)?t.lookupPath(n).node.mount:t.lookupPath(Zs(n)).node.mount;s.mountpoint!==i.mountpoint?(Te.copyRecursive(t,r,n),Te.rmdir(t,r,{recursive:!0})):t.rename(r,n)}catch(s){const i=ia(s);throw i?new Error(`Could not move ${r} to ${n}: ${i}`,{cause:s}):s}}static rmdir(t,r,n={recursive:!0}){n!=null&&n.recursive&&Te.listFiles(t,r).forEach(s=>{const i=`${r}/${s}`;Te.isDir(t,i)?Te.rmdir(t,i,n):Te.unlink(t,i)}),t.rmdir(r)}static listFiles(t,r,n={prependPath:!1}){if(!Te.fileExists(t,r))return[];try{const s=t.readdir(r).filter(i=>i!=="."&&i!=="..");if(n.prependPath){const i=r.replace(/\/$/,"");return s.map(o=>`${i}/${o}`)}return s}catch(s){return ye.error(s,{path:r}),[]}}static isDir(t,r){return Te.fileExists(t,r)?t.isDir(t.lookupPath(r).node.mode):!1}static fileExists(t,r){try{return t.lookupPath(r),!0}catch{return!1}}static mkdir(t,r){t.mkdirTree(r)}static copyRecursive(t,r,n){const s=t.lookupPath(r).node;if(t.isDir(s.mode)){t.mkdirTree(n);const i=t.readdir(r).filter(o=>o!=="."&&o!=="..");for(const o of i)Te.copyRecursive(t,ue(r,o),ue(n,o))}else t.writeFile(n,t.readFile(r))}};Ve([Ue('Could not read "{path}"')],ze,"readFileAsText",1);Ve([Ue('Could not read "{path}"')],ze,"readFileAsBuffer",1);Ve([Ue('Could not write to "{path}"')],ze,"writeFile",1);Ve([Ue('Could not unlink "{path}"')],ze,"unlink",1);Ve([Ue('Could not remove directory "{path}"')],ze,"rmdir",1);Ve([Ue('Could not list files in "{path}"')],ze,"listFiles",1);Ve([Ue('Could not stat "{path}"')],ze,"isDir",1);Ve([Ue('Could not stat "{path}"')],ze,"fileExists",1);Ve([Ue('Could not create directory "{path}"')],ze,"mkdir",1);Ve([Ue('Could not copy files from "{path}"')],ze,"copyRecursive",1);const ca={500:"Internal Server Error",502:"Bad Gateway",404:"Not Found",403:"Forbidden",401:"Unauthorized",400:"Bad Request",301:"Moved Permanently",302:"Found",307:"Temporary Redirect",308:"Permanent Redirect",204:"No Content",201:"Created",200:"OK"};class Sr{constructor(t,r,n,s="",i=0){this.httpStatusCode=t,this.headers=r,this.bytes=n,this.exitCode=i,this.errors=s}static forHttpCode(t,r=""){return new Sr(t,{},new TextEncoder().encode(r||ca[t]||""))}static fromRawData(t){return new Sr(t.httpStatusCode,t.headers,t.bytes,t.errors,t.exitCode)}toRawData(){return{headers:this.headers,bytes:this.bytes,errors:this.errors,exitCode:this.exitCode,httpStatusCode:this.httpStatusCode}}get json(){return JSON.parse(this.text)}get text(){return new TextDecoder().decode(this.bytes)}}(function(){var e;return typeof process<"u"&&((e=process.release)==null?void 0:e.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"})();const bs="/internal/shared/php.ini";var la=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const{hasOwnProperty:Gr}=Object.prototype,nn=(e,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;const r=t.platform==="win32"?`\r
605
605
  `:`
606
- `,n=t.whitespace?" = ":"=",s=[],i=t.sort?Object.keys(e).sort():Object.keys(e);let o=0;t.align&&(o=xe(i.filter(l=>e[l]===null||Array.isArray(e[l])||typeof e[l]!="object").map(l=>Array.isArray(e[l])?`${l}[]`:l).concat([""]).reduce((l,d)=>xe(l).length>=xe(d).length?l:d)).length);let u="";const f=t.bracketedArray?"[]":"";for(const l of i){const d=e[l];if(d&&Array.isArray(d))for(const p of d)u+=xe(`${l}${f}`).padEnd(o," ")+n+xe(p)+r;else d&&typeof d=="object"?s.push(l):u+=xe(l).padEnd(o," ")+n+xe(d)+r}t.section&&u.length&&(u="["+xe(t.section)+"]"+(t.newline?r+r:r)+u);for(const l of s){const d=bi(l,".").join("\\."),p=(t.section?t.section+".":"")+d,b=nn(e[l],{...t,section:p});u.length&&b.length&&(u+=r),u+=b}return u};function bi(e,t){var r=0,n=0,s=0,i=[];do if(s=e.indexOf(t,r),s!==-1){if(r=s+t.length,s>0&&e[s-1]==="\\")continue;i.push(e.slice(n,s)),n=s+t.length}while(s!==-1);return i.push(e.slice(n)),i}const Es=(e,t={})=>{t.bracketedArray=t.bracketedArray!==!1;const r=Object.create(null);let n=r,s=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=e.split(/[\r\n]+/g),u={};for(const l of o){if(!l||l.match(/^\s*[;#]/)||l.match(/^\s*$/))continue;const d=l.match(i);if(!d)continue;if(d[1]!==void 0){if(s=mr(d[1]),s==="__proto__"){n=Object.create(null);continue}n=r[s]=r[s]||Object.create(null);continue}const p=mr(d[2]);let b;t.bracketedArray?b=p.length>2&&p.slice(-2)==="[]":(u[p]=((u==null?void 0:u[p])||0)+1,b=u[p]>1);const E=b?p.slice(0,-2):p;if(E==="__proto__")continue;const P=d[3]?mr(d[4]):!0,O=P==="true"||P==="false"||P==="null"?JSON.parse(P):P;b&&(Gr.call(n,E)?Array.isArray(n[E])||(n[E]=[n[E]]):n[E]=[]),Array.isArray(n[E])?n[E].push(O):n[E]=O}const f=[];for(const l of Object.keys(r)){if(!Gr.call(r,l)||typeof r[l]!="object"||Array.isArray(r[l]))continue;const d=bi(l,".");n=r;const p=d.pop(),b=p.replace(/\\\./g,".");for(const E of d)E!=="__proto__"&&((!Gr.call(n,E)||typeof n[E]!="object")&&(n[E]=Object.create(null)),n=n[E]);n===r&&b===p||(n[b]=r[l],f.push(l))}for(const l of f)delete r[l];return r},Ei=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),xe=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Ei(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),mr=e=>{if(e=(e||"").trim(),Ei(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let t=!1,r="";for(let n=0,s=e.length;n<s;n++){const i=e.charAt(n);if(t)"\\;#".indexOf(i)!==-1?r+=i:r+="\\"+i,t=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?t=!0:r+=i}}return t&&(r+="\\"),r.trim()}return e};var Ps={parse:Es,decode:Es,stringify:nn,encode:nn,safe:xe,unsafe:mr};async function da(e,t){const r=Ps.parse(await e.readFileAsText(bs));for(const[n,s]of Object.entries(t))s==null?delete r[n]:r[n]=s;await e.writeFile(bs,Ps.stringify(r))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const e=this.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)return;yield r}}finally{e.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const Fr=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],Pi=Fr[0],fa=Fr,Si=["iconv","mbstring","xml-bundle","gd"],Ss={"kitchen-sink":Si,light:[]},pa=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url"];function ha(e){return e&&typeof e=="object"&&typeof e.resource=="string"&&pa.includes(e.resource)}class ft{static create(t,{semaphore:r,progress:n}){let s;switch(t.resource){case"vfs":s=new ma(t,n);break;case"literal":s=new ya(t,n);break;case"wordpress.org/themes":s=new _a(t,n);break;case"wordpress.org/plugins":s=new wa(t,n);break;case"url":s=new $a(t,n);break;default:throw new Error(`Invalid resource: ${t}`)}return s=new va(s),r&&(s=new ba(s,r)),s}setPlayground(t){this.playground=t}get isAsync(){return!1}}class ma extends ft{constructor(t,r){super(),this.resource=t,this.progress=r}async resolve(){var r;const t=await this.playground.readFileAsBuffer(this.resource.path);return(r=this.progress)==null||r.set(100),new File([t],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class ya extends ft{constructor(t,r){super(),this.resource=t,this.progress=r}async resolve(){var t;return(t=this.progress)==null||t.set(100),new File([this.resource.contents],this.resource.name)}get name(){return this.resource.name}}class _n extends ft{constructor(t){super(),this.progress=t}async resolve(){var r,n;(r=this.progress)==null||r.setCaption(this.caption);const t=this.getURL();try{let s=await fetch(t);if(!s.ok)throw new Error(`Could not download "${t}"`);if(s=await sa(s,((n=this.progress)==null?void 0:n.loadingListener)??ga),s.status!==200)throw new Error(`Could not download "${t}"`);return new File([await s.blob()],this.name)}catch(s){throw new Error(`Could not download "${t}".
606
+ `,n=t.whitespace?" = ":"=",s=[],i=t.sort?Object.keys(e).sort():Object.keys(e);let o=0;t.align&&(o=He(i.filter(l=>e[l]===null||Array.isArray(e[l])||typeof e[l]!="object").map(l=>Array.isArray(e[l])?`${l}[]`:l).concat([""]).reduce((l,d)=>He(l).length>=He(d).length?l:d)).length);let u="";const f=t.bracketedArray?"[]":"";for(const l of i){const d=e[l];if(d&&Array.isArray(d))for(const p of d)u+=He(`${l}${f}`).padEnd(o," ")+n+He(p)+r;else d&&typeof d=="object"?s.push(l):u+=He(l).padEnd(o," ")+n+He(d)+r}t.section&&u.length&&(u="["+He(t.section)+"]"+(t.newline?r+r:r)+u);for(const l of s){const d=bi(l,".").join("\\."),p=(t.section?t.section+".":"")+d,b=nn(e[l],{...t,section:p});u.length&&b.length&&(u+=r),u+=b}return u};function bi(e,t){var r=0,n=0,s=0,i=[];do if(s=e.indexOf(t,r),s!==-1){if(r=s+t.length,s>0&&e[s-1]==="\\")continue;i.push(e.slice(n,s)),n=s+t.length}while(s!==-1);return i.push(e.slice(n)),i}const Es=(e,t={})=>{t.bracketedArray=t.bracketedArray!==!1;const r=Object.create(null);let n=r,s=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=e.split(/[\r\n]+/g),u={};for(const l of o){if(!l||l.match(/^\s*[;#]/)||l.match(/^\s*$/))continue;const d=l.match(i);if(!d)continue;if(d[1]!==void 0){if(s=mr(d[1]),s==="__proto__"){n=Object.create(null);continue}n=r[s]=r[s]||Object.create(null);continue}const p=mr(d[2]);let b;t.bracketedArray?b=p.length>2&&p.slice(-2)==="[]":(u[p]=((u==null?void 0:u[p])||0)+1,b=u[p]>1);const E=b?p.slice(0,-2):p;if(E==="__proto__")continue;const P=d[3]?mr(d[4]):!0,O=P==="true"||P==="false"||P==="null"?JSON.parse(P):P;b&&(Gr.call(n,E)?Array.isArray(n[E])||(n[E]=[n[E]]):n[E]=[]),Array.isArray(n[E])?n[E].push(O):n[E]=O}const f=[];for(const l of Object.keys(r)){if(!Gr.call(r,l)||typeof r[l]!="object"||Array.isArray(r[l]))continue;const d=bi(l,".");n=r;const p=d.pop(),b=p.replace(/\\\./g,".");for(const E of d)E!=="__proto__"&&((!Gr.call(n,E)||typeof n[E]!="object")&&(n[E]=Object.create(null)),n=n[E]);n===r&&b===p||(n[b]=r[l],f.push(l))}for(const l of f)delete r[l];return r},Ei=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),He=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Ei(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),mr=e=>{if(e=(e||"").trim(),Ei(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let t=!1,r="";for(let n=0,s=e.length;n<s;n++){const i=e.charAt(n);if(t)"\\;#".indexOf(i)!==-1?r+=i:r+="\\"+i,t=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?t=!0:r+=i}}return t&&(r+="\\"),r.trim()}return e};var Ps={parse:Es,decode:Es,stringify:nn,encode:nn,safe:He,unsafe:mr};async function da(e,t){const r=Ps.parse(await e.readFileAsText(bs));for(const[n,s]of Object.entries(t))s==null?delete r[n]:r[n]=s;await e.writeFile(bs,Ps.stringify(r))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const e=this.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)return;yield r}}finally{e.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const Fr=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],Pi=Fr[0],fa=Fr,Si=["iconv","mbstring","xml-bundle","gd"],Ss={"kitchen-sink":Si,light:[]},pa=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url"];function ha(e){return e&&typeof e=="object"&&typeof e.resource=="string"&&pa.includes(e.resource)}class ft{static create(t,{semaphore:r,progress:n}){let s;switch(t.resource){case"vfs":s=new ma(t,n);break;case"literal":s=new ya(t,n);break;case"wordpress.org/themes":s=new _a(t,n);break;case"wordpress.org/plugins":s=new wa(t,n);break;case"url":s=new $a(t,n);break;default:throw new Error(`Invalid resource: ${t}`)}return s=new va(s),r&&(s=new ba(s,r)),s}setPlayground(t){this.playground=t}get isAsync(){return!1}}class ma extends ft{constructor(t,r){super(),this.resource=t,this.progress=r}async resolve(){var r;const t=await this.playground.readFileAsBuffer(this.resource.path);return(r=this.progress)==null||r.set(100),new File([t],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class ya extends ft{constructor(t,r){super(),this.resource=t,this.progress=r}async resolve(){var t;return(t=this.progress)==null||t.set(100),new File([this.resource.contents],this.resource.name)}get name(){return this.resource.name}}class _n extends ft{constructor(t){super(),this.progress=t}async resolve(){var r,n;(r=this.progress)==null||r.setCaption(this.caption);const t=this.getURL();try{let s=await fetch(t);if(!s.ok)throw new Error(`Could not download "${t}"`);if(s=await sa(s,((n=this.progress)==null?void 0:n.loadingListener)??ga),s.status!==200)throw new Error(`Could not download "${t}"`);return new File([await s.blob()],this.name)}catch(s){throw new Error(`Could not download "${t}".
607
607
  Check if the URL is correct and the server is reachable.
608
608
  If it is reachable, the server might be blocking the request.
609
609
  Check the browser console and network tabs for more information.
@@ -631,17 +631,17 @@ function join_paths()
631
631
  `:""},this._extScope=a,this._scope=new r.Scope({parent:a}),this._nodes=[new O]}toString(){return this._root.render(this.opts)}name(a){return this._scope.name(a)}scopeName(a){return this._extScope.name(a)}scopeValue(a,m){const N=this._extScope.value(a,m);return(this._values[N.prefix]||(this._values[N.prefix]=new Set)).add(N),N}getScopeValue(a,m){return this._extScope.getValue(a,m)}scopeRefs(a){return this._extScope.scopeRefs(a,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(a,m,N,L){const F=this._scope.toName(m);return N!==void 0&&L&&(this._constants[F.str]=N),this._leafNode(new o(a,F,N)),F}const(a,m,N){return this._def(r.varKinds.const,a,m,N)}let(a,m,N){return this._def(r.varKinds.let,a,m,N)}var(a,m,N){return this._def(r.varKinds.var,a,m,N)}assign(a,m,N){return this._leafNode(new u(a,m,N))}add(a,m){return this._leafNode(new f(a,e.operators.ADD,m))}code(a){return typeof a=="function"?a():a!==t.nil&&this._leafNode(new b(a)),this}object(...a){const m=["{"];for(const[N,L]of a)m.length>1&&m.push(","),m.push(N),(N!==L||this.opts.es5)&&(m.push(":"),(0,t.addCodeArg)(m,L));return m.push("}"),new t._Code(m)}if(a,m,N){if(this._blockNode(new g(a)),m&&N)this.code(m).else().code(N).endIf();else if(m)this.code(m).endIf();else if(N)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(a){return this._elseNode(new g(a))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(g,_)}_for(a,m){return this._blockNode(a),m&&this.code(m).endFor(),this}for(a,m){return this._for(new S(a),m)}forRange(a,m,N,L,F=this.opts.es5?r.varKinds.var:r.varKinds.let){const K=this._scope.toName(a);return this._for(new I(F,K,m,N),()=>L(K))}forOf(a,m,N,L=r.varKinds.const){const F=this._scope.toName(a);if(this.opts.es5){const K=m instanceof t.Name?m:this.var("_arr",m);return this.forRange("_i",0,(0,t._)`${K}.length`,Q=>{this.var(F,(0,t._)`${K}[${Q}]`),N(F)})}return this._for(new D("of",L,F,m),()=>N(F))}forIn(a,m,N,L=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(a,(0,t._)`Object.keys(${m})`,N);const F=this._scope.toName(a);return this._for(new D("in",L,F,m),()=>N(F))}endFor(){return this._endBlockNode($)}label(a){return this._leafNode(new l(a))}break(a){return this._leafNode(new d(a))}return(a){const m=new C;if(this._blockNode(m),this.code(a),m.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(a,m,N){if(!m&&!N)throw new Error('CodeGen: "try" without "catch" and "finally"');const L=new A;if(this._blockNode(L),this.code(a),m){const F=this.name("e");this._currNode=L.catch=new W(F),m(F)}return N&&(this._currNode=L.finally=new G,this.code(N)),this._endBlockNode(W,G)}throw(a){return this._leafNode(new p(a))}block(a,m){return this._blockStarts.push(this._nodes.length),a&&this.code(a).endBlock(m),this}endBlock(a){const m=this._blockStarts.pop();if(m===void 0)throw new Error("CodeGen: not in self-balancing block");const N=this._nodes.length-m;if(N<0||a!==void 0&&N!==a)throw new Error(`CodeGen: wrong number of nodes: ${N} vs ${a} expected`);return this._nodes.length=m,this}func(a,m=t.nil,N,L){return this._blockNode(new v(a,m,N)),L&&this.code(L).endFunc(),this}endFunc(){return this._endBlockNode(v)}optimize(a=1){for(;a-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(a){return this._currNode.nodes.push(a),this}_blockNode(a){this._currNode.nodes.push(a),this._nodes.push(a)}_endBlockNode(a,m){const N=this._currNode;if(N instanceof a||m&&N instanceof m)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${m?`${a.kind}/${m.kind}`:a.kind}"`)}_elseNode(a){const m=this._currNode;if(!(m instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=m.else=a,this}get _root(){return this._nodes[0]}get _currNode(){const a=this._nodes;return a[a.length-1]}set _currNode(a){const m=this._nodes;m[m.length-1]=a}}e.CodeGen=ie;function Y(T,a){for(const m in a)T[m]=(T[m]||0)+(a[m]||0);return T}function Ee(T,a){return a instanceof t._CodeOrName?Y(T,a.names):T}function de(T,a,m){if(T instanceof t.Name)return N(T);if(!L(T))return T;return new t._Code(T._items.reduce((F,K)=>(K instanceof t.Name&&(K=N(K)),K instanceof t._Code?F.push(...K._items):F.push(K),F),[]));function N(F){const K=m[F.str];return K===void 0||a[F.str]!==1?F:(delete a[F.str],K)}function L(F){return F instanceof t._Code&&F._items.some(K=>K instanceof t.Name&&a[K.str]===1&&m[K.str]!==void 0)}}function Xe(T,a){for(const m in a)T[m]=(T[m]||0)-(a[m]||0)}function et(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${j(T)}`}e.not=et;const pt=w(e.operators.AND);function It(...T){return T.reduce(pt)}e.and=It;const ht=w(e.operators.OR);function M(...T){return T.reduce(ht)}e.or=M;function w(T){return(a,m)=>a===t.nil?m:m===t.nil?a:(0,t._)`${j(a)} ${T} ${j(m)}`}function j(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(B);var X={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=B,r=Yt;function n(v){const C={};for(const A of v)C[A]=!0;return C}e.toHash=n;function s(v,C){return typeof C=="boolean"?C:Object.keys(C).length===0?!0:(i(v,C),!o(C,v.self.RULES.all))}e.alwaysValidSchema=s;function i(v,C=v.schema){const{opts:A,self:W}=v;if(!A.strictSchema||typeof C=="boolean")return;const G=W.RULES.keywords;for(const ie in C)G[ie]||D(v,`unknown keyword: "${ie}"`)}e.checkUnknownRules=i;function o(v,C){if(typeof v=="boolean")return!v;for(const A in v)if(C[A])return!0;return!1}e.schemaHasRules=o;function u(v,C){if(typeof v=="boolean")return!v;for(const A in v)if(A!=="$ref"&&C.all[A])return!0;return!1}e.schemaHasRulesButRef=u;function f({topSchemaRef:v,schemaPath:C},A,W,G){if(!G){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,t._)`${A}`}return(0,t._)`${v}${C}${(0,t.getProperty)(W)}`}e.schemaRefOrVal=f;function l(v){return b(decodeURIComponent(v))}e.unescapeFragment=l;function d(v){return encodeURIComponent(p(v))}e.escapeFragment=d;function p(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=p;function b(v){return v.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=b;function E(v,C){if(Array.isArray(v))for(const A of v)C(A);else C(v)}e.eachItem=E;function P({mergeNames:v,mergeToName:C,mergeValues:A,resultToName:W}){return(G,ie,Y,Ee)=>{const de=Y===void 0?ie:Y instanceof t.Name?(ie instanceof t.Name?v(G,ie,Y):C(G,ie,Y),Y):ie instanceof t.Name?(C(G,Y,ie),ie):A(ie,Y);return Ee===t.Name&&!(de instanceof t.Name)?W(G,de):de}}e.mergeEvaluated={props:P({mergeNames:(v,C,A)=>v.if((0,t._)`${A} !== true && ${C} !== undefined`,()=>{v.if((0,t._)`${C} === true`,()=>v.assign(A,!0),()=>v.assign(A,(0,t._)`${A} || {}`).code((0,t._)`Object.assign(${A}, ${C})`))}),mergeToName:(v,C,A)=>v.if((0,t._)`${A} !== true`,()=>{C===!0?v.assign(A,!0):(v.assign(A,(0,t._)`${A} || {}`),_(v,A,C))}),mergeValues:(v,C)=>v===!0?!0:{...v,...C},resultToName:O}),items:P({mergeNames:(v,C,A)=>v.if((0,t._)`${A} !== true && ${C} !== undefined`,()=>v.assign(A,(0,t._)`${C} === true ? true : ${A} > ${C} ? ${A} : ${C}`)),mergeToName:(v,C,A)=>v.if((0,t._)`${A} !== true`,()=>v.assign(A,C===!0?!0:(0,t._)`${A} > ${C} ? ${A} : ${C}`)),mergeValues:(v,C)=>v===!0?!0:Math.max(v,C),resultToName:(v,C)=>v.var("items",C)})};function O(v,C){if(C===!0)return v.var("props",!0);const A=v.var("props",(0,t._)`{}`);return C!==void 0&&_(v,A,C),A}e.evaluatedPropsToName=O;function _(v,C,A){Object.keys(A).forEach(W=>v.assign((0,t._)`${C}${(0,t.getProperty)(W)}`,!0))}e.setEvaluated=_;const g={};function $(v,C){return v.scopeValue("func",{ref:C,code:g[C.code]||(g[C.code]=new r._Code(C.code))})}e.useFunc=$;var S;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(S=e.Type||(e.Type={}));function I(v,C,A){if(v instanceof t.Name){const W=C===S.Num;return A?W?(0,t._)`"[" + ${v} + "]"`:(0,t._)`"['" + ${v} + "']"`:W?(0,t._)`"/" + ${v}`:(0,t._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,t.getProperty)(v).toString():"/"+p(v)}e.getErrorPath=I;function D(v,C,A=v.opts.strictSchema){if(A){if(C=`strict mode: ${C}`,A===!0)throw new Error(C);v.self.logger.warn(C)}}e.checkStrictMode=D})(X);var We={};Object.defineProperty(We,"__esModule",{value:!0});const ge=B,Ea={data:new ge.Name("data"),valCxt:new ge.Name("valCxt"),instancePath:new ge.Name("instancePath"),parentData:new ge.Name("parentData"),parentDataProperty:new ge.Name("parentDataProperty"),rootData:new ge.Name("rootData"),dynamicAnchors:new ge.Name("dynamicAnchors"),vErrors:new ge.Name("vErrors"),errors:new ge.Name("errors"),this:new ge.Name("this"),self:new ge.Name("self"),scope:new ge.Name("scope"),json:new ge.Name("json"),jsonPos:new ge.Name("jsonPos"),jsonLen:new ge.Name("jsonLen"),jsonPart:new ge.Name("jsonPart")};We.default=Ea;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=B,r=X,n=We;e.keywordError={message:({keyword:_})=>(0,t.str)`must pass "${_}" keyword validation`},e.keyword$DataError={message:({keyword:_,schemaType:g})=>g?(0,t.str)`"${_}" keyword must be ${g} ($data)`:(0,t.str)`"${_}" keyword is invalid ($data)`};function s(_,g=e.keywordError,$,S){const{it:I}=_,{gen:D,compositeRule:v,allErrors:C}=I,A=p(_,g,$);S??(v||C)?f(D,A):l(I,(0,t._)`[${A}]`)}e.reportError=s;function i(_,g=e.keywordError,$){const{it:S}=_,{gen:I,compositeRule:D,allErrors:v}=S,C=p(_,g,$);f(I,C),D||v||l(S,n.default.vErrors)}e.reportExtraError=i;function o(_,g){_.assign(n.default.errors,g),_.if((0,t._)`${n.default.vErrors} !== null`,()=>_.if(g,()=>_.assign((0,t._)`${n.default.vErrors}.length`,g),()=>_.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function u({gen:_,keyword:g,schemaValue:$,data:S,errsCount:I,it:D}){if(I===void 0)throw new Error("ajv implementation error");const v=_.name("err");_.forRange("i",I,n.default.errors,C=>{_.const(v,(0,t._)`${n.default.vErrors}[${C}]`),_.if((0,t._)`${v}.instancePath === undefined`,()=>_.assign((0,t._)`${v}.instancePath`,(0,t.strConcat)(n.default.instancePath,D.errorPath))),_.assign((0,t._)`${v}.schemaPath`,(0,t.str)`${D.errSchemaPath}/${g}`),D.opts.verbose&&(_.assign((0,t._)`${v}.schema`,$),_.assign((0,t._)`${v}.data`,S))})}e.extendErrors=u;function f(_,g){const $=_.const("err",g);_.if((0,t._)`${n.default.vErrors} === null`,()=>_.assign(n.default.vErrors,(0,t._)`[${$}]`),(0,t._)`${n.default.vErrors}.push(${$})`),_.code((0,t._)`${n.default.errors}++`)}function l(_,g){const{gen:$,validateName:S,schemaEnv:I}=_;I.$async?$.throw((0,t._)`new ${_.ValidationError}(${g})`):($.assign((0,t._)`${S}.errors`,g),$.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(_,g,$){const{createErrors:S}=_.it;return S===!1?(0,t._)`{}`:b(_,g,$)}function b(_,g,$={}){const{gen:S,it:I}=_,D=[E(I,$),P(_,$)];return O(_,g,D),S.object(...D)}function E({errorPath:_},{instancePath:g}){const $=g?(0,t.str)`${_}${(0,r.getErrorPath)(g,r.Type.Str)}`:_;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,$)]}function P({keyword:_,it:{errSchemaPath:g}},{schemaPath:$,parentSchema:S}){let I=S?g:(0,t.str)`${g}/${_}`;return $&&(I=(0,t.str)`${I}${(0,r.getErrorPath)($,r.Type.Str)}`),[d.schemaPath,I]}function O(_,{params:g,message:$},S){const{keyword:I,data:D,schemaValue:v,it:C}=_,{opts:A,propertyName:W,topSchemaRef:G,schemaPath:ie}=C;S.push([d.keyword,I],[d.params,typeof g=="function"?g(_):g||(0,t._)`{}`]),A.messages&&S.push([d.message,typeof $=="function"?$(_):$]),A.verbose&&S.push([d.schema,v],[d.parentSchema,(0,t._)`${G}${ie}`],[n.default.data,D]),W&&S.push([d.propertyName,W])}})(Xt);Object.defineProperty(kt,"__esModule",{value:!0});kt.boolOrEmptySchema=kt.topBoolOrEmptySchema=void 0;const Pa=Xt,Sa=B,Ta=We,Ra={message:"boolean schema is false"};function ka(e){const{gen:t,schema:r,validateName:n}=e;r===!1?Oi(e,!1):typeof r=="object"&&r.$async===!0?t.return(Ta.default.data):(t.assign((0,Sa._)`${n}.errors`,null),t.return(!0))}kt.topBoolOrEmptySchema=ka;function Oa(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Oi(e)):r.var(t,!0)}kt.boolOrEmptySchema=Oa;function Oi(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Pa.reportError)(s,Ra,void 0,t)}var er={},ut={};Object.defineProperty(ut,"__esModule",{value:!0});ut.getRules=ut.isJSONType=void 0;const Ca=["string","number","integer","boolean","null","object","array"],Na=new Set(Ca);function Ia(e){return typeof e=="string"&&Na.has(e)}ut.isJSONType=Ia;function ja(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}ut.getRules=ja;var Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be.shouldUseRule=Be.shouldUseGroup=Be.schemaHasRulesForType=void 0;function Aa({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&Ci(e,n)}Be.schemaHasRulesForType=Aa;function Ci(e,t){return t.rules.some(r=>Ni(e,r))}Be.shouldUseGroup=Ci;function Ni(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Be.shouldUseRule=Ni;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=ut,r=Be,n=Xt,s=B,i=X;var o;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(o=e.DataType||(e.DataType={}));function u(S){const I=f(S.type);if(I.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!I.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&I.push("null")}return I}e.getSchemaTypes=u;function f(S){const I=Array.isArray(S)?S:S?[S]:[];if(I.every(t.isJSONType))return I;throw new Error("type must be JSONType or JSONType[]: "+I.join(","))}e.getJSONTypes=f;function l(S,I){const{gen:D,data:v,opts:C}=S,A=p(I,C.coerceTypes),W=I.length>0&&!(A.length===0&&I.length===1&&(0,r.schemaHasRulesForType)(S,I[0]));if(W){const G=O(I,v,C.strictNumbers,o.Wrong);D.if(G,()=>{A.length?b(S,I,A):g(S)})}return W}e.coerceAndCheckDataType=l;const d=new Set(["string","number","integer","boolean","null"]);function p(S,I){return I?S.filter(D=>d.has(D)||I==="array"&&D==="array"):[]}function b(S,I,D){const{gen:v,data:C,opts:A}=S,W=v.let("dataType",(0,s._)`typeof ${C}`),G=v.let("coerced",(0,s._)`undefined`);A.coerceTypes==="array"&&v.if((0,s._)`${W} == 'object' && Array.isArray(${C}) && ${C}.length == 1`,()=>v.assign(C,(0,s._)`${C}[0]`).assign(W,(0,s._)`typeof ${C}`).if(O(I,C,A.strictNumbers),()=>v.assign(G,C))),v.if((0,s._)`${G} !== undefined`);for(const Y of D)(d.has(Y)||Y==="array"&&A.coerceTypes==="array")&&ie(Y);v.else(),g(S),v.endIf(),v.if((0,s._)`${G} !== undefined`,()=>{v.assign(C,G),E(S,G)});function ie(Y){switch(Y){case"string":v.elseIf((0,s._)`${W} == "number" || ${W} == "boolean"`).assign(G,(0,s._)`"" + ${C}`).elseIf((0,s._)`${C} === null`).assign(G,(0,s._)`""`);return;case"number":v.elseIf((0,s._)`${W} == "boolean" || ${C} === null
632
632
  || (${W} == "string" && ${C} && ${C} == +${C})`).assign(G,(0,s._)`+${C}`);return;case"integer":v.elseIf((0,s._)`${W} === "boolean" || ${C} === null
633
633
  || (${W} === "string" && ${C} && ${C} == +${C} && !(${C} % 1))`).assign(G,(0,s._)`+${C}`);return;case"boolean":v.elseIf((0,s._)`${C} === "false" || ${C} === 0 || ${C} === null`).assign(G,!1).elseIf((0,s._)`${C} === "true" || ${C} === 1`).assign(G,!0);return;case"null":v.elseIf((0,s._)`${C} === "" || ${C} === 0 || ${C} === false`),v.assign(G,null);return;case"array":v.elseIf((0,s._)`${W} === "string" || ${W} === "number"
634
- || ${W} === "boolean" || ${C} === null`).assign(G,(0,s._)`[${C}]`)}}}function E({gen:S,parentData:I,parentDataProperty:D},v){S.if((0,s._)`${I} !== undefined`,()=>S.assign((0,s._)`${I}[${D}]`,v))}function P(S,I,D,v=o.Correct){const C=v===o.Correct?s.operators.EQ:s.operators.NEQ;let A;switch(S){case"null":return(0,s._)`${I} ${C} null`;case"array":A=(0,s._)`Array.isArray(${I})`;break;case"object":A=(0,s._)`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;break;case"integer":A=W((0,s._)`!(${I} % 1) && !isNaN(${I})`);break;case"number":A=W();break;default:return(0,s._)`typeof ${I} ${C} ${S}`}return v===o.Correct?A:(0,s.not)(A);function W(G=s.nil){return(0,s.and)((0,s._)`typeof ${I} == "number"`,G,D?(0,s._)`isFinite(${I})`:s.nil)}}e.checkDataType=P;function O(S,I,D,v){if(S.length===1)return P(S[0],I,D,v);let C;const A=(0,i.toHash)(S);if(A.array&&A.object){const W=(0,s._)`typeof ${I} != "object"`;C=A.null?W:(0,s._)`!${I} || ${W}`,delete A.null,delete A.array,delete A.object}else C=s.nil;A.number&&delete A.integer;for(const W in A)C=(0,s.and)(C,P(W,I,D,v));return C}e.checkDataTypes=O;const _={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:I})=>typeof S=="string"?(0,s._)`{type: ${S}}`:(0,s._)`{type: ${I}}`};function g(S){const I=$(S);(0,n.reportError)(I,_)}e.reportTypeError=g;function $(S){const{gen:I,data:D,schema:v}=S,C=(0,i.schemaRefOrVal)(S,v,"type");return{gen:I,keyword:"type",data:D,schema:v.type,schemaCode:C,schemaValue:C,parentSchema:v,params:{},it:S}}})(er);var qr={};Object.defineProperty(qr,"__esModule",{value:!0});qr.assignDefaults=void 0;const bt=B,Da=X;function Ma(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const s in r)Ts(e,s,r[s].default);else t==="array"&&Array.isArray(n)&&n.forEach((s,i)=>Ts(e,i,s.default))}qr.assignDefaults=Ma;function Ts(e,t,r){const{gen:n,compositeRule:s,data:i,opts:o}=e;if(r===void 0)return;const u=(0,bt._)`${i}${(0,bt.getProperty)(t)}`;if(s){(0,Da.checkStrictMode)(e,`default is ignored for: ${u}`);return}let f=(0,bt._)`${u} === undefined`;o.useDefaults==="empty"&&(f=(0,bt._)`${f} || ${u} === null || ${u} === ""`),n.if(f,(0,bt._)`${u} = ${(0,bt.stringify)(r)}`)}var qe={},x={};Object.defineProperty(x,"__esModule",{value:!0});x.validateUnion=x.validateArray=x.usePattern=x.callValidateCode=x.schemaProperties=x.allSchemaProperties=x.noPropertyInData=x.propertyInData=x.isOwnProperty=x.hasPropFunc=x.reportMissingProp=x.checkMissingProp=x.checkReportMissingProp=void 0;const re=B,wn=X,Je=We,La=X;function Fa(e,t){const{gen:r,data:n,it:s}=e;r.if(bn(r,n,t,s.opts.ownProperties),()=>{e.setParams({missingProperty:(0,re._)`${t}`},!0),e.error()})}x.checkReportMissingProp=Fa;function qa({gen:e,data:t,it:{opts:r}},n,s){return(0,re.or)(...n.map(i=>(0,re.and)(bn(e,t,i,r.ownProperties),(0,re._)`${s} = ${i}`)))}x.checkMissingProp=qa;function Ua(e,t){e.setParams({missingProperty:t},!0),e.error()}x.reportMissingProp=Ua;function Ii(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,re._)`Object.prototype.hasOwnProperty`})}x.hasPropFunc=Ii;function vn(e,t,r){return(0,re._)`${Ii(e)}.call(${t}, ${r})`}x.isOwnProperty=vn;function Va(e,t,r,n){const s=(0,re._)`${t}${(0,re.getProperty)(r)} !== undefined`;return n?(0,re._)`${s} && ${vn(e,t,r)}`:s}x.propertyInData=Va;function bn(e,t,r,n){const s=(0,re._)`${t}${(0,re.getProperty)(r)} === undefined`;return n?(0,re.or)(s,(0,re.not)(vn(e,t,r))):s}x.noPropertyInData=bn;function ji(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}x.allSchemaProperties=ji;function za(e,t){return ji(t).filter(r=>!(0,wn.alwaysValidSchema)(e,t[r]))}x.schemaProperties=za;function Wa({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:i},it:o},u,f,l){const d=l?(0,re._)`${e}, ${t}, ${n}${s}`:t,p=[[Je.default.instancePath,(0,re.strConcat)(Je.default.instancePath,i)],[Je.default.parentData,o.parentData],[Je.default.parentDataProperty,o.parentDataProperty],[Je.default.rootData,Je.default.rootData]];o.opts.dynamicRef&&p.push([Je.default.dynamicAnchors,Je.default.dynamicAnchors]);const b=(0,re._)`${d}, ${r.object(...p)}`;return f!==re.nil?(0,re._)`${u}.call(${f}, ${b})`:(0,re._)`${u}(${b})`}x.callValidateCode=Wa;const Ha=(0,re._)`new RegExp`;function xa({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,i=s(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,re._)`${s.code==="new RegExp"?Ha:(0,La.useFunc)(e,s)}(${r}, ${n})`})}x.usePattern=xa;function Ba(e){const{gen:t,data:r,keyword:n,it:s}=e,i=t.name("valid");if(s.allErrors){const u=t.let("valid",!0);return o(()=>t.assign(u,!1)),u}return t.var(i,!0),o(()=>t.break()),i;function o(u){const f=t.const("len",(0,re._)`${r}.length`);t.forRange("i",0,f,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:wn.Type.Num},i),t.if((0,re.not)(i),u)})}}x.validateArray=Ba;function Ga(e){const{gen:t,schema:r,keyword:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(f=>(0,wn.alwaysValidSchema)(s,f))&&!s.opts.unevaluated)return;const o=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((f,l)=>{const d=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(o,(0,re._)`${o} || ${u}`),e.mergeValidEvaluated(d,u)||t.if((0,re.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}x.validateUnion=Ga;Object.defineProperty(qe,"__esModule",{value:!0});qe.validateKeywordUsage=qe.validSchemaType=qe.funcKeywordCode=qe.macroKeywordCode=void 0;const $e=B,ot=We,Ka=x,Ja=Xt;function Qa(e,t){const{gen:r,keyword:n,schema:s,parentSchema:i,it:o}=e,u=t.macro.call(o.self,s,i,o),f=Ai(r,n,u);o.opts.validateSchema!==!1&&o.self.validateSchema(u,!0);const l=r.name("valid");e.subschema({schema:u,schemaPath:$e.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:f,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}qe.macroKeywordCode=Qa;function Ya(e,t){var r;const{gen:n,keyword:s,schema:i,parentSchema:o,$data:u,it:f}=e;Xa(f,t);const l=!u&&t.compile?t.compile.call(f.self,i,o,f):t.validate,d=Ai(n,s,l),p=n.let("valid");e.block$data(p,b),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function b(){if(t.errors===!1)O(),t.modifying&&Rs(e),_(()=>e.error());else{const g=t.async?E():P();t.modifying&&Rs(e),_(()=>Za(e,g))}}function E(){const g=n.let("ruleErrs",null);return n.try(()=>O((0,$e._)`await `),$=>n.assign(p,!1).if((0,$e._)`${$} instanceof ${f.ValidationError}`,()=>n.assign(g,(0,$e._)`${$}.errors`),()=>n.throw($))),g}function P(){const g=(0,$e._)`${d}.errors`;return n.assign(g,null),O($e.nil),g}function O(g=t.async?(0,$e._)`await `:$e.nil){const $=f.opts.passContext?ot.default.this:ot.default.self,S=!("compile"in t&&!u||t.schema===!1);n.assign(p,(0,$e._)`${g}${(0,Ka.callValidateCode)(e,d,$,S)}`,t.modifying)}function _(g){var $;n.if((0,$e.not)(($=t.valid)!==null&&$!==void 0?$:p),g)}}qe.funcKeywordCode=Ya;function Rs(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,$e._)`${n.parentData}[${n.parentDataProperty}]`))}function Za(e,t){const{gen:r}=e;r.if((0,$e._)`Array.isArray(${t})`,()=>{r.assign(ot.default.vErrors,(0,$e._)`${ot.default.vErrors} === null ? ${t} : ${ot.default.vErrors}.concat(${t})`).assign(ot.default.errors,(0,$e._)`${ot.default.vErrors}.length`),(0,Ja.extendErrors)(e)},()=>e.error())}function Xa({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Ai(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,$e.stringify)(r)})}function ec(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}qe.validSchemaType=ec;function tc({schema:e,opts:t,self:r,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const o=s.dependencies;if(o!=null&&o.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema&&!s.validateSchema(e[i])){const f=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(f);else throw new Error(f)}}qe.validateKeywordUsage=tc;var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.extendSubschemaMode=Ze.extendSubschemaData=Ze.getSubschema=void 0;const Fe=B,Di=X;function rc(e,{keyword:t,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,Fe._)`${e.schemaPath}${(0,Fe.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,Fe._)`${e.schemaPath}${(0,Fe.getProperty)(t)}${(0,Fe.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Di.escapeFragment)(r)}`}}if(n!==void 0){if(s===void 0||i===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:o,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Ze.getSubschema=rc;function nc(e,t,{dataProp:r,dataPropType:n,data:s,dataTypes:i,propertyName:o}){if(s!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=t;if(r!==void 0){const{errorPath:l,dataPathArr:d,opts:p}=t,b=u.let("data",(0,Fe._)`${t.data}${(0,Fe.getProperty)(r)}`,!0);f(b),e.errorPath=(0,Fe.str)`${l}${(0,Di.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,Fe._)`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(s!==void 0){const l=s instanceof Fe.Name?s:u.let("data",s,!0);f(l),o!==void 0&&(e.propertyName=o)}i&&(e.dataTypes=i);function f(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}Ze.extendSubschemaData=nc;function sc(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(e.compositeRule=n),s!==void 0&&(e.createErrors=s),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Ze.extendSubschemaMode=sc;var me={},Mi=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},Li={exports:{}},Ye=Li.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},s=r.post||function(){};yr(t,n,s,e,"",e)};Ye.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ye.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ye.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ye.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function yr(e,t,r,n,s,i,o,u,f,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,s,i,o,u,f,l);for(var d in n){var p=n[d];if(Array.isArray(p)){if(d in Ye.arrayKeywords)for(var b=0;b<p.length;b++)yr(e,t,r,p[b],s+"/"+d+"/"+b,i,s,d,n,b)}else if(d in Ye.propsKeywords){if(p&&typeof p=="object")for(var E in p)yr(e,t,r,p[E],s+"/"+d+"/"+ic(E),i,s,d,n,E)}else(d in Ye.keywords||e.allKeys&&!(d in Ye.skipKeywords))&&yr(e,t,r,p,s+"/"+d,i,s,d,n)}r(n,s,i,o,u,f,l)}}function ic(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var oc=Li.exports;Object.defineProperty(me,"__esModule",{value:!0});me.getSchemaRefs=me.resolveUrl=me.normalizeId=me._getFullPath=me.getFullPath=me.inlineRef=void 0;const ac=X,cc=Mi,lc=oc,uc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function dc(e,t=!0){return typeof e=="boolean"?!0:t===!0?!an(e):t?Fi(e)<=t:!1}me.inlineRef=dc;const fc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function an(e){for(const t in e){if(fc.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(an)||typeof r=="object"&&an(r))return!0}return!1}function Fi(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!uc.has(r)&&(typeof e[r]=="object"&&(0,ac.eachItem)(e[r],n=>t+=Fi(n)),t===1/0))return 1/0}return t}function qi(e,t="",r){r!==!1&&(t=Rt(t));const n=e.parse(t);return Ui(e,n)}me.getFullPath=qi;function Ui(e,t){return e.serialize(t).split("#")[0]+"#"}me._getFullPath=Ui;const pc=/#\/?$/;function Rt(e){return e?e.replace(pc,""):""}me.normalizeId=Rt;function hc(e,t,r){return r=Rt(r),e.resolve(t,r)}me.resolveUrl=hc;const mc=/^[a-z_][-a-z0-9._]*$/i;function yc(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,s=Rt(e[r]||t),i={"":s},o=qi(n,s,!1),u={},f=new Set;return lc(e,{allKeys:!0},(p,b,E,P)=>{if(P===void 0)return;const O=o+b;let _=i[P];typeof p[r]=="string"&&(_=g.call(this,p[r])),$.call(this,p.$anchor),$.call(this,p.$dynamicAnchor),i[b]=_;function g(S){const I=this.opts.uriResolver.resolve;if(S=Rt(_?I(_,S):S),f.has(S))throw d(S);f.add(S);let D=this.refs[S];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?l(p,D.schema,S):S!==Rt(O)&&(S[0]==="#"?(l(p,u[S],S),u[S]=p):this.refs[S]=O),S}function $(S){if(typeof S=="string"){if(!mc.test(S))throw new Error(`invalid anchor "${S}"`);g.call(this,`#${S}`)}}}),u;function l(p,b,E){if(b!==void 0&&!cc(p,b))throw d(E)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}me.getSchemaRefs=yc;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getData=Ne.KeywordCxt=Ne.validateFunctionCode=void 0;const Vi=kt,ks=er,En=Be,Tr=er,gc=qr,xt=qe,Kr=Ze,q=B,z=We,$c=me,Ge=X,zt=Xt;function _c(e){if(Hi(e)&&(xi(e),Wi(e))){bc(e);return}zi(e,()=>(0,Vi.topBoolOrEmptySchema)(e))}Ne.validateFunctionCode=_c;function zi({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},i){s.code.es5?e.func(t,(0,q._)`${z.default.data}, ${z.default.valCxt}`,n.$async,()=>{e.code((0,q._)`"use strict"; ${Os(r,s)}`),vc(e,s),e.code(i)}):e.func(t,(0,q._)`${z.default.data}, ${wc(s)}`,n.$async,()=>e.code(Os(r,s)).code(i))}function wc(e){return(0,q._)`{${z.default.instancePath}="", ${z.default.parentData}, ${z.default.parentDataProperty}, ${z.default.rootData}=${z.default.data}${e.dynamicRef?(0,q._)`, ${z.default.dynamicAnchors}={}`:q.nil}}={}`}function vc(e,t){e.if(z.default.valCxt,()=>{e.var(z.default.instancePath,(0,q._)`${z.default.valCxt}.${z.default.instancePath}`),e.var(z.default.parentData,(0,q._)`${z.default.valCxt}.${z.default.parentData}`),e.var(z.default.parentDataProperty,(0,q._)`${z.default.valCxt}.${z.default.parentDataProperty}`),e.var(z.default.rootData,(0,q._)`${z.default.valCxt}.${z.default.rootData}`),t.dynamicRef&&e.var(z.default.dynamicAnchors,(0,q._)`${z.default.valCxt}.${z.default.dynamicAnchors}`)},()=>{e.var(z.default.instancePath,(0,q._)`""`),e.var(z.default.parentData,(0,q._)`undefined`),e.var(z.default.parentDataProperty,(0,q._)`undefined`),e.var(z.default.rootData,z.default.data),t.dynamicRef&&e.var(z.default.dynamicAnchors,(0,q._)`{}`)})}function bc(e){const{schema:t,opts:r,gen:n}=e;zi(e,()=>{r.$comment&&t.$comment&&Gi(e),Rc(e),n.let(z.default.vErrors,null),n.let(z.default.errors,0),r.unevaluated&&Ec(e),Bi(e),Cc(e)})}function Ec(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,q._)`${r}.evaluated`),t.if((0,q._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,q._)`${e.evaluated}.props`,(0,q._)`undefined`)),t.if((0,q._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,q._)`${e.evaluated}.items`,(0,q._)`undefined`))}function Os(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,q._)`/*# sourceURL=${r} */`:q.nil}function Pc(e,t){if(Hi(e)&&(xi(e),Wi(e))){Sc(e,t);return}(0,Vi.boolOrEmptySchema)(e,t)}function Wi({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function Hi(e){return typeof e.schema!="boolean"}function Sc(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&Gi(e),kc(e),Oc(e);const i=n.const("_errs",z.default.errors);Bi(e,i),n.var(t,(0,q._)`${i} === ${z.default.errors}`)}function xi(e){(0,Ge.checkUnknownRules)(e),Tc(e)}function Bi(e,t){if(e.opts.jtd)return Cs(e,[],!1,t);const r=(0,ks.getSchemaTypes)(e.schema),n=(0,ks.coerceAndCheckDataType)(e,r);Cs(e,r,!n,t)}function Tc(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Ge.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Rc(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ge.checkStrictMode)(e,"default is ignored in the schema root")}function kc(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,$c.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Oc(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Gi({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const i=r.$comment;if(s.$comment===!0)e.code((0,q._)`${z.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){const o=(0,q.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,q._)`${z.default.self}.opts.$comment(${i}, ${o}, ${u}.schema)`)}}function Cc(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:i}=e;r.$async?t.if((0,q._)`${z.default.errors} === 0`,()=>t.return(z.default.data),()=>t.throw((0,q._)`new ${s}(${z.default.vErrors})`)):(t.assign((0,q._)`${n}.errors`,z.default.vErrors),i.unevaluated&&Nc(e),t.return((0,q._)`${z.default.errors} === 0`))}function Nc({gen:e,evaluated:t,props:r,items:n}){r instanceof q.Name&&e.assign((0,q._)`${t}.props`,r),n instanceof q.Name&&e.assign((0,q._)`${t}.items`,n)}function Cs(e,t,r,n){const{gen:s,schema:i,data:o,allErrors:u,opts:f,self:l}=e,{RULES:d}=l;if(i.$ref&&(f.ignoreKeywordsWithRef||!(0,Ge.schemaHasRulesButRef)(i,d))){s.block(()=>Qi(e,"$ref",d.all.$ref.definition));return}f.jtd||Ic(e,t),s.block(()=>{for(const b of d.rules)p(b);p(d.post)});function p(b){(0,En.shouldUseGroup)(i,b)&&(b.type?(s.if((0,Tr.checkDataType)(b.type,o,f.strictNumbers)),Ns(e,b),t.length===1&&t[0]===b.type&&r&&(s.else(),(0,Tr.reportTypeError)(e)),s.endIf()):Ns(e,b),u||s.if((0,q._)`${z.default.errors} === ${n||0}`))}}function Ns(e,t){const{gen:r,schema:n,opts:{useDefaults:s}}=e;s&&(0,gc.assignDefaults)(e,t.type),r.block(()=>{for(const i of t.rules)(0,En.shouldUseRule)(n,i)&&Qi(e,i.keyword,i.definition,t.type)})}function Ic(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(jc(e,t),e.opts.allowUnionTypes||Ac(e,t),Dc(e,e.dataTypes))}function jc(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Ki(e.dataTypes,r)||Pn(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Lc(e,t)}}function Ac(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Pn(e,"use allowUnionTypes to allow union type keyword")}function Dc(e,t){const r=e.self.RULES.all;for(const n in r){const s=r[n];if(typeof s=="object"&&(0,En.shouldUseRule)(e.schema,s)){const{type:i}=s.definition;i.length&&!i.some(o=>Mc(t,o))&&Pn(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function Mc(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Ki(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Lc(e,t){const r=[];for(const n of e.dataTypes)Ki(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Pn(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Ge.checkStrictMode)(e,t,e.opts.strictTypes)}class Ji{constructor(t,r,n){if((0,xt.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ge.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Yi(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,xt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",z.default.errors))}result(t,r,n){this.failResult((0,q.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,q.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,q._)`${r} !== undefined && (${(0,q.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?zt.reportExtraError:zt.reportError)(this,this.def.error,r)}$dataError(){(0,zt.reportError)(this,this.def.$dataError||zt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,zt.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=q.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=q.nil,r=q.nil){if(!this.$data)return;const{gen:n,schemaCode:s,schemaType:i,def:o}=this;n.if((0,q.or)((0,q._)`${s} === undefined`,r)),t!==q.nil&&n.assign(t,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==q.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:s,it:i}=this;return(0,q.or)(o(),u());function o(){if(n.length){if(!(r instanceof q.Name))throw new Error("ajv implementation error");const f=Array.isArray(n)?n:[n];return(0,q._)`${(0,Tr.checkDataTypes)(f,r,i.opts.strictNumbers,Tr.DataType.Wrong)}`}return q.nil}function u(){if(s.validateSchema){const f=t.scopeValue("validate$data",{ref:s.validateSchema});return(0,q._)`!${f}(${r})`}return q.nil}}subschema(t,r){const n=(0,Kr.getSubschema)(this.it,t);(0,Kr.extendSubschemaData)(n,this.it,t),(0,Kr.extendSubschemaMode)(n,t);const s={...this.it,...n,items:void 0,props:void 0};return Pc(s,r),s}mergeEvaluated(t,r){const{it:n,gen:s}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Ge.mergeEvaluated.props(s,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Ge.mergeEvaluated.items(s,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(r,()=>this.mergeEvaluated(t,q.Name)),!0}}Ne.KeywordCxt=Ji;function Qi(e,t,r,n){const s=new Ji(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,xt.funcKeywordCode)(s,r):"macro"in r?(0,xt.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,xt.funcKeywordCode)(s,r)}const Fc=/^\/(?:[^~]|~0|~1)*$/,qc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Yi(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,i;if(e==="")return z.default.rootData;if(e[0]==="/"){if(!Fc.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,i=z.default.rootData}else{const l=qc.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);const d=+l[1];if(s=l[2],s==="#"){if(d>=t)throw new Error(f("property/index",d));return n[t-d]}if(d>t)throw new Error(f("data",d));if(i=r[t-d],!s)return i}let o=i;const u=s.split("/");for(const l of u)l&&(i=(0,q._)`${i}${(0,q.getProperty)((0,Ge.unescapeJsonPointer)(l))}`,o=(0,q._)`${o} && ${i}`);return o;function f(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}Ne.getData=Yi;var tr={};Object.defineProperty(tr,"__esModule",{value:!0});class Uc extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}tr.default=Uc;var rr={};Object.defineProperty(rr,"__esModule",{value:!0});const Jr=me;class Vc extends Error{constructor(t,r,n,s){super(s||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Jr.resolveUrl)(t,r,n),this.missingSchema=(0,Jr.normalizeId)((0,Jr.getFullPath)(t,this.missingRef))}}rr.default=Vc;var ve={};Object.defineProperty(ve,"__esModule",{value:!0});ve.resolveSchema=ve.getCompilingSchema=ve.resolveRef=ve.compileSchema=ve.SchemaEnv=void 0;const ke=B,zc=tr,it=We,Ce=me,Is=X,Wc=Ne;class Ur{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Ce.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}ve.SchemaEnv=Ur;function Sn(e){const t=Zi.call(this,e);if(t)return t;const r=(0,Ce.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,o=new ke.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i});let u;e.$async&&(u=o.scopeValue("Error",{ref:zc.default,code:(0,ke._)`require("ajv/dist/runtime/validation_error").default`}));const f=o.scopeName("validate");e.validateName=f;const l={gen:o,allErrors:this.opts.allErrors,data:it.default.data,parentData:it.default.parentData,parentDataProperty:it.default.parentDataProperty,dataNames:[it.default.data],dataPathArr:[ke.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,ke.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:ke.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ke._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(e),(0,Wc.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);const p=o.toString();d=`${o.scopeRefs(it.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,e));const E=new Function(`${it.default.self}`,`${it.default.scope}`,d)(this,this.scope.get());if(this.scope.value(f,{ref:E}),E.errors=null,E.schema=e.schema,E.schemaEnv=e,e.$async&&(E.$async=!0),this.opts.code.source===!0&&(E.source={validateName:f,validateCode:p,scopeValues:o._values}),this.opts.unevaluated){const{props:P,items:O}=l;E.evaluated={props:P instanceof ke.Name?void 0:P,items:O instanceof ke.Name?void 0:O,dynamicProps:P instanceof ke.Name,dynamicItems:O instanceof ke.Name},E.source&&(E.source.evaluated=(0,ke.stringify)(E.evaluated))}return e.validate=E,e}catch(p){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(e)}}ve.compileSchema=Sn;function Hc(e,t,r){var n;r=(0,Ce.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let i=Gc.call(this,e,r);if(i===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;o&&(i=new Ur({schema:o,schemaId:u,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=xc.call(this,i)}ve.resolveRef=Hc;function xc(e){return(0,Ce.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Sn.call(this,e)}function Zi(e){for(const t of this._compilations)if(Bc(t,e))return t}ve.getCompilingSchema=Zi;function Bc(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Gc(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Vr.call(this,e,t)}function Vr(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Ce._getFullPath)(this.opts.uriResolver,r);let s=(0,Ce.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return Qr.call(this,r,e);const i=(0,Ce.normalizeId)(n),o=this.refs[i]||this.schemas[i];if(typeof o=="string"){const u=Vr.call(this,e,o);return typeof(u==null?void 0:u.schema)!="object"?void 0:Qr.call(this,r,u)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||Sn.call(this,o),i===(0,Ce.normalizeId)(t)){const{schema:u}=o,{schemaId:f}=this.opts,l=u[f];return l&&(s=(0,Ce.resolveUrl)(this.opts.uriResolver,s,l)),new Ur({schema:u,schemaId:f,root:e,baseId:s})}return Qr.call(this,r,o)}}ve.resolveSchema=Vr;const Kc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Qr(e,{baseId:t,schema:r,root:n}){var s;if(((s=e.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(const u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const f=r[(0,Is.unescapeFragment)(u)];if(f===void 0)return;r=f;const l=typeof r=="object"&&r[this.opts.schemaId];!Kc.has(u)&&l&&(t=(0,Ce.resolveUrl)(this.opts.uriResolver,t,l))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Is.schemaHasRulesButRef)(r,this.RULES)){const u=(0,Ce.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=Vr.call(this,n,u)}const{schemaId:o}=this.opts;if(i=i||new Ur({schema:r,schemaId:o,root:n,baseId:t}),i.schema!==i.root.schema)return i}const Jc="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Qc="Meta-schema for $data reference (JSON AnySchema extension proposal)",Yc="object",Zc=["$data"],Xc={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},el=!1,tl={$id:Jc,description:Qc,type:Yc,required:Zc,properties:Xc,additionalProperties:el};var Tn={},cn={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(la,function(r){function n(){for(var h=arguments.length,c=Array(h),y=0;y<h;y++)c[y]=arguments[y];if(c.length>1){c[0]=c[0].slice(0,-1);for(var k=c.length-1,R=1;R<k;++R)c[R]=c[R].slice(1,-1);return c[k]=c[k].slice(1),c.join("")}else return c[0]}function s(h){return"(?:"+h+")"}function i(h){return h===void 0?"undefined":h===null?"null":Object.prototype.toString.call(h).split(" ").pop().split("]").shift().toLowerCase()}function o(h){return h.toUpperCase()}function u(h){return h!=null?h instanceof Array?h:typeof h.length!="number"||h.split||h.setInterval||h.call?[h]:Array.prototype.slice.call(h):[]}function f(h,c){var y=h;if(c)for(var k in c)y[k]=c[k];return y}function l(h){var c="[A-Za-z]",y="[0-9]",k=n(y,"[A-Fa-f]"),R=s(s("%[EFef]"+k+"%"+k+k+"%"+k+k)+"|"+s("%[89A-Fa-f]"+k+"%"+k+k)+"|"+s("%"+k+k)),U="[\\:\\/\\?\\#\\[\\]\\@]",V="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Z=n(U,V),te=h?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ae=h?"[\\uE000-\\uF8FF]":"[]",J=n(c,y,"[\\-\\.\\_\\~]",te);s(c+n(c,y,"[\\+\\-\\.]")+"*"),s(s(R+"|"+n(J,V,"[\\:]"))+"*");var ee=s(s("25[0-5]")+"|"+s("2[0-4]"+y)+"|"+s("1"+y+y)+"|"+s("0?[1-9]"+y)+"|0?0?"+y),ce=s(ee+"\\."+ee+"\\."+ee+"\\."+ee),H=s(k+"{1,4}"),ne=s(s(H+"\\:"+H)+"|"+ce),fe=s(s(H+"\\:")+"{6}"+ne),se=s("\\:\\:"+s(H+"\\:")+"{5}"+ne),Ke=s(s(H)+"?\\:\\:"+s(H+"\\:")+"{4}"+ne),De=s(s(s(H+"\\:")+"{0,1}"+H)+"?\\:\\:"+s(H+"\\:")+"{3}"+ne),Me=s(s(s(H+"\\:")+"{0,2}"+H)+"?\\:\\:"+s(H+"\\:")+"{2}"+ne),vt=s(s(s(H+"\\:")+"{0,3}"+H)+"?\\:\\:"+H+"\\:"+ne),nt=s(s(s(H+"\\:")+"{0,4}"+H)+"?\\:\\:"+ne),Se=s(s(s(H+"\\:")+"{0,5}"+H)+"?\\:\\:"+H),Le=s(s(s(H+"\\:")+"{0,6}"+H)+"?\\:\\:"),st=s([fe,se,Ke,De,Me,vt,nt,Se,Le].join("|")),He=s(s(J+"|"+R)+"+");s("[vV]"+k+"+\\."+n(J,V,"[\\:]")+"+"),s(s(R+"|"+n(J,V))+"*");var Ut=s(R+"|"+n(J,V,"[\\:\\@]"));return s(s(R+"|"+n(J,V,"[\\@]"))+"+"),s(s(Ut+"|"+n("[\\/\\?]",ae))+"*"),{NOT_SCHEME:new RegExp(n("[^]",c,y,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",J,V),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",J,V),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",J,V),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",J,V),"g"),NOT_QUERY:new RegExp(n("[^\\%]",J,V,"[\\:\\@\\/\\?]",ae),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",J,V,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",J,V),"g"),UNRESERVED:new RegExp(J,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",J,Z),"g"),PCT_ENCODED:new RegExp(R,"g"),IPV4ADDRESS:new RegExp("^("+ce+")$"),IPV6ADDRESS:new RegExp("^\\[?("+st+")"+s(s("\\%25|\\%(?!"+k+"{2})")+"("+He+")")+"?\\]?$")}}var d=l(!1),p=l(!0),b=function(){function h(c,y){var k=[],R=!0,U=!1,V=void 0;try{for(var Z=c[Symbol.iterator](),te;!(R=(te=Z.next()).done)&&(k.push(te.value),!(y&&k.length===y));R=!0);}catch(ae){U=!0,V=ae}finally{try{!R&&Z.return&&Z.return()}finally{if(U)throw V}}return k}return function(c,y){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return h(c,y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(h){if(Array.isArray(h)){for(var c=0,y=Array(h.length);c<h.length;c++)y[c]=h[c];return y}else return Array.from(h)},P=2147483647,O=36,_=1,g=26,$=38,S=700,I=72,D=128,v="-",C=/^xn--/,A=/[^\0-\x7E]/,W=/[\x2E\u3002\uFF0E\uFF61]/g,G={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ie=O-_,Y=Math.floor,Ee=String.fromCharCode;function de(h){throw new RangeError(G[h])}function Xe(h,c){for(var y=[],k=h.length;k--;)y[k]=c(h[k]);return y}function et(h,c){var y=h.split("@"),k="";y.length>1&&(k=y[0]+"@",h=y[1]),h=h.replace(W,".");var R=h.split("."),U=Xe(R,c).join(".");return k+U}function pt(h){for(var c=[],y=0,k=h.length;y<k;){var R=h.charCodeAt(y++);if(R>=55296&&R<=56319&&y<k){var U=h.charCodeAt(y++);(U&64512)==56320?c.push(((R&1023)<<10)+(U&1023)+65536):(c.push(R),y--)}else c.push(R)}return c}var It=function(c){return String.fromCodePoint.apply(String,E(c))},ht=function(c){return c-48<10?c-22:c-65<26?c-65:c-97<26?c-97:O},M=function(c,y){return c+22+75*(c<26)-((y!=0)<<5)},w=function(c,y,k){var R=0;for(c=k?Y(c/S):c>>1,c+=Y(c/y);c>ie*g>>1;R+=O)c=Y(c/ie);return Y(R+(ie+1)*c/(c+$))},j=function(c){var y=[],k=c.length,R=0,U=D,V=I,Z=c.lastIndexOf(v);Z<0&&(Z=0);for(var te=0;te<Z;++te)c.charCodeAt(te)>=128&&de("not-basic"),y.push(c.charCodeAt(te));for(var ae=Z>0?Z+1:0;ae<k;){for(var J=R,ee=1,ce=O;;ce+=O){ae>=k&&de("invalid-input");var H=ht(c.charCodeAt(ae++));(H>=O||H>Y((P-R)/ee))&&de("overflow"),R+=H*ee;var ne=ce<=V?_:ce>=V+g?g:ce-V;if(H<ne)break;var fe=O-ne;ee>Y(P/fe)&&de("overflow"),ee*=fe}var se=y.length+1;V=w(R-J,se,J==0),Y(R/se)>P-U&&de("overflow"),U+=Y(R/se),R%=se,y.splice(R++,0,U)}return String.fromCodePoint.apply(String,y)},T=function(c){var y=[];c=pt(c);var k=c.length,R=D,U=0,V=I,Z=!0,te=!1,ae=void 0;try{for(var J=c[Symbol.iterator](),ee;!(Z=(ee=J.next()).done);Z=!0){var ce=ee.value;ce<128&&y.push(Ee(ce))}}catch(Vt){te=!0,ae=Vt}finally{try{!Z&&J.return&&J.return()}finally{if(te)throw ae}}var H=y.length,ne=H;for(H&&y.push(v);ne<k;){var fe=P,se=!0,Ke=!1,De=void 0;try{for(var Me=c[Symbol.iterator](),vt;!(se=(vt=Me.next()).done);se=!0){var nt=vt.value;nt>=R&&nt<fe&&(fe=nt)}}catch(Vt){Ke=!0,De=Vt}finally{try{!se&&Me.return&&Me.return()}finally{if(Ke)throw De}}var Se=ne+1;fe-R>Y((P-U)/Se)&&de("overflow"),U+=(fe-R)*Se,R=fe;var Le=!0,st=!1,He=void 0;try{for(var Ut=c[Symbol.iterator](),hs;!(Le=(hs=Ut.next()).done);Le=!0){var ms=hs.value;if(ms<R&&++U>P&&de("overflow"),ms==R){for(var ir=U,or=O;;or+=O){var ar=or<=V?_:or>=V+g?g:or-V;if(ir<ar)break;var ys=ir-ar,gs=O-ar;y.push(Ee(M(ar+ys%gs,0))),ir=Y(ys/gs)}y.push(Ee(M(ir,0))),V=w(U,Se,ne==H),U=0,++ne}}}catch(Vt){st=!0,He=Vt}finally{try{!Le&&Ut.return&&Ut.return()}finally{if(st)throw He}}++U,++R}return y.join("")},a=function(c){return et(c,function(y){return C.test(y)?j(y.slice(4).toLowerCase()):y})},m=function(c){return et(c,function(y){return A.test(y)?"xn--"+T(y):y})},N={version:"2.1.0",ucs2:{decode:pt,encode:It},decode:j,encode:T,toASCII:m,toUnicode:a},L={};function F(h){var c=h.charCodeAt(0),y=void 0;return c<16?y="%0"+c.toString(16).toUpperCase():c<128?y="%"+c.toString(16).toUpperCase():c<2048?y="%"+(c>>6|192).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase():y="%"+(c>>12|224).toString(16).toUpperCase()+"%"+(c>>6&63|128).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase(),y}function K(h){for(var c="",y=0,k=h.length;y<k;){var R=parseInt(h.substr(y+1,2),16);if(R<128)c+=String.fromCharCode(R),y+=3;else if(R>=194&&R<224){if(k-y>=6){var U=parseInt(h.substr(y+4,2),16);c+=String.fromCharCode((R&31)<<6|U&63)}else c+=h.substr(y,6);y+=6}else if(R>=224){if(k-y>=9){var V=parseInt(h.substr(y+4,2),16),Z=parseInt(h.substr(y+7,2),16);c+=String.fromCharCode((R&15)<<12|(V&63)<<6|Z&63)}else c+=h.substr(y,9);y+=9}else c+=h.substr(y,3),y+=3}return c}function Q(h,c){function y(k){var R=K(k);return R.match(c.UNRESERVED)?R:k}return h.scheme&&(h.scheme=String(h.scheme).replace(c.PCT_ENCODED,y).toLowerCase().replace(c.NOT_SCHEME,"")),h.userinfo!==void 0&&(h.userinfo=String(h.userinfo).replace(c.PCT_ENCODED,y).replace(c.NOT_USERINFO,F).replace(c.PCT_ENCODED,o)),h.host!==void 0&&(h.host=String(h.host).replace(c.PCT_ENCODED,y).toLowerCase().replace(c.NOT_HOST,F).replace(c.PCT_ENCODED,o)),h.path!==void 0&&(h.path=String(h.path).replace(c.PCT_ENCODED,y).replace(h.scheme?c.NOT_PATH:c.NOT_PATH_NOSCHEME,F).replace(c.PCT_ENCODED,o)),h.query!==void 0&&(h.query=String(h.query).replace(c.PCT_ENCODED,y).replace(c.NOT_QUERY,F).replace(c.PCT_ENCODED,o)),h.fragment!==void 0&&(h.fragment=String(h.fragment).replace(c.PCT_ENCODED,y).replace(c.NOT_FRAGMENT,F).replace(c.PCT_ENCODED,o)),h}function oe(h){return h.replace(/^0*(.*)/,"$1")||"0"}function Ie(h,c){var y=h.match(c.IPV4ADDRESS)||[],k=b(y,2),R=k[1];return R?R.split(".").map(oe).join("."):h}function mt(h,c){var y=h.match(c.IPV6ADDRESS)||[],k=b(y,3),R=k[1],U=k[2];if(R){for(var V=R.toLowerCase().split("::").reverse(),Z=b(V,2),te=Z[0],ae=Z[1],J=ae?ae.split(":").map(oe):[],ee=te.split(":").map(oe),ce=c.IPV4ADDRESS.test(ee[ee.length-1]),H=ce?7:8,ne=ee.length-H,fe=Array(H),se=0;se<H;++se)fe[se]=J[se]||ee[ne+se]||"";ce&&(fe[H-1]=Ie(fe[H-1],c));var Ke=fe.reduce(function(Se,Le,st){if(!Le||Le==="0"){var He=Se[Se.length-1];He&&He.index+He.length===st?He.length++:Se.push({index:st,length:1})}return Se},[]),De=Ke.sort(function(Se,Le){return Le.length-Se.length})[0],Me=void 0;if(De&&De.length>1){var vt=fe.slice(0,De.index),nt=fe.slice(De.index+De.length);Me=vt.join(":")+"::"+nt.join(":")}else Me=fe.join(":");return U&&(Me+="%"+U),Me}else return h}var jt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,At="".match(/(){0}/)[1]===void 0;function be(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y={},k=c.iri!==!1?p:d;c.reference==="suffix"&&(h=(c.scheme?c.scheme+":":"")+"//"+h);var R=h.match(jt);if(R){At?(y.scheme=R[1],y.userinfo=R[3],y.host=R[4],y.port=parseInt(R[5],10),y.path=R[6]||"",y.query=R[7],y.fragment=R[8],isNaN(y.port)&&(y.port=R[5])):(y.scheme=R[1]||void 0,y.userinfo=h.indexOf("@")!==-1?R[3]:void 0,y.host=h.indexOf("//")!==-1?R[4]:void 0,y.port=parseInt(R[5],10),y.path=R[6]||"",y.query=h.indexOf("?")!==-1?R[7]:void 0,y.fragment=h.indexOf("#")!==-1?R[8]:void 0,isNaN(y.port)&&(y.port=h.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?R[4]:void 0)),y.host&&(y.host=mt(Ie(y.host,k),k)),y.scheme===void 0&&y.userinfo===void 0&&y.host===void 0&&y.port===void 0&&!y.path&&y.query===void 0?y.reference="same-document":y.scheme===void 0?y.reference="relative":y.fragment===void 0?y.reference="absolute":y.reference="uri",c.reference&&c.reference!=="suffix"&&c.reference!==y.reference&&(y.error=y.error||"URI is not a "+c.reference+" reference.");var U=L[(c.scheme||y.scheme||"").toLowerCase()];if(!c.unicodeSupport&&(!U||!U.unicodeSupport)){if(y.host&&(c.domainHost||U&&U.domainHost))try{y.host=N.toASCII(y.host.replace(k.PCT_ENCODED,K).toLowerCase())}catch(V){y.error=y.error||"Host's domain name can not be converted to ASCII via punycode: "+V}Q(y,d)}else Q(y,k);U&&U.parse&&U.parse(y,c)}else y.error=y.error||"URI can not be parsed.";return y}function Dt(h,c){var y=c.iri!==!1?p:d,k=[];return h.userinfo!==void 0&&(k.push(h.userinfo),k.push("@")),h.host!==void 0&&k.push(mt(Ie(String(h.host),y),y).replace(y.IPV6ADDRESS,function(R,U,V){return"["+U+(V?"%25"+V:"")+"]"})),(typeof h.port=="number"||typeof h.port=="string")&&(k.push(":"),k.push(String(h.port))),k.length?k.join(""):void 0}var yt=/^\.\.?\//,gt=/^\/\.(\/|$)/,$t=/^\/\.\.(\/|$)/,Mt=/^\/?(?:.|\n)*?(?=\/|$)/;function je(h){for(var c=[];h.length;)if(h.match(yt))h=h.replace(yt,"");else if(h.match(gt))h=h.replace(gt,"/");else if(h.match($t))h=h.replace($t,"/"),c.pop();else if(h==="."||h==="..")h="";else{var y=h.match(Mt);if(y){var k=y[0];h=h.slice(k.length),c.push(k)}else throw new Error("Unexpected dot segment condition")}return c.join("")}function _e(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=c.iri?p:d,k=[],R=L[(c.scheme||h.scheme||"").toLowerCase()];if(R&&R.serialize&&R.serialize(h,c),h.host&&!y.IPV6ADDRESS.test(h.host)){if(c.domainHost||R&&R.domainHost)try{h.host=c.iri?N.toUnicode(h.host):N.toASCII(h.host.replace(y.PCT_ENCODED,K).toLowerCase())}catch(Z){h.error=h.error||"Host's domain name can not be converted to "+(c.iri?"Unicode":"ASCII")+" via punycode: "+Z}}Q(h,y),c.reference!=="suffix"&&h.scheme&&(k.push(h.scheme),k.push(":"));var U=Dt(h,c);if(U!==void 0&&(c.reference!=="suffix"&&k.push("//"),k.push(U),h.path&&h.path.charAt(0)!=="/"&&k.push("/")),h.path!==void 0){var V=h.path;!c.absolutePath&&(!R||!R.absolutePath)&&(V=je(V)),U===void 0&&(V=V.replace(/^\/\//,"/%2F")),k.push(V)}return h.query!==void 0&&(k.push("?"),k.push(h.query)),h.fragment!==void 0&&(k.push("#"),k.push(h.fragment)),k.join("")}function _t(h,c){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=arguments[3],R={};return k||(h=be(_e(h,y),y),c=be(_e(c,y),y)),y=y||{},!y.tolerant&&c.scheme?(R.scheme=c.scheme,R.userinfo=c.userinfo,R.host=c.host,R.port=c.port,R.path=je(c.path||""),R.query=c.query):(c.userinfo!==void 0||c.host!==void 0||c.port!==void 0?(R.userinfo=c.userinfo,R.host=c.host,R.port=c.port,R.path=je(c.path||""),R.query=c.query):(c.path?(c.path.charAt(0)==="/"?R.path=je(c.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?R.path="/"+c.path:h.path?R.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+c.path:R.path=c.path,R.path=je(R.path)),R.query=c.query):(R.path=h.path,c.query!==void 0?R.query=c.query:R.query=h.query),R.userinfo=h.userinfo,R.host=h.host,R.port=h.port),R.scheme=h.scheme),R.fragment=c.fragment,R}function Lt(h,c,y){var k=f({scheme:"null"},y);return _e(_t(be(h,k),be(c,k),k,!0),k)}function tt(h,c){return typeof h=="string"?h=_e(be(h,c),c):i(h)==="object"&&(h=be(_e(h,c),c)),h}function Ft(h,c,y){return typeof h=="string"?h=_e(be(h,y),y):i(h)==="object"&&(h=_e(h,y)),typeof c=="string"?c=_e(be(c,y),y):i(c)==="object"&&(c=_e(c,y)),h===c}function sr(h,c){return h&&h.toString().replace(!c||!c.iri?d.ESCAPE:p.ESCAPE,F)}function Pe(h,c){return h&&h.toString().replace(!c||!c.iri?d.PCT_ENCODED:p.PCT_ENCODED,K)}var rt={scheme:"http",domainHost:!0,parse:function(c,y){return c.host||(c.error=c.error||"HTTP URIs must have a host."),c},serialize:function(c,y){var k=String(c.scheme).toLowerCase()==="https";return(c.port===(k?443:80)||c.port==="")&&(c.port=void 0),c.path||(c.path="/"),c}},os={scheme:"https",domainHost:rt.domainHost,parse:rt.parse,serialize:rt.serialize};function as(h){return typeof h.secure=="boolean"?h.secure:String(h.scheme).toLowerCase()==="wss"}var qt={scheme:"ws",domainHost:!0,parse:function(c,y){var k=c;return k.secure=as(k),k.resourceName=(k.path||"/")+(k.query?"?"+k.query:""),k.path=void 0,k.query=void 0,k},serialize:function(c,y){if((c.port===(as(c)?443:80)||c.port==="")&&(c.port=void 0),typeof c.secure=="boolean"&&(c.scheme=c.secure?"wss":"ws",c.secure=void 0),c.resourceName){var k=c.resourceName.split("?"),R=b(k,2),U=R[0],V=R[1];c.path=U&&U!=="/"?U:void 0,c.query=V,c.resourceName=void 0}return c.fragment=void 0,c}},cs={scheme:"wss",domainHost:qt.domainHost,parse:qt.parse,serialize:qt.serialize},vo={},ls="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ae="[0-9A-Fa-f]",bo=s(s("%[EFef]"+Ae+"%"+Ae+Ae+"%"+Ae+Ae)+"|"+s("%[89A-Fa-f]"+Ae+"%"+Ae+Ae)+"|"+s("%"+Ae+Ae)),Eo="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Po="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",So=n(Po,'[\\"\\\\]'),To="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ro=new RegExp(ls,"g"),wt=new RegExp(bo,"g"),ko=new RegExp(n("[^]",Eo,"[\\.]",'[\\"]',So),"g"),us=new RegExp(n("[^]",ls,To),"g"),Oo=us;function Wr(h){var c=K(h);return c.match(Ro)?c:h}var ds={scheme:"mailto",parse:function(c,y){var k=c,R=k.to=k.path?k.path.split(","):[];if(k.path=void 0,k.query){for(var U=!1,V={},Z=k.query.split("&"),te=0,ae=Z.length;te<ae;++te){var J=Z[te].split("=");switch(J[0]){case"to":for(var ee=J[1].split(","),ce=0,H=ee.length;ce<H;++ce)R.push(ee[ce]);break;case"subject":k.subject=Pe(J[1],y);break;case"body":k.body=Pe(J[1],y);break;default:U=!0,V[Pe(J[0],y)]=Pe(J[1],y);break}}U&&(k.headers=V)}k.query=void 0;for(var ne=0,fe=R.length;ne<fe;++ne){var se=R[ne].split("@");if(se[0]=Pe(se[0]),y.unicodeSupport)se[1]=Pe(se[1],y).toLowerCase();else try{se[1]=N.toASCII(Pe(se[1],y).toLowerCase())}catch(Ke){k.error=k.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ke}R[ne]=se.join("@")}return k},serialize:function(c,y){var k=c,R=u(c.to);if(R){for(var U=0,V=R.length;U<V;++U){var Z=String(R[U]),te=Z.lastIndexOf("@"),ae=Z.slice(0,te).replace(wt,Wr).replace(wt,o).replace(ko,F),J=Z.slice(te+1);try{J=y.iri?N.toUnicode(J):N.toASCII(Pe(J,y).toLowerCase())}catch(ne){k.error=k.error||"Email address's domain name can not be converted to "+(y.iri?"Unicode":"ASCII")+" via punycode: "+ne}R[U]=ae+"@"+J}k.path=R.join(",")}var ee=c.headers=c.headers||{};c.subject&&(ee.subject=c.subject),c.body&&(ee.body=c.body);var ce=[];for(var H in ee)ee[H]!==vo[H]&&ce.push(H.replace(wt,Wr).replace(wt,o).replace(us,F)+"="+ee[H].replace(wt,Wr).replace(wt,o).replace(Oo,F));return ce.length&&(k.query=ce.join("&")),k}},Co=/^([^\:]+)\:(.*)/,fs={scheme:"urn",parse:function(c,y){var k=c.path&&c.path.match(Co),R=c;if(k){var U=y.scheme||R.scheme||"urn",V=k[1].toLowerCase(),Z=k[2],te=U+":"+(y.nid||V),ae=L[te];R.nid=V,R.nss=Z,R.path=void 0,ae&&(R=ae.parse(R,y))}else R.error=R.error||"URN can not be parsed.";return R},serialize:function(c,y){var k=y.scheme||c.scheme||"urn",R=c.nid,U=k+":"+(y.nid||R),V=L[U];V&&(c=V.serialize(c,y));var Z=c,te=c.nss;return Z.path=(R||y.nid)+":"+te,Z}},No=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ps={scheme:"urn:uuid",parse:function(c,y){var k=c;return k.uuid=k.nss,k.nss=void 0,!y.tolerant&&(!k.uuid||!k.uuid.match(No))&&(k.error=k.error||"UUID is not valid."),k},serialize:function(c,y){var k=c;return k.nss=(c.uuid||"").toLowerCase(),k}};L[rt.scheme]=rt,L[os.scheme]=os,L[qt.scheme]=qt,L[cs.scheme]=cs,L[ds.scheme]=ds,L[fs.scheme]=fs,L[ps.scheme]=ps,r.SCHEMES=L,r.pctEncChar=F,r.pctDecChars=K,r.parse=be,r.removeDotSegments=je,r.serialize=_e,r.resolveComponents=_t,r.resolve=Lt,r.normalize=tt,r.equal=Ft,r.escapeComponent=sr,r.unescapeComponent=Pe,Object.defineProperty(r,"__esModule",{value:!0})})})(cn,cn.exports);var rl=cn.exports;Object.defineProperty(Tn,"__esModule",{value:!0});const Xi=rl;Xi.code='require("ajv/dist/runtime/uri").default';Tn.default=Xi;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Ne;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=B;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=tr,s=rr,i=ut,o=ve,u=B,f=me,l=er,d=X,p=tl,b=Tn,E=(M,w)=>new RegExp(M,w);E.code="new RegExp";const P=["removeAdditional","useDefaults","coerceTypes"],O=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={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."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},$=200;function S(M){var w,j,T,a,m,N,L,F,K,Q,oe,Ie,mt,jt,At,be,Dt,yt,gt,$t,Mt,je,_e,_t,Lt;const tt=M.strict,Ft=(w=M.code)===null||w===void 0?void 0:w.optimize,sr=Ft===!0||Ft===void 0?1:Ft||0,Pe=(T=(j=M.code)===null||j===void 0?void 0:j.regExp)!==null&&T!==void 0?T:E,rt=(a=M.uriResolver)!==null&&a!==void 0?a:b.default;return{strictSchema:(N=(m=M.strictSchema)!==null&&m!==void 0?m:tt)!==null&&N!==void 0?N:!0,strictNumbers:(F=(L=M.strictNumbers)!==null&&L!==void 0?L:tt)!==null&&F!==void 0?F:!0,strictTypes:(Q=(K=M.strictTypes)!==null&&K!==void 0?K:tt)!==null&&Q!==void 0?Q:"log",strictTuples:(Ie=(oe=M.strictTuples)!==null&&oe!==void 0?oe:tt)!==null&&Ie!==void 0?Ie:"log",strictRequired:(jt=(mt=M.strictRequired)!==null&&mt!==void 0?mt:tt)!==null&&jt!==void 0?jt:!1,code:M.code?{...M.code,optimize:sr,regExp:Pe}:{optimize:sr,regExp:Pe},loopRequired:(At=M.loopRequired)!==null&&At!==void 0?At:$,loopEnum:(be=M.loopEnum)!==null&&be!==void 0?be:$,meta:(Dt=M.meta)!==null&&Dt!==void 0?Dt:!0,messages:(yt=M.messages)!==null&&yt!==void 0?yt:!0,inlineRefs:(gt=M.inlineRefs)!==null&&gt!==void 0?gt:!0,schemaId:($t=M.schemaId)!==null&&$t!==void 0?$t:"$id",addUsedSchema:(Mt=M.addUsedSchema)!==null&&Mt!==void 0?Mt:!0,validateSchema:(je=M.validateSchema)!==null&&je!==void 0?je:!0,validateFormats:(_e=M.validateFormats)!==null&&_e!==void 0?_e:!0,unicodeRegExp:(_t=M.unicodeRegExp)!==null&&_t!==void 0?_t:!0,int32range:(Lt=M.int32range)!==null&&Lt!==void 0?Lt:!0,uriResolver:rt}}class I{constructor(w={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,w=this.opts={...w,...S(w)};const{es5:j,lines:T}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:O,es5:j,lines:T}),this.logger=Y(w.logger);const a=w.validateFormats;w.validateFormats=!1,this.RULES=(0,i.getRules)(),D.call(this,_,w,"NOT SUPPORTED"),D.call(this,g,w,"DEPRECATED","warn"),this._metaOpts=G.call(this),w.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),w.keywords&&W.call(this,w.keywords),typeof w.meta=="object"&&this.addMetaSchema(w.meta),C.call(this),w.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:w,meta:j,schemaId:T}=this.opts;let a=p;T==="id"&&(a={...p},a.id=a.$id,delete a.$id),j&&w&&this.addMetaSchema(a,a[T],!1)}defaultMeta(){const{meta:w,schemaId:j}=this.opts;return this.opts.defaultMeta=typeof w=="object"?w[j]||w:void 0}validate(w,j){let T;if(typeof w=="string"){if(T=this.getSchema(w),!T)throw new Error(`no schema with key or ref "${w}"`)}else T=this.compile(w);const a=T(j);return"$async"in T||(this.errors=T.errors),a}compile(w,j){const T=this._addSchema(w,j);return T.validate||this._compileSchemaEnv(T)}compileAsync(w,j){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return a.call(this,w,j);async function a(Q,oe){await m.call(this,Q.$schema);const Ie=this._addSchema(Q,oe);return Ie.validate||N.call(this,Ie)}async function m(Q){Q&&!this.getSchema(Q)&&await a.call(this,{$ref:Q},!0)}async function N(Q){try{return this._compileSchemaEnv(Q)}catch(oe){if(!(oe instanceof s.default))throw oe;return L.call(this,oe),await F.call(this,oe.missingSchema),N.call(this,Q)}}function L({missingSchema:Q,missingRef:oe}){if(this.refs[Q])throw new Error(`AnySchema ${Q} is loaded but ${oe} cannot be resolved`)}async function F(Q){const oe=await K.call(this,Q);this.refs[Q]||await m.call(this,oe.$schema),this.refs[Q]||this.addSchema(oe,Q,j)}async function K(Q){const oe=this._loading[Q];if(oe)return oe;try{return await(this._loading[Q]=T(Q))}finally{delete this._loading[Q]}}}addSchema(w,j,T,a=this.opts.validateSchema){if(Array.isArray(w)){for(const N of w)this.addSchema(N,void 0,T,a);return this}let m;if(typeof w=="object"){const{schemaId:N}=this.opts;if(m=w[N],m!==void 0&&typeof m!="string")throw new Error(`schema ${N} must be string`)}return j=(0,f.normalizeId)(j||m),this._checkUnique(j),this.schemas[j]=this._addSchema(w,T,j,a,!0),this}addMetaSchema(w,j,T=this.opts.validateSchema){return this.addSchema(w,j,!0,T),this}validateSchema(w,j){if(typeof w=="boolean")return!0;let T;if(T=w.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const a=this.validate(T,w);if(!a&&j){const m="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(m);else throw new Error(m)}return a}getSchema(w){let j;for(;typeof(j=v.call(this,w))=="string";)w=j;if(j===void 0){const{schemaId:T}=this.opts,a=new o.SchemaEnv({schema:{},schemaId:T});if(j=o.resolveSchema.call(this,a,w),!j)return;this.refs[w]=j}return j.validate||this._compileSchemaEnv(j)}removeSchema(w){if(w instanceof RegExp)return this._removeAllSchemas(this.schemas,w),this._removeAllSchemas(this.refs,w),this;switch(typeof w){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const j=v.call(this,w);return typeof j=="object"&&this._cache.delete(j.schema),delete this.schemas[w],delete this.refs[w],this}case"object":{const j=w;this._cache.delete(j);let T=w[this.opts.schemaId];return T&&(T=(0,f.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(w){for(const j of w)this.addKeyword(j);return this}addKeyword(w,j){let T;if(typeof w=="string")T=w,typeof j=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),j.keyword=T);else if(typeof w=="object"&&j===void 0){if(j=w,T=j.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(de.call(this,T,j),!j)return(0,d.eachItem)(T,m=>Xe.call(this,m)),this;pt.call(this,j);const a={...j,type:(0,l.getJSONTypes)(j.type),schemaType:(0,l.getJSONTypes)(j.schemaType)};return(0,d.eachItem)(T,a.type.length===0?m=>Xe.call(this,m,a):m=>a.type.forEach(N=>Xe.call(this,m,a,N))),this}getKeyword(w){const j=this.RULES.all[w];return typeof j=="object"?j.definition:!!j}removeKeyword(w){const{RULES:j}=this;delete j.keywords[w],delete j.all[w];for(const T of j.rules){const a=T.rules.findIndex(m=>m.keyword===w);a>=0&&T.rules.splice(a,1)}return this}addFormat(w,j){return typeof j=="string"&&(j=new RegExp(j)),this.formats[w]=j,this}errorsText(w=this.errors,{separator:j=", ",dataVar:T="data"}={}){return!w||w.length===0?"No errors":w.map(a=>`${T}${a.instancePath} ${a.message}`).reduce((a,m)=>a+j+m)}$dataMetaSchema(w,j){const T=this.RULES.all;w=JSON.parse(JSON.stringify(w));for(const a of j){const m=a.split("/").slice(1);let N=w;for(const L of m)N=N[L];for(const L in T){const F=T[L];if(typeof F!="object")continue;const{$data:K}=F.definition,Q=N[L];K&&Q&&(N[L]=ht(Q))}}return w}_removeAllSchemas(w,j){for(const T in w){const a=w[T];(!j||j.test(T))&&(typeof a=="string"?delete w[T]:a&&!a.meta&&(this._cache.delete(a.schema),delete w[T]))}}_addSchema(w,j,T,a=this.opts.validateSchema,m=this.opts.addUsedSchema){let N;const{schemaId:L}=this.opts;if(typeof w=="object")N=w[L];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof w!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get(w);if(F!==void 0)return F;T=(0,f.normalizeId)(N||T);const K=f.getSchemaRefs.call(this,w,T);return F=new o.SchemaEnv({schema:w,schemaId:L,meta:j,baseId:T,localRefs:K}),this._cache.set(F.schema,F),m&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=F),a&&this.validateSchema(w,!0),F}_checkUnique(w){if(this.schemas[w]||this.refs[w])throw new Error(`schema with key or id "${w}" already exists`)}_compileSchemaEnv(w){if(w.meta?this._compileMetaSchema(w):o.compileSchema.call(this,w),!w.validate)throw new Error("ajv implementation error");return w.validate}_compileMetaSchema(w){const j=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,w)}finally{this.opts=j}}}e.default=I,I.ValidationError=n.default,I.MissingRefError=s.default;function D(M,w,j,T="error"){for(const a in M){const m=a;m in w&&this.logger[T](`${j}: option ${a}. ${M[m]}`)}}function v(M){return M=(0,f.normalizeId)(M),this.schemas[M]||this.refs[M]}function C(){const M=this.opts.schemas;if(M)if(Array.isArray(M))this.addSchema(M);else for(const w in M)this.addSchema(M[w],w)}function A(){for(const M in this.opts.formats){const w=this.opts.formats[M];w&&this.addFormat(M,w)}}function W(M){if(Array.isArray(M)){this.addVocabulary(M);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const w in M){const j=M[w];j.keyword||(j.keyword=w),this.addKeyword(j)}}function G(){const M={...this.opts};for(const w of P)delete M[w];return M}const ie={log(){},warn(){},error(){}};function Y(M){if(M===!1)return ie;if(M===void 0)return console;if(M.log&&M.warn&&M.error)return M;throw new Error("logger must implement log, warn and error methods")}const Ee=/^[a-z_$][a-z0-9_$:-]*$/i;function de(M,w){const{RULES:j}=this;if((0,d.eachItem)(M,T=>{if(j.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!Ee.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!w&&w.$data&&!("code"in w||"validate"in w))throw new Error('$data keyword must have "code" or "validate" function')}function Xe(M,w,j){var T;const a=w==null?void 0:w.post;if(j&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:m}=this;let N=a?m.post:m.rules.find(({type:F})=>F===j);if(N||(N={type:j,rules:[]},m.rules.push(N)),m.keywords[M]=!0,!w)return;const L={keyword:M,definition:{...w,type:(0,l.getJSONTypes)(w.type),schemaType:(0,l.getJSONTypes)(w.schemaType)}};w.before?et.call(this,N,L,w.before):N.rules.push(L),m.all[M]=L,(T=w.implements)===null||T===void 0||T.forEach(F=>this.addKeyword(F))}function et(M,w,j){const T=M.rules.findIndex(a=>a.keyword===j);T>=0?M.rules.splice(T,0,w):(M.rules.push(w),this.logger.warn(`rule ${j} is not defined`))}function pt(M){let{metaSchema:w}=M;w!==void 0&&(M.$data&&this.opts.$data&&(w=ht(w)),M.validateSchema=this.compile(w,!0))}const It={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ht(M){return{anyOf:[M,It]}}})(ki);var Rn={},kn={},On={};Object.defineProperty(On,"__esModule",{value:!0});const nl={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};On.default=nl;var dt={};Object.defineProperty(dt,"__esModule",{value:!0});dt.callRef=dt.getValidate=void 0;const sl=rr,js=x,we=B,Et=We,As=ve,cr=X,il={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:s,schemaEnv:i,validateName:o,opts:u,self:f}=n,{root:l}=i;if((r==="#"||r==="#/")&&s===l.baseId)return p();const d=As.resolveRef.call(f,l,s,r);if(d===void 0)throw new sl.default(n.opts.uriResolver,s,r);if(d instanceof As.SchemaEnv)return b(d);return E(d);function p(){if(i===l)return gr(e,o,i,i.$async);const P=t.scopeValue("root",{ref:l});return gr(e,(0,we._)`${P}.validate`,l,l.$async)}function b(P){const O=eo(e,P);gr(e,O,P,P.$async)}function E(P){const O=t.scopeValue("schema",u.code.source===!0?{ref:P,code:(0,we.stringify)(P)}:{ref:P}),_=t.name("valid"),g=e.subschema({schema:P,dataTypes:[],schemaPath:we.nil,topSchemaRef:O,errSchemaPath:r},_);e.mergeEvaluated(g),e.ok(_)}}};function eo(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,we._)`${r.scopeValue("wrapper",{ref:t})}.validate`}dt.getValidate=eo;function gr(e,t,r,n){const{gen:s,it:i}=e,{allErrors:o,schemaEnv:u,opts:f}=i,l=f.passContext?Et.default.this:we.nil;n?d():p();function d(){if(!u.$async)throw new Error("async schema referenced by sync schema");const P=s.let("valid");s.try(()=>{s.code((0,we._)`await ${(0,js.callValidateCode)(e,t,l)}`),E(t),o||s.assign(P,!0)},O=>{s.if((0,we._)`!(${O} instanceof ${i.ValidationError})`,()=>s.throw(O)),b(O),o||s.assign(P,!1)}),e.ok(P)}function p(){e.result((0,js.callValidateCode)(e,t,l),()=>E(t),()=>b(t))}function b(P){const O=(0,we._)`${P}.errors`;s.assign(Et.default.vErrors,(0,we._)`${Et.default.vErrors} === null ? ${O} : ${Et.default.vErrors}.concat(${O})`),s.assign(Et.default.errors,(0,we._)`${Et.default.vErrors}.length`)}function E(P){var O;if(!i.opts.unevaluated)return;const _=(O=r==null?void 0:r.validate)===null||O===void 0?void 0:O.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=cr.mergeEvaluated.props(s,_.props,i.props));else{const g=s.var("props",(0,we._)`${P}.evaluated.props`);i.props=cr.mergeEvaluated.props(s,g,i.props,we.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=cr.mergeEvaluated.items(s,_.items,i.items));else{const g=s.var("items",(0,we._)`${P}.evaluated.items`);i.items=cr.mergeEvaluated.items(s,g,i.items,we.Name)}}}dt.callRef=gr;dt.default=il;Object.defineProperty(kn,"__esModule",{value:!0});const ol=On,al=dt,cl=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",ol.default,al.default];kn.default=cl;var Cn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0});const Rr=B,Qe=Rr.operators,kr={maximum:{okStr:"<=",ok:Qe.LTE,fail:Qe.GT},minimum:{okStr:">=",ok:Qe.GTE,fail:Qe.LT},exclusiveMaximum:{okStr:"<",ok:Qe.LT,fail:Qe.GTE},exclusiveMinimum:{okStr:">",ok:Qe.GT,fail:Qe.LTE}},ll={message:({keyword:e,schemaCode:t})=>(0,Rr.str)`must be ${kr[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Rr._)`{comparison: ${kr[e].okStr}, limit: ${t}}`},ul={keyword:Object.keys(kr),type:"number",schemaType:"number",$data:!0,error:ll,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Rr._)`${r} ${kr[t].fail} ${n} || isNaN(${r})`)}};Nn.default=ul;var In={};Object.defineProperty(In,"__esModule",{value:!0});const Bt=B,dl={message:({schemaCode:e})=>(0,Bt.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Bt._)`{multipleOf: ${e}}`},fl={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:dl,code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,i=s.opts.multipleOfPrecision,o=t.let("res"),u=i?(0,Bt._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}`:(0,Bt._)`${o} !== parseInt(${o})`;e.fail$data((0,Bt._)`(${n} === 0 || (${o} = ${r}/${n}, ${u}))`)}};In.default=fl;var jn={},An={};Object.defineProperty(An,"__esModule",{value:!0});function to(e){const t=e.length;let r=0,n=0,s;for(;n<t;)r++,s=e.charCodeAt(n++),s>=55296&&s<=56319&&n<t&&(s=e.charCodeAt(n),(s&64512)===56320&&n++);return r}An.default=to;to.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(jn,"__esModule",{value:!0});const at=B,pl=X,hl=An,ml={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,at.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,at._)`{limit: ${e}}`},yl={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:ml,code(e){const{keyword:t,data:r,schemaCode:n,it:s}=e,i=t==="maxLength"?at.operators.GT:at.operators.LT,o=s.opts.unicode===!1?(0,at._)`${r}.length`:(0,at._)`${(0,pl.useFunc)(e.gen,hl.default)}(${r})`;e.fail$data((0,at._)`${o} ${i} ${n}`)}};jn.default=yl;var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});const gl=x,Or=B,$l={message:({schemaCode:e})=>(0,Or.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Or._)`{pattern: ${e}}`},_l={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:$l,code(e){const{data:t,$data:r,schema:n,schemaCode:s,it:i}=e,o=i.opts.unicodeRegExp?"u":"",u=r?(0,Or._)`(new RegExp(${s}, ${o}))`:(0,gl.usePattern)(e,n);e.fail$data((0,Or._)`!${u}.test(${t})`)}};Dn.default=_l;var Mn={};Object.defineProperty(Mn,"__esModule",{value:!0});const Gt=B,wl={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Gt.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Gt._)`{limit: ${e}}`},vl={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:wl,code(e){const{keyword:t,data:r,schemaCode:n}=e,s=t==="maxProperties"?Gt.operators.GT:Gt.operators.LT;e.fail$data((0,Gt._)`Object.keys(${r}).length ${s} ${n}`)}};Mn.default=vl;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});const Wt=x,Kt=B,bl=X,El={message:({params:{missingProperty:e}})=>(0,Kt.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Kt._)`{missingProperty: ${e}}`},Pl={keyword:"required",type:"object",schemaType:"array",$data:!0,error:El,code(e){const{gen:t,schema:r,schemaCode:n,data:s,$data:i,it:o}=e,{opts:u}=o;if(!i&&r.length===0)return;const f=r.length>=u.loopRequired;if(o.allErrors?l():d(),u.strictRequired){const E=e.parentSchema.properties,{definedProperties:P}=e.it;for(const O of r)if((E==null?void 0:E[O])===void 0&&!P.has(O)){const _=o.schemaEnv.baseId+o.errSchemaPath,g=`required property "${O}" is not defined at "${_}" (strictRequired)`;(0,bl.checkStrictMode)(o,g,o.opts.strictRequired)}}function l(){if(f||i)e.block$data(Kt.nil,p);else for(const E of r)(0,Wt.checkReportMissingProp)(e,E)}function d(){const E=t.let("missing");if(f||i){const P=t.let("valid",!0);e.block$data(P,()=>b(E,P)),e.ok(P)}else t.if((0,Wt.checkMissingProp)(e,r,E)),(0,Wt.reportMissingProp)(e,E),t.else()}function p(){t.forOf("prop",n,E=>{e.setParams({missingProperty:E}),t.if((0,Wt.noPropertyInData)(t,s,E,u.ownProperties),()=>e.error())})}function b(E,P){e.setParams({missingProperty:E}),t.forOf(E,n,()=>{t.assign(P,(0,Wt.propertyInData)(t,s,E,u.ownProperties)),t.if((0,Kt.not)(P),()=>{e.error(),t.break()})},Kt.nil)}}};Ln.default=Pl;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});const Jt=B,Sl={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Jt.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Jt._)`{limit: ${e}}`},Tl={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Sl,code(e){const{keyword:t,data:r,schemaCode:n}=e,s=t==="maxItems"?Jt.operators.GT:Jt.operators.LT;e.fail$data((0,Jt._)`${r}.length ${s} ${n}`)}};Fn.default=Tl;var qn={},nr={};Object.defineProperty(nr,"__esModule",{value:!0});const ro=Mi;ro.code='require("ajv/dist/runtime/equal").default';nr.default=ro;Object.defineProperty(qn,"__esModule",{value:!0});const Yr=er,he=B,Rl=X,kl=nr,Ol={message:({params:{i:e,j:t}})=>(0,he.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,he._)`{i: ${e}, j: ${t}}`},Cl={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Ol,code(e){const{gen:t,data:r,$data:n,schema:s,parentSchema:i,schemaCode:o,it:u}=e;if(!n&&!s)return;const f=t.let("valid"),l=i.items?(0,Yr.getSchemaTypes)(i.items):[];e.block$data(f,d,(0,he._)`${o} === false`),e.ok(f);function d(){const P=t.let("i",(0,he._)`${r}.length`),O=t.let("j");e.setParams({i:P,j:O}),t.assign(f,!0),t.if((0,he._)`${P} > 1`,()=>(p()?b:E)(P,O))}function p(){return l.length>0&&!l.some(P=>P==="object"||P==="array")}function b(P,O){const _=t.name("item"),g=(0,Yr.checkDataTypes)(l,_,u.opts.strictNumbers,Yr.DataType.Wrong),$=t.const("indices",(0,he._)`{}`);t.for((0,he._)`;${P}--;`,()=>{t.let(_,(0,he._)`${r}[${P}]`),t.if(g,(0,he._)`continue`),l.length>1&&t.if((0,he._)`typeof ${_} == "string"`,(0,he._)`${_} += "_"`),t.if((0,he._)`typeof ${$}[${_}] == "number"`,()=>{t.assign(O,(0,he._)`${$}[${_}]`),e.error(),t.assign(f,!1).break()}).code((0,he._)`${$}[${_}] = ${P}`)})}function E(P,O){const _=(0,Rl.useFunc)(t,kl.default),g=t.name("outer");t.label(g).for((0,he._)`;${P}--;`,()=>t.for((0,he._)`${O} = ${P}; ${O}--;`,()=>t.if((0,he._)`${_}(${r}[${P}], ${r}[${O}])`,()=>{e.error(),t.assign(f,!1).break(g)})))}}};qn.default=Cl;var Un={};Object.defineProperty(Un,"__esModule",{value:!0});const ln=B,Nl=X,Il=nr,jl={message:"must be equal to constant",params:({schemaCode:e})=>(0,ln._)`{allowedValue: ${e}}`},Al={keyword:"const",$data:!0,error:jl,code(e){const{gen:t,data:r,$data:n,schemaCode:s,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,ln._)`!${(0,Nl.useFunc)(t,Il.default)}(${r}, ${s})`):e.fail((0,ln._)`${i} !== ${r}`)}};Un.default=Al;var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});const Ht=B,Dl=X,Ml=nr,Ll={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Ht._)`{allowedValues: ${e}}`},Fl={keyword:"enum",schemaType:"array",$data:!0,error:Ll,code(e){const{gen:t,data:r,$data:n,schema:s,schemaCode:i,it:o}=e;if(!n&&s.length===0)throw new Error("enum must have non-empty array");const u=s.length>=o.opts.loopEnum;let f;const l=()=>f??(f=(0,Dl.useFunc)(t,Ml.default));let d;if(u||n)d=t.let("valid"),e.block$data(d,p);else{if(!Array.isArray(s))throw new Error("ajv implementation error");const E=t.const("vSchema",i);d=(0,Ht.or)(...s.map((P,O)=>b(E,O)))}e.pass(d);function p(){t.assign(d,!1),t.forOf("v",i,E=>t.if((0,Ht._)`${l()}(${r}, ${E})`,()=>t.assign(d,!0).break()))}function b(E,P){const O=s[P];return typeof O=="object"&&O!==null?(0,Ht._)`${l()}(${r}, ${E}[${P}])`:(0,Ht._)`${r} === ${O}`}}};Vn.default=Fl;Object.defineProperty(Cn,"__esModule",{value:!0});const ql=Nn,Ul=In,Vl=jn,zl=Dn,Wl=Mn,Hl=Ln,xl=Fn,Bl=qn,Gl=Un,Kl=Vn,Jl=[ql.default,Ul.default,Vl.default,zl.default,Wl.default,Hl.default,xl.default,Bl.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Gl.default,Kl.default];Cn.default=Jl;var zn={},Ct={};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateAdditionalItems=void 0;const ct=B,un=X,Ql={message:({params:{len:e}})=>(0,ct.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ct._)`{limit: ${e}}`},Yl={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ql,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,un.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}no(e,n)}};function no(e,t){const{gen:r,schema:n,data:s,keyword:i,it:o}=e;o.items=!0;const u=r.const("len",(0,ct._)`${s}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,ct._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,un.alwaysValidSchema)(o,n)){const l=r.var("valid",(0,ct._)`${u} <= ${t.length}`);r.if((0,ct.not)(l),()=>f(l)),e.ok(l)}function f(l){r.forRange("i",t.length,u,d=>{e.subschema({keyword:i,dataProp:d,dataPropType:un.Type.Num},l),o.allErrors||r.if((0,ct.not)(l),()=>r.break())})}}Ct.validateAdditionalItems=no;Ct.default=Yl;var Wn={},Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.validateTuple=void 0;const Ds=B,$r=X,Zl=x,Xl={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return so(e,"additionalItems",t);r.items=!0,!(0,$r.alwaysValidSchema)(r,t)&&e.ok((0,Zl.validateArray)(e))}};function so(e,t,r=e.schema){const{gen:n,parentSchema:s,data:i,keyword:o,it:u}=e;d(s),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=$r.mergeEvaluated.items(n,r.length,u.items));const f=n.name("valid"),l=n.const("len",(0,Ds._)`${i}.length`);r.forEach((p,b)=>{(0,$r.alwaysValidSchema)(u,p)||(n.if((0,Ds._)`${l} > ${b}`,()=>e.subschema({keyword:o,schemaProp:b,dataProp:b},f)),e.ok(f))});function d(p){const{opts:b,errSchemaPath:E}=u,P=r.length,O=P===p.minItems&&(P===p.maxItems||p[t]===!1);if(b.strictTuples&&!O){const _=`"${o}" is ${P}-tuple, but minItems or maxItems/${t} are not specified or different at path "${E}"`;(0,$r.checkStrictMode)(u,_,b.strictTuples)}}}Nt.validateTuple=so;Nt.default=Xl;Object.defineProperty(Wn,"__esModule",{value:!0});const eu=Nt,tu={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,eu.validateTuple)(e,"items")};Wn.default=tu;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const Ms=B,ru=X,nu=x,su=Ct,iu={message:({params:{len:e}})=>(0,Ms.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ms._)`{limit: ${e}}`},ou={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:iu,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,!(0,ru.alwaysValidSchema)(n,t)&&(s?(0,su.validateAdditionalItems)(e,s):e.ok((0,nu.validateArray)(e)))}};Hn.default=ou;var xn={};Object.defineProperty(xn,"__esModule",{value:!0});const Re=B,lr=X,au={message:({params:{min:e,max:t}})=>t===void 0?(0,Re.str)`must contain at least ${e} valid item(s)`:(0,Re.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Re._)`{minContains: ${e}}`:(0,Re._)`{minContains: ${e}, maxContains: ${t}}`},cu={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:au,code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;let o,u;const{minContains:f,maxContains:l}=n;i.opts.next?(o=f===void 0?1:f,u=l):o=1;const d=t.const("len",(0,Re._)`${s}.length`);if(e.setParams({min:o,max:u}),u===void 0&&o===0){(0,lr.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&o>u){(0,lr.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,lr.alwaysValidSchema)(i,r)){let O=(0,Re._)`${d} >= ${o}`;u!==void 0&&(O=(0,Re._)`${O} && ${d} <= ${u}`),e.pass(O);return}i.items=!0;const p=t.name("valid");u===void 0&&o===1?E(p,()=>t.if(p,()=>t.break())):o===0?(t.let(p,!0),u!==void 0&&t.if((0,Re._)`${s}.length > 0`,b)):(t.let(p,!1),b()),e.result(p,()=>e.reset());function b(){const O=t.name("_valid"),_=t.let("count",0);E(O,()=>t.if(O,()=>P(_)))}function E(O,_){t.forRange("i",0,d,g=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:lr.Type.Num,compositeRule:!0},O),_()})}function P(O){t.code((0,Re._)`${O}++`),u===void 0?t.if((0,Re._)`${O} >= ${o}`,()=>t.assign(p,!0).break()):(t.if((0,Re._)`${O} > ${u}`,()=>t.assign(p,!1).break()),o===1?t.assign(p,!0):t.if((0,Re._)`${O} >= ${o}`,()=>t.assign(p,!0)))}}};xn.default=cu;var io={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=B,r=X,n=x;e.error={message:({params:{property:f,depsCount:l,deps:d}})=>{const p=l===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${f} is present`},params:({params:{property:f,depsCount:l,deps:d,missingProperty:p}})=>(0,t._)`{property: ${f},
634
+ || ${W} === "boolean" || ${C} === null`).assign(G,(0,s._)`[${C}]`)}}}function E({gen:S,parentData:I,parentDataProperty:D},v){S.if((0,s._)`${I} !== undefined`,()=>S.assign((0,s._)`${I}[${D}]`,v))}function P(S,I,D,v=o.Correct){const C=v===o.Correct?s.operators.EQ:s.operators.NEQ;let A;switch(S){case"null":return(0,s._)`${I} ${C} null`;case"array":A=(0,s._)`Array.isArray(${I})`;break;case"object":A=(0,s._)`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;break;case"integer":A=W((0,s._)`!(${I} % 1) && !isNaN(${I})`);break;case"number":A=W();break;default:return(0,s._)`typeof ${I} ${C} ${S}`}return v===o.Correct?A:(0,s.not)(A);function W(G=s.nil){return(0,s.and)((0,s._)`typeof ${I} == "number"`,G,D?(0,s._)`isFinite(${I})`:s.nil)}}e.checkDataType=P;function O(S,I,D,v){if(S.length===1)return P(S[0],I,D,v);let C;const A=(0,i.toHash)(S);if(A.array&&A.object){const W=(0,s._)`typeof ${I} != "object"`;C=A.null?W:(0,s._)`!${I} || ${W}`,delete A.null,delete A.array,delete A.object}else C=s.nil;A.number&&delete A.integer;for(const W in A)C=(0,s.and)(C,P(W,I,D,v));return C}e.checkDataTypes=O;const _={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:I})=>typeof S=="string"?(0,s._)`{type: ${S}}`:(0,s._)`{type: ${I}}`};function g(S){const I=$(S);(0,n.reportError)(I,_)}e.reportTypeError=g;function $(S){const{gen:I,data:D,schema:v}=S,C=(0,i.schemaRefOrVal)(S,v,"type");return{gen:I,keyword:"type",data:D,schema:v.type,schemaCode:C,schemaValue:C,parentSchema:v,params:{},it:S}}})(er);var qr={};Object.defineProperty(qr,"__esModule",{value:!0});qr.assignDefaults=void 0;const bt=B,Da=X;function Ma(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const s in r)Ts(e,s,r[s].default);else t==="array"&&Array.isArray(n)&&n.forEach((s,i)=>Ts(e,i,s.default))}qr.assignDefaults=Ma;function Ts(e,t,r){const{gen:n,compositeRule:s,data:i,opts:o}=e;if(r===void 0)return;const u=(0,bt._)`${i}${(0,bt.getProperty)(t)}`;if(s){(0,Da.checkStrictMode)(e,`default is ignored for: ${u}`);return}let f=(0,bt._)`${u} === undefined`;o.useDefaults==="empty"&&(f=(0,bt._)`${f} || ${u} === null || ${u} === ""`),n.if(f,(0,bt._)`${u} = ${(0,bt.stringify)(r)}`)}var qe={},H={};Object.defineProperty(H,"__esModule",{value:!0});H.validateUnion=H.validateArray=H.usePattern=H.callValidateCode=H.schemaProperties=H.allSchemaProperties=H.noPropertyInData=H.propertyInData=H.isOwnProperty=H.hasPropFunc=H.reportMissingProp=H.checkMissingProp=H.checkReportMissingProp=void 0;const re=B,wn=X,Je=We,La=X;function Fa(e,t){const{gen:r,data:n,it:s}=e;r.if(bn(r,n,t,s.opts.ownProperties),()=>{e.setParams({missingProperty:(0,re._)`${t}`},!0),e.error()})}H.checkReportMissingProp=Fa;function qa({gen:e,data:t,it:{opts:r}},n,s){return(0,re.or)(...n.map(i=>(0,re.and)(bn(e,t,i,r.ownProperties),(0,re._)`${s} = ${i}`)))}H.checkMissingProp=qa;function Ua(e,t){e.setParams({missingProperty:t},!0),e.error()}H.reportMissingProp=Ua;function Ii(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,re._)`Object.prototype.hasOwnProperty`})}H.hasPropFunc=Ii;function vn(e,t,r){return(0,re._)`${Ii(e)}.call(${t}, ${r})`}H.isOwnProperty=vn;function Va(e,t,r,n){const s=(0,re._)`${t}${(0,re.getProperty)(r)} !== undefined`;return n?(0,re._)`${s} && ${vn(e,t,r)}`:s}H.propertyInData=Va;function bn(e,t,r,n){const s=(0,re._)`${t}${(0,re.getProperty)(r)} === undefined`;return n?(0,re.or)(s,(0,re.not)(vn(e,t,r))):s}H.noPropertyInData=bn;function ji(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}H.allSchemaProperties=ji;function za(e,t){return ji(t).filter(r=>!(0,wn.alwaysValidSchema)(e,t[r]))}H.schemaProperties=za;function Wa({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:i},it:o},u,f,l){const d=l?(0,re._)`${e}, ${t}, ${n}${s}`:t,p=[[Je.default.instancePath,(0,re.strConcat)(Je.default.instancePath,i)],[Je.default.parentData,o.parentData],[Je.default.parentDataProperty,o.parentDataProperty],[Je.default.rootData,Je.default.rootData]];o.opts.dynamicRef&&p.push([Je.default.dynamicAnchors,Je.default.dynamicAnchors]);const b=(0,re._)`${d}, ${r.object(...p)}`;return f!==re.nil?(0,re._)`${u}.call(${f}, ${b})`:(0,re._)`${u}(${b})`}H.callValidateCode=Wa;const xa=(0,re._)`new RegExp`;function Ha({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,i=s(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,re._)`${s.code==="new RegExp"?xa:(0,La.useFunc)(e,s)}(${r}, ${n})`})}H.usePattern=Ha;function Ba(e){const{gen:t,data:r,keyword:n,it:s}=e,i=t.name("valid");if(s.allErrors){const u=t.let("valid",!0);return o(()=>t.assign(u,!1)),u}return t.var(i,!0),o(()=>t.break()),i;function o(u){const f=t.const("len",(0,re._)`${r}.length`);t.forRange("i",0,f,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:wn.Type.Num},i),t.if((0,re.not)(i),u)})}}H.validateArray=Ba;function Ga(e){const{gen:t,schema:r,keyword:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(f=>(0,wn.alwaysValidSchema)(s,f))&&!s.opts.unevaluated)return;const o=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((f,l)=>{const d=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(o,(0,re._)`${o} || ${u}`),e.mergeValidEvaluated(d,u)||t.if((0,re.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}H.validateUnion=Ga;Object.defineProperty(qe,"__esModule",{value:!0});qe.validateKeywordUsage=qe.validSchemaType=qe.funcKeywordCode=qe.macroKeywordCode=void 0;const $e=B,ot=We,Ka=H,Ja=Xt;function Qa(e,t){const{gen:r,keyword:n,schema:s,parentSchema:i,it:o}=e,u=t.macro.call(o.self,s,i,o),f=Ai(r,n,u);o.opts.validateSchema!==!1&&o.self.validateSchema(u,!0);const l=r.name("valid");e.subschema({schema:u,schemaPath:$e.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:f,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}qe.macroKeywordCode=Qa;function Ya(e,t){var r;const{gen:n,keyword:s,schema:i,parentSchema:o,$data:u,it:f}=e;Xa(f,t);const l=!u&&t.compile?t.compile.call(f.self,i,o,f):t.validate,d=Ai(n,s,l),p=n.let("valid");e.block$data(p,b),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function b(){if(t.errors===!1)O(),t.modifying&&Rs(e),_(()=>e.error());else{const g=t.async?E():P();t.modifying&&Rs(e),_(()=>Za(e,g))}}function E(){const g=n.let("ruleErrs",null);return n.try(()=>O((0,$e._)`await `),$=>n.assign(p,!1).if((0,$e._)`${$} instanceof ${f.ValidationError}`,()=>n.assign(g,(0,$e._)`${$}.errors`),()=>n.throw($))),g}function P(){const g=(0,$e._)`${d}.errors`;return n.assign(g,null),O($e.nil),g}function O(g=t.async?(0,$e._)`await `:$e.nil){const $=f.opts.passContext?ot.default.this:ot.default.self,S=!("compile"in t&&!u||t.schema===!1);n.assign(p,(0,$e._)`${g}${(0,Ka.callValidateCode)(e,d,$,S)}`,t.modifying)}function _(g){var $;n.if((0,$e.not)(($=t.valid)!==null&&$!==void 0?$:p),g)}}qe.funcKeywordCode=Ya;function Rs(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,$e._)`${n.parentData}[${n.parentDataProperty}]`))}function Za(e,t){const{gen:r}=e;r.if((0,$e._)`Array.isArray(${t})`,()=>{r.assign(ot.default.vErrors,(0,$e._)`${ot.default.vErrors} === null ? ${t} : ${ot.default.vErrors}.concat(${t})`).assign(ot.default.errors,(0,$e._)`${ot.default.vErrors}.length`),(0,Ja.extendErrors)(e)},()=>e.error())}function Xa({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Ai(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,$e.stringify)(r)})}function ec(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}qe.validSchemaType=ec;function tc({schema:e,opts:t,self:r,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const o=s.dependencies;if(o!=null&&o.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema&&!s.validateSchema(e[i])){const f=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(f);else throw new Error(f)}}qe.validateKeywordUsage=tc;var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.extendSubschemaMode=Ze.extendSubschemaData=Ze.getSubschema=void 0;const Fe=B,Di=X;function rc(e,{keyword:t,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,Fe._)`${e.schemaPath}${(0,Fe.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,Fe._)`${e.schemaPath}${(0,Fe.getProperty)(t)}${(0,Fe.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Di.escapeFragment)(r)}`}}if(n!==void 0){if(s===void 0||i===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:o,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Ze.getSubschema=rc;function nc(e,t,{dataProp:r,dataPropType:n,data:s,dataTypes:i,propertyName:o}){if(s!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=t;if(r!==void 0){const{errorPath:l,dataPathArr:d,opts:p}=t,b=u.let("data",(0,Fe._)`${t.data}${(0,Fe.getProperty)(r)}`,!0);f(b),e.errorPath=(0,Fe.str)`${l}${(0,Di.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,Fe._)`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(s!==void 0){const l=s instanceof Fe.Name?s:u.let("data",s,!0);f(l),o!==void 0&&(e.propertyName=o)}i&&(e.dataTypes=i);function f(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}Ze.extendSubschemaData=nc;function sc(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(e.compositeRule=n),s!==void 0&&(e.createErrors=s),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Ze.extendSubschemaMode=sc;var me={},Mi=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},Li={exports:{}},Ye=Li.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},s=r.post||function(){};yr(t,n,s,e,"",e)};Ye.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ye.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ye.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ye.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function yr(e,t,r,n,s,i,o,u,f,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,s,i,o,u,f,l);for(var d in n){var p=n[d];if(Array.isArray(p)){if(d in Ye.arrayKeywords)for(var b=0;b<p.length;b++)yr(e,t,r,p[b],s+"/"+d+"/"+b,i,s,d,n,b)}else if(d in Ye.propsKeywords){if(p&&typeof p=="object")for(var E in p)yr(e,t,r,p[E],s+"/"+d+"/"+ic(E),i,s,d,n,E)}else(d in Ye.keywords||e.allKeys&&!(d in Ye.skipKeywords))&&yr(e,t,r,p,s+"/"+d,i,s,d,n)}r(n,s,i,o,u,f,l)}}function ic(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var oc=Li.exports;Object.defineProperty(me,"__esModule",{value:!0});me.getSchemaRefs=me.resolveUrl=me.normalizeId=me._getFullPath=me.getFullPath=me.inlineRef=void 0;const ac=X,cc=Mi,lc=oc,uc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function dc(e,t=!0){return typeof e=="boolean"?!0:t===!0?!an(e):t?Fi(e)<=t:!1}me.inlineRef=dc;const fc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function an(e){for(const t in e){if(fc.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(an)||typeof r=="object"&&an(r))return!0}return!1}function Fi(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!uc.has(r)&&(typeof e[r]=="object"&&(0,ac.eachItem)(e[r],n=>t+=Fi(n)),t===1/0))return 1/0}return t}function qi(e,t="",r){r!==!1&&(t=Rt(t));const n=e.parse(t);return Ui(e,n)}me.getFullPath=qi;function Ui(e,t){return e.serialize(t).split("#")[0]+"#"}me._getFullPath=Ui;const pc=/#\/?$/;function Rt(e){return e?e.replace(pc,""):""}me.normalizeId=Rt;function hc(e,t,r){return r=Rt(r),e.resolve(t,r)}me.resolveUrl=hc;const mc=/^[a-z_][-a-z0-9._]*$/i;function yc(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,s=Rt(e[r]||t),i={"":s},o=qi(n,s,!1),u={},f=new Set;return lc(e,{allKeys:!0},(p,b,E,P)=>{if(P===void 0)return;const O=o+b;let _=i[P];typeof p[r]=="string"&&(_=g.call(this,p[r])),$.call(this,p.$anchor),$.call(this,p.$dynamicAnchor),i[b]=_;function g(S){const I=this.opts.uriResolver.resolve;if(S=Rt(_?I(_,S):S),f.has(S))throw d(S);f.add(S);let D=this.refs[S];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?l(p,D.schema,S):S!==Rt(O)&&(S[0]==="#"?(l(p,u[S],S),u[S]=p):this.refs[S]=O),S}function $(S){if(typeof S=="string"){if(!mc.test(S))throw new Error(`invalid anchor "${S}"`);g.call(this,`#${S}`)}}}),u;function l(p,b,E){if(b!==void 0&&!cc(p,b))throw d(E)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}me.getSchemaRefs=yc;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getData=Ne.KeywordCxt=Ne.validateFunctionCode=void 0;const Vi=kt,ks=er,En=Be,Tr=er,gc=qr,Ht=qe,Kr=Ze,q=B,z=We,$c=me,Ge=X,zt=Xt;function _c(e){if(xi(e)&&(Hi(e),Wi(e))){bc(e);return}zi(e,()=>(0,Vi.topBoolOrEmptySchema)(e))}Ne.validateFunctionCode=_c;function zi({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},i){s.code.es5?e.func(t,(0,q._)`${z.default.data}, ${z.default.valCxt}`,n.$async,()=>{e.code((0,q._)`"use strict"; ${Os(r,s)}`),vc(e,s),e.code(i)}):e.func(t,(0,q._)`${z.default.data}, ${wc(s)}`,n.$async,()=>e.code(Os(r,s)).code(i))}function wc(e){return(0,q._)`{${z.default.instancePath}="", ${z.default.parentData}, ${z.default.parentDataProperty}, ${z.default.rootData}=${z.default.data}${e.dynamicRef?(0,q._)`, ${z.default.dynamicAnchors}={}`:q.nil}}={}`}function vc(e,t){e.if(z.default.valCxt,()=>{e.var(z.default.instancePath,(0,q._)`${z.default.valCxt}.${z.default.instancePath}`),e.var(z.default.parentData,(0,q._)`${z.default.valCxt}.${z.default.parentData}`),e.var(z.default.parentDataProperty,(0,q._)`${z.default.valCxt}.${z.default.parentDataProperty}`),e.var(z.default.rootData,(0,q._)`${z.default.valCxt}.${z.default.rootData}`),t.dynamicRef&&e.var(z.default.dynamicAnchors,(0,q._)`${z.default.valCxt}.${z.default.dynamicAnchors}`)},()=>{e.var(z.default.instancePath,(0,q._)`""`),e.var(z.default.parentData,(0,q._)`undefined`),e.var(z.default.parentDataProperty,(0,q._)`undefined`),e.var(z.default.rootData,z.default.data),t.dynamicRef&&e.var(z.default.dynamicAnchors,(0,q._)`{}`)})}function bc(e){const{schema:t,opts:r,gen:n}=e;zi(e,()=>{r.$comment&&t.$comment&&Gi(e),Rc(e),n.let(z.default.vErrors,null),n.let(z.default.errors,0),r.unevaluated&&Ec(e),Bi(e),Cc(e)})}function Ec(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,q._)`${r}.evaluated`),t.if((0,q._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,q._)`${e.evaluated}.props`,(0,q._)`undefined`)),t.if((0,q._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,q._)`${e.evaluated}.items`,(0,q._)`undefined`))}function Os(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,q._)`/*# sourceURL=${r} */`:q.nil}function Pc(e,t){if(xi(e)&&(Hi(e),Wi(e))){Sc(e,t);return}(0,Vi.boolOrEmptySchema)(e,t)}function Wi({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function xi(e){return typeof e.schema!="boolean"}function Sc(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&Gi(e),kc(e),Oc(e);const i=n.const("_errs",z.default.errors);Bi(e,i),n.var(t,(0,q._)`${i} === ${z.default.errors}`)}function Hi(e){(0,Ge.checkUnknownRules)(e),Tc(e)}function Bi(e,t){if(e.opts.jtd)return Cs(e,[],!1,t);const r=(0,ks.getSchemaTypes)(e.schema),n=(0,ks.coerceAndCheckDataType)(e,r);Cs(e,r,!n,t)}function Tc(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Ge.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Rc(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ge.checkStrictMode)(e,"default is ignored in the schema root")}function kc(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,$c.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Oc(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Gi({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const i=r.$comment;if(s.$comment===!0)e.code((0,q._)`${z.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){const o=(0,q.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,q._)`${z.default.self}.opts.$comment(${i}, ${o}, ${u}.schema)`)}}function Cc(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:i}=e;r.$async?t.if((0,q._)`${z.default.errors} === 0`,()=>t.return(z.default.data),()=>t.throw((0,q._)`new ${s}(${z.default.vErrors})`)):(t.assign((0,q._)`${n}.errors`,z.default.vErrors),i.unevaluated&&Nc(e),t.return((0,q._)`${z.default.errors} === 0`))}function Nc({gen:e,evaluated:t,props:r,items:n}){r instanceof q.Name&&e.assign((0,q._)`${t}.props`,r),n instanceof q.Name&&e.assign((0,q._)`${t}.items`,n)}function Cs(e,t,r,n){const{gen:s,schema:i,data:o,allErrors:u,opts:f,self:l}=e,{RULES:d}=l;if(i.$ref&&(f.ignoreKeywordsWithRef||!(0,Ge.schemaHasRulesButRef)(i,d))){s.block(()=>Qi(e,"$ref",d.all.$ref.definition));return}f.jtd||Ic(e,t),s.block(()=>{for(const b of d.rules)p(b);p(d.post)});function p(b){(0,En.shouldUseGroup)(i,b)&&(b.type?(s.if((0,Tr.checkDataType)(b.type,o,f.strictNumbers)),Ns(e,b),t.length===1&&t[0]===b.type&&r&&(s.else(),(0,Tr.reportTypeError)(e)),s.endIf()):Ns(e,b),u||s.if((0,q._)`${z.default.errors} === ${n||0}`))}}function Ns(e,t){const{gen:r,schema:n,opts:{useDefaults:s}}=e;s&&(0,gc.assignDefaults)(e,t.type),r.block(()=>{for(const i of t.rules)(0,En.shouldUseRule)(n,i)&&Qi(e,i.keyword,i.definition,t.type)})}function Ic(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(jc(e,t),e.opts.allowUnionTypes||Ac(e,t),Dc(e,e.dataTypes))}function jc(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Ki(e.dataTypes,r)||Pn(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Lc(e,t)}}function Ac(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Pn(e,"use allowUnionTypes to allow union type keyword")}function Dc(e,t){const r=e.self.RULES.all;for(const n in r){const s=r[n];if(typeof s=="object"&&(0,En.shouldUseRule)(e.schema,s)){const{type:i}=s.definition;i.length&&!i.some(o=>Mc(t,o))&&Pn(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function Mc(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Ki(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Lc(e,t){const r=[];for(const n of e.dataTypes)Ki(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Pn(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Ge.checkStrictMode)(e,t,e.opts.strictTypes)}class Ji{constructor(t,r,n){if((0,Ht.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ge.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Yi(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ht.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",z.default.errors))}result(t,r,n){this.failResult((0,q.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,q.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,q._)`${r} !== undefined && (${(0,q.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?zt.reportExtraError:zt.reportError)(this,this.def.error,r)}$dataError(){(0,zt.reportError)(this,this.def.$dataError||zt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,zt.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=q.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=q.nil,r=q.nil){if(!this.$data)return;const{gen:n,schemaCode:s,schemaType:i,def:o}=this;n.if((0,q.or)((0,q._)`${s} === undefined`,r)),t!==q.nil&&n.assign(t,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==q.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:s,it:i}=this;return(0,q.or)(o(),u());function o(){if(n.length){if(!(r instanceof q.Name))throw new Error("ajv implementation error");const f=Array.isArray(n)?n:[n];return(0,q._)`${(0,Tr.checkDataTypes)(f,r,i.opts.strictNumbers,Tr.DataType.Wrong)}`}return q.nil}function u(){if(s.validateSchema){const f=t.scopeValue("validate$data",{ref:s.validateSchema});return(0,q._)`!${f}(${r})`}return q.nil}}subschema(t,r){const n=(0,Kr.getSubschema)(this.it,t);(0,Kr.extendSubschemaData)(n,this.it,t),(0,Kr.extendSubschemaMode)(n,t);const s={...this.it,...n,items:void 0,props:void 0};return Pc(s,r),s}mergeEvaluated(t,r){const{it:n,gen:s}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Ge.mergeEvaluated.props(s,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Ge.mergeEvaluated.items(s,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(r,()=>this.mergeEvaluated(t,q.Name)),!0}}Ne.KeywordCxt=Ji;function Qi(e,t,r,n){const s=new Ji(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,Ht.funcKeywordCode)(s,r):"macro"in r?(0,Ht.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,Ht.funcKeywordCode)(s,r)}const Fc=/^\/(?:[^~]|~0|~1)*$/,qc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Yi(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,i;if(e==="")return z.default.rootData;if(e[0]==="/"){if(!Fc.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,i=z.default.rootData}else{const l=qc.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);const d=+l[1];if(s=l[2],s==="#"){if(d>=t)throw new Error(f("property/index",d));return n[t-d]}if(d>t)throw new Error(f("data",d));if(i=r[t-d],!s)return i}let o=i;const u=s.split("/");for(const l of u)l&&(i=(0,q._)`${i}${(0,q.getProperty)((0,Ge.unescapeJsonPointer)(l))}`,o=(0,q._)`${o} && ${i}`);return o;function f(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}Ne.getData=Yi;var tr={};Object.defineProperty(tr,"__esModule",{value:!0});class Uc extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}tr.default=Uc;var rr={};Object.defineProperty(rr,"__esModule",{value:!0});const Jr=me;class Vc extends Error{constructor(t,r,n,s){super(s||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Jr.resolveUrl)(t,r,n),this.missingSchema=(0,Jr.normalizeId)((0,Jr.getFullPath)(t,this.missingRef))}}rr.default=Vc;var ve={};Object.defineProperty(ve,"__esModule",{value:!0});ve.resolveSchema=ve.getCompilingSchema=ve.resolveRef=ve.compileSchema=ve.SchemaEnv=void 0;const ke=B,zc=tr,it=We,Ce=me,Is=X,Wc=Ne;class Ur{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Ce.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}ve.SchemaEnv=Ur;function Sn(e){const t=Zi.call(this,e);if(t)return t;const r=(0,Ce.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,o=new ke.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i});let u;e.$async&&(u=o.scopeValue("Error",{ref:zc.default,code:(0,ke._)`require("ajv/dist/runtime/validation_error").default`}));const f=o.scopeName("validate");e.validateName=f;const l={gen:o,allErrors:this.opts.allErrors,data:it.default.data,parentData:it.default.parentData,parentDataProperty:it.default.parentDataProperty,dataNames:[it.default.data],dataPathArr:[ke.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,ke.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:ke.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ke._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(e),(0,Wc.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);const p=o.toString();d=`${o.scopeRefs(it.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,e));const E=new Function(`${it.default.self}`,`${it.default.scope}`,d)(this,this.scope.get());if(this.scope.value(f,{ref:E}),E.errors=null,E.schema=e.schema,E.schemaEnv=e,e.$async&&(E.$async=!0),this.opts.code.source===!0&&(E.source={validateName:f,validateCode:p,scopeValues:o._values}),this.opts.unevaluated){const{props:P,items:O}=l;E.evaluated={props:P instanceof ke.Name?void 0:P,items:O instanceof ke.Name?void 0:O,dynamicProps:P instanceof ke.Name,dynamicItems:O instanceof ke.Name},E.source&&(E.source.evaluated=(0,ke.stringify)(E.evaluated))}return e.validate=E,e}catch(p){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(e)}}ve.compileSchema=Sn;function xc(e,t,r){var n;r=(0,Ce.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let i=Gc.call(this,e,r);if(i===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;o&&(i=new Ur({schema:o,schemaId:u,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=Hc.call(this,i)}ve.resolveRef=xc;function Hc(e){return(0,Ce.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Sn.call(this,e)}function Zi(e){for(const t of this._compilations)if(Bc(t,e))return t}ve.getCompilingSchema=Zi;function Bc(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Gc(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Vr.call(this,e,t)}function Vr(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Ce._getFullPath)(this.opts.uriResolver,r);let s=(0,Ce.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return Qr.call(this,r,e);const i=(0,Ce.normalizeId)(n),o=this.refs[i]||this.schemas[i];if(typeof o=="string"){const u=Vr.call(this,e,o);return typeof(u==null?void 0:u.schema)!="object"?void 0:Qr.call(this,r,u)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||Sn.call(this,o),i===(0,Ce.normalizeId)(t)){const{schema:u}=o,{schemaId:f}=this.opts,l=u[f];return l&&(s=(0,Ce.resolveUrl)(this.opts.uriResolver,s,l)),new Ur({schema:u,schemaId:f,root:e,baseId:s})}return Qr.call(this,r,o)}}ve.resolveSchema=Vr;const Kc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Qr(e,{baseId:t,schema:r,root:n}){var s;if(((s=e.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(const u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const f=r[(0,Is.unescapeFragment)(u)];if(f===void 0)return;r=f;const l=typeof r=="object"&&r[this.opts.schemaId];!Kc.has(u)&&l&&(t=(0,Ce.resolveUrl)(this.opts.uriResolver,t,l))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Is.schemaHasRulesButRef)(r,this.RULES)){const u=(0,Ce.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=Vr.call(this,n,u)}const{schemaId:o}=this.opts;if(i=i||new Ur({schema:r,schemaId:o,root:n,baseId:t}),i.schema!==i.root.schema)return i}const Jc="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Qc="Meta-schema for $data reference (JSON AnySchema extension proposal)",Yc="object",Zc=["$data"],Xc={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},el=!1,tl={$id:Jc,description:Qc,type:Yc,required:Zc,properties:Xc,additionalProperties:el};var Tn={},cn={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(la,function(r){function n(){for(var h=arguments.length,c=Array(h),y=0;y<h;y++)c[y]=arguments[y];if(c.length>1){c[0]=c[0].slice(0,-1);for(var k=c.length-1,R=1;R<k;++R)c[R]=c[R].slice(1,-1);return c[k]=c[k].slice(1),c.join("")}else return c[0]}function s(h){return"(?:"+h+")"}function i(h){return h===void 0?"undefined":h===null?"null":Object.prototype.toString.call(h).split(" ").pop().split("]").shift().toLowerCase()}function o(h){return h.toUpperCase()}function u(h){return h!=null?h instanceof Array?h:typeof h.length!="number"||h.split||h.setInterval||h.call?[h]:Array.prototype.slice.call(h):[]}function f(h,c){var y=h;if(c)for(var k in c)y[k]=c[k];return y}function l(h){var c="[A-Za-z]",y="[0-9]",k=n(y,"[A-Fa-f]"),R=s(s("%[EFef]"+k+"%"+k+k+"%"+k+k)+"|"+s("%[89A-Fa-f]"+k+"%"+k+k)+"|"+s("%"+k+k)),U="[\\:\\/\\?\\#\\[\\]\\@]",V="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Z=n(U,V),te=h?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ae=h?"[\\uE000-\\uF8FF]":"[]",J=n(c,y,"[\\-\\.\\_\\~]",te);s(c+n(c,y,"[\\+\\-\\.]")+"*"),s(s(R+"|"+n(J,V,"[\\:]"))+"*");var ee=s(s("25[0-5]")+"|"+s("2[0-4]"+y)+"|"+s("1"+y+y)+"|"+s("0?[1-9]"+y)+"|0?0?"+y),ce=s(ee+"\\."+ee+"\\."+ee+"\\."+ee),x=s(k+"{1,4}"),ne=s(s(x+"\\:"+x)+"|"+ce),fe=s(s(x+"\\:")+"{6}"+ne),se=s("\\:\\:"+s(x+"\\:")+"{5}"+ne),Ke=s(s(x)+"?\\:\\:"+s(x+"\\:")+"{4}"+ne),De=s(s(s(x+"\\:")+"{0,1}"+x)+"?\\:\\:"+s(x+"\\:")+"{3}"+ne),Me=s(s(s(x+"\\:")+"{0,2}"+x)+"?\\:\\:"+s(x+"\\:")+"{2}"+ne),vt=s(s(s(x+"\\:")+"{0,3}"+x)+"?\\:\\:"+x+"\\:"+ne),nt=s(s(s(x+"\\:")+"{0,4}"+x)+"?\\:\\:"+ne),Se=s(s(s(x+"\\:")+"{0,5}"+x)+"?\\:\\:"+x),Le=s(s(s(x+"\\:")+"{0,6}"+x)+"?\\:\\:"),st=s([fe,se,Ke,De,Me,vt,nt,Se,Le].join("|")),xe=s(s(J+"|"+R)+"+");s("[vV]"+k+"+\\."+n(J,V,"[\\:]")+"+"),s(s(R+"|"+n(J,V))+"*");var Ut=s(R+"|"+n(J,V,"[\\:\\@]"));return s(s(R+"|"+n(J,V,"[\\@]"))+"+"),s(s(Ut+"|"+n("[\\/\\?]",ae))+"*"),{NOT_SCHEME:new RegExp(n("[^]",c,y,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",J,V),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",J,V),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",J,V),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",J,V),"g"),NOT_QUERY:new RegExp(n("[^\\%]",J,V,"[\\:\\@\\/\\?]",ae),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",J,V,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",J,V),"g"),UNRESERVED:new RegExp(J,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",J,Z),"g"),PCT_ENCODED:new RegExp(R,"g"),IPV4ADDRESS:new RegExp("^("+ce+")$"),IPV6ADDRESS:new RegExp("^\\[?("+st+")"+s(s("\\%25|\\%(?!"+k+"{2})")+"("+xe+")")+"?\\]?$")}}var d=l(!1),p=l(!0),b=function(){function h(c,y){var k=[],R=!0,U=!1,V=void 0;try{for(var Z=c[Symbol.iterator](),te;!(R=(te=Z.next()).done)&&(k.push(te.value),!(y&&k.length===y));R=!0);}catch(ae){U=!0,V=ae}finally{try{!R&&Z.return&&Z.return()}finally{if(U)throw V}}return k}return function(c,y){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return h(c,y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(h){if(Array.isArray(h)){for(var c=0,y=Array(h.length);c<h.length;c++)y[c]=h[c];return y}else return Array.from(h)},P=2147483647,O=36,_=1,g=26,$=38,S=700,I=72,D=128,v="-",C=/^xn--/,A=/[^\0-\x7E]/,W=/[\x2E\u3002\uFF0E\uFF61]/g,G={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ie=O-_,Y=Math.floor,Ee=String.fromCharCode;function de(h){throw new RangeError(G[h])}function Xe(h,c){for(var y=[],k=h.length;k--;)y[k]=c(h[k]);return y}function et(h,c){var y=h.split("@"),k="";y.length>1&&(k=y[0]+"@",h=y[1]),h=h.replace(W,".");var R=h.split("."),U=Xe(R,c).join(".");return k+U}function pt(h){for(var c=[],y=0,k=h.length;y<k;){var R=h.charCodeAt(y++);if(R>=55296&&R<=56319&&y<k){var U=h.charCodeAt(y++);(U&64512)==56320?c.push(((R&1023)<<10)+(U&1023)+65536):(c.push(R),y--)}else c.push(R)}return c}var It=function(c){return String.fromCodePoint.apply(String,E(c))},ht=function(c){return c-48<10?c-22:c-65<26?c-65:c-97<26?c-97:O},M=function(c,y){return c+22+75*(c<26)-((y!=0)<<5)},w=function(c,y,k){var R=0;for(c=k?Y(c/S):c>>1,c+=Y(c/y);c>ie*g>>1;R+=O)c=Y(c/ie);return Y(R+(ie+1)*c/(c+$))},j=function(c){var y=[],k=c.length,R=0,U=D,V=I,Z=c.lastIndexOf(v);Z<0&&(Z=0);for(var te=0;te<Z;++te)c.charCodeAt(te)>=128&&de("not-basic"),y.push(c.charCodeAt(te));for(var ae=Z>0?Z+1:0;ae<k;){for(var J=R,ee=1,ce=O;;ce+=O){ae>=k&&de("invalid-input");var x=ht(c.charCodeAt(ae++));(x>=O||x>Y((P-R)/ee))&&de("overflow"),R+=x*ee;var ne=ce<=V?_:ce>=V+g?g:ce-V;if(x<ne)break;var fe=O-ne;ee>Y(P/fe)&&de("overflow"),ee*=fe}var se=y.length+1;V=w(R-J,se,J==0),Y(R/se)>P-U&&de("overflow"),U+=Y(R/se),R%=se,y.splice(R++,0,U)}return String.fromCodePoint.apply(String,y)},T=function(c){var y=[];c=pt(c);var k=c.length,R=D,U=0,V=I,Z=!0,te=!1,ae=void 0;try{for(var J=c[Symbol.iterator](),ee;!(Z=(ee=J.next()).done);Z=!0){var ce=ee.value;ce<128&&y.push(Ee(ce))}}catch(Vt){te=!0,ae=Vt}finally{try{!Z&&J.return&&J.return()}finally{if(te)throw ae}}var x=y.length,ne=x;for(x&&y.push(v);ne<k;){var fe=P,se=!0,Ke=!1,De=void 0;try{for(var Me=c[Symbol.iterator](),vt;!(se=(vt=Me.next()).done);se=!0){var nt=vt.value;nt>=R&&nt<fe&&(fe=nt)}}catch(Vt){Ke=!0,De=Vt}finally{try{!se&&Me.return&&Me.return()}finally{if(Ke)throw De}}var Se=ne+1;fe-R>Y((P-U)/Se)&&de("overflow"),U+=(fe-R)*Se,R=fe;var Le=!0,st=!1,xe=void 0;try{for(var Ut=c[Symbol.iterator](),hs;!(Le=(hs=Ut.next()).done);Le=!0){var ms=hs.value;if(ms<R&&++U>P&&de("overflow"),ms==R){for(var ir=U,or=O;;or+=O){var ar=or<=V?_:or>=V+g?g:or-V;if(ir<ar)break;var ys=ir-ar,gs=O-ar;y.push(Ee(M(ar+ys%gs,0))),ir=Y(ys/gs)}y.push(Ee(M(ir,0))),V=w(U,Se,ne==x),U=0,++ne}}}catch(Vt){st=!0,xe=Vt}finally{try{!Le&&Ut.return&&Ut.return()}finally{if(st)throw xe}}++U,++R}return y.join("")},a=function(c){return et(c,function(y){return C.test(y)?j(y.slice(4).toLowerCase()):y})},m=function(c){return et(c,function(y){return A.test(y)?"xn--"+T(y):y})},N={version:"2.1.0",ucs2:{decode:pt,encode:It},decode:j,encode:T,toASCII:m,toUnicode:a},L={};function F(h){var c=h.charCodeAt(0),y=void 0;return c<16?y="%0"+c.toString(16).toUpperCase():c<128?y="%"+c.toString(16).toUpperCase():c<2048?y="%"+(c>>6|192).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase():y="%"+(c>>12|224).toString(16).toUpperCase()+"%"+(c>>6&63|128).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase(),y}function K(h){for(var c="",y=0,k=h.length;y<k;){var R=parseInt(h.substr(y+1,2),16);if(R<128)c+=String.fromCharCode(R),y+=3;else if(R>=194&&R<224){if(k-y>=6){var U=parseInt(h.substr(y+4,2),16);c+=String.fromCharCode((R&31)<<6|U&63)}else c+=h.substr(y,6);y+=6}else if(R>=224){if(k-y>=9){var V=parseInt(h.substr(y+4,2),16),Z=parseInt(h.substr(y+7,2),16);c+=String.fromCharCode((R&15)<<12|(V&63)<<6|Z&63)}else c+=h.substr(y,9);y+=9}else c+=h.substr(y,3),y+=3}return c}function Q(h,c){function y(k){var R=K(k);return R.match(c.UNRESERVED)?R:k}return h.scheme&&(h.scheme=String(h.scheme).replace(c.PCT_ENCODED,y).toLowerCase().replace(c.NOT_SCHEME,"")),h.userinfo!==void 0&&(h.userinfo=String(h.userinfo).replace(c.PCT_ENCODED,y).replace(c.NOT_USERINFO,F).replace(c.PCT_ENCODED,o)),h.host!==void 0&&(h.host=String(h.host).replace(c.PCT_ENCODED,y).toLowerCase().replace(c.NOT_HOST,F).replace(c.PCT_ENCODED,o)),h.path!==void 0&&(h.path=String(h.path).replace(c.PCT_ENCODED,y).replace(h.scheme?c.NOT_PATH:c.NOT_PATH_NOSCHEME,F).replace(c.PCT_ENCODED,o)),h.query!==void 0&&(h.query=String(h.query).replace(c.PCT_ENCODED,y).replace(c.NOT_QUERY,F).replace(c.PCT_ENCODED,o)),h.fragment!==void 0&&(h.fragment=String(h.fragment).replace(c.PCT_ENCODED,y).replace(c.NOT_FRAGMENT,F).replace(c.PCT_ENCODED,o)),h}function oe(h){return h.replace(/^0*(.*)/,"$1")||"0"}function Ie(h,c){var y=h.match(c.IPV4ADDRESS)||[],k=b(y,2),R=k[1];return R?R.split(".").map(oe).join("."):h}function mt(h,c){var y=h.match(c.IPV6ADDRESS)||[],k=b(y,3),R=k[1],U=k[2];if(R){for(var V=R.toLowerCase().split("::").reverse(),Z=b(V,2),te=Z[0],ae=Z[1],J=ae?ae.split(":").map(oe):[],ee=te.split(":").map(oe),ce=c.IPV4ADDRESS.test(ee[ee.length-1]),x=ce?7:8,ne=ee.length-x,fe=Array(x),se=0;se<x;++se)fe[se]=J[se]||ee[ne+se]||"";ce&&(fe[x-1]=Ie(fe[x-1],c));var Ke=fe.reduce(function(Se,Le,st){if(!Le||Le==="0"){var xe=Se[Se.length-1];xe&&xe.index+xe.length===st?xe.length++:Se.push({index:st,length:1})}return Se},[]),De=Ke.sort(function(Se,Le){return Le.length-Se.length})[0],Me=void 0;if(De&&De.length>1){var vt=fe.slice(0,De.index),nt=fe.slice(De.index+De.length);Me=vt.join(":")+"::"+nt.join(":")}else Me=fe.join(":");return U&&(Me+="%"+U),Me}else return h}var jt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,At="".match(/(){0}/)[1]===void 0;function be(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y={},k=c.iri!==!1?p:d;c.reference==="suffix"&&(h=(c.scheme?c.scheme+":":"")+"//"+h);var R=h.match(jt);if(R){At?(y.scheme=R[1],y.userinfo=R[3],y.host=R[4],y.port=parseInt(R[5],10),y.path=R[6]||"",y.query=R[7],y.fragment=R[8],isNaN(y.port)&&(y.port=R[5])):(y.scheme=R[1]||void 0,y.userinfo=h.indexOf("@")!==-1?R[3]:void 0,y.host=h.indexOf("//")!==-1?R[4]:void 0,y.port=parseInt(R[5],10),y.path=R[6]||"",y.query=h.indexOf("?")!==-1?R[7]:void 0,y.fragment=h.indexOf("#")!==-1?R[8]:void 0,isNaN(y.port)&&(y.port=h.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?R[4]:void 0)),y.host&&(y.host=mt(Ie(y.host,k),k)),y.scheme===void 0&&y.userinfo===void 0&&y.host===void 0&&y.port===void 0&&!y.path&&y.query===void 0?y.reference="same-document":y.scheme===void 0?y.reference="relative":y.fragment===void 0?y.reference="absolute":y.reference="uri",c.reference&&c.reference!=="suffix"&&c.reference!==y.reference&&(y.error=y.error||"URI is not a "+c.reference+" reference.");var U=L[(c.scheme||y.scheme||"").toLowerCase()];if(!c.unicodeSupport&&(!U||!U.unicodeSupport)){if(y.host&&(c.domainHost||U&&U.domainHost))try{y.host=N.toASCII(y.host.replace(k.PCT_ENCODED,K).toLowerCase())}catch(V){y.error=y.error||"Host's domain name can not be converted to ASCII via punycode: "+V}Q(y,d)}else Q(y,k);U&&U.parse&&U.parse(y,c)}else y.error=y.error||"URI can not be parsed.";return y}function Dt(h,c){var y=c.iri!==!1?p:d,k=[];return h.userinfo!==void 0&&(k.push(h.userinfo),k.push("@")),h.host!==void 0&&k.push(mt(Ie(String(h.host),y),y).replace(y.IPV6ADDRESS,function(R,U,V){return"["+U+(V?"%25"+V:"")+"]"})),(typeof h.port=="number"||typeof h.port=="string")&&(k.push(":"),k.push(String(h.port))),k.length?k.join(""):void 0}var yt=/^\.\.?\//,gt=/^\/\.(\/|$)/,$t=/^\/\.\.(\/|$)/,Mt=/^\/?(?:.|\n)*?(?=\/|$)/;function je(h){for(var c=[];h.length;)if(h.match(yt))h=h.replace(yt,"");else if(h.match(gt))h=h.replace(gt,"/");else if(h.match($t))h=h.replace($t,"/"),c.pop();else if(h==="."||h==="..")h="";else{var y=h.match(Mt);if(y){var k=y[0];h=h.slice(k.length),c.push(k)}else throw new Error("Unexpected dot segment condition")}return c.join("")}function _e(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=c.iri?p:d,k=[],R=L[(c.scheme||h.scheme||"").toLowerCase()];if(R&&R.serialize&&R.serialize(h,c),h.host&&!y.IPV6ADDRESS.test(h.host)){if(c.domainHost||R&&R.domainHost)try{h.host=c.iri?N.toUnicode(h.host):N.toASCII(h.host.replace(y.PCT_ENCODED,K).toLowerCase())}catch(Z){h.error=h.error||"Host's domain name can not be converted to "+(c.iri?"Unicode":"ASCII")+" via punycode: "+Z}}Q(h,y),c.reference!=="suffix"&&h.scheme&&(k.push(h.scheme),k.push(":"));var U=Dt(h,c);if(U!==void 0&&(c.reference!=="suffix"&&k.push("//"),k.push(U),h.path&&h.path.charAt(0)!=="/"&&k.push("/")),h.path!==void 0){var V=h.path;!c.absolutePath&&(!R||!R.absolutePath)&&(V=je(V)),U===void 0&&(V=V.replace(/^\/\//,"/%2F")),k.push(V)}return h.query!==void 0&&(k.push("?"),k.push(h.query)),h.fragment!==void 0&&(k.push("#"),k.push(h.fragment)),k.join("")}function _t(h,c){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=arguments[3],R={};return k||(h=be(_e(h,y),y),c=be(_e(c,y),y)),y=y||{},!y.tolerant&&c.scheme?(R.scheme=c.scheme,R.userinfo=c.userinfo,R.host=c.host,R.port=c.port,R.path=je(c.path||""),R.query=c.query):(c.userinfo!==void 0||c.host!==void 0||c.port!==void 0?(R.userinfo=c.userinfo,R.host=c.host,R.port=c.port,R.path=je(c.path||""),R.query=c.query):(c.path?(c.path.charAt(0)==="/"?R.path=je(c.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?R.path="/"+c.path:h.path?R.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+c.path:R.path=c.path,R.path=je(R.path)),R.query=c.query):(R.path=h.path,c.query!==void 0?R.query=c.query:R.query=h.query),R.userinfo=h.userinfo,R.host=h.host,R.port=h.port),R.scheme=h.scheme),R.fragment=c.fragment,R}function Lt(h,c,y){var k=f({scheme:"null"},y);return _e(_t(be(h,k),be(c,k),k,!0),k)}function tt(h,c){return typeof h=="string"?h=_e(be(h,c),c):i(h)==="object"&&(h=be(_e(h,c),c)),h}function Ft(h,c,y){return typeof h=="string"?h=_e(be(h,y),y):i(h)==="object"&&(h=_e(h,y)),typeof c=="string"?c=_e(be(c,y),y):i(c)==="object"&&(c=_e(c,y)),h===c}function sr(h,c){return h&&h.toString().replace(!c||!c.iri?d.ESCAPE:p.ESCAPE,F)}function Pe(h,c){return h&&h.toString().replace(!c||!c.iri?d.PCT_ENCODED:p.PCT_ENCODED,K)}var rt={scheme:"http",domainHost:!0,parse:function(c,y){return c.host||(c.error=c.error||"HTTP URIs must have a host."),c},serialize:function(c,y){var k=String(c.scheme).toLowerCase()==="https";return(c.port===(k?443:80)||c.port==="")&&(c.port=void 0),c.path||(c.path="/"),c}},os={scheme:"https",domainHost:rt.domainHost,parse:rt.parse,serialize:rt.serialize};function as(h){return typeof h.secure=="boolean"?h.secure:String(h.scheme).toLowerCase()==="wss"}var qt={scheme:"ws",domainHost:!0,parse:function(c,y){var k=c;return k.secure=as(k),k.resourceName=(k.path||"/")+(k.query?"?"+k.query:""),k.path=void 0,k.query=void 0,k},serialize:function(c,y){if((c.port===(as(c)?443:80)||c.port==="")&&(c.port=void 0),typeof c.secure=="boolean"&&(c.scheme=c.secure?"wss":"ws",c.secure=void 0),c.resourceName){var k=c.resourceName.split("?"),R=b(k,2),U=R[0],V=R[1];c.path=U&&U!=="/"?U:void 0,c.query=V,c.resourceName=void 0}return c.fragment=void 0,c}},cs={scheme:"wss",domainHost:qt.domainHost,parse:qt.parse,serialize:qt.serialize},vo={},ls="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ae="[0-9A-Fa-f]",bo=s(s("%[EFef]"+Ae+"%"+Ae+Ae+"%"+Ae+Ae)+"|"+s("%[89A-Fa-f]"+Ae+"%"+Ae+Ae)+"|"+s("%"+Ae+Ae)),Eo="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Po="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",So=n(Po,'[\\"\\\\]'),To="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ro=new RegExp(ls,"g"),wt=new RegExp(bo,"g"),ko=new RegExp(n("[^]",Eo,"[\\.]",'[\\"]',So),"g"),us=new RegExp(n("[^]",ls,To),"g"),Oo=us;function Wr(h){var c=K(h);return c.match(Ro)?c:h}var ds={scheme:"mailto",parse:function(c,y){var k=c,R=k.to=k.path?k.path.split(","):[];if(k.path=void 0,k.query){for(var U=!1,V={},Z=k.query.split("&"),te=0,ae=Z.length;te<ae;++te){var J=Z[te].split("=");switch(J[0]){case"to":for(var ee=J[1].split(","),ce=0,x=ee.length;ce<x;++ce)R.push(ee[ce]);break;case"subject":k.subject=Pe(J[1],y);break;case"body":k.body=Pe(J[1],y);break;default:U=!0,V[Pe(J[0],y)]=Pe(J[1],y);break}}U&&(k.headers=V)}k.query=void 0;for(var ne=0,fe=R.length;ne<fe;++ne){var se=R[ne].split("@");if(se[0]=Pe(se[0]),y.unicodeSupport)se[1]=Pe(se[1],y).toLowerCase();else try{se[1]=N.toASCII(Pe(se[1],y).toLowerCase())}catch(Ke){k.error=k.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ke}R[ne]=se.join("@")}return k},serialize:function(c,y){var k=c,R=u(c.to);if(R){for(var U=0,V=R.length;U<V;++U){var Z=String(R[U]),te=Z.lastIndexOf("@"),ae=Z.slice(0,te).replace(wt,Wr).replace(wt,o).replace(ko,F),J=Z.slice(te+1);try{J=y.iri?N.toUnicode(J):N.toASCII(Pe(J,y).toLowerCase())}catch(ne){k.error=k.error||"Email address's domain name can not be converted to "+(y.iri?"Unicode":"ASCII")+" via punycode: "+ne}R[U]=ae+"@"+J}k.path=R.join(",")}var ee=c.headers=c.headers||{};c.subject&&(ee.subject=c.subject),c.body&&(ee.body=c.body);var ce=[];for(var x in ee)ee[x]!==vo[x]&&ce.push(x.replace(wt,Wr).replace(wt,o).replace(us,F)+"="+ee[x].replace(wt,Wr).replace(wt,o).replace(Oo,F));return ce.length&&(k.query=ce.join("&")),k}},Co=/^([^\:]+)\:(.*)/,fs={scheme:"urn",parse:function(c,y){var k=c.path&&c.path.match(Co),R=c;if(k){var U=y.scheme||R.scheme||"urn",V=k[1].toLowerCase(),Z=k[2],te=U+":"+(y.nid||V),ae=L[te];R.nid=V,R.nss=Z,R.path=void 0,ae&&(R=ae.parse(R,y))}else R.error=R.error||"URN can not be parsed.";return R},serialize:function(c,y){var k=y.scheme||c.scheme||"urn",R=c.nid,U=k+":"+(y.nid||R),V=L[U];V&&(c=V.serialize(c,y));var Z=c,te=c.nss;return Z.path=(R||y.nid)+":"+te,Z}},No=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ps={scheme:"urn:uuid",parse:function(c,y){var k=c;return k.uuid=k.nss,k.nss=void 0,!y.tolerant&&(!k.uuid||!k.uuid.match(No))&&(k.error=k.error||"UUID is not valid."),k},serialize:function(c,y){var k=c;return k.nss=(c.uuid||"").toLowerCase(),k}};L[rt.scheme]=rt,L[os.scheme]=os,L[qt.scheme]=qt,L[cs.scheme]=cs,L[ds.scheme]=ds,L[fs.scheme]=fs,L[ps.scheme]=ps,r.SCHEMES=L,r.pctEncChar=F,r.pctDecChars=K,r.parse=be,r.removeDotSegments=je,r.serialize=_e,r.resolveComponents=_t,r.resolve=Lt,r.normalize=tt,r.equal=Ft,r.escapeComponent=sr,r.unescapeComponent=Pe,Object.defineProperty(r,"__esModule",{value:!0})})})(cn,cn.exports);var rl=cn.exports;Object.defineProperty(Tn,"__esModule",{value:!0});const Xi=rl;Xi.code='require("ajv/dist/runtime/uri").default';Tn.default=Xi;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Ne;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=B;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=tr,s=rr,i=ut,o=ve,u=B,f=me,l=er,d=X,p=tl,b=Tn,E=(M,w)=>new RegExp(M,w);E.code="new RegExp";const P=["removeAdditional","useDefaults","coerceTypes"],O=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={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."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},$=200;function S(M){var w,j,T,a,m,N,L,F,K,Q,oe,Ie,mt,jt,At,be,Dt,yt,gt,$t,Mt,je,_e,_t,Lt;const tt=M.strict,Ft=(w=M.code)===null||w===void 0?void 0:w.optimize,sr=Ft===!0||Ft===void 0?1:Ft||0,Pe=(T=(j=M.code)===null||j===void 0?void 0:j.regExp)!==null&&T!==void 0?T:E,rt=(a=M.uriResolver)!==null&&a!==void 0?a:b.default;return{strictSchema:(N=(m=M.strictSchema)!==null&&m!==void 0?m:tt)!==null&&N!==void 0?N:!0,strictNumbers:(F=(L=M.strictNumbers)!==null&&L!==void 0?L:tt)!==null&&F!==void 0?F:!0,strictTypes:(Q=(K=M.strictTypes)!==null&&K!==void 0?K:tt)!==null&&Q!==void 0?Q:"log",strictTuples:(Ie=(oe=M.strictTuples)!==null&&oe!==void 0?oe:tt)!==null&&Ie!==void 0?Ie:"log",strictRequired:(jt=(mt=M.strictRequired)!==null&&mt!==void 0?mt:tt)!==null&&jt!==void 0?jt:!1,code:M.code?{...M.code,optimize:sr,regExp:Pe}:{optimize:sr,regExp:Pe},loopRequired:(At=M.loopRequired)!==null&&At!==void 0?At:$,loopEnum:(be=M.loopEnum)!==null&&be!==void 0?be:$,meta:(Dt=M.meta)!==null&&Dt!==void 0?Dt:!0,messages:(yt=M.messages)!==null&&yt!==void 0?yt:!0,inlineRefs:(gt=M.inlineRefs)!==null&&gt!==void 0?gt:!0,schemaId:($t=M.schemaId)!==null&&$t!==void 0?$t:"$id",addUsedSchema:(Mt=M.addUsedSchema)!==null&&Mt!==void 0?Mt:!0,validateSchema:(je=M.validateSchema)!==null&&je!==void 0?je:!0,validateFormats:(_e=M.validateFormats)!==null&&_e!==void 0?_e:!0,unicodeRegExp:(_t=M.unicodeRegExp)!==null&&_t!==void 0?_t:!0,int32range:(Lt=M.int32range)!==null&&Lt!==void 0?Lt:!0,uriResolver:rt}}class I{constructor(w={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,w=this.opts={...w,...S(w)};const{es5:j,lines:T}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:O,es5:j,lines:T}),this.logger=Y(w.logger);const a=w.validateFormats;w.validateFormats=!1,this.RULES=(0,i.getRules)(),D.call(this,_,w,"NOT SUPPORTED"),D.call(this,g,w,"DEPRECATED","warn"),this._metaOpts=G.call(this),w.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),w.keywords&&W.call(this,w.keywords),typeof w.meta=="object"&&this.addMetaSchema(w.meta),C.call(this),w.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:w,meta:j,schemaId:T}=this.opts;let a=p;T==="id"&&(a={...p},a.id=a.$id,delete a.$id),j&&w&&this.addMetaSchema(a,a[T],!1)}defaultMeta(){const{meta:w,schemaId:j}=this.opts;return this.opts.defaultMeta=typeof w=="object"?w[j]||w:void 0}validate(w,j){let T;if(typeof w=="string"){if(T=this.getSchema(w),!T)throw new Error(`no schema with key or ref "${w}"`)}else T=this.compile(w);const a=T(j);return"$async"in T||(this.errors=T.errors),a}compile(w,j){const T=this._addSchema(w,j);return T.validate||this._compileSchemaEnv(T)}compileAsync(w,j){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return a.call(this,w,j);async function a(Q,oe){await m.call(this,Q.$schema);const Ie=this._addSchema(Q,oe);return Ie.validate||N.call(this,Ie)}async function m(Q){Q&&!this.getSchema(Q)&&await a.call(this,{$ref:Q},!0)}async function N(Q){try{return this._compileSchemaEnv(Q)}catch(oe){if(!(oe instanceof s.default))throw oe;return L.call(this,oe),await F.call(this,oe.missingSchema),N.call(this,Q)}}function L({missingSchema:Q,missingRef:oe}){if(this.refs[Q])throw new Error(`AnySchema ${Q} is loaded but ${oe} cannot be resolved`)}async function F(Q){const oe=await K.call(this,Q);this.refs[Q]||await m.call(this,oe.$schema),this.refs[Q]||this.addSchema(oe,Q,j)}async function K(Q){const oe=this._loading[Q];if(oe)return oe;try{return await(this._loading[Q]=T(Q))}finally{delete this._loading[Q]}}}addSchema(w,j,T,a=this.opts.validateSchema){if(Array.isArray(w)){for(const N of w)this.addSchema(N,void 0,T,a);return this}let m;if(typeof w=="object"){const{schemaId:N}=this.opts;if(m=w[N],m!==void 0&&typeof m!="string")throw new Error(`schema ${N} must be string`)}return j=(0,f.normalizeId)(j||m),this._checkUnique(j),this.schemas[j]=this._addSchema(w,T,j,a,!0),this}addMetaSchema(w,j,T=this.opts.validateSchema){return this.addSchema(w,j,!0,T),this}validateSchema(w,j){if(typeof w=="boolean")return!0;let T;if(T=w.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const a=this.validate(T,w);if(!a&&j){const m="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(m);else throw new Error(m)}return a}getSchema(w){let j;for(;typeof(j=v.call(this,w))=="string";)w=j;if(j===void 0){const{schemaId:T}=this.opts,a=new o.SchemaEnv({schema:{},schemaId:T});if(j=o.resolveSchema.call(this,a,w),!j)return;this.refs[w]=j}return j.validate||this._compileSchemaEnv(j)}removeSchema(w){if(w instanceof RegExp)return this._removeAllSchemas(this.schemas,w),this._removeAllSchemas(this.refs,w),this;switch(typeof w){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const j=v.call(this,w);return typeof j=="object"&&this._cache.delete(j.schema),delete this.schemas[w],delete this.refs[w],this}case"object":{const j=w;this._cache.delete(j);let T=w[this.opts.schemaId];return T&&(T=(0,f.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(w){for(const j of w)this.addKeyword(j);return this}addKeyword(w,j){let T;if(typeof w=="string")T=w,typeof j=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),j.keyword=T);else if(typeof w=="object"&&j===void 0){if(j=w,T=j.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(de.call(this,T,j),!j)return(0,d.eachItem)(T,m=>Xe.call(this,m)),this;pt.call(this,j);const a={...j,type:(0,l.getJSONTypes)(j.type),schemaType:(0,l.getJSONTypes)(j.schemaType)};return(0,d.eachItem)(T,a.type.length===0?m=>Xe.call(this,m,a):m=>a.type.forEach(N=>Xe.call(this,m,a,N))),this}getKeyword(w){const j=this.RULES.all[w];return typeof j=="object"?j.definition:!!j}removeKeyword(w){const{RULES:j}=this;delete j.keywords[w],delete j.all[w];for(const T of j.rules){const a=T.rules.findIndex(m=>m.keyword===w);a>=0&&T.rules.splice(a,1)}return this}addFormat(w,j){return typeof j=="string"&&(j=new RegExp(j)),this.formats[w]=j,this}errorsText(w=this.errors,{separator:j=", ",dataVar:T="data"}={}){return!w||w.length===0?"No errors":w.map(a=>`${T}${a.instancePath} ${a.message}`).reduce((a,m)=>a+j+m)}$dataMetaSchema(w,j){const T=this.RULES.all;w=JSON.parse(JSON.stringify(w));for(const a of j){const m=a.split("/").slice(1);let N=w;for(const L of m)N=N[L];for(const L in T){const F=T[L];if(typeof F!="object")continue;const{$data:K}=F.definition,Q=N[L];K&&Q&&(N[L]=ht(Q))}}return w}_removeAllSchemas(w,j){for(const T in w){const a=w[T];(!j||j.test(T))&&(typeof a=="string"?delete w[T]:a&&!a.meta&&(this._cache.delete(a.schema),delete w[T]))}}_addSchema(w,j,T,a=this.opts.validateSchema,m=this.opts.addUsedSchema){let N;const{schemaId:L}=this.opts;if(typeof w=="object")N=w[L];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof w!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get(w);if(F!==void 0)return F;T=(0,f.normalizeId)(N||T);const K=f.getSchemaRefs.call(this,w,T);return F=new o.SchemaEnv({schema:w,schemaId:L,meta:j,baseId:T,localRefs:K}),this._cache.set(F.schema,F),m&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=F),a&&this.validateSchema(w,!0),F}_checkUnique(w){if(this.schemas[w]||this.refs[w])throw new Error(`schema with key or id "${w}" already exists`)}_compileSchemaEnv(w){if(w.meta?this._compileMetaSchema(w):o.compileSchema.call(this,w),!w.validate)throw new Error("ajv implementation error");return w.validate}_compileMetaSchema(w){const j=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,w)}finally{this.opts=j}}}e.default=I,I.ValidationError=n.default,I.MissingRefError=s.default;function D(M,w,j,T="error"){for(const a in M){const m=a;m in w&&this.logger[T](`${j}: option ${a}. ${M[m]}`)}}function v(M){return M=(0,f.normalizeId)(M),this.schemas[M]||this.refs[M]}function C(){const M=this.opts.schemas;if(M)if(Array.isArray(M))this.addSchema(M);else for(const w in M)this.addSchema(M[w],w)}function A(){for(const M in this.opts.formats){const w=this.opts.formats[M];w&&this.addFormat(M,w)}}function W(M){if(Array.isArray(M)){this.addVocabulary(M);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const w in M){const j=M[w];j.keyword||(j.keyword=w),this.addKeyword(j)}}function G(){const M={...this.opts};for(const w of P)delete M[w];return M}const ie={log(){},warn(){},error(){}};function Y(M){if(M===!1)return ie;if(M===void 0)return console;if(M.log&&M.warn&&M.error)return M;throw new Error("logger must implement log, warn and error methods")}const Ee=/^[a-z_$][a-z0-9_$:-]*$/i;function de(M,w){const{RULES:j}=this;if((0,d.eachItem)(M,T=>{if(j.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!Ee.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!w&&w.$data&&!("code"in w||"validate"in w))throw new Error('$data keyword must have "code" or "validate" function')}function Xe(M,w,j){var T;const a=w==null?void 0:w.post;if(j&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:m}=this;let N=a?m.post:m.rules.find(({type:F})=>F===j);if(N||(N={type:j,rules:[]},m.rules.push(N)),m.keywords[M]=!0,!w)return;const L={keyword:M,definition:{...w,type:(0,l.getJSONTypes)(w.type),schemaType:(0,l.getJSONTypes)(w.schemaType)}};w.before?et.call(this,N,L,w.before):N.rules.push(L),m.all[M]=L,(T=w.implements)===null||T===void 0||T.forEach(F=>this.addKeyword(F))}function et(M,w,j){const T=M.rules.findIndex(a=>a.keyword===j);T>=0?M.rules.splice(T,0,w):(M.rules.push(w),this.logger.warn(`rule ${j} is not defined`))}function pt(M){let{metaSchema:w}=M;w!==void 0&&(M.$data&&this.opts.$data&&(w=ht(w)),M.validateSchema=this.compile(w,!0))}const It={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ht(M){return{anyOf:[M,It]}}})(ki);var Rn={},kn={},On={};Object.defineProperty(On,"__esModule",{value:!0});const nl={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};On.default=nl;var dt={};Object.defineProperty(dt,"__esModule",{value:!0});dt.callRef=dt.getValidate=void 0;const sl=rr,js=H,we=B,Et=We,As=ve,cr=X,il={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:s,schemaEnv:i,validateName:o,opts:u,self:f}=n,{root:l}=i;if((r==="#"||r==="#/")&&s===l.baseId)return p();const d=As.resolveRef.call(f,l,s,r);if(d===void 0)throw new sl.default(n.opts.uriResolver,s,r);if(d instanceof As.SchemaEnv)return b(d);return E(d);function p(){if(i===l)return gr(e,o,i,i.$async);const P=t.scopeValue("root",{ref:l});return gr(e,(0,we._)`${P}.validate`,l,l.$async)}function b(P){const O=eo(e,P);gr(e,O,P,P.$async)}function E(P){const O=t.scopeValue("schema",u.code.source===!0?{ref:P,code:(0,we.stringify)(P)}:{ref:P}),_=t.name("valid"),g=e.subschema({schema:P,dataTypes:[],schemaPath:we.nil,topSchemaRef:O,errSchemaPath:r},_);e.mergeEvaluated(g),e.ok(_)}}};function eo(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,we._)`${r.scopeValue("wrapper",{ref:t})}.validate`}dt.getValidate=eo;function gr(e,t,r,n){const{gen:s,it:i}=e,{allErrors:o,schemaEnv:u,opts:f}=i,l=f.passContext?Et.default.this:we.nil;n?d():p();function d(){if(!u.$async)throw new Error("async schema referenced by sync schema");const P=s.let("valid");s.try(()=>{s.code((0,we._)`await ${(0,js.callValidateCode)(e,t,l)}`),E(t),o||s.assign(P,!0)},O=>{s.if((0,we._)`!(${O} instanceof ${i.ValidationError})`,()=>s.throw(O)),b(O),o||s.assign(P,!1)}),e.ok(P)}function p(){e.result((0,js.callValidateCode)(e,t,l),()=>E(t),()=>b(t))}function b(P){const O=(0,we._)`${P}.errors`;s.assign(Et.default.vErrors,(0,we._)`${Et.default.vErrors} === null ? ${O} : ${Et.default.vErrors}.concat(${O})`),s.assign(Et.default.errors,(0,we._)`${Et.default.vErrors}.length`)}function E(P){var O;if(!i.opts.unevaluated)return;const _=(O=r==null?void 0:r.validate)===null||O===void 0?void 0:O.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=cr.mergeEvaluated.props(s,_.props,i.props));else{const g=s.var("props",(0,we._)`${P}.evaluated.props`);i.props=cr.mergeEvaluated.props(s,g,i.props,we.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=cr.mergeEvaluated.items(s,_.items,i.items));else{const g=s.var("items",(0,we._)`${P}.evaluated.items`);i.items=cr.mergeEvaluated.items(s,g,i.items,we.Name)}}}dt.callRef=gr;dt.default=il;Object.defineProperty(kn,"__esModule",{value:!0});const ol=On,al=dt,cl=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",ol.default,al.default];kn.default=cl;var Cn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0});const Rr=B,Qe=Rr.operators,kr={maximum:{okStr:"<=",ok:Qe.LTE,fail:Qe.GT},minimum:{okStr:">=",ok:Qe.GTE,fail:Qe.LT},exclusiveMaximum:{okStr:"<",ok:Qe.LT,fail:Qe.GTE},exclusiveMinimum:{okStr:">",ok:Qe.GT,fail:Qe.LTE}},ll={message:({keyword:e,schemaCode:t})=>(0,Rr.str)`must be ${kr[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Rr._)`{comparison: ${kr[e].okStr}, limit: ${t}}`},ul={keyword:Object.keys(kr),type:"number",schemaType:"number",$data:!0,error:ll,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Rr._)`${r} ${kr[t].fail} ${n} || isNaN(${r})`)}};Nn.default=ul;var In={};Object.defineProperty(In,"__esModule",{value:!0});const Bt=B,dl={message:({schemaCode:e})=>(0,Bt.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Bt._)`{multipleOf: ${e}}`},fl={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:dl,code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,i=s.opts.multipleOfPrecision,o=t.let("res"),u=i?(0,Bt._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}`:(0,Bt._)`${o} !== parseInt(${o})`;e.fail$data((0,Bt._)`(${n} === 0 || (${o} = ${r}/${n}, ${u}))`)}};In.default=fl;var jn={},An={};Object.defineProperty(An,"__esModule",{value:!0});function to(e){const t=e.length;let r=0,n=0,s;for(;n<t;)r++,s=e.charCodeAt(n++),s>=55296&&s<=56319&&n<t&&(s=e.charCodeAt(n),(s&64512)===56320&&n++);return r}An.default=to;to.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(jn,"__esModule",{value:!0});const at=B,pl=X,hl=An,ml={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,at.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,at._)`{limit: ${e}}`},yl={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:ml,code(e){const{keyword:t,data:r,schemaCode:n,it:s}=e,i=t==="maxLength"?at.operators.GT:at.operators.LT,o=s.opts.unicode===!1?(0,at._)`${r}.length`:(0,at._)`${(0,pl.useFunc)(e.gen,hl.default)}(${r})`;e.fail$data((0,at._)`${o} ${i} ${n}`)}};jn.default=yl;var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});const gl=H,Or=B,$l={message:({schemaCode:e})=>(0,Or.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Or._)`{pattern: ${e}}`},_l={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:$l,code(e){const{data:t,$data:r,schema:n,schemaCode:s,it:i}=e,o=i.opts.unicodeRegExp?"u":"",u=r?(0,Or._)`(new RegExp(${s}, ${o}))`:(0,gl.usePattern)(e,n);e.fail$data((0,Or._)`!${u}.test(${t})`)}};Dn.default=_l;var Mn={};Object.defineProperty(Mn,"__esModule",{value:!0});const Gt=B,wl={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Gt.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Gt._)`{limit: ${e}}`},vl={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:wl,code(e){const{keyword:t,data:r,schemaCode:n}=e,s=t==="maxProperties"?Gt.operators.GT:Gt.operators.LT;e.fail$data((0,Gt._)`Object.keys(${r}).length ${s} ${n}`)}};Mn.default=vl;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});const Wt=H,Kt=B,bl=X,El={message:({params:{missingProperty:e}})=>(0,Kt.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Kt._)`{missingProperty: ${e}}`},Pl={keyword:"required",type:"object",schemaType:"array",$data:!0,error:El,code(e){const{gen:t,schema:r,schemaCode:n,data:s,$data:i,it:o}=e,{opts:u}=o;if(!i&&r.length===0)return;const f=r.length>=u.loopRequired;if(o.allErrors?l():d(),u.strictRequired){const E=e.parentSchema.properties,{definedProperties:P}=e.it;for(const O of r)if((E==null?void 0:E[O])===void 0&&!P.has(O)){const _=o.schemaEnv.baseId+o.errSchemaPath,g=`required property "${O}" is not defined at "${_}" (strictRequired)`;(0,bl.checkStrictMode)(o,g,o.opts.strictRequired)}}function l(){if(f||i)e.block$data(Kt.nil,p);else for(const E of r)(0,Wt.checkReportMissingProp)(e,E)}function d(){const E=t.let("missing");if(f||i){const P=t.let("valid",!0);e.block$data(P,()=>b(E,P)),e.ok(P)}else t.if((0,Wt.checkMissingProp)(e,r,E)),(0,Wt.reportMissingProp)(e,E),t.else()}function p(){t.forOf("prop",n,E=>{e.setParams({missingProperty:E}),t.if((0,Wt.noPropertyInData)(t,s,E,u.ownProperties),()=>e.error())})}function b(E,P){e.setParams({missingProperty:E}),t.forOf(E,n,()=>{t.assign(P,(0,Wt.propertyInData)(t,s,E,u.ownProperties)),t.if((0,Kt.not)(P),()=>{e.error(),t.break()})},Kt.nil)}}};Ln.default=Pl;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});const Jt=B,Sl={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Jt.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Jt._)`{limit: ${e}}`},Tl={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Sl,code(e){const{keyword:t,data:r,schemaCode:n}=e,s=t==="maxItems"?Jt.operators.GT:Jt.operators.LT;e.fail$data((0,Jt._)`${r}.length ${s} ${n}`)}};Fn.default=Tl;var qn={},nr={};Object.defineProperty(nr,"__esModule",{value:!0});const ro=Mi;ro.code='require("ajv/dist/runtime/equal").default';nr.default=ro;Object.defineProperty(qn,"__esModule",{value:!0});const Yr=er,he=B,Rl=X,kl=nr,Ol={message:({params:{i:e,j:t}})=>(0,he.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,he._)`{i: ${e}, j: ${t}}`},Cl={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Ol,code(e){const{gen:t,data:r,$data:n,schema:s,parentSchema:i,schemaCode:o,it:u}=e;if(!n&&!s)return;const f=t.let("valid"),l=i.items?(0,Yr.getSchemaTypes)(i.items):[];e.block$data(f,d,(0,he._)`${o} === false`),e.ok(f);function d(){const P=t.let("i",(0,he._)`${r}.length`),O=t.let("j");e.setParams({i:P,j:O}),t.assign(f,!0),t.if((0,he._)`${P} > 1`,()=>(p()?b:E)(P,O))}function p(){return l.length>0&&!l.some(P=>P==="object"||P==="array")}function b(P,O){const _=t.name("item"),g=(0,Yr.checkDataTypes)(l,_,u.opts.strictNumbers,Yr.DataType.Wrong),$=t.const("indices",(0,he._)`{}`);t.for((0,he._)`;${P}--;`,()=>{t.let(_,(0,he._)`${r}[${P}]`),t.if(g,(0,he._)`continue`),l.length>1&&t.if((0,he._)`typeof ${_} == "string"`,(0,he._)`${_} += "_"`),t.if((0,he._)`typeof ${$}[${_}] == "number"`,()=>{t.assign(O,(0,he._)`${$}[${_}]`),e.error(),t.assign(f,!1).break()}).code((0,he._)`${$}[${_}] = ${P}`)})}function E(P,O){const _=(0,Rl.useFunc)(t,kl.default),g=t.name("outer");t.label(g).for((0,he._)`;${P}--;`,()=>t.for((0,he._)`${O} = ${P}; ${O}--;`,()=>t.if((0,he._)`${_}(${r}[${P}], ${r}[${O}])`,()=>{e.error(),t.assign(f,!1).break(g)})))}}};qn.default=Cl;var Un={};Object.defineProperty(Un,"__esModule",{value:!0});const ln=B,Nl=X,Il=nr,jl={message:"must be equal to constant",params:({schemaCode:e})=>(0,ln._)`{allowedValue: ${e}}`},Al={keyword:"const",$data:!0,error:jl,code(e){const{gen:t,data:r,$data:n,schemaCode:s,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,ln._)`!${(0,Nl.useFunc)(t,Il.default)}(${r}, ${s})`):e.fail((0,ln._)`${i} !== ${r}`)}};Un.default=Al;var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});const xt=B,Dl=X,Ml=nr,Ll={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,xt._)`{allowedValues: ${e}}`},Fl={keyword:"enum",schemaType:"array",$data:!0,error:Ll,code(e){const{gen:t,data:r,$data:n,schema:s,schemaCode:i,it:o}=e;if(!n&&s.length===0)throw new Error("enum must have non-empty array");const u=s.length>=o.opts.loopEnum;let f;const l=()=>f??(f=(0,Dl.useFunc)(t,Ml.default));let d;if(u||n)d=t.let("valid"),e.block$data(d,p);else{if(!Array.isArray(s))throw new Error("ajv implementation error");const E=t.const("vSchema",i);d=(0,xt.or)(...s.map((P,O)=>b(E,O)))}e.pass(d);function p(){t.assign(d,!1),t.forOf("v",i,E=>t.if((0,xt._)`${l()}(${r}, ${E})`,()=>t.assign(d,!0).break()))}function b(E,P){const O=s[P];return typeof O=="object"&&O!==null?(0,xt._)`${l()}(${r}, ${E}[${P}])`:(0,xt._)`${r} === ${O}`}}};Vn.default=Fl;Object.defineProperty(Cn,"__esModule",{value:!0});const ql=Nn,Ul=In,Vl=jn,zl=Dn,Wl=Mn,xl=Ln,Hl=Fn,Bl=qn,Gl=Un,Kl=Vn,Jl=[ql.default,Ul.default,Vl.default,zl.default,Wl.default,xl.default,Hl.default,Bl.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Gl.default,Kl.default];Cn.default=Jl;var zn={},Ct={};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateAdditionalItems=void 0;const ct=B,un=X,Ql={message:({params:{len:e}})=>(0,ct.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ct._)`{limit: ${e}}`},Yl={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ql,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,un.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}no(e,n)}};function no(e,t){const{gen:r,schema:n,data:s,keyword:i,it:o}=e;o.items=!0;const u=r.const("len",(0,ct._)`${s}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,ct._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,un.alwaysValidSchema)(o,n)){const l=r.var("valid",(0,ct._)`${u} <= ${t.length}`);r.if((0,ct.not)(l),()=>f(l)),e.ok(l)}function f(l){r.forRange("i",t.length,u,d=>{e.subschema({keyword:i,dataProp:d,dataPropType:un.Type.Num},l),o.allErrors||r.if((0,ct.not)(l),()=>r.break())})}}Ct.validateAdditionalItems=no;Ct.default=Yl;var Wn={},Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.validateTuple=void 0;const Ds=B,$r=X,Zl=H,Xl={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return so(e,"additionalItems",t);r.items=!0,!(0,$r.alwaysValidSchema)(r,t)&&e.ok((0,Zl.validateArray)(e))}};function so(e,t,r=e.schema){const{gen:n,parentSchema:s,data:i,keyword:o,it:u}=e;d(s),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=$r.mergeEvaluated.items(n,r.length,u.items));const f=n.name("valid"),l=n.const("len",(0,Ds._)`${i}.length`);r.forEach((p,b)=>{(0,$r.alwaysValidSchema)(u,p)||(n.if((0,Ds._)`${l} > ${b}`,()=>e.subschema({keyword:o,schemaProp:b,dataProp:b},f)),e.ok(f))});function d(p){const{opts:b,errSchemaPath:E}=u,P=r.length,O=P===p.minItems&&(P===p.maxItems||p[t]===!1);if(b.strictTuples&&!O){const _=`"${o}" is ${P}-tuple, but minItems or maxItems/${t} are not specified or different at path "${E}"`;(0,$r.checkStrictMode)(u,_,b.strictTuples)}}}Nt.validateTuple=so;Nt.default=Xl;Object.defineProperty(Wn,"__esModule",{value:!0});const eu=Nt,tu={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,eu.validateTuple)(e,"items")};Wn.default=tu;var xn={};Object.defineProperty(xn,"__esModule",{value:!0});const Ms=B,ru=X,nu=H,su=Ct,iu={message:({params:{len:e}})=>(0,Ms.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ms._)`{limit: ${e}}`},ou={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:iu,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,!(0,ru.alwaysValidSchema)(n,t)&&(s?(0,su.validateAdditionalItems)(e,s):e.ok((0,nu.validateArray)(e)))}};xn.default=ou;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const Re=B,lr=X,au={message:({params:{min:e,max:t}})=>t===void 0?(0,Re.str)`must contain at least ${e} valid item(s)`:(0,Re.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Re._)`{minContains: ${e}}`:(0,Re._)`{minContains: ${e}, maxContains: ${t}}`},cu={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:au,code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;let o,u;const{minContains:f,maxContains:l}=n;i.opts.next?(o=f===void 0?1:f,u=l):o=1;const d=t.const("len",(0,Re._)`${s}.length`);if(e.setParams({min:o,max:u}),u===void 0&&o===0){(0,lr.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&o>u){(0,lr.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,lr.alwaysValidSchema)(i,r)){let O=(0,Re._)`${d} >= ${o}`;u!==void 0&&(O=(0,Re._)`${O} && ${d} <= ${u}`),e.pass(O);return}i.items=!0;const p=t.name("valid");u===void 0&&o===1?E(p,()=>t.if(p,()=>t.break())):o===0?(t.let(p,!0),u!==void 0&&t.if((0,Re._)`${s}.length > 0`,b)):(t.let(p,!1),b()),e.result(p,()=>e.reset());function b(){const O=t.name("_valid"),_=t.let("count",0);E(O,()=>t.if(O,()=>P(_)))}function E(O,_){t.forRange("i",0,d,g=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:lr.Type.Num,compositeRule:!0},O),_()})}function P(O){t.code((0,Re._)`${O}++`),u===void 0?t.if((0,Re._)`${O} >= ${o}`,()=>t.assign(p,!0).break()):(t.if((0,Re._)`${O} > ${u}`,()=>t.assign(p,!1).break()),o===1?t.assign(p,!0):t.if((0,Re._)`${O} >= ${o}`,()=>t.assign(p,!0)))}}};Hn.default=cu;var io={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=B,r=X,n=H;e.error={message:({params:{property:f,depsCount:l,deps:d}})=>{const p=l===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${f} is present`},params:({params:{property:f,depsCount:l,deps:d,missingProperty:p}})=>(0,t._)`{property: ${f},
635
635
  missingProperty: ${p},
636
636
  depsCount: ${l},
637
- deps: ${d}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[l,d]=i(f);o(f,l),u(f,d)}};function i({schema:f}){const l={},d={};for(const p in f){if(p==="__proto__")continue;const b=Array.isArray(f[p])?l:d;b[p]=f[p]}return[l,d]}function o(f,l=f.schema){const{gen:d,data:p,it:b}=f;if(Object.keys(l).length===0)return;const E=d.let("missing");for(const P in l){const O=l[P];if(O.length===0)continue;const _=(0,n.propertyInData)(d,p,P,b.opts.ownProperties);f.setParams({property:P,depsCount:O.length,deps:O.join(", ")}),b.allErrors?d.if(_,()=>{for(const g of O)(0,n.checkReportMissingProp)(f,g)}):(d.if((0,t._)`${_} && (${(0,n.checkMissingProp)(f,O,E)})`),(0,n.reportMissingProp)(f,E),d.else())}}e.validatePropertyDeps=o;function u(f,l=f.schema){const{gen:d,data:p,keyword:b,it:E}=f,P=d.name("valid");for(const O in l)(0,r.alwaysValidSchema)(E,l[O])||(d.if((0,n.propertyInData)(d,p,O,E.opts.ownProperties),()=>{const _=f.subschema({keyword:b,schemaProp:O},P);f.mergeValidEvaluated(_,P)},()=>d.var(P,!0)),f.ok(P))}e.validateSchemaDeps=u,e.default=s})(io);var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});const oo=B,lu=X,uu={message:"property name must be valid",params:({params:e})=>(0,oo._)`{propertyName: ${e.propertyName}}`},du={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:uu,code(e){const{gen:t,schema:r,data:n,it:s}=e;if((0,lu.alwaysValidSchema)(s,r))return;const i=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),t.if((0,oo.not)(i),()=>{e.error(!0),s.allErrors||t.break()})}),e.ok(i)}};Bn.default=du;var zr={};Object.defineProperty(zr,"__esModule",{value:!0});const ur=x,Oe=B,fu=We,dr=X,pu={message:"must NOT have additional properties",params:({params:e})=>(0,Oe._)`{additionalProperty: ${e.additionalProperty}}`},hu={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:pu,code(e){const{gen:t,schema:r,parentSchema:n,data:s,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:u,opts:f}=o;if(o.props=!0,f.removeAdditional!=="all"&&(0,dr.alwaysValidSchema)(o,r))return;const l=(0,ur.allSchemaProperties)(n.properties),d=(0,ur.allSchemaProperties)(n.patternProperties);p(),e.ok((0,Oe._)`${i} === ${fu.default.errors}`);function p(){t.forIn("key",s,_=>{!l.length&&!d.length?P(_):t.if(b(_),()=>P(_))})}function b(_){let g;if(l.length>8){const $=(0,dr.schemaRefOrVal)(o,n.properties,"properties");g=(0,ur.isOwnProperty)(t,$,_)}else l.length?g=(0,Oe.or)(...l.map($=>(0,Oe._)`${_} === ${$}`)):g=Oe.nil;return d.length&&(g=(0,Oe.or)(g,...d.map($=>(0,Oe._)`${(0,ur.usePattern)(e,$)}.test(${_})`))),(0,Oe.not)(g)}function E(_){t.code((0,Oe._)`delete ${s}[${_}]`)}function P(_){if(f.removeAdditional==="all"||f.removeAdditional&&r===!1){E(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,dr.alwaysValidSchema)(o,r)){const g=t.name("valid");f.removeAdditional==="failing"?(O(_,g,!1),t.if((0,Oe.not)(g),()=>{e.reset(),E(_)})):(O(_,g),u||t.if((0,Oe.not)(g),()=>t.break()))}}function O(_,g,$){const S={keyword:"additionalProperties",dataProp:_,dataPropType:dr.Type.Str};$===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,g)}}};zr.default=hu;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});const mu=Ne,Ls=x,Zr=X,Fs=zr,yu={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Fs.default.code(new mu.KeywordCxt(i,Fs.default,"additionalProperties"));const o=(0,Ls.allSchemaProperties)(r);for(const p of o)i.definedProperties.add(p);i.opts.unevaluated&&o.length&&i.props!==!0&&(i.props=Zr.mergeEvaluated.props(t,(0,Zr.toHash)(o),i.props));const u=o.filter(p=>!(0,Zr.alwaysValidSchema)(i,r[p]));if(u.length===0)return;const f=t.name("valid");for(const p of u)l(p)?d(p):(t.if((0,Ls.propertyInData)(t,s,p,i.opts.ownProperties)),d(p),i.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(f);function l(p){return i.opts.useDefaults&&!i.compositeRule&&r[p].default!==void 0}function d(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},f)}}};Gn.default=yu;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const qs=x,fr=B,Us=X,Vs=X,gu={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:s,it:i}=e,{opts:o}=i,u=(0,qs.allSchemaProperties)(r),f=u.filter(O=>(0,Us.alwaysValidSchema)(i,r[O]));if(u.length===0||f.length===u.length&&(!i.opts.unevaluated||i.props===!0))return;const l=o.strictSchema&&!o.allowMatchingProperties&&s.properties,d=t.name("valid");i.props!==!0&&!(i.props instanceof fr.Name)&&(i.props=(0,Vs.evaluatedPropsToName)(t,i.props));const{props:p}=i;b();function b(){for(const O of u)l&&E(O),i.allErrors?P(O):(t.var(d,!0),P(O),t.if(d))}function E(O){for(const _ in l)new RegExp(O).test(_)&&(0,Us.checkStrictMode)(i,`property ${_} matches pattern ${O} (use allowMatchingProperties)`)}function P(O){t.forIn("key",n,_=>{t.if((0,fr._)`${(0,qs.usePattern)(e,O)}.test(${_})`,()=>{const g=f.includes(O);g||e.subschema({keyword:"patternProperties",schemaProp:O,dataProp:_,dataPropType:Vs.Type.Str},d),i.opts.unevaluated&&p!==!0?t.assign((0,fr._)`${p}[${_}]`,!0):!g&&!i.allErrors&&t.if((0,fr.not)(d),()=>t.break())})})}}};Kn.default=gu;var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});const $u=X,_u={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,$u.alwaysValidSchema)(n,r)){e.fail();return}const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Jn.default=_u;var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});const wu=x,vu={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:wu.validateUnion,error:{message:"must match a schema in anyOf"}};Qn.default=vu;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});const _r=B,bu=X,Eu={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,_r._)`{passingSchemas: ${e.passing}}`},Pu={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Eu,code(e){const{gen:t,schema:r,parentSchema:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const i=r,o=t.let("valid",!1),u=t.let("passing",null),f=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(o,()=>e.reset(),()=>e.error(!0));function l(){i.forEach((d,p)=>{let b;(0,bu.alwaysValidSchema)(s,d)?t.var(f,!0):b=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},f),p>0&&t.if((0,_r._)`${f} && ${o}`).assign(o,!1).assign(u,(0,_r._)`[${u}, ${p}]`).else(),t.if(f,()=>{t.assign(o,!0),t.assign(u,p),b&&e.mergeEvaluated(b,_r.Name)})})}}};Yn.default=Pu;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});const Su=X,Tu={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach((i,o)=>{if((0,Su.alwaysValidSchema)(n,i))return;const u=e.subschema({keyword:"allOf",schemaProp:o},s);e.ok(s),e.mergeEvaluated(u)})}};Zn.default=Tu;var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const Cr=B,ao=X,Ru={message:({params:e})=>(0,Cr.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Cr._)`{failingKeyword: ${e.ifClause}}`},ku={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Ru,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,ao.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=zs(n,"then"),i=zs(n,"else");if(!s&&!i)return;const o=t.let("valid",!0),u=t.name("_valid");if(f(),e.reset(),s&&i){const d=t.let("ifClause");e.setParams({ifClause:d}),t.if(u,l("then",d),l("else",d))}else s?t.if(u,l("then")):t.if((0,Cr.not)(u),l("else"));e.pass(o,()=>e.error(!0));function f(){const d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(d)}function l(d,p){return()=>{const b=e.subschema({keyword:d},u);t.assign(o,u),e.mergeValidEvaluated(b,o),p?t.assign(p,(0,Cr._)`${d}`):e.setParams({ifClause:d})}}}};function zs(e,t){const r=e.schema[t];return r!==void 0&&!(0,ao.alwaysValidSchema)(e,r)}Xn.default=ku;var es={};Object.defineProperty(es,"__esModule",{value:!0});const Ou=X,Cu={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Ou.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};es.default=Cu;Object.defineProperty(zn,"__esModule",{value:!0});const Nu=Ct,Iu=Wn,ju=Nt,Au=Hn,Du=xn,Mu=io,Lu=Bn,Fu=zr,qu=Gn,Uu=Kn,Vu=Jn,zu=Qn,Wu=Yn,Hu=Zn,xu=Xn,Bu=es;function Gu(e=!1){const t=[Vu.default,zu.default,Wu.default,Hu.default,xu.default,Bu.default,Lu.default,Fu.default,Mu.default,qu.default,Uu.default];return e?t.push(Iu.default,Au.default):t.push(Nu.default,ju.default),t.push(Du.default),t}zn.default=Gu;var ts={},rs={};Object.defineProperty(rs,"__esModule",{value:!0});const le=B,Ku={message:({schemaCode:e})=>(0,le.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,le._)`{format: ${e}}`},Ju={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Ku,code(e,t){const{gen:r,data:n,$data:s,schema:i,schemaCode:o,it:u}=e,{opts:f,errSchemaPath:l,schemaEnv:d,self:p}=u;if(!f.validateFormats)return;s?b():E();function b(){const P=r.scopeValue("formats",{ref:p.formats,code:f.code.formats}),O=r.const("fDef",(0,le._)`${P}[${o}]`),_=r.let("fType"),g=r.let("format");r.if((0,le._)`typeof ${O} == "object" && !(${O} instanceof RegExp)`,()=>r.assign(_,(0,le._)`${O}.type || "string"`).assign(g,(0,le._)`${O}.validate`),()=>r.assign(_,(0,le._)`"string"`).assign(g,O)),e.fail$data((0,le.or)($(),S()));function $(){return f.strictSchema===!1?le.nil:(0,le._)`${o} && !${g}`}function S(){const I=d.$async?(0,le._)`(${O}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,le._)`${g}(${n})`,D=(0,le._)`(typeof ${g} == "function" ? ${I} : ${g}.test(${n}))`;return(0,le._)`${g} && ${g} !== true && ${_} === ${t} && !${D}`}}function E(){const P=p.formats[i];if(!P){$();return}if(P===!0)return;const[O,_,g]=S(P);O===t&&e.pass(I());function $(){if(f.strictSchema===!1){p.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function S(D){const v=D instanceof RegExp?(0,le.regexpCode)(D):f.code.formats?(0,le._)`${f.code.formats}${(0,le.getProperty)(i)}`:void 0,C=r.scopeValue("formats",{key:i,ref:D,code:v});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,le._)`${C}.validate`]:["string",D,C]}function I(){if(typeof P=="object"&&!(P instanceof RegExp)&&P.async){if(!d.$async)throw new Error("async format in sync schema");return(0,le._)`await ${g}(${n})`}return typeof _=="function"?(0,le._)`${g}(${n})`:(0,le._)`${g}.test(${n})`}}}};rs.default=Ju;Object.defineProperty(ts,"__esModule",{value:!0});const Qu=rs,Yu=[Qu.default];ts.default=Yu;var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.contentVocabulary=Ot.metadataVocabulary=void 0;Ot.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ot.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Rn,"__esModule",{value:!0});const Zu=kn,Xu=Cn,ed=zn,td=ts,Ws=Ot,rd=[Zu.default,Xu.default,(0,ed.default)(),td.default,Ws.metadataVocabulary,Ws.contentVocabulary];Rn.default=rd;var ns={},co={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(co);Object.defineProperty(ns,"__esModule",{value:!0});const Pt=B,dn=co,Hs=ve,nd=X,sd={message:({params:{discrError:e,tagName:t}})=>e===dn.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Pt._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},id={keyword:"discriminator",type:"object",schemaType:"object",error:sd,code(e){const{gen:t,data:r,schema:n,parentSchema:s,it:i}=e,{oneOf:o}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),l=t.const("tag",(0,Pt._)`${r}${(0,Pt.getProperty)(u)}`);t.if((0,Pt._)`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:dn.DiscrError.Tag,tag:l,tagName:u})),e.ok(f);function d(){const E=b();t.if(!1);for(const P in E)t.elseIf((0,Pt._)`${l} === ${P}`),t.assign(f,p(E[P]));t.else(),e.error(!1,{discrError:dn.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}function p(E){const P=t.name("valid"),O=e.subschema({keyword:"oneOf",schemaProp:E},P);return e.mergeEvaluated(O,Pt.Name),P}function b(){var E;const P={},O=g(s);let _=!0;for(let I=0;I<o.length;I++){let D=o[I];D!=null&&D.$ref&&!(0,nd.schemaHasRulesButRef)(D,i.self.RULES)&&(D=Hs.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,D==null?void 0:D.$ref),D instanceof Hs.SchemaEnv&&(D=D.schema));const v=(E=D==null?void 0:D.properties)===null||E===void 0?void 0:E[u];if(typeof v!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);_=_&&(O||g(D)),$(v,I)}if(!_)throw new Error(`discriminator: "${u}" must be required`);return P;function g({required:I}){return Array.isArray(I)&&I.includes(u)}function $(I,D){if(I.const)S(I.const,D);else if(I.enum)for(const v of I.enum)S(v,D);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function S(I,D){if(typeof I!="string"||I in P)throw new Error(`discriminator: "${u}" values must be unique strings`);P[I]=D}}}};ns.default=id;const od="http://json-schema.org/draft-07/schema#",ad="http://json-schema.org/draft-07/schema#",cd="Core schema meta-schema",ld={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},ud=["object","boolean"],dd={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},fd={$schema:od,$id:ad,title:cd,definitions:ld,type:ud,properties:dd,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=ki,n=Rn,s=ns,i=fd,o=["/properties"],u="http://json-schema.org/draft-07/schema";class f extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(P=>this.addVocabulary(P)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const P=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(P,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var l=Ne;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var d=B;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=tr;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var b=rr;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return b.default}})})(sn,sn.exports);var pd=sn.exports;const hd=ua(pd),md="http://json-schema.org/schema",yd="#/definitions/Blueprint",gd={Blueprint:{type:"object",properties:{landingPage:{type:"string",description:"The URL to navigate to after the blueprint has been run."},description:{type:"string",description:"Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what.",deprecated:"Use meta.description instead."},meta:{type:"object",properties:{title:{type:"string",description:"A clear and concise name for your Blueprint."},description:{type:"string",description:"A brief explanation of what your Blueprint offers."},author:{type:"string",description:"A GitHub username of the author of this Blueprint."},categories:{type:"array",items:{type:"string"},description:"Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org."}},required:["title","author"],additionalProperties:!1,description:"Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints"},preferredVersions:{type:"object",properties:{php:{anyOf:[{$ref:"#/definitions/SupportedPHPVersion"},{type:"string",const:"latest"}],description:"The preferred PHP version to use. If not specified, the latest supported version will be used"},wp:{type:"string",description:"The preferred WordPress version to use. If not specified, the latest supported version will be used"}},required:["php","wp"],additionalProperties:!1,description:"The preferred PHP and WordPress versions to use."},features:{type:"object",properties:{networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},constants:{type:"object",additionalProperties:{type:"string"},description:"PHP Constants to define on every request",deprecated:"This experimental option will change without warning.\nUse `steps` instead."},plugins:{type:"array",items:{anyOf:[{type:"string"},{$ref:"#/definitions/FileReference"}]},description:"WordPress plugins to install and activate"},siteOptions:{type:"object",additionalProperties:{type:"string"},properties:{blogname:{type:"string",description:"The site title"}},description:"WordPress site options to define"},login:{anyOf:[{type:"boolean"},{type:"object",properties:{username:{type:"string"},password:{type:"string"}},required:["username","password"],additionalProperties:!1}],description:"User to log in as. If true, logs the user in as admin/password."},phpExtensionBundles:{type:"array",items:{$ref:"#/definitions/SupportedPHPExtensionBundle"},description:"The PHP extensions to use."},steps:{type:"array",items:{anyOf:[{$ref:"#/definitions/StepDefinition"},{type:"string"},{not:{}},{type:"boolean",const:!1},{type:"null"}]},description:"The steps to run after every other operation in this Blueprint was executed."},$schema:{type:"string"}},additionalProperties:!1},SupportedPHPVersion:{type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},FileReference:{anyOf:[{$ref:"#/definitions/VFSReference"},{$ref:"#/definitions/LiteralReference"},{$ref:"#/definitions/CoreThemeReference"},{$ref:"#/definitions/CorePluginReference"},{$ref:"#/definitions/UrlReference"}]},VFSReference:{type:"object",properties:{resource:{type:"string",const:"vfs",description:"Identifies the file resource as Virtual File System (VFS)"},path:{type:"string",description:"The path to the file in the VFS"}},required:["resource","path"],additionalProperties:!1},LiteralReference:{type:"object",properties:{resource:{type:"string",const:"literal",description:"Identifies the file resource as a literal file"},name:{type:"string",description:"The name of the file"},contents:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The contents of the file"}},required:["resource","name","contents"],additionalProperties:!1},CoreThemeReference:{type:"object",properties:{resource:{type:"string",const:"wordpress.org/themes",description:"Identifies the file resource as a WordPress Core theme"},slug:{type:"string",description:"The slug of the WordPress Core theme"}},required:["resource","slug"],additionalProperties:!1},CorePluginReference:{type:"object",properties:{resource:{type:"string",const:"wordpress.org/plugins",description:"Identifies the file resource as a WordPress Core plugin"},slug:{type:"string",description:"The slug of the WordPress Core plugin"}},required:["resource","slug"],additionalProperties:!1},UrlReference:{type:"object",properties:{resource:{type:"string",const:"url",description:"Identifies the file resource as a URL"},url:{type:"string",description:"The URL of the file"},caption:{type:"string",description:"Optional caption for displaying a progress message"}},required:["resource","url"],additionalProperties:!1},SupportedPHPExtensionBundle:{type:"string",enum:["kitchen-sink","light"]},StepDefinition:{type:"object",discriminator:{propertyName:"step"},required:["step"],oneOf:[{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activatePlugin"},pluginPath:{type:"string",description:"Path to the plugin directory as absolute path (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file relative to the plugins directory (plugin-name/plugin-name.php)."},pluginName:{type:"string",description:"Optional. Plugin name to display in the progress bar."}},required:["pluginPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activateTheme"},themeFolderName:{type:"string",description:"The name of the theme folder inside wp-content/themes/"}},required:["step","themeFolderName"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"cp"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineWpConfigConsts"},consts:{type:"object",additionalProperties:{},description:"The constants to define"},method:{type:"string",enum:["rewrite-wp-config","define-before-run"],description:`The method of defining the constants in wp-config.php. Possible values are:
637
+ deps: ${d}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[l,d]=i(f);o(f,l),u(f,d)}};function i({schema:f}){const l={},d={};for(const p in f){if(p==="__proto__")continue;const b=Array.isArray(f[p])?l:d;b[p]=f[p]}return[l,d]}function o(f,l=f.schema){const{gen:d,data:p,it:b}=f;if(Object.keys(l).length===0)return;const E=d.let("missing");for(const P in l){const O=l[P];if(O.length===0)continue;const _=(0,n.propertyInData)(d,p,P,b.opts.ownProperties);f.setParams({property:P,depsCount:O.length,deps:O.join(", ")}),b.allErrors?d.if(_,()=>{for(const g of O)(0,n.checkReportMissingProp)(f,g)}):(d.if((0,t._)`${_} && (${(0,n.checkMissingProp)(f,O,E)})`),(0,n.reportMissingProp)(f,E),d.else())}}e.validatePropertyDeps=o;function u(f,l=f.schema){const{gen:d,data:p,keyword:b,it:E}=f,P=d.name("valid");for(const O in l)(0,r.alwaysValidSchema)(E,l[O])||(d.if((0,n.propertyInData)(d,p,O,E.opts.ownProperties),()=>{const _=f.subschema({keyword:b,schemaProp:O},P);f.mergeValidEvaluated(_,P)},()=>d.var(P,!0)),f.ok(P))}e.validateSchemaDeps=u,e.default=s})(io);var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});const oo=B,lu=X,uu={message:"property name must be valid",params:({params:e})=>(0,oo._)`{propertyName: ${e.propertyName}}`},du={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:uu,code(e){const{gen:t,schema:r,data:n,it:s}=e;if((0,lu.alwaysValidSchema)(s,r))return;const i=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),t.if((0,oo.not)(i),()=>{e.error(!0),s.allErrors||t.break()})}),e.ok(i)}};Bn.default=du;var zr={};Object.defineProperty(zr,"__esModule",{value:!0});const ur=H,Oe=B,fu=We,dr=X,pu={message:"must NOT have additional properties",params:({params:e})=>(0,Oe._)`{additionalProperty: ${e.additionalProperty}}`},hu={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:pu,code(e){const{gen:t,schema:r,parentSchema:n,data:s,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:u,opts:f}=o;if(o.props=!0,f.removeAdditional!=="all"&&(0,dr.alwaysValidSchema)(o,r))return;const l=(0,ur.allSchemaProperties)(n.properties),d=(0,ur.allSchemaProperties)(n.patternProperties);p(),e.ok((0,Oe._)`${i} === ${fu.default.errors}`);function p(){t.forIn("key",s,_=>{!l.length&&!d.length?P(_):t.if(b(_),()=>P(_))})}function b(_){let g;if(l.length>8){const $=(0,dr.schemaRefOrVal)(o,n.properties,"properties");g=(0,ur.isOwnProperty)(t,$,_)}else l.length?g=(0,Oe.or)(...l.map($=>(0,Oe._)`${_} === ${$}`)):g=Oe.nil;return d.length&&(g=(0,Oe.or)(g,...d.map($=>(0,Oe._)`${(0,ur.usePattern)(e,$)}.test(${_})`))),(0,Oe.not)(g)}function E(_){t.code((0,Oe._)`delete ${s}[${_}]`)}function P(_){if(f.removeAdditional==="all"||f.removeAdditional&&r===!1){E(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,dr.alwaysValidSchema)(o,r)){const g=t.name("valid");f.removeAdditional==="failing"?(O(_,g,!1),t.if((0,Oe.not)(g),()=>{e.reset(),E(_)})):(O(_,g),u||t.if((0,Oe.not)(g),()=>t.break()))}}function O(_,g,$){const S={keyword:"additionalProperties",dataProp:_,dataPropType:dr.Type.Str};$===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,g)}}};zr.default=hu;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});const mu=Ne,Ls=H,Zr=X,Fs=zr,yu={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Fs.default.code(new mu.KeywordCxt(i,Fs.default,"additionalProperties"));const o=(0,Ls.allSchemaProperties)(r);for(const p of o)i.definedProperties.add(p);i.opts.unevaluated&&o.length&&i.props!==!0&&(i.props=Zr.mergeEvaluated.props(t,(0,Zr.toHash)(o),i.props));const u=o.filter(p=>!(0,Zr.alwaysValidSchema)(i,r[p]));if(u.length===0)return;const f=t.name("valid");for(const p of u)l(p)?d(p):(t.if((0,Ls.propertyInData)(t,s,p,i.opts.ownProperties)),d(p),i.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(f);function l(p){return i.opts.useDefaults&&!i.compositeRule&&r[p].default!==void 0}function d(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},f)}}};Gn.default=yu;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const qs=H,fr=B,Us=X,Vs=X,gu={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:s,it:i}=e,{opts:o}=i,u=(0,qs.allSchemaProperties)(r),f=u.filter(O=>(0,Us.alwaysValidSchema)(i,r[O]));if(u.length===0||f.length===u.length&&(!i.opts.unevaluated||i.props===!0))return;const l=o.strictSchema&&!o.allowMatchingProperties&&s.properties,d=t.name("valid");i.props!==!0&&!(i.props instanceof fr.Name)&&(i.props=(0,Vs.evaluatedPropsToName)(t,i.props));const{props:p}=i;b();function b(){for(const O of u)l&&E(O),i.allErrors?P(O):(t.var(d,!0),P(O),t.if(d))}function E(O){for(const _ in l)new RegExp(O).test(_)&&(0,Us.checkStrictMode)(i,`property ${_} matches pattern ${O} (use allowMatchingProperties)`)}function P(O){t.forIn("key",n,_=>{t.if((0,fr._)`${(0,qs.usePattern)(e,O)}.test(${_})`,()=>{const g=f.includes(O);g||e.subschema({keyword:"patternProperties",schemaProp:O,dataProp:_,dataPropType:Vs.Type.Str},d),i.opts.unevaluated&&p!==!0?t.assign((0,fr._)`${p}[${_}]`,!0):!g&&!i.allErrors&&t.if((0,fr.not)(d),()=>t.break())})})}}};Kn.default=gu;var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});const $u=X,_u={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,$u.alwaysValidSchema)(n,r)){e.fail();return}const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Jn.default=_u;var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});const wu=H,vu={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:wu.validateUnion,error:{message:"must match a schema in anyOf"}};Qn.default=vu;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});const _r=B,bu=X,Eu={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,_r._)`{passingSchemas: ${e.passing}}`},Pu={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Eu,code(e){const{gen:t,schema:r,parentSchema:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const i=r,o=t.let("valid",!1),u=t.let("passing",null),f=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(o,()=>e.reset(),()=>e.error(!0));function l(){i.forEach((d,p)=>{let b;(0,bu.alwaysValidSchema)(s,d)?t.var(f,!0):b=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},f),p>0&&t.if((0,_r._)`${f} && ${o}`).assign(o,!1).assign(u,(0,_r._)`[${u}, ${p}]`).else(),t.if(f,()=>{t.assign(o,!0),t.assign(u,p),b&&e.mergeEvaluated(b,_r.Name)})})}}};Yn.default=Pu;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});const Su=X,Tu={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach((i,o)=>{if((0,Su.alwaysValidSchema)(n,i))return;const u=e.subschema({keyword:"allOf",schemaProp:o},s);e.ok(s),e.mergeEvaluated(u)})}};Zn.default=Tu;var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const Cr=B,ao=X,Ru={message:({params:e})=>(0,Cr.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Cr._)`{failingKeyword: ${e.ifClause}}`},ku={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Ru,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,ao.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=zs(n,"then"),i=zs(n,"else");if(!s&&!i)return;const o=t.let("valid",!0),u=t.name("_valid");if(f(),e.reset(),s&&i){const d=t.let("ifClause");e.setParams({ifClause:d}),t.if(u,l("then",d),l("else",d))}else s?t.if(u,l("then")):t.if((0,Cr.not)(u),l("else"));e.pass(o,()=>e.error(!0));function f(){const d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(d)}function l(d,p){return()=>{const b=e.subschema({keyword:d},u);t.assign(o,u),e.mergeValidEvaluated(b,o),p?t.assign(p,(0,Cr._)`${d}`):e.setParams({ifClause:d})}}}};function zs(e,t){const r=e.schema[t];return r!==void 0&&!(0,ao.alwaysValidSchema)(e,r)}Xn.default=ku;var es={};Object.defineProperty(es,"__esModule",{value:!0});const Ou=X,Cu={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Ou.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};es.default=Cu;Object.defineProperty(zn,"__esModule",{value:!0});const Nu=Ct,Iu=Wn,ju=Nt,Au=xn,Du=Hn,Mu=io,Lu=Bn,Fu=zr,qu=Gn,Uu=Kn,Vu=Jn,zu=Qn,Wu=Yn,xu=Zn,Hu=Xn,Bu=es;function Gu(e=!1){const t=[Vu.default,zu.default,Wu.default,xu.default,Hu.default,Bu.default,Lu.default,Fu.default,Mu.default,qu.default,Uu.default];return e?t.push(Iu.default,Au.default):t.push(Nu.default,ju.default),t.push(Du.default),t}zn.default=Gu;var ts={},rs={};Object.defineProperty(rs,"__esModule",{value:!0});const le=B,Ku={message:({schemaCode:e})=>(0,le.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,le._)`{format: ${e}}`},Ju={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Ku,code(e,t){const{gen:r,data:n,$data:s,schema:i,schemaCode:o,it:u}=e,{opts:f,errSchemaPath:l,schemaEnv:d,self:p}=u;if(!f.validateFormats)return;s?b():E();function b(){const P=r.scopeValue("formats",{ref:p.formats,code:f.code.formats}),O=r.const("fDef",(0,le._)`${P}[${o}]`),_=r.let("fType"),g=r.let("format");r.if((0,le._)`typeof ${O} == "object" && !(${O} instanceof RegExp)`,()=>r.assign(_,(0,le._)`${O}.type || "string"`).assign(g,(0,le._)`${O}.validate`),()=>r.assign(_,(0,le._)`"string"`).assign(g,O)),e.fail$data((0,le.or)($(),S()));function $(){return f.strictSchema===!1?le.nil:(0,le._)`${o} && !${g}`}function S(){const I=d.$async?(0,le._)`(${O}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,le._)`${g}(${n})`,D=(0,le._)`(typeof ${g} == "function" ? ${I} : ${g}.test(${n}))`;return(0,le._)`${g} && ${g} !== true && ${_} === ${t} && !${D}`}}function E(){const P=p.formats[i];if(!P){$();return}if(P===!0)return;const[O,_,g]=S(P);O===t&&e.pass(I());function $(){if(f.strictSchema===!1){p.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function S(D){const v=D instanceof RegExp?(0,le.regexpCode)(D):f.code.formats?(0,le._)`${f.code.formats}${(0,le.getProperty)(i)}`:void 0,C=r.scopeValue("formats",{key:i,ref:D,code:v});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,le._)`${C}.validate`]:["string",D,C]}function I(){if(typeof P=="object"&&!(P instanceof RegExp)&&P.async){if(!d.$async)throw new Error("async format in sync schema");return(0,le._)`await ${g}(${n})`}return typeof _=="function"?(0,le._)`${g}(${n})`:(0,le._)`${g}.test(${n})`}}}};rs.default=Ju;Object.defineProperty(ts,"__esModule",{value:!0});const Qu=rs,Yu=[Qu.default];ts.default=Yu;var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.contentVocabulary=Ot.metadataVocabulary=void 0;Ot.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ot.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Rn,"__esModule",{value:!0});const Zu=kn,Xu=Cn,ed=zn,td=ts,Ws=Ot,rd=[Zu.default,Xu.default,(0,ed.default)(),td.default,Ws.metadataVocabulary,Ws.contentVocabulary];Rn.default=rd;var ns={},co={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(co);Object.defineProperty(ns,"__esModule",{value:!0});const Pt=B,dn=co,xs=ve,nd=X,sd={message:({params:{discrError:e,tagName:t}})=>e===dn.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Pt._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},id={keyword:"discriminator",type:"object",schemaType:"object",error:sd,code(e){const{gen:t,data:r,schema:n,parentSchema:s,it:i}=e,{oneOf:o}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),l=t.const("tag",(0,Pt._)`${r}${(0,Pt.getProperty)(u)}`);t.if((0,Pt._)`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:dn.DiscrError.Tag,tag:l,tagName:u})),e.ok(f);function d(){const E=b();t.if(!1);for(const P in E)t.elseIf((0,Pt._)`${l} === ${P}`),t.assign(f,p(E[P]));t.else(),e.error(!1,{discrError:dn.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}function p(E){const P=t.name("valid"),O=e.subschema({keyword:"oneOf",schemaProp:E},P);return e.mergeEvaluated(O,Pt.Name),P}function b(){var E;const P={},O=g(s);let _=!0;for(let I=0;I<o.length;I++){let D=o[I];D!=null&&D.$ref&&!(0,nd.schemaHasRulesButRef)(D,i.self.RULES)&&(D=xs.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,D==null?void 0:D.$ref),D instanceof xs.SchemaEnv&&(D=D.schema));const v=(E=D==null?void 0:D.properties)===null||E===void 0?void 0:E[u];if(typeof v!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);_=_&&(O||g(D)),$(v,I)}if(!_)throw new Error(`discriminator: "${u}" must be required`);return P;function g({required:I}){return Array.isArray(I)&&I.includes(u)}function $(I,D){if(I.const)S(I.const,D);else if(I.enum)for(const v of I.enum)S(v,D);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function S(I,D){if(typeof I!="string"||I in P)throw new Error(`discriminator: "${u}" values must be unique strings`);P[I]=D}}}};ns.default=id;const od="http://json-schema.org/draft-07/schema#",ad="http://json-schema.org/draft-07/schema#",cd="Core schema meta-schema",ld={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},ud=["object","boolean"],dd={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},fd={$schema:od,$id:ad,title:cd,definitions:ld,type:ud,properties:dd,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=ki,n=Rn,s=ns,i=fd,o=["/properties"],u="http://json-schema.org/draft-07/schema";class f extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(P=>this.addVocabulary(P)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const P=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(P,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var l=Ne;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var d=B;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=tr;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var b=rr;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return b.default}})})(sn,sn.exports);var pd=sn.exports;const hd=ua(pd),md="http://json-schema.org/schema",yd="#/definitions/Blueprint",gd={Blueprint:{type:"object",properties:{landingPage:{type:"string",description:"The URL to navigate to after the blueprint has been run."},description:{type:"string",description:"Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what.",deprecated:"Use meta.description instead."},meta:{type:"object",properties:{title:{type:"string",description:"A clear and concise name for your Blueprint."},description:{type:"string",description:"A brief explanation of what your Blueprint offers."},author:{type:"string",description:"A GitHub username of the author of this Blueprint."},categories:{type:"array",items:{type:"string"},description:"Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org."}},required:["title","author"],additionalProperties:!1,description:"Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints"},preferredVersions:{type:"object",properties:{php:{anyOf:[{$ref:"#/definitions/SupportedPHPVersion"},{type:"string",const:"latest"}],description:"The preferred PHP version to use. If not specified, the latest supported version will be used"},wp:{type:"string",description:"The preferred WordPress version to use. If not specified, the latest supported version will be used"}},required:["php","wp"],additionalProperties:!1,description:"The preferred PHP and WordPress versions to use."},features:{type:"object",properties:{networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},constants:{type:"object",additionalProperties:{type:"string"},description:"PHP Constants to define on every request",deprecated:"This experimental option will change without warning.\nUse `steps` instead."},plugins:{type:"array",items:{anyOf:[{type:"string"},{$ref:"#/definitions/FileReference"}]},description:"WordPress plugins to install and activate",deprecated:"This experimental option will change without warning.\nUse `steps` instead."},siteOptions:{type:"object",additionalProperties:{type:"string"},properties:{blogname:{type:"string",description:"The site title"}},description:"WordPress site options to define",deprecated:"This experimental option will change without warning.\nUse `steps` instead."},login:{anyOf:[{type:"boolean"},{type:"object",properties:{username:{type:"string"},password:{type:"string"}},required:["username","password"],additionalProperties:!1}],description:"User to log in as. If true, logs the user in as admin/password."},phpExtensionBundles:{type:"array",items:{$ref:"#/definitions/SupportedPHPExtensionBundle"},description:"The PHP extensions to use."},steps:{type:"array",items:{anyOf:[{$ref:"#/definitions/StepDefinition"},{type:"string"},{not:{}},{type:"boolean",const:!1},{type:"null"}]},description:"The steps to run after every other operation in this Blueprint was executed."},$schema:{type:"string"}},additionalProperties:!1},SupportedPHPVersion:{type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},FileReference:{anyOf:[{$ref:"#/definitions/VFSReference"},{$ref:"#/definitions/LiteralReference"},{$ref:"#/definitions/CoreThemeReference"},{$ref:"#/definitions/CorePluginReference"},{$ref:"#/definitions/UrlReference"}]},VFSReference:{type:"object",properties:{resource:{type:"string",const:"vfs",description:"Identifies the file resource as Virtual File System (VFS)"},path:{type:"string",description:"The path to the file in the VFS"}},required:["resource","path"],additionalProperties:!1},LiteralReference:{type:"object",properties:{resource:{type:"string",const:"literal",description:"Identifies the file resource as a literal file"},name:{type:"string",description:"The name of the file"},contents:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The contents of the file"}},required:["resource","name","contents"],additionalProperties:!1},CoreThemeReference:{type:"object",properties:{resource:{type:"string",const:"wordpress.org/themes",description:"Identifies the file resource as a WordPress Core theme"},slug:{type:"string",description:"The slug of the WordPress Core theme"}},required:["resource","slug"],additionalProperties:!1},CorePluginReference:{type:"object",properties:{resource:{type:"string",const:"wordpress.org/plugins",description:"Identifies the file resource as a WordPress Core plugin"},slug:{type:"string",description:"The slug of the WordPress Core plugin"}},required:["resource","slug"],additionalProperties:!1},UrlReference:{type:"object",properties:{resource:{type:"string",const:"url",description:"Identifies the file resource as a URL"},url:{type:"string",description:"The URL of the file"},caption:{type:"string",description:"Optional caption for displaying a progress message"}},required:["resource","url"],additionalProperties:!1},SupportedPHPExtensionBundle:{type:"string",enum:["kitchen-sink","light"]},StepDefinition:{type:"object",discriminator:{propertyName:"step"},required:["step"],oneOf:[{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activatePlugin"},pluginPath:{type:"string",description:"Path to the plugin directory as absolute path (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file relative to the plugins directory (plugin-name/plugin-name.php)."},pluginName:{type:"string",description:"Optional. Plugin name to display in the progress bar."}},required:["pluginPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activateTheme"},themeFolderName:{type:"string",description:"The name of the theme folder inside wp-content/themes/"}},required:["step","themeFolderName"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"cp"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineWpConfigConsts"},consts:{type:"object",additionalProperties:{},description:"The constants to define"},method:{type:"string",enum:["rewrite-wp-config","define-before-run"],description:`The method of defining the constants in wp-config.php. Possible values are:
638
638
 
639
639
  - rewrite-wp-config: Default. Rewrites the wp-config.php file to explicitly call define() with the requested name and value. This method alters the file on the disk, but it doesn't conflict with existing define() calls in wp-config.php.
640
640
 
641
641
  - define-before-run: Defines the constant before running the requested script. It doesn't alter any files on the disk, but constants defined this way may conflict with existing define() calls in wp-config.php.`},virtualize:{type:"boolean",deprecated:`This option is noop and will be removed in a future version.
642
642
  This option is only kept in here to avoid breaking Blueprint schema validation
643
- for existing apps using this option.`}},required:["consts","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineSiteUrl"},siteUrl:{type:"string",description:"The URL"}},required:["siteUrl","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"enableMultisite"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWxr"},file:{$ref:"#/definitions/FileReference",description:"The file to import"}},required:["file","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWordPressFiles"},wordPressFilesZip:{$ref:"#/definitions/FileReference",description:"The zip file containing the top-level WordPress files and directories."},pathInZip:{type:"string",description:"The path inside the zip file where the WordPress files are."}},required:["step","wordPressFilesZip"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installPlugin",description:"The step identifier."},pluginZipFile:{$ref:"#/definitions/FileReference",description:"The plugin zip file to install."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginZipFile","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installTheme",description:"The step identifier."},themeZipFile:{$ref:"#/definitions/FileReference",description:"The theme zip file to install."},options:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the theme after installing it."}},additionalProperties:!1,description:"Optional installation options."}},required:["step","themeZipFile"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"login"},username:{type:"string",description:"The user to log in as. Defaults to 'admin'."},password:{type:"string",description:"The password to log in with. Defaults to 'password'."}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mkdir"},path:{type:"string",description:"The path of the directory you want to create"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mv"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"resetData"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"request"},request:{$ref:"#/definitions/PHPRequest",description:"Request details (See /wordpress-playground/api/universal/interface/PHPRequest)"}},required:["request","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rm"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rmdir"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHP",description:"The step identifier."},code:{type:"string",description:"The PHP code to run."}},required:["code","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHPWithOptions"},options:{$ref:"#/definitions/PHPRunOptions",description:"Run options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runWpInstallationWizard"},options:{$ref:"#/definitions/WordPressInstallationOptions"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runSql",description:"The step identifier."},sql:{$ref:"#/definitions/FileReference",description:"The SQL to run. Each non-empty line must contain a valid SQL query."}},required:["sql","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteOptions",description:'The name of the step. Must be "setSiteOptions".'},options:{type:"object",additionalProperties:{},description:"The options to set on the site."}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"unzip"},zipFile:{$ref:"#/definitions/FileReference",description:"The zip file to extract"},zipPath:{type:"string",description:"The path of the zip file to extract",deprecated:"Use zipFile instead."},extractToPath:{type:"string",description:"The path to extract the zip file to"}},required:["extractToPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"updateUserMeta"},meta:{type:"object",additionalProperties:{},description:'An object of user meta values to set, e.g. { "first_name": "John" }'},userId:{type:"number",description:"User ID"}},required:["meta","step","userId"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFile"},path:{type:"string",description:"The path of the file to write to"},data:{anyOf:[{$ref:"#/definitions/FileReference"},{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The data to write"}},required:["data","path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"wp-cli",description:"The step identifier."},command:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"The WP CLI command to run."},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["command","step"]}]},InstallPluginOptions:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the plugin after installing it."}},additionalProperties:!1},PHPRequest:{type:"object",properties:{method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},url:{type:"string",description:"Request path or absolute URL."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},{type:"object",properties:{size:{type:"number"},type:{type:"string"},lastModified:{type:"number"},name:{type:"string"},webkitRelativePath:{type:"string"}},required:["lastModified","name","size","type","webkitRelativePath"],additionalProperties:!1}]}}],description:"Request body. If an object is given, the request will be encoded as multipart and sent with a `multipart/form-data` header."}},required:["url"],additionalProperties:!1},HTTPMethod:{type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]},PHPRequestHeaders:{type:"object",additionalProperties:{type:"string"}},PHPRunOptions:{type:"object",properties:{relativeUri:{type:"string",description:"Request path following the domain:port part."},scriptPath:{type:"string",description:"Path of the .php file to execute."},protocol:{type:"string",description:"Request protocol."},method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"Request body."},env:{type:"object",additionalProperties:{type:"string"},description:"Environment variables to set for this run."},$_SERVER:{type:"object",additionalProperties:{type:"string"},description:"$_SERVER entries to set for this run."},code:{type:"string",description:"The code snippet to eval instead of a php file."}},additionalProperties:!1},WordPressInstallationOptions:{type:"object",properties:{adminUsername:{type:"string"},adminPassword:{type:"string"}},additionalProperties:!1}},$d={$schema:md,$ref:yd,definitions:gd},{wpCLI:_d,...xs}=ra,wd={...xs,"wp-cli":_d,importFile:xs.importWxr};function lo(e,{progress:t=new Lr,semaphore:r=new Ao({concurrency:3}),onStepCompleted:n=()=>{}}={}){var p,b,E,P,O,_,g;e={...e,steps:(e.steps||[]).filter(Sd).filter(Td)};for(const $ of e.steps)typeof $=="object"&&$.step==="importFile"&&($.step="importWxr",ye.warn('The "importFile" step is deprecated. Use "importWxr" instead.'));if(e.constants&&e.steps.unshift({step:"defineWpConfigConsts",consts:e.constants}),e.siteOptions&&e.steps.unshift({step:"setSiteOptions",options:e.siteOptions}),e.plugins){const $=e.plugins.map(S=>typeof S=="string"?S.startsWith("https://")?{resource:"url",url:S}:{resource:"wordpress.org/plugins",slug:S}:S).map(S=>({step:"installPlugin",pluginZipFile:S}));e.steps.unshift(...$)}e.login&&e.steps.push({step:"login",...e.login===!0?{username:"admin",password:"password"}:e.login}),e.phpExtensionBundles||(e.phpExtensionBundles=[]),e.phpExtensionBundles||(e.phpExtensionBundles=[]),e.phpExtensionBundles.length===0&&e.phpExtensionBundles.push("kitchen-sink");const s=(p=e.steps)==null?void 0:p.findIndex($=>typeof $=="object"&&($==null?void 0:$.step)==="wp-cli");s!==void 0&&s>-1&&(e.phpExtensionBundles.includes("light")&&(e.phpExtensionBundles=e.phpExtensionBundles.filter($=>$!=="light"),ye.warn("The wpCli step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(b=e.steps)==null||b.splice(s,0,{step:"writeFile",data:{resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},path:"/tmp/wp-cli.phar"}));const i=(E=e.steps)==null?void 0:E.findIndex($=>typeof $=="object"&&($==null?void 0:$.step)==="importWxr");i!==void 0&&i>-1&&(e.phpExtensionBundles.includes("light")&&(e.phpExtensionBundles=e.phpExtensionBundles.filter($=>$!=="light"),ye.warn("The importWxr step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(P=e.steps)==null||P.splice(i,0,{step:"installPlugin",pluginZipFile:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:o,errors:u}=bd(e);if(!o){const $=new Error(`Invalid blueprint: ${u[0].message} at ${u[0].instancePath}`);throw $.errors=u,$}const f=e.steps||[],l=f.reduce(($,S)=>{var I;return $+(((I=S.progress)==null?void 0:I.weight)||1)},0),d=f.map($=>Rd($,{semaphore:r,rootProgressTracker:t,totalProgressWeight:l}));return{versions:{php:Ed((O=e.preferredVersions)==null?void 0:O.php,Fr,Pi),wp:((_=e.preferredVersions)==null?void 0:_.wp)||"latest"},phpExtensions:Pd([],e.phpExtensionBundles||[]),features:{networking:((g=e.features)==null?void 0:g.networking)??!1},run:async $=>{try{for(const{resources:S}of d)for(const I of S)I.setPlayground($),I.isAsync&&I.resolve();for(const[S,{run:I,step:D}]of Object.entries(d))try{const v=await I($);n(v,D)}catch(v){throw ye.error(v),new Error(`Error when executing the blueprint step #${S} (${JSON.stringify(D)}) ${v instanceof Error?`: ${v.message}`:v}`,{cause:v})}}finally{try{await $.goTo(e.landingPage||"/")}catch{}t.finish()}}}}const vd=new hd({discriminator:!0});let pr;function bd(e){var s;pr=vd.compile($d);const t=pr(e);if(t)return{valid:t};const r=new Set;for(const i of pr.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||r.add(i.instancePath);const n=(s=pr.errors)==null?void 0:s.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&r.has(i.instancePath)));return{valid:t,errors:n}}function Ed(e,t,r){return e&&t.includes(e)?e:r}function Pd(e,t){const r=Si.filter(s=>e.includes(s)),n=t.flatMap(s=>s in Ss?Ss[s]:[]);return Array.from(new Set([...r,...n]))}function Sd(e){return!!(typeof e=="object"&&e)}function Td(e){return["setPhpIniEntry","request"].includes(e.step)?(ye.warn(`The "${e.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function Rd(e,{semaphore:t,rootProgressTracker:r,totalProgressWeight:n}){var d;const s=r.stage((((d=e.progress)==null?void 0:d.weight)||1)/n),i={};for(const p of Object.keys(e)){let b=e[p];ha(b)&&(b=ft.create(b,{semaphore:t})),i[p]=b}const o=async p=>{var b;try{return s.fillSlowly(),await wd[e.step](p,await kd(i),{tracker:s,initialCaption:(b=e.progress)==null?void 0:b.caption})}finally{s.finish()}},u=Bs(i),f=Bs(i).filter(p=>p.isAsync),l=1/(f.length+1);for(const p of f)p.progress=s.stage(l);return{run:o,step:e,resources:u}}function Bs(e){const t=[];for(const r in e){const n=e[r];n instanceof ft&&t.push(n)}return t}async function kd(e){const t={};for(const r in e){const n=e[r];n instanceof ft?t[r]=await n.resolve():t[r]=n}return t}async function uo(e,t){await e.run(t)}function Od(){}/**
643
+ for existing apps using this option.`}},required:["consts","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineSiteUrl"},siteUrl:{type:"string",description:"The URL"}},required:["siteUrl","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"enableMultisite"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWxr"},file:{$ref:"#/definitions/FileReference",description:"The file to import"}},required:["file","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWordPressFiles"},wordPressFilesZip:{$ref:"#/definitions/FileReference",description:"The zip file containing the top-level WordPress files and directories."},pathInZip:{type:"string",description:"The path inside the zip file where the WordPress files are."}},required:["step","wordPressFilesZip"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installPlugin",description:"The step identifier."},pluginZipFile:{$ref:"#/definitions/FileReference",description:"The plugin zip file to install."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginZipFile","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installTheme",description:"The step identifier."},themeZipFile:{$ref:"#/definitions/FileReference",description:"The theme zip file to install."},options:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the theme after installing it."}},additionalProperties:!1,description:"Optional installation options."}},required:["step","themeZipFile"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"login"},username:{type:"string",description:"The user to log in as. Defaults to 'admin'."},password:{type:"string",description:"The password to log in with. Defaults to 'password'."}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mkdir"},path:{type:"string",description:"The path of the directory you want to create"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mv"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"resetData"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"request"},request:{$ref:"#/definitions/PHPRequest",description:"Request details (See /wordpress-playground/api/universal/interface/PHPRequest)"}},required:["request","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rm"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rmdir"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHP",description:"The step identifier."},code:{type:"string",description:"The PHP code to run."}},required:["code","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHPWithOptions"},options:{$ref:"#/definitions/PHPRunOptions",description:"Run options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runWpInstallationWizard"},options:{$ref:"#/definitions/WordPressInstallationOptions"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runSql",description:"The step identifier."},sql:{$ref:"#/definitions/FileReference",description:"The SQL to run. Each non-empty line must contain a valid SQL query."}},required:["sql","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteOptions",description:'The name of the step. Must be "setSiteOptions".'},options:{type:"object",additionalProperties:{},description:"The options to set on the site."}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"unzip"},zipFile:{$ref:"#/definitions/FileReference",description:"The zip file to extract"},zipPath:{type:"string",description:"The path of the zip file to extract",deprecated:"Use zipFile instead."},extractToPath:{type:"string",description:"The path to extract the zip file to"}},required:["extractToPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"updateUserMeta"},meta:{type:"object",additionalProperties:{},description:'An object of user meta values to set, e.g. { "first_name": "John" }'},userId:{type:"number",description:"User ID"}},required:["meta","step","userId"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFile"},path:{type:"string",description:"The path of the file to write to"},data:{anyOf:[{$ref:"#/definitions/FileReference"},{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The data to write"}},required:["data","path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"wp-cli",description:"The step identifier."},command:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"The WP CLI command to run."},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["command","step"]}]},InstallPluginOptions:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the plugin after installing it."}},additionalProperties:!1},PHPRequest:{type:"object",properties:{method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},url:{type:"string",description:"Request path or absolute URL."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},{type:"object",properties:{size:{type:"number"},type:{type:"string"},lastModified:{type:"number"},name:{type:"string"},webkitRelativePath:{type:"string"}},required:["lastModified","name","size","type","webkitRelativePath"],additionalProperties:!1}]}}],description:"Request body. If an object is given, the request will be encoded as multipart and sent with a `multipart/form-data` header."}},required:["url"],additionalProperties:!1},HTTPMethod:{type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]},PHPRequestHeaders:{type:"object",additionalProperties:{type:"string"}},PHPRunOptions:{type:"object",properties:{relativeUri:{type:"string",description:"Request path following the domain:port part."},scriptPath:{type:"string",description:"Path of the .php file to execute."},protocol:{type:"string",description:"Request protocol."},method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"Request body."},env:{type:"object",additionalProperties:{type:"string"},description:"Environment variables to set for this run."},$_SERVER:{type:"object",additionalProperties:{type:"string"},description:"$_SERVER entries to set for this run."},code:{type:"string",description:"The code snippet to eval instead of a php file."}},additionalProperties:!1},WordPressInstallationOptions:{type:"object",properties:{adminUsername:{type:"string"},adminPassword:{type:"string"}},additionalProperties:!1}},$d={$schema:md,$ref:yd,definitions:gd},{wpCLI:_d,...Hs}=ra,wd={...Hs,"wp-cli":_d,importFile:Hs.importWxr};function lo(e,{progress:t=new Lr,semaphore:r=new Ao({concurrency:3}),onStepCompleted:n=()=>{}}={}){var p,b,E,P,O,_,g;e={...e,steps:(e.steps||[]).filter(Sd).filter(Td)};for(const $ of e.steps)typeof $=="object"&&$.step==="importFile"&&($.step="importWxr",ye.warn('The "importFile" step is deprecated. Use "importWxr" instead.'));if(e.constants&&e.steps.unshift({step:"defineWpConfigConsts",consts:e.constants}),e.siteOptions&&e.steps.unshift({step:"setSiteOptions",options:e.siteOptions}),e.plugins){const $=e.plugins.map(S=>typeof S=="string"?S.startsWith("https://")?{resource:"url",url:S}:{resource:"wordpress.org/plugins",slug:S}:S).map(S=>({step:"installPlugin",pluginZipFile:S}));e.steps.unshift(...$)}e.login&&e.steps.push({step:"login",...e.login===!0?{username:"admin",password:"password"}:e.login}),e.phpExtensionBundles||(e.phpExtensionBundles=[]),e.phpExtensionBundles||(e.phpExtensionBundles=[]),e.phpExtensionBundles.length===0&&e.phpExtensionBundles.push("kitchen-sink");const s=(p=e.steps)==null?void 0:p.findIndex($=>typeof $=="object"&&($==null?void 0:$.step)==="wp-cli");s!==void 0&&s>-1&&(e.phpExtensionBundles.includes("light")&&(e.phpExtensionBundles=e.phpExtensionBundles.filter($=>$!=="light"),ye.warn("The wpCli step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(b=e.steps)==null||b.splice(s,0,{step:"writeFile",data:{resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},path:"/tmp/wp-cli.phar"}));const i=(E=e.steps)==null?void 0:E.findIndex($=>typeof $=="object"&&($==null?void 0:$.step)==="importWxr");i!==void 0&&i>-1&&(e.phpExtensionBundles.includes("light")&&(e.phpExtensionBundles=e.phpExtensionBundles.filter($=>$!=="light"),ye.warn("The importWxr step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(P=e.steps)==null||P.splice(i,0,{step:"installPlugin",pluginZipFile:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:o,errors:u}=bd(e);if(!o){const $=new Error(`Invalid blueprint: ${u[0].message} at ${u[0].instancePath}`);throw $.errors=u,$}const f=e.steps||[],l=f.reduce(($,S)=>{var I;return $+(((I=S.progress)==null?void 0:I.weight)||1)},0),d=f.map($=>Rd($,{semaphore:r,rootProgressTracker:t,totalProgressWeight:l}));return{versions:{php:Ed((O=e.preferredVersions)==null?void 0:O.php,Fr,Pi),wp:((_=e.preferredVersions)==null?void 0:_.wp)||"latest"},phpExtensions:Pd([],e.phpExtensionBundles||[]),features:{networking:((g=e.features)==null?void 0:g.networking)??!1},run:async $=>{try{for(const{resources:S}of d)for(const I of S)I.setPlayground($),I.isAsync&&I.resolve();for(const[S,{run:I,step:D}]of Object.entries(d))try{const v=await I($);n(v,D)}catch(v){throw ye.error(v),new Error(`Error when executing the blueprint step #${S} (${JSON.stringify(D)}) ${v instanceof Error?`: ${v.message}`:v}`,{cause:v})}}finally{try{await $.goTo(e.landingPage||"/")}catch{}t.finish()}}}}const vd=new hd({discriminator:!0});let pr;function bd(e){var s;pr=vd.compile($d);const t=pr(e);if(t)return{valid:t};const r=new Set;for(const i of pr.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||r.add(i.instancePath);const n=(s=pr.errors)==null?void 0:s.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&r.has(i.instancePath)));return{valid:t,errors:n}}function Ed(e,t,r){return e&&t.includes(e)?e:r}function Pd(e,t){const r=Si.filter(s=>e.includes(s)),n=t.flatMap(s=>s in Ss?Ss[s]:[]);return Array.from(new Set([...r,...n]))}function Sd(e){return!!(typeof e=="object"&&e)}function Td(e){return["setPhpIniEntry","request"].includes(e.step)?(ye.warn(`The "${e.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function Rd(e,{semaphore:t,rootProgressTracker:r,totalProgressWeight:n}){var d;const s=r.stage((((d=e.progress)==null?void 0:d.weight)||1)/n),i={};for(const p of Object.keys(e)){let b=e[p];ha(b)&&(b=ft.create(b,{semaphore:t})),i[p]=b}const o=async p=>{var b;try{return s.fillSlowly(),await wd[e.step](p,await kd(i),{tracker:s,initialCaption:(b=e.progress)==null?void 0:b.caption})}finally{s.finish()}},u=Bs(i),f=Bs(i).filter(p=>p.isAsync),l=1/(f.length+1);for(const p of f)p.progress=s.stage(l);return{run:o,step:e,resources:u}}function Bs(e){const t=[];for(const r in e){const n=e[r];n instanceof ft&&t.push(n)}return t}async function kd(e){const t={};for(const r in e){const n=e[r];n instanceof ft?t[r]=await n.resolve():t[r]=n}return t}async function uo(e,t){await e.run(t)}function Od(){}/**
644
644
  * @license
645
645
  * Copyright 2019 Google LLC
646
646
  * SPDX-License-Identifier: Apache-2.0
647
- */const fo=Symbol("Comlink.proxy"),Cd=Symbol("Comlink.endpoint"),Nd=Symbol("Comlink.releaseProxy"),Xr=Symbol("Comlink.finalizer"),wr=Symbol("Comlink.thrown"),po=e=>typeof e=="object"&&e!==null||typeof e=="function",Id={canHandle:e=>po(e)&&e[fo],serialize(e){const{port1:t,port2:r}=new MessageChannel;return ss(e,t),[r,[r]]},deserialize(e){return e.start(),is(e)}},jd={canHandle:e=>po(e)&&wr in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},Tt=new Map([["proxy",Id],["throw",jd]]);function Ad(e,t){for(const r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return!0;return!1}function ss(e,t=globalThis,r=["*"]){t.addEventListener("message",function n(s){if(!s||!s.data)return;if(!Ad(r,s.origin)){console.warn(`Invalid origin '${s.origin}' for comlink proxy`);return}const{id:i,type:o,path:u}=Object.assign({path:[]},s.data),f=(s.data.argumentList||[]).map(lt);let l;try{const d=u.slice(0,-1).reduce((b,E)=>b[E],e),p=u.reduce((b,E)=>b[E],e);switch(o){case"GET":l=p;break;case"SET":d[u.slice(-1)[0]]=lt(s.data.value),l=!0;break;case"APPLY":l=p.apply(d,f);break;case"CONSTRUCT":{const b=new p(...f);l=go(b)}break;case"ENDPOINT":{const{port1:b,port2:E}=new MessageChannel;ss(e,E),l=qd(b,[b])}break;case"RELEASE":l=void 0;break;default:return}}catch(d){l={value:d,[wr]:0}}Promise.resolve(l).catch(d=>({value:d,[wr]:0})).then(d=>{const[p,b]=jr(d);t.postMessage(Object.assign(Object.assign({},p),{id:i}),b),o==="RELEASE"&&(t.removeEventListener("message",n),ho(t),Xr in e&&typeof e[Xr]=="function"&&e[Xr]())}).catch(d=>{const[p,b]=jr({value:new TypeError("Unserializable return value"),[wr]:0});t.postMessage(Object.assign(Object.assign({},p),{id:i}),b)})}),t.start&&t.start()}function Dd(e){return e.constructor.name==="MessagePort"}function ho(e){Dd(e)&&e.close()}function is(e,t){return fn(e,[],t)}function hr(e){if(e)throw new Error("Proxy has been released and is not useable")}function mo(e){return St(e,{type:"RELEASE"}).then(()=>{ho(e)})}const Nr=new WeakMap,Ir="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(Nr.get(e)||0)-1;Nr.set(e,t),t===0&&mo(e)});function Md(e,t){const r=(Nr.get(t)||0)+1;Nr.set(t,r),Ir&&Ir.register(e,t,e)}function Ld(e){Ir&&Ir.unregister(e)}function fn(e,t=[],r=function(){}){let n=!1;const s=new Proxy(r,{get(i,o){if(hr(n),o===Nd)return()=>{Ld(s),mo(e),n=!0};if(o==="then"){if(t.length===0)return{then:()=>s};const u=St(e,{type:"GET",path:t.map(f=>f.toString())}).then(lt);return u.then.bind(u)}return fn(e,[...t,o])},set(i,o,u){hr(n);const[f,l]=jr(u);return St(e,{type:"SET",path:[...t,o].map(d=>d.toString()),value:f},l).then(lt)},apply(i,o,u){hr(n);const f=t[t.length-1];if(f===Cd)return St(e,{type:"ENDPOINT"}).then(lt);if(f==="bind")return fn(e,t.slice(0,-1));const[l,d]=Gs(u);return St(e,{type:"APPLY",path:t.map(p=>p.toString()),argumentList:l},d).then(lt)},construct(i,o){hr(n);const[u,f]=Gs(o);return St(e,{type:"CONSTRUCT",path:t.map(l=>l.toString()),argumentList:u},f).then(lt)}});return Md(s,e),s}function Fd(e){return Array.prototype.concat.apply([],e)}function Gs(e){const t=e.map(jr);return[t.map(r=>r[0]),Fd(t.map(r=>r[1]))]}const yo=new WeakMap;function qd(e,t){return yo.set(e,t),e}function go(e){return Object.assign(e,{[fo]:!0})}function Ud(e,t=globalThis,r="*"){return{postMessage:(n,s)=>e.postMessage(n,r,s),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function jr(e){for(const[t,r]of Tt)if(r.canHandle(e)){const[n,s]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},s]}return[{type:"RAW",value:e},yo.get(e)||[]]}function lt(e){switch(e.type){case"HANDLER":return Tt.get(e.name).deserialize(e.value);case"RAW":return e.value}}function St(e,t,r){return new Promise(n=>{const s=Vd();e.addEventListener("message",function i(o){!o.data||!o.data.id||o.data.id!==s||(e.removeEventListener("message",i),n(o.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:s},t),r)})}function Vd(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function $o(e,t=void 0){Wd();const r=e instanceof Worker?e:Ud(e,t),n=is(r),s=_o(n);return new Proxy(s,{get:(i,o)=>o==="isConnected"?async()=>{for(;;)try{await zd(n.isConnected(),200);break}catch{}}:n[o]})}async function zd(e,t){return new Promise((r,n)=>{setTimeout(n,t),e.then(r)})}let Ks=!1;function Wd(){if(Ks)return;Ks=!0,Tt.set("EVENT",{canHandle:r=>r instanceof CustomEvent,serialize:r=>[{detail:r.detail},[]],deserialize:r=>r}),Tt.set("FUNCTION",{canHandle:r=>typeof r=="function",serialize(r){const{port1:n,port2:s}=new MessageChannel;return ss(r,n),[s,[s]]},deserialize(r){return r.start(),is(r)}}),Tt.set("PHPResponse",{canHandle:r=>typeof r=="object"&&r!==null&&"headers"in r&&"bytes"in r&&"errors"in r&&"exitCode"in r&&"httpStatusCode"in r,serialize(r){return[r.toRawData(),[]]},deserialize(r){return Sr.fromRawData(r)}});const e=Tt.get("throw"),t=e==null?void 0:e.serialize;e.serialize=({value:r})=>{const n=t({value:r});return r.response&&(n[0].value.response=r.response),r.source&&(n[0].value.source=r.source),n}}function _o(e){return new Proxy(e,{get(t,r){switch(typeof t[r]){case"function":return(...n)=>t[r](...n);case"object":return t[r]===null?t[r]:_o(t[r]);case"undefined":case"number":case"string":return t[r];default:return go(t[r])}}})}async function wo({iframe:e,blueprint:t,remoteUrl:r,progressTracker:n=new Lr,disableProgressBar:s,onBlueprintStepCompleted:i,onClientConnected:o=()=>{},sapiName:u,onBeforeBlueprint:f,siteSlug:l}){if(xd(r),Hd(e),r=en(r,{progressbar:!s}),n.setCaption("Preparing WordPress"),!t){const b=await Js(e,en(r,{"php-extension":"kitchen-sink","site-slug":l}),n);return o(b),b}const d=lo(t,{progress:n.stage(.5),onStepCompleted:i}),p=await Js(e,en(r,{php:d.versions.php,wp:d.versions.wp,"sapi-name":u,"php-extension":d.phpExtensions,networking:d.features.networking?"yes":"no","site-slug":l}),n);return Bo(ye,p),o(p),f&&await f(),await uo(d,p),n.finish(),p}function Hd(e){var t,r;(t=e.sandbox)!=null&&t.length&&!((r=e.sandbox)!=null&&r.contains("allow-storage-access-by-user-activation"))&&e.sandbox.add("allow-storage-access-by-user-activation")}async function Js(e,t,r){await new Promise(i=>{e.src=t,e.addEventListener("load",i,!1)});const n=$o(e.contentWindow,e.ownerDocument.defaultView);await n.isConnected(),r.pipe(n);const s=r.stage();return await n.onDownloadProgress(s.loadingListener),await n.isReady(),s.finish(),n}const vr="https://playground.wordpress.net";function xd(e){const t=new URL(e,vr);if((t.origin===vr||t.hostname==="localhost")&&t.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${t}. Expected origin to be ${vr}/remote.html.`)}function en(e,t){const r=new URL(e,vr),n=new URLSearchParams(r.search);for(const[s,i]of Object.entries(t))if(i!=null&&i!==!1)if(Array.isArray(i))for(const o of i)n.append(s,o.toString());else n.set(s,i.toString());return r.search=n.toString(),r.toString()}async function Bd(e,t){if(ye.warn("`connectPlayground` is deprecated and will be removed. Use `startPlayground` instead."),t!=null&&t.loadRemote)return wo({iframe:e,remoteUrl:t.loadRemote});const r=$o(e.contentWindow,e.ownerDocument.defaultView);return await r.isConnected(),r}exports.LatestSupportedPHPVersion=Pi;exports.SupportedPHPVersions=Fr;exports.SupportedPHPVersionsList=fa;exports.activatePlugin=Ar;exports.activateTheme=hn;exports.compileBlueprint=lo;exports.connectPlayground=Bd;exports.cp=ci;exports.defineSiteUrl=$n;exports.defineWpConfigConsts=Qt;exports.enableMultisite=ai;exports.exportWXR=hi;exports.importWordPressFiles=pi;exports.importWxr=fi;exports.installPlugin=yi;exports.installTheme=gi;exports.login=Er;exports.mkdir=ui;exports.mv=li;exports.phpVar=pe;exports.phpVars=Zt;exports.request=br;exports.resetData=$i;exports.rm=mn;exports.rmdir=di;exports.runBlueprintSteps=uo;exports.runPHP=ri;exports.runPHPWithOptions=ni;exports.runSql=si;exports.runWpInstallationWizard=_i;exports.setPhpIniEntries=da;exports.setPluginProxyURL=Od;exports.setSiteOptions=yn;exports.startPlaygroundWeb=wo;exports.unzip=Dr;exports.updateUserMeta=ii;exports.wpCLI=vi;exports.wpContentFilesExcludedFromExport=pn;exports.writeFile=gn;exports.zipWpContent=wi;
647
+ */const fo=Symbol("Comlink.proxy"),Cd=Symbol("Comlink.endpoint"),Nd=Symbol("Comlink.releaseProxy"),Xr=Symbol("Comlink.finalizer"),wr=Symbol("Comlink.thrown"),po=e=>typeof e=="object"&&e!==null||typeof e=="function",Id={canHandle:e=>po(e)&&e[fo],serialize(e){const{port1:t,port2:r}=new MessageChannel;return ss(e,t),[r,[r]]},deserialize(e){return e.start(),is(e)}},jd={canHandle:e=>po(e)&&wr in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},Tt=new Map([["proxy",Id],["throw",jd]]);function Ad(e,t){for(const r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return!0;return!1}function ss(e,t=globalThis,r=["*"]){t.addEventListener("message",function n(s){if(!s||!s.data)return;if(!Ad(r,s.origin)){console.warn(`Invalid origin '${s.origin}' for comlink proxy`);return}const{id:i,type:o,path:u}=Object.assign({path:[]},s.data),f=(s.data.argumentList||[]).map(lt);let l;try{const d=u.slice(0,-1).reduce((b,E)=>b[E],e),p=u.reduce((b,E)=>b[E],e);switch(o){case"GET":l=p;break;case"SET":d[u.slice(-1)[0]]=lt(s.data.value),l=!0;break;case"APPLY":l=p.apply(d,f);break;case"CONSTRUCT":{const b=new p(...f);l=go(b)}break;case"ENDPOINT":{const{port1:b,port2:E}=new MessageChannel;ss(e,E),l=qd(b,[b])}break;case"RELEASE":l=void 0;break;default:return}}catch(d){l={value:d,[wr]:0}}Promise.resolve(l).catch(d=>({value:d,[wr]:0})).then(d=>{const[p,b]=jr(d);t.postMessage(Object.assign(Object.assign({},p),{id:i}),b),o==="RELEASE"&&(t.removeEventListener("message",n),ho(t),Xr in e&&typeof e[Xr]=="function"&&e[Xr]())}).catch(d=>{const[p,b]=jr({value:new TypeError("Unserializable return value"),[wr]:0});t.postMessage(Object.assign(Object.assign({},p),{id:i}),b)})}),t.start&&t.start()}function Dd(e){return e.constructor.name==="MessagePort"}function ho(e){Dd(e)&&e.close()}function is(e,t){return fn(e,[],t)}function hr(e){if(e)throw new Error("Proxy has been released and is not useable")}function mo(e){return St(e,{type:"RELEASE"}).then(()=>{ho(e)})}const Nr=new WeakMap,Ir="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(Nr.get(e)||0)-1;Nr.set(e,t),t===0&&mo(e)});function Md(e,t){const r=(Nr.get(t)||0)+1;Nr.set(t,r),Ir&&Ir.register(e,t,e)}function Ld(e){Ir&&Ir.unregister(e)}function fn(e,t=[],r=function(){}){let n=!1;const s=new Proxy(r,{get(i,o){if(hr(n),o===Nd)return()=>{Ld(s),mo(e),n=!0};if(o==="then"){if(t.length===0)return{then:()=>s};const u=St(e,{type:"GET",path:t.map(f=>f.toString())}).then(lt);return u.then.bind(u)}return fn(e,[...t,o])},set(i,o,u){hr(n);const[f,l]=jr(u);return St(e,{type:"SET",path:[...t,o].map(d=>d.toString()),value:f},l).then(lt)},apply(i,o,u){hr(n);const f=t[t.length-1];if(f===Cd)return St(e,{type:"ENDPOINT"}).then(lt);if(f==="bind")return fn(e,t.slice(0,-1));const[l,d]=Gs(u);return St(e,{type:"APPLY",path:t.map(p=>p.toString()),argumentList:l},d).then(lt)},construct(i,o){hr(n);const[u,f]=Gs(o);return St(e,{type:"CONSTRUCT",path:t.map(l=>l.toString()),argumentList:u},f).then(lt)}});return Md(s,e),s}function Fd(e){return Array.prototype.concat.apply([],e)}function Gs(e){const t=e.map(jr);return[t.map(r=>r[0]),Fd(t.map(r=>r[1]))]}const yo=new WeakMap;function qd(e,t){return yo.set(e,t),e}function go(e){return Object.assign(e,{[fo]:!0})}function Ud(e,t=globalThis,r="*"){return{postMessage:(n,s)=>e.postMessage(n,r,s),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function jr(e){for(const[t,r]of Tt)if(r.canHandle(e)){const[n,s]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},s]}return[{type:"RAW",value:e},yo.get(e)||[]]}function lt(e){switch(e.type){case"HANDLER":return Tt.get(e.name).deserialize(e.value);case"RAW":return e.value}}function St(e,t,r){return new Promise(n=>{const s=Vd();e.addEventListener("message",function i(o){!o.data||!o.data.id||o.data.id!==s||(e.removeEventListener("message",i),n(o.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:s},t),r)})}function Vd(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function $o(e,t=void 0){Wd();const r=e instanceof Worker?e:Ud(e,t),n=is(r),s=_o(n);return new Proxy(s,{get:(i,o)=>o==="isConnected"?async()=>{for(;;)try{await zd(n.isConnected(),200);break}catch{}}:n[o]})}async function zd(e,t){return new Promise((r,n)=>{setTimeout(n,t),e.then(r)})}let Ks=!1;function Wd(){if(Ks)return;Ks=!0,Tt.set("EVENT",{canHandle:r=>r instanceof CustomEvent,serialize:r=>[{detail:r.detail},[]],deserialize:r=>r}),Tt.set("FUNCTION",{canHandle:r=>typeof r=="function",serialize(r){const{port1:n,port2:s}=new MessageChannel;return ss(r,n),[s,[s]]},deserialize(r){return r.start(),is(r)}}),Tt.set("PHPResponse",{canHandle:r=>typeof r=="object"&&r!==null&&"headers"in r&&"bytes"in r&&"errors"in r&&"exitCode"in r&&"httpStatusCode"in r,serialize(r){return[r.toRawData(),[]]},deserialize(r){return Sr.fromRawData(r)}});const e=Tt.get("throw"),t=e==null?void 0:e.serialize;e.serialize=({value:r})=>{const n=t({value:r});return r.response&&(n[0].value.response=r.response),r.source&&(n[0].value.source=r.source),n}}function _o(e){return new Proxy(e,{get(t,r){switch(typeof t[r]){case"function":return(...n)=>t[r](...n);case"object":return t[r]===null?t[r]:_o(t[r]);case"undefined":case"number":case"string":return t[r];default:return go(t[r])}}})}async function wo({iframe:e,blueprint:t,remoteUrl:r,progressTracker:n=new Lr,disableProgressBar:s,onBlueprintStepCompleted:i,onClientConnected:o=()=>{},sapiName:u,onBeforeBlueprint:f,siteSlug:l}){if(Hd(r),xd(e),r=en(r,{progressbar:!s}),n.setCaption("Preparing WordPress"),!t){const b=await Js(e,en(r,{"php-extension":"kitchen-sink","site-slug":l}),n);return o(b),b}const d=lo(t,{progress:n.stage(.5),onStepCompleted:i}),p=await Js(e,en(r,{php:d.versions.php,wp:d.versions.wp,"sapi-name":u,"php-extension":d.phpExtensions,networking:d.features.networking?"yes":"no","site-slug":l}),n);return Bo(ye,p),o(p),f&&await f(),await uo(d,p),n.finish(),p}function xd(e){var t,r;(t=e.sandbox)!=null&&t.length&&!((r=e.sandbox)!=null&&r.contains("allow-storage-access-by-user-activation"))&&e.sandbox.add("allow-storage-access-by-user-activation")}async function Js(e,t,r){await new Promise(i=>{e.src=t,e.addEventListener("load",i,!1)});const n=$o(e.contentWindow,e.ownerDocument.defaultView);await n.isConnected(),r.pipe(n);const s=r.stage();return await n.onDownloadProgress(s.loadingListener),await n.isReady(),s.finish(),n}const vr="https://playground.wordpress.net";function Hd(e){const t=new URL(e,vr);if((t.origin===vr||t.hostname==="localhost")&&t.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${t}. Expected origin to be ${vr}/remote.html.`)}function en(e,t){const r=new URL(e,vr),n=new URLSearchParams(r.search);for(const[s,i]of Object.entries(t))if(i!=null&&i!==!1)if(Array.isArray(i))for(const o of i)n.append(s,o.toString());else n.set(s,i.toString());return r.search=n.toString(),r.toString()}async function Bd(e,t){if(ye.warn("`connectPlayground` is deprecated and will be removed. Use `startPlayground` instead."),t!=null&&t.loadRemote)return wo({iframe:e,remoteUrl:t.loadRemote});const r=$o(e.contentWindow,e.ownerDocument.defaultView);return await r.isConnected(),r}exports.LatestSupportedPHPVersion=Pi;exports.SupportedPHPVersions=Fr;exports.SupportedPHPVersionsList=fa;exports.activatePlugin=Ar;exports.activateTheme=hn;exports.compileBlueprint=lo;exports.connectPlayground=Bd;exports.cp=ci;exports.defineSiteUrl=$n;exports.defineWpConfigConsts=Qt;exports.enableMultisite=ai;exports.exportWXR=hi;exports.importWordPressFiles=pi;exports.importWxr=fi;exports.installPlugin=yi;exports.installTheme=gi;exports.login=Er;exports.mkdir=ui;exports.mv=li;exports.phpVar=pe;exports.phpVars=Zt;exports.request=br;exports.resetData=$i;exports.rm=mn;exports.rmdir=di;exports.runBlueprintSteps=uo;exports.runPHP=ri;exports.runPHPWithOptions=ni;exports.runSql=si;exports.runWpInstallationWizard=_i;exports.setPhpIniEntries=da;exports.setPluginProxyURL=Od;exports.setSiteOptions=yn;exports.startPlaygroundWeb=wo;exports.unzip=Dr;exports.updateUserMeta=ii;exports.wpCLI=vi;exports.wpContentFilesExcludedFromExport=pn;exports.writeFile=gn;exports.zipWpContent=wi;