@wp-playground/blueprints 3.0.52 → 3.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -10,12 +10,12 @@ To fix this:
10
10
  • If you're using a blueprint.zip file, ensure it contains all the files referenced in the Blueprint
11
11
  • Check that the "resource": "bundled" references in your Blueprint match actual files in your bundle
12
12
 
13
- Learn more about Blueprint resources: https://wordpress.github.io/wordpress-playground/blueprints/data-format#resources`;class Dr extends Error{constructor(t=kt){super(t),this.name="BlueprintFilesystemRequiredError"}}class or extends Error{constructor(t,n,f){super(t,f),this.name="ResourceDownloadError",this.url=n}}const Ot=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url","git:directory","bundled","zip"];function Et(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&Ot.includes(r.resource)}function Tt(r){try{return new URL(r).hostname==="github-proxy.com"}catch{return!1}}function $t(r){let t;try{t=new URL(r)}catch{return null}if(t.hostname!=="github-proxy.com")return null;const n=t.pathname.slice(1);if(n.startsWith("https://github.com/")||n.startsWith("http://github.com/"))return{resource:"url",url:n};const f=t.searchParams,u=f.get("repo");if(!u)return null;const s=f.get("release"),e=f.get("asset");if(s&&e){const $=s==="latest"?"releases/latest/download":`releases/download/${s}`;return{resource:"url",url:`https://github.com/${u}/${$}/${e}`}}let p,d;const g=f.get("pr"),_=f.get("commit"),y=f.get("branch");g?p=`refs/pull/${g}/head`:_?(p=_,d="commit"):s?(p=s,d="tag"):p=y||"HEAD";const k=f.get("directory");return{resource:"zip",inner:{resource:"git:directory",url:`https://github.com/${u}`,ref:p,...d&&{refType:d},...k&&{path:k}}}}class be{get progress(){return this._progress}set progress(t){this._progress=t}setPlayground(t){this.playground=t}get isAsync(){return!1}static create(t,{semaphore:n,progress:f,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e}){if(t.resource==="url"&&Tt(t.url)){const d=$t(t.url);d&&(console.warn(`[Blueprints] github-proxy.com is deprecated and will stop working soon. The URL "${t.url}" has been automatically converted to a ${d.resource} resource. Please update your Blueprint to use native resource types. See: https://wordpress.github.io/wordpress-playground/blueprints/steps/resources`),t=d)}let p;switch(t.resource){case"vfs":p=new jt(t,f);break;case"literal":p=new qt(t,f);break;case"wordpress.org/themes":p=new xt(t,f);break;case"wordpress.org/plugins":p=new Ct(t,f);break;case"url":p=new Rt(t,f,{corsProxy:u});break;case"git:directory":p=new Lt(t,f,{corsProxy:u,additionalHeaders:e});break;case"literal:directory":p=new Nt(t,f);break;case"bundled":if(!s)throw new Dr;p=new It(t,s,f);break;case"zip":{const d=be.create(t.inner,{semaphore:n,progress:f,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e});p=new Wt(t,d,f);break}default:throw new Error(`Unknown resource type: ${t.resource}`)}return n&&(p=new Ut(p,n)),new Dt(p)}}class Ur extends be{constructor(t){super(),this.resource=t}get progress(){return this.resource.progress}set progress(t){this.resource.progress=t}get name(){return this.resource.name}get isAsync(){return this.resource.isAsync}setPlayground(t){this.resource.setPlayground(t)}}class jt extends be{constructor(t,n){super(),this.resource=t,this._progress=n}async resolve(){var n;const t=await this.playground.readFileAsBuffer(this.resource.path);return(n=this.progress)==null||n.set(100),new File([t],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class qt extends be{constructor(t,n){super(),this.resource=t,this._progress=n}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 vr extends be{constructor(t,n){super(),this._progress=t,this.corsProxy=n}async resolve(){var n,f,u;(n=this.progress)==null||n.setCaption(this.caption);const t=this.getURL();try{let s=await Pt.fetchWithCorsProxy(t,void 0,this.corsProxy,await((f=this.playground)==null?void 0:f.absoluteUrl));if(!s.ok)throw new or(`Could not download "${t}"`,t);if(s=await br.cloneResponseMonitorProgress(s,((u=this.progress)==null?void 0:u.loadingListener)??St),s.status!==200)throw new or(`Could not download "${t}"`,t);const e=this.name||At(s.headers.get("content-disposition")||"")||encodeURIComponent(t);return new File([await s.arrayBuffer()],e)}catch(s){throw new or(`Could not download "${t}".
13
+ Learn more about Blueprint resources: https://wordpress.github.io/wordpress-playground/blueprints/data-format#resources`;class Dr extends Error{constructor(t=kt){super(t),this.name="BlueprintFilesystemRequiredError"}}class or extends Error{constructor(t,n,f){super(t,f),this.name="ResourceDownloadError",this.url=n}}const Ot=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url","git:directory","bundled","zip"];function Et(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&Ot.includes(r.resource)}function Tt(r){try{return new URL(r).hostname==="github-proxy.com"}catch{return!1}}function $t(r){let t;try{t=new URL(r)}catch{return null}if(t.hostname!=="github-proxy.com")return null;const n=t.pathname.slice(1);if(n.startsWith("https://github.com/")||n.startsWith("http://github.com/"))return{resource:"url",url:n};const f=t.searchParams,d=f.get("repo");if(!d)return null;const s=f.get("release"),e=f.get("asset");if(s&&e){const $=s==="latest"?"releases/latest/download":`releases/download/${s}`;return{resource:"url",url:`https://github.com/${d}/${$}/${e}`}}let p,u;const y=f.get("pr"),_=f.get("commit"),h=f.get("branch");y?p=`refs/pull/${y}/head`:_?(p=_,u="commit"):s?(p=s,u="tag"):p=h||"HEAD";const k=f.get("directory");return{resource:"zip",inner:{resource:"git:directory",url:`https://github.com/${d}`,ref:p,...u&&{refType:u},...k&&{path:k}}}}class be{get progress(){return this._progress}set progress(t){this._progress=t}setPlayground(t){this.playground=t}get isAsync(){return!1}static create(t,{semaphore:n,progress:f,corsProxy:d,streamBundledFile:s,gitAdditionalHeadersCallback:e}){if(t.resource==="url"&&Tt(t.url)){const u=$t(t.url);u&&(console.warn(`[Blueprints] github-proxy.com is deprecated and will stop working soon. The URL "${t.url}" has been automatically converted to a ${u.resource} resource. Please update your Blueprint to use native resource types. See: https://wordpress.github.io/wordpress-playground/blueprints/steps/resources`),t=u)}let p;switch(t.resource){case"vfs":p=new jt(t,f);break;case"literal":p=new qt(t,f);break;case"wordpress.org/themes":p=new xt(t,f);break;case"wordpress.org/plugins":p=new Ct(t,f);break;case"url":p=new St(t,f,{corsProxy:d});break;case"git:directory":p=new Lt(t,f,{corsProxy:d,additionalHeaders:e});break;case"literal:directory":p=new Nt(t,f);break;case"bundled":if(!s)throw new Dr;p=new It(t,s,f);break;case"zip":{const u=be.create(t.inner,{semaphore:n,progress:f,corsProxy:d,streamBundledFile:s,gitAdditionalHeadersCallback:e});p=new Wt(t,u,f);break}default:throw new Error(`Unknown resource type: ${t.resource}`)}return n&&(p=new Ut(p,n)),new Dt(p)}}class Ur extends be{constructor(t){super(),this.resource=t}get progress(){return this.resource.progress}set progress(t){this.resource.progress=t}get name(){return this.resource.name}get isAsync(){return this.resource.isAsync}setPlayground(t){this.resource.setPlayground(t)}}class jt extends be{constructor(t,n){super(),this.resource=t,this._progress=n}async resolve(){var n;const t=await this.playground.readFileAsBuffer(this.resource.path);return(n=this.progress)==null||n.set(100),new File([t],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class qt extends be{constructor(t,n){super(),this.resource=t,this._progress=n}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 vr extends be{constructor(t,n){super(),this._progress=t,this.corsProxy=n}async resolve(){var n,f,d;(n=this.progress)==null||n.setCaption(this.caption);const t=this.getURL();try{let s=await Pt.fetchWithCorsProxy(t,void 0,this.corsProxy,await((f=this.playground)==null?void 0:f.absoluteUrl));if(!s.ok)throw new or(`Could not download "${t}"`,t);if(s=await br.cloneResponseMonitorProgress(s,((d=this.progress)==null?void 0:d.loadingListener)??Rt),s.status!==200)throw new or(`Could not download "${t}"`,t);const e=this.name||At(s.headers.get("content-disposition")||"")||encodeURIComponent(t);return new File([await s.arrayBuffer()],e)}catch(s){throw new or(`Could not download "${t}".
14
14
 
15
15
  Confirm that the URL is correct, the server is reachable, and the file isactually served at that URL. Original error:
16
- ${s}`,t,{cause:s})}}get caption(){return`Downloading ${this.name}`}get name(){try{return new URL(this.getURL(),"http://example.com").pathname.split("/").pop()}catch{return this.getURL()}}get isAsync(){return!0}}function At(r){if(!r)return null;const t=r.match(/filename\*?=([^;]+)/i);if(!t)return null;let n=t[1].trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),t[0].includes("filename*")){const f=n.match(/^[^']*'[^']*'(.+)$/);if(f)try{n=decodeURIComponent(f[1])}catch{}}return n}const St=()=>{};class Rt extends vr{constructor(t,n,f){if(super(n,f==null?void 0:f.corsProxy),this.resource=t,this.options=f,this.resource.url.startsWith("https://github.com/")){const u=this.resource.url.match(/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/(?:blob|raw)\/(?<branch>[^/]+)\/(?<path>.+[^/])$/);u!=null&&u.groups&&(this.resource={...this.resource,url:`https://raw.githubusercontent.com/${u.groups.owner}/${u.groups.repo}/${u.groups.branch}/${u.groups.path}`})}}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class Lt extends be{constructor(t,n,f){super(),this.reference=t,this._progress=n,this.options=f}async resolve(){var f,u,s;const t=((u=(f=this.options)==null?void 0:f.additionalHeaders)==null?void 0:u.call(f,this.reference.url))??{},n=(s=this.options)!=null&&s.corsProxy?`${this.options.corsProxy}${this.reference.url}`:this.reference.url;try{const e=await ve.resolveCommitHash(n,{value:this.reference.ref,type:this.reference.refType??"infer"},t),p=await ve.listGitFiles(n,e,t),d=(this.reference.path??"").replace(/^\/+/,""),g=ve.listDescendantFiles(p,d),_=await ve.sparseCheckout(n,e,g,{withObjects:this.reference[".git"],additionalHeaders:t});let y=_.files;return y=Ft(y,k=>k.substring(d.length).replace(/^\/+/,"")),this.reference[".git"]&&(y={...await ve.createDotGitDirectory({repoUrl:this.reference.url,commitHash:e,ref:this.reference.ref,refType:this.reference.refType,objects:_.objects??[],fileOids:_.fileOids??{},pathPrefix:d}),...y}),{name:this.filename,files:y}}catch(e){throw e instanceof ve.GitAuthenticationError?new ve.GitAuthenticationError(this.reference.url,e.status):e}}get filename(){return this.name.replaceAll(/[^a-zA-Z0-9-.]/g,"-").replaceAll(/-+/g,"-").replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g,"")||I.randomFilename()}get name(){var t;return[this.reference.url,this.reference.ref?`(${this.reference.ref})`:"",(t=this.reference.path)!=null&&t.replace(/^\/+/,"")?`at ${this.reference.path}`:""].filter(n=>n.length>0).join(" ")}}function Ft(r,t){return Object.fromEntries(Object.entries(r).map(([n,f])=>[t(n),f]))}class Nt extends be{constructor(t,n){super(),this.reference=t,this._progress=n}async resolve(){return this.reference}get name(){return this.reference.name}}class xt extends vr{constructor(t,n){super(n),this.resource=t}get name(){return pr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${Ir(this.resource.slug)}`}}class Ct extends vr{constructor(t,n){super(n),this.resource=t}get name(){return pr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${Ir(this.resource.slug)}`}}function Ir(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class Dt extends Ur{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class Ut extends Ur{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}class It extends be{constructor(t,n,f){if(!n)throw new Error(`You are trying to run a Blueprint that refers to a bundled file ("blueprint" resource type), but you did not provide the rest of the bundle. This Blueprint won't work as a standalone JSON file. You'll need to load the entire bundle, e.g. a blueprint.zip file. Alternatively, you may try loading it directly from a URL or a local directory and Playground will try (with your permission) to source the missing files from paths relative to the blueprint file.`);super(),this.resource=t,this.streamBundledFile=n,this._progress=f}async resolve(){var t,n,f;(t=this.progress)==null||t.set(0);try{const u=await this.streamBundledFile(this.resource.path),s=u.filesize;if(!s)return(n=this.progress)==null||n.set(100),u;const e=br.cloneStreamMonitorProgress(u.stream(),s,p=>{var d;(d=this.progress)==null||d.set(p.detail.loaded/p.detail.total*100)});return new gr.StreamedFile(e,this.name,{filesize:s})}catch(u){throw(f=this.progress)==null||f.set(100),new Error(`Failed to read file from blueprint. This Blueprint refers to a resource of type "bundled" with path "${this.resource.path}" that was not available. Please ensure that the entire bundle, such as a blueprint.zip file, is loaded. If you are trying to load the Blueprint directly from a URL or a local directory, make sure that all the necessary files are accessible and located relative to the blueprint file.
16
+ ${s}`,t,{cause:s})}}get caption(){return`Downloading ${this.name}`}get name(){try{return new URL(this.getURL(),"http://example.com").pathname.split("/").pop()}catch{return this.getURL()}}get isAsync(){return!0}}function At(r){if(!r)return null;const t=r.match(/filename\*?=([^;]+)/i);if(!t)return null;let n=t[1].trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),t[0].includes("filename*")){const f=n.match(/^[^']*'[^']*'(.+)$/);if(f)try{n=decodeURIComponent(f[1])}catch{}}return n}const Rt=()=>{};class St extends vr{constructor(t,n,f){if(super(n,f==null?void 0:f.corsProxy),this.resource=t,this.options=f,this.resource.url.startsWith("https://github.com/")){const d=this.resource.url.match(/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/(?:blob|raw)\/(?<branch>[^/]+)\/(?<path>.+[^/])$/);d!=null&&d.groups&&(this.resource={...this.resource,url:`https://raw.githubusercontent.com/${d.groups.owner}/${d.groups.repo}/${d.groups.branch}/${d.groups.path}`})}}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class Lt extends be{constructor(t,n,f){super(),this.reference=t,this._progress=n,this.options=f}async resolve(){var f,d,s;const t=((d=(f=this.options)==null?void 0:f.additionalHeaders)==null?void 0:d.call(f,this.reference.url))??{},n=(s=this.options)!=null&&s.corsProxy?`${this.options.corsProxy}${this.reference.url}`:this.reference.url;try{const e=await ve.resolveCommitHash(n,{value:this.reference.ref,type:this.reference.refType??"infer"},t),p=await ve.listGitFiles(n,e,t),u=(this.reference.path??"").replace(/^\/+/,""),y=ve.listDescendantFiles(p,u),_=await ve.sparseCheckout(n,e,y,{withObjects:this.reference[".git"],additionalHeaders:t});let h=_.files;return h=Ft(h,k=>k.substring(u.length).replace(/^\/+/,"")),this.reference[".git"]&&(h={...await ve.createDotGitDirectory({repoUrl:this.reference.url,commitHash:e,ref:this.reference.ref,refType:this.reference.refType,objects:_.objects??[],fileOids:_.fileOids??{},pathPrefix:u}),...h}),{name:this.filename,files:h}}catch(e){throw e instanceof ve.GitAuthenticationError?new ve.GitAuthenticationError(this.reference.url,e.status):e}}get filename(){return this.name.replaceAll(/[^a-zA-Z0-9-.]/g,"-").replaceAll(/-+/g,"-").replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g,"")||I.randomFilename()}get name(){var t;return[this.reference.url,this.reference.ref?`(${this.reference.ref})`:"",(t=this.reference.path)!=null&&t.replace(/^\/+/,"")?`at ${this.reference.path}`:""].filter(n=>n.length>0).join(" ")}}function Ft(r,t){return Object.fromEntries(Object.entries(r).map(([n,f])=>[t(n),f]))}class Nt extends be{constructor(t,n){super(),this.reference=t,this._progress=n}async resolve(){return this.reference}get name(){return this.reference.name}}class xt extends vr{constructor(t,n){super(n),this.resource=t}get name(){return pr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${Ir(this.resource.slug)}`}}class Ct extends vr{constructor(t,n){super(n),this.resource=t}get name(){return pr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${Ir(this.resource.slug)}`}}function Ir(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class Dt extends Ur{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class Ut extends Ur{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}class It extends be{constructor(t,n,f){if(!n)throw new Error(`You are trying to run a Blueprint that refers to a bundled file ("blueprint" resource type), but you did not provide the rest of the bundle. This Blueprint won't work as a standalone JSON file. You'll need to load the entire bundle, e.g. a blueprint.zip file. Alternatively, you may try loading it directly from a URL or a local directory and Playground will try (with your permission) to source the missing files from paths relative to the blueprint file.`);super(),this.resource=t,this.streamBundledFile=n,this._progress=f}async resolve(){var t,n,f;(t=this.progress)==null||t.set(0);try{const d=await this.streamBundledFile(this.resource.path),s=d.filesize;if(!s)return(n=this.progress)==null||n.set(100),d;const e=br.cloneStreamMonitorProgress(d.stream(),s,p=>{var u;(u=this.progress)==null||u.set(p.detail.loaded/p.detail.total*100)});return new gr.StreamedFile(e,this.name,{filesize:s})}catch(d){throw(f=this.progress)==null||f.set(100),new Error(`Failed to read file from blueprint. This Blueprint refers to a resource of type "bundled" with path "${this.resource.path}" that was not available. Please ensure that the entire bundle, such as a blueprint.zip file, is loaded. If you are trying to load the Blueprint directly from a URL or a local directory, make sure that all the necessary files are accessible and located relative to the blueprint file.
17
17
 
18
- Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name(){return this.resource.path.split("/").pop()||""}get isAsync(){return!0}}class Wt extends be{constructor(t,n,f){super(),this.reference=t,this.innerResource=n,this._progress=f}async resolve(){var s,e;(s=this.progress)==null||s.setCaption(`Creating ZIP: ${this.name}`);const t=await this.innerResource.resolve();let n;t instanceof File?n=[t]:n=Bt(t.files,t.name);const f=gr.encodeZip(n),u=await gr.collectFile(this.name,f);return(e=this.progress)==null||e.set(100),u}get name(){if(this.reference.name)return this.reference.name;const t=this.innerResource.name;return t.endsWith(".zip")?t:`${t}.zip`}get isAsync(){return!0}}function Bt(r,t){const n=[];function f(u,s){for(const[e,p]of Object.entries(u)){const d=s?`${s}/${e}`:e;p instanceof Uint8Array?n.push(new File([p],`${t}/${d}`)):typeof p=="string"?n.push(new File([new TextEncoder().encode(p)],`${t}/${d}`)):f(p,d)}}return f(r,""),n}const Pr=async(r,{pluginPath:t,pluginName:n},f)=>{f==null||f.tracker.setCaption(`Activating ${n||t}`);const u=await r.documentRoot,s=await r.run({code:`<?php
18
+ Error details: ${d instanceof Error?d.message:String(d)}`,{cause:d})}}get name(){return this.resource.path.split("/").pop()||""}get isAsync(){return!0}}class Wt extends be{constructor(t,n,f){super(),this.reference=t,this.innerResource=n,this._progress=f}async resolve(){var s,e;(s=this.progress)==null||s.setCaption(`Creating ZIP: ${this.name}`);const t=await this.innerResource.resolve();let n;t instanceof File?n=[t]:n=Bt(t.files,t.name);const f=gr.encodeZip(n),d=await gr.collectFile(this.name,f);return(e=this.progress)==null||e.set(100),d}get name(){if(this.reference.name)return this.reference.name;const t=this.innerResource.name;return t.endsWith(".zip")?t:`${t}.zip`}get isAsync(){return!0}}function Bt(r,t){const n=[];function f(d,s){for(const[e,p]of Object.entries(d)){const u=s?`${s}/${e}`:e;p instanceof Uint8Array?n.push(new File([p],`${t}/${u}`)):typeof p=="string"?n.push(new File([new TextEncoder().encode(p)],`${t}/${u}`)):f(p,u)}}return f(r,""),n}const Pr=async(r,{pluginPath:t,pluginName:n},f)=>{f==null||f.tracker.setCaption(`Activating ${n||t}`);const d=await r.documentRoot,s=await r.run({code:`<?php
19
19
  define( 'WP_ADMIN', true );
20
20
  require_once( getenv('DOCROOT') . "/wp-load.php" );
21
21
  require_once( getenv('DOCROOT') . "/wp-admin/includes/plugin.php" );
@@ -45,7 +45,7 @@ Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name()
45
45
  } else if ( false === $response ) {
46
46
  die( "The activatePlugin step wasn't able to find the plugin $plugin_path." );
47
47
  }
48
- `,env:{PLUGIN_PATH:t,DOCROOT:u}});s.text&&ae.logger.warn(`Plugin ${t} activation printed the following bytes: ${s.text}`);const p=((await r.run({code:`<?php
48
+ `,env:{PLUGIN_PATH:t,DOCROOT:d}});s.text&&ae.logger.warn(`Plugin ${t} activation printed the following bytes: ${s.text}`);const p=((await r.run({code:`<?php
49
49
  ob_start();
50
50
  require_once( getenv( 'DOCROOT' ) . "/wp-load.php" );
51
51
 
@@ -78,9 +78,9 @@ Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name()
78
78
  }
79
79
  die('{"success": false}');
80
80
  });
81
- `,env:{DOCROOT:u,PLUGIN_PATH:t}})).text??"").trim();if(!p.endsWith('{"success": true}'))throw p!=='{"success": false}'&&ae.logger.debug(p),new Error(`Plugin ${t} could not be activated - WordPress exited with exit code ${s.exitCode}. Inspect the "debug" logs in the console for more details. Output headers: ${JSON.stringify(s.headers,null,2)}`)},_r=async(r,{themeFolderName:t},n)=>{n==null||n.tracker.setCaption(`Activating ${t}`);const f=await r.documentRoot,u=`${f}/wp-content/themes/${t}`;if(!await r.fileExists(u))throw new Error(`
81
+ `,env:{DOCROOT:d,PLUGIN_PATH:t}})).text??"").trim();if(!p.endsWith('{"success": true}'))throw p!=='{"success": false}'&&ae.logger.debug(p),new Error(`Plugin ${t} could not be activated - WordPress exited with exit code ${s.exitCode}. Inspect the "debug" logs in the console for more details. Output headers: ${JSON.stringify(s.headers,null,2)}`)},_r=async(r,{themeFolderName:t},n)=>{n==null||n.tracker.setCaption(`Activating ${t}`);const f=await r.documentRoot,d=`${f}/wp-content/themes/${t}`;if(!await r.fileExists(d))throw new Error(`
82
82
  Couldn't activate theme ${t}.
83
- Theme not found at the provided theme path: ${u}.
83
+ Theme not found at the provided theme path: ${d}.
84
84
  Check the theme path to ensure it's correct.
85
85
  If the theme is not installed, you can install it using the installTheme step.
86
86
  More info can be found in the Blueprint documentation: https://wordpress.github.io/wordpress-playground/blueprints/steps/#ActivateThemeStep
@@ -288,7 +288,7 @@ class WP_MySQL_Naive_Query_Stream {
288
288
  return $this->state;
289
289
  }
290
290
 
291
- }`,Mr=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const f=`/tmp/${I.randomFilename()}.sql`,u=`/tmp/${I.randomFilename()}.php`;await r.writeFile(f,new Uint8Array(await t.arrayBuffer())),await r.writeFile(u,new TextEncoder().encode(Mt));const s=await r.documentRoot,e=I.phpVars({docroot:s,sqlFilename:f,streamClassFilename:u}),p=await r.run({code:`<?php
291
+ }`,Mr=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const f=`/tmp/${I.randomFilename()}.sql`,d=`/tmp/${I.randomFilename()}.php`;await r.writeFile(f,new Uint8Array(await t.arrayBuffer())),await r.writeFile(d,new TextEncoder().encode(Mt));const s=await r.documentRoot,e=I.phpVars({docroot:s,sqlFilename:f,streamClassFilename:d}),p=await r.run({code:`<?php
292
292
  define('WP_SQLITE_AST_DRIVER', true);
293
293
  require_once ${e.docroot} . '/wp-load.php';
294
294
 
@@ -332,7 +332,7 @@ class WP_MySQL_Naive_Query_Stream {
332
332
  $query = $stream->get_query();
333
333
  $wpdb->query($query);
334
334
  }
335
- `});return await nr(r,{path:f}),await nr(r,{path:u}),p},Vr=async(r,{request:t})=>{ae.logger.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const n=await r.request(t);if(n.httpStatusCode>399||n.httpStatusCode<200)throw ae.logger.warn("WordPress response was",{response:n}),new Error(`Request failed with status ${n.httpStatusCode}`);return n},lr=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await Vt(r,t);break;case"rewrite-wp-config":{const f=await r.documentRoot,u=I.joinPaths(f,"/wp-config.php");await xr.defineWpConfigConstants(r,u,t,"rewrite");break}default:throw new Error(`Invalid method: ${n}`)}};async function Vt(r,t){for(const n in t)await r.defineConstant(n,t[n])}const kr=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
335
+ `});return await nr(r,{path:f}),await nr(r,{path:d}),p},Vr=async(r,{request:t})=>{ae.logger.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const n=await r.request(t);if(n.httpStatusCode>399||n.httpStatusCode<200)throw ae.logger.warn("WordPress response was",{response:n}),new Error(`Request failed with status ${n.httpStatusCode}`);return n},lr=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await Vt(r,t);break;case"rewrite-wp-config":{const f=await r.documentRoot,d=I.joinPaths(f,"/wp-config.php");await xr.defineWpConfigConstants(r,d,t,"rewrite");break}default:throw new Error(`Invalid method: ${n}`)}};async function Vt(r,t){for(const n in t)await r.defineConstant(n,t[n])}const kr=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
336
336
  include ${I.phpVar(n)} . '/wp-load.php';
337
337
  $site_options = ${I.phpVar(t)};
338
338
  foreach($site_options as $name => $value) {
@@ -351,7 +351,7 @@ class WP_MySQL_Naive_Query_Stream {
351
351
  "extraLibraries": [ "wp-cli" ]
352
352
  }
353
353
  Read more about it in the documentation.
354
- https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},Er=async(r,{command:t,wpCliPath:n=Or})=>{await Hr(r,n);let f;if(typeof t=="string"?(t=t.trim(),f=Ht(t)):f=t,f.shift()!=="wp")throw new Error('The first argument must be "wp".');let s=!1;const e=f.map(g=>g.startsWith("wordpress/")?(s=!0,`/${g}`):g);s&&ae.logger.error(`
354
+ https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},Er=async(r,{command:t,wpCliPath:n=Or})=>{await Hr(r,n);let f;if(typeof t=="string"?(t=t.trim(),f=Ht(t)):f=t,f.shift()!=="wp")throw new Error('The first argument must be "wp".');let s=!1;const e=f.map(y=>y.startsWith("wordpress/")?(s=!0,`/${y}`):y);s&&ae.logger.error(`
355
355
  The wp-cli step in your Blueprint refers to a relative path.
356
356
 
357
357
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -398,7 +398,9 @@ This will ensure your code works reliably regardless of the current working dire
398
398
  define('STDERR', fopen('php://stderr', 'wb'));
399
399
 
400
400
  require( ${I.phpVar(n)} );
401
- `);const d=await r.run({scriptPath:I.joinPaths(p,"run-cli.php")});if(d.exitCode!==0)throw new Error(d.errors);return d};function Ht(r){let f=0,u="";const s=[];let e="";for(let p=0;p<r.length;p++){const d=r[p];f===0?d==='"'||d==="'"?(f=1,u=d):d.match(/\s/)?(e&&s.push(e),e=""):e+=d:f===1&&(d==="\\"?(p++,e+=r[p]):d===u?(f=0,u=""):e+=d)}return e&&s.push(e),s}const Qr=async(r,{wpCliPath:t})=>{await Hr(r,t),await lr(r,{consts:{WP_ALLOW_MULTISITE:1}});const n=new URL(await r.absoluteUrl);if(n.port!==""){let s=`The current host is ${n.host}, but WordPress multisites do not support custom ports.`;throw n.hostname==="localhost"&&(s+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(s)}const f=n.pathname.replace(/\/$/,"")+"/",u=`${n.protocol}//${n.hostname}${f}`;await kr(r,{options:{siteurl:u,home:u}}),await Er(r,{command:`wp core multisite-convert --base="${f}"`})},Yr=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&ae.logger.error(`
401
+ `);const u=await r.run({scriptPath:I.joinPaths(p,"run-cli.php")});if(u.exitCode!==0)throw new Error(u.errors);return u};function Ht(r){let f=0,d="";const s=[];let e="";for(let p=0;p<r.length;p++){const u=r[p];f===0?u==='"'||u==="'"?(f=1,d=u):u.match(/\s/)?(e&&s.push(e),e=""):e+=u:f===1&&(u==="\\"?(p++,e+=r[p]):u===d?(f=0,d=""):e+=u)}return e&&s.push(e),s}const Qr=async(r,{wpCliPath:t})=>{await Hr(r,t),await lr(r,{consts:{WP_ALLOW_MULTISITE:1}});const n=new URL(await r.absoluteUrl);if(n.port!==""){let y=`The current host is ${n.host}, but WordPress multisites do not support custom ports.`;throw n.hostname==="localhost"&&(y+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(y)}const f=n.pathname.replace(/\/$/,"")+"/",d=`${n.protocol}//${n.hostname}${f}`;await kr(r,{options:{siteurl:d,home:d}}),await Er(r,{command:`wp core multisite-convert --base="${f}"`});const e=`${await r.documentRoot}/wp-config.php`,p=await r.readFileAsText(e);let u=p;p.includes("$_SERVER['HTTP_HOST']")||(u=p.replace(/^<\?php\s*/i,`<?php
402
+ $_SERVER['HTTP_HOST'] = ${I.phpVar(n.hostname)};
403
+ `)),await r.writeFile(e,u)},Yr=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&ae.logger.error(`
402
404
  The cp() step in your Blueprint refers to a relative path.
403
405
 
404
406
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -531,7 +533,7 @@ This will ensure your code works reliably regardless of the current working dire
531
533
  $wp_import->import( getenv('IMPORT_FILE'), [
532
534
  'rewrite_urls' => true,
533
535
  ] );
534
- `,env:{IMPORT_FILE:"/tmp/import.wxr",FETCH_ATTACHMENTS:"true"}})}const $r=async(r,{themeSlug:t=""},n)=>{var u;(u=n==null?void 0:n.tracker)==null||u.setCaption("Importing theme starter content");const f=await r.documentRoot;await r.run({code:`<?php
536
+ `,env:{IMPORT_FILE:"/tmp/import.wxr",FETCH_ATTACHMENTS:"true"}})}const $r=async(r,{themeSlug:t=""},n)=>{var d;(d=n==null?void 0:n.tracker)==null||d.setCaption("Importing theme starter content");const f=await r.documentRoot;await r.run({code:`<?php
535
537
 
536
538
  /**
537
539
  * Ensure that the customizer loads as an admin user.
@@ -578,10 +580,10 @@ This will ensure your code works reliably regardless of the current working dire
578
580
 
579
581
  // Publish the changeset, which publishes the starter content.
580
582
  wp_publish_post( $wp_customize->changeset_post_id() );
581
- `})},ur=async(r,{zipFile:t,zipPath:n,extractToPath:f})=>{if(n)ae.logger.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 wr.unzipFile(r,t||n,f)},jr=["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"],et=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const f=await r.documentRoot;let u=I.joinPaths("/tmp","import");await r.mkdir(u),await ur(r,{zipFile:t,extractToPath:u}),u=I.joinPaths(u,n);const s=I.joinPaths(u,"playground-export.json");let e=null;if(await r.fileExists(s))try{const T=await r.readFileAsText(s);e=JSON.parse(T).siteUrl,await r.unlink(s)}catch{}const p=I.joinPaths(u,"wp-content"),d=I.joinPaths(f,"wp-content");for(const T of jr){const $=I.joinPaths(p,T);await Lr(r,$);const h=I.joinPaths(d,T);await r.fileExists(h)&&(await r.mkdir(I.dirname($)),await r.mv(h,$))}const g=I.joinPaths(u,"wp-content","database");await r.fileExists(g)||await r.mv(I.joinPaths(f,"wp-content","database"),g);const _=await r.listFiles(u);for(const T of _)await Lr(r,I.joinPaths(f,T)),await r.mv(I.joinPaths(u,T),I.joinPaths(f,T));await r.rmdir(u),await xr.ensureWpConfig(r,f);const y=await r.absoluteUrl;e||(e=await Zt(r,f)),await Tr(r,{siteUrl:y});const k=I.phpVar(I.joinPaths(f,"wp-admin","upgrade.php"));await r.run({code:`<?php
583
+ `})},ur=async(r,{zipFile:t,zipPath:n,extractToPath:f})=>{if(n)ae.logger.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 wr.unzipFile(r,t||n,f)},jr=["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"],et=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const f=await r.documentRoot;let d=I.joinPaths("/tmp","import");await r.mkdir(d),await ur(r,{zipFile:t,extractToPath:d}),d=I.joinPaths(d,n);const s=I.joinPaths(d,"playground-export.json");let e=null;if(await r.fileExists(s))try{const T=await r.readFileAsText(s);e=JSON.parse(T).siteUrl,await r.unlink(s)}catch{}const p=I.joinPaths(d,"wp-content"),u=I.joinPaths(f,"wp-content");for(const T of jr){const $=I.joinPaths(p,T);await Lr(r,$);const g=I.joinPaths(u,T);await r.fileExists(g)&&(await r.mkdir(I.dirname($)),await r.mv(g,$))}const y=I.joinPaths(d,"wp-content","database");await r.fileExists(y)||await r.mv(I.joinPaths(f,"wp-content","database"),y);const _=await r.listFiles(d);for(const T of _)await Lr(r,I.joinPaths(f,T)),await r.mv(I.joinPaths(d,T),I.joinPaths(f,T));await r.rmdir(d),await xr.ensureWpConfig(r,f);const h=await r.absoluteUrl;e||(e=await Zt(r,f)),await Tr(r,{siteUrl:h});const k=I.phpVar(I.joinPaths(f,"wp-admin","upgrade.php"));await r.run({code:`<?php
582
584
  $_GET['step'] = 'upgrade_db';
583
585
  require ${k};
584
- `}),e&&e!==y&&await Yt(r,f,e,y)};function Rr(r){const t=r.match(/\/scope:[^/]+\/?/);return t?t[0].replace(/\/?$/,"/"):null}async function Yt(r,t,n,f){const u=Rr(n),s=Rr(f);!u||!s||u!==s&&await r.run({code:`<?php
586
+ `}),e&&e!==h&&await Yt(r,f,e,h)};function Sr(r){const t=r.match(/\/scope:[^/]+\/?/);return t?t[0].replace(/\/?$/,"/"):null}async function Yt(r,t,n,f){const d=Sr(n),s=Sr(f);!d||!s||d!==s&&await r.run({code:`<?php
585
587
  require_once getenv('DOCUMENT_ROOT') . '/wp-load.php';
586
588
  global $wpdb;
587
589
 
@@ -635,12 +637,12 @@ This will ensure your code works reliably regardless of the current working dire
635
637
  "UPDATE {$wpdb->comments} SET comment_author_url = REPLACE(comment_author_url, %s, %s) WHERE comment_author_url LIKE %s",
636
638
  $old_scope, $new_scope, '%' . $wpdb->esc_like($old_scope) . '%'
637
639
  ));
638
- `,env:{DOCUMENT_ROOT:t,OLD_SCOPE:u,NEW_SCOPE:s}})}async function Zt(r,t){const n=I.phpVars({documentRoot:t});return(await r.run({code:`<?php
640
+ `,env:{DOCUMENT_ROOT:t,OLD_SCOPE:d,NEW_SCOPE:s}})}async function Zt(r,t){const n=I.phpVars({documentRoot:t});return(await r.run({code:`<?php
639
641
  require_once ${n.documentRoot} . '/wp-load.php';
640
642
  global $wpdb;
641
643
  $row = $wpdb->get_row("SELECT option_value FROM {$wpdb->options} WHERE option_name = 'siteurl'");
642
644
  echo $row ? $row->option_value : '';
643
- `})).text.trim()||null}async function Lr(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function rt(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function tt(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:f="overwrite",targetFolderName:u=""}){const e=n.name.replace(/\.zip$/,""),p=I.joinPaths(await r.documentRoot,"wp-content"),d=I.joinPaths(p,I.randomFilename()),g=I.joinPaths(d,"assets",e);await r.fileExists(g)&&await r.rmdir(d,{recursive:!0}),await r.mkdir(d);try{await ur(r,{zipFile:n,extractToPath:g});let _=await r.listFiles(g,{prependPath:!0});_=_.filter(h=>!h.endsWith("/__MACOSX"));const y=_.length===1&&await r.isDir(_[0]);let k,T="";y?(T=_[0],k=_[0].split("/").pop()):(T=g,k=e),u&&u.length&&(k=u);const $=`${t}/${k}`;if(await r.fileExists($)){if(!await r.isDir($))throw new Error(`Cannot install asset ${k} to ${$} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(f==="overwrite")await r.rmdir($,{recursive:!0});else{if(f==="skip")return{assetFolderPath:$,assetFolderName:k};throw new Error(`Cannot install asset ${k} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${f}`)}}return await r.mv(T,$),{assetFolderPath:$,assetFolderName:k}}finally{await r.rmdir(d,{recursive:!0})}}const st=async(r,{pluginData:t,pluginZipFile:n,ifAlreadyInstalled:f,options:u={}},s)=>{n&&(t=n,ae.logger.warn('The "pluginZipFile" option is deprecated. Use "pluginData" instead.'));const e=I.joinPaths(await r.documentRoot,"wp-content","plugins"),p="targetFolderName"in u?u.targetFolderName:"";let d="",g="";const _=async k=>{if(k.name.toLowerCase().endsWith(".zip"))return!0;const T=new Uint8Array(await k.arrayBuffer(),0,4);return T[0]===80&&T[1]===75&&T[2]===3&&T[3]===4};if(t instanceof File)if(await _(t)){const k=t.name.split("/").pop()||"plugin.zip";g=pr(k),s==null||s.tracker.setCaption(`Installing the ${g} plugin`);const T=await tt(r,{ifAlreadyInstalled:f,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`,targetFolderName:p});d=T.assetFolderPath,g=T.assetFolderName}else if(t.name.endsWith(".php")){const k=I.joinPaths(e,t.name);await fr(r,{path:k,data:t}),d=e,g=t.name}else throw new Error("pluginData looks like a file but does not look like a .zip or .php file.");else if(t){g=t.name,s==null||s.tracker.setCaption(`Installing the ${g} plugin`);const k=I.joinPaths(e,p||t.name);await We.writeFiles(r,k,t.files,{rmRoot:!0}),d=k}("activate"in u?u.activate:!0)&&await Pr(r,{pluginPath:d,pluginName:g},s)},it=async(r,{themeData:t,themeZipFile:n,ifAlreadyInstalled:f,options:u={}},s)=>{n&&(t=n,ae.logger.warn('The "themeZipFile" option is deprecated. Use "themeData" instead.'));const e="targetFolderName"in u?u.targetFolderName:"";let p="",d="";if(t instanceof File){const y=t.name.split("/").pop()||"theme.zip";d=pr(y),s==null||s.tracker.setCaption(`Installing the ${d} theme`),p=(await tt(r,{ifAlreadyInstalled:f,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`,targetFolderName:e})).assetFolderName}else{d=t.name,p=e||d,s==null||s.tracker.setCaption(`Installing the ${d} theme`);const y=I.joinPaths(await r.documentRoot,"wp-content","themes",p);await We.writeFiles(r,y,t.files,{rmRoot:!0})}("activate"in u?u.activate:!0)&&await _r(r,{themeFolderName:p},s),("importStarterContent"in u?u.importStarterContent:!1)&&await $r(r,{themeSlug:p},s)},ot=async(r,{username:t="admin"}={},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Logging in"),r.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER",t)},at=async(r,t,n)=>{var u;(u=n==null?void 0:n.tracker)==null||u.setCaption("Resetting WordPress data");const f=await r.documentRoot;await r.run({env:{DOCROOT:f},code:`<?php
645
+ `})).text.trim()||null}async function Lr(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function rt(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function tt(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:f="overwrite",targetFolderName:d=""}){const e=n.name.replace(/\.zip$/,""),p=I.joinPaths(await r.documentRoot,"wp-content"),u=I.joinPaths(p,I.randomFilename()),y=I.joinPaths(u,"assets",e);await r.fileExists(y)&&await r.rmdir(u,{recursive:!0}),await r.mkdir(u);try{await ur(r,{zipFile:n,extractToPath:y});let _=await r.listFiles(y,{prependPath:!0});_=_.filter(g=>!g.endsWith("/__MACOSX"));const h=_.length===1&&await r.isDir(_[0]);let k,T="";h?(T=_[0],k=_[0].split("/").pop()):(T=y,k=e),d&&d.length&&(k=d);const $=`${t}/${k}`;if(await r.fileExists($)){if(!await r.isDir($))throw new Error(`Cannot install asset ${k} to ${$} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(f==="overwrite")await r.rmdir($,{recursive:!0});else{if(f==="skip")return{assetFolderPath:$,assetFolderName:k};throw new Error(`Cannot install asset ${k} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${f}`)}}return await r.mv(T,$),{assetFolderPath:$,assetFolderName:k}}finally{await r.rmdir(u,{recursive:!0})}}const st=async(r,{pluginData:t,pluginZipFile:n,ifAlreadyInstalled:f,options:d={}},s)=>{n&&(t=n,ae.logger.warn('The "pluginZipFile" option is deprecated. Use "pluginData" instead.'));const e=I.joinPaths(await r.documentRoot,"wp-content","plugins"),p="targetFolderName"in d?d.targetFolderName:"";let u="",y="";const _=async k=>{if(k.name.toLowerCase().endsWith(".zip"))return!0;const T=new Uint8Array(await k.arrayBuffer(),0,4);return T[0]===80&&T[1]===75&&T[2]===3&&T[3]===4};if(t instanceof File)if(await _(t)){const k=t.name.split("/").pop()||"plugin.zip";y=pr(k),s==null||s.tracker.setCaption(`Installing the ${y} plugin`);const T=await tt(r,{ifAlreadyInstalled:f,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`,targetFolderName:p});u=T.assetFolderPath,y=T.assetFolderName}else if(t.name.endsWith(".php")){const k=I.joinPaths(e,t.name);await fr(r,{path:k,data:t}),u=e,y=t.name}else throw new Error("pluginData looks like a file but does not look like a .zip or .php file.");else if(t){y=t.name,s==null||s.tracker.setCaption(`Installing the ${y} plugin`);const k=I.joinPaths(e,p||t.name);await We.writeFiles(r,k,t.files,{rmRoot:!0}),u=k}("activate"in d?d.activate:!0)&&await Pr(r,{pluginPath:u,pluginName:y},s)},it=async(r,{themeData:t,themeZipFile:n,ifAlreadyInstalled:f,options:d={}},s)=>{n&&(t=n,ae.logger.warn('The "themeZipFile" option is deprecated. Use "themeData" instead.'));const e="targetFolderName"in d?d.targetFolderName:"";let p="",u="";if(t instanceof File){const h=t.name.split("/").pop()||"theme.zip";u=pr(h),s==null||s.tracker.setCaption(`Installing the ${u} theme`),p=(await tt(r,{ifAlreadyInstalled:f,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`,targetFolderName:e})).assetFolderName}else{u=t.name,p=e||u,s==null||s.tracker.setCaption(`Installing the ${u} theme`);const h=I.joinPaths(await r.documentRoot,"wp-content","themes",p);await We.writeFiles(r,h,t.files,{rmRoot:!0})}("activate"in d?d.activate:!0)&&await _r(r,{themeFolderName:p},s),("importStarterContent"in d?d.importStarterContent:!1)&&await $r(r,{themeSlug:p},s)},ot=async(r,{username:t="admin"}={},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Logging in"),r.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER",t)},at=async(r,t,n)=>{var d;(d=n==null?void 0:n.tracker)==null||d.setCaption("Resetting WordPress data");const f=await r.documentRoot;await r.run({env:{DOCROOT:f},code:`<?php
644
646
  require getenv('DOCROOT') . '/wp-load.php';
645
647
 
646
648
  $GLOBALS['@pdo']->query('DELETE FROM wp_posts WHERE id > 0');
@@ -654,10 +656,10 @@ This will ensure your code works reliably regardless of the current working dire
654
656
 
655
657
  $GLOBALS['@pdo']->query('DELETE FROM wp_commentmeta');
656
658
  $GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
657
- `})},nt=async(r,{options:t})=>{await r.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:t.adminPassword||"admin",admin_password:t.adminPassword||"password",admin_password2:t.adminPassword||"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})},pt=async(r,{selfContained:t=!1}={})=>{const n="/tmp/wordpress-playground.zip",f="/tmp/playground-export.json",u=await r.documentRoot,s=I.joinPaths(u,"wp-content"),e=await r.absoluteUrl;await r.writeFile(f,new TextEncoder().encode(JSON.stringify({siteUrl:e})));let p=jr;t&&(p=p.filter(y=>!y.startsWith("themes/twenty")).filter(y=>y!=="mu-plugins/sqlite-database-integration"));const d={[f]:"playground-export.json"};t&&(d[I.joinPaths(u,"wp-config.php")]="wp-config.php");const g=I.phpVars({zipPath:n,wpContentPath:s,documentRoot:u,exceptPaths:p.map(y=>I.joinPaths(u,"wp-content",y)),additionalPaths:d});await Jt(r,`zipDir(${g.wpContentPath}, ${g.zipPath}, array(
658
- 'exclude_paths' => ${g.exceptPaths},
659
- 'zip_root' => ${g.documentRoot},
660
- 'additional_paths' => ${g.additionalPaths}
659
+ `})},nt=async(r,{options:t})=>{await r.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:t.adminPassword||"admin",admin_password:t.adminPassword||"password",admin_password2:t.adminPassword||"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})},pt=async(r,{selfContained:t=!1}={})=>{const n="/tmp/wordpress-playground.zip",f="/tmp/playground-export.json",d=await r.documentRoot,s=I.joinPaths(d,"wp-content"),e=await r.absoluteUrl;await r.writeFile(f,new TextEncoder().encode(JSON.stringify({siteUrl:e})));let p=jr;t&&(p=p.filter(h=>!h.startsWith("themes/twenty")).filter(h=>h!=="mu-plugins/sqlite-database-integration"));const u={[f]:"playground-export.json"};t&&(u[I.joinPaths(d,"wp-config.php")]="wp-config.php");const y=I.phpVars({zipPath:n,wpContentPath:s,documentRoot:d,exceptPaths:p.map(h=>I.joinPaths(d,"wp-content",h)),additionalPaths:u});await Jt(r,`zipDir(${y.wpContentPath}, ${y.zipPath}, array(
660
+ 'exclude_paths' => ${y.exceptPaths},
661
+ 'zip_root' => ${y.documentRoot},
662
+ 'additional_paths' => ${y.additionalPaths}
661
663
  ));`);const _=await r.readFileAsBuffer(n);return r.unlink(n),r.unlink(f),_},Gt=`<?php
662
664
 
663
665
  function zipDir($root, $output, $options = array())
@@ -718,10 +720,10 @@ function join_paths()
718
720
 
719
721
  return preg_replace('#/+#', '/', join('/', $paths));
720
722
  }
721
- `;async function Jt(r,t){return await r.run({code:Gt+t})}const Xt=async(r,t)=>{const u=(await(await fetch(`https://api.wordpress.org/translations/core/1.0/?version=${r}`)).json()).translations.find(s=>s.language.toLowerCase()===t.toLowerCase());if(!u)throw new Error(`Failed to get ${t} translation package for WordPress ${r}.`);return u.package},lt=async(r,{language:t},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Translating"),await r.defineConstant("WPLANG",t);const f=await r.documentRoot,u=(await r.run({code:`<?php
723
+ `;async function Jt(r,t){return await r.run({code:Gt+t})}const Xt=async(r,t)=>{const d=(await(await fetch(`https://api.wordpress.org/translations/core/1.0/?version=${r}`)).json()).translations.find(s=>s.language.toLowerCase()===t.toLowerCase());if(!d)throw new Error(`Failed to get ${t} translation package for WordPress ${r}.`);return d.package},lt=async(r,{language:t},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Translating"),await r.defineConstant("WPLANG",t);const f=await r.documentRoot,d=(await r.run({code:`<?php
722
724
  require '${f}/wp-includes/version.php';
723
725
  echo $wp_version;
724
- `})).text,s=[{url:await Xt(u,t),type:"core"}],p=(await r.run({code:`<?php
726
+ `})).text,s=[{url:await Xt(d,t),type:"core"}],p=(await r.run({code:`<?php
725
727
  require_once('${f}/wp-load.php');
726
728
  require_once('${f}/wp-admin/includes/plugin.php');
727
729
  echo json_encode(
@@ -741,7 +743,7 @@ function join_paths()
741
743
  )
742
744
  )
743
745
  )
744
- );`})).json;for(const{slug:k,version:T}of p)s.push({url:`https://downloads.wordpress.org/translation/plugin/${k}/${T}/${t}.zip`,type:"plugin"});const g=(await r.run({code:`<?php
746
+ );`})).json;for(const{slug:k,version:T}of p)s.push({url:`https://downloads.wordpress.org/translation/plugin/${k}/${T}/${t}.zip`,type:"plugin"});const y=(await r.run({code:`<?php
745
747
  require_once('${f}/wp-load.php');
746
748
  require_once('${f}/wp-admin/includes/theme.php');
747
749
  echo json_encode(
@@ -756,28 +758,28 @@ function join_paths()
756
758
  wp_get_themes()
757
759
  )
758
760
  )
759
- );`})).json;for(const{slug:k,version:T}of g)s.push({url:`https://downloads.wordpress.org/translation/theme/${k}/${T}/${t}.zip`,type:"theme"});await r.isDir(`${f}/wp-content/languages/plugins`)||await r.mkdir(`${f}/wp-content/languages/plugins`),await r.isDir(`${f}/wp-content/languages/themes`)||await r.mkdir(`${f}/wp-content/languages/themes`);const _=new I.Semaphore({concurrency:5}),y=s.map(({url:k,type:T})=>_.run(async()=>{try{const $=await fetch(k);if(!$.ok)throw new Error(`Failed to download translations for ${T}: ${$.statusText}`);let h=`${f}/wp-content/languages`;T==="plugin"?h+="/plugins":T==="theme"&&(h+="/themes"),await wr.unzipFile(r,new File([await $.arrayBuffer()],`${t}-${T}.zip`),h)}catch($){if(T==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${t} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);ae.logger.warn(`Error downloading translations for ${T}: ${$}`)}}));await Promise.all(y)},Kt=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:Pr,activateTheme:_r,cp:Yr,defineSiteUrl:Tr,defineWpConfigConsts:lr,enableMultisite:Qr,exportWXR:rt,importThemeStarterContent:$r,importWordPressFiles:et,importWxr:Kr,installPlugin:st,installTheme:it,login:ot,mkdir:Gr,mv:Zr,request:Vr,resetData:at,rm:nr,rmdir:Jr,runPHP:Wr,runPHPWithOptions:Br,runSql:Mr,runWpInstallationWizard:nt,setSiteLanguage:lt,setSiteOptions:kr,unzip:ur,updateUserMeta:zr,wpCLI:Er,writeFile:fr,writeFiles:Xr,zipWpContent:pt},Symbol.toStringTag,{value:"Module"})),es={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/BlueprintPHPVersion"},{type:"string",const:"latest"}],description:`The preferred PHP version to use. If not specified, the latest supported version will be used.
761
+ );`})).json;for(const{slug:k,version:T}of y)s.push({url:`https://downloads.wordpress.org/translation/theme/${k}/${T}/${t}.zip`,type:"theme"});await r.isDir(`${f}/wp-content/languages/plugins`)||await r.mkdir(`${f}/wp-content/languages/plugins`),await r.isDir(`${f}/wp-content/languages/themes`)||await r.mkdir(`${f}/wp-content/languages/themes`);const _=new I.Semaphore({concurrency:5}),h=s.map(({url:k,type:T})=>_.run(async()=>{try{const $=await fetch(k);if(!$.ok)throw new Error(`Failed to download translations for ${T}: ${$.statusText}`);let g=`${f}/wp-content/languages`;T==="plugin"?g+="/plugins":T==="theme"&&(g+="/themes"),await wr.unzipFile(r,new File([await $.arrayBuffer()],`${t}-${T}.zip`),g)}catch($){if(T==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${t} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);ae.logger.warn(`Error downloading translations for ${T}: ${$}`)}}));await Promise.all(h)},Kt=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:Pr,activateTheme:_r,cp:Yr,defineSiteUrl:Tr,defineWpConfigConsts:lr,enableMultisite:Qr,exportWXR:rt,importThemeStarterContent:$r,importWordPressFiles:et,importWxr:Kr,installPlugin:st,installTheme:it,login:ot,mkdir:Gr,mv:Zr,request:Vr,resetData:at,rm:nr,rmdir:Jr,runPHP:Wr,runPHPWithOptions:Br,runSql:Mr,runWpInstallationWizard:nt,setSiteLanguage:lt,setSiteOptions:kr,unzip:ur,updateUserMeta:zr,wpCLI:Er,writeFile:fr,writeFiles:Xr,zipWpContent:pt},Symbol.toStringTag,{value:"Module"})),es={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/BlueprintPHPVersion"},{type:"string",const:"latest"}],description:`The preferred PHP version to use. If not specified, the latest supported version will be used.
760
762
 
761
- Note: PHP 7.2 and 7.3 are deprecated and will be automatically upgraded to 7.4.`},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:{intl:{type:"boolean",description:"Should boot with support for Intl dynamic extension"},networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},extraLibraries:{type:"array",items:{$ref:"#/definitions/ExtraLibrary"},description:"Extra libraries to preload into the Playground instance."},constants:{$ref:"#/definitions/PHPConstants",description:"PHP Constants to define on every request"},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:{deprecated:"No longer used. Feel free to remove it from your Blueprint."},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"}}},rs={additionalProperties:{type:["string","boolean","number"]}},ft=Object.prototype.hasOwnProperty,ts={enum:["8.5","8.4","8.3","8.2","8.1","8.0","7.4"]};function Ie(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;const p=e;let d=!1;const g=e;if(typeof r!="string"){const y={instancePath:t,schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[y]:s.push(y),e++}if(!(r==="8.5"||r==="8.4"||r==="8.3"||r==="8.2"||r==="8.1"||r==="8.0"||r==="7.4")){const y={instancePath:t,schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:ts.enum},message:"must be equal to one of the allowed values"};s===null?s=[y]:s.push(y),e++}var _=g===e;if(d=d||_,!d){const y=e;if(typeof r!="string"){const T={instancePath:t,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[T]:s.push(T),e++}if(r!=="7.2"){const T={instancePath:t,schemaPath:"#/anyOf/1/const",keyword:"const",params:{allowedValue:"7.2"},message:"must be equal to constant"};s===null?s=[T]:s.push(T),e++}var _=y===e;if(d=d||_,!d){const T=e;if(typeof r!="string"){const h={instancePath:t,schemaPath:"#/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[h]:s.push(h),e++}if(r!=="7.3"){const h={instancePath:t,schemaPath:"#/anyOf/2/const",keyword:"const",params:{allowedValue:"7.3"},message:"must be equal to constant"};s===null?s=[h]:s.push(h),e++}var _=T===e;d=d||_}}if(d)e=p,s!==null&&(p?s.length=p:s=null);else{const y={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[y]:s.push(y),e++,Ie.errors=s,!1}return Ie.errors=s,e===0}const yr={validate:G},ss={enum:["branch","tag","commit","refname"]};function de(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.resource===void 0&&(d="resource")||r.url===void 0&&(d="url")||r.ref===void 0&&(d="ref"))return de.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;for(const g in r)if(!(g==="resource"||g==="url"||g==="ref"||g==="refType"||g==="path"||g===".git"))return de.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"}],!1;{if(r.resource!==void 0){let g=r.resource;const _=e;if(typeof g!="string")return de.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(g!=="git:directory")return de.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"git:directory"},message:"must be equal to constant"}],!1;var p=_===e}else var p=!0;if(p){if(r.url!==void 0){const g=e;if(typeof r.url!="string")return de.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=g===e}else var p=!0;if(p){if(r.ref!==void 0){const g=e;if(typeof r.ref!="string")return de.errors=[{instancePath:t+"/ref",schemaPath:"#/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=g===e}else var p=!0;if(p){if(r.refType!==void 0){let g=r.refType;const _=e;if(typeof g!="string")return de.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(g==="branch"||g==="tag"||g==="commit"||g==="refname"))return de.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/enum",keyword:"enum",params:{allowedValues:ss.enum},message:"must be equal to one of the allowed values"}],!1;var p=_===e}else var p=!0;if(p){if(r.path!==void 0){const g=e;if(typeof r.path!="string")return de.errors=[{instancePath:t+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=g===e}else var p=!0;if(p)if(r[".git"]!==void 0){const g=e;if(typeof r[".git"]!="boolean")return de.errors=[{instancePath:t+"/.git",schemaPath:"#/properties/.git/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var p=g===e}else var p=!0}}}}}}else return de.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return de.errors=s,e===0}const is={additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]}},hr={validate:xe};function xe(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r))for(const g in r){let _=r[g];const y=e,k=e;let T=!1;const $=e;hr.validate(_,{instancePath:t+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:g,rootData:u})||(s=s===null?hr.validate.errors:s.concat(hr.validate.errors),e=s.length);var p=$===e;if(T=T||p,!T){const h=e;if(!(_&&typeof _=="object"&&!Array.isArray(_))&&typeof _!="string"){const K={instancePath:t+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:is.additionalProperties.anyOf[1].type},message:"must be object,string"};s===null?s=[K]:s.push(K),e++}var p=h===e;T=T||p}if(T)e=k,s!==null&&(k?s.length=k:s=null);else{const h={instancePath:t+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[h]:s.push(h),e++,xe.errors=s,!1}var d=y===e;if(!d)break}else return xe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return xe.errors=s,e===0}function $e(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.files===void 0&&(d="files")||r.name===void 0&&(d="name")||r.resource===void 0&&(d="resource"))return $e.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const g=e;for(const _ in r)if(!(_==="resource"||_==="files"||_==="name"))return $e.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;if(g===e){if(r.resource!==void 0){let _=r.resource;const y=e;if(typeof _!="string")return $e.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(_!=="literal:directory")return $e.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var p=y===e}else var p=!0;if(p){if(r.files!==void 0){const _=e;xe(r.files,{instancePath:t+"/files",parentData:r,parentDataProperty:"files",rootData:u})||(s=s===null?xe.errors:s.concat(xe.errors),e=s.length);var p=_===e}else var p=!0;if(p)if(r.name!==void 0){const _=e;if(typeof r.name!="string")return $e.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=_===e}else var p=!0}}}}else return $e.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return $e.errors=s,e===0}function ce(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;const p=e;let d=!1;const g=e;de(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?de.errors:s.concat(de.errors),e=s.length);var _=g===e;if(d=d||_,!d){const y=e;$e(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?$e.errors:s.concat($e.errors),e=s.length);var _=y===e;d=d||_}if(d)e=p,s!==null&&(p?s.length=p:s=null);else{const y={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[y]:s.push(y),e++,ce.errors=s,!1}return ce.errors=s,e===0}function we(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let g;if(r.resource===void 0&&(g="resource")||r.inner===void 0&&(g="inner"))return we.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"}],!1;{const _=e;for(const y in r)if(!(y==="resource"||y==="inner"||y==="name"))return we.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"}],!1;if(_===e){if(r.resource!==void 0){let y=r.resource;const k=e;if(typeof y!="string")return we.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(y!=="zip")return we.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"zip"},message:"must be equal to constant"}],!1;var p=k===e}else var p=!0;if(p){if(r.inner!==void 0){let y=r.inner;const k=e,T=e;let $=!1;const h=e;yr.validate(y,{instancePath:t+"/inner",parentData:r,parentDataProperty:"inner",rootData:u})||(s=s===null?yr.validate.errors:s.concat(yr.validate.errors),e=s.length);var d=h===e;if($=$||d,!$){const K=e;ce(y,{instancePath:t+"/inner",parentData:r,parentDataProperty:"inner",rootData:u})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var d=K===e;$=$||d}if($)e=T,s!==null&&(T?s.length=T:s=null);else{const K={instancePath:t+"/inner",schemaPath:"#/properties/inner/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[K]:s.push(K),e++,we.errors=s,!1}var p=k===e}else var p=!0;if(p)if(r.name!==void 0){const y=e;if(typeof r.name!="string")return we.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=y===e}else var p=!0}}}}else return we.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return we.errors=s,e===0}function G(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;const p=e;let d=!1;const g=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let B;if(r.resource===void 0&&(B="resource")||r.path===void 0&&(B="path")){const te={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:B},message:"must have required property '"+B+"'"};s===null?s=[te]:s.push(te),e++}else{const te=e;for(const m in r)if(!(m==="resource"||m==="path")){const N={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};s===null?s=[N]:s.push(N),e++;break}if(te===e){if(r.resource!==void 0){let m=r.resource;const N=e;if(typeof m!="string"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}if(m!=="vfs"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};s===null?s=[w]:s.push(w),e++}var y=N===e}else var y=!0;if(y)if(r.path!==void 0){const m=e;if(typeof r.path!="string"){const w={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}var y=m===e}else var y=!0}}}else{const B={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[B]:s.push(B),e++}var k=g===e;if(d=d||k,!d){const B=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let N;if(r.resource===void 0&&(N="resource")||r.name===void 0&&(N="name")||r.contents===void 0&&(N="contents")){const w={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};s===null?s=[w]:s.push(w),e++}else{const w=e;for(const v in r)if(!(v==="resource"||v==="name"||v==="contents")){const O={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};s===null?s=[O]:s.push(O),e++;break}if(w===e){if(r.resource!==void 0){let v=r.resource;const O=e;if(typeof v!="string"){const E={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[E]:s.push(E),e++}if(v!=="literal"){const E={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};s===null?s=[E]:s.push(E),e++}var T=O===e}else var T=!0;if(T){if(r.name!==void 0){const v=e;if(typeof r.name!="string"){const E={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[E]:s.push(E),e++}var T=v===e}else var T=!0;if(T)if(r.contents!==void 0){let v=r.contents;const O=e,E=e;let P=!1;const b=e;if(typeof v!="string"){const L={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var $=b===e;if(P=P||$,!P){const L=e;if(e===L)if(v&&typeof v=="object"&&!Array.isArray(v)){let F;if(v.BYTES_PER_ELEMENT===void 0&&(F="BYTES_PER_ELEMENT")||v.buffer===void 0&&(F="buffer")||v.byteLength===void 0&&(F="byteLength")||v.byteOffset===void 0&&(F="byteOffset")||v.length===void 0&&(F="length")){const W={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:F},message:"must have required property '"+F+"'"};s===null?s=[W]:s.push(W),e++}else{const W=e;for(const C in v)if(!(C==="BYTES_PER_ELEMENT"||C==="buffer"||C==="byteLength"||C==="byteOffset"||C==="length")){let D=v[C];const re=e;if(!(typeof D=="number"&&isFinite(D))){const R={instancePath:t+"/contents/"+C.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var h=re===e;if(!h)break}if(W===e){if(v.BYTES_PER_ELEMENT!==void 0){let C=v.BYTES_PER_ELEMENT;const D=e;if(!(typeof C=="number"&&isFinite(C))){const re={instancePath:t+"/contents/BYTES_PER_ELEMENT",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[re]:s.push(re),e++}var M=D===e}else var M=!0;if(M){if(v.buffer!==void 0){let C=v.buffer;const D=e;if(e===D)if(C&&typeof C=="object"&&!Array.isArray(C)){let R;if(C.byteLength===void 0&&(R="byteLength")){const Q={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};s===null?s=[Q]:s.push(Q),e++}else{const Q=e;for(const V in C)if(V!=="byteLength"){const z={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"};s===null?s=[z]:s.push(z),e++;break}if(Q===e&&C.byteLength!==void 0){let V=C.byteLength;if(!(typeof V=="number"&&isFinite(V))){const z={instancePath:t+"/contents/buffer/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}}}}else{const R={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[R]:s.push(R),e++}var M=D===e}else var M=!0;if(M){if(v.byteLength!==void 0){let C=v.byteLength;const D=e;if(!(typeof C=="number"&&isFinite(C))){const R={instancePath:t+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var M=D===e}else var M=!0;if(M){if(v.byteOffset!==void 0){let C=v.byteOffset;const D=e;if(!(typeof C=="number"&&isFinite(C))){const R={instancePath:t+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var M=D===e}else var M=!0;if(M)if(v.length!==void 0){let C=v.length;const D=e;if(!(typeof C=="number"&&isFinite(C))){const R={instancePath:t+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var M=D===e}else var M=!0}}}}}}else{const F={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[F]:s.push(F),e++}var $=L===e;P=P||$}if(P)e=E,s!==null&&(E?s.length=E:s=null);else{const L={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[L]:s.push(L),e++}var T=O===e}else var T=!0}}}}else{const N={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[N]:s.push(N),e++}var k=B===e;if(d=d||k,!d){const N=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let O;if(r.resource===void 0&&(O="resource")||r.slug===void 0&&(O="slug")){const E={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};s===null?s=[E]:s.push(E),e++}else{const E=e;for(const P in r)if(!(P==="resource"||P==="slug")){const b={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};s===null?s=[b]:s.push(b),e++;break}if(E===e){if(r.resource!==void 0){let P=r.resource;const b=e;if(typeof P!="string"){const S={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[S]:s.push(S),e++}if(P!=="wordpress.org/themes"){const S={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};s===null?s=[S]:s.push(S),e++}var K=b===e}else var K=!0;if(K)if(r.slug!==void 0){const P=e;if(typeof r.slug!="string"){const S={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[S]:s.push(S),e++}var K=P===e}else var K=!0}}}else{const O={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[O]:s.push(O),e++}var k=N===e;if(d=d||k,!d){const O=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let b;if(r.resource===void 0&&(b="resource")||r.slug===void 0&&(b="slug")){const S={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"};s===null?s=[S]:s.push(S),e++}else{const S=e;for(const L in r)if(!(L==="resource"||L==="slug")){const U={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"};s===null?s=[U]:s.push(U),e++;break}if(S===e){if(r.resource!==void 0){let L=r.resource;const U=e;if(typeof L!="string"){const F={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}if(L!=="wordpress.org/plugins"){const F={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};s===null?s=[F]:s.push(F),e++}var Y=U===e}else var Y=!0;if(Y)if(r.slug!==void 0){const L=e;if(typeof r.slug!="string"){const F={instancePath:t+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var Y=L===e}else var Y=!0}}}else{const b={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[b]:s.push(b),e++}var k=O===e;if(d=d||k,!d){const b=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let U;if(r.resource===void 0&&(U="resource")||r.url===void 0&&(U="url")){const F={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:U},message:"must have required property '"+U+"'"};s===null?s=[F]:s.push(F),e++}else{const F=e;for(const W in r)if(!(W==="resource"||W==="url"||W==="caption")){const C={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:W},message:"must NOT have additional properties"};s===null?s=[C]:s.push(C),e++;break}if(F===e){if(r.resource!==void 0){let W=r.resource;const C=e;if(typeof W!="string"){const D={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[D]:s.push(D),e++}if(W!=="url"){const D={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};s===null?s=[D]:s.push(D),e++}var q=C===e}else var q=!0;if(q){if(r.url!==void 0){const W=e;if(typeof r.url!="string"){const D={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[D]:s.push(D),e++}var q=W===e}else var q=!0;if(q)if(r.caption!==void 0){const W=e;if(typeof r.caption!="string"){const D={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[D]:s.push(D),e++}var q=W===e}else var q=!0}}}}else{const U={instancePath:t,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[U]:s.push(U),e++}var k=b===e;if(d=d||k,!d){const U=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let C;if(r.resource===void 0&&(C="resource")||r.path===void 0&&(C="path")){const D={instancePath:t,schemaPath:"#/definitions/BundledReference/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};s===null?s=[D]:s.push(D),e++}else{const D=e;for(const re in r)if(!(re==="resource"||re==="path")){const R={instancePath:t,schemaPath:"#/definitions/BundledReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:re},message:"must NOT have additional properties"};s===null?s=[R]:s.push(R),e++;break}if(D===e){if(r.resource!==void 0){let re=r.resource;const R=e;if(typeof re!="string"){const Q={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),e++}if(re!=="bundled"){const Q={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/const",keyword:"const",params:{allowedValue:"bundled"},message:"must be equal to constant"};s===null?s=[Q]:s.push(Q),e++}var ee=R===e}else var ee=!0;if(ee)if(r.path!==void 0){const re=e;if(typeof r.path!="string"){const Q={instancePath:t+"/path",schemaPath:"#/definitions/BundledReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),e++}var ee=re===e}else var ee=!0}}}else{const C={instancePath:t,schemaPath:"#/definitions/BundledReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[C]:s.push(C),e++}var k=U===e;if(d=d||k,!d){const C=e;we(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?we.errors:s.concat(we.errors),e=s.length);var k=C===e;d=d||k}}}}}}if(d)e=p,s!==null&&(p?s.length=p:s=null);else{const B={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[B]:s.push(B),e++,G.errors=s,!1}return G.errors=s,e===0}const ir={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:
763
+ Note: PHP 7.2 and 7.3 are deprecated and will be automatically upgraded to 7.4.`},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:{intl:{type:"boolean",description:"Should boot with support for Intl dynamic extension"},networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},extraLibraries:{type:"array",items:{$ref:"#/definitions/ExtraLibrary"},description:"Extra libraries to preload into the Playground instance."},constants:{$ref:"#/definitions/PHPConstants",description:"PHP Constants to define on every request"},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:{deprecated:"No longer used. Feel free to remove it from your Blueprint."},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"}}},rs={additionalProperties:{type:["string","boolean","number"]}},ft=Object.prototype.hasOwnProperty,ts={enum:["8.5","8.4","8.3","8.2","8.1","8.0","7.4"]};function Ie(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;const p=e;let u=!1;const y=e;if(typeof r!="string"){const h={instancePath:t,schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[h]:s.push(h),e++}if(!(r==="8.5"||r==="8.4"||r==="8.3"||r==="8.2"||r==="8.1"||r==="8.0"||r==="7.4")){const h={instancePath:t,schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:ts.enum},message:"must be equal to one of the allowed values"};s===null?s=[h]:s.push(h),e++}var _=y===e;if(u=u||_,!u){const h=e;if(typeof r!="string"){const T={instancePath:t,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[T]:s.push(T),e++}if(r!=="7.2"){const T={instancePath:t,schemaPath:"#/anyOf/1/const",keyword:"const",params:{allowedValue:"7.2"},message:"must be equal to constant"};s===null?s=[T]:s.push(T),e++}var _=h===e;if(u=u||_,!u){const T=e;if(typeof r!="string"){const g={instancePath:t,schemaPath:"#/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[g]:s.push(g),e++}if(r!=="7.3"){const g={instancePath:t,schemaPath:"#/anyOf/2/const",keyword:"const",params:{allowedValue:"7.3"},message:"must be equal to constant"};s===null?s=[g]:s.push(g),e++}var _=T===e;u=u||_}}if(u)e=p,s!==null&&(p?s.length=p:s=null);else{const h={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[h]:s.push(h),e++,Ie.errors=s,!1}return Ie.errors=s,e===0}const yr={validate:G},ss={enum:["branch","tag","commit","refname"]};function de(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;if(r&&typeof r=="object"&&!Array.isArray(r)){let u;if(r.resource===void 0&&(u="resource")||r.url===void 0&&(u="url")||r.ref===void 0&&(u="ref"))return de.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:u},message:"must have required property '"+u+"'"}],!1;for(const y in r)if(!(y==="resource"||y==="url"||y==="ref"||y==="refType"||y==="path"||y===".git"))return de.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"}],!1;{if(r.resource!==void 0){let y=r.resource;const _=e;if(typeof y!="string")return de.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(y!=="git:directory")return de.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"git:directory"},message:"must be equal to constant"}],!1;var p=_===e}else var p=!0;if(p){if(r.url!==void 0){const y=e;if(typeof r.url!="string")return de.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=y===e}else var p=!0;if(p){if(r.ref!==void 0){const y=e;if(typeof r.ref!="string")return de.errors=[{instancePath:t+"/ref",schemaPath:"#/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=y===e}else var p=!0;if(p){if(r.refType!==void 0){let y=r.refType;const _=e;if(typeof y!="string")return de.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(y==="branch"||y==="tag"||y==="commit"||y==="refname"))return de.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/enum",keyword:"enum",params:{allowedValues:ss.enum},message:"must be equal to one of the allowed values"}],!1;var p=_===e}else var p=!0;if(p){if(r.path!==void 0){const y=e;if(typeof r.path!="string")return de.errors=[{instancePath:t+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=y===e}else var p=!0;if(p)if(r[".git"]!==void 0){const y=e;if(typeof r[".git"]!="boolean")return de.errors=[{instancePath:t+"/.git",schemaPath:"#/properties/.git/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var p=y===e}else var p=!0}}}}}}else return de.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return de.errors=s,e===0}const is={additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]}},hr={validate:xe};function xe(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r))for(const y in r){let _=r[y];const h=e,k=e;let T=!1;const $=e;hr.validate(_,{instancePath:t+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:y,rootData:d})||(s=s===null?hr.validate.errors:s.concat(hr.validate.errors),e=s.length);var p=$===e;if(T=T||p,!T){const g=e;if(!(_&&typeof _=="object"&&!Array.isArray(_))&&typeof _!="string"){const K={instancePath:t+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:is.additionalProperties.anyOf[1].type},message:"must be object,string"};s===null?s=[K]:s.push(K),e++}var p=g===e;T=T||p}if(T)e=k,s!==null&&(k?s.length=k:s=null);else{const g={instancePath:t+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[g]:s.push(g),e++,xe.errors=s,!1}var u=h===e;if(!u)break}else return xe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return xe.errors=s,e===0}function $e(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let u;if(r.files===void 0&&(u="files")||r.name===void 0&&(u="name")||r.resource===void 0&&(u="resource"))return $e.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:u},message:"must have required property '"+u+"'"}],!1;{const y=e;for(const _ in r)if(!(_==="resource"||_==="files"||_==="name"))return $e.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;if(y===e){if(r.resource!==void 0){let _=r.resource;const h=e;if(typeof _!="string")return $e.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(_!=="literal:directory")return $e.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var p=h===e}else var p=!0;if(p){if(r.files!==void 0){const _=e;xe(r.files,{instancePath:t+"/files",parentData:r,parentDataProperty:"files",rootData:d})||(s=s===null?xe.errors:s.concat(xe.errors),e=s.length);var p=_===e}else var p=!0;if(p)if(r.name!==void 0){const _=e;if(typeof r.name!="string")return $e.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=_===e}else var p=!0}}}}else return $e.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return $e.errors=s,e===0}function ce(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;const p=e;let u=!1;const y=e;de(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:d})||(s=s===null?de.errors:s.concat(de.errors),e=s.length);var _=y===e;if(u=u||_,!u){const h=e;$e(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:d})||(s=s===null?$e.errors:s.concat($e.errors),e=s.length);var _=h===e;u=u||_}if(u)e=p,s!==null&&(p?s.length=p:s=null);else{const h={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[h]:s.push(h),e++,ce.errors=s,!1}return ce.errors=s,e===0}function we(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let y;if(r.resource===void 0&&(y="resource")||r.inner===void 0&&(y="inner"))return we.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:y},message:"must have required property '"+y+"'"}],!1;{const _=e;for(const h in r)if(!(h==="resource"||h==="inner"||h==="name"))return we.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"}],!1;if(_===e){if(r.resource!==void 0){let h=r.resource;const k=e;if(typeof h!="string")return we.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(h!=="zip")return we.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"zip"},message:"must be equal to constant"}],!1;var p=k===e}else var p=!0;if(p){if(r.inner!==void 0){let h=r.inner;const k=e,T=e;let $=!1;const g=e;yr.validate(h,{instancePath:t+"/inner",parentData:r,parentDataProperty:"inner",rootData:d})||(s=s===null?yr.validate.errors:s.concat(yr.validate.errors),e=s.length);var u=g===e;if($=$||u,!$){const K=e;ce(h,{instancePath:t+"/inner",parentData:r,parentDataProperty:"inner",rootData:d})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var u=K===e;$=$||u}if($)e=T,s!==null&&(T?s.length=T:s=null);else{const K={instancePath:t+"/inner",schemaPath:"#/properties/inner/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[K]:s.push(K),e++,we.errors=s,!1}var p=k===e}else var p=!0;if(p)if(r.name!==void 0){const h=e;if(typeof r.name!="string")return we.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=h===e}else var p=!0}}}}else return we.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return we.errors=s,e===0}function G(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;const p=e;let u=!1;const y=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let B;if(r.resource===void 0&&(B="resource")||r.path===void 0&&(B="path")){const te={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:B},message:"must have required property '"+B+"'"};s===null?s=[te]:s.push(te),e++}else{const te=e;for(const m in r)if(!(m==="resource"||m==="path")){const N={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};s===null?s=[N]:s.push(N),e++;break}if(te===e){if(r.resource!==void 0){let m=r.resource;const N=e;if(typeof m!="string"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}if(m!=="vfs"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};s===null?s=[w]:s.push(w),e++}var h=N===e}else var h=!0;if(h)if(r.path!==void 0){const m=e;if(typeof r.path!="string"){const w={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}var h=m===e}else var h=!0}}}else{const B={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[B]:s.push(B),e++}var k=y===e;if(u=u||k,!u){const B=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let N;if(r.resource===void 0&&(N="resource")||r.name===void 0&&(N="name")||r.contents===void 0&&(N="contents")){const w={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};s===null?s=[w]:s.push(w),e++}else{const w=e;for(const v in r)if(!(v==="resource"||v==="name"||v==="contents")){const O={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};s===null?s=[O]:s.push(O),e++;break}if(w===e){if(r.resource!==void 0){let v=r.resource;const O=e;if(typeof v!="string"){const E={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[E]:s.push(E),e++}if(v!=="literal"){const E={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};s===null?s=[E]:s.push(E),e++}var T=O===e}else var T=!0;if(T){if(r.name!==void 0){const v=e;if(typeof r.name!="string"){const E={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[E]:s.push(E),e++}var T=v===e}else var T=!0;if(T)if(r.contents!==void 0){let v=r.contents;const O=e,E=e;let P=!1;const b=e;if(typeof v!="string"){const L={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var $=b===e;if(P=P||$,!P){const L=e;if(e===L)if(v&&typeof v=="object"&&!Array.isArray(v)){let F;if(v.BYTES_PER_ELEMENT===void 0&&(F="BYTES_PER_ELEMENT")||v.buffer===void 0&&(F="buffer")||v.byteLength===void 0&&(F="byteLength")||v.byteOffset===void 0&&(F="byteOffset")||v.length===void 0&&(F="length")){const W={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:F},message:"must have required property '"+F+"'"};s===null?s=[W]:s.push(W),e++}else{const W=e;for(const C in v)if(!(C==="BYTES_PER_ELEMENT"||C==="buffer"||C==="byteLength"||C==="byteOffset"||C==="length")){let D=v[C];const re=e;if(!(typeof D=="number"&&isFinite(D))){const S={instancePath:t+"/contents/"+C.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[S]:s.push(S),e++}var g=re===e;if(!g)break}if(W===e){if(v.BYTES_PER_ELEMENT!==void 0){let C=v.BYTES_PER_ELEMENT;const D=e;if(!(typeof C=="number"&&isFinite(C))){const re={instancePath:t+"/contents/BYTES_PER_ELEMENT",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[re]:s.push(re),e++}var M=D===e}else var M=!0;if(M){if(v.buffer!==void 0){let C=v.buffer;const D=e;if(e===D)if(C&&typeof C=="object"&&!Array.isArray(C)){let S;if(C.byteLength===void 0&&(S="byteLength")){const Q={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:S},message:"must have required property '"+S+"'"};s===null?s=[Q]:s.push(Q),e++}else{const Q=e;for(const V in C)if(V!=="byteLength"){const z={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"};s===null?s=[z]:s.push(z),e++;break}if(Q===e&&C.byteLength!==void 0){let V=C.byteLength;if(!(typeof V=="number"&&isFinite(V))){const z={instancePath:t+"/contents/buffer/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}}}}else{const S={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[S]:s.push(S),e++}var M=D===e}else var M=!0;if(M){if(v.byteLength!==void 0){let C=v.byteLength;const D=e;if(!(typeof C=="number"&&isFinite(C))){const S={instancePath:t+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[S]:s.push(S),e++}var M=D===e}else var M=!0;if(M){if(v.byteOffset!==void 0){let C=v.byteOffset;const D=e;if(!(typeof C=="number"&&isFinite(C))){const S={instancePath:t+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[S]:s.push(S),e++}var M=D===e}else var M=!0;if(M)if(v.length!==void 0){let C=v.length;const D=e;if(!(typeof C=="number"&&isFinite(C))){const S={instancePath:t+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[S]:s.push(S),e++}var M=D===e}else var M=!0}}}}}}else{const F={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[F]:s.push(F),e++}var $=L===e;P=P||$}if(P)e=E,s!==null&&(E?s.length=E:s=null);else{const L={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[L]:s.push(L),e++}var T=O===e}else var T=!0}}}}else{const N={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[N]:s.push(N),e++}var k=B===e;if(u=u||k,!u){const N=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let O;if(r.resource===void 0&&(O="resource")||r.slug===void 0&&(O="slug")){const E={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};s===null?s=[E]:s.push(E),e++}else{const E=e;for(const P in r)if(!(P==="resource"||P==="slug")){const b={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};s===null?s=[b]:s.push(b),e++;break}if(E===e){if(r.resource!==void 0){let P=r.resource;const b=e;if(typeof P!="string"){const R={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[R]:s.push(R),e++}if(P!=="wordpress.org/themes"){const R={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};s===null?s=[R]:s.push(R),e++}var K=b===e}else var K=!0;if(K)if(r.slug!==void 0){const P=e;if(typeof r.slug!="string"){const R={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[R]:s.push(R),e++}var K=P===e}else var K=!0}}}else{const O={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[O]:s.push(O),e++}var k=N===e;if(u=u||k,!u){const O=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let b;if(r.resource===void 0&&(b="resource")||r.slug===void 0&&(b="slug")){const R={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"};s===null?s=[R]:s.push(R),e++}else{const R=e;for(const L in r)if(!(L==="resource"||L==="slug")){const U={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"};s===null?s=[U]:s.push(U),e++;break}if(R===e){if(r.resource!==void 0){let L=r.resource;const U=e;if(typeof L!="string"){const F={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}if(L!=="wordpress.org/plugins"){const F={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};s===null?s=[F]:s.push(F),e++}var Y=U===e}else var Y=!0;if(Y)if(r.slug!==void 0){const L=e;if(typeof r.slug!="string"){const F={instancePath:t+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var Y=L===e}else var Y=!0}}}else{const b={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[b]:s.push(b),e++}var k=O===e;if(u=u||k,!u){const b=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let U;if(r.resource===void 0&&(U="resource")||r.url===void 0&&(U="url")){const F={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:U},message:"must have required property '"+U+"'"};s===null?s=[F]:s.push(F),e++}else{const F=e;for(const W in r)if(!(W==="resource"||W==="url"||W==="caption")){const C={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:W},message:"must NOT have additional properties"};s===null?s=[C]:s.push(C),e++;break}if(F===e){if(r.resource!==void 0){let W=r.resource;const C=e;if(typeof W!="string"){const D={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[D]:s.push(D),e++}if(W!=="url"){const D={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};s===null?s=[D]:s.push(D),e++}var q=C===e}else var q=!0;if(q){if(r.url!==void 0){const W=e;if(typeof r.url!="string"){const D={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[D]:s.push(D),e++}var q=W===e}else var q=!0;if(q)if(r.caption!==void 0){const W=e;if(typeof r.caption!="string"){const D={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[D]:s.push(D),e++}var q=W===e}else var q=!0}}}}else{const U={instancePath:t,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[U]:s.push(U),e++}var k=b===e;if(u=u||k,!u){const U=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let C;if(r.resource===void 0&&(C="resource")||r.path===void 0&&(C="path")){const D={instancePath:t,schemaPath:"#/definitions/BundledReference/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};s===null?s=[D]:s.push(D),e++}else{const D=e;for(const re in r)if(!(re==="resource"||re==="path")){const S={instancePath:t,schemaPath:"#/definitions/BundledReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:re},message:"must NOT have additional properties"};s===null?s=[S]:s.push(S),e++;break}if(D===e){if(r.resource!==void 0){let re=r.resource;const S=e;if(typeof re!="string"){const Q={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),e++}if(re!=="bundled"){const Q={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/const",keyword:"const",params:{allowedValue:"bundled"},message:"must be equal to constant"};s===null?s=[Q]:s.push(Q),e++}var ee=S===e}else var ee=!0;if(ee)if(r.path!==void 0){const re=e;if(typeof r.path!="string"){const Q={instancePath:t+"/path",schemaPath:"#/definitions/BundledReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),e++}var ee=re===e}else var ee=!0}}}else{const C={instancePath:t,schemaPath:"#/definitions/BundledReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[C]:s.push(C),e++}var k=U===e;if(u=u||k,!u){const C=e;we(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:d})||(s=s===null?we.errors:s.concat(we.errors),e=s.length);var k=C===e;u=u||k}}}}}}if(u)e=p,s!==null&&(p?s.length=p:s=null);else{const B={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[B]:s.push(B),e++,G.errors=s,!1}return G.errors=s,e===0}const ir={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:
762
764
 
763
765
  - 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.
764
766
 
765
767
  - 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.
766
768
  This option is only kept in here to avoid breaking Blueprint schema validation
767
769
  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"},wpCliPath:{type:"string",description:"wp-cli.phar path"}},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"},importer:{type:"string",enum:["data-liberation","default"],description:"The importer to use. Possible values:\n\n- `default`: The importer from https://github.com/humanmade/WordPress-Importer\n- `data-liberation`: The experimental Data Liberation WXR importer developed at https://github.com/WordPress/wordpress-playground/issues/1894\n\nThis option is deprecated. The syntax will not be removed, but once the Data Liberation importer matures, it will become the only supported importer and the `importer` option will be ignored.",deprecated:!0}},required:["file","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importThemeStarterContent",description:"The step identifier."},themeSlug:{type:"string",description:"The name of the theme to import content from."}},required:["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."},pluginData:{anyOf:[{$ref:"#/definitions/FileReference"},{$ref:"#/definitions/DirectoryReference"}],description:"The plugin files to install. It can be a plugin zip file, a single PHP file, or a directory containing all the plugin files at its root."},pluginZipFile:{$ref:"#/definitions/FileReference",deprecated:". Use 'pluginData' instead."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginData","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."},themeData:{anyOf:[{$ref:"#/definitions/FileReference"},{$ref:"#/definitions/DirectoryReference"}],description:"The theme files to install. It can be either a theme zip file, or a directory containing all the theme files at its root."},themeZipFile:{$ref:"#/definitions/FileReference",deprecated:". Use 'themeData' instead."},options:{$ref:"#/definitions/InstallThemeOptions",description:"Optional installation options."}},required:["step","themeData"]},{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",deprecated:`The password field is deprecated and will be removed in a future version.
768
- Only the username field is required for user authentication.`}},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:{anyOf:[{type:"string"},{type:"object",properties:{filename:{type:"string",description:"This property is ignored during Blueprint v1 execution but exists so the same runPHP step structure can be used for Blueprints v1 and v2."},content:{type:"string"}},required:["filename","content"],additionalProperties:!1}],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:"writeFiles"},writeToPath:{type:"string",description:"The path of the file to write to"},filesTree:{$ref:"#/definitions/DirectoryReference",description:"The 'filesTree' defines the directory structure, supporting 'literal:directory' or 'git:directory' types. The 'name' represents the root directory, while 'files' is an object where keys are file paths, and values contain either file content as a string or nested objects for subdirectories."}},required:["filesTree","step","writeToPath"]},{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"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteLanguage"},language:{type:"string",description:"The language to set, e.g. 'en_US'"}},required:["language","step"]}]},ut={enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ge(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let K;if(r.url===void 0&&(K="url"))return ge.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:K},message:"must have required property '"+K+"'"}],!1;{const Y=e;for(const q in r)if(!(q==="method"||q==="url"||q==="headers"||q==="body"))return ge.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:q},message:"must NOT have additional properties"}],!1;if(Y===e){if(r.method!==void 0){let q=r.method;const ee=e;if(typeof q!="string")return ge.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(q==="GET"||q==="POST"||q==="HEAD"||q==="OPTIONS"||q==="PATCH"||q==="PUT"||q==="DELETE"))return ge.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:ut.enum},message:"must be equal to one of the allowed values"}],!1;var p=ee===e}else var p=!0;if(p){if(r.url!==void 0){const q=e;if(typeof r.url!="string")return ge.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=q===e}else var p=!0;if(p){if(r.headers!==void 0){let q=r.headers;const ee=e;if(e===e)if(q&&typeof q=="object"&&!Array.isArray(q))for(const m in q){const N=e;if(typeof q[m]!="string")return ge.errors=[{instancePath:t+"/headers/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=N===e;if(!d)break}else return ge.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=ee===e}else var p=!0;if(p)if(r.body!==void 0){let q=r.body;const ee=e,B=e;let te=!1;const m=e;if(typeof q!="string"){const w={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}var g=m===e;if(te=te||g,!te){const w=e;if(e===w)if(q&&typeof q=="object"&&!Array.isArray(q)){let O;if(q.BYTES_PER_ELEMENT===void 0&&(O="BYTES_PER_ELEMENT")||q.buffer===void 0&&(O="buffer")||q.byteLength===void 0&&(O="byteLength")||q.byteOffset===void 0&&(O="byteOffset")||q.length===void 0&&(O="length")){const E={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};s===null?s=[E]:s.push(E),e++}else{const E=e;for(const P in q)if(!(P==="BYTES_PER_ELEMENT"||P==="buffer"||P==="byteLength"||P==="byteOffset"||P==="length")){let b=q[P];const S=e;if(!(typeof b=="number"&&isFinite(b))){const L={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var _=S===e;if(!_)break}if(E===e){if(q.BYTES_PER_ELEMENT!==void 0){let P=q.BYTES_PER_ELEMENT;const b=e;if(!(typeof P=="number"&&isFinite(P))){const S={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[S]:s.push(S),e++}var y=b===e}else var y=!0;if(y){if(q.buffer!==void 0){let P=q.buffer;const b=e;if(e===b)if(P&&typeof P=="object"&&!Array.isArray(P)){let L;if(P.byteLength===void 0&&(L="byteLength")){const U={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};s===null?s=[U]:s.push(U),e++}else{const U=e;for(const F in P)if(F!=="byteLength"){const W={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:F},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if(U===e&&P.byteLength!==void 0){let F=P.byteLength;if(!(typeof F=="number"&&isFinite(F))){const W={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[W]:s.push(W),e++}}}}else{const L={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[L]:s.push(L),e++}var y=b===e}else var y=!0;if(y){if(q.byteLength!==void 0){let P=q.byteLength;const b=e;if(!(typeof P=="number"&&isFinite(P))){const L={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var y=b===e}else var y=!0;if(y){if(q.byteOffset!==void 0){let P=q.byteOffset;const b=e;if(!(typeof P=="number"&&isFinite(P))){const L={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var y=b===e}else var y=!0;if(y)if(q.length!==void 0){let P=q.length;const b=e;if(!(typeof P=="number"&&isFinite(P))){const L={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var y=b===e}else var y=!0}}}}}}else{const O={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[O]:s.push(O),e++}var g=w===e;if(te=te||g,!te){const O=e;if(e===O)if(q&&typeof q=="object"&&!Array.isArray(q))for(const P in q){let b=q[P];const S=e,L=e;let U=!1;const F=e;if(typeof b!="string"){const W={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}var k=F===e;if(U=U||k,!U){const W=e;if(e===W)if(b&&typeof b=="object"&&!Array.isArray(b)){let D;if(b.BYTES_PER_ELEMENT===void 0&&(D="BYTES_PER_ELEMENT")||b.buffer===void 0&&(D="buffer")||b.byteLength===void 0&&(D="byteLength")||b.byteOffset===void 0&&(D="byteOffset")||b.length===void 0&&(D="length")){const re={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:D},message:"must have required property '"+D+"'"};s===null?s=[re]:s.push(re),e++}else{const re=e;for(const R in b)if(!(R==="BYTES_PER_ELEMENT"||R==="buffer"||R==="byteLength"||R==="byteOffset"||R==="length")){let Q=b[R];const V=e;if(!(typeof Q=="number"&&isFinite(Q))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var T=V===e;if(!T)break}if(re===e){if(b.BYTES_PER_ELEMENT!==void 0){let R=b.BYTES_PER_ELEMENT;const Q=e;if(!(typeof R=="number"&&isFinite(R))){const V={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[V]:s.push(V),e++}var $=Q===e}else var $=!0;if($){if(b.buffer!==void 0){let R=b.buffer;const Q=e;if(e===Q)if(R&&typeof R=="object"&&!Array.isArray(R)){let z;if(R.byteLength===void 0&&(z="byteLength")){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:z},message:"must have required property '"+z+"'"};s===null?s=[oe]:s.push(oe),e++}else{const oe=e;for(const ue in R)if(ue!=="byteLength"){const Pe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ue},message:"must NOT have additional properties"};s===null?s=[Pe]:s.push(Pe),e++;break}if(oe===e&&R.byteLength!==void 0){let ue=R.byteLength;if(!(typeof ue=="number"&&isFinite(ue))){const Pe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[Pe]:s.push(Pe),e++}}}}else{const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[z]:s.push(z),e++}var $=Q===e}else var $=!0;if($){if(b.byteLength!==void 0){let R=b.byteLength;const Q=e;if(!(typeof R=="number"&&isFinite(R))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var $=Q===e}else var $=!0;if($){if(b.byteOffset!==void 0){let R=b.byteOffset;const Q=e;if(!(typeof R=="number"&&isFinite(R))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteOffset",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var $=Q===e}else var $=!0;if($)if(b.length!==void 0){let R=b.length;const Q=e;if(!(typeof R=="number"&&isFinite(R))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/length",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var $=Q===e}else var $=!0}}}}}}else{const D={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[D]:s.push(D),e++}var k=W===e;if(U=U||k,!U){const D=e;if(e===D)if(b&&typeof b=="object"&&!Array.isArray(b)){let R;if(b.lastModified===void 0&&(R="lastModified")||b.name===void 0&&(R="name")||b.size===void 0&&(R="size")||b.type===void 0&&(R="type")||b.webkitRelativePath===void 0&&(R="webkitRelativePath")){const Q={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};s===null?s=[Q]:s.push(Q),e++}else{const Q=e;for(const V in b)if(!(V==="size"||V==="type"||V==="lastModified"||V==="name"||V==="webkitRelativePath")){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"};s===null?s=[z]:s.push(z),e++;break}if(Q===e){if(b.size!==void 0){let V=b.size;const z=e;if(!(typeof V=="number"&&isFinite(V))){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/size",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[oe]:s.push(oe),e++}var h=z===e}else var h=!0;if(h){if(b.type!==void 0){const V=e;if(typeof b.type!="string"){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/type",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var h=V===e}else var h=!0;if(h){if(b.lastModified!==void 0){let V=b.lastModified;const z=e;if(!(typeof V=="number"&&isFinite(V))){const ue={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/lastModified",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/lastModified/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[ue]:s.push(ue),e++}var h=z===e}else var h=!0;if(h){if(b.name!==void 0){const V=e;if(typeof b.name!="string"){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/name",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var h=V===e}else var h=!0;if(h)if(b.webkitRelativePath!==void 0){const V=e;if(typeof b.webkitRelativePath!="string"){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/webkitRelativePath",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/webkitRelativePath/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var h=V===e}else var h=!0}}}}}}else{const R={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[R]:s.push(R),e++}var k=D===e;U=U||k}}if(U)e=L,s!==null&&(L?s.length=L:s=null);else{const W={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[W]:s.push(W),e++}var M=S===e;if(!M)break}else{const P={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[P]:s.push(P),e++}var g=O===e;te=te||g}}if(te)e=B,s!==null&&(B?s.length=B:s=null);else{const w={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[w]:s.push(w),e++,ge.errors=s,!1}var p=ee===e}else var p=!0}}}}}else return ge.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ge.errors=s,e===0}const os={properties:{relativeUri:{type:"string",description:"Request path following the domain:port part – after any URL rewriting rules (e.g. apache .htaccess) have been applied."},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."}}};function pe(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const $=e;for(const h in r)if(!ft.call(os.properties,h))return pe.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"}],!1;if($===e){if(r.relativeUri!==void 0){const h=e;if(typeof r.relativeUri!="string")return pe.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=h===e}else var p=!0;if(p){if(r.scriptPath!==void 0){const h=e;if(typeof r.scriptPath!="string")return pe.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=h===e}else var p=!0;if(p){if(r.protocol!==void 0){const h=e;if(typeof r.protocol!="string")return pe.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=h===e}else var p=!0;if(p){if(r.method!==void 0){let h=r.method;const M=e;if(typeof h!="string")return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(h==="GET"||h==="POST"||h==="HEAD"||h==="OPTIONS"||h==="PATCH"||h==="PUT"||h==="DELETE"))return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:ut.enum},message:"must be equal to one of the allowed values"}],!1;var p=M===e}else var p=!0;if(p){if(r.headers!==void 0){let h=r.headers;const M=e;if(e===e)if(h&&typeof h=="object"&&!Array.isArray(h))for(const q in h){const ee=e;if(typeof h[q]!="string")return pe.errors=[{instancePath:t+"/headers/"+q.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=ee===e;if(!d)break}else return pe.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=M===e}else var p=!0;if(p){if(r.body!==void 0){let h=r.body;const M=e,K=e;let Y=!1;const q=e;if(typeof h!="string"){const B={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[B]:s.push(B),e++}var g=q===e;if(Y=Y||g,!Y){const B=e;if(e===B)if(h&&typeof h=="object"&&!Array.isArray(h)){let m;if(h.BYTES_PER_ELEMENT===void 0&&(m="BYTES_PER_ELEMENT")||h.buffer===void 0&&(m="buffer")||h.byteLength===void 0&&(m="byteLength")||h.byteOffset===void 0&&(m="byteOffset")||h.length===void 0&&(m="length")){const N={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:m},message:"must have required property '"+m+"'"};s===null?s=[N]:s.push(N),e++}else{const N=e;for(const w in h)if(!(w==="BYTES_PER_ELEMENT"||w==="buffer"||w==="byteLength"||w==="byteOffset"||w==="length")){let v=h[w];const O=e;if(!(typeof v=="number"&&isFinite(v))){const E={instancePath:t+"/body/"+w.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[E]:s.push(E),e++}var _=O===e;if(!_)break}if(N===e){if(h.BYTES_PER_ELEMENT!==void 0){let w=h.BYTES_PER_ELEMENT;const v=e;if(!(typeof w=="number"&&isFinite(w))){const O={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[O]:s.push(O),e++}var y=v===e}else var y=!0;if(y){if(h.buffer!==void 0){let w=h.buffer;const v=e;if(e===v)if(w&&typeof w=="object"&&!Array.isArray(w)){let E;if(w.byteLength===void 0&&(E="byteLength")){const P={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:E},message:"must have required property '"+E+"'"};s===null?s=[P]:s.push(P),e++}else{const P=e;for(const b in w)if(b!=="byteLength"){const S={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:b},message:"must NOT have additional properties"};s===null?s=[S]:s.push(S),e++;break}if(P===e&&w.byteLength!==void 0){let b=w.byteLength;if(!(typeof b=="number"&&isFinite(b))){const S={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[S]:s.push(S),e++}}}}else{const E={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[E]:s.push(E),e++}var y=v===e}else var y=!0;if(y){if(h.byteLength!==void 0){let w=h.byteLength;const v=e;if(!(typeof w=="number"&&isFinite(w))){const E={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[E]:s.push(E),e++}var y=v===e}else var y=!0;if(y){if(h.byteOffset!==void 0){let w=h.byteOffset;const v=e;if(!(typeof w=="number"&&isFinite(w))){const E={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[E]:s.push(E),e++}var y=v===e}else var y=!0;if(y)if(h.length!==void 0){let w=h.length;const v=e;if(!(typeof w=="number"&&isFinite(w))){const E={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[E]:s.push(E),e++}var y=v===e}else var y=!0}}}}}}else{const m={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[m]:s.push(m),e++}var g=B===e;Y=Y||g}if(Y)e=K,s!==null&&(K?s.length=K:s=null);else{const B={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[B]:s.push(B),e++,pe.errors=s,!1}var p=M===e}else var p=!0;if(p){if(r.env!==void 0){let h=r.env;const M=e;if(e===M)if(h&&typeof h=="object"&&!Array.isArray(h))for(const Y in h){const q=e;if(typeof h[Y]!="string")return pe.errors=[{instancePath:t+"/env/"+Y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=q===e;if(!k)break}else return pe.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=M===e}else var p=!0;if(p){if(r.$_SERVER!==void 0){let h=r.$_SERVER;const M=e;if(e===M)if(h&&typeof h=="object"&&!Array.isArray(h))for(const Y in h){const q=e;if(typeof h[Y]!="string")return pe.errors=[{instancePath:t+"/$_SERVER/"+Y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=q===e;if(!T)break}else return pe.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=M===e}else var p=!0;if(p)if(r.code!==void 0){const h=e;if(typeof r.code!="string")return pe.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=h===e}else var p=!0}}}}}}}}}else return pe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return pe.errors=s,e===0}function o(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let mr;if(r.step===void 0&&(mr="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:mr},message:"must have required property '"+mr+"'"}],!1;{const J=r.step;if(typeof J=="string")if(J==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.pluginPath===void 0&&(c="pluginPath")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="pluginPath"||i==="pluginName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/0/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var p=A===e}else var p=!0;if(p)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/0/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=a===e}else var p=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=l===e}else var d=!0;if(d){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="activatePlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var d=l===e}else var d=!0;if(d){if(r.pluginPath!==void 0){const i=e;if(typeof r.pluginPath!="string")return o.errors=[{instancePath:t+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=i===e}else var d=!0;if(d)if(r.pluginName!==void 0){const i=e;if(typeof r.pluginName!="string")return o.errors=[{instancePath:t+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=i===e}else var d=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="activateTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step")||r.themeFolderName===void 0&&(c="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var g=A===e}else var g=!0;if(g)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var g=a===e}else var g=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _=l===e}else var _=!0;if(_){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="activateTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var _=l===e}else var _=!0;if(_)if(r.themeFolderName!==void 0){const i=e;if(typeof r.themeFolderName!="string")return o.errors=[{instancePath:t+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=i===e}else var _=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="cp"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.fromPath===void 0&&(c="fromPath")||r.step===void 0&&(c="step")||r.toPath===void 0&&(c="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="fromPath"||i==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var y=A===e}else var y=!0;if(y)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===e}else var y=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var k=l===e}else var k=!0;if(k){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="cp")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var k=l===e}else var k=!0;if(k){if(r.fromPath!==void 0){const i=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=i===e}else var k=!0;if(k)if(r.toPath!==void 0){const i=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=i===e}else var k=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="defineWpConfigConsts"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.consts===void 0&&(c="consts")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="consts"||i==="method"||i==="virtualize"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var T=A===e}else var T=!0;if(T)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=a===e}else var T=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=l===e}else var $=!0;if($){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="defineWpConfigConsts")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var $=l===e}else var $=!0;if($){if(r.consts!==void 0){let i=r.consts;const l=e;if(e===l&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=l===e}else var $=!0;if($){if(r.method!==void 0){let i=r.method;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="rewrite-wp-config"||i==="define-before-run"))return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:ir.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var $=l===e}else var $=!0;if($)if(r.virtualize!==void 0){const i=e;if(typeof r.virtualize!="boolean")return o.errors=[{instancePath:t+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var $=i===e}else var $=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="defineSiteUrl"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.siteUrl===void 0&&(c="siteUrl")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="siteUrl"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var h=A===e}else var h=!0;if(h)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=a===e}else var h=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var M=l===e}else var M=!0;if(M){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="defineSiteUrl")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var M=l===e}else var M=!0;if(M)if(r.siteUrl!==void 0){const i=e;if(typeof r.siteUrl!="string")return o.errors=[{instancePath:t+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var M=i===e}else var M=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="enableMultisite"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var K=A===e}else var K=!0;if(K)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=a===e}else var K=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Y=l===e}else var Y=!0;if(Y){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="enableMultisite")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var Y=l===e}else var Y=!0;if(Y)if(r.wpCliPath!==void 0){const i=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/5/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Y=i===e}else var Y=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="importWxr"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.file===void 0&&(c="file")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="file"||i==="importer"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var q=A===e}else var q=!0;if(q)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=a===e}else var q=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ee=l===e}else var ee=!0;if(ee){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importWxr")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var ee=l===e}else var ee=!0;if(ee){if(r.file!==void 0){const i=e;G(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var ee=i===e}else var ee=!0;if(ee)if(r.importer!==void 0){let i=r.importer;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/importer",schemaPath:"#/oneOf/6/properties/importer/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="data-liberation"||i==="default"))return o.errors=[{instancePath:t+"/importer",schemaPath:"#/oneOf/6/properties/importer/enum",keyword:"enum",params:{allowedValues:ir.oneOf[6].properties.importer.enum},message:"must be equal to one of the allowed values"}],!1;var ee=l===e}else var ee=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="importThemeStarterContent"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="themeSlug"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var B=A===e}else var B=!0;if(B)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var B=a===e}else var B=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var te=l===e}else var te=!0;if(te){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importThemeStarterContent")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var te=l===e}else var te=!0;if(te)if(r.themeSlug!==void 0){const i=e;if(typeof r.themeSlug!="string")return o.errors=[{instancePath:t+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var te=i===e}else var te=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="importWordPressFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step")||r.wordPressFilesZip===void 0&&(c="wordPressFilesZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="wordPressFilesZip"||i==="pathInZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var m=A===e}else var m=!0;if(m)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=a===e}else var m=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var N=l===e}else var N=!0;if(N){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importWordPressFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var N=l===e}else var N=!0;if(N){if(r.wordPressFilesZip!==void 0){const i=e;G(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var N=i===e}else var N=!0;if(N)if(r.pathInZip!==void 0){const i=e;if(typeof r.pathInZip!="string")return o.errors=[{instancePath:t+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=i===e}else var N=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="installPlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.pluginData===void 0&&(c="pluginData")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="ifAlreadyInstalled"||i==="step"||i==="pluginData"||i==="pluginZipFile"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/9/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var w=A===e}else var w=!0;if(w)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=a===e}else var w=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var v=l===e}else var v=!0;if(v){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="overwrite"||i==="skip"||i==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:ir.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var v=l===e}else var v=!0;if(v){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="installPlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var v=l===e}else var v=!0;if(v){if(r.pluginData!==void 0){let i=r.pluginData;const l=e,j=e;let a=!1;const A=e;G(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var O=A===e;if(a=a||O,!a){const X=e;ce(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var O=X===e;a=a||O}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/pluginData",schemaPath:"#/oneOf/9/properties/pluginData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var v=l===e}else var v=!0;if(v){if(r.pluginZipFile!==void 0){const i=e;G(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var v=i===e}else var v=!0;if(v)if(r.options!==void 0){let i=r.options;const l=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=e;for(const ie in i)if(!(ie==="activate"||ie==="targetFolderName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(A===e){if(i.activate!==void 0){const ie=e;if(typeof i.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var E=ie===e}else var E=!0;if(E)if(i.targetFolderName!==void 0){const ie=e;if(typeof i.targetFolderName!="string")return o.errors=[{instancePath:t+"/options/targetFolderName",schemaPath:"#/definitions/InstallPluginOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=ie===e}else var E=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var v=l===e}else var v=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="installTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step")||r.themeData===void 0&&(c="themeData"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="ifAlreadyInstalled"||i==="step"||i==="themeData"||i==="themeZipFile"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var P=A===e}else var P=!0;if(P)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var P=a===e}else var P=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var b=l===e}else var b=!0;if(b){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="overwrite"||i==="skip"||i==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:ir.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var b=l===e}else var b=!0;if(b){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="installTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var b=l===e}else var b=!0;if(b){if(r.themeData!==void 0){let i=r.themeData;const l=e,j=e;let a=!1;const A=e;G(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var S=A===e;if(a=a||S,!a){const X=e;ce(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var S=X===e;a=a||S}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/themeData",schemaPath:"#/oneOf/10/properties/themeData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var b=l===e}else var b=!0;if(b){if(r.themeZipFile!==void 0){const i=e;G(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var b=i===e}else var b=!0;if(b)if(r.options!==void 0){let i=r.options;const l=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=e;for(const ie in i)if(!(ie==="activate"||ie==="importStarterContent"||ie==="targetFolderName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(A===e){if(i.activate!==void 0){const ie=e;if(typeof i.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallThemeOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var L=ie===e}else var L=!0;if(L){if(i.importStarterContent!==void 0){const ie=e;if(typeof i.importStarterContent!="boolean")return o.errors=[{instancePath:t+"/options/importStarterContent",schemaPath:"#/definitions/InstallThemeOptions/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var L=ie===e}else var L=!0;if(L)if(i.targetFolderName!==void 0){const ie=e;if(typeof i.targetFolderName!="string")return o.errors=[{instancePath:t+"/options/targetFolderName",schemaPath:"#/definitions/InstallThemeOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var L=ie===e}else var L=!0}}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var b=l===e}else var b=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="login"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="username"||i==="password"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var U=A===e}else var U=!0;if(U)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var U=a===e}else var U=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=l===e}else var F=!0;if(F){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="login")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var F=l===e}else var F=!0;if(F){if(r.username!==void 0){const i=e;if(typeof r.username!="string")return o.errors=[{instancePath:t+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var F=i===e}else var F=!0;if(F)if(r.password!==void 0){const i=e;if(typeof r.password!="string")return o.errors=[{instancePath:t+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var F=i===e}else var F=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="mkdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var W=A===e}else var W=!0;if(W)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var W=a===e}else var W=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var C=l===e}else var C=!0;if(C){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="mkdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var C=l===e}else var C=!0;if(C)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var C=i===e}else var C=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.fromPath===void 0&&(c="fromPath")||r.step===void 0&&(c="step")||r.toPath===void 0&&(c="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="fromPath"||i==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var D=A===e}else var D=!0;if(D)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var D=a===e}else var D=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var re=l===e}else var re=!0;if(re){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="mv")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var re=l===e}else var re=!0;if(re){if(r.fromPath!==void 0){const i=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var re=i===e}else var re=!0;if(re)if(r.toPath!==void 0){const i=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var re=i===e}else var re=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="resetData"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var R=A===e}else var R=!0;if(R)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=a===e}else var R=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Q=l===e}else var Q=!0;if(Q)if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="resetData")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var Q=l===e}else var Q=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="request"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.request===void 0&&(c="request")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="request"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/15/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var V=A===e}else var V=!0;if(V)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/15/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var V=a===e}else var V=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var z=l===e}else var z=!0;if(z){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="request")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var z=l===e}else var z=!0;if(z)if(r.request!==void 0){const i=e;ge(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:u})||(s=s===null?ge.errors:s.concat(ge.errors),e=s.length);var z=i===e}else var z=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="rm"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var oe=A===e}else var oe=!0;if(oe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var oe=a===e}else var oe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ue=l===e}else var ue=!0;if(ue){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="rm")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var ue=l===e}else var ue=!0;if(ue)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ue=i===e}else var ue=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Pe=A===e}else var Pe=!0;if(Pe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Pe=a===e}else var Pe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var qe=l===e}else var qe=!0;if(qe){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="rmdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var qe=l===e}else var qe=!0;if(qe)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var qe=i===e}else var qe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runPHP"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.code===void 0&&(c="code")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="code"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Me=A===e}else var Me=!0;if(Me)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Me=a===e}else var Me=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=l===e}else var Ae=!0;if(Ae){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runPHP")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var Ae=l===e}else var Ae=!0;if(Ae)if(r.code!==void 0){let i=r.code;const l=e,j=e;let a=!1;const A=e;if(typeof i!="string"){const X={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[X]:s.push(X),e++}var dr=A===e;if(a=a||dr,!a){const X=e;if(e===X)if(i&&typeof i=="object"&&!Array.isArray(i)){let le;if(i.filename===void 0&&(le="filename")||i.content===void 0&&(le="content")){const je={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/required",keyword:"required",params:{missingProperty:le},message:"must have required property '"+le+"'"};s===null?s=[je]:s.push(je),e++}else{const je=e;for(const ne in i)if(!(ne==="filename"||ne==="content")){const Te={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ne},message:"must NOT have additional properties"};s===null?s=[Te]:s.push(Te),e++;break}if(je===e){if(i.filename!==void 0){const ne=e;if(typeof i.filename!="string"){const Te={instancePath:t+"/code/filename",schemaPath:"#/oneOf/18/properties/code/anyOf/1/properties/filename/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Te]:s.push(Te),e++}var Ve=ne===e}else var Ve=!0;if(Ve)if(i.content!==void 0){const ne=e;if(typeof i.content!="string"){const Z={instancePath:t+"/code/content",schemaPath:"#/oneOf/18/properties/code/anyOf/1/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Z]:s.push(Z),e++}var Ve=ne===e}else var Ve=!0}}}else{const le={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[le]:s.push(le),e++}var dr=X===e;a=a||dr}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var Ae=l===e}else var Ae=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runPHPWithOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.options===void 0&&(c="options")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ze=A===e}else var ze=!0;if(ze)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ze=a===e}else var ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Se=l===e}else var Se=!0;if(Se){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runPHPWithOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var Se=l===e}else var Se=!0;if(Se)if(r.options!==void 0){const i=e;pe(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:u})||(s=s===null?pe.errors:s.concat(pe.errors),e=s.length);var Se=i===e}else var Se=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runWpInstallationWizard"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.options===void 0&&(c="options")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var He=A===e}else var He=!0;if(He)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var He=a===e}else var He=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Re=l===e}else var Re=!0;if(Re){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runWpInstallationWizard")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var Re=l===e}else var Re=!0;if(Re)if(r.options!==void 0){let i=r.options;const l=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=e;for(const ie in i)if(!(ie==="adminUsername"||ie==="adminPassword"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(A===e){if(i.adminUsername!==void 0){const ie=e;if(typeof i.adminUsername!="string")return o.errors=[{instancePath:t+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Qe=ie===e}else var Qe=!0;if(Qe)if(i.adminPassword!==void 0){const ie=e;if(typeof i.adminPassword!="string")return o.errors=[{instancePath:t+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Qe=ie===e}else var Qe=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Re=l===e}else var Re=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runSql"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.sql===void 0&&(c="sql")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="sql"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ye=A===e}else var Ye=!0;if(Ye)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ye=a===e}else var Ye=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Le=l===e}else var Le=!0;if(Le){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runSql")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var Le=l===e}else var Le=!0;if(Le)if(r.sql!==void 0){const i=e;G(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var Le=i===e}else var Le=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="setSiteOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.options===void 0&&(c="options")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ze=A===e}else var Ze=!0;if(Ze)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ze=a===e}else var Ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=l===e}else var Fe=!0;if(Fe){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="setSiteOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var Fe=l===e}else var Fe=!0;if(Fe)if(r.options!==void 0){let i=r.options;const l=e;if(e===l&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=l===e}else var Fe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="unzip"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.extractToPath===void 0&&(c="extractToPath")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="zipFile"||i==="zipPath"||i==="extractToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ge=A===e}else var Ge=!0;if(Ge)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ge=a===e}else var Ge=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var me=l===e}else var me=!0;if(me){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="unzip")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var me=l===e}else var me=!0;if(me){if(r.zipFile!==void 0){const i=e;G(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var me=i===e}else var me=!0;if(me){if(r.zipPath!==void 0){const i=e;if(typeof r.zipPath!="string")return o.errors=[{instancePath:t+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var me=i===e}else var me=!0;if(me)if(r.extractToPath!==void 0){const i=e;if(typeof r.extractToPath!="string")return o.errors=[{instancePath:t+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var me=i===e}else var me=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="updateUserMeta"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.meta===void 0&&(c="meta")||r.step===void 0&&(c="step")||r.userId===void 0&&(c="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="meta"||i==="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Je=A===e}else var Je=!0;if(Je)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Je=a===e}else var Je=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _e=l===e}else var _e=!0;if(_e){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="updateUserMeta")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var _e=l===e}else var _e=!0;if(_e){if(r.meta!==void 0){let i=r.meta;const l=e;if(e===l&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _e=l===e}else var _e=!0;if(_e)if(r.userId!==void 0){let i=r.userId;const l=e;if(!(typeof i=="number"&&isFinite(i)))return o.errors=[{instancePath:t+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var _e=l===e}else var _e=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="writeFile"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.data===void 0&&(c="data")||r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"||i==="data"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Xe=A===e}else var Xe=!0;if(Xe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Xe=a===e}else var Xe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ke=l===e}else var ke=!0;if(ke){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="writeFile")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var ke=l===e}else var ke=!0;if(ke){if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ke=i===e}else var ke=!0;if(ke)if(r.data!==void 0){let i=r.data;const l=e,j=e;let a=!1;const A=e;G(i,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var Ce=A===e;if(a=a||Ce,!a){const X=e;if(typeof i!="string"){const le={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[le]:s.push(le),e++}var Ce=X===e;if(a=a||Ce,!a){const le=e;if(e===le)if(i&&typeof i=="object"&&!Array.isArray(i)){let ne;if(i.BYTES_PER_ELEMENT===void 0&&(ne="BYTES_PER_ELEMENT")||i.buffer===void 0&&(ne="buffer")||i.byteLength===void 0&&(ne="byteLength")||i.byteOffset===void 0&&(ne="byteOffset")||i.length===void 0&&(ne="length")){const Te={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:ne},message:"must have required property '"+ne+"'"};s===null?s=[Te]:s.push(Te),e++}else{const Te=e;for(const Z in i)if(!(Z==="BYTES_PER_ELEMENT"||Z==="buffer"||Z==="byteLength"||Z==="byteOffset"||Z==="length")){let he=i[Z];const tr=e;if(!(typeof he=="number"&&isFinite(he))){const fe={instancePath:t+"/data/"+Z.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/oneOf/25/properties/data/anyOf/2/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var vt=tr===e;if(!vt)break}if(Te===e){if(i.BYTES_PER_ELEMENT!==void 0){let Z=i.BYTES_PER_ELEMENT;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const tr={instancePath:t+"/data/BYTES_PER_ELEMENT",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[tr]:s.push(tr),e++}var ye=he===e}else var ye=!0;if(ye){if(i.buffer!==void 0){let Z=i.buffer;const he=e;if(e===he)if(Z&&typeof Z=="object"&&!Array.isArray(Z)){let fe;if(Z.byteLength===void 0&&(fe="byteLength")){const sr={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:fe},message:"must have required property '"+fe+"'"};s===null?s=[sr]:s.push(sr),e++}else{const sr=e;for(const De in Z)if(De!=="byteLength"){const Ue={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:De},message:"must NOT have additional properties"};s===null?s=[Ue]:s.push(Ue),e++;break}if(sr===e&&Z.byteLength!==void 0){let De=Z.byteLength;if(!(typeof De=="number"&&isFinite(De))){const Ue={instancePath:t+"/data/buffer/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[Ue]:s.push(Ue),e++}}}}else{const fe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteLength!==void 0){let Z=i.byteLength;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const fe={instancePath:t+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteOffset!==void 0){let Z=i.byteOffset;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const fe={instancePath:t+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0;if(ye)if(i.length!==void 0){let Z=i.length;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const fe={instancePath:t+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0}}}}}}else{const ne={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[ne]:s.push(ne),e++}var Ce=le===e;a=a||Ce}}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var ke=l===e}else var ke=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="writeFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.filesTree===void 0&&(c="filesTree")||r.step===void 0&&(c="step")||r.writeToPath===void 0&&(c="writeToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="writeToPath"||i==="filesTree"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ke=A===e}else var Ke=!0;if(Ke)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ke=a===e}else var Ke=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Oe=l===e}else var Oe=!0;if(Oe){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="writeFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"writeFiles"},message:"must be equal to constant"}],!1;var Oe=l===e}else var Oe=!0;if(Oe){if(r.writeToPath!==void 0){const i=e;if(typeof r.writeToPath!="string")return o.errors=[{instancePath:t+"/writeToPath",schemaPath:"#/oneOf/26/properties/writeToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Oe=i===e}else var Oe=!0;if(Oe)if(r.filesTree!==void 0){const i=e;ce(r.filesTree,{instancePath:t+"/filesTree",parentData:r,parentDataProperty:"filesTree",rootData:u})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var Oe=i===e}else var Oe=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="wp-cli"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.command===void 0&&(c="command")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="command"||i==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var er=A===e}else var er=!0;if(er)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var er=a===e}else var er=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ee=l===e}else var Ee=!0;if(Ee){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="wp-cli")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var Ee=l===e}else var Ee=!0;if(Ee){if(r.command!==void 0){let i=r.command;const l=e,j=e;let a=!1;const A=e;if(typeof i!="string"){const X={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[X]:s.push(X),e++}var cr=A===e;if(a=a||cr,!a){const X=e;if(e===X)if(Array.isArray(i)){var Sr=!0;const le=i.length;for(let je=0;je<le;je++){const ne=e;if(typeof i[je]!="string"){const Z={instancePath:t+"/command/"+je,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Z]:s.push(Z),e++}var Sr=ne===e;if(!Sr)break}}else{const le={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[le]:s.push(le),e++}var cr=X===e;a=a||cr}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var Ee=l===e}else var Ee=!0;if(Ee)if(r.wpCliPath!==void 0){const i=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/27/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ee=i===e}else var Ee=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="setSiteLanguage"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.language===void 0&&(c="language")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="language"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/28/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/28/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var rr=A===e}else var rr=!0;if(rr)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/28/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var rr=a===e}else var rr=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/28/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ne=l===e}else var Ne=!0;if(Ne){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/28/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="setSiteLanguage")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/28/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var Ne=l===e}else var Ne=!0;if(Ne)if(r.language!==void 0){const i=e;if(typeof r.language!="string")return o.errors=[{instancePath:t+"/language",schemaPath:"#/oneOf/28/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ne=i===e}else var Ne=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:J},message:'value of tag "step" must be in oneOf'}],!1;else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:J},message:'tag "step" must be string'}],!1}}else return o.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return o.errors=s,e===0}function H(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const te=e;for(const m in r)if(!ft.call(es.properties,m))return H.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(te===e){if(r.landingPage!==void 0){const m=e;if(typeof r.landingPage!="string")return H.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===e}else var p=!0;if(p){if(r.description!==void 0){const m=e;if(typeof r.description!="string")return H.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===e}else var p=!0;if(p){if(r.meta!==void 0){let m=r.meta;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){let v;if(m.title===void 0&&(v="title")||m.author===void 0&&(v="author"))return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"}],!1;{const O=e;for(const E in m)if(!(E==="title"||E==="description"||E==="author"||E==="categories"))return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"}],!1;if(O===e){if(m.title!==void 0){const E=e;if(typeof m.title!="string")return H.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=E===e}else var d=!0;if(d){if(m.description!==void 0){const E=e;if(typeof m.description!="string")return H.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=E===e}else var d=!0;if(d){if(m.author!==void 0){const E=e;if(typeof m.author!="string")return H.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=E===e}else var d=!0;if(d)if(m.categories!==void 0){let E=m.categories;const P=e;if(e===P)if(Array.isArray(E)){var g=!0;const S=E.length;for(let L=0;L<S;L++){const U=e;if(typeof E[L]!="string")return H.errors=[{instancePath:t+"/meta/categories/"+L,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var g=U===e;if(!g)break}}else return H.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var d=P===e}else var d=!0}}}}}else return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.preferredVersions!==void 0){let m=r.preferredVersions;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){let v;if(m.php===void 0&&(v="php")||m.wp===void 0&&(v="wp"))return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"}],!1;{const O=e;for(const E in m)if(!(E==="php"||E==="wp"))return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"}],!1;if(O===e){if(m.php!==void 0){let E=m.php;const P=e,b=e;let S=!1;const L=e;Ie(E,{instancePath:t+"/preferredVersions/php",parentData:m,parentDataProperty:"php",rootData:u})||(s=s===null?Ie.errors:s.concat(Ie.errors),e=s.length);var _=L===e;if(S=S||_,!S){const U=e;if(typeof E!="string"){const W={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}if(E!=="latest"){const W={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};s===null?s=[W]:s.push(W),e++}var _=U===e;S=S||_}if(S)e=b,s!==null&&(b?s.length=b:s=null);else{const U={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[U]:s.push(U),e++,H.errors=s,!1}var y=P===e}else var y=!0;if(y)if(m.wp!==void 0){const E=e;if(typeof m.wp!="string")return H.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=E===e}else var y=!0}}}else return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.features!==void 0){let m=r.features;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){const v=e;for(const O in m)if(!(O==="intl"||O==="networking"))return H.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"}],!1;if(v===e){if(m.intl!==void 0){const O=e;if(typeof m.intl!="boolean")return H.errors=[{instancePath:t+"/features/intl",schemaPath:"#/properties/features/properties/intl/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=O===e}else var k=!0;if(k)if(m.networking!==void 0){const O=e;if(typeof m.networking!="boolean")return H.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=O===e}else var k=!0}}else return H.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.extraLibraries!==void 0){let m=r.extraLibraries;const N=e;if(e===N)if(Array.isArray(m)){var T=!0;const v=m.length;for(let O=0;O<v;O++){let E=m[O];const P=e;if(typeof E!="string")return H.errors=[{instancePath:t+"/extraLibraries/"+O,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(E!=="wp-cli")return H.errors=[{instancePath:t+"/extraLibraries/"+O,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var T=P===e;if(!T)break}}else return H.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===e}else var p=!0;if(p){if(r.constants!==void 0){let m=r.constants;const N=e;if(e===e)if(m&&typeof m=="object"&&!Array.isArray(m))for(const O in m){let E=m[O];const P=e;if(typeof E!="string"&&typeof E!="boolean"&&!(typeof E=="number"&&isFinite(E)))return H.errors=[{instancePath:t+"/constants/"+O.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:rs.additionalProperties.type},message:"must be string,boolean,number"}],!1;var $=P===e;if(!$)break}else return H.errors=[{instancePath:t+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.plugins!==void 0){let m=r.plugins;const N=e;if(e===N)if(Array.isArray(m)){var h=!0;const v=m.length;for(let O=0;O<v;O++){let E=m[O];const P=e,b=e;let S=!1;const L=e;if(typeof E!="string"){const F={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var M=L===e;if(S=S||M,!S){const F=e;G(E,{instancePath:t+"/plugins/"+O,parentData:m,parentDataProperty:O,rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var M=F===e;S=S||M}if(S)e=b,s!==null&&(b?s.length=b:s=null);else{const F={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,H.errors=s,!1}var h=P===e;if(!h)break}}else return H.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===e}else var p=!0;if(p){if(r.siteOptions!==void 0){let m=r.siteOptions;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){const v=e;for(const O in m)if(O!=="blogname"){const E=e;if(typeof m[O]!="string")return H.errors=[{instancePath:t+"/siteOptions/"+O.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=E===e;if(!K)break}if(v===e&&m.blogname!==void 0&&typeof m.blogname!="string")return H.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return H.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.login!==void 0){let m=r.login;const N=e,w=e;let v=!1;const O=e;if(typeof m!="boolean"){const P={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[P]:s.push(P),e++}var Y=O===e;if(v=v||Y,!v){const P=e;if(e===P)if(m&&typeof m=="object"&&!Array.isArray(m)){let S;if(m.username===void 0&&(S="username")||m.password===void 0&&(S="password")){const L={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:S},message:"must have required property '"+S+"'"};s===null?s=[L]:s.push(L),e++}else{const L=e;for(const U in m)if(!(U==="username"||U==="password")){const F={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:U},message:"must NOT have additional properties"};s===null?s=[F]:s.push(F),e++;break}if(L===e){if(m.username!==void 0){const U=e;if(typeof m.username!="string"){const F={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var q=U===e}else var q=!0;if(q)if(m.password!==void 0){const U=e;if(typeof m.password!="string"){const W={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}var q=U===e}else var q=!0}}}else{const S={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[S]:s.push(S),e++}var Y=P===e;v=v||Y}if(v)e=w,s!==null&&(w?s.length=w:s=null);else{const P={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[P]:s.push(P),e++,H.errors=s,!1}var p=N===e}else var p=!0;if(p){if(r.steps!==void 0){let m=r.steps;const N=e;if(e===N)if(Array.isArray(m)){var ee=!0;const v=m.length;for(let O=0;O<v;O++){let E=m[O];const P=e,b=e;let S=!1;const L=e;o(E,{instancePath:t+"/steps/"+O,parentData:m,parentDataProperty:O,rootData:u})||(s=s===null?o.errors:s.concat(o.errors),e=s.length);var B=L===e;if(S=S||B,!S){const F=e;if(typeof E!="string"){const C={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[C]:s.push(C),e++}var B=F===e;if(S=S||B,!S){const C=e,D={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};s===null?s=[D]:s.push(D),e++;var B=C===e;if(S=S||B,!S){const R=e;if(typeof E!="boolean"){const V={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[V]:s.push(V),e++}if(E!==!1){const V={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};s===null?s=[V]:s.push(V),e++}var B=R===e;if(S=S||B,!S){const V=e;if(E!==null){const oe={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};s===null?s=[oe]:s.push(oe),e++}var B=V===e;S=S||B}}}}if(S)e=b,s!==null&&(b?s.length=b:s=null);else{const F={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,H.errors=s,!1}var ee=P===e;if(!ee)break}}else return H.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===e}else var p=!0;if(p)if(r.$schema!==void 0){const m=e;if(typeof r.$schema!="string")return H.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===e}else var p=!0}}}}}}}}}}}}else return H.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return H.errors=s,e===0}function ar(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;return H(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?H.errors:s.concat(H.errors),e=s.length),ar.errors=s,e===0}const{wpCLI:as,...Fr}=Kt,ns={...Fr,"wp-cli":as,importFile:Fr.importWxr};class dt extends Error{constructor(t,n){super(t),this.name="InvalidBlueprintError",this.validationErrors=n}}class ct extends Error{constructor(t){const{stepNumber:n,step:f,cause:u}=t,s=u instanceof Error?u:new Error(String(u)),e=`Error when executing the blueprint step #${n}`,p=s.message?`${e}: ${s.message}`:e;super(p,{cause:s}),this.name="BlueprintStepExecutionError",this.stepNumber=n,this.step=f,this.messages=(s.message||"").split(`
769
- `).map(d=>d.trim()).filter(Boolean)}}async function qr(r,t={}){const n={...t};let f;return Ar(r)?(f=await mt(r),n.streamBundledFile=function(...u){return r.read(...u)}):f=r,ps(f,n)}function Ar(r){return r&&"read"in r&&typeof r.read=="function"}async function mt(r){if(!Ar(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}function ps(r,{progress:t=new br.ProgressTracker,semaphore:n=new I.Semaphore({concurrency:3}),onStepCompleted:f=()=>{},onBlueprintValidated:u=()=>{},corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:p,additionalSteps:d}={}){var h,M,K,Y,q,ee,B,te,m,N;r=structuredClone(r),r={...r,steps:(r.steps||[]).filter(ht).filter(us)},r.steps=[...r.steps||[],...d||[]];for(const w of r.steps)!w||typeof w!="object"||(w.step==="importFile"?(w.step="importWxr",ae.logger.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(w==null?void 0:w.step)==="installPlugin"&&"pluginZipFile"in w?(w.pluginData=w.pluginZipFile,ae.logger.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(w==null?void 0:w.step)==="installTheme"&&"themeZipFile"in w&&(w.themeData=w.themeZipFile,ae.logger.warn('The "themeZipFile" option of the "installTheme" step is deprecated. Use "themeData" instead.')));if(r.constants&&r.steps.unshift({step:"defineWpConfigConsts",consts:r.constants}),r.siteOptions&&r.steps.unshift({step:"setSiteOptions",options:r.siteOptions}),r.plugins){const w=r.plugins.map(v=>typeof v=="string"?v.startsWith("https://")?{resource:"url",url:v}:{resource:"wordpress.org/plugins",slug:v}:v).map(v=>({step:"installPlugin",pluginData:v}));r.steps.unshift(...w)}r.login&&r.steps.unshift({step:"login",...r.login===!0?{username:"admin"}:r.login});const g=((h=r.steps)==null?void 0:h.findIndex(w=>typeof w=="object"&&(w==null?void 0:w.step)&&["wp-cli","enableMultisite"].includes(w.step)))??-1;if((M=r==null?void 0:r.extraLibraries)!=null&&M.includes("wp-cli")||g!==-1){const w={step:"writeFile",data:zt,path:Or};g===-1?(K=r.steps)==null||K.push(w):(Y=r.steps)==null||Y.splice(g,0,w)}const _=(q=r.steps)==null?void 0:q.findIndex(w=>typeof w=="object"&&(w==null?void 0:w.step)==="importWxr");_!==void 0&&_>-1&&((ee=r.steps)==null||ee.splice(_,0,{step:"installPlugin",pluginData:{resource:"wordpress.org/plugins",slug:"wordpress-importer"}}));const y=yt(r);if(!y.valid){const{errors:w}=y,v=ls(r,w);throw new dt(`Invalid Blueprint: The Blueprint does not conform to the schema.
770
+ Only the username field is required for user authentication.`}},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:{anyOf:[{type:"string"},{type:"object",properties:{filename:{type:"string",description:"This property is ignored during Blueprint v1 execution but exists so the same runPHP step structure can be used for Blueprints v1 and v2."},content:{type:"string"}},required:["filename","content"],additionalProperties:!1}],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:"writeFiles"},writeToPath:{type:"string",description:"The path of the file to write to"},filesTree:{$ref:"#/definitions/DirectoryReference",description:"The 'filesTree' defines the directory structure, supporting 'literal:directory' or 'git:directory' types. The 'name' represents the root directory, while 'files' is an object where keys are file paths, and values contain either file content as a string or nested objects for subdirectories."}},required:["filesTree","step","writeToPath"]},{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"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteLanguage"},language:{type:"string",description:"The language to set, e.g. 'en_US'"}},required:["language","step"]}]},ut={enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ge(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let K;if(r.url===void 0&&(K="url"))return ge.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:K},message:"must have required property '"+K+"'"}],!1;{const Y=e;for(const q in r)if(!(q==="method"||q==="url"||q==="headers"||q==="body"))return ge.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:q},message:"must NOT have additional properties"}],!1;if(Y===e){if(r.method!==void 0){let q=r.method;const ee=e;if(typeof q!="string")return ge.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(q==="GET"||q==="POST"||q==="HEAD"||q==="OPTIONS"||q==="PATCH"||q==="PUT"||q==="DELETE"))return ge.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:ut.enum},message:"must be equal to one of the allowed values"}],!1;var p=ee===e}else var p=!0;if(p){if(r.url!==void 0){const q=e;if(typeof r.url!="string")return ge.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=q===e}else var p=!0;if(p){if(r.headers!==void 0){let q=r.headers;const ee=e;if(e===e)if(q&&typeof q=="object"&&!Array.isArray(q))for(const m in q){const N=e;if(typeof q[m]!="string")return ge.errors=[{instancePath:t+"/headers/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=N===e;if(!u)break}else return ge.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=ee===e}else var p=!0;if(p)if(r.body!==void 0){let q=r.body;const ee=e,B=e;let te=!1;const m=e;if(typeof q!="string"){const w={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}var y=m===e;if(te=te||y,!te){const w=e;if(e===w)if(q&&typeof q=="object"&&!Array.isArray(q)){let O;if(q.BYTES_PER_ELEMENT===void 0&&(O="BYTES_PER_ELEMENT")||q.buffer===void 0&&(O="buffer")||q.byteLength===void 0&&(O="byteLength")||q.byteOffset===void 0&&(O="byteOffset")||q.length===void 0&&(O="length")){const E={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};s===null?s=[E]:s.push(E),e++}else{const E=e;for(const P in q)if(!(P==="BYTES_PER_ELEMENT"||P==="buffer"||P==="byteLength"||P==="byteOffset"||P==="length")){let b=q[P];const R=e;if(!(typeof b=="number"&&isFinite(b))){const L={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var _=R===e;if(!_)break}if(E===e){if(q.BYTES_PER_ELEMENT!==void 0){let P=q.BYTES_PER_ELEMENT;const b=e;if(!(typeof P=="number"&&isFinite(P))){const R={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var h=b===e}else var h=!0;if(h){if(q.buffer!==void 0){let P=q.buffer;const b=e;if(e===b)if(P&&typeof P=="object"&&!Array.isArray(P)){let L;if(P.byteLength===void 0&&(L="byteLength")){const U={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};s===null?s=[U]:s.push(U),e++}else{const U=e;for(const F in P)if(F!=="byteLength"){const W={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:F},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if(U===e&&P.byteLength!==void 0){let F=P.byteLength;if(!(typeof F=="number"&&isFinite(F))){const W={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[W]:s.push(W),e++}}}}else{const L={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[L]:s.push(L),e++}var h=b===e}else var h=!0;if(h){if(q.byteLength!==void 0){let P=q.byteLength;const b=e;if(!(typeof P=="number"&&isFinite(P))){const L={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var h=b===e}else var h=!0;if(h){if(q.byteOffset!==void 0){let P=q.byteOffset;const b=e;if(!(typeof P=="number"&&isFinite(P))){const L={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var h=b===e}else var h=!0;if(h)if(q.length!==void 0){let P=q.length;const b=e;if(!(typeof P=="number"&&isFinite(P))){const L={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var h=b===e}else var h=!0}}}}}}else{const O={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[O]:s.push(O),e++}var y=w===e;if(te=te||y,!te){const O=e;if(e===O)if(q&&typeof q=="object"&&!Array.isArray(q))for(const P in q){let b=q[P];const R=e,L=e;let U=!1;const F=e;if(typeof b!="string"){const W={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}var k=F===e;if(U=U||k,!U){const W=e;if(e===W)if(b&&typeof b=="object"&&!Array.isArray(b)){let D;if(b.BYTES_PER_ELEMENT===void 0&&(D="BYTES_PER_ELEMENT")||b.buffer===void 0&&(D="buffer")||b.byteLength===void 0&&(D="byteLength")||b.byteOffset===void 0&&(D="byteOffset")||b.length===void 0&&(D="length")){const re={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:D},message:"must have required property '"+D+"'"};s===null?s=[re]:s.push(re),e++}else{const re=e;for(const S in b)if(!(S==="BYTES_PER_ELEMENT"||S==="buffer"||S==="byteLength"||S==="byteOffset"||S==="length")){let Q=b[S];const V=e;if(!(typeof Q=="number"&&isFinite(Q))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+S.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var T=V===e;if(!T)break}if(re===e){if(b.BYTES_PER_ELEMENT!==void 0){let S=b.BYTES_PER_ELEMENT;const Q=e;if(!(typeof S=="number"&&isFinite(S))){const V={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[V]:s.push(V),e++}var $=Q===e}else var $=!0;if($){if(b.buffer!==void 0){let S=b.buffer;const Q=e;if(e===Q)if(S&&typeof S=="object"&&!Array.isArray(S)){let z;if(S.byteLength===void 0&&(z="byteLength")){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:z},message:"must have required property '"+z+"'"};s===null?s=[oe]:s.push(oe),e++}else{const oe=e;for(const ue in S)if(ue!=="byteLength"){const Pe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ue},message:"must NOT have additional properties"};s===null?s=[Pe]:s.push(Pe),e++;break}if(oe===e&&S.byteLength!==void 0){let ue=S.byteLength;if(!(typeof ue=="number"&&isFinite(ue))){const Pe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[Pe]:s.push(Pe),e++}}}}else{const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[z]:s.push(z),e++}var $=Q===e}else var $=!0;if($){if(b.byteLength!==void 0){let S=b.byteLength;const Q=e;if(!(typeof S=="number"&&isFinite(S))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var $=Q===e}else var $=!0;if($){if(b.byteOffset!==void 0){let S=b.byteOffset;const Q=e;if(!(typeof S=="number"&&isFinite(S))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteOffset",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var $=Q===e}else var $=!0;if($)if(b.length!==void 0){let S=b.length;const Q=e;if(!(typeof S=="number"&&isFinite(S))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/length",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var $=Q===e}else var $=!0}}}}}}else{const D={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[D]:s.push(D),e++}var k=W===e;if(U=U||k,!U){const D=e;if(e===D)if(b&&typeof b=="object"&&!Array.isArray(b)){let S;if(b.lastModified===void 0&&(S="lastModified")||b.name===void 0&&(S="name")||b.size===void 0&&(S="size")||b.type===void 0&&(S="type")||b.webkitRelativePath===void 0&&(S="webkitRelativePath")){const Q={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:S},message:"must have required property '"+S+"'"};s===null?s=[Q]:s.push(Q),e++}else{const Q=e;for(const V in b)if(!(V==="size"||V==="type"||V==="lastModified"||V==="name"||V==="webkitRelativePath")){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"};s===null?s=[z]:s.push(z),e++;break}if(Q===e){if(b.size!==void 0){let V=b.size;const z=e;if(!(typeof V=="number"&&isFinite(V))){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/size",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[oe]:s.push(oe),e++}var g=z===e}else var g=!0;if(g){if(b.type!==void 0){const V=e;if(typeof b.type!="string"){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/type",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var g=V===e}else var g=!0;if(g){if(b.lastModified!==void 0){let V=b.lastModified;const z=e;if(!(typeof V=="number"&&isFinite(V))){const ue={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/lastModified",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/lastModified/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[ue]:s.push(ue),e++}var g=z===e}else var g=!0;if(g){if(b.name!==void 0){const V=e;if(typeof b.name!="string"){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/name",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var g=V===e}else var g=!0;if(g)if(b.webkitRelativePath!==void 0){const V=e;if(typeof b.webkitRelativePath!="string"){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/webkitRelativePath",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/webkitRelativePath/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var g=V===e}else var g=!0}}}}}}else{const S={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[S]:s.push(S),e++}var k=D===e;U=U||k}}if(U)e=L,s!==null&&(L?s.length=L:s=null);else{const W={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[W]:s.push(W),e++}var M=R===e;if(!M)break}else{const P={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[P]:s.push(P),e++}var y=O===e;te=te||y}}if(te)e=B,s!==null&&(B?s.length=B:s=null);else{const w={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[w]:s.push(w),e++,ge.errors=s,!1}var p=ee===e}else var p=!0}}}}}else return ge.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ge.errors=s,e===0}const os={properties:{relativeUri:{type:"string",description:"Request path following the domain:port part – after any URL rewriting rules (e.g. apache .htaccess) have been applied."},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."}}};function pe(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const $=e;for(const g in r)if(!ft.call(os.properties,g))return pe.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"}],!1;if($===e){if(r.relativeUri!==void 0){const g=e;if(typeof r.relativeUri!="string")return pe.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=g===e}else var p=!0;if(p){if(r.scriptPath!==void 0){const g=e;if(typeof r.scriptPath!="string")return pe.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=g===e}else var p=!0;if(p){if(r.protocol!==void 0){const g=e;if(typeof r.protocol!="string")return pe.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=g===e}else var p=!0;if(p){if(r.method!==void 0){let g=r.method;const M=e;if(typeof g!="string")return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(g==="GET"||g==="POST"||g==="HEAD"||g==="OPTIONS"||g==="PATCH"||g==="PUT"||g==="DELETE"))return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:ut.enum},message:"must be equal to one of the allowed values"}],!1;var p=M===e}else var p=!0;if(p){if(r.headers!==void 0){let g=r.headers;const M=e;if(e===e)if(g&&typeof g=="object"&&!Array.isArray(g))for(const q in g){const ee=e;if(typeof g[q]!="string")return pe.errors=[{instancePath:t+"/headers/"+q.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=ee===e;if(!u)break}else return pe.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=M===e}else var p=!0;if(p){if(r.body!==void 0){let g=r.body;const M=e,K=e;let Y=!1;const q=e;if(typeof g!="string"){const B={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[B]:s.push(B),e++}var y=q===e;if(Y=Y||y,!Y){const B=e;if(e===B)if(g&&typeof g=="object"&&!Array.isArray(g)){let m;if(g.BYTES_PER_ELEMENT===void 0&&(m="BYTES_PER_ELEMENT")||g.buffer===void 0&&(m="buffer")||g.byteLength===void 0&&(m="byteLength")||g.byteOffset===void 0&&(m="byteOffset")||g.length===void 0&&(m="length")){const N={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:m},message:"must have required property '"+m+"'"};s===null?s=[N]:s.push(N),e++}else{const N=e;for(const w in g)if(!(w==="BYTES_PER_ELEMENT"||w==="buffer"||w==="byteLength"||w==="byteOffset"||w==="length")){let v=g[w];const O=e;if(!(typeof v=="number"&&isFinite(v))){const E={instancePath:t+"/body/"+w.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[E]:s.push(E),e++}var _=O===e;if(!_)break}if(N===e){if(g.BYTES_PER_ELEMENT!==void 0){let w=g.BYTES_PER_ELEMENT;const v=e;if(!(typeof w=="number"&&isFinite(w))){const O={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[O]:s.push(O),e++}var h=v===e}else var h=!0;if(h){if(g.buffer!==void 0){let w=g.buffer;const v=e;if(e===v)if(w&&typeof w=="object"&&!Array.isArray(w)){let E;if(w.byteLength===void 0&&(E="byteLength")){const P={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:E},message:"must have required property '"+E+"'"};s===null?s=[P]:s.push(P),e++}else{const P=e;for(const b in w)if(b!=="byteLength"){const R={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:b},message:"must NOT have additional properties"};s===null?s=[R]:s.push(R),e++;break}if(P===e&&w.byteLength!==void 0){let b=w.byteLength;if(!(typeof b=="number"&&isFinite(b))){const R={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}}}}else{const E={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[E]:s.push(E),e++}var h=v===e}else var h=!0;if(h){if(g.byteLength!==void 0){let w=g.byteLength;const v=e;if(!(typeof w=="number"&&isFinite(w))){const E={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[E]:s.push(E),e++}var h=v===e}else var h=!0;if(h){if(g.byteOffset!==void 0){let w=g.byteOffset;const v=e;if(!(typeof w=="number"&&isFinite(w))){const E={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[E]:s.push(E),e++}var h=v===e}else var h=!0;if(h)if(g.length!==void 0){let w=g.length;const v=e;if(!(typeof w=="number"&&isFinite(w))){const E={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[E]:s.push(E),e++}var h=v===e}else var h=!0}}}}}}else{const m={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[m]:s.push(m),e++}var y=B===e;Y=Y||y}if(Y)e=K,s!==null&&(K?s.length=K:s=null);else{const B={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[B]:s.push(B),e++,pe.errors=s,!1}var p=M===e}else var p=!0;if(p){if(r.env!==void 0){let g=r.env;const M=e;if(e===M)if(g&&typeof g=="object"&&!Array.isArray(g))for(const Y in g){const q=e;if(typeof g[Y]!="string")return pe.errors=[{instancePath:t+"/env/"+Y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=q===e;if(!k)break}else return pe.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=M===e}else var p=!0;if(p){if(r.$_SERVER!==void 0){let g=r.$_SERVER;const M=e;if(e===M)if(g&&typeof g=="object"&&!Array.isArray(g))for(const Y in g){const q=e;if(typeof g[Y]!="string")return pe.errors=[{instancePath:t+"/$_SERVER/"+Y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=q===e;if(!T)break}else return pe.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=M===e}else var p=!0;if(p)if(r.code!==void 0){const g=e;if(typeof r.code!="string")return pe.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=g===e}else var p=!0}}}}}}}}}else return pe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return pe.errors=s,e===0}function o(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let mr;if(r.step===void 0&&(mr="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:mr},message:"must have required property '"+mr+"'"}],!1;{const J=r.step;if(typeof J=="string")if(J==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.pluginPath===void 0&&(c="pluginPath")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="pluginPath"||i==="pluginName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/0/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var p=A===e}else var p=!0;if(p)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/0/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=a===e}else var p=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=l===e}else var u=!0;if(u){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="activatePlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var u=l===e}else var u=!0;if(u){if(r.pluginPath!==void 0){const i=e;if(typeof r.pluginPath!="string")return o.errors=[{instancePath:t+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=i===e}else var u=!0;if(u)if(r.pluginName!==void 0){const i=e;if(typeof r.pluginName!="string")return o.errors=[{instancePath:t+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=i===e}else var u=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="activateTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step")||r.themeFolderName===void 0&&(c="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var y=A===e}else var y=!0;if(y)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===e}else var y=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _=l===e}else var _=!0;if(_){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="activateTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var _=l===e}else var _=!0;if(_)if(r.themeFolderName!==void 0){const i=e;if(typeof r.themeFolderName!="string")return o.errors=[{instancePath:t+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=i===e}else var _=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="cp"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.fromPath===void 0&&(c="fromPath")||r.step===void 0&&(c="step")||r.toPath===void 0&&(c="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="fromPath"||i==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var h=A===e}else var h=!0;if(h)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=a===e}else var h=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var k=l===e}else var k=!0;if(k){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="cp")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var k=l===e}else var k=!0;if(k){if(r.fromPath!==void 0){const i=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=i===e}else var k=!0;if(k)if(r.toPath!==void 0){const i=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=i===e}else var k=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="defineWpConfigConsts"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.consts===void 0&&(c="consts")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="consts"||i==="method"||i==="virtualize"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var T=A===e}else var T=!0;if(T)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=a===e}else var T=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=l===e}else var $=!0;if($){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="defineWpConfigConsts")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var $=l===e}else var $=!0;if($){if(r.consts!==void 0){let i=r.consts;const l=e;if(e===l&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=l===e}else var $=!0;if($){if(r.method!==void 0){let i=r.method;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="rewrite-wp-config"||i==="define-before-run"))return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:ir.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var $=l===e}else var $=!0;if($)if(r.virtualize!==void 0){const i=e;if(typeof r.virtualize!="boolean")return o.errors=[{instancePath:t+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var $=i===e}else var $=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="defineSiteUrl"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.siteUrl===void 0&&(c="siteUrl")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="siteUrl"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var g=A===e}else var g=!0;if(g)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var g=a===e}else var g=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var M=l===e}else var M=!0;if(M){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="defineSiteUrl")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var M=l===e}else var M=!0;if(M)if(r.siteUrl!==void 0){const i=e;if(typeof r.siteUrl!="string")return o.errors=[{instancePath:t+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var M=i===e}else var M=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="enableMultisite"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var K=A===e}else var K=!0;if(K)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=a===e}else var K=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Y=l===e}else var Y=!0;if(Y){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="enableMultisite")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var Y=l===e}else var Y=!0;if(Y)if(r.wpCliPath!==void 0){const i=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/5/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Y=i===e}else var Y=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="importWxr"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.file===void 0&&(c="file")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="file"||i==="importer"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var q=A===e}else var q=!0;if(q)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=a===e}else var q=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ee=l===e}else var ee=!0;if(ee){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importWxr")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var ee=l===e}else var ee=!0;if(ee){if(r.file!==void 0){const i=e;G(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var ee=i===e}else var ee=!0;if(ee)if(r.importer!==void 0){let i=r.importer;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/importer",schemaPath:"#/oneOf/6/properties/importer/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="data-liberation"||i==="default"))return o.errors=[{instancePath:t+"/importer",schemaPath:"#/oneOf/6/properties/importer/enum",keyword:"enum",params:{allowedValues:ir.oneOf[6].properties.importer.enum},message:"must be equal to one of the allowed values"}],!1;var ee=l===e}else var ee=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="importThemeStarterContent"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="themeSlug"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var B=A===e}else var B=!0;if(B)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var B=a===e}else var B=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var te=l===e}else var te=!0;if(te){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importThemeStarterContent")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var te=l===e}else var te=!0;if(te)if(r.themeSlug!==void 0){const i=e;if(typeof r.themeSlug!="string")return o.errors=[{instancePath:t+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var te=i===e}else var te=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="importWordPressFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step")||r.wordPressFilesZip===void 0&&(c="wordPressFilesZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="wordPressFilesZip"||i==="pathInZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var m=A===e}else var m=!0;if(m)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=a===e}else var m=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var N=l===e}else var N=!0;if(N){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importWordPressFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var N=l===e}else var N=!0;if(N){if(r.wordPressFilesZip!==void 0){const i=e;G(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var N=i===e}else var N=!0;if(N)if(r.pathInZip!==void 0){const i=e;if(typeof r.pathInZip!="string")return o.errors=[{instancePath:t+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=i===e}else var N=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="installPlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.pluginData===void 0&&(c="pluginData")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="ifAlreadyInstalled"||i==="step"||i==="pluginData"||i==="pluginZipFile"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/9/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var w=A===e}else var w=!0;if(w)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=a===e}else var w=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var v=l===e}else var v=!0;if(v){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="overwrite"||i==="skip"||i==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:ir.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var v=l===e}else var v=!0;if(v){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="installPlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var v=l===e}else var v=!0;if(v){if(r.pluginData!==void 0){let i=r.pluginData;const l=e,j=e;let a=!1;const A=e;G(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var O=A===e;if(a=a||O,!a){const X=e;ce(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:d})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var O=X===e;a=a||O}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/pluginData",schemaPath:"#/oneOf/9/properties/pluginData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var v=l===e}else var v=!0;if(v){if(r.pluginZipFile!==void 0){const i=e;G(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var v=i===e}else var v=!0;if(v)if(r.options!==void 0){let i=r.options;const l=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=e;for(const ie in i)if(!(ie==="activate"||ie==="targetFolderName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(A===e){if(i.activate!==void 0){const ie=e;if(typeof i.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var E=ie===e}else var E=!0;if(E)if(i.targetFolderName!==void 0){const ie=e;if(typeof i.targetFolderName!="string")return o.errors=[{instancePath:t+"/options/targetFolderName",schemaPath:"#/definitions/InstallPluginOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=ie===e}else var E=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var v=l===e}else var v=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="installTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step")||r.themeData===void 0&&(c="themeData"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="ifAlreadyInstalled"||i==="step"||i==="themeData"||i==="themeZipFile"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var P=A===e}else var P=!0;if(P)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var P=a===e}else var P=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var b=l===e}else var b=!0;if(b){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="overwrite"||i==="skip"||i==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:ir.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var b=l===e}else var b=!0;if(b){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="installTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var b=l===e}else var b=!0;if(b){if(r.themeData!==void 0){let i=r.themeData;const l=e,j=e;let a=!1;const A=e;G(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var R=A===e;if(a=a||R,!a){const X=e;ce(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:d})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var R=X===e;a=a||R}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/themeData",schemaPath:"#/oneOf/10/properties/themeData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var b=l===e}else var b=!0;if(b){if(r.themeZipFile!==void 0){const i=e;G(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var b=i===e}else var b=!0;if(b)if(r.options!==void 0){let i=r.options;const l=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=e;for(const ie in i)if(!(ie==="activate"||ie==="importStarterContent"||ie==="targetFolderName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(A===e){if(i.activate!==void 0){const ie=e;if(typeof i.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallThemeOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var L=ie===e}else var L=!0;if(L){if(i.importStarterContent!==void 0){const ie=e;if(typeof i.importStarterContent!="boolean")return o.errors=[{instancePath:t+"/options/importStarterContent",schemaPath:"#/definitions/InstallThemeOptions/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var L=ie===e}else var L=!0;if(L)if(i.targetFolderName!==void 0){const ie=e;if(typeof i.targetFolderName!="string")return o.errors=[{instancePath:t+"/options/targetFolderName",schemaPath:"#/definitions/InstallThemeOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var L=ie===e}else var L=!0}}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var b=l===e}else var b=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="login"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="username"||i==="password"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var U=A===e}else var U=!0;if(U)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var U=a===e}else var U=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=l===e}else var F=!0;if(F){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="login")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var F=l===e}else var F=!0;if(F){if(r.username!==void 0){const i=e;if(typeof r.username!="string")return o.errors=[{instancePath:t+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var F=i===e}else var F=!0;if(F)if(r.password!==void 0){const i=e;if(typeof r.password!="string")return o.errors=[{instancePath:t+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var F=i===e}else var F=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="mkdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var W=A===e}else var W=!0;if(W)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var W=a===e}else var W=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var C=l===e}else var C=!0;if(C){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="mkdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var C=l===e}else var C=!0;if(C)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var C=i===e}else var C=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.fromPath===void 0&&(c="fromPath")||r.step===void 0&&(c="step")||r.toPath===void 0&&(c="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="fromPath"||i==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var D=A===e}else var D=!0;if(D)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var D=a===e}else var D=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var re=l===e}else var re=!0;if(re){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="mv")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var re=l===e}else var re=!0;if(re){if(r.fromPath!==void 0){const i=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var re=i===e}else var re=!0;if(re)if(r.toPath!==void 0){const i=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var re=i===e}else var re=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="resetData"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var S=A===e}else var S=!0;if(S)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=a===e}else var S=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Q=l===e}else var Q=!0;if(Q)if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="resetData")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var Q=l===e}else var Q=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="request"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.request===void 0&&(c="request")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="request"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/15/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var V=A===e}else var V=!0;if(V)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/15/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var V=a===e}else var V=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var z=l===e}else var z=!0;if(z){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="request")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var z=l===e}else var z=!0;if(z)if(r.request!==void 0){const i=e;ge(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:d})||(s=s===null?ge.errors:s.concat(ge.errors),e=s.length);var z=i===e}else var z=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="rm"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var oe=A===e}else var oe=!0;if(oe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var oe=a===e}else var oe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ue=l===e}else var ue=!0;if(ue){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="rm")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var ue=l===e}else var ue=!0;if(ue)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ue=i===e}else var ue=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Pe=A===e}else var Pe=!0;if(Pe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Pe=a===e}else var Pe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var qe=l===e}else var qe=!0;if(qe){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="rmdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var qe=l===e}else var qe=!0;if(qe)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var qe=i===e}else var qe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runPHP"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.code===void 0&&(c="code")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="code"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Me=A===e}else var Me=!0;if(Me)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Me=a===e}else var Me=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=l===e}else var Ae=!0;if(Ae){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runPHP")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var Ae=l===e}else var Ae=!0;if(Ae)if(r.code!==void 0){let i=r.code;const l=e,j=e;let a=!1;const A=e;if(typeof i!="string"){const X={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[X]:s.push(X),e++}var dr=A===e;if(a=a||dr,!a){const X=e;if(e===X)if(i&&typeof i=="object"&&!Array.isArray(i)){let le;if(i.filename===void 0&&(le="filename")||i.content===void 0&&(le="content")){const je={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/required",keyword:"required",params:{missingProperty:le},message:"must have required property '"+le+"'"};s===null?s=[je]:s.push(je),e++}else{const je=e;for(const ne in i)if(!(ne==="filename"||ne==="content")){const Te={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ne},message:"must NOT have additional properties"};s===null?s=[Te]:s.push(Te),e++;break}if(je===e){if(i.filename!==void 0){const ne=e;if(typeof i.filename!="string"){const Te={instancePath:t+"/code/filename",schemaPath:"#/oneOf/18/properties/code/anyOf/1/properties/filename/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Te]:s.push(Te),e++}var Ve=ne===e}else var Ve=!0;if(Ve)if(i.content!==void 0){const ne=e;if(typeof i.content!="string"){const Z={instancePath:t+"/code/content",schemaPath:"#/oneOf/18/properties/code/anyOf/1/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Z]:s.push(Z),e++}var Ve=ne===e}else var Ve=!0}}}else{const le={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[le]:s.push(le),e++}var dr=X===e;a=a||dr}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var Ae=l===e}else var Ae=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runPHPWithOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.options===void 0&&(c="options")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ze=A===e}else var ze=!0;if(ze)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ze=a===e}else var ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Re=l===e}else var Re=!0;if(Re){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runPHPWithOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var Re=l===e}else var Re=!0;if(Re)if(r.options!==void 0){const i=e;pe(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:d})||(s=s===null?pe.errors:s.concat(pe.errors),e=s.length);var Re=i===e}else var Re=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runWpInstallationWizard"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.options===void 0&&(c="options")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var He=A===e}else var He=!0;if(He)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var He=a===e}else var He=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Se=l===e}else var Se=!0;if(Se){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runWpInstallationWizard")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var Se=l===e}else var Se=!0;if(Se)if(r.options!==void 0){let i=r.options;const l=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=e;for(const ie in i)if(!(ie==="adminUsername"||ie==="adminPassword"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(A===e){if(i.adminUsername!==void 0){const ie=e;if(typeof i.adminUsername!="string")return o.errors=[{instancePath:t+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Qe=ie===e}else var Qe=!0;if(Qe)if(i.adminPassword!==void 0){const ie=e;if(typeof i.adminPassword!="string")return o.errors=[{instancePath:t+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Qe=ie===e}else var Qe=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Se=l===e}else var Se=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runSql"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.sql===void 0&&(c="sql")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="sql"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ye=A===e}else var Ye=!0;if(Ye)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ye=a===e}else var Ye=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Le=l===e}else var Le=!0;if(Le){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runSql")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var Le=l===e}else var Le=!0;if(Le)if(r.sql!==void 0){const i=e;G(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var Le=i===e}else var Le=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="setSiteOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.options===void 0&&(c="options")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ze=A===e}else var Ze=!0;if(Ze)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ze=a===e}else var Ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=l===e}else var Fe=!0;if(Fe){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="setSiteOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var Fe=l===e}else var Fe=!0;if(Fe)if(r.options!==void 0){let i=r.options;const l=e;if(e===l&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=l===e}else var Fe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="unzip"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.extractToPath===void 0&&(c="extractToPath")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="zipFile"||i==="zipPath"||i==="extractToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ge=A===e}else var Ge=!0;if(Ge)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ge=a===e}else var Ge=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var me=l===e}else var me=!0;if(me){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="unzip")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var me=l===e}else var me=!0;if(me){if(r.zipFile!==void 0){const i=e;G(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var me=i===e}else var me=!0;if(me){if(r.zipPath!==void 0){const i=e;if(typeof r.zipPath!="string")return o.errors=[{instancePath:t+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var me=i===e}else var me=!0;if(me)if(r.extractToPath!==void 0){const i=e;if(typeof r.extractToPath!="string")return o.errors=[{instancePath:t+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var me=i===e}else var me=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="updateUserMeta"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.meta===void 0&&(c="meta")||r.step===void 0&&(c="step")||r.userId===void 0&&(c="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="meta"||i==="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Je=A===e}else var Je=!0;if(Je)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Je=a===e}else var Je=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _e=l===e}else var _e=!0;if(_e){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="updateUserMeta")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var _e=l===e}else var _e=!0;if(_e){if(r.meta!==void 0){let i=r.meta;const l=e;if(e===l&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _e=l===e}else var _e=!0;if(_e)if(r.userId!==void 0){let i=r.userId;const l=e;if(!(typeof i=="number"&&isFinite(i)))return o.errors=[{instancePath:t+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var _e=l===e}else var _e=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="writeFile"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.data===void 0&&(c="data")||r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"||i==="data"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Xe=A===e}else var Xe=!0;if(Xe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Xe=a===e}else var Xe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ke=l===e}else var ke=!0;if(ke){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="writeFile")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var ke=l===e}else var ke=!0;if(ke){if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ke=i===e}else var ke=!0;if(ke)if(r.data!==void 0){let i=r.data;const l=e,j=e;let a=!1;const A=e;G(i,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var Ce=A===e;if(a=a||Ce,!a){const X=e;if(typeof i!="string"){const le={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[le]:s.push(le),e++}var Ce=X===e;if(a=a||Ce,!a){const le=e;if(e===le)if(i&&typeof i=="object"&&!Array.isArray(i)){let ne;if(i.BYTES_PER_ELEMENT===void 0&&(ne="BYTES_PER_ELEMENT")||i.buffer===void 0&&(ne="buffer")||i.byteLength===void 0&&(ne="byteLength")||i.byteOffset===void 0&&(ne="byteOffset")||i.length===void 0&&(ne="length")){const Te={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:ne},message:"must have required property '"+ne+"'"};s===null?s=[Te]:s.push(Te),e++}else{const Te=e;for(const Z in i)if(!(Z==="BYTES_PER_ELEMENT"||Z==="buffer"||Z==="byteLength"||Z==="byteOffset"||Z==="length")){let he=i[Z];const tr=e;if(!(typeof he=="number"&&isFinite(he))){const fe={instancePath:t+"/data/"+Z.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/oneOf/25/properties/data/anyOf/2/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var vt=tr===e;if(!vt)break}if(Te===e){if(i.BYTES_PER_ELEMENT!==void 0){let Z=i.BYTES_PER_ELEMENT;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const tr={instancePath:t+"/data/BYTES_PER_ELEMENT",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[tr]:s.push(tr),e++}var ye=he===e}else var ye=!0;if(ye){if(i.buffer!==void 0){let Z=i.buffer;const he=e;if(e===he)if(Z&&typeof Z=="object"&&!Array.isArray(Z)){let fe;if(Z.byteLength===void 0&&(fe="byteLength")){const sr={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:fe},message:"must have required property '"+fe+"'"};s===null?s=[sr]:s.push(sr),e++}else{const sr=e;for(const De in Z)if(De!=="byteLength"){const Ue={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:De},message:"must NOT have additional properties"};s===null?s=[Ue]:s.push(Ue),e++;break}if(sr===e&&Z.byteLength!==void 0){let De=Z.byteLength;if(!(typeof De=="number"&&isFinite(De))){const Ue={instancePath:t+"/data/buffer/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[Ue]:s.push(Ue),e++}}}}else{const fe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteLength!==void 0){let Z=i.byteLength;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const fe={instancePath:t+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteOffset!==void 0){let Z=i.byteOffset;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const fe={instancePath:t+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0;if(ye)if(i.length!==void 0){let Z=i.length;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const fe={instancePath:t+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0}}}}}}else{const ne={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[ne]:s.push(ne),e++}var Ce=le===e;a=a||Ce}}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var ke=l===e}else var ke=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="writeFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.filesTree===void 0&&(c="filesTree")||r.step===void 0&&(c="step")||r.writeToPath===void 0&&(c="writeToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="writeToPath"||i==="filesTree"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ke=A===e}else var Ke=!0;if(Ke)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ke=a===e}else var Ke=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Oe=l===e}else var Oe=!0;if(Oe){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="writeFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"writeFiles"},message:"must be equal to constant"}],!1;var Oe=l===e}else var Oe=!0;if(Oe){if(r.writeToPath!==void 0){const i=e;if(typeof r.writeToPath!="string")return o.errors=[{instancePath:t+"/writeToPath",schemaPath:"#/oneOf/26/properties/writeToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Oe=i===e}else var Oe=!0;if(Oe)if(r.filesTree!==void 0){const i=e;ce(r.filesTree,{instancePath:t+"/filesTree",parentData:r,parentDataProperty:"filesTree",rootData:d})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var Oe=i===e}else var Oe=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="wp-cli"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.command===void 0&&(c="command")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="command"||i==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var er=A===e}else var er=!0;if(er)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var er=a===e}else var er=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ee=l===e}else var Ee=!0;if(Ee){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="wp-cli")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var Ee=l===e}else var Ee=!0;if(Ee){if(r.command!==void 0){let i=r.command;const l=e,j=e;let a=!1;const A=e;if(typeof i!="string"){const X={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[X]:s.push(X),e++}var cr=A===e;if(a=a||cr,!a){const X=e;if(e===X)if(Array.isArray(i)){var Rr=!0;const le=i.length;for(let je=0;je<le;je++){const ne=e;if(typeof i[je]!="string"){const Z={instancePath:t+"/command/"+je,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Z]:s.push(Z),e++}var Rr=ne===e;if(!Rr)break}}else{const le={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[le]:s.push(le),e++}var cr=X===e;a=a||cr}if(a)e=j,s!==null&&(j?s.length=j:s=null);else{const X={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var Ee=l===e}else var Ee=!0;if(Ee)if(r.wpCliPath!==void 0){const i=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/27/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ee=i===e}else var Ee=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="setSiteLanguage"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.language===void 0&&(c="language")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="language"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const j=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/28/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(j===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/28/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var rr=A===e}else var rr=!0;if(rr)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/28/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var rr=a===e}else var rr=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/28/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ne=l===e}else var Ne=!0;if(Ne){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/28/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="setSiteLanguage")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/28/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var Ne=l===e}else var Ne=!0;if(Ne)if(r.language!==void 0){const i=e;if(typeof r.language!="string")return o.errors=[{instancePath:t+"/language",schemaPath:"#/oneOf/28/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ne=i===e}else var Ne=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:J},message:'value of tag "step" must be in oneOf'}],!1;else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:J},message:'tag "step" must be string'}],!1}}else return o.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return o.errors=s,e===0}function H(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const te=e;for(const m in r)if(!ft.call(es.properties,m))return H.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(te===e){if(r.landingPage!==void 0){const m=e;if(typeof r.landingPage!="string")return H.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===e}else var p=!0;if(p){if(r.description!==void 0){const m=e;if(typeof r.description!="string")return H.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===e}else var p=!0;if(p){if(r.meta!==void 0){let m=r.meta;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){let v;if(m.title===void 0&&(v="title")||m.author===void 0&&(v="author"))return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"}],!1;{const O=e;for(const E in m)if(!(E==="title"||E==="description"||E==="author"||E==="categories"))return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"}],!1;if(O===e){if(m.title!==void 0){const E=e;if(typeof m.title!="string")return H.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=E===e}else var u=!0;if(u){if(m.description!==void 0){const E=e;if(typeof m.description!="string")return H.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=E===e}else var u=!0;if(u){if(m.author!==void 0){const E=e;if(typeof m.author!="string")return H.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=E===e}else var u=!0;if(u)if(m.categories!==void 0){let E=m.categories;const P=e;if(e===P)if(Array.isArray(E)){var y=!0;const R=E.length;for(let L=0;L<R;L++){const U=e;if(typeof E[L]!="string")return H.errors=[{instancePath:t+"/meta/categories/"+L,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=U===e;if(!y)break}}else return H.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var u=P===e}else var u=!0}}}}}else return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.preferredVersions!==void 0){let m=r.preferredVersions;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){let v;if(m.php===void 0&&(v="php")||m.wp===void 0&&(v="wp"))return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"}],!1;{const O=e;for(const E in m)if(!(E==="php"||E==="wp"))return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"}],!1;if(O===e){if(m.php!==void 0){let E=m.php;const P=e,b=e;let R=!1;const L=e;Ie(E,{instancePath:t+"/preferredVersions/php",parentData:m,parentDataProperty:"php",rootData:d})||(s=s===null?Ie.errors:s.concat(Ie.errors),e=s.length);var _=L===e;if(R=R||_,!R){const U=e;if(typeof E!="string"){const W={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}if(E!=="latest"){const W={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};s===null?s=[W]:s.push(W),e++}var _=U===e;R=R||_}if(R)e=b,s!==null&&(b?s.length=b:s=null);else{const U={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[U]:s.push(U),e++,H.errors=s,!1}var h=P===e}else var h=!0;if(h)if(m.wp!==void 0){const E=e;if(typeof m.wp!="string")return H.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=E===e}else var h=!0}}}else return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.features!==void 0){let m=r.features;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){const v=e;for(const O in m)if(!(O==="intl"||O==="networking"))return H.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"}],!1;if(v===e){if(m.intl!==void 0){const O=e;if(typeof m.intl!="boolean")return H.errors=[{instancePath:t+"/features/intl",schemaPath:"#/properties/features/properties/intl/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=O===e}else var k=!0;if(k)if(m.networking!==void 0){const O=e;if(typeof m.networking!="boolean")return H.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=O===e}else var k=!0}}else return H.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.extraLibraries!==void 0){let m=r.extraLibraries;const N=e;if(e===N)if(Array.isArray(m)){var T=!0;const v=m.length;for(let O=0;O<v;O++){let E=m[O];const P=e;if(typeof E!="string")return H.errors=[{instancePath:t+"/extraLibraries/"+O,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(E!=="wp-cli")return H.errors=[{instancePath:t+"/extraLibraries/"+O,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var T=P===e;if(!T)break}}else return H.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===e}else var p=!0;if(p){if(r.constants!==void 0){let m=r.constants;const N=e;if(e===e)if(m&&typeof m=="object"&&!Array.isArray(m))for(const O in m){let E=m[O];const P=e;if(typeof E!="string"&&typeof E!="boolean"&&!(typeof E=="number"&&isFinite(E)))return H.errors=[{instancePath:t+"/constants/"+O.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:rs.additionalProperties.type},message:"must be string,boolean,number"}],!1;var $=P===e;if(!$)break}else return H.errors=[{instancePath:t+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.plugins!==void 0){let m=r.plugins;const N=e;if(e===N)if(Array.isArray(m)){var g=!0;const v=m.length;for(let O=0;O<v;O++){let E=m[O];const P=e,b=e;let R=!1;const L=e;if(typeof E!="string"){const F={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var M=L===e;if(R=R||M,!R){const F=e;G(E,{instancePath:t+"/plugins/"+O,parentData:m,parentDataProperty:O,rootData:d})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var M=F===e;R=R||M}if(R)e=b,s!==null&&(b?s.length=b:s=null);else{const F={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,H.errors=s,!1}var g=P===e;if(!g)break}}else return H.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===e}else var p=!0;if(p){if(r.siteOptions!==void 0){let m=r.siteOptions;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){const v=e;for(const O in m)if(O!=="blogname"){const E=e;if(typeof m[O]!="string")return H.errors=[{instancePath:t+"/siteOptions/"+O.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=E===e;if(!K)break}if(v===e&&m.blogname!==void 0&&typeof m.blogname!="string")return H.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return H.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.login!==void 0){let m=r.login;const N=e,w=e;let v=!1;const O=e;if(typeof m!="boolean"){const P={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[P]:s.push(P),e++}var Y=O===e;if(v=v||Y,!v){const P=e;if(e===P)if(m&&typeof m=="object"&&!Array.isArray(m)){let R;if(m.username===void 0&&(R="username")||m.password===void 0&&(R="password")){const L={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};s===null?s=[L]:s.push(L),e++}else{const L=e;for(const U in m)if(!(U==="username"||U==="password")){const F={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:U},message:"must NOT have additional properties"};s===null?s=[F]:s.push(F),e++;break}if(L===e){if(m.username!==void 0){const U=e;if(typeof m.username!="string"){const F={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var q=U===e}else var q=!0;if(q)if(m.password!==void 0){const U=e;if(typeof m.password!="string"){const W={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}var q=U===e}else var q=!0}}}else{const R={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[R]:s.push(R),e++}var Y=P===e;v=v||Y}if(v)e=w,s!==null&&(w?s.length=w:s=null);else{const P={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[P]:s.push(P),e++,H.errors=s,!1}var p=N===e}else var p=!0;if(p){if(r.steps!==void 0){let m=r.steps;const N=e;if(e===N)if(Array.isArray(m)){var ee=!0;const v=m.length;for(let O=0;O<v;O++){let E=m[O];const P=e,b=e;let R=!1;const L=e;o(E,{instancePath:t+"/steps/"+O,parentData:m,parentDataProperty:O,rootData:d})||(s=s===null?o.errors:s.concat(o.errors),e=s.length);var B=L===e;if(R=R||B,!R){const F=e;if(typeof E!="string"){const C={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[C]:s.push(C),e++}var B=F===e;if(R=R||B,!R){const C=e,D={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};s===null?s=[D]:s.push(D),e++;var B=C===e;if(R=R||B,!R){const S=e;if(typeof E!="boolean"){const V={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[V]:s.push(V),e++}if(E!==!1){const V={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};s===null?s=[V]:s.push(V),e++}var B=S===e;if(R=R||B,!R){const V=e;if(E!==null){const oe={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};s===null?s=[oe]:s.push(oe),e++}var B=V===e;R=R||B}}}}if(R)e=b,s!==null&&(b?s.length=b:s=null);else{const F={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,H.errors=s,!1}var ee=P===e;if(!ee)break}}else return H.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===e}else var p=!0;if(p)if(r.$schema!==void 0){const m=e;if(typeof r.$schema!="string")return H.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===e}else var p=!0}}}}}}}}}}}}else return H.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return H.errors=s,e===0}function ar(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:d=r}={}){let s=null,e=0;return H(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:d})||(s=s===null?H.errors:s.concat(H.errors),e=s.length),ar.errors=s,e===0}const{wpCLI:as,...Fr}=Kt,ns={...Fr,"wp-cli":as,importFile:Fr.importWxr};class dt extends Error{constructor(t,n){super(t),this.name="InvalidBlueprintError",this.validationErrors=n}}class ct extends Error{constructor(t){const{stepNumber:n,step:f,cause:d}=t,s=d instanceof Error?d:new Error(String(d)),e=`Error when executing the blueprint step #${n}`,p=s.message?`${e}: ${s.message}`:e;super(p,{cause:s}),this.name="BlueprintStepExecutionError",this.stepNumber=n,this.step=f,this.messages=(s.message||"").split(`
771
+ `).map(u=>u.trim()).filter(Boolean)}}async function qr(r,t={}){const n={...t};let f;return Ar(r)?(f=await mt(r),n.streamBundledFile=function(...d){return r.read(...d)}):f=r,ps(f,n)}function Ar(r){return r&&"read"in r&&typeof r.read=="function"}async function mt(r){if(!Ar(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}function ps(r,{progress:t=new br.ProgressTracker,semaphore:n=new I.Semaphore({concurrency:3}),onStepCompleted:f=()=>{},onBlueprintValidated:d=()=>{},corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:p,additionalSteps:u}={}){var g,M,K,Y,q,ee,B,te,m,N;r=structuredClone(r),r={...r,steps:(r.steps||[]).filter(ht).filter(us)},r.steps=[...r.steps||[],...u||[]];for(const w of r.steps)!w||typeof w!="object"||(w.step==="importFile"?(w.step="importWxr",ae.logger.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(w==null?void 0:w.step)==="installPlugin"&&"pluginZipFile"in w?(w.pluginData=w.pluginZipFile,ae.logger.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(w==null?void 0:w.step)==="installTheme"&&"themeZipFile"in w&&(w.themeData=w.themeZipFile,ae.logger.warn('The "themeZipFile" option of the "installTheme" step is deprecated. Use "themeData" instead.')));if(r.constants&&r.steps.unshift({step:"defineWpConfigConsts",consts:r.constants}),r.siteOptions&&r.steps.unshift({step:"setSiteOptions",options:r.siteOptions}),r.plugins){const w=r.plugins.map(v=>typeof v=="string"?v.startsWith("https://")?{resource:"url",url:v}:{resource:"wordpress.org/plugins",slug:v}:v).map(v=>({step:"installPlugin",pluginData:v}));r.steps.unshift(...w)}r.login&&r.steps.unshift({step:"login",...r.login===!0?{username:"admin"}:r.login});const y=((g=r.steps)==null?void 0:g.findIndex(w=>typeof w=="object"&&(w==null?void 0:w.step)&&["wp-cli","enableMultisite"].includes(w.step)))??-1;if((M=r==null?void 0:r.extraLibraries)!=null&&M.includes("wp-cli")||y!==-1){const w={step:"writeFile",data:zt,path:Or};y===-1?(K=r.steps)==null||K.push(w):(Y=r.steps)==null||Y.splice(y,0,w)}const _=(q=r.steps)==null?void 0:q.findIndex(w=>typeof w=="object"&&(w==null?void 0:w.step)==="importWxr");_!==void 0&&_>-1&&((ee=r.steps)==null||ee.splice(_,0,{step:"installPlugin",pluginData:{resource:"wordpress.org/plugins",slug:"wordpress-importer"}}));const h=yt(r);if(!h.valid){const{errors:w}=h,v=ls(r,w);throw new dt(`Invalid Blueprint: The Blueprint does not conform to the schema.
770
772
 
771
773
  Found ${w.length} validation error(s):
772
774
 
773
775
  ${v}
774
776
 
775
- Please review your Blueprint and fix these issues. Learn more about the Blueprint format: https://wordpress.github.io/wordpress-playground/blueprints/data-format`,w)}u(r);const k=r.steps||[],T=k.reduce((w,v)=>{var O;return w+(((O=v.progress)==null?void 0:O.weight)||1)},0),$=k.map(w=>ds(w,{semaphore:n,rootProgressTracker:t,totalProgressWeight:T,corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:p}));return{versions:{php:fs((B=r.preferredVersions)==null?void 0:B.php,We.SupportedPHPVersions,We.LatestSupportedPHPVersion),wp:((te=r.preferredVersions)==null?void 0:te.wp)||"latest"},features:{intl:((m=r.features)==null?void 0:m.intl)??!1,networking:((N=r.features)==null?void 0:N.networking)??!0},extraLibraries:r.extraLibraries||[],run:async w=>{try{for(const{resources:v}of $)for(const O of v)O.setPlayground(w),O.isAsync&&O.resolve().catch(()=>{});for(const[v,{run:O,step:E}]of Object.entries($))try{const P=await O(w);f(P,E)}catch(P){const b=Number(v)+1;throw new ct({stepNumber:b,step:E,cause:P})}}finally{try{const v=await w.pathToInternalUrl(r.landingPage||"/");await w.goTo("/index.php?playground-redirection-handler&next="+encodeURIComponent(v))}catch{}t.finish()}}}}function ls(r,t){return t.map((n,f)=>{var p;const u=n.instancePath||"/";let s=n.message||"validation failed",e="";if(s.includes("must NOT have additional properties")){const d=(p=n.params)==null?void 0:p.additionalProperty;if(d){s=`has unexpected property "${d}"`;try{const g=u.split("/").filter(Boolean);let _=r;for(const y of g)_&&typeof _=="object"&&(_=_[y]);if(_&&typeof _=="object"){const y=_[d],k=JSON.stringify(y);e=`
776
- "${d}": ${k}
777
- ${"^".repeat(d.length+2)} This property is not recognized`}}catch{}}}else try{const d=u.split("/").filter(Boolean);let g=r;for(const _ of d)g&&typeof g=="object"&&(g=g[_]);if(g!==void 0){const _=JSON.stringify(g,null,2);e=`
778
- Value: ${_.length>200?_.substring(0,200)+"...":_}`}}catch{}return`${f+1}. At path "${u}": ${s}${e}`}).join(`
777
+ Please review your Blueprint and fix these issues. Learn more about the Blueprint format: https://wordpress.github.io/wordpress-playground/blueprints/data-format`,w)}d(r);const k=r.steps||[],T=k.reduce((w,v)=>{var O;return w+(((O=v.progress)==null?void 0:O.weight)||1)},0),$=k.map(w=>ds(w,{semaphore:n,rootProgressTracker:t,totalProgressWeight:T,corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:p}));return{versions:{php:fs((B=r.preferredVersions)==null?void 0:B.php,We.SupportedPHPVersions,We.LatestSupportedPHPVersion),wp:((te=r.preferredVersions)==null?void 0:te.wp)||"latest"},features:{intl:((m=r.features)==null?void 0:m.intl)??!1,networking:((N=r.features)==null?void 0:N.networking)??!0},extraLibraries:r.extraLibraries||[],run:async w=>{try{for(const{resources:v}of $)for(const O of v)O.setPlayground(w),O.isAsync&&O.resolve().catch(()=>{});for(const[v,{run:O,step:E}]of Object.entries($))try{const P=await O(w);f(P,E)}catch(P){const b=Number(v)+1;throw new ct({stepNumber:b,step:E,cause:P})}}finally{try{const v=await w.pathToInternalUrl(r.landingPage||"/");await w.goTo("/index.php?playground-redirection-handler&next="+encodeURIComponent(v))}catch{}t.finish()}}}}function ls(r,t){return t.map((n,f)=>{var p;const d=n.instancePath||"/";let s=n.message||"validation failed",e="";if(s.includes("must NOT have additional properties")){const u=(p=n.params)==null?void 0:p.additionalProperty;if(u){s=`has unexpected property "${u}"`;try{const y=d.split("/").filter(Boolean);let _=r;for(const h of y)_&&typeof _=="object"&&(_=_[h]);if(_&&typeof _=="object"){const h=_[u],k=JSON.stringify(h);e=`
778
+ "${u}": ${k}
779
+ ${"^".repeat(u.length+2)} This property is not recognized`}}catch{}}}else try{const u=d.split("/").filter(Boolean);let y=r;for(const _ of u)y&&typeof y=="object"&&(y=y[_]);if(y!==void 0){const _=JSON.stringify(y,null,2);e=`
780
+ Value: ${_.length>200?_.substring(0,200)+"...":_}`}}catch{}return`${f+1}. At path "${d}": ${s}${e}`}).join(`
779
781
 
780
- `)}function yt(r){var u;const t=ar(r);if(t)return{valid:t};const n=new Set;for(const s of ar.errors)s.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(s.instancePath);return{valid:!1,errors:((u=ar.errors)==null?void 0:u.filter(s=>!(s.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(s.instancePath))))??[]}}function fs(r,t,n){return(r==="7.2"||r==="7.3")&&(ae.logger.warn(`PHP ${r} is no longer supported. Automatically upgrading to PHP 7.4.`),r="7.4"),r&&t.includes(r)?r:n}function ht(r){return!!(typeof r=="object"&&r)}function us(r){return["setPhpIniEntry","request"].includes(r.step)?(ae.logger.warn(`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function ds(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:f,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e}){var T;const p=n.stage((((T=r.progress)==null?void 0:T.weight)||1)/f),d={};for(const $ of Object.keys(r)){let h=r[$];Et(h)&&(h=be.create(h,{semaphore:t,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e})),d[$]=h}const g=async $=>{var h;try{return p.fillSlowly(),await ns[r.step]($,await cs(d),{tracker:p,initialCaption:(h=r.progress)==null?void 0:h.caption})}finally{p.finish()}},_=Nr(d),y=Nr(d).filter($=>$.isAsync),k=1/(y.length+1);for(const $ of y)$.progress=p.stage(k);return{run:g,step:r,resources:_}}function Nr(r){const t=[];for(const n in r){const f=r[n];f instanceof be&&t.push(f)}return t}async function cs(r){const t={};for(const n in r){const f=r[n];f instanceof be?t[n]=await f.resolve():t[n]=f}return t}async function gt(r,t){await r.run(t)}async function bt(){const r=(await Promise.resolve().then(()=>require("./blueprints-Gs5fAvvo.cjs"))).default;return new File([r],"blueprints.phar",{type:"application/zip"})}function ms(r){if(typeof r=="object"&&"type"in r&&["inline-file","file-reference"].includes(r.type))return r;if(!r)return{type:"inline-file",contents:"{}"};if(typeof r!="string")return{type:"inline-file",contents:JSON.stringify(r)};try{return JSON.parse(r),{type:"inline-file",contents:r}}catch{return{type:"file-reference",reference:r}}}async function ys(r){var _,y;const t=r.cliArgs||[];for(const k of t)if(k.startsWith("--site-path="))throw new Error("The --site-path CLI argument must not be provided. In Playground, it is always set to /wordpress.");t.push("--site-path=/wordpress"),t.find(k=>k.startsWith("--db-engine="))||t.push("--db-engine=sqlite");const f=r.php,u=(r==null?void 0:r.onMessage)||(()=>{}),s=await bt();f.writeFile("/tmp/blueprints.phar",new Uint8Array(await s.arrayBuffer()));const e=ms(r.blueprint);let p="";switch(e.type){case"inline-file":f.writeFile("/tmp/blueprint.json",e.contents),p="/tmp/blueprint.json";break;case"file-reference":p=e.reference;break}const d=await f.onMessage(async k=>{try{const T=typeof k=="string"?JSON.parse(k):k;if(!T)return;await new Promise($=>setTimeout($,0)),T.type.startsWith("blueprint.")&&await u(T)}catch(T){ae.logger.warn("Failed to parse message as JSON:",k,T)}});await(f==null?void 0:f.writeFile("/tmp/run-blueprints.php",`<?php
782
+ `)}function yt(r){var d;const t=ar(r);if(t)return{valid:t};const n=new Set;for(const s of ar.errors)s.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(s.instancePath);return{valid:!1,errors:((d=ar.errors)==null?void 0:d.filter(s=>!(s.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(s.instancePath))))??[]}}function fs(r,t,n){return(r==="7.2"||r==="7.3")&&(ae.logger.warn(`PHP ${r} is no longer supported. Automatically upgrading to PHP 7.4.`),r="7.4"),r&&t.includes(r)?r:n}function ht(r){return!!(typeof r=="object"&&r)}function us(r){return["setPhpIniEntry","request"].includes(r.step)?(ae.logger.warn(`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function ds(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:f,corsProxy:d,streamBundledFile:s,gitAdditionalHeadersCallback:e}){var T;const p=n.stage((((T=r.progress)==null?void 0:T.weight)||1)/f),u={};for(const $ of Object.keys(r)){let g=r[$];Et(g)&&(g=be.create(g,{semaphore:t,corsProxy:d,streamBundledFile:s,gitAdditionalHeadersCallback:e})),u[$]=g}const y=async $=>{var g;try{return p.fillSlowly(),await ns[r.step]($,await cs(u),{tracker:p,initialCaption:(g=r.progress)==null?void 0:g.caption})}finally{p.finish()}},_=Nr(u),h=Nr(u).filter($=>$.isAsync),k=1/(h.length+1);for(const $ of h)$.progress=p.stage(k);return{run:y,step:r,resources:_}}function Nr(r){const t=[];for(const n in r){const f=r[n];f instanceof be&&t.push(f)}return t}async function cs(r){const t={};for(const n in r){const f=r[n];f instanceof be?t[n]=await f.resolve():t[n]=f}return t}async function gt(r,t){await r.run(t)}async function bt(){const r=(await Promise.resolve().then(()=>require("./blueprints-Gs5fAvvo.cjs"))).default;return new File([r],"blueprints.phar",{type:"application/zip"})}function ms(r){if(typeof r=="object"&&"type"in r&&["inline-file","file-reference"].includes(r.type))return r;if(!r)return{type:"inline-file",contents:"{}"};if(typeof r!="string")return{type:"inline-file",contents:JSON.stringify(r)};try{return JSON.parse(r),{type:"inline-file",contents:r}}catch{return{type:"file-reference",reference:r}}}async function ys(r){var _,h;const t=r.cliArgs||[];for(const k of t)if(k.startsWith("--site-path="))throw new Error("The --site-path CLI argument must not be provided. In Playground, it is always set to /wordpress.");t.push("--site-path=/wordpress"),t.find(k=>k.startsWith("--db-engine="))||t.push("--db-engine=sqlite");const f=r.php,d=(r==null?void 0:r.onMessage)||(()=>{}),s=await bt();f.writeFile("/tmp/blueprints.phar",new Uint8Array(await s.arrayBuffer()));const e=ms(r.blueprint);let p="";switch(e.type){case"inline-file":f.writeFile("/tmp/blueprint.json",e.contents),p="/tmp/blueprint.json";break;case"file-reference":p=e.reference;break}const u=await f.onMessage(async k=>{try{const T=typeof k=="string"?JSON.parse(k):k;if(!T)return;await new Promise($=>setTimeout($,0)),T.type.startsWith("blueprint.")&&await d(T)}catch(T){ae.logger.warn("Failed to parse message as JSON:",k,T)}});await(f==null?void 0:f.writeFile("/tmp/run-blueprints.php",`<?php
781
783
  function playground_http_client_factory() {
782
784
  return new WordPress\\HttpClient\\Client([
783
785
  // sockets transport is somehow faster than curl in Playground. Maybe
@@ -804,7 +806,7 @@ function playground_on_blueprint_resolved($blueprint) {
804
806
  );
805
807
  }
806
808
 
807
- $wp_version_override = json_decode(${I.phpVar(JSON.stringify(((y=r.blueprintOverrides)==null?void 0:y.wordpressVersion)||null))}, true);
809
+ $wp_version_override = json_decode(${I.phpVar(JSON.stringify(((h=r.blueprintOverrides)==null?void 0:h.wordpressVersion)||null))}, true);
808
810
  if($wp_version_override) {
809
811
  $blueprint['wordpressVersion'] = $wp_version_override;
810
812
  }
@@ -858,5 +860,5 @@ function playground_progress_reporter() {
858
860
  }
859
861
  playground_add_filter('blueprint.progress_reporter', 'playground_progress_reporter');
860
862
  require( "/tmp/blueprints.phar" );
861
- `));const g=await f.cli(["/internal/shared/bin/php","/tmp/run-blueprints.php","exec",p,...t]);return g.finished.finally(d),g}class wt extends Error{constructor(t,n,f){super(t,f),this.name="BlueprintFetchError",this.url=n}}async function hs(r){let t;try{const n=await fetch(r,{credentials:"omit"});if(!n.ok)throw new Error(`Failed to fetch blueprint from ${r}`);t=await n.arrayBuffer()}catch(n){throw new wt(`Blueprint file could not be resolved from ${r}: ${n instanceof Error?n.message:String(n)}`,r,{cause:n})}try{const n=new TextDecoder().decode(t);return JSON.parse(n),new ve.OverlayFilesystem([new ve.InMemoryFilesystem({"blueprint.json":n}),new ve.FetchFilesystem({baseUrl:r})])}catch(n){if(await gs(t))return ve.ZipFilesystem.fromArrayBuffer(t);throw new Error(`Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`,{cause:n})}}async function gs(r){if(r.byteLength<4)return!1;const t=new Uint8Array(r,0,4);return t[0]===80&&t[1]===75&&t[2]===3&&t[3]===4}async function bs(r){if((await Be.create(r)).getVersion()===1){const n=await qr(r);return{wpVersion:n.versions.wp,phpVersion:n.versions.php,intl:n.features.intl,networking:n.features.networking,extraLibraries:n.extraLibraries,constants:{}}}else return{phpVersion:wr.RecommendedPHPVersion,wpVersion:"latest",intl:!1,networking:!0,constants:{},extraLibraries:[]}}function ws(){}exports.BlueprintFetchError=wt;exports.BlueprintFilesystemRequiredError=Dr;exports.BlueprintReflection=Be;exports.BlueprintStepExecutionError=ct;exports.InvalidBlueprintError=dt;exports.ResourceDownloadError=or;exports.activatePlugin=Pr;exports.activateTheme=_r;exports.compileBlueprint=qr;exports.compileBlueprintV1=qr;exports.cp=Yr;exports.defineSiteUrl=Tr;exports.defineWpConfigConsts=lr;exports.enableMultisite=Qr;exports.exportWXR=rt;exports.getBlueprintDeclaration=mt;exports.getV2Runner=bt;exports.importThemeStarterContent=$r;exports.importWordPressFiles=et;exports.importWxr=Kr;exports.installPlugin=st;exports.installTheme=it;exports.isBlueprintBundle=Ar;exports.isStepDefinition=ht;exports.login=ot;exports.mkdir=Gr;exports.mv=Zr;exports.request=Vr;exports.resetData=at;exports.resolveRemoteBlueprint=hs;exports.resolveRuntimeConfiguration=bs;exports.rm=nr;exports.rmdir=Jr;exports.runBlueprintSteps=gt;exports.runBlueprintV1Steps=gt;exports.runBlueprintV2=ys;exports.runPHP=Wr;exports.runPHPWithOptions=Br;exports.runSql=Mr;exports.runWpInstallationWizard=nt;exports.setPluginProxyURL=ws;exports.setSiteLanguage=lt;exports.setSiteOptions=kr;exports.unzip=ur;exports.updateUserMeta=zr;exports.validateBlueprint=yt;exports.wpCLI=Er;exports.wpContentFilesExcludedFromExport=jr;exports.writeFile=fr;exports.writeFiles=Xr;exports.zipWpContent=pt;
863
+ `));const y=await f.cli(["/internal/shared/bin/php","/tmp/run-blueprints.php","exec",p,...t]);return y.finished.finally(u),y}class wt extends Error{constructor(t,n,f){super(t,f),this.name="BlueprintFetchError",this.url=n}}async function hs(r){let t;try{const n=await fetch(r,{credentials:"omit"});if(!n.ok)throw new Error(`Failed to fetch blueprint from ${r}`);t=await n.arrayBuffer()}catch(n){throw new wt(`Blueprint file could not be resolved from ${r}: ${n instanceof Error?n.message:String(n)}`,r,{cause:n})}try{const n=new TextDecoder().decode(t);return JSON.parse(n),new ve.OverlayFilesystem([new ve.InMemoryFilesystem({"blueprint.json":n}),new ve.FetchFilesystem({baseUrl:r})])}catch(n){if(await gs(t))return ve.ZipFilesystem.fromArrayBuffer(t);throw new Error(`Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`,{cause:n})}}async function gs(r){if(r.byteLength<4)return!1;const t=new Uint8Array(r,0,4);return t[0]===80&&t[1]===75&&t[2]===3&&t[3]===4}async function bs(r){if((await Be.create(r)).getVersion()===1){const n=await qr(r);return{wpVersion:n.versions.wp,phpVersion:n.versions.php,intl:n.features.intl,networking:n.features.networking,extraLibraries:n.extraLibraries,constants:{}}}else return{phpVersion:wr.RecommendedPHPVersion,wpVersion:"latest",intl:!1,networking:!0,constants:{},extraLibraries:[]}}function ws(){}exports.BlueprintFetchError=wt;exports.BlueprintFilesystemRequiredError=Dr;exports.BlueprintReflection=Be;exports.BlueprintStepExecutionError=ct;exports.InvalidBlueprintError=dt;exports.ResourceDownloadError=or;exports.activatePlugin=Pr;exports.activateTheme=_r;exports.compileBlueprint=qr;exports.compileBlueprintV1=qr;exports.cp=Yr;exports.defineSiteUrl=Tr;exports.defineWpConfigConsts=lr;exports.enableMultisite=Qr;exports.exportWXR=rt;exports.getBlueprintDeclaration=mt;exports.getV2Runner=bt;exports.importThemeStarterContent=$r;exports.importWordPressFiles=et;exports.importWxr=Kr;exports.installPlugin=st;exports.installTheme=it;exports.isBlueprintBundle=Ar;exports.isStepDefinition=ht;exports.login=ot;exports.mkdir=Gr;exports.mv=Zr;exports.request=Vr;exports.resetData=at;exports.resolveRemoteBlueprint=hs;exports.resolveRuntimeConfiguration=bs;exports.rm=nr;exports.rmdir=Jr;exports.runBlueprintSteps=gt;exports.runBlueprintV1Steps=gt;exports.runBlueprintV2=ys;exports.runPHP=Wr;exports.runPHPWithOptions=Br;exports.runSql=Mr;exports.runWpInstallationWizard=nt;exports.setPluginProxyURL=ws;exports.setSiteLanguage=lt;exports.setSiteOptions=kr;exports.unzip=ur;exports.updateUserMeta=zr;exports.validateBlueprint=yt;exports.wpCLI=Er;exports.wpContentFilesExcludedFromExport=jr;exports.writeFile=fr;exports.writeFiles=Xr;exports.zipWpContent=pt;
862
864
  //# sourceMappingURL=index.cjs.map