@wp-playground/blueprints 3.1.42 → 3.1.44

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
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const br=require("@php-wasm/progress"),D=require("@php-wasm/util"),Be=require("@php-wasm/universal"),be=require("@wp-playground/storage"),_t=require("@php-wasm/web-service-worker"),wr=require("@php-wasm/stream-compression"),oe=require("@php-wasm/logger"),Dr=require("@wp-playground/wordpress"),vr=require("@wp-playground/common");function Ur(r){return r&&"read"in r&&typeof r.read=="function"}async function kt(r){if(!Ur(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}class Me{static async create(t){const n=await kt(t),l=Ur(t)?t:void 0;return Me.createFromDeclaration(n,l)}static createFromDeclaration(t,n=void 0){return new Me(t,n,t.version||1)}constructor(t,n,l){this.declaration=t,this.bundle=n,this.version=l}getVersion(){return this.version}getDeclaration(){return this.declaration}isBundle(){return this.bundle!==void 0}getBundle(){return this.bundle}getBlueprint(){return this.getBundle()||this.getDeclaration()}}function lr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const Ot=`Blueprint resource of type "bundled" requires a filesystem.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Er=require("@php-wasm/progress"),C=require("@php-wasm/util"),Pe=require("@php-wasm/universal"),be=require("@wp-playground/storage"),Mt=require("@php-wasm/web-service-worker"),Or=require("@php-wasm/stream-compression"),oe=require("@php-wasm/logger"),Yr=require("@wp-playground/wordpress"),Me=require("@wp-playground/common");function Zr(r){return r&&"read"in r&&typeof r.read=="function"}async function Qr(r){if(!Zr(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}class ze{static async create(t){const n=await Qr(t),p=Zr(t)?t:void 0;return ze.createFromDeclaration(n,p)}static createFromDeclaration(t,n=void 0){return new ze(t,n,t.version||1)}constructor(t,n,p){this.declaration=t,this.bundle=n,this.version=p}getVersion(){return this.version}getDeclaration(){return this.declaration}isBundle(){return this.bundle!==void 0}getBundle(){return this.bundle}getBlueprint(){return this.getBundle()||this.getDeclaration()}}function mr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const zt=`Blueprint resource of type "bundled" requires a filesystem.
2
2
 
3
3
  This Blueprint refers to files that should be bundled with it (like images, plugins, or themes), but the filesystem needed to access these files is not available. This usually happens when:
4
4
 
@@ -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 Ir extends Error{constructor(t=Ot){super(t),this.name="BlueprintFilesystemRequiredError"}}class ar extends Error{constructor(t,n,l){super(t,l),this.name="ResourceDownloadError",this.url=n}}const Tt=["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"&&Tt.includes(r.resource)}function $t(r){try{return new URL(r).hostname==="github-proxy.com"}catch{return!1}}function jt(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 l=t.searchParams,u=l.get("repo");if(!u)return null;const s=l.get("release"),e=l.get("asset");if(s&&e){const j=s==="latest"?"releases/latest/download":`releases/download/${s}`;return{resource:"url",url:`https://github.com/${u}/${j}/${e}`}}let p,d;const h=l.get("pr"),P=l.get("commit"),y=l.get("branch");h?p=`refs/pull/${h}/head`:P?(p=P,d="commit"):s?(p=s,d="tag"):p=y||"HEAD";const O=l.get("directory");return{resource:"zip",inner:{resource:"git:directory",url:`https://github.com/${u}`,ref:p,...d&&{refType:d},...O&&{path:O}}}}class we{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:l,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e}){if(t.resource==="url"&&$t(t.url)){const d=jt(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 qt(t,l);break;case"literal":p=new At(t,l);break;case"wordpress.org/themes":p=new Ct(t,l);break;case"wordpress.org/plugins":p=new Dt(t,l);break;case"url":p=new Lt(t,l,{corsProxy:u});break;case"git:directory":p=new Ft(t,l,{corsProxy:u,additionalHeaders:e});break;case"literal:directory":p=new xt(t,l);break;case"bundled":if(!s)throw new Ir;p=new Wt(t,s,l);break;case"zip":{const d=we.create(t.inner,{semaphore:n,progress:l,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e});p=new Bt(t,d,l);break}default:throw new Error(`Unknown resource type: ${t.resource}`)}return n&&(p=new It(p,n)),new Ut(p)}}class Wr extends we{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 qt extends we{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 At extends we{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 Pr extends we{constructor(t,n){super(),this._progress=t,this.corsProxy=n}async resolve(){var n,l,u;(n=this.progress)==null||n.setCaption(this.caption);const t=this.getURL();try{let s=await _t.fetchWithCorsProxy(t,void 0,this.corsProxy,await((l=this.playground)==null?void 0:l.absoluteUrl));if(!s.ok)throw new ar(`Could not download "${t}"`,t);if(s=await br.cloneResponseMonitorProgress(s,((u=this.progress)==null?void 0:u.loadingListener)??Rt),s.status!==200)throw new ar(`Could not download "${t}"`,t);const e=this.name||St(s.headers.get("content-disposition")||"")||encodeURIComponent(t);return new File([await s.arrayBuffer()],e)}catch(s){throw new ar(`Could not download "${t}".
13
+ Learn more about Blueprint resources: https://wordpress.github.io/wordpress-playground/blueprints/data-format#resources`;class Gr extends Error{constructor(t=zt){super(t),this.name="BlueprintFilesystemRequiredError"}}class fr extends Error{constructor(t,n,p){super(t,p),this.name="ResourceDownloadError",this.url=n}}const Ht=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url","git:directory","bundled","zip"];function Yt(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&Ht.includes(r.resource)}function Zt(r){try{return new URL(r).hostname==="github-proxy.com"}catch{return!1}}function Qt(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 p=t.searchParams,l=p.get("repo");if(!l)return null;const s=p.get("release"),e=p.get("asset");if(s&&e){const T=s==="latest"?"releases/latest/download":`releases/download/${s}`;return{resource:"url",url:`https://github.com/${l}/${T}/${e}`}}let f,d;const g=p.get("pr"),y=p.get("commit"),h=p.get("branch");g?f=`refs/pull/${g}/head`:y?(f=y,d="commit"):s?(f=s,d="tag"):f=h||"HEAD";const E=p.get("directory");return{resource:"zip",inner:{resource:"git:directory",url:`https://github.com/${l}`,ref:f,...d&&{refType:d},...E&&{path:E}}}}class we{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:p,corsProxy:l,streamBundledFile:s,gitAdditionalHeadersCallback:e}){if(t.resource==="url"&&Zt(t.url)){const d=Qt(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 f;switch(t.resource){case"vfs":f=new Gt(t,p);break;case"literal":f=new Jt(t,p);break;case"wordpress.org/themes":f=new is(t,p);break;case"wordpress.org/plugins":f=new os(t,p);break;case"url":f=new es(t,p,{corsProxy:l});break;case"git:directory":f=new rs(t,p,{corsProxy:l,additionalHeaders:e});break;case"literal:directory":f=new ss(t,p);break;case"bundled":if(!s)throw new Gr;f=new ps(t,s,p);break;case"zip":{const d=we.create(t.inner,{semaphore:n,progress:p,corsProxy:l,streamBundledFile:s,gitAdditionalHeadersCallback:e});f=new ls(t,d,p);break}default:throw new Error(`Unknown resource type: ${t.resource}`)}return n&&(f=new as(f,n)),new ns(f)}}class Jr extends we{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 Gt extends we{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 Jt extends we{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 Tr extends we{constructor(t,n){super(),this._progress=t,this.corsProxy=n}async resolve(){var n,p,l;(n=this.progress)==null||n.setCaption(this.caption);const t=this.getURL();try{let s=await Mt.fetchWithCorsProxy(t,void 0,this.corsProxy,await((p=this.playground)==null?void 0:p.absoluteUrl));if(!s.ok)throw new fr(`Could not download "${t}"`,t);if(s=await Er.cloneResponseMonitorProgress(s,((l=this.progress)==null?void 0:l.loadingListener)??Kt),s.status!==200)throw new fr(`Could not download "${t}"`,t);const e=this.name||Xt(s.headers.get("content-disposition")||"")||encodeURIComponent(t);return new File([await s.arrayBuffer()],e)}catch(s){throw new fr(`Could not download "${t}".
14
14
 
15
15
  Confirm that the URL is correct, the server is reachable, and the file is actually 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 St(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 l=n.match(/^[^']*'[^']*'(.+)$/);if(l)try{n=decodeURIComponent(l[1])}catch{}}return n}const Rt=()=>{};class Lt extends Pr{constructor(t,n,l){if(super(n,l==null?void 0:l.corsProxy),this.resource=t,this.options=l,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 Ft extends we{constructor(t,n,l){super(),this.reference=t,this._progress=n,this.options=l}async resolve(){var l,u,s;const t=((u=(l=this.options)==null?void 0:l.additionalHeaders)==null?void 0:u.call(l,this.reference.url))??{},n=(s=this.options)!=null&&s.corsProxy?`${this.options.corsProxy}${this.reference.url}`:this.reference.url;try{const e=await be.resolveCommitHash(n,{value:this.reference.ref,type:this.reference.refType??"infer"},t),p=await be.listGitFiles(n,e,t),d=(this.reference.path??"").replace(/^\/+/,""),h=be.listDescendantFiles(p,d),P=await be.sparseCheckout(n,e,h,{withObjects:this.reference[".git"],additionalHeaders:t});let y=P.files;return y=Nt(y,O=>O.substring(d.length).replace(/^\/+/,"")),this.reference[".git"]&&(y={...await be.createDotGitDirectory({repoUrl:this.reference.url,commitHash:e,ref:this.reference.ref,refType:this.reference.refType,objects:P.objects??[],fileOids:P.fileOids??{},pathPrefix:d}),...y}),{name:this.filename,files:y}}catch(e){throw e instanceof be.GitAuthenticationError?new be.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,"")||D.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 Nt(r,t){return Object.fromEntries(Object.entries(r).map(([n,l])=>[t(n),l]))}class xt extends we{constructor(t,n){super(),this.reference=t,this._progress=n}async resolve(){return this.reference}get name(){return this.reference.name}}class Ct extends Pr{constructor(t,n){super(n),this.resource=t}get name(){return lr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${Br(this.resource.slug)}`}}class Dt extends Pr{constructor(t,n){super(n),this.resource=t}get name(){return lr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${Br(this.resource.slug)}`}}function Br(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class Ut extends Wr{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class It extends Wr{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}class Wt extends we{constructor(t,n,l){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=l}async resolve(){var t,n,l;(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 wr.StreamedFile(e,this.name,{filesize:s})}catch(u){throw(l=this.progress)==null||l.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 Xt(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 p=n.match(/^[^']*'[^']*'(.+)$/);if(p)try{n=decodeURIComponent(p[1])}catch{}}return n}const Kt=()=>{};class es extends Tr{constructor(t,n,p){if(super(n,p==null?void 0:p.corsProxy),this.resource=t,this.options=p,this.resource.url.startsWith("https://github.com/")){const l=this.resource.url.match(/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/(?:blob|raw)\/(?<branch>[^/]+)\/(?<path>.+[^/])$/);l!=null&&l.groups&&(this.resource={...this.resource,url:`https://raw.githubusercontent.com/${l.groups.owner}/${l.groups.repo}/${l.groups.branch}/${l.groups.path}`})}}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class rs extends we{constructor(t,n,p){super(),this.reference=t,this._progress=n,this.options=p}async resolve(){var p,l,s;const t=((l=(p=this.options)==null?void 0:p.additionalHeaders)==null?void 0:l.call(p,this.reference.url))??{},n=(s=this.options)!=null&&s.corsProxy?`${this.options.corsProxy}${this.reference.url}`:this.reference.url;try{const e=await be.resolveCommitHash(n,{value:this.reference.ref,type:this.reference.refType??"infer"},t),f=await be.listGitFiles(n,e,t),d=(this.reference.path??"").replace(/^\/+/,""),g=be.listDescendantFiles(f,d),y=await be.sparseCheckout(n,e,g,{withObjects:this.reference[".git"],additionalHeaders:t});let h=y.files;return h=ts(h,E=>E.substring(d.length).replace(/^\/+/,"")),this.reference[".git"]&&(h={...await be.createDotGitDirectory({repoUrl:this.reference.url,commitHash:e,ref:this.reference.ref,refType:this.reference.refType,objects:y.objects??[],fileOids:y.fileOids??{},pathPrefix:d}),...h}),{name:this.filename,files:h}}catch(e){throw e instanceof be.GitAuthenticationError?new be.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,"")||C.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 ts(r,t){return Object.fromEntries(Object.entries(r).map(([n,p])=>[t(n),p]))}class ss extends we{constructor(t,n){super(),this.reference=t,this._progress=n}async resolve(){return this.reference}get name(){return this.reference.name}}class is extends Tr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${Xr(this.resource.slug)}`}}class os extends Tr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${Xr(this.resource.slug)}`}}function Xr(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class ns extends Jr{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class as extends Jr{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}class ps extends we{constructor(t,n,p){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=p}async resolve(){var t,n,p;(t=this.progress)==null||t.set(0);try{const l=await this.streamBundledFile(this.resource.path),s=l.filesize;if(!s)return(n=this.progress)==null||n.set(100),l;const e=Er.cloneStreamMonitorProgress(l.stream(),s,f=>{var d;(d=this.progress)==null||d.set(f.detail.loaded/f.detail.total*100)});return new Or.StreamedFile(e,this.name,{filesize:s})}catch(l){throw(p=this.progress)==null||p.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 Bt extends we{constructor(t,n,l){super(),this.reference=t,this.innerResource=n,this._progress=l}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=Mt(t.files,t.name);const l=wr.encodeZip(n),u=await wr.collectFile(this.name,l);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 Mt(r,t){const n=[];function l(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}`)):l(p,d)}}return l(r,""),n}const _r=async(r,{pluginPath:t,pluginName:n},l)=>{l==null||l.tracker.setCaption(`Activating ${n||t}`);const u=await r.documentRoot,s="/tmp/playground-activate-plugin.log";await r.fileExists(s)&&await r.unlink(s);const e=await r.run({code:`<?php
18
+ Error details: ${l instanceof Error?l.message:String(l)}`,{cause:l})}}get name(){return this.resource.path.split("/").pop()||""}get isAsync(){return!0}}class ls extends we{constructor(t,n,p){super(),this.reference=t,this.innerResource=n,this._progress=p}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=fs(t.files,t.name);const p=Or.encodeZip(n),l=await Or.collectFile(this.name,p);return(e=this.progress)==null||e.set(100),l}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 fs(r,t){const n=[];function p(l,s){for(const[e,f]of Object.entries(l)){const d=s?`${s}/${e}`:e;f instanceof Uint8Array?n.push(new File([f],`${t}/${d}`)):typeof f=="string"?n.push(new File([new TextEncoder().encode(f)],`${t}/${d}`)):p(f,d)}}return p(r,""),n}const $r=async(r,{pluginPath:t,pluginName:n},p)=>{p==null||p.tracker.setCaption(`Activating ${n||t}`);const l=await r.documentRoot,s="/tmp/playground-activate-plugin.log";await r.fileExists(s)&&await r.unlink(s);const e=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" );
@@ -51,7 +51,7 @@ Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name()
51
51
  } else if ( false === $response ) {
52
52
  die( "The activatePlugin step wasn't able to find the plugin $plugin_path." );
53
53
  }
54
- `,env:{PLUGIN_PATH:t,DOCROOT:u,ACTIVATION_LOG:s}});e.text&&oe.logger.warn(`Plugin ${t} activation printed the following bytes: ${e.text}`);let p="";await r.fileExists(s)&&(p=(await r.readFileAsText(s)).trim(),await r.unlink(s));const h=((await r.run({code:`<?php
54
+ `,env:{PLUGIN_PATH:t,DOCROOT:l,ACTIVATION_LOG:s}});e.text&&oe.logger.warn(`Plugin ${t} activation printed the following bytes: ${e.text}`);let f="";await r.fileExists(s)&&(f=(await r.readFileAsText(s)).trim(),await r.unlink(s));const g=((await r.run({code:`<?php
55
55
  ob_start();
56
56
  require_once( getenv( 'DOCROOT' ) . "/wp-load.php" );
57
57
 
@@ -84,14 +84,14 @@ Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name()
84
84
  }
85
85
  die('{"success": false}');
86
86
  });
87
- `,env:{DOCROOT:u,PLUGIN_PATH:t}})).text??"").trim();if(h.endsWith('{"success": true}'))return;h!=='{"success": false}'&&oe.logger.debug(h);const P=[],y=(e.text??"").trim();throw y&&P.push(`WordPress said: ${y}`),p&&P.push(`PHP error log:
88
- ${p}`),P.push(`Response headers: ${JSON.stringify(e.headers,null,2)}`),P.push("If you need more context, check the Playground console (browser DevTools) or the CLI output where this Blueprint was run."),new Error(`Plugin ${t} could not be activated.
87
+ `,env:{DOCROOT:l,PLUGIN_PATH:t}})).text??"").trim();if(g.endsWith('{"success": true}'))return;g!=='{"success": false}'&&oe.logger.debug(g);const y=[],h=(e.text??"").trim();throw h&&y.push(`WordPress said: ${h}`),f&&y.push(`PHP error log:
88
+ ${f}`),y.push(`Response headers: ${JSON.stringify(e.headers,null,2)}`),y.push("If you need more context, check the Playground console (browser DevTools) or the CLI output where this Blueprint was run."),new Error(`Plugin ${t} could not be activated.
89
89
 
90
- ${P.join(`
90
+ ${y.join(`
91
91
 
92
- `)}`)},kr=async(r,{themeFolderName:t},n)=>{n==null||n.tracker.setCaption(`Activating ${t}`);const l=await r.documentRoot,u=`${l}/wp-content/themes/${t}`;if(!await r.fileExists(u))throw new Error(`
92
+ `)}`)},jr=async(r,{themeFolderName:t},n)=>{n==null||n.tracker.setCaption(`Activating ${t}`);const p=await r.documentRoot,l=`${p}/wp-content/themes/${t}`;if(!await r.fileExists(l))throw new Error(`
93
93
  Couldn't activate theme ${t}.
94
- Theme not found at the provided theme path: ${u}.
94
+ Theme not found at the provided theme path: ${l}.
95
95
  Check the theme path to ensure it's correct.
96
96
  If the theme is not installed, you can install it using the installTheme step.
97
97
  More info can be found in the Blueprint documentation: https://wordpress.github.io/wordpress-playground/blueprints/steps/#ActivateThemeStep
@@ -108,7 +108,7 @@ ${P.join(`
108
108
  throw new Exception( 'Theme ' . getenv('themeFolderName') . ' could not be activated.' );
109
109
  }
110
110
  die('Theme activated successfully');
111
- `,env:{docroot:l,themeFolderName:t}});if(s.text!=="Theme activated successfully")throw oe.logger.debug(s),new Error(`Theme ${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)}`)},Mr=async(r,{code:t})=>{let n=typeof t=="string"?t:t.content;return(n.includes('"wordpress/wp-load.php"')||n.includes("'wordpress/wp-load.php'"))&&(oe.logger.error(`
111
+ `,env:{docroot:p,themeFolderName:t}});if(s.text!=="Theme activated successfully")throw oe.logger.debug(s),new Error(`Theme ${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)}`)},Kr=async(r,{code:t})=>{let n=typeof t=="string"?t:t.content;return(n.includes('"wordpress/wp-load.php"')||n.includes("'wordpress/wp-load.php'"))&&(oe.logger.error(`
112
112
  It looks like you're trying to load WordPress using a relative path 'wordpress/wp-load.php'.
113
113
 
114
114
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -122,7 +122,7 @@ Instead of: require_once 'wordpress/wp-load.php';
122
122
  Use: require_once '/wordpress/wp-load.php';
123
123
 
124
124
  This will ensure your code works reliably regardless of the current working directory.
125
- `.trim()),n=n.replace("'wordpress/wp-load.php'","'/wordpress/wp-load.php'"),n=n.replace('"wordpress/wp-load.php"','"/wordpress/wp-load.php"')),await r.run({code:n})},Vr=async(r,{options:t})=>await r.run(t),pr=async(r,{path:t})=>{t.startsWith("/")||(oe.logger.error(`
125
+ `.trim()),n=n.replace("'wordpress/wp-load.php'","'/wordpress/wp-load.php'"),n=n.replace('"wordpress/wp-load.php"','"/wordpress/wp-load.php"')),await r.run({code:n})},et=async(r,{options:t})=>await r.run(t),dr=async(r,{path:t})=>{t.startsWith("/")||(oe.logger.error(`
126
126
  The rm() step in your Blueprint refers to a relative path.
127
127
 
128
128
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -136,7 +136,7 @@ Instead of: rm({ path: 'wordpress/wp-load.php' });
136
136
  Use: rm({ path: '/wordpress/wp-load.php' });
137
137
 
138
138
  This will ensure your code works reliably regardless of the current working directory.
139
- `.trim()),t=`/${t}`),await r.unlink(t)},Vt=`<?php
139
+ `.trim()),t=`/${t}`),await r.unlink(t)},us=`<?php
140
140
 
141
141
  /**
142
142
  * Naively splits an SQL string into a sequence of queries. It
@@ -299,7 +299,7 @@ class WP_MySQL_Naive_Query_Stream {
299
299
  return $this->state;
300
300
  }
301
301
 
302
- }`,zr=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const l=`/tmp/${D.randomFilename()}.sql`,u=`/tmp/${D.randomFilename()}.php`;await r.writeFile(l,new Uint8Array(await t.arrayBuffer())),await r.writeFile(u,new TextEncoder().encode(Vt));const s=await r.documentRoot,e=D.phpVars({docroot:s,sqlFilename:l,streamClassFilename:u}),p=await r.run({code:`<?php
302
+ }`,rt=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const p=`/tmp/${C.randomFilename()}.sql`,l=`/tmp/${C.randomFilename()}.php`;await r.writeFile(p,new Uint8Array(await t.arrayBuffer())),await r.writeFile(l,new TextEncoder().encode(us));const s=await r.documentRoot,e=C.phpVars({docroot:s,sqlFilename:p,streamClassFilename:l}),f=await r.run({code:`<?php
303
303
  define('WP_SQLITE_AST_DRIVER', true);
304
304
  require_once ${e.docroot} . '/wp-load.php';
305
305
 
@@ -343,26 +343,36 @@ class WP_MySQL_Naive_Query_Stream {
343
343
  $query = $stream->get_query();
344
344
  $wpdb->query($query);
345
345
  }
346
- `});return await pr(r,{path:l}),await pr(r,{path:u}),p},Hr=async(r,{request:t})=>{oe.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 oe.logger.warn("WordPress response was",{response:n}),new Error(`Request failed with status ${n.httpStatusCode}`);return n},fr=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await zt(r,t);break;case"rewrite-wp-config":{const l=await r.documentRoot,u=D.joinPaths(l,"/wp-config.php");await Dr.defineWpConfigConstants(r,u,t);break}default:throw new Error(`Invalid method: ${n}`)}};async function zt(r,t){for(const n in t)await r.defineConstant(n,t[n])}const Or=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
347
- include ${D.phpVar(n)} . '/wp-load.php';
348
- $site_options = ${D.phpVar(t)};
346
+ `});return await dr(r,{path:p}),await dr(r,{path:l}),f},tt=async(r,{request:t})=>{oe.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 oe.logger.warn("WordPress response was",{response:n}),new Error(`Request failed with status ${n.httpStatusCode}`);return n},yr=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await ds(r,t);break;case"rewrite-wp-config":{const p=await r.documentRoot,l=C.joinPaths(p,"/wp-config.php");await Yr.defineWpConfigConstants(r,l,t);break}default:throw new Error(`Invalid method: ${n}`)}};async function ds(r,t){for(const n in t)await r.defineConstant(n,t[n])}const Ar=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
347
+ include ${C.phpVar(n)} . '/wp-load.php';
348
+ $site_options = ${C.phpVar(t)};
349
+ $flush_rewrite_rules = (
350
+ is_array($site_options) &&
351
+ array_key_exists('permalink_structure', $site_options)
352
+ ) || (
353
+ is_object($site_options) &&
354
+ property_exists($site_options, 'permalink_structure')
355
+ );
349
356
  foreach($site_options as $name => $value) {
350
357
  update_option($name, $value);
351
358
  }
359
+ if ($flush_rewrite_rules) {
360
+ flush_rewrite_rules(false);
361
+ }
352
362
  echo "Success";
353
- `})},Zr=async(r,{meta:t,userId:n})=>{const l=await r.documentRoot;await r.run({code:`<?php
354
- include ${D.phpVar(l)} . '/wp-load.php';
355
- $meta = ${D.phpVar(t)};
363
+ `})},st=async(r,{meta:t,userId:n})=>{const p=await r.documentRoot;await r.run({code:`<?php
364
+ include ${C.phpVar(p)} . '/wp-load.php';
365
+ $meta = ${C.phpVar(t)};
356
366
  foreach($meta as $name => $value) {
357
- update_user_meta(${D.phpVar(n)}, $name, $value);
367
+ update_user_meta(${C.phpVar(n)}, $name, $value);
358
368
  }
359
- `})},Tr="/tmp/wp-cli.phar",Ht={resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},Qr=async(r,t=Tr)=>{if(!await r.fileExists(t))throw new Error(`wp-cli.phar not found at ${t}.
369
+ `})},qr="/tmp/wp-cli.phar",cs={resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},it=async(r,t=qr)=>{if(!await r.fileExists(t))throw new Error(`wp-cli.phar not found at ${t}.
360
370
  You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
361
371
  {
362
372
  "extraLibraries": [ "wp-cli" ]
363
373
  }
364
374
  Read more about it in the documentation.
365
- https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},Er=async(r,{command:t,wpCliPath:n=Tr})=>{await Qr(r,n);let l;if(typeof t=="string"?(t=t.trim(),l=Zt(t)):l=t,l.shift()!=="wp")throw new Error('The first argument must be "wp".');let s=!1;const e=l.map(h=>h.startsWith("wordpress/")?(s=!0,`/${h}`):h);s&&oe.logger.error(`
375
+ https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},Sr=async(r,{command:t,wpCliPath:n=qr})=>{await it(r,n);let p;if(typeof t=="string"?(t=t.trim(),p=ms(t)):p=t,p.shift()!=="wp")throw new Error('The first argument must be "wp".');let s=!1;const e=p.map(g=>g.startsWith("wordpress/")?(s=!0,`/${g}`):g);s&&oe.logger.error(`
366
376
  The wp-cli step in your Blueprint refers to a relative path.
367
377
 
368
378
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -387,7 +397,7 @@ Use:
387
397
  }
388
398
 
389
399
  This will ensure your code works reliably regardless of the current working directory.
390
- `.trim());const p=await r.documentRoot;await r.writeFile("/tmp/stdout",""),await r.writeFile("/tmp/stderr",""),await r.writeFile(D.joinPaths(p,"run-cli.php"),`<?php
400
+ `.trim());const f=await r.documentRoot;await r.writeFile("/tmp/stdout",""),await r.writeFile("/tmp/stderr",""),await r.writeFile(C.joinPaths(f,"run-cli.php"),`<?php
391
401
  // Set up the environment to emulate a shell script
392
402
  // call.
393
403
 
@@ -399,8 +409,8 @@ This will ensure your code works reliably regardless of the current working dire
399
409
  // Set the argv global.
400
410
  $GLOBALS['argv'] = array_merge([
401
411
  "/tmp/wp-cli.phar",
402
- "--path=${p}"
403
- ], ${D.phpVar(e)});
412
+ "--path=${f}"
413
+ ], ${C.phpVar(e)});
404
414
 
405
415
  // Provide stdin, stdout, stderr streams outside of
406
416
  // the CLI SAPI.
@@ -408,10 +418,10 @@ This will ensure your code works reliably regardless of the current working dire
408
418
  define('STDOUT', fopen('php://stdout', 'wb'));
409
419
  define('STDERR', fopen('php://stderr', 'wb'));
410
420
 
411
- require( ${D.phpVar(n)} );
412
- `);const d=await r.run({scriptPath:D.joinPaths(p,"run-cli.php")});if(d.exitCode!==0)throw new Error(d.errors);return d};function Zt(r){let l=0,u="";const s=[];let e="";for(let p=0;p<r.length;p++){const d=r[p];l===0?d==='"'||d==="'"?(l=1,u=d):d.match(/\s/)?(e&&s.push(e),e=""):e+=d:l===1&&(d==="\\"?(p++,e+=r[p]):d===u?(l=0,u=""):e+=d)}return e&&s.push(e),s}const Yr=async(r,{wpCliPath:t})=>{await Qr(r,t),await fr(r,{consts:{WP_ALLOW_MULTISITE:1}});const n=new URL(await r.absoluteUrl);if(n.port!==""){let h=`The current host is ${n.host}, but WordPress multisites do not support custom ports.`;throw n.hostname==="localhost"&&(h+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(h)}const l=n.pathname.replace(/\/$/,"")+"/",u=`${n.protocol}//${n.hostname}${l}`;await Or(r,{options:{siteurl:u,home:u}}),await Er(r,{command:`wp core multisite-convert --base="${l}"`});const e=`${await r.documentRoot}/wp-config.php`,p=await r.readFileAsText(e);let d=p;p.includes("$_SERVER['HTTP_HOST']")||(d=p.replace(/^<\?php\s*/i,`<?php
413
- $_SERVER['HTTP_HOST'] = ${D.phpVar(n.hostname)};
414
- `)),await r.writeFile(e,d)},Gr=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&oe.logger.error(`
421
+ require( ${C.phpVar(n)} );
422
+ `);const d=await r.run({scriptPath:C.joinPaths(f,"run-cli.php")});if(d.exitCode!==0)throw new Error(d.errors);return d};function ms(r){let p=0,l="";const s=[];let e="";for(let f=0;f<r.length;f++){const d=r[f];p===0?d==='"'||d==="'"?(p=1,l=d):d.match(/\s/)?(e&&s.push(e),e=""):e+=d:p===1&&(d==="\\"?(f++,e+=r[f]):d===l?(p=0,l=""):e+=d)}return e&&s.push(e),s}const ot=async(r,{wpCliPath:t})=>{await it(r,t),await yr(r,{consts:{WP_ALLOW_MULTISITE:1}});const n=new URL(await r.absoluteUrl);if(n.port!==""){let g=`The current host is ${n.host}, but WordPress multisites do not support custom ports.`;throw n.hostname==="localhost"&&(g+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(g)}const p=n.pathname.replace(/\/$/,"")+"/",l=`${n.protocol}//${n.hostname}${p}`;await Ar(r,{options:{siteurl:l,home:l}}),await Sr(r,{command:`wp core multisite-convert --base="${p}"`});const e=`${await r.documentRoot}/wp-config.php`,f=await r.readFileAsText(e);let d=f;f.includes("$_SERVER['HTTP_HOST']")||(d=f.replace(/^<\?php\s*/i,`<?php
423
+ $_SERVER['HTTP_HOST'] = ${C.phpVar(n.hostname)};
424
+ `)),await r.writeFile(e,d)},nt=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&oe.logger.error(`
415
425
  The cp() step in your Blueprint refers to a relative path.
416
426
 
417
427
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -425,7 +435,7 @@ Instead of: cp({ fromPath: 'wordpress/wp-load.php', toPath: 'wordpress/wp-load.
425
435
  Use: cp({ fromPath: '/wordpress/wp-load.php', toPath: '/wordpress/wp-load.php' });
426
436
 
427
437
  This will ensure your code works reliably regardless of the current working directory.
428
- `.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.writeFile(n,await r.readFileAsBuffer(t))},Jr=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&oe.logger.error(`
438
+ `.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.writeFile(n,await r.readFileAsBuffer(t))},at=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&oe.logger.error(`
429
439
  The mv() step in your Blueprint refers to a relative path.
430
440
 
431
441
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -439,7 +449,7 @@ Instead of: mv({ fromPath: 'wordpress/wp-load.php', toPath: 'wordpress/wp-load.
439
449
  Use: mv({ fromPath: '/wordpress/wp-load.php', toPath: '/wordpress/wp-load.php' });
440
450
 
441
451
  This will ensure your code works reliably regardless of the current working directory.
442
- `.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.mv(t,n)},Xr=async(r,{path:t})=>{t.startsWith("/")||oe.logger.error(`
452
+ `.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.mv(t,n)},pt=async(r,{path:t})=>{t.startsWith("/")||oe.logger.error(`
443
453
  The mkdir() step in your Blueprint refers to a relative path.
444
454
 
445
455
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -453,7 +463,7 @@ Instead of: mkdir({ path: 'wordpress/my-new-folder' });
453
463
  Use: mkdir({ path: '/wordpress/my-new-folder' });
454
464
 
455
465
  This will ensure your code works reliably regardless of the current working directory.
456
- `.trim()),await r.mkdir(t)},Kr=async(r,{path:t})=>{t.startsWith("/")||(oe.logger.error(`
466
+ `.trim()),await r.mkdir(t)},lt=async(r,{path:t})=>{t.startsWith("/")||(oe.logger.error(`
457
467
  The rmdir() step in your Blueprint refers to a relative path.
458
468
 
459
469
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -467,7 +477,7 @@ Instead of: rmdir({ path: 'wordpress/wp-load.php' });
467
477
  Use: rmdir({ path: '/wordpress/wp-load.php' });
468
478
 
469
479
  This will ensure your code works reliably regardless of the current working directory.
470
- `.trim()),t=`/${t}`),await r.rmdir(t)},ur=async(r,{path:t,data:n})=>{n instanceof File&&(n=new Uint8Array(await n.arrayBuffer())),t.startsWith("/")||(oe.logger.error(`
480
+ `.trim()),t=`/${t}`),await r.rmdir(t)},hr=async(r,{path:t,data:n})=>{n instanceof File&&(n=new Uint8Array(await n.arrayBuffer())),t.startsWith("/")||(oe.logger.error(`
471
481
  The writeFile() step in your Blueprint refers to a relative path.
472
482
 
473
483
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -481,7 +491,7 @@ Instead of: writeFile({ path: 'wordpress/wp-load.php', data: '<?php echo "Hello
481
491
  Use: writeFile({ path: '/wordpress/wp-load.php', data: '<?php echo "Hello World!"; ?>' });
482
492
 
483
493
  This will ensure your code works reliably regardless of the current working directory.
484
- `.trim()),t=`/${t}`),t.startsWith("/wordpress/wp-content/mu-plugins")&&!await r.fileExists("/wordpress/wp-content/mu-plugins")&&await r.mkdir("/wordpress/wp-content/mu-plugins"),await r.writeFile(t,n)},et=async(r,{writeToPath:t,filesTree:n})=>{t.startsWith("/")||(oe.logger.error(`
494
+ `.trim()),t=`/${t}`),t.startsWith("/wordpress/wp-content/mu-plugins")&&!await r.fileExists("/wordpress/wp-content/mu-plugins")&&await r.mkdir("/wordpress/wp-content/mu-plugins"),await r.writeFile(t,n)},ft=async(r,{writeToPath:t,filesTree:n})=>{t.startsWith("/")||(oe.logger.error(`
485
495
  The writeFiles() step in your Blueprint refers to a relative path.
486
496
 
487
497
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -495,7 +505,7 @@ Instead of: writeFiles({ writeToPath: 'wordpress/wp-content/plugins/my-plugin',
495
505
  Use: writeFiles({ writeToPath: '/wordpress/wp-content/plugins/my-plugin', filesTree: { name: 'style.css': 'a { color: red; }' });
496
506
 
497
507
  This will ensure your code works reliably regardless of the current working directory.
498
- `.trim()),t=`/${t}`),await Be.writeFiles(r,t,n.files)},$r=async(r,{siteUrl:t})=>{await fr(r,{consts:{WP_HOME:t,WP_SITEURL:t}})},rt=async(r,{file:t},n)=>{await Qt(r,t,n)};async function Qt(r,t,n){var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Importing content"),await ur(r,{path:"/tmp/import.wxr",data:t}),await r.run({$_SERVER:{HTTPS:(await r.absoluteUrl).startsWith("https://")?"on":""},code:`<?php
508
+ `.trim()),t=`/${t}`),await Pe.writeFiles(r,t,n.files)},Rr=async(r,{siteUrl:t})=>{await yr(r,{consts:{WP_HOME:t,WP_SITEURL:t}})},ut=async(r,{file:t,fetchAttachments:n=!0,rewriteUrls:p=!0,importComments:l=!0,defaultAuthorUsername:s="admin"},e)=>{const f=s.trim()||"admin";await ys(r,t,e,{fetchAttachments:n,rewriteUrls:p,importComments:l,fallbackAuthorUsername:f})};async function ys(r,t,n,p){var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Importing content"),await hr(r,{path:"/tmp/import.wxr",data:t}),await r.run({$_SERVER:{HTTPS:(await r.absoluteUrl).startsWith("https://")?"on":""},code:`<?php
499
509
  define('WP_LOAD_IMPORTERS', true);
500
510
  require 'wp-load.php';
501
511
  require 'wp-admin/includes/admin.php';
@@ -512,10 +522,16 @@ This will ensure your code works reliably regardless of the current working dire
512
522
  */
513
523
  kses_remove_filters();
514
524
 
515
- // Set current user for the importer to pick it up as the default
516
- // post author.
517
- $admin_id = get_users(array('role' => 'Administrator') )[0]->ID;
518
- wp_set_current_user( $admin_id );
525
+ // The WordPress importer assigns unmapped imported authors to the current
526
+ // user, so set it to the requested fallback author before importing.
527
+ $fallback_author_username = getenv('FALLBACK_AUTHOR_USERNAME');
528
+ $fallback_author = get_user_by('login', $fallback_author_username);
529
+ if (!$fallback_author) {
530
+ throw new Exception(
531
+ sprintf('Could not find fallback WXR import author "%s".', $fallback_author_username)
532
+ );
533
+ }
534
+ wp_set_current_user( $fallback_author->ID );
519
535
 
520
536
  $wp_import = new WP_Import();
521
537
  $import_data = $wp_import->parse( getenv('IMPORT_FILE') );
@@ -523,6 +539,10 @@ This will ensure your code works reliably regardless of the current working dire
523
539
  // Prepare the data to be used in process_author_mapping();
524
540
  $wp_import->get_authors_from_import( $import_data );
525
541
 
542
+ if (getenv('IMPORT_COMMENTS') === 'false') {
543
+ add_filter('wp_import_post_comments', '__return_empty_array');
544
+ }
545
+
526
546
  // We no longer need the original data, so unset to avoid using excess
527
547
  // memory.
528
548
  unset( $import_data );
@@ -542,9 +562,9 @@ This will ensure your code works reliably regardless of the current working dire
542
562
 
543
563
  $GLOBALS['wpcli_import_current_file'] = basename( $file );
544
564
  $wp_import->import( getenv('IMPORT_FILE'), [
545
- 'rewrite_urls' => true,
565
+ 'rewrite_urls' => getenv('REWRITE_URLS') === 'true',
546
566
  ] );
547
- `,env:{IMPORT_FILE:"/tmp/import.wxr",FETCH_ATTACHMENTS:"true"}})}const jr=async(r,{themeSlug:t=""},n)=>{var u;(u=n==null?void 0:n.tracker)==null||u.setCaption("Importing theme starter content");const l=await r.documentRoot;await r.run({code:`<?php
567
+ `,env:{IMPORT_FILE:"/tmp/import.wxr",FETCH_ATTACHMENTS:p.fetchAttachments?"true":"false",REWRITE_URLS:p.rewriteUrls?"true":"false",IMPORT_COMMENTS:p.importComments?"true":"false",FALLBACK_AUTHOR_USERNAME:p.fallbackAuthorUsername}})}const Lr=async(r,{themeSlug:t=""},n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Importing theme starter content");const p=await r.documentRoot;await r.run({code:`<?php
548
568
 
549
569
  /**
550
570
  * Ensure that the customizer loads as an admin user.
@@ -567,7 +587,7 @@ This will ensure your code works reliably regardless of the current working dire
567
587
  * See _wp_customize_include()
568
588
  */
569
589
  $_REQUEST['wp_customize'] = 'on';
570
- $_REQUEST['customize_theme'] = ${D.phpVar(t)} ?: get_stylesheet();
590
+ $_REQUEST['customize_theme'] = ${C.phpVar(t)} ?: get_stylesheet();
571
591
 
572
592
  /*
573
593
  * Claim this is a ajax request saving settings, to avoid the preview filters being applied.
@@ -579,7 +599,7 @@ This will ensure your code works reliably regardless of the current working dire
579
599
  }
580
600
  playground_add_filter( 'plugins_loaded', 'importThemeStarterContent_plugins_loaded', 0 );
581
601
 
582
- require ${D.phpVar(l)} . '/wp-load.php';
602
+ require ${C.phpVar(p)} . '/wp-load.php';
583
603
 
584
604
  // Return early if there's no starter content.
585
605
  if ( ! get_theme_starter_content() ) {
@@ -591,10 +611,10 @@ This will ensure your code works reliably regardless of the current working dire
591
611
 
592
612
  // Publish the changeset, which publishes the starter content.
593
613
  wp_publish_post( $wp_customize->changeset_post_id() );
594
- `})},dr=async(r,{zipFile:t,zipPath:n,extractToPath:l})=>{if(n)oe.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 vr.unzipFile(r,t||n,l)},qr=["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"],tt=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const l=await r.documentRoot;let u=D.joinPaths("/tmp","import");await r.mkdir(u),await dr(r,{zipFile:t,extractToPath:u}),u=D.joinPaths(u,n);const s=D.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=D.joinPaths(u,"wp-content"),d=D.joinPaths(l,"wp-content");for(const T of qr){const j=D.joinPaths(p,T);await Nr(r,j);const w=D.joinPaths(d,T);await r.fileExists(w)&&(await r.mkdir(D.dirname(j)),await r.mv(w,j))}const h=D.joinPaths(u,"wp-content","database");await r.fileExists(h)||await r.mv(D.joinPaths(l,"wp-content","database"),h);const P=await r.listFiles(u);for(const T of P)await Nr(r,D.joinPaths(l,T)),await r.mv(D.joinPaths(u,T),D.joinPaths(l,T));await r.rmdir(u),await Dr.ensureWpConfig(r,l);const y=await r.absoluteUrl;e||(e=await Gt(r,l)),await $r(r,{siteUrl:y});const O=D.phpVar(D.joinPaths(l,"wp-admin","upgrade.php"));await r.run({code:`<?php
614
+ `})},gr=async(r,{zipFile:t,zipPath:n,extractToPath:p})=>{if(n)oe.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 Me.unzipFile(r,t||n,p)},Nr=["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"],dt=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const p=await r.documentRoot;let l=C.joinPaths("/tmp","import");await r.mkdir(l),await gr(r,{zipFile:t,extractToPath:l}),l=C.joinPaths(l,n);const s=C.joinPaths(l,"playground-export.json");let e=null;if(await r.fileExists(s))try{const k=await r.readFileAsText(s);e=JSON.parse(k).siteUrl,await r.unlink(s)}catch{}const f=C.joinPaths(l,"wp-content"),d=C.joinPaths(p,"wp-content");for(const k of Nr){const T=C.joinPaths(f,k);await Ir(r,T);const b=C.joinPaths(d,k);await r.fileExists(b)&&(await r.mkdir(C.dirname(T)),await r.mv(b,T))}const g=C.joinPaths(l,"wp-content","database");await r.fileExists(g)||await r.mv(C.joinPaths(p,"wp-content","database"),g);const y=await r.listFiles(l);for(const k of y)await Ir(r,C.joinPaths(p,k)),await r.mv(C.joinPaths(l,k),C.joinPaths(p,k));await r.rmdir(l),await Yr.ensureWpConfig(r,p);const h=await r.absoluteUrl;e||(e=await gs(r,p)),await Rr(r,{siteUrl:h});const E=C.phpVar(C.joinPaths(p,"wp-admin","upgrade.php"));await r.run({code:`<?php
595
615
  $_GET['step'] = 'upgrade_db';
596
- require ${O};
597
- `}),e&&e!==y&&await Yt(r,l,e,y)};function Fr(r){const t=r.match(/\/scope:[^/]+\/?/);return t?t[0].replace(/\/?$/,"/"):null}async function Yt(r,t,n,l){const u=Fr(n),s=Fr(l);!u||!s||u!==s&&await r.run({code:`<?php
616
+ require ${E};
617
+ `}),e&&e!==h&&await hs(r,p,e,h)};function Cr(r){const t=r.match(/\/scope:[^/]+\/?/);return t?t[0].replace(/\/?$/,"/"):null}async function hs(r,t,n,p){const l=Cr(n),s=Cr(p);!l||!s||l!==s&&await r.run({code:`<?php
598
618
  require_once getenv('DOCUMENT_ROOT') . '/wp-load.php';
599
619
  global $wpdb;
600
620
 
@@ -648,12 +668,63 @@ This will ensure your code works reliably regardless of the current working dire
648
668
  "UPDATE {$wpdb->comments} SET comment_author_url = REPLACE(comment_author_url, %s, %s) WHERE comment_author_url LIKE %s",
649
669
  $old_scope, $new_scope, '%' . $wpdb->esc_like($old_scope) . '%'
650
670
  ));
651
- `,env:{DOCUMENT_ROOT:t,OLD_SCOPE:u,NEW_SCOPE:s}})}async function Gt(r,t){const n=D.phpVars({documentRoot:t});return(await r.run({code:`<?php
671
+ `,env:{DOCUMENT_ROOT:t,OLD_SCOPE:l,NEW_SCOPE:s}})}async function gs(r,t){const n=C.phpVars({documentRoot:t});return(await r.run({code:`<?php
652
672
  require_once ${n.documentRoot} . '/wp-load.php';
653
673
  global $wpdb;
654
674
  $row = $wpdb->get_row("SELECT option_value FROM {$wpdb->options} WHERE option_name = 'siteurl'");
655
675
  echo $row ? $row->option_value : '';
656
- `})).text.trim()||null}async function Nr(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function st(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function it(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:l="overwrite",targetFolderName:u=""}){const e=n.name.replace(/\.zip$/,""),p=D.joinPaths(await r.documentRoot,"wp-content"),d=D.joinPaths(p,D.randomFilename()),h=D.joinPaths(d,"assets",e);await r.fileExists(h)&&await r.rmdir(d,{recursive:!0}),await r.mkdir(d);try{await dr(r,{zipFile:n,extractToPath:h});let P=await r.listFiles(h,{prependPath:!0});P=P.filter(w=>!w.endsWith("/__MACOSX"));const y=P.length===1&&await r.isDir(P[0]);let O,T="";y?(T=P[0],O=P[0].split("/").pop()):(T=h,O=e),u&&u.length&&(O=u);const j=`${t}/${O}`;if(await r.fileExists(j)){if(!await r.isDir(j))throw new Error(`Cannot install asset ${O} to ${j} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(l==="overwrite")await r.rmdir(j,{recursive:!0});else{if(l==="skip")return{assetFolderPath:j,assetFolderName:O};throw new Error(`Cannot install asset ${O} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${l}`)}}return await r.mv(T,j),{assetFolderPath:j,assetFolderName:O}}finally{await r.rmdir(d,{recursive:!0})}}const ot=async(r,{pluginData:t,pluginZipFile:n,ifAlreadyInstalled:l,options:u={}},s)=>{n&&(t=n,oe.logger.warn('The "pluginZipFile" option is deprecated. Use "pluginData" instead.'));const e=D.joinPaths(await r.documentRoot,"wp-content","plugins"),p="targetFolderName"in u?u.targetFolderName:"";let d="",h="";const P=async O=>{if(O.name.toLowerCase().endsWith(".zip"))return!0;const T=new Uint8Array(await O.arrayBuffer(),0,4);return T[0]===80&&T[1]===75&&T[2]===3&&T[3]===4};if(t instanceof File)if(await P(t)){const O=t.name.split("/").pop()||"plugin.zip";h=lr(O),s==null||s.tracker.setCaption(`Installing the ${h} plugin`);const T=await it(r,{ifAlreadyInstalled:l,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`,targetFolderName:p});d=T.assetFolderPath,h=T.assetFolderName}else if(t.name.endsWith(".php")){const O=D.joinPaths(e,t.name);await ur(r,{path:O,data:t}),d=e,h=t.name}else throw new Error("pluginData looks like a file but does not look like a .zip or .php file.");else if(t){h=t.name,s==null||s.tracker.setCaption(`Installing the ${h} plugin`);const O=D.joinPaths(e,p||t.name);await Be.writeFiles(r,O,t.files,{rmRoot:!0}),d=O}("activate"in u?u.activate:!0)&&await _r(r,{pluginPath:d,pluginName:h},s)},at=async(r,{themeData:t,themeZipFile:n,ifAlreadyInstalled:l,options:u={}},s)=>{n&&(t=n,oe.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=lr(y),s==null||s.tracker.setCaption(`Installing the ${d} theme`),p=(await it(r,{ifAlreadyInstalled:l,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=D.joinPaths(await r.documentRoot,"wp-content","themes",p);await Be.writeFiles(r,y,t.files,{rmRoot:!0})}("activate"in u?u.activate:!0)&&await kr(r,{themeFolderName:p},s),("importStarterContent"in u?u.importStarterContent:!1)&&await jr(r,{themeSlug:p},s)},nt=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)},pt=async(r,t,n)=>{var u;(u=n==null?void 0:n.tracker)==null||u.setCaption("Resetting WordPress data");const l=await r.documentRoot;await r.run({env:{DOCROOT:l},code:`<?php
676
+ `})).text.trim()||null}async function Ir(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function ct(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function mt(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:p="overwrite",targetFolderName:l=""}){const e=n.name.replace(/\.zip$/,""),f=C.joinPaths(await r.documentRoot,"wp-content"),d=C.joinPaths(f,C.randomFilename()),g=C.joinPaths(d,"assets",e);await r.fileExists(g)&&await r.rmdir(d,{recursive:!0}),await r.mkdir(d);try{await gr(r,{zipFile:n,extractToPath:g});let y=await r.listFiles(g,{prependPath:!0});y=y.filter(b=>!b.endsWith("/__MACOSX"));const h=y.length===1&&await r.isDir(y[0]);let E,k="";h?(k=y[0],E=y[0].split("/").pop()):(k=g,E=e),l&&l.length&&(E=l);const T=`${t}/${E}`;if(await r.fileExists(T)){if(!await r.isDir(T))throw new Error(`Cannot install asset ${E} to ${T} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(p==="overwrite")await r.rmdir(T,{recursive:!0});else{if(p==="skip")return{assetFolderPath:T,assetFolderName:E};throw new Error(`Cannot install asset ${E} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${p}`)}}return await r.mv(k,T),{assetFolderPath:T,assetFolderName:E}}finally{await r.rmdir(d,{recursive:!0})}}const kr="PLAYGROUND_ACTIVATION_OPTIONS:",yt=async(r,{pluginData:t,pluginZipFile:n,ifAlreadyInstalled:p,options:l={}},s)=>{n&&(t=n,oe.logger.warn('The "pluginZipFile" option is deprecated. Use "pluginData" instead.'));let e="",f="";const d=()=>l.humanReadableName||f,g=async y=>{if(y.name.toLowerCase().endsWith(".zip"))return!0;const h=new Uint8Array(await y.arrayBuffer(),0,4);return h[0]===80&&h[1]===75&&h[2]===3&&h[3]===4};try{const y=C.joinPaths(await r.documentRoot,"wp-content","plugins"),h="targetFolderName"in l?l.targetFolderName:"";if(t instanceof File)if(await g(t)){const k=t.name.split("/").pop()||"plugin.zip";f=mr(k),s==null||s.tracker.setCaption(`Installing the ${d()} plugin`);const T=await mt(r,{ifAlreadyInstalled:p,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`,targetFolderName:h});e=T.assetFolderPath,f=T.assetFolderName}else if(t.name.endsWith(".php")){const k=C.joinPaths(y,t.name);await hr(r,{path:k,data:t}),e=y,f=t.name}else throw new Error("pluginData looks like a file but does not look like a .zip or .php file.");else if(t){f=t.name,s==null||s.tracker.setCaption(`Installing the ${d()} plugin`);const k=C.joinPaths(y,h||t.name);await Pe.writeFiles(r,k,t.files,{rmRoot:!0}),e=k}if("activate"in l?l.activate:!0){let k;l.activationOptions!==void 0&&(k=await ws(r,e,l.activationOptions));try{await $r(r,{pluginPath:e,pluginName:d()},s)}finally{k&&await bs(r,k)}}}catch(y){if(l.onError==="skip-plugin"){const h=d()||"unknown plugin";oe.logger.warn(`Skipping plugin installation for ${h} after failure: ${y instanceof Error?y.message:String(y)}`);return}throw y}};async function ws(r,t,n){const p=await r.documentRoot,l=await r.run({code:`<?php
677
+ ob_start();
678
+ define('WP_ADMIN', true);
679
+ require_once getenv('DOCROOT') . "/wp-load.php";
680
+ require_once getenv('DOCROOT') . "/wp-admin/includes/plugin.php";
681
+
682
+ $payload_prefix = getenv('ACTIVATION_OPTIONS_PAYLOAD_PREFIX');
683
+ $plugin_path = getenv('PLUGIN_PATH');
684
+ $plugin_file = '';
685
+ if (is_dir($plugin_path)) {
686
+ foreach ((glob(rtrim($plugin_path, '/') . '/*.php') ?: array()) as $file) {
687
+ $info = get_plugin_data($file, false, false);
688
+ if (!empty($info['Name'])) {
689
+ $plugin_file = $file;
690
+ break;
691
+ }
692
+ }
693
+ } else {
694
+ $plugin_dir = rtrim(WP_PLUGIN_DIR, '/');
695
+ $plugin_file = $plugin_path;
696
+ if (strpos($plugin_file, $plugin_dir . '/') !== 0 && file_exists($plugin_dir . '/' . $plugin_file)) {
697
+ $plugin_file = $plugin_dir . '/' . $plugin_file;
698
+ }
699
+ }
700
+
701
+ if (!$plugin_file || !file_exists($plugin_file)) {
702
+ ob_end_clean();
703
+ // Prefix the JSON payload so JS can find it even if plugin bootstrap
704
+ // code prints notices or other output during this request.
705
+ echo $payload_prefix . json_encode(array('error' => 'Could not find plugin file for activation options.'));
706
+ exit;
707
+ }
708
+
709
+ $options_json = getenv('ACTIVATION_OPTIONS_JSON');
710
+ $options = json_decode($options_json ?: '', true);
711
+ if (!is_array($options)) {
712
+ ob_end_clean();
713
+ // Prefix the JSON payload so JS can find it even if plugin bootstrap
714
+ // code prints notices or other output during this request.
715
+ echo $payload_prefix . json_encode(array('error' => 'Could not decode plugin activation options.'));
716
+ exit;
717
+ }
718
+ $option_name = 'blueprint_activation_' . plugin_basename($plugin_file);
719
+ update_option($option_name, $options);
720
+ ob_end_clean();
721
+ // Prefix the JSON payload so JS can find it even if plugin bootstrap
722
+ // code prints notices or other output during this request.
723
+ echo $payload_prefix . json_encode(array('optionName' => $option_name));
724
+ `,env:{DOCROOT:p,PLUGIN_PATH:t,ACTIVATION_OPTIONS_JSON:JSON.stringify(n),ACTIVATION_OPTIONS_PAYLOAD_PREFIX:kr}}),s=vs(l.text);if(s!=null&&s.error)throw new Error(String(s.error));if(!(s!=null&&s.optionName)||typeof s.optionName!="string")throw new Error("Could not determine plugin activation options name.");return s.optionName}async function bs(r,t){await r.run({code:`<?php
725
+ require_once getenv('DOCROOT') . "/wp-load.php";
726
+ delete_option(getenv('OPTION_NAME'));
727
+ `,env:{DOCROOT:await r.documentRoot,OPTION_NAME:t}})}function vs(r){const t=r||"",n=t.lastIndexOf(kr);if(n===-1)return;const p=t.slice(n+kr.length).trimStart().split(/\r?\n/,1)[0].trim();if(p)try{return JSON.parse(p)}catch{throw new Error("Could not parse plugin activation options payload.")}}const ht=async(r,{themeData:t,themeZipFile:n,ifAlreadyInstalled:p,options:l={}},s)=>{n&&(t=n,oe.logger.warn('The "themeZipFile" option is deprecated. Use "themeData" instead.'));const e=l.onError??"throw";let f="";const d=()=>l.humanReadableName||f;try{const g="targetFolderName"in l?l.targetFolderName:"";let y="";if(t instanceof File){const k=t.name.split("/").pop()||"theme.zip";f=mr(k),s==null||s.tracker.setCaption(`Installing the ${d()} theme`),y=(await mt(r,{ifAlreadyInstalled:p,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`,targetFolderName:g})).assetFolderName}else{if(f=t.name,y=g||f,!y||C.basename(y)!==y)throw new Error("Theme folder name must be a single directory name.");s==null||s.tracker.setCaption(`Installing the ${d()} theme`);const k=C.joinPaths(await r.documentRoot,"wp-content","themes",y);let T=!0;if(await r.fileExists(k)){if(!await r.isDir(k))throw new Error(`Cannot install theme ${y} to ${k} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if((p??"overwrite")==="skip")T=!1;else if(p==="error")throw new Error(`Cannot install theme ${y} to ${k} because it already exists and the ifAlreadyInstalled option was set to ${p}`)}T&&await Pe.writeFiles(r,k,t.files,{rmRoot:!0})}("activate"in l?l.activate:!0)&&await jr(r,{themeFolderName:y},s),("importStarterContent"in l?l.importStarterContent:!1)&&await Lr(r,{themeSlug:y},s)}catch(g){if(e==="skip-theme"){const y=d()||"unknown theme";oe.logger.warn(`Skipping theme installation for ${y} after failure: ${g instanceof Error?g.message:String(g)}`);return}throw g}},gt=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)},wt=async(r,t,n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Resetting WordPress data");const p=await r.documentRoot;await r.run({env:{DOCROOT:p},code:`<?php
657
728
  require getenv('DOCROOT') . '/wp-load.php';
658
729
 
659
730
  $GLOBALS['@pdo']->query('DELETE FROM wp_posts WHERE id > 0');
@@ -667,11 +738,11 @@ This will ensure your code works reliably regardless of the current working dire
667
738
 
668
739
  $GLOBALS['@pdo']->query('DELETE FROM wp_commentmeta');
669
740
  $GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
670
- `})},lt=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"}})},ft=async(r,{selfContained:t=!1}={})=>{const n="/tmp/wordpress-playground.zip",l="/tmp/playground-export.json",u=await r.documentRoot,s=D.joinPaths(u,"wp-content"),e=await r.absoluteUrl;await r.writeFile(l,new TextEncoder().encode(JSON.stringify({siteUrl:e})));let p=qr;t&&(p=p.filter(y=>!y.startsWith("themes/twenty")).filter(y=>y!=="mu-plugins/sqlite-database-integration"));const d={[l]:"playground-export.json"};t&&(d[D.joinPaths(u,"wp-config.php")]="wp-config.php");const h=D.phpVars({zipPath:n,wpContentPath:s,documentRoot:u,exceptPaths:p.map(y=>D.joinPaths(u,"wp-content",y)),additionalPaths:d});await Xt(r,`zipDir(${h.wpContentPath}, ${h.zipPath}, array(
671
- 'exclude_paths' => ${h.exceptPaths},
672
- 'zip_root' => ${h.documentRoot},
673
- 'additional_paths' => ${h.additionalPaths}
674
- ));`);const P=await r.readFileAsBuffer(n);return r.unlink(n),r.unlink(l),P},Jt=`<?php
741
+ `})},bt=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"}})},vt=async(r,{selfContained:t=!1}={})=>{const n="/tmp/wordpress-playground.zip",p="/tmp/playground-export.json",l=await r.documentRoot,s=C.joinPaths(l,"wp-content"),e=await r.absoluteUrl;await r.writeFile(p,new TextEncoder().encode(JSON.stringify({siteUrl:e})));let f=Nr;t&&(f=f.filter(h=>!h.startsWith("themes/twenty")).filter(h=>h!=="mu-plugins/sqlite-database-integration"));const d={[p]:"playground-export.json"};t&&(d[C.joinPaths(l,"wp-config.php")]="wp-config.php");const g=C.phpVars({zipPath:n,wpContentPath:s,documentRoot:l,exceptPaths:f.map(h=>C.joinPaths(l,"wp-content",h)),additionalPaths:d});await _s(r,`zipDir(${g.wpContentPath}, ${g.zipPath}, array(
742
+ 'exclude_paths' => ${g.exceptPaths},
743
+ 'zip_root' => ${g.documentRoot},
744
+ 'additional_paths' => ${g.additionalPaths}
745
+ ));`);const y=await r.readFileAsBuffer(n);return r.unlink(n),r.unlink(p),y},Ps=`<?php
675
746
 
676
747
  function zipDir($root, $output, $options = array())
677
748
  {
@@ -731,15 +802,15 @@ function join_paths()
731
802
 
732
803
  return preg_replace('#/+#', '/', join('/', $paths));
733
804
  }
734
- `;async function Xt(r,t){return await r.run({code:Jt+t})}const Kt=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},ut=async(r,{language:t},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Translating");const l=await r.documentRoot;await r.defineConstant("WPLANG",t),await r.run({code:`<?php
735
- require_once ${D.phpVar(l)} . '/wp-load.php';
736
- update_option('WPLANG', ${D.phpVar(t)});
737
- `});const u=(await r.run({code:`<?php
738
- require '${l}/wp-includes/version.php';
805
+ `;async function _s(r,t){return await r.run({code:Ps+t})}const Os=async(r,t)=>{const l=(await(await fetch(`https://api.wordpress.org/translations/core/1.0/?version=${r}`)).json()).translations.find(s=>s.language.toLowerCase()===t.toLowerCase());if(!l)throw new Error(`Failed to get ${t} translation package for WordPress ${r}.`);return l.package},Pt=async(r,{language:t},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Translating");const p=await r.documentRoot;await r.defineConstant("WPLANG",t),await r.run({code:`<?php
806
+ require_once ${C.phpVar(p)} . '/wp-load.php';
807
+ update_option('WPLANG', ${C.phpVar(t)});
808
+ `});const l=(await r.run({code:`<?php
809
+ require '${p}/wp-includes/version.php';
739
810
  echo $wp_version;
740
- `})).text,s=[{url:await Kt(u,t),type:"core"}],p=(await r.run({code:`<?php
741
- require_once('${l}/wp-load.php');
742
- require_once('${l}/wp-admin/includes/plugin.php');
811
+ `})).text,s=[{url:await Os(l,t),type:"core"}],f=(await r.run({code:`<?php
812
+ require_once('${p}/wp-load.php');
813
+ require_once('${p}/wp-admin/includes/plugin.php');
743
814
  echo json_encode(
744
815
  array_values(
745
816
  array_map(
@@ -757,9 +828,9 @@ function join_paths()
757
828
  )
758
829
  )
759
830
  )
760
- );`})).json;for(const{slug:O,version:T}of p)s.push({url:`https://downloads.wordpress.org/translation/plugin/${O}/${T}/${t}.zip`,type:"plugin"});const h=(await r.run({code:`<?php
761
- require_once('${l}/wp-load.php');
762
- require_once('${l}/wp-admin/includes/theme.php');
831
+ );`})).json;for(const{slug:E,version:k}of f)s.push({url:`https://downloads.wordpress.org/translation/plugin/${E}/${k}/${t}.zip`,type:"plugin"});const g=(await r.run({code:`<?php
832
+ require_once('${p}/wp-load.php');
833
+ require_once('${p}/wp-admin/includes/theme.php');
763
834
  echo json_encode(
764
835
  array_values(
765
836
  array_map(
@@ -772,28 +843,28 @@ function join_paths()
772
843
  wp_get_themes()
773
844
  )
774
845
  )
775
- );`})).json;for(const{slug:O,version:T}of h)s.push({url:`https://downloads.wordpress.org/translation/theme/${O}/${T}/${t}.zip`,type:"theme"});await r.isDir(`${l}/wp-content/languages/plugins`)||await r.mkdir(`${l}/wp-content/languages/plugins`),await r.isDir(`${l}/wp-content/languages/themes`)||await r.mkdir(`${l}/wp-content/languages/themes`);const P=new D.Semaphore({concurrency:5}),y=s.map(({url:O,type:T})=>P.run(async()=>{try{const j=await fetch(O);if(!j.ok)throw new Error(`Failed to download translations for ${T}: ${j.statusText}`);let w=`${l}/wp-content/languages`;T==="plugin"?w+="/plugins":T==="theme"&&(w+="/themes"),await vr.unzipFile(r,new File([await j.arrayBuffer()],`${t}-${T}.zip`),w)}catch(j){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/.`);oe.logger.warn(`Error downloading translations for ${T}: ${j}`)}}));await Promise.all(y)},es=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:_r,activateTheme:kr,cp:Gr,defineSiteUrl:$r,defineWpConfigConsts:fr,enableMultisite:Yr,exportWXR:st,importThemeStarterContent:jr,importWordPressFiles:tt,importWxr:rt,installPlugin:ot,installTheme:at,login:nt,mkdir:Xr,mv:Jr,request:Hr,resetData:pt,rm:pr,rmdir:Kr,runPHP:Mr,runPHPWithOptions:Vr,runSql:zr,runWpInstallationWizard:lt,setSiteLanguage:ut,setSiteOptions:Or,unzip:dr,updateUserMeta:Zr,wpCLI:Er,writeFile:ur,writeFiles:et,zipWpContent:ft},Symbol.toStringTag,{value:"Module"})),rs={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.
846
+ );`})).json;for(const{slug:E,version:k}of g)s.push({url:`https://downloads.wordpress.org/translation/theme/${E}/${k}/${t}.zip`,type:"theme"});await r.isDir(`${p}/wp-content/languages/plugins`)||await r.mkdir(`${p}/wp-content/languages/plugins`),await r.isDir(`${p}/wp-content/languages/themes`)||await r.mkdir(`${p}/wp-content/languages/themes`);const y=new C.Semaphore({concurrency:5}),h=s.map(({url:E,type:k})=>y.run(async()=>{try{const T=await fetch(E);if(!T.ok)throw new Error(`Failed to download translations for ${k}: ${T.statusText}`);let b=`${p}/wp-content/languages`;k==="plugin"?b+="/plugins":k==="theme"&&(b+="/themes"),await Me.unzipFile(r,new File([await T.arrayBuffer()],`${t}-${k}.zip`),b)}catch(T){if(k==="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/.`);oe.logger.warn(`Error downloading translations for ${k}: ${T}`)}}));await Promise.all(h)},ks=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:$r,activateTheme:jr,cp:nt,defineSiteUrl:Rr,defineWpConfigConsts:yr,enableMultisite:ot,exportWXR:ct,importThemeStarterContent:Lr,importWordPressFiles:dt,importWxr:ut,installPlugin:yt,installTheme:ht,login:gt,mkdir:pt,mv:at,request:tt,resetData:wt,rm:dr,rmdir:lt,runPHP:Kr,runPHPWithOptions:et,runSql:rt,runWpInstallationWizard:bt,setSiteLanguage:Pt,setSiteOptions:Ar,unzip:gr,updateUserMeta:st,wpCLI:Sr,writeFile:hr,writeFiles:ft,zipWpContent:vt},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.
776
847
 
777
- Note: PHP 7.2 and 7.3 are deprecated and will be automatically upgraded to 7.4.`},wp:{anyOf:[{type:"string"},{type:"string",const:"latest"},{type:"boolean",const:!1}],description:"The preferred WordPress version to use, or `false` to boot a PHP-only Playground without downloading or installing WordPress. If not specified, the latest supported version will be used.\n\nWhen set to `false`, WordPress-specific Blueprint fields (`plugins`, `siteOptions`, `login`, and WordPress-only steps) are rejected at compile time."}},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"}}},ts={additionalProperties:{type:["string","boolean","number"]}},dt=Object.prototype.hasOwnProperty,ss={enum:["8.5","8.4","8.3","8.2","8.1","8.0","7.4"]},is={enum:["5.2"]};function Ie(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;const p=e;let d=!1;const h=e;if(typeof r!="string"){const y={instancePath:t,schemaPath:"#/definitions/PHPNextVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[y]:s.push(y),e++}if(r!=="next"){const y={instancePath:t,schemaPath:"#/definitions/PHPNextVersion/const",keyword:"const",params:{allowedValue:"next"},message:"must be equal to constant"};s===null?s=[y]:s.push(y),e++}var P=h===e;if(d=d||P,!d){const y=e;if(typeof r!="string"){const T={instancePath:t,schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[T]:s.push(T),e++}if(!(r==="8.5"||r==="8.4"||r==="8.3"||r==="8.2"||r==="8.1"||r==="8.0"||r==="7.4")){const T={instancePath:t,schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:ss.enum},message:"must be equal to one of the allowed values"};s===null?s=[T]:s.push(T),e++}var P=y===e;if(d=d||P,!d){const T=e;if(typeof r!="string"){const w={instancePath:t,schemaPath:"#/definitions/LegacyPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}if(r!=="5.2"){const w={instancePath:t,schemaPath:"#/definitions/LegacyPHPVersion/enum",keyword:"enum",params:{allowedValues:is.enum},message:"must be equal to one of the allowed values"};s===null?s=[w]:s.push(w),e++}var P=T===e;d=d||P}}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}function We(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;const p=e;let d=!1;const h=e;Ie(r,{instancePath:t,parentData:n,parentDataProperty:l,rootData:u})||(s=s===null?Ie.errors:s.concat(Ie.errors),e=s.length);var P=h===e;if(d=d||P,!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 P=y===e;if(d=d||P,!d){const T=e;if(typeof r!="string"){const w={instancePath:t,schemaPath:"#/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}if(r!=="7.3"){const w={instancePath:t,schemaPath:"#/anyOf/2/const",keyword:"const",params:{allowedValue:"7.3"},message:"must be equal to constant"};s===null?s=[w]:s.push(w),e++}var P=T===e;d=d||P}}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++,We.errors=s,!1}return We.errors=s,e===0}const hr={validate:J},os={enum:["branch","tag","commit","refname"]};function de(r,{instancePath:t="",parentData:n,parentDataProperty:l,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 h in r)if(!(h==="resource"||h==="url"||h==="ref"||h==="refType"||h==="path"||h===".git"))return de.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"}],!1;{if(r.resource!==void 0){let h=r.resource;const P=e;if(typeof h!="string")return de.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(h!=="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=P===e}else var p=!0;if(p){if(r.url!==void 0){const h=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=h===e}else var p=!0;if(p){if(r.ref!==void 0){const h=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=h===e}else var p=!0;if(p){if(r.refType!==void 0){let h=r.refType;const P=e;if(typeof h!="string")return de.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(h==="branch"||h==="tag"||h==="commit"||h==="refname"))return de.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/enum",keyword:"enum",params:{allowedValues:os.enum},message:"must be equal to one of the allowed values"}],!1;var p=P===e}else var p=!0;if(p){if(r.path!==void 0){const h=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=h===e}else var p=!0;if(p)if(r[".git"]!==void 0){const h=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=h===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 as={additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]}},gr={validate:xe};function xe(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r))for(const h in r){let P=r[h];const y=e,O=e;let T=!1;const j=e;gr.validate(P,{instancePath:t+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:h,rootData:u})||(s=s===null?gr.validate.errors:s.concat(gr.validate.errors),e=s.length);var p=j===e;if(T=T||p,!T){const w=e;if(!(P&&typeof P=="object"&&!Array.isArray(P))&&typeof P!="string"){const Y={instancePath:t+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:as.additionalProperties.anyOf[1].type},message:"must be object,string"};s===null?s=[Y]:s.push(Y),e++}var p=w===e;T=T||p}if(T)e=O,s!==null&&(O?s.length=O:s=null);else{const w={instancePath:t+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[w]:s.push(w),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:l,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 h=e;for(const P in r)if(!(P==="resource"||P==="files"||P==="name"))return $e.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(h===e){if(r.resource!==void 0){let P=r.resource;const y=e;if(typeof P!="string")return $e.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(P!=="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 P=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=P===e}else var p=!0;if(p)if(r.name!==void 0){const P=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=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:l,rootData:u=r}={}){let s=null,e=0;const p=e;let d=!1;const h=e;de(r,{instancePath:t,parentData:n,parentDataProperty:l,rootData:u})||(s=s===null?de.errors:s.concat(de.errors),e=s.length);var P=h===e;if(d=d||P,!d){const y=e;$e(r,{instancePath:t,parentData:n,parentDataProperty:l,rootData:u})||(s=s===null?$e.errors:s.concat($e.errors),e=s.length);var P=y===e;d=d||P}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 ve(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let h;if(r.resource===void 0&&(h="resource")||r.inner===void 0&&(h="inner"))return ve.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:h},message:"must have required property '"+h+"'"}],!1;{const P=e;for(const y in r)if(!(y==="resource"||y==="inner"||y==="name"))return ve.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"}],!1;if(P===e){if(r.resource!==void 0){let y=r.resource;const O=e;if(typeof y!="string")return ve.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(y!=="zip")return ve.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"zip"},message:"must be equal to constant"}],!1;var p=O===e}else var p=!0;if(p){if(r.inner!==void 0){let y=r.inner;const O=e,T=e;let j=!1;const w=e;hr.validate(y,{instancePath:t+"/inner",parentData:r,parentDataProperty:"inner",rootData:u})||(s=s===null?hr.validate.errors:s.concat(hr.validate.errors),e=s.length);var d=w===e;if(j=j||d,!j){const Y=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=Y===e;j=j||d}if(j)e=T,s!==null&&(T?s.length=T:s=null);else{const Y={instancePath:t+"/inner",schemaPath:"#/properties/inner/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[Y]:s.push(Y),e++,ve.errors=s,!1}var p=O===e}else var p=!0;if(p)if(r.name!==void 0){const y=e;if(typeof r.name!="string")return ve.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 ve.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ve.errors=s,e===0}function J(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;const p=e;let d=!1;const h=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let z;if(r.resource===void 0&&(z="resource")||r.path===void 0&&(z="path")){const H={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:z},message:"must have required property '"+z+"'"};s===null?s=[H]:s.push(H),e++}else{const H=e;for(const Z in r)if(!(Z==="resource"||Z==="path")){const b={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Z},message:"must NOT have additional properties"};s===null?s=[b]:s.push(b),e++;break}if(H===e){if(r.resource!==void 0){let Z=r.resource;const b=e;if(typeof Z!="string"){const $={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[$]:s.push($),e++}if(Z!=="vfs"){const $={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};s===null?s=[$]:s.push($),e++}var y=b===e}else var y=!0;if(y)if(r.path!==void 0){const Z=e;if(typeof r.path!="string"){const $={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[$]:s.push($),e++}var y=Z===e}else var y=!0}}}else{const z={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[z]:s.push(z),e++}var O=h===e;if(d=d||O,!d){const z=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let b;if(r.resource===void 0&&(b="resource")||r.name===void 0&&(b="name")||r.contents===void 0&&(b="contents")){const $={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"};s===null?s=[$]:s.push($),e++}else{const $=e;for(const v in r)if(!(v==="resource"||v==="name"||v==="contents")){const E={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};s===null?s=[E]:s.push(E),e++;break}if($===e){if(r.resource!==void 0){let v=r.resource;const E=e;if(typeof v!="string"){const _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[_]:s.push(_),e++}if(v!=="literal"){const _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};s===null?s=[_]:s.push(_),e++}var T=E===e}else var T=!0;if(T){if(r.name!==void 0){const v=e;if(typeof r.name!="string"){const _={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[_]:s.push(_),e++}var T=v===e}else var T=!0;if(T)if(r.contents!==void 0){let v=r.contents;const E=e,_=e;let m=!1;const g=e;if(typeof v!="string"){const k={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[k]:s.push(k),e++}var j=g===e;if(m=m||j,!m){const k=e;if(e===k)if(v&&typeof v=="object"&&!Array.isArray(v)){let N;if(v.BYTES_PER_ELEMENT===void 0&&(N="BYTES_PER_ELEMENT")||v.buffer===void 0&&(N="buffer")||v.byteLength===void 0&&(N="byteLength")||v.byteOffset===void 0&&(N="byteOffset")||v.length===void 0&&(N="length")){const L={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};s===null?s=[L]:s.push(L),e++}else{const L=e;for(const x in v)if(!(x==="BYTES_PER_ELEMENT"||x==="buffer"||x==="byteLength"||x==="byteOffset"||x==="length")){let F=v[x];const K=e;if(!(typeof F=="number"&&isFinite(F))){const S={instancePath:t+"/contents/"+x.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 w=K===e;if(!w)break}if(L===e){if(v.BYTES_PER_ELEMENT!==void 0){let x=v.BYTES_PER_ELEMENT;const F=e;if(!(typeof x=="number"&&isFinite(x))){const K={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=[K]:s.push(K),e++}var B=F===e}else var B=!0;if(B){if(v.buffer!==void 0){let x=v.buffer;const F=e;if(e===F)if(x&&typeof x=="object"&&!Array.isArray(x)){let S;if(x.byteLength===void 0&&(S="byteLength")){const M={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=[M]:s.push(M),e++}else{const M=e;for(const Q in x)if(Q!=="byteLength"){const W={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Q},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if(M===e&&x.byteLength!==void 0){let Q=x.byteLength;if(!(typeof Q=="number"&&isFinite(Q))){const W={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=[W]:s.push(W),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 B=F===e}else var B=!0;if(B){if(v.byteLength!==void 0){let x=v.byteLength;const F=e;if(!(typeof x=="number"&&isFinite(x))){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 B=F===e}else var B=!0;if(B){if(v.byteOffset!==void 0){let x=v.byteOffset;const F=e;if(!(typeof x=="number"&&isFinite(x))){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 B=F===e}else var B=!0;if(B)if(v.length!==void 0){let x=v.length;const F=e;if(!(typeof x=="number"&&isFinite(x))){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 B=F===e}else var B=!0}}}}}}else{const N={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[N]:s.push(N),e++}var j=k===e;m=m||j}if(m)e=_,s!==null&&(_?s.length=_:s=null);else{const k={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[k]:s.push(k),e++}var T=E===e}else var T=!0}}}}else{const b={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[b]:s.push(b),e++}var O=z===e;if(d=d||O,!d){const b=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let E;if(r.resource===void 0&&(E="resource")||r.slug===void 0&&(E="slug")){const _={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:E},message:"must have required property '"+E+"'"};s===null?s=[_]:s.push(_),e++}else{const _=e;for(const m in r)if(!(m==="resource"||m==="slug")){const g={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};s===null?s=[g]:s.push(g),e++;break}if(_===e){if(r.resource!==void 0){let m=r.resource;const g=e;if(typeof m!="string"){const I={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[I]:s.push(I),e++}if(m!=="wordpress.org/themes"){const I={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=[I]:s.push(I),e++}var Y=g===e}else var Y=!0;if(Y)if(r.slug!==void 0){const m=e;if(typeof r.slug!="string"){const I={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[I]:s.push(I),e++}var Y=m===e}else var Y=!0}}}else{const E={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[E]:s.push(E),e++}var O=b===e;if(d=d||O,!d){const E=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let g;if(r.resource===void 0&&(g="resource")||r.slug===void 0&&(g="slug")){const I={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"};s===null?s=[I]:s.push(I),e++}else{const I=e;for(const k in r)if(!(k==="resource"||k==="slug")){const U={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"};s===null?s=[U]:s.push(U),e++;break}if(I===e){if(r.resource!==void 0){let k=r.resource;const U=e;if(typeof k!="string"){const N={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[N]:s.push(N),e++}if(k!=="wordpress.org/plugins"){const N={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=[N]:s.push(N),e++}var X=U===e}else var X=!0;if(X)if(r.slug!==void 0){const k=e;if(typeof r.slug!="string"){const N={instancePath:t+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[N]:s.push(N),e++}var X=k===e}else var X=!0}}}else{const g={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[g]:s.push(g),e++}var O=E===e;if(d=d||O,!d){const g=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 N={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:U},message:"must have required property '"+U+"'"};s===null?s=[N]:s.push(N),e++}else{const N=e;for(const L in r)if(!(L==="resource"||L==="url"||L==="caption")){const x={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"};s===null?s=[x]:s.push(x),e++;break}if(N===e){if(r.resource!==void 0){let L=r.resource;const x=e;if(typeof L!="string"){const F={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}if(L!=="url"){const F={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};s===null?s=[F]:s.push(F),e++}var A=x===e}else var A=!0;if(A){if(r.url!==void 0){const L=e;if(typeof r.url!="string"){const F={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var A=L===e}else var A=!0;if(A)if(r.caption!==void 0){const L=e;if(typeof r.caption!="string"){const F={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var A=L===e}else var A=!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 O=g===e;if(d=d||O,!d){const U=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let x;if(r.resource===void 0&&(x="resource")||r.path===void 0&&(x="path")){const F={instancePath:t,schemaPath:"#/definitions/BundledReference/required",keyword:"required",params:{missingProperty:x},message:"must have required property '"+x+"'"};s===null?s=[F]:s.push(F),e++}else{const F=e;for(const K in r)if(!(K==="resource"||K==="path")){const S={instancePath:t,schemaPath:"#/definitions/BundledReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:K},message:"must NOT have additional properties"};s===null?s=[S]:s.push(S),e++;break}if(F===e){if(r.resource!==void 0){let K=r.resource;const S=e;if(typeof K!="string"){const M={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[M]:s.push(M),e++}if(K!=="bundled"){const M={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/const",keyword:"const",params:{allowedValue:"bundled"},message:"must be equal to constant"};s===null?s=[M]:s.push(M),e++}var te=S===e}else var te=!0;if(te)if(r.path!==void 0){const K=e;if(typeof r.path!="string"){const M={instancePath:t+"/path",schemaPath:"#/definitions/BundledReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[M]:s.push(M),e++}var te=K===e}else var te=!0}}}else{const x={instancePath:t,schemaPath:"#/definitions/BundledReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[x]:s.push(x),e++}var O=U===e;if(d=d||O,!d){const x=e;ve(r,{instancePath:t,parentData:n,parentDataProperty:l,rootData:u})||(s=s===null?ve.errors:s.concat(ve.errors),e=s.length);var O=x===e;d=d||O}}}}}}if(d)e=p,s!==null&&(p?s.length=p:s=null);else{const z={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[z]:s.push(z),e++,J.errors=s,!1}return J.errors=s,e===0}const or={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:
848
+ Note: PHP 7.2 and 7.3 are deprecated and will be automatically upgraded to 7.4.`},wp:{anyOf:[{type:"string"},{type:"string",const:"latest"},{type:"boolean",const:!1}],description:"The preferred WordPress version to use, or `false` to boot a PHP-only Playground without downloading or installing WordPress. If not specified, the latest supported version will be used.\n\nWhen set to `false`, WordPress-specific Blueprint fields (`plugins`, `siteOptions`, `login`, and WordPress-only steps) are rejected at compile time."}},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"}}},Ts={additionalProperties:{type:["string","boolean","number"]}},_t=Object.prototype.hasOwnProperty,$s={enum:["8.5","8.4","8.3","8.2","8.1","8.0","7.4"]},js={enum:["5.2"]};function Ve(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;const f=e;let d=!1;const g=e;if(typeof r!="string"){const h={instancePath:t,schemaPath:"#/definitions/PHPNextVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[h]:s.push(h),e++}if(r!=="next"){const h={instancePath:t,schemaPath:"#/definitions/PHPNextVersion/const",keyword:"const",params:{allowedValue:"next"},message:"must be equal to constant"};s===null?s=[h]:s.push(h),e++}var y=g===e;if(d=d||y,!d){const h=e;if(typeof r!="string"){const k={instancePath:t,schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[k]:s.push(k),e++}if(!(r==="8.5"||r==="8.4"||r==="8.3"||r==="8.2"||r==="8.1"||r==="8.0"||r==="7.4")){const k={instancePath:t,schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:$s.enum},message:"must be equal to one of the allowed values"};s===null?s=[k]:s.push(k),e++}var y=h===e;if(d=d||y,!d){const k=e;if(typeof r!="string"){const b={instancePath:t,schemaPath:"#/definitions/LegacyPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[b]:s.push(b),e++}if(r!=="5.2"){const b={instancePath:t,schemaPath:"#/definitions/LegacyPHPVersion/enum",keyword:"enum",params:{allowedValues:js.enum},message:"must be equal to one of the allowed values"};s===null?s=[b]:s.push(b),e++}var y=k===e;d=d||y}}if(d)e=f,s!==null&&(f?s.length=f: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++,Ve.errors=s,!1}return Ve.errors=s,e===0}function Be(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;const f=e;let d=!1;const g=e;Ve(r,{instancePath:t,parentData:n,parentDataProperty:p,rootData:l})||(s=s===null?Ve.errors:s.concat(Ve.errors),e=s.length);var y=g===e;if(d=d||y,!d){const h=e;if(typeof r!="string"){const k={instancePath:t,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[k]:s.push(k),e++}if(r!=="7.2"){const k={instancePath:t,schemaPath:"#/anyOf/1/const",keyword:"const",params:{allowedValue:"7.2"},message:"must be equal to constant"};s===null?s=[k]:s.push(k),e++}var y=h===e;if(d=d||y,!d){const k=e;if(typeof r!="string"){const b={instancePath:t,schemaPath:"#/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[b]:s.push(b),e++}if(r!=="7.3"){const b={instancePath:t,schemaPath:"#/anyOf/2/const",keyword:"const",params:{allowedValue:"7.3"},message:"must be equal to constant"};s===null?s=[b]:s.push(b),e++}var y=k===e;d=d||y}}if(d)e=f,s!==null&&(f?s.length=f: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++,Be.errors=s,!1}return Be.errors=s,e===0}const Pr={validate:ee},As={enum:["branch","tag","commit","refname"]};function de(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=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 y=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 f=y===e}else var f=!0;if(f){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 f=g===e}else var f=!0;if(f){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 f=g===e}else var f=!0;if(f){if(r.refType!==void 0){let g=r.refType;const y=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:As.enum},message:"must be equal to one of the allowed values"}],!1;var f=y===e}else var f=!0;if(f){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 f=g===e}else var f=!0;if(f)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 f=g===e}else var f=!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 qs={additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]}},_r={validate:Ie};function Ie(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r))for(const g in r){let y=r[g];const h=e,E=e;let k=!1;const T=e;_r.validate(y,{instancePath:t+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:g,rootData:l})||(s=s===null?_r.validate.errors:s.concat(_r.validate.errors),e=s.length);var f=T===e;if(k=k||f,!k){const b=e;if(!(y&&typeof y=="object"&&!Array.isArray(y))&&typeof y!="string"){const X={instancePath:t+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:qs.additionalProperties.anyOf[1].type},message:"must be object,string"};s===null?s=[X]:s.push(X),e++}var f=b===e;k=k||f}if(k)e=E,s!==null&&(E?s.length=E:s=null);else{const b={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=[b]:s.push(b),e++,Ie.errors=s,!1}var d=h===e;if(!d)break}else return Ie.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Ie.errors=s,e===0}function je(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=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 je.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const g=e;for(const y in r)if(!(y==="resource"||y==="files"||y==="name"))return je.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"}],!1;if(g===e){if(r.resource!==void 0){let y=r.resource;const h=e;if(typeof y!="string")return je.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(y!=="literal:directory")return je.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var f=h===e}else var f=!0;if(f){if(r.files!==void 0){const y=e;Ie(r.files,{instancePath:t+"/files",parentData:r,parentDataProperty:"files",rootData:l})||(s=s===null?Ie.errors:s.concat(Ie.errors),e=s.length);var f=y===e}else var f=!0;if(f)if(r.name!==void 0){const y=e;if(typeof r.name!="string")return je.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=y===e}else var f=!0}}}}else return je.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return je.errors=s,e===0}function ce(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;const f=e;let d=!1;const g=e;de(r,{instancePath:t,parentData:n,parentDataProperty:p,rootData:l})||(s=s===null?de.errors:s.concat(de.errors),e=s.length);var y=g===e;if(d=d||y,!d){const h=e;je(r,{instancePath:t,parentData:n,parentDataProperty:p,rootData:l})||(s=s===null?je.errors:s.concat(je.errors),e=s.length);var y=h===e;d=d||y}if(d)e=f,s!==null&&(f?s.length=f: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 ve(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=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 ve.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"}],!1;{const y=e;for(const h in r)if(!(h==="resource"||h==="inner"||h==="name"))return ve.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"}],!1;if(y===e){if(r.resource!==void 0){let h=r.resource;const E=e;if(typeof h!="string")return ve.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(h!=="zip")return ve.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"zip"},message:"must be equal to constant"}],!1;var f=E===e}else var f=!0;if(f){if(r.inner!==void 0){let h=r.inner;const E=e,k=e;let T=!1;const b=e;Pr.validate(h,{instancePath:t+"/inner",parentData:r,parentDataProperty:"inner",rootData:l})||(s=s===null?Pr.validate.errors:s.concat(Pr.validate.errors),e=s.length);var d=b===e;if(T=T||d,!T){const X=e;ce(h,{instancePath:t+"/inner",parentData:r,parentDataProperty:"inner",rootData:l})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var d=X===e;T=T||d}if(T)e=k,s!==null&&(k?s.length=k:s=null);else{const X={instancePath:t+"/inner",schemaPath:"#/properties/inner/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,ve.errors=s,!1}var f=E===e}else var f=!0;if(f)if(r.name!==void 0){const h=e;if(typeof r.name!="string")return ve.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=h===e}else var f=!0}}}}else return ve.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ve.errors=s,e===0}function ee(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;const f=e;let d=!1;const g=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let Z;if(r.resource===void 0&&(Z="resource")||r.path===void 0&&(Z="path")){const Q={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:Z},message:"must have required property '"+Z+"'"};s===null?s=[Q]:s.push(Q),e++}else{const Q=e;for(const G in r)if(!(G==="resource"||G==="path")){const v={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:G},message:"must NOT have additional properties"};s===null?s=[v]:s.push(v),e++;break}if(Q===e){if(r.resource!==void 0){let G=r.resource;const v=e;if(typeof G!="string"){const j={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[j]:s.push(j),e++}if(G!=="vfs"){const j={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};s===null?s=[j]:s.push(j),e++}var h=v===e}else var h=!0;if(h)if(r.path!==void 0){const G=e;if(typeof r.path!="string"){const j={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[j]:s.push(j),e++}var h=G===e}else var h=!0}}}else{const Z={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[Z]:s.push(Z),e++}var E=g===e;if(d=d||E,!d){const Z=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let v;if(r.resource===void 0&&(v="resource")||r.name===void 0&&(v="name")||r.contents===void 0&&(v="contents")){const j={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"};s===null?s=[j]:s.push(j),e++}else{const j=e;for(const P in r)if(!(P==="resource"||P==="name"||P==="contents")){const $={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};s===null?s=[$]:s.push($),e++;break}if(j===e){if(r.resource!==void 0){let P=r.resource;const $=e;if(typeof P!="string"){const _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[_]:s.push(_),e++}if(P!=="literal"){const _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};s===null?s=[_]:s.push(_),e++}var k=$===e}else var k=!0;if(k){if(r.name!==void 0){const P=e;if(typeof r.name!="string"){const _={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[_]:s.push(_),e++}var k=P===e}else var k=!0;if(k)if(r.contents!==void 0){let P=r.contents;const $=e,_=e;let m=!1;const w=e;if(typeof P!="string"){const O={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[O]:s.push(O),e++}var T=w===e;if(m=m||T,!m){const O=e;if(e===O)if(P&&typeof P=="object"&&!Array.isArray(P)){let F;if(P.BYTES_PER_ELEMENT===void 0&&(F="BYTES_PER_ELEMENT")||P.buffer===void 0&&(F="buffer")||P.byteLength===void 0&&(F="byteLength")||P.byteOffset===void 0&&(F="byteOffset")||P.length===void 0&&(F="length")){const L={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=[L]:s.push(L),e++}else{const L=e;for(const x in P)if(!(x==="BYTES_PER_ELEMENT"||x==="buffer"||x==="byteLength"||x==="byteOffset"||x==="length")){let N=P[x];const te=e;if(!(typeof N=="number"&&isFinite(N))){const S={instancePath:t+"/contents/"+x.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 b=te===e;if(!b)break}if(L===e){if(P.BYTES_PER_ELEMENT!==void 0){let x=P.BYTES_PER_ELEMENT;const N=e;if(!(typeof x=="number"&&isFinite(x))){const te={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=[te]:s.push(te),e++}var M=N===e}else var M=!0;if(M){if(P.buffer!==void 0){let x=P.buffer;const N=e;if(e===N)if(x&&typeof x=="object"&&!Array.isArray(x)){let S;if(x.byteLength===void 0&&(S="byteLength")){const z={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=[z]:s.push(z),e++}else{const z=e;for(const J in x)if(J!=="byteLength"){const W={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:J},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if(z===e&&x.byteLength!==void 0){let J=x.byteLength;if(!(typeof J=="number"&&isFinite(J))){const W={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=[W]:s.push(W),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=N===e}else var M=!0;if(M){if(P.byteLength!==void 0){let x=P.byteLength;const N=e;if(!(typeof x=="number"&&isFinite(x))){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=N===e}else var M=!0;if(M){if(P.byteOffset!==void 0){let x=P.byteOffset;const N=e;if(!(typeof x=="number"&&isFinite(x))){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=N===e}else var M=!0;if(M)if(P.length!==void 0){let x=P.length;const N=e;if(!(typeof x=="number"&&isFinite(x))){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=N===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 T=O===e;m=m||T}if(m)e=_,s!==null&&(_?s.length=_:s=null);else{const O={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[O]:s.push(O),e++}var k=$===e}else var k=!0}}}}else{const v={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[v]:s.push(v),e++}var E=Z===e;if(d=d||E,!d){const v=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let $;if(r.resource===void 0&&($="resource")||r.slug===void 0&&($="slug")){const _={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"};s===null?s=[_]:s.push(_),e++}else{const _=e;for(const m in r)if(!(m==="resource"||m==="slug")){const w={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};s===null?s=[w]:s.push(w),e++;break}if(_===e){if(r.resource!==void 0){let m=r.resource;const w=e;if(typeof m!="string"){const U={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[U]:s.push(U),e++}if(m!=="wordpress.org/themes"){const U={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=[U]:s.push(U),e++}var X=w===e}else var X=!0;if(X)if(r.slug!==void 0){const m=e;if(typeof r.slug!="string"){const U={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[U]:s.push(U),e++}var X=m===e}else var X=!0}}}else{const $={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[$]:s.push($),e++}var E=v===e;if(d=d||E,!d){const $=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let w;if(r.resource===void 0&&(w="resource")||r.slug===void 0&&(w="slug")){const U={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"};s===null?s=[U]:s.push(U),e++}else{const U=e;for(const O in r)if(!(O==="resource"||O==="slug")){const D={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"};s===null?s=[D]:s.push(D),e++;break}if(U===e){if(r.resource!==void 0){let O=r.resource;const D=e;if(typeof O!="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(O!=="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 re=D===e}else var re=!0;if(re)if(r.slug!==void 0){const O=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 re=O===e}else var re=!0}}}else{const w={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[w]:s.push(w),e++}var E=$===e;if(d=d||E,!d){const w=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let D;if(r.resource===void 0&&(D="resource")||r.url===void 0&&(D="url")){const F={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:D},message:"must have required property '"+D+"'"};s===null?s=[F]:s.push(F),e++}else{const F=e;for(const L in r)if(!(L==="resource"||L==="url"||L==="caption")){const x={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"};s===null?s=[x]:s.push(x),e++;break}if(F===e){if(r.resource!==void 0){let L=r.resource;const x=e;if(typeof L!="string"){const N={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[N]:s.push(N),e++}if(L!=="url"){const N={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};s===null?s=[N]:s.push(N),e++}var q=x===e}else var q=!0;if(q){if(r.url!==void 0){const L=e;if(typeof r.url!="string"){const N={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[N]:s.push(N),e++}var q=L===e}else var q=!0;if(q)if(r.caption!==void 0){const L=e;if(typeof r.caption!="string"){const N={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[N]:s.push(N),e++}var q=L===e}else var q=!0}}}}else{const D={instancePath:t,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[D]:s.push(D),e++}var E=w===e;if(d=d||E,!d){const D=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let x;if(r.resource===void 0&&(x="resource")||r.path===void 0&&(x="path")){const N={instancePath:t,schemaPath:"#/definitions/BundledReference/required",keyword:"required",params:{missingProperty:x},message:"must have required property '"+x+"'"};s===null?s=[N]:s.push(N),e++}else{const N=e;for(const te in r)if(!(te==="resource"||te==="path")){const S={instancePath:t,schemaPath:"#/definitions/BundledReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:te},message:"must NOT have additional properties"};s===null?s=[S]:s.push(S),e++;break}if(N===e){if(r.resource!==void 0){let te=r.resource;const S=e;if(typeof te!="string"){const z={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}if(te!=="bundled"){const z={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/const",keyword:"const",params:{allowedValue:"bundled"},message:"must be equal to constant"};s===null?s=[z]:s.push(z),e++}var B=S===e}else var B=!0;if(B)if(r.path!==void 0){const te=e;if(typeof r.path!="string"){const z={instancePath:t+"/path",schemaPath:"#/definitions/BundledReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}var B=te===e}else var B=!0}}}else{const x={instancePath:t,schemaPath:"#/definitions/BundledReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[x]:s.push(x),e++}var E=D===e;if(d=d||E,!d){const x=e;ve(r,{instancePath:t,parentData:n,parentDataProperty:p,rootData:l})||(s=s===null?ve.errors:s.concat(ve.errors),e=s.length);var E=x===e;d=d||E}}}}}}if(d)e=f,s!==null&&(f?s.length=f:s=null);else{const Z={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[Z]:s.push(Z),e++,ee.errors=s,!1}return ee.errors=s,e===0}const lr={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:
778
849
 
779
850
  - 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.
780
851
 
781
852
  - 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.
782
853
  This option is only kept in here to avoid breaking Blueprint schema validation
783
- 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.
784
- 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"]}]},ct={enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ge(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let Y;if(r.url===void 0&&(Y="url"))return ge.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:Y},message:"must have required property '"+Y+"'"}],!1;{const X=e;for(const A in r)if(!(A==="method"||A==="url"||A==="headers"||A==="body"))return ge.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:A},message:"must NOT have additional properties"}],!1;if(X===e){if(r.method!==void 0){let A=r.method;const te=e;if(typeof A!="string")return ge.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(A==="GET"||A==="POST"||A==="HEAD"||A==="OPTIONS"||A==="PATCH"||A==="PUT"||A==="DELETE"))return ge.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:ct.enum},message:"must be equal to one of the allowed values"}],!1;var p=te===e}else var p=!0;if(p){if(r.url!==void 0){const A=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=A===e}else var p=!0;if(p){if(r.headers!==void 0){let A=r.headers;const te=e;if(e===e)if(A&&typeof A=="object"&&!Array.isArray(A))for(const Z in A){const b=e;if(typeof A[Z]!="string")return ge.errors=[{instancePath:t+"/headers/"+Z.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=b===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=te===e}else var p=!0;if(p)if(r.body!==void 0){let A=r.body;const te=e,z=e;let H=!1;const Z=e;if(typeof A!="string"){const $={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[$]:s.push($),e++}var h=Z===e;if(H=H||h,!H){const $=e;if(e===$)if(A&&typeof A=="object"&&!Array.isArray(A)){let E;if(A.BYTES_PER_ELEMENT===void 0&&(E="BYTES_PER_ELEMENT")||A.buffer===void 0&&(E="buffer")||A.byteLength===void 0&&(E="byteLength")||A.byteOffset===void 0&&(E="byteOffset")||A.length===void 0&&(E="length")){const _={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:E},message:"must have required property '"+E+"'"};s===null?s=[_]:s.push(_),e++}else{const _=e;for(const m in A)if(!(m==="BYTES_PER_ELEMENT"||m==="buffer"||m==="byteLength"||m==="byteOffset"||m==="length")){let g=A[m];const I=e;if(!(typeof g=="number"&&isFinite(g))){const k={instancePath:t+"/body/"+m.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=[k]:s.push(k),e++}var P=I===e;if(!P)break}if(_===e){if(A.BYTES_PER_ELEMENT!==void 0){let m=A.BYTES_PER_ELEMENT;const g=e;if(!(typeof m=="number"&&isFinite(m))){const I={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=[I]:s.push(I),e++}var y=g===e}else var y=!0;if(y){if(A.buffer!==void 0){let m=A.buffer;const g=e;if(e===g)if(m&&typeof m=="object"&&!Array.isArray(m)){let k;if(m.byteLength===void 0&&(k="byteLength")){const U={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:k},message:"must have required property '"+k+"'"};s===null?s=[U]:s.push(U),e++}else{const U=e;for(const N in m)if(N!=="byteLength"){const L={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};s===null?s=[L]:s.push(L),e++;break}if(U===e&&m.byteLength!==void 0){let N=m.byteLength;if(!(typeof N=="number"&&isFinite(N))){const L={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=[L]:s.push(L),e++}}}}else{const k={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[k]:s.push(k),e++}var y=g===e}else var y=!0;if(y){if(A.byteLength!==void 0){let m=A.byteLength;const g=e;if(!(typeof m=="number"&&isFinite(m))){const k={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[k]:s.push(k),e++}var y=g===e}else var y=!0;if(y){if(A.byteOffset!==void 0){let m=A.byteOffset;const g=e;if(!(typeof m=="number"&&isFinite(m))){const k={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[k]:s.push(k),e++}var y=g===e}else var y=!0;if(y)if(A.length!==void 0){let m=A.length;const g=e;if(!(typeof m=="number"&&isFinite(m))){const k={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[k]:s.push(k),e++}var y=g===e}else var y=!0}}}}}}else{const E={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[E]:s.push(E),e++}var h=$===e;if(H=H||h,!H){const E=e;if(e===E)if(A&&typeof A=="object"&&!Array.isArray(A))for(const m in A){let g=A[m];const I=e,k=e;let U=!1;const N=e;if(typeof g!="string"){const L={instancePath:t+"/body/"+m.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=[L]:s.push(L),e++}var O=N===e;if(U=U||O,!U){const L=e;if(e===L)if(g&&typeof g=="object"&&!Array.isArray(g)){let F;if(g.BYTES_PER_ELEMENT===void 0&&(F="BYTES_PER_ELEMENT")||g.buffer===void 0&&(F="buffer")||g.byteLength===void 0&&(F="byteLength")||g.byteOffset===void 0&&(F="byteOffset")||g.length===void 0&&(F="length")){const K={instancePath:t+"/body/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:F},message:"must have required property '"+F+"'"};s===null?s=[K]:s.push(K),e++}else{const K=e;for(const S in g)if(!(S==="BYTES_PER_ELEMENT"||S==="buffer"||S==="byteLength"||S==="byteOffset"||S==="length")){let M=g[S];const Q=e;if(!(typeof M=="number"&&isFinite(M))){const W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var T=Q===e;if(!T)break}if(K===e){if(g.BYTES_PER_ELEMENT!==void 0){let S=g.BYTES_PER_ELEMENT;const M=e;if(!(typeof S=="number"&&isFinite(S))){const Q={instancePath:t+"/body/"+m.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=[Q]:s.push(Q),e++}var j=M===e}else var j=!0;if(j){if(g.buffer!==void 0){let S=g.buffer;const M=e;if(e===M)if(S&&typeof S=="object"&&!Array.isArray(S)){let W;if(S.byteLength===void 0&&(W="byteLength")){const ae={instancePath:t+"/body/"+m.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:W},message:"must have required property '"+W+"'"};s===null?s=[ae]:s.push(ae),e++}else{const ae=e;for(const pe in S)if(pe!=="byteLength"){const Pe={instancePath:t+"/body/"+m.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:pe},message:"must NOT have additional properties"};s===null?s=[Pe]:s.push(Pe),e++;break}if(ae===e&&S.byteLength!==void 0){let pe=S.byteLength;if(!(typeof pe=="number"&&isFinite(pe))){const Pe={instancePath:t+"/body/"+m.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 W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var j=M===e}else var j=!0;if(j){if(g.byteLength!==void 0){let S=g.byteLength;const M=e;if(!(typeof S=="number"&&isFinite(S))){const W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var j=M===e}else var j=!0;if(j){if(g.byteOffset!==void 0){let S=g.byteOffset;const M=e;if(!(typeof S=="number"&&isFinite(S))){const W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var j=M===e}else var j=!0;if(j)if(g.length!==void 0){let S=g.length;const M=e;if(!(typeof S=="number"&&isFinite(S))){const W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var j=M===e}else var j=!0}}}}}}else{const F={instancePath:t+"/body/"+m.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=[F]:s.push(F),e++}var O=L===e;if(U=U||O,!U){const F=e;if(e===F)if(g&&typeof g=="object"&&!Array.isArray(g)){let S;if(g.lastModified===void 0&&(S="lastModified")||g.name===void 0&&(S="name")||g.size===void 0&&(S="size")||g.type===void 0&&(S="type")||g.webkitRelativePath===void 0&&(S="webkitRelativePath")){const M={instancePath:t+"/body/"+m.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=[M]:s.push(M),e++}else{const M=e;for(const Q in g)if(!(Q==="size"||Q==="type"||Q==="lastModified"||Q==="name"||Q==="webkitRelativePath")){const W={instancePath:t+"/body/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Q},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if(M===e){if(g.size!==void 0){let Q=g.size;const W=e;if(!(typeof Q=="number"&&isFinite(Q))){const ae={instancePath:t+"/body/"+m.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=[ae]:s.push(ae),e++}var w=W===e}else var w=!0;if(w){if(g.type!==void 0){const Q=e;if(typeof g.type!="string"){const ae={instancePath:t+"/body/"+m.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=[ae]:s.push(ae),e++}var w=Q===e}else var w=!0;if(w){if(g.lastModified!==void 0){let Q=g.lastModified;const W=e;if(!(typeof Q=="number"&&isFinite(Q))){const pe={instancePath:t+"/body/"+m.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=[pe]:s.push(pe),e++}var w=W===e}else var w=!0;if(w){if(g.name!==void 0){const Q=e;if(typeof g.name!="string"){const ae={instancePath:t+"/body/"+m.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=[ae]:s.push(ae),e++}var w=Q===e}else var w=!0;if(w)if(g.webkitRelativePath!==void 0){const Q=e;if(typeof g.webkitRelativePath!="string"){const ae={instancePath:t+"/body/"+m.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=[ae]:s.push(ae),e++}var w=Q===e}else var w=!0}}}}}}else{const S={instancePath:t+"/body/"+m.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 O=F===e;U=U||O}}if(U)e=k,s!==null&&(k?s.length=k:s=null);else{const L={instancePath:t+"/body/"+m.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=[L]:s.push(L),e++}var B=I===e;if(!B)break}else{const m={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[m]:s.push(m),e++}var h=E===e;H=H||h}}if(H)e=z,s!==null&&(z?s.length=z:s=null);else{const $={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[$]:s.push($),e++,ge.errors=s,!1}var p=te===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 ns={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 le(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const j=e;for(const w in r)if(!dt.call(ns.properties,w))return le.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"}],!1;if(j===e){if(r.relativeUri!==void 0){const w=e;if(typeof r.relativeUri!="string")return le.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=w===e}else var p=!0;if(p){if(r.scriptPath!==void 0){const w=e;if(typeof r.scriptPath!="string")return le.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=w===e}else var p=!0;if(p){if(r.protocol!==void 0){const w=e;if(typeof r.protocol!="string")return le.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=w===e}else var p=!0;if(p){if(r.method!==void 0){let w=r.method;const B=e;if(typeof w!="string")return le.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(w==="GET"||w==="POST"||w==="HEAD"||w==="OPTIONS"||w==="PATCH"||w==="PUT"||w==="DELETE"))return le.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:ct.enum},message:"must be equal to one of the allowed values"}],!1;var p=B===e}else var p=!0;if(p){if(r.headers!==void 0){let w=r.headers;const B=e;if(e===e)if(w&&typeof w=="object"&&!Array.isArray(w))for(const A in w){const te=e;if(typeof w[A]!="string")return le.errors=[{instancePath:t+"/headers/"+A.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=te===e;if(!d)break}else return le.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=B===e}else var p=!0;if(p){if(r.body!==void 0){let w=r.body;const B=e,Y=e;let X=!1;const A=e;if(typeof w!="string"){const z={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}var h=A===e;if(X=X||h,!X){const z=e;if(e===z)if(w&&typeof w=="object"&&!Array.isArray(w)){let Z;if(w.BYTES_PER_ELEMENT===void 0&&(Z="BYTES_PER_ELEMENT")||w.buffer===void 0&&(Z="buffer")||w.byteLength===void 0&&(Z="byteLength")||w.byteOffset===void 0&&(Z="byteOffset")||w.length===void 0&&(Z="length")){const b={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:Z},message:"must have required property '"+Z+"'"};s===null?s=[b]:s.push(b),e++}else{const b=e;for(const $ in w)if(!($==="BYTES_PER_ELEMENT"||$==="buffer"||$==="byteLength"||$==="byteOffset"||$==="length")){let v=w[$];const E=e;if(!(typeof v=="number"&&isFinite(v))){const _={instancePath:t+"/body/"+$.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=[_]:s.push(_),e++}var P=E===e;if(!P)break}if(b===e){if(w.BYTES_PER_ELEMENT!==void 0){let $=w.BYTES_PER_ELEMENT;const v=e;if(!(typeof $=="number"&&isFinite($))){const E={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=[E]:s.push(E),e++}var y=v===e}else var y=!0;if(y){if(w.buffer!==void 0){let $=w.buffer;const v=e;if(e===v)if($&&typeof $=="object"&&!Array.isArray($)){let _;if($.byteLength===void 0&&(_="byteLength")){const m={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:_},message:"must have required property '"+_+"'"};s===null?s=[m]:s.push(m),e++}else{const m=e;for(const g in $)if(g!=="byteLength"){const I={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};s===null?s=[I]:s.push(I),e++;break}if(m===e&&$.byteLength!==void 0){let g=$.byteLength;if(!(typeof g=="number"&&isFinite(g))){const I={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=[I]:s.push(I),e++}}}}else{const _={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[_]:s.push(_),e++}var y=v===e}else var y=!0;if(y){if(w.byteLength!==void 0){let $=w.byteLength;const v=e;if(!(typeof $=="number"&&isFinite($))){const _={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var y=v===e}else var y=!0;if(y){if(w.byteOffset!==void 0){let $=w.byteOffset;const v=e;if(!(typeof $=="number"&&isFinite($))){const _={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var y=v===e}else var y=!0;if(y)if(w.length!==void 0){let $=w.length;const v=e;if(!(typeof $=="number"&&isFinite($))){const _={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var y=v===e}else var y=!0}}}}}}else{const Z={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[Z]:s.push(Z),e++}var h=z===e;X=X||h}if(X)e=Y,s!==null&&(Y?s.length=Y:s=null);else{const z={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[z]:s.push(z),e++,le.errors=s,!1}var p=B===e}else var p=!0;if(p){if(r.env!==void 0){let w=r.env;const B=e;if(e===B)if(w&&typeof w=="object"&&!Array.isArray(w))for(const X in w){const A=e;if(typeof w[X]!="string")return le.errors=[{instancePath:t+"/env/"+X.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var O=A===e;if(!O)break}else return le.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=B===e}else var p=!0;if(p){if(r.$_SERVER!==void 0){let w=r.$_SERVER;const B=e;if(e===B)if(w&&typeof w=="object"&&!Array.isArray(w))for(const X in w){const A=e;if(typeof w[X]!="string")return le.errors=[{instancePath:t+"/$_SERVER/"+X.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=A===e;if(!T)break}else return le.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=B===e}else var p=!0;if(p)if(r.code!==void 0){const w=e;if(typeof r.code!="string")return le.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=w===e}else var p=!0}}}}}}}}}else return le.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return le.errors=s,e===0}function o(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let yr;if(r.step===void 0&&(yr="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:yr},message:"must have required property '"+yr+"'"}],!1;{const ee=r.step;if(typeof ee=="string")if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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=f===e}else var d=!0;if(d){if(r.step!==void 0){let i=r.step;const f=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=f===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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 h=R===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/1/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/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var P=f===e}else var P=!0;if(P){if(r.step!==void 0){let i=r.step;const f=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 P=f===e}else var P=!0;if(P)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 P=i===e}else var P=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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 O=f===e}else var O=!0;if(O){if(r.step!==void 0){let i=r.step;const f=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 O=f===e}else var O=!0;if(O){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 O=i===e}else var O=!0;if(O)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 O=i===e}else var O=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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 j=f===e}else var j=!0;if(j){if(r.step!==void 0){let i=r.step;const f=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 j=f===e}else var j=!0;if(j){if(r.consts!==void 0){let i=r.consts;const f=e;if(e===f&&!(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 j=f===e}else var j=!0;if(j){if(r.method!==void 0){let i=r.method;const f=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:or.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var j=f===e}else var j=!0;if(j)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 j=i===e}else var j=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 w=R===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/4/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/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var B=f===e}else var B=!0;if(B){if(r.step!==void 0){let i=r.step;const f=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 B=f===e}else var B=!0;if(B)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 B=i===e}else var B=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 Y=R===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/5/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/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var X=f===e}else var X=!0;if(X){if(r.step!==void 0){let i=r.step;const f=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 X=f===e}else var X=!0;if(X)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 X=i===e}else var X=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 A=R===e}else var A=!0;if(A)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 A=a===e}else var A=!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 te=f===e}else var te=!0;if(te){if(r.step!==void 0){let i=r.step;const f=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 te=f===e}else var te=!0;if(te){if(r.file!==void 0){const i=e;J(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:u})||(s=s===null?J.errors:s.concat(J.errors),e=s.length);var te=i===e}else var te=!0;if(te)if(r.importer!==void 0){let i=r.importer;const f=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:or.oneOf[6].properties.importer.enum},message:"must be equal to one of the allowed values"}],!1;var te=f===e}else var te=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 z=R===e}else var z=!0;if(z)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 z=a===e}else var z=!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 H=f===e}else var H=!0;if(H){if(r.step!==void 0){let i=r.step;const f=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 H=f===e}else var H=!0;if(H)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 H=i===e}else var H=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 Z=R===e}else var Z=!0;if(Z)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 Z=a===e}else var Z=!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 b=f===e}else var b=!0;if(b){if(r.step!==void 0){let i=r.step;const f=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 b=f===e}else var b=!0;if(b){if(r.wordPressFilesZip!==void 0){const i=e;J(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:u})||(s=s===null?J.errors:s.concat(J.errors),e=s.length);var b=i===e}else var b=!0;if(b)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 b=i===e}else var b=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 $=R===e}else var $=!0;if($)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 $=a===e}else var $=!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=f===e}else var v=!0;if(v){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const f=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:or.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var v=f===e}else var v=!0;if(v){if(r.step!==void 0){let i=r.step;const f=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=f===e}else var v=!0;if(v){if(r.pluginData!==void 0){let i=r.pluginData;const f=e,q=e;let a=!1;const R=e;J(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?J.errors:s.concat(J.errors),e=s.length);var E=R===e;if(a=a||E,!a){const re=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 E=re===e;a=a||E}if(a)e=q,s!==null&&(q?s.length=q:s=null);else{const re={instancePath:t+"/pluginData",schemaPath:"#/oneOf/9/properties/pluginData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[re]:s.push(re),e++,o.errors=s,!1}var v=f===e}else var v=!0;if(v){if(r.pluginZipFile!==void 0){const i=e;J(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:u})||(s=s===null?J.errors:s.concat(J.errors),e=s.length);var v=i===e}else var v=!0;if(v)if(r.options!==void 0){let i=r.options;const f=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const R=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(R===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 _=ie===e}else var _=!0;if(_)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 _=ie===e}else var _=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var v=f===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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 m=R===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/10/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/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var g=f===e}else var g=!0;if(g){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const f=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:or.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var g=f===e}else var g=!0;if(g){if(r.step!==void 0){let i=r.step;const f=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 g=f===e}else var g=!0;if(g){if(r.themeData!==void 0){let i=r.themeData;const f=e,q=e;let a=!1;const R=e;J(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?J.errors:s.concat(J.errors),e=s.length);var I=R===e;if(a=a||I,!a){const re=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 I=re===e;a=a||I}if(a)e=q,s!==null&&(q?s.length=q:s=null);else{const re={instancePath:t+"/themeData",schemaPath:"#/oneOf/10/properties/themeData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[re]:s.push(re),e++,o.errors=s,!1}var g=f===e}else var g=!0;if(g){if(r.themeZipFile!==void 0){const i=e;J(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:u})||(s=s===null?J.errors:s.concat(J.errors),e=s.length);var g=i===e}else var g=!0;if(g)if(r.options!==void 0){let i=r.options;const f=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const R=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(R===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 k=ie===e}else var k=!0;if(k){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 k=ie===e}else var k=!0;if(k)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 k=ie===e}else var k=!0}}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var g=f===e}else var g=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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 N=f===e}else var N=!0;if(N){if(r.step!==void 0){let i=r.step;const f=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 N=f===e}else var N=!0;if(N){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 N=i===e}else var N=!0;if(N)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 N=i===e}else var N=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 L=R===e}else var L=!0;if(L)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 L=a===e}else var L=!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 x=f===e}else var x=!0;if(x){if(r.step!==void 0){let i=r.step;const f=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 x=f===e}else var x=!0;if(x)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 x=i===e}else var x=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 F=R===e}else var F=!0;if(F)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 F=a===e}else var F=!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 K=f===e}else var K=!0;if(K){if(r.step!==void 0){let i=r.step;const f=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 K=f===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/13/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/13/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/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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 M=f===e}else var M=!0;if(M)if(r.step!==void 0){let i=r.step;const f=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 M=f===e}else var M=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 Q=R===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/15/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/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var W=f===e}else var W=!0;if(W){if(r.step!==void 0){let i=r.step;const f=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 W=f===e}else var W=!0;if(W)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 W=i===e}else var W=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 ae=R===e}else var ae=!0;if(ae)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 ae=a===e}else var ae=!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 pe=f===e}else var pe=!0;if(pe){if(r.step!==void 0){let i=r.step;const f=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 pe=f===e}else var pe=!0;if(pe)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 pe=i===e}else var pe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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=f===e}else var qe=!0;if(qe){if(r.step!==void 0){let i=r.step;const f=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=f===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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 Ve=R===e}else var Ve=!0;if(Ve)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 Ve=a===e}else var Ve=!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=f===e}else var Ae=!0;if(Ae){if(r.step!==void 0){let i=r.step;const f=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=f===e}else var Ae=!0;if(Ae)if(r.code!==void 0){let i=r.code;const f=e,q=e;let a=!1;const R=e;if(typeof i!="string"){const re={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[re]:s.push(re),e++}var cr=R===e;if(a=a||cr,!a){const re=e;if(e===re)if(i&&typeof i=="object"&&!Array.isArray(i)){let fe;if(i.filename===void 0&&(fe="filename")||i.content===void 0&&(fe="content")){const je={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/required",keyword:"required",params:{missingProperty:fe},message:"must have required property '"+fe+"'"};s===null?s=[je]:s.push(je),e++}else{const je=e;for(const ne in i)if(!(ne==="filename"||ne==="content")){const Ee={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=[Ee]:s.push(Ee),e++;break}if(je===e){if(i.filename!==void 0){const ne=e;if(typeof i.filename!="string"){const Ee={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=[Ee]:s.push(Ee),e++}var ze=ne===e}else var ze=!0;if(ze)if(i.content!==void 0){const ne=e;if(typeof i.content!="string"){const G={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=[G]:s.push(G),e++}var ze=ne===e}else var ze=!0}}}else{const fe={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[fe]:s.push(fe),e++}var cr=re===e;a=a||cr}if(a)e=q,s!==null&&(q?s.length=q:s=null);else{const re={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[re]:s.push(re),e++,o.errors=s,!1}var Ae=f===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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 He=R===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/19/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/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Se=f===e}else var Se=!0;if(Se){if(r.step!==void 0){let i=r.step;const f=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=f===e}else var Se=!0;if(Se)if(r.options!==void 0){const i=e;le(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:u})||(s=s===null?le.errors:s.concat(le.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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 Ze=R===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/20/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/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Re=f===e}else var Re=!0;if(Re){if(r.step!==void 0){let i=r.step;const f=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=f===e}else var Re=!0;if(Re)if(r.options!==void 0){let i=r.options;const f=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const R=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(R===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=f===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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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=f===e}else var Le=!0;if(Le){if(r.step!==void 0){let i=r.step;const f=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=f===e}else var Le=!0;if(Le)if(r.sql!==void 0){const i=e;J(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:u})||(s=s===null?J.errors:s.concat(J.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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 Ge=R===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/22/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/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=f===e}else var Fe=!0;if(Fe){if(r.step!==void 0){let i=r.step;const f=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=f===e}else var Fe=!0;if(Fe)if(r.options!==void 0){let i=r.options;const f=e;if(e===f&&!(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=f===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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 Je=R===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/23/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/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var me=f===e}else var me=!0;if(me){if(r.step!==void 0){let i=r.step;const f=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=f===e}else var me=!0;if(me){if(r.zipFile!==void 0){const i=e;J(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:u})||(s=s===null?J.errors:s.concat(J.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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 Xe=R===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/24/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/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _e=f===e}else var _e=!0;if(_e){if(r.step!==void 0){let i=r.step;const f=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=f===e}else var _e=!0;if(_e){if(r.meta!==void 0){let i=r.meta;const f=e;if(e===f&&!(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=f===e}else var _e=!0;if(_e)if(r.userId!==void 0){let i=r.userId;const f=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=f===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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 Ke=R===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/25/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/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ke=f===e}else var ke=!0;if(ke){if(r.step!==void 0){let i=r.step;const f=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=f===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 f=e,q=e;let a=!1;const R=e;J(i,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:u})||(s=s===null?J.errors:s.concat(J.errors),e=s.length);var Ce=R===e;if(a=a||Ce,!a){const re=e;if(typeof i!="string"){const fe={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[fe]:s.push(fe),e++}var Ce=re===e;if(a=a||Ce,!a){const fe=e;if(e===fe)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 Ee={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=[Ee]:s.push(Ee),e++}else{const Ee=e;for(const G in i)if(!(G==="BYTES_PER_ELEMENT"||G==="buffer"||G==="byteLength"||G==="byteOffset"||G==="length")){let he=i[G];const sr=e;if(!(typeof he=="number"&&isFinite(he))){const ue={instancePath:t+"/data/"+G.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=[ue]:s.push(ue),e++}var Pt=sr===e;if(!Pt)break}if(Ee===e){if(i.BYTES_PER_ELEMENT!==void 0){let G=i.BYTES_PER_ELEMENT;const he=e;if(!(typeof G=="number"&&isFinite(G))){const sr={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=[sr]:s.push(sr),e++}var ye=he===e}else var ye=!0;if(ye){if(i.buffer!==void 0){let G=i.buffer;const he=e;if(e===he)if(G&&typeof G=="object"&&!Array.isArray(G)){let ue;if(G.byteLength===void 0&&(ue="byteLength")){const ir={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:ue},message:"must have required property '"+ue+"'"};s===null?s=[ir]:s.push(ir),e++}else{const ir=e;for(const De in G)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(ir===e&&G.byteLength!==void 0){let De=G.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 ue={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=[ue]:s.push(ue),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteLength!==void 0){let G=i.byteLength;const he=e;if(!(typeof G=="number"&&isFinite(G))){const ue={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=[ue]:s.push(ue),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteOffset!==void 0){let G=i.byteOffset;const he=e;if(!(typeof G=="number"&&isFinite(G))){const ue={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=[ue]:s.push(ue),e++}var ye=he===e}else var ye=!0;if(ye)if(i.length!==void 0){let G=i.length;const he=e;if(!(typeof G=="number"&&isFinite(G))){const ue={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=[ue]:s.push(ue),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=fe===e;a=a||Ce}}if(a)e=q,s!==null&&(q?s.length=q:s=null);else{const re={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[re]:s.push(re),e++,o.errors=s,!1}var ke=f===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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 er=R===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/26/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/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Oe=f===e}else var Oe=!0;if(Oe){if(r.step!==void 0){let i=r.step;const f=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=f===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(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 rr=R===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/27/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/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Te=f===e}else var Te=!0;if(Te){if(r.step!==void 0){let i=r.step;const f=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 Te=f===e}else var Te=!0;if(Te){if(r.command!==void 0){let i=r.command;const f=e,q=e;let a=!1;const R=e;if(typeof i!="string"){const re={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[re]:s.push(re),e++}var mr=R===e;if(a=a||mr,!a){const re=e;if(e===re)if(Array.isArray(i)){var Lr=!0;const fe=i.length;for(let je=0;je<fe;je++){const ne=e;if(typeof i[je]!="string"){const G={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=[G]:s.push(G),e++}var Lr=ne===e;if(!Lr)break}}else{const fe={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[fe]:s.push(fe),e++}var mr=re===e;a=a||mr}if(a)e=q,s!==null&&(q?s.length=q:s=null);else{const re={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[re]:s.push(re),e++,o.errors=s,!1}var Te=f===e}else var Te=!0;if(Te)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 Te=i===e}else var Te=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(ee==="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 C=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(C===e){if(r.progress!==void 0){let i=r.progress;const f=e;if(e===f)if(i&&typeof i=="object"&&!Array.isArray(i)){const q=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(q===e){if(i.weight!==void 0){let a=i.weight;const R=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 tr=R===e}else var tr=!0;if(tr)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 tr=a===e}else var tr=!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=f===e}else var Ne=!0;if(Ne){if(r.step!==void 0){let i=r.step;const f=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=f===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:ee},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:ee},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 V(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const Z=e;for(const b in r)if(!dt.call(rs.properties,b))return V.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:b},message:"must NOT have additional properties"}],!1;if(Z===e){if(r.landingPage!==void 0){const b=e;if(typeof r.landingPage!="string")return V.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=b===e}else var p=!0;if(p){if(r.description!==void 0){const b=e;if(typeof r.description!="string")return V.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=b===e}else var p=!0;if(p){if(r.meta!==void 0){let b=r.meta;const $=e;if(e===$)if(b&&typeof b=="object"&&!Array.isArray(b)){let E;if(b.title===void 0&&(E="title")||b.author===void 0&&(E="author"))return V.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:E},message:"must have required property '"+E+"'"}],!1;{const _=e;for(const m in b)if(!(m==="title"||m==="description"||m==="author"||m==="categories"))return V.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(_===e){if(b.title!==void 0){const m=e;if(typeof b.title!="string")return V.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=m===e}else var d=!0;if(d){if(b.description!==void 0){const m=e;if(typeof b.description!="string")return V.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=m===e}else var d=!0;if(d){if(b.author!==void 0){const m=e;if(typeof b.author!="string")return V.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=m===e}else var d=!0;if(d)if(b.categories!==void 0){let m=b.categories;const g=e;if(e===g)if(Array.isArray(m)){var h=!0;const k=m.length;for(let U=0;U<k;U++){const N=e;if(typeof m[U]!="string")return V.errors=[{instancePath:t+"/meta/categories/"+U,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=N===e;if(!h)break}}else return V.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var d=g===e}else var d=!0}}}}}else return V.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=$===e}else var p=!0;if(p){if(r.preferredVersions!==void 0){let b=r.preferredVersions;const $=e;if(e===$)if(b&&typeof b=="object"&&!Array.isArray(b)){let E;if(b.php===void 0&&(E="php")||b.wp===void 0&&(E="wp"))return V.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:E},message:"must have required property '"+E+"'"}],!1;{const _=e;for(const m in b)if(!(m==="php"||m==="wp"))return V.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(_===e){if(b.php!==void 0){let m=b.php;const g=e,I=e;let k=!1;const U=e;We(m,{instancePath:t+"/preferredVersions/php",parentData:b,parentDataProperty:"php",rootData:u})||(s=s===null?We.errors:s.concat(We.errors),e=s.length);var P=U===e;if(k=k||P,!k){const N=e;if(typeof m!="string"){const x={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[x]:s.push(x),e++}if(m!=="latest"){const x={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=[x]:s.push(x),e++}var P=N===e;k=k||P}if(k)e=I,s!==null&&(I?s.length=I:s=null);else{const N={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[N]:s.push(N),e++,V.errors=s,!1}var y=g===e}else var y=!0;if(y)if(b.wp!==void 0){let m=b.wp;const g=e,I=e;let k=!1;const U=e;if(typeof m!="string"){const L={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var O=U===e;if(k=k||O,!k){const L=e;if(typeof m!="string"){const F={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}if(m!=="latest"){const F={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};s===null?s=[F]:s.push(F),e++}var O=L===e;if(k=k||O,!k){const F=e;if(typeof m!="boolean"){const S={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/2/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[S]:s.push(S),e++}if(m!==!1){const S={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/2/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};s===null?s=[S]:s.push(S),e++}var O=F===e;k=k||O}}if(k)e=I,s!==null&&(I?s.length=I:s=null);else{const L={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[L]:s.push(L),e++,V.errors=s,!1}var y=g===e}else var y=!0}}}else return V.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=$===e}else var p=!0;if(p){if(r.features!==void 0){let b=r.features;const $=e;if(e===$)if(b&&typeof b=="object"&&!Array.isArray(b)){const E=e;for(const _ in b)if(!(_==="intl"||_==="networking"))return V.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;if(E===e){if(b.intl!==void 0){const _=e;if(typeof b.intl!="boolean")return V.errors=[{instancePath:t+"/features/intl",schemaPath:"#/properties/features/properties/intl/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var T=_===e}else var T=!0;if(T)if(b.networking!==void 0){const _=e;if(typeof b.networking!="boolean")return V.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var T=_===e}else var T=!0}}else return V.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=$===e}else var p=!0;if(p){if(r.extraLibraries!==void 0){let b=r.extraLibraries;const $=e;if(e===$)if(Array.isArray(b)){var j=!0;const E=b.length;for(let _=0;_<E;_++){let m=b[_];const g=e;if(typeof m!="string")return V.errors=[{instancePath:t+"/extraLibraries/"+_,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(m!=="wp-cli")return V.errors=[{instancePath:t+"/extraLibraries/"+_,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var j=g===e;if(!j)break}}else return V.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=$===e}else var p=!0;if(p){if(r.constants!==void 0){let b=r.constants;const $=e;if(e===e)if(b&&typeof b=="object"&&!Array.isArray(b))for(const _ in b){let m=b[_];const g=e;if(typeof m!="string"&&typeof m!="boolean"&&!(typeof m=="number"&&isFinite(m)))return V.errors=[{instancePath:t+"/constants/"+_.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:ts.additionalProperties.type},message:"must be string,boolean,number"}],!1;var w=g===e;if(!w)break}else return V.errors=[{instancePath:t+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=$===e}else var p=!0;if(p){if(r.plugins!==void 0){let b=r.plugins;const $=e;if(e===$)if(Array.isArray(b)){var B=!0;const E=b.length;for(let _=0;_<E;_++){let m=b[_];const g=e,I=e;let k=!1;const U=e;if(typeof m!="string"){const L={instancePath:t+"/plugins/"+_,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var Y=U===e;if(k=k||Y,!k){const L=e;J(m,{instancePath:t+"/plugins/"+_,parentData:b,parentDataProperty:_,rootData:u})||(s=s===null?J.errors:s.concat(J.errors),e=s.length);var Y=L===e;k=k||Y}if(k)e=I,s!==null&&(I?s.length=I:s=null);else{const L={instancePath:t+"/plugins/"+_,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[L]:s.push(L),e++,V.errors=s,!1}var B=g===e;if(!B)break}}else return V.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=$===e}else var p=!0;if(p){if(r.siteOptions!==void 0){let b=r.siteOptions;const $=e;if(e===$)if(b&&typeof b=="object"&&!Array.isArray(b)){const E=e;for(const _ in b)if(_!=="blogname"){const m=e;if(typeof b[_]!="string")return V.errors=[{instancePath:t+"/siteOptions/"+_.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var X=m===e;if(!X)break}if(E===e&&b.blogname!==void 0&&typeof b.blogname!="string")return V.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return V.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=$===e}else var p=!0;if(p){if(r.login!==void 0){let b=r.login;const $=e,v=e;let E=!1;const _=e;if(typeof b!="boolean"){const g={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[g]:s.push(g),e++}var A=_===e;if(E=E||A,!E){const g=e;if(e===g)if(b&&typeof b=="object"&&!Array.isArray(b)){let k;if(b.username===void 0&&(k="username")||b.password===void 0&&(k="password")){const U={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:k},message:"must have required property '"+k+"'"};s===null?s=[U]:s.push(U),e++}else{const U=e;for(const N in b)if(!(N==="username"||N==="password")){const L={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};s===null?s=[L]:s.push(L),e++;break}if(U===e){if(b.username!==void 0){const N=e;if(typeof b.username!="string"){const L={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var te=N===e}else var te=!0;if(te)if(b.password!==void 0){const N=e;if(typeof b.password!="string"){const x={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[x]:s.push(x),e++}var te=N===e}else var te=!0}}}else{const k={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[k]:s.push(k),e++}var A=g===e;E=E||A}if(E)e=v,s!==null&&(v?s.length=v:s=null);else{const g={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[g]:s.push(g),e++,V.errors=s,!1}var p=$===e}else var p=!0;if(p){if(r.steps!==void 0){let b=r.steps;const $=e;if(e===$)if(Array.isArray(b)){var z=!0;const E=b.length;for(let _=0;_<E;_++){let m=b[_];const g=e,I=e;let k=!1;const U=e;o(m,{instancePath:t+"/steps/"+_,parentData:b,parentDataProperty:_,rootData:u})||(s=s===null?o.errors:s.concat(o.errors),e=s.length);var H=U===e;if(k=k||H,!k){const L=e;if(typeof m!="string"){const F={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var H=L===e;if(k=k||H,!k){const F=e,K={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};s===null?s=[K]:s.push(K),e++;var H=F===e;if(k=k||H,!k){const M=e;if(typeof m!="boolean"){const W={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[W]:s.push(W),e++}if(m!==!1){const W={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};s===null?s=[W]:s.push(W),e++}var H=M===e;if(k=k||H,!k){const W=e;if(m!==null){const pe={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};s===null?s=[pe]:s.push(pe),e++}var H=W===e;k=k||H}}}}if(k)e=I,s!==null&&(I?s.length=I:s=null);else{const L={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[L]:s.push(L),e++,V.errors=s,!1}var z=g===e;if(!z)break}}else return V.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=$===e}else var p=!0;if(p)if(r.$schema!==void 0){const b=e;if(typeof r.$schema!="string")return V.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=b===e}else var p=!0}}}}}}}}}}}}else return V.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return V.errors=s,e===0}function nr(r,{instancePath:t="",parentData:n,parentDataProperty:l,rootData:u=r}={}){let s=null,e=0;return V(r,{instancePath:t,parentData:n,parentDataProperty:l,rootData:u})||(s=s===null?V.errors:s.concat(V.errors),e=s.length),nr.errors=s,e===0}const{wpCLI:ps,...xr}=es,ls={...xr,"wp-cli":ps,importFile:xr.importWxr};class Ar extends Error{constructor(t,n){super(t),this.name="InvalidBlueprintError",this.validationErrors=n}}class mt extends Error{constructor(t){const{stepNumber:n,step:l,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=l,this.messages=(s.message||"").split(`
785
- `).map(d=>d.trim()).filter(Boolean)}}async function Sr(r,t={}){const n={...t};let l;return Rr(r)?(l=await yt(r),n.streamBundledFile=function(...u){return r.read(...u)}):l=r,fs(l,n)}function Rr(r){return r&&"read"in r&&typeof r.read=="function"}async function yt(r){if(!Rr(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}function fs(r,{progress:t=new br.ProgressTracker,semaphore:n=new D.Semaphore({concurrency:3}),onStepCompleted:l=()=>{},onBlueprintValidated:u=()=>{},corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:p,additionalSteps:d}={}){var w,B,Y,X,A,te,z,H,Z,b,$;r=structuredClone(r),r={...r,steps:(r.steps||[]).filter(gt).filter(cs)},r.steps=[...r.steps||[],...d||[]],((w=r.preferredVersions)==null?void 0:w.wp)===!1&&gs(r);for(const v of r.steps)!v||typeof v!="object"||(v.step==="importFile"?(v.step="importWxr",oe.logger.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(v==null?void 0:v.step)==="installPlugin"&&"pluginZipFile"in v?(v.pluginData=v.pluginZipFile,oe.logger.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(v==null?void 0:v.step)==="installTheme"&&"themeZipFile"in v&&(v.themeData=v.themeZipFile,oe.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 v=r.plugins.map(E=>typeof E=="string"?ws(E)?{resource:"zip",inner:{resource:"git:directory",url:E.trim().replace(/\/+$/,""),ref:"HEAD"}}:E.startsWith("https://")?{resource:"url",url:E}:{resource:"wordpress.org/plugins",slug:E}:E).map(E=>({step:"installPlugin",pluginData:E}));r.steps.unshift(...v)}r.login&&r.steps.unshift({step:"login",...r.login===!0?{username:"admin"}:r.login});const h=((B=r.steps)==null?void 0:B.findIndex(v=>typeof v=="object"&&(v==null?void 0:v.step)&&["wp-cli","enableMultisite"].includes(v.step)))??-1;if((Y=r==null?void 0:r.extraLibraries)!=null&&Y.includes("wp-cli")||h!==-1){const v={step:"writeFile",data:Ht,path:Tr};h===-1?(X=r.steps)==null||X.push(v):(A=r.steps)==null||A.splice(h,0,v)}const P=(te=r.steps)==null?void 0:te.findIndex(v=>typeof v=="object"&&(v==null?void 0:v.step)==="importWxr");P!==void 0&&P>-1&&((z=r.steps)==null||z.splice(P,0,{step:"installPlugin",pluginData:{resource:"wordpress.org/plugins",slug:"wordpress-importer"}}));const y=ht(r);if(!y.valid){const{errors:v}=y,E=us(r,v);throw new Ar(`Invalid Blueprint: The Blueprint does not conform to the schema.
854
+ 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"},fetchAttachments:{type:"boolean",description:"Whether to fetch and import attachment files referenced by the WXR file.",default:!0},rewriteUrls:{type:"boolean",description:"Whether to rewrite imported URLs to the current site URL.",default:!0},importComments:{type:"boolean",description:"Whether to import comments from the WXR file.",default:!0},defaultAuthorUsername:{type:"string",description:"The fallback local user for imported authors that cannot be mapped.",default:"admin"},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.
855
+ 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"]}]},Ss={properties:{onError:{enum:["skip-plugin","throw"]}}},Rs={properties:{onError:{enum:["skip-theme","throw"]}}},Ot={enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ge(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let X;if(r.url===void 0&&(X="url"))return ge.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:X},message:"must have required property '"+X+"'"}],!1;{const re=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(re===e){if(r.method!==void 0){let q=r.method;const B=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:Ot.enum},message:"must be equal to one of the allowed values"}],!1;var f=B===e}else var f=!0;if(f){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 f=q===e}else var f=!0;if(f){if(r.headers!==void 0){let q=r.headers;const B=e;if(e===e)if(q&&typeof q=="object"&&!Array.isArray(q))for(const G in q){const v=e;if(typeof q[G]!="string")return ge.errors=[{instancePath:t+"/headers/"+G.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=v===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 f=B===e}else var f=!0;if(f)if(r.body!==void 0){let q=r.body;const B=e,Z=e;let Q=!1;const G=e;if(typeof q!="string"){const j={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[j]:s.push(j),e++}var g=G===e;if(Q=Q||g,!Q){const j=e;if(e===j)if(q&&typeof q=="object"&&!Array.isArray(q)){let $;if(q.BYTES_PER_ELEMENT===void 0&&($="BYTES_PER_ELEMENT")||q.buffer===void 0&&($="buffer")||q.byteLength===void 0&&($="byteLength")||q.byteOffset===void 0&&($="byteOffset")||q.length===void 0&&($="length")){const _={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"};s===null?s=[_]:s.push(_),e++}else{const _=e;for(const m in q)if(!(m==="BYTES_PER_ELEMENT"||m==="buffer"||m==="byteLength"||m==="byteOffset"||m==="length")){let w=q[m];const U=e;if(!(typeof w=="number"&&isFinite(w))){const O={instancePath:t+"/body/"+m.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=[O]:s.push(O),e++}var y=U===e;if(!y)break}if(_===e){if(q.BYTES_PER_ELEMENT!==void 0){let m=q.BYTES_PER_ELEMENT;const w=e;if(!(typeof m=="number"&&isFinite(m))){const U={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=[U]:s.push(U),e++}var h=w===e}else var h=!0;if(h){if(q.buffer!==void 0){let m=q.buffer;const w=e;if(e===w)if(m&&typeof m=="object"&&!Array.isArray(m)){let O;if(m.byteLength===void 0&&(O="byteLength")){const D={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};s===null?s=[D]:s.push(D),e++}else{const D=e;for(const F in m)if(F!=="byteLength"){const L={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=[L]:s.push(L),e++;break}if(D===e&&m.byteLength!==void 0){let F=m.byteLength;if(!(typeof F=="number"&&isFinite(F))){const L={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=[L]:s.push(L),e++}}}}else{const O={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[O]:s.push(O),e++}var h=w===e}else var h=!0;if(h){if(q.byteLength!==void 0){let m=q.byteLength;const w=e;if(!(typeof m=="number"&&isFinite(m))){const O={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[O]:s.push(O),e++}var h=w===e}else var h=!0;if(h){if(q.byteOffset!==void 0){let m=q.byteOffset;const w=e;if(!(typeof m=="number"&&isFinite(m))){const O={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[O]:s.push(O),e++}var h=w===e}else var h=!0;if(h)if(q.length!==void 0){let m=q.length;const w=e;if(!(typeof m=="number"&&isFinite(m))){const O={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[O]:s.push(O),e++}var h=w===e}else var h=!0}}}}}}else{const $={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[$]:s.push($),e++}var g=j===e;if(Q=Q||g,!Q){const $=e;if(e===$)if(q&&typeof q=="object"&&!Array.isArray(q))for(const m in q){let w=q[m];const U=e,O=e;let D=!1;const F=e;if(typeof w!="string"){const L={instancePath:t+"/body/"+m.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=[L]:s.push(L),e++}var E=F===e;if(D=D||E,!D){const L=e;if(e===L)if(w&&typeof w=="object"&&!Array.isArray(w)){let N;if(w.BYTES_PER_ELEMENT===void 0&&(N="BYTES_PER_ELEMENT")||w.buffer===void 0&&(N="buffer")||w.byteLength===void 0&&(N="byteLength")||w.byteOffset===void 0&&(N="byteOffset")||w.length===void 0&&(N="length")){const te={instancePath:t+"/body/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};s===null?s=[te]:s.push(te),e++}else{const te=e;for(const S in w)if(!(S==="BYTES_PER_ELEMENT"||S==="buffer"||S==="byteLength"||S==="byteOffset"||S==="length")){let z=w[S];const J=e;if(!(typeof z=="number"&&isFinite(z))){const W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var k=J===e;if(!k)break}if(te===e){if(w.BYTES_PER_ELEMENT!==void 0){let S=w.BYTES_PER_ELEMENT;const z=e;if(!(typeof S=="number"&&isFinite(S))){const J={instancePath:t+"/body/"+m.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=[J]:s.push(J),e++}var T=z===e}else var T=!0;if(T){if(w.buffer!==void 0){let S=w.buffer;const z=e;if(e===z)if(S&&typeof S=="object"&&!Array.isArray(S)){let W;if(S.byteLength===void 0&&(W="byteLength")){const ne={instancePath:t+"/body/"+m.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:W},message:"must have required property '"+W+"'"};s===null?s=[ne]:s.push(ne),e++}else{const ne=e;for(const pe in S)if(pe!=="byteLength"){const _e={instancePath:t+"/body/"+m.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:pe},message:"must NOT have additional properties"};s===null?s=[_e]:s.push(_e),e++;break}if(ne===e&&S.byteLength!==void 0){let pe=S.byteLength;if(!(typeof pe=="number"&&isFinite(pe))){const _e={instancePath:t+"/body/"+m.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=[_e]:s.push(_e),e++}}}}else{const W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var T=z===e}else var T=!0;if(T){if(w.byteLength!==void 0){let S=w.byteLength;const z=e;if(!(typeof S=="number"&&isFinite(S))){const W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var T=z===e}else var T=!0;if(T){if(w.byteOffset!==void 0){let S=w.byteOffset;const z=e;if(!(typeof S=="number"&&isFinite(S))){const W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var T=z===e}else var T=!0;if(T)if(w.length!==void 0){let S=w.length;const z=e;if(!(typeof S=="number"&&isFinite(S))){const W={instancePath:t+"/body/"+m.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=[W]:s.push(W),e++}var T=z===e}else var T=!0}}}}}}else{const N={instancePath:t+"/body/"+m.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=[N]:s.push(N),e++}var E=L===e;if(D=D||E,!D){const N=e;if(e===N)if(w&&typeof w=="object"&&!Array.isArray(w)){let S;if(w.lastModified===void 0&&(S="lastModified")||w.name===void 0&&(S="name")||w.size===void 0&&(S="size")||w.type===void 0&&(S="type")||w.webkitRelativePath===void 0&&(S="webkitRelativePath")){const z={instancePath:t+"/body/"+m.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=[z]:s.push(z),e++}else{const z=e;for(const J in w)if(!(J==="size"||J==="type"||J==="lastModified"||J==="name"||J==="webkitRelativePath")){const W={instancePath:t+"/body/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:J},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if(z===e){if(w.size!==void 0){let J=w.size;const W=e;if(!(typeof J=="number"&&isFinite(J))){const ne={instancePath:t+"/body/"+m.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=[ne]:s.push(ne),e++}var b=W===e}else var b=!0;if(b){if(w.type!==void 0){const J=e;if(typeof w.type!="string"){const ne={instancePath:t+"/body/"+m.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=[ne]:s.push(ne),e++}var b=J===e}else var b=!0;if(b){if(w.lastModified!==void 0){let J=w.lastModified;const W=e;if(!(typeof J=="number"&&isFinite(J))){const pe={instancePath:t+"/body/"+m.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=[pe]:s.push(pe),e++}var b=W===e}else var b=!0;if(b){if(w.name!==void 0){const J=e;if(typeof w.name!="string"){const ne={instancePath:t+"/body/"+m.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=[ne]:s.push(ne),e++}var b=J===e}else var b=!0;if(b)if(w.webkitRelativePath!==void 0){const J=e;if(typeof w.webkitRelativePath!="string"){const ne={instancePath:t+"/body/"+m.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=[ne]:s.push(ne),e++}var b=J===e}else var b=!0}}}}}}else{const S={instancePath:t+"/body/"+m.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 E=N===e;D=D||E}}if(D)e=O,s!==null&&(O?s.length=O:s=null);else{const L={instancePath:t+"/body/"+m.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=[L]:s.push(L),e++}var M=U===e;if(!M)break}else{const m={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[m]:s.push(m),e++}var g=$===e;Q=Q||g}}if(Q)e=Z,s!==null&&(Z?s.length=Z:s=null);else{const j={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[j]:s.push(j),e++,ge.errors=s,!1}var f=B===e}else var f=!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 Ls={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 le(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const T=e;for(const b in r)if(!_t.call(Ls.properties,b))return le.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:b},message:"must NOT have additional properties"}],!1;if(T===e){if(r.relativeUri!==void 0){const b=e;if(typeof r.relativeUri!="string")return le.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=b===e}else var f=!0;if(f){if(r.scriptPath!==void 0){const b=e;if(typeof r.scriptPath!="string")return le.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=b===e}else var f=!0;if(f){if(r.protocol!==void 0){const b=e;if(typeof r.protocol!="string")return le.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=b===e}else var f=!0;if(f){if(r.method!==void 0){let b=r.method;const M=e;if(typeof b!="string")return le.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(b==="GET"||b==="POST"||b==="HEAD"||b==="OPTIONS"||b==="PATCH"||b==="PUT"||b==="DELETE"))return le.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:Ot.enum},message:"must be equal to one of the allowed values"}],!1;var f=M===e}else var f=!0;if(f){if(r.headers!==void 0){let b=r.headers;const M=e;if(e===e)if(b&&typeof b=="object"&&!Array.isArray(b))for(const q in b){const B=e;if(typeof b[q]!="string")return le.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=B===e;if(!d)break}else return le.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=M===e}else var f=!0;if(f){if(r.body!==void 0){let b=r.body;const M=e,X=e;let re=!1;const q=e;if(typeof b!="string"){const Z={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Z]:s.push(Z),e++}var g=q===e;if(re=re||g,!re){const Z=e;if(e===Z)if(b&&typeof b=="object"&&!Array.isArray(b)){let G;if(b.BYTES_PER_ELEMENT===void 0&&(G="BYTES_PER_ELEMENT")||b.buffer===void 0&&(G="buffer")||b.byteLength===void 0&&(G="byteLength")||b.byteOffset===void 0&&(G="byteOffset")||b.length===void 0&&(G="length")){const v={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:G},message:"must have required property '"+G+"'"};s===null?s=[v]:s.push(v),e++}else{const v=e;for(const j in b)if(!(j==="BYTES_PER_ELEMENT"||j==="buffer"||j==="byteLength"||j==="byteOffset"||j==="length")){let P=b[j];const $=e;if(!(typeof P=="number"&&isFinite(P))){const _={instancePath:t+"/body/"+j.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=[_]:s.push(_),e++}var y=$===e;if(!y)break}if(v===e){if(b.BYTES_PER_ELEMENT!==void 0){let j=b.BYTES_PER_ELEMENT;const P=e;if(!(typeof j=="number"&&isFinite(j))){const $={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.push($),e++}var h=P===e}else var h=!0;if(h){if(b.buffer!==void 0){let j=b.buffer;const P=e;if(e===P)if(j&&typeof j=="object"&&!Array.isArray(j)){let _;if(j.byteLength===void 0&&(_="byteLength")){const m={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:_},message:"must have required property '"+_+"'"};s===null?s=[m]:s.push(m),e++}else{const m=e;for(const w in j)if(w!=="byteLength"){const U={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};s===null?s=[U]:s.push(U),e++;break}if(m===e&&j.byteLength!==void 0){let w=j.byteLength;if(!(typeof w=="number"&&isFinite(w))){const U={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=[U]:s.push(U),e++}}}}else{const _={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[_]:s.push(_),e++}var h=P===e}else var h=!0;if(h){if(b.byteLength!==void 0){let j=b.byteLength;const P=e;if(!(typeof j=="number"&&isFinite(j))){const _={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var h=P===e}else var h=!0;if(h){if(b.byteOffset!==void 0){let j=b.byteOffset;const P=e;if(!(typeof j=="number"&&isFinite(j))){const _={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var h=P===e}else var h=!0;if(h)if(b.length!==void 0){let j=b.length;const P=e;if(!(typeof j=="number"&&isFinite(j))){const _={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var h=P===e}else var h=!0}}}}}}else{const G={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[G]:s.push(G),e++}var g=Z===e;re=re||g}if(re)e=X,s!==null&&(X?s.length=X:s=null);else{const Z={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[Z]:s.push(Z),e++,le.errors=s,!1}var f=M===e}else var f=!0;if(f){if(r.env!==void 0){let b=r.env;const M=e;if(e===M)if(b&&typeof b=="object"&&!Array.isArray(b))for(const re in b){const q=e;if(typeof b[re]!="string")return le.errors=[{instancePath:t+"/env/"+re.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=q===e;if(!E)break}else return le.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=M===e}else var f=!0;if(f){if(r.$_SERVER!==void 0){let b=r.$_SERVER;const M=e;if(e===M)if(b&&typeof b=="object"&&!Array.isArray(b))for(const re in b){const q=e;if(typeof b[re]!="string")return le.errors=[{instancePath:t+"/$_SERVER/"+re.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=q===e;if(!k)break}else return le.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=M===e}else var f=!0;if(f)if(r.code!==void 0){const b=e;if(typeof r.code!="string")return le.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=b===e}else var f=!0}}}}}}}}}else return le.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return le.errors=s,e===0}function o(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let vr;if(r.step===void 0&&(vr="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:vr},message:"must have required property '"+vr+"'"}],!1;{const se=r.step;if(typeof se=="string")if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 f=R===e}else var f=!0;if(f)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 f=a===e}else var f=!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=u===e}else var d=!0;if(d){if(r.step!==void 0){let i=r.step;const u=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=u===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(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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 y=u===e}else var y=!0;if(y){if(r.step!==void 0){let i=r.step;const u=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 y=u===e}else var y=!0;if(y)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 y=i===e}else var y=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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 E=u===e}else var E=!0;if(E){if(r.step!==void 0){let i=r.step;const u=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 E=u===e}else var E=!0;if(E){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 E=i===e}else var E=!0;if(E)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 E=i===e}else var E=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 k=R===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/3/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/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var T=u===e}else var T=!0;if(T){if(r.step!==void 0){let i=r.step;const u=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 T=u===e}else var T=!0;if(T){if(r.consts!==void 0){let i=r.consts;const u=e;if(e===u&&!(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 T=u===e}else var T=!0;if(T){if(r.method!==void 0){let i=r.method;const u=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:lr.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var T=u===e}else var T=!0;if(T)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 T=i===e}else var T=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 b=R===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/4/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/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var M=u===e}else var M=!0;if(M){if(r.step!==void 0){let i=r.step;const u=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=u===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(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 X=R===e}else var X=!0;if(X)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 X=a===e}else var X=!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 re=u===e}else var re=!0;if(re){if(r.step!==void 0){let i=r.step;const u=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 re=u===e}else var re=!0;if(re)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 re=i===e}else var re=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="file"||i==="fetchAttachments"||i==="rewriteUrls"||i==="importComments"||i==="defaultAuthorUsername"||i==="importer"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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 B=u===e}else var B=!0;if(B){if(r.step!==void 0){let i=r.step;const u=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 B=u===e}else var B=!0;if(B){if(r.file!==void 0){const i=e;ee(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:l})||(s=s===null?ee.errors:s.concat(ee.errors),e=s.length);var B=i===e}else var B=!0;if(B){if(r.fetchAttachments!==void 0){const i=e;if(typeof r.fetchAttachments!="boolean")return o.errors=[{instancePath:t+"/fetchAttachments",schemaPath:"#/oneOf/6/properties/fetchAttachments/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var B=i===e}else var B=!0;if(B){if(r.rewriteUrls!==void 0){const i=e;if(typeof r.rewriteUrls!="boolean")return o.errors=[{instancePath:t+"/rewriteUrls",schemaPath:"#/oneOf/6/properties/rewriteUrls/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var B=i===e}else var B=!0;if(B){if(r.importComments!==void 0){const i=e;if(typeof r.importComments!="boolean")return o.errors=[{instancePath:t+"/importComments",schemaPath:"#/oneOf/6/properties/importComments/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var B=i===e}else var B=!0;if(B){if(r.defaultAuthorUsername!==void 0){const i=e;if(typeof r.defaultAuthorUsername!="string")return o.errors=[{instancePath:t+"/defaultAuthorUsername",schemaPath:"#/oneOf/6/properties/defaultAuthorUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var B=i===e}else var B=!0;if(B)if(r.importer!==void 0){let i=r.importer;const u=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:lr.oneOf[6].properties.importer.enum},message:"must be equal to one of the allowed values"}],!1;var B=u===e}else var B=!0}}}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 Z=R===e}else var Z=!0;if(Z)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 Z=a===e}else var Z=!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 Q=u===e}else var Q=!0;if(Q){if(r.step!==void 0){let i=r.step;const u=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 Q=u===e}else var Q=!0;if(Q)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 Q=i===e}else var Q=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 G=R===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/8/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/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var v=u===e}else var v=!0;if(v){if(r.step!==void 0){let i=r.step;const u=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 v=u===e}else var v=!0;if(v){if(r.wordPressFilesZip!==void 0){const i=e;ee(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:l})||(s=s===null?ee.errors:s.concat(ee.errors),e=s.length);var v=i===e}else var v=!0;if(v)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 v=i===e}else var v=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 j=R===e}else var j=!0;if(j)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 j=a===e}else var j=!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 P=u===e}else var P=!0;if(P){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const u=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:lr.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var P=u===e}else var P=!0;if(P){if(r.step!==void 0){let i=r.step;const u=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 P=u===e}else var P=!0;if(P){if(r.pluginData!==void 0){let i=r.pluginData;const u=e,A=e;let a=!1;const R=e;ee(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:l})||(s=s===null?ee.errors:s.concat(ee.errors),e=s.length);var $=R===e;if(a=a||$,!a){const H=e;ce(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:l})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var $=H===e;a=a||$}if(a)e=A,s!==null&&(A?s.length=A:s=null);else{const H={instancePath:t+"/pluginData",schemaPath:"#/oneOf/9/properties/pluginData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[H]:s.push(H),e++,o.errors=s,!1}var P=u===e}else var P=!0;if(P){if(r.pluginZipFile!==void 0){const i=e;ee(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:l})||(s=s===null?ee.errors:s.concat(ee.errors),e=s.length);var P=i===e}else var P=!0;if(P)if(r.options!==void 0){let i=r.options;const u=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const R=e;for(const V in i)if(!(V==="activate"||V==="activationOptions"||V==="onError"||V==="targetFolderName"||V==="humanReadableName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"}],!1;if(R===e){if(i.activate!==void 0){const V=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 _=V===e}else var _=!0;if(_){if(i.activationOptions!==void 0){let V=i.activationOptions;const H=e;if(e===H&&!(V&&typeof V=="object"&&!Array.isArray(V)))return o.errors=[{instancePath:t+"/options/activationOptions",schemaPath:"#/definitions/InstallPluginOptions/properties/activationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _=H===e}else var _=!0;if(_){if(i.onError!==void 0){let V=i.onError;const H=e;if(typeof V!="string")return o.errors=[{instancePath:t+"/options/onError",schemaPath:"#/definitions/InstallPluginOptions/properties/onError/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(V==="skip-plugin"||V==="throw"))return o.errors=[{instancePath:t+"/options/onError",schemaPath:"#/definitions/InstallPluginOptions/properties/onError/enum",keyword:"enum",params:{allowedValues:Ss.properties.onError.enum},message:"must be equal to one of the allowed values"}],!1;var _=H===e}else var _=!0;if(_){if(i.targetFolderName!==void 0){const V=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 _=V===e}else var _=!0;if(_)if(i.humanReadableName!==void 0){const V=e;if(typeof i.humanReadableName!="string")return o.errors=[{instancePath:t+"/options/humanReadableName",schemaPath:"#/definitions/InstallPluginOptions/properties/humanReadableName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=V===e}else var _=!0}}}}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var P=u===e}else var P=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 m=R===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/10/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/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var w=u===e}else var w=!0;if(w){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const u=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:lr.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var w=u===e}else var w=!0;if(w){if(r.step!==void 0){let i=r.step;const u=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 w=u===e}else var w=!0;if(w){if(r.themeData!==void 0){let i=r.themeData;const u=e,A=e;let a=!1;const R=e;ee(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:l})||(s=s===null?ee.errors:s.concat(ee.errors),e=s.length);var U=R===e;if(a=a||U,!a){const H=e;ce(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:l})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var U=H===e;a=a||U}if(a)e=A,s!==null&&(A?s.length=A:s=null);else{const H={instancePath:t+"/themeData",schemaPath:"#/oneOf/10/properties/themeData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[H]:s.push(H),e++,o.errors=s,!1}var w=u===e}else var w=!0;if(w){if(r.themeZipFile!==void 0){const i=e;ee(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:l})||(s=s===null?ee.errors:s.concat(ee.errors),e=s.length);var w=i===e}else var w=!0;if(w)if(r.options!==void 0){let i=r.options;const u=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const R=e;for(const V in i)if(!(V==="activate"||V==="importStarterContent"||V==="onError"||V==="targetFolderName"||V==="humanReadableName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"}],!1;if(R===e){if(i.activate!==void 0){const V=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 O=V===e}else var O=!0;if(O){if(i.importStarterContent!==void 0){const V=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 O=V===e}else var O=!0;if(O){if(i.onError!==void 0){let V=i.onError;const H=e;if(typeof V!="string")return o.errors=[{instancePath:t+"/options/onError",schemaPath:"#/definitions/InstallThemeOptions/properties/onError/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(V==="skip-theme"||V==="throw"))return o.errors=[{instancePath:t+"/options/onError",schemaPath:"#/definitions/InstallThemeOptions/properties/onError/enum",keyword:"enum",params:{allowedValues:Rs.properties.onError.enum},message:"must be equal to one of the allowed values"}],!1;var O=H===e}else var O=!0;if(O){if(i.targetFolderName!==void 0){const V=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 O=V===e}else var O=!0;if(O)if(i.humanReadableName!==void 0){const V=e;if(typeof i.humanReadableName!="string")return o.errors=[{instancePath:t+"/options/humanReadableName",schemaPath:"#/definitions/InstallThemeOptions/properties/humanReadableName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var O=V===e}else var O=!0}}}}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var w=u===e}else var w=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 D=R===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/11/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/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=u===e}else var F=!0;if(F){if(r.step!==void 0){let i=r.step;const u=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=u===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(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 L=R===e}else var L=!0;if(L)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 L=a===e}else var L=!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 x=u===e}else var x=!0;if(x){if(r.step!==void 0){let i=r.step;const u=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 x=u===e}else var x=!0;if(x)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 x=i===e}else var x=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 N=R===e}else var N=!0;if(N)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 N=a===e}else var N=!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 te=u===e}else var te=!0;if(te){if(r.step!==void 0){let i=r.step;const u=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 te=u===e}else var te=!0;if(te){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 te=i===e}else var te=!0;if(te)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 te=i===e}else var te=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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=R===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 z=u===e}else var z=!0;if(z)if(r.step!==void 0){let i=r.step;const u=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 z=u===e}else var z=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 J=R===e}else var J=!0;if(J)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 J=a===e}else var J=!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 W=u===e}else var W=!0;if(W){if(r.step!==void 0){let i=r.step;const u=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 W=u===e}else var W=!0;if(W)if(r.request!==void 0){const i=e;ge(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:l})||(s=s===null?ge.errors:s.concat(ge.errors),e=s.length);var W=i===e}else var W=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 ne=R===e}else var ne=!0;if(ne)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 ne=a===e}else var ne=!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 pe=u===e}else var pe=!0;if(pe){if(r.step!==void 0){let i=r.step;const u=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 pe=u===e}else var pe=!0;if(pe)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 pe=i===e}else var pe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 _e=R===e}else var _e=!0;if(_e)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 _e=a===e}else var _e=!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=u===e}else var qe=!0;if(qe){if(r.step!==void 0){let i=r.step;const u=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=u===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(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 Ze=R===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/18/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/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Se=u===e}else var Se=!0;if(Se){if(r.step!==void 0){let i=r.step;const u=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 Se=u===e}else var Se=!0;if(Se)if(r.code!==void 0){let i=r.code;const u=e,A=e;let a=!1;const R=e;if(typeof i!="string"){const H={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[H]:s.push(H),e++}var wr=R===e;if(a=a||wr,!a){const H=e;if(e===H)if(i&&typeof i=="object"&&!Array.isArray(i)){let fe;if(i.filename===void 0&&(fe="filename")||i.content===void 0&&(fe="content")){const Ae={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/required",keyword:"required",params:{missingProperty:fe},message:"must have required property '"+fe+"'"};s===null?s=[Ae]:s.push(Ae),e++}else{const Ae=e;for(const ae in i)if(!(ae==="filename"||ae==="content")){const $e={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ae},message:"must NOT have additional properties"};s===null?s=[$e]:s.push($e),e++;break}if(Ae===e){if(i.filename!==void 0){const ae=e;if(typeof i.filename!="string"){const $e={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=[$e]:s.push($e),e++}var Qe=ae===e}else var Qe=!0;if(Qe)if(i.content!==void 0){const ae=e;if(typeof i.content!="string"){const K={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=[K]:s.push(K),e++}var Qe=ae===e}else var Qe=!0}}}else{const fe={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[fe]:s.push(fe),e++}var wr=H===e;a=a||wr}if(a)e=A,s!==null&&(A?s.length=A:s=null);else{const H={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[H]:s.push(H),e++,o.errors=s,!1}var Se=u===e}else var Se=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 Ge=R===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/19/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/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Re=u===e}else var Re=!0;if(Re){if(r.step!==void 0){let i=r.step;const u=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=u===e}else var Re=!0;if(Re)if(r.options!==void 0){const i=e;le(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:l})||(s=s===null?le.errors:s.concat(le.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(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 Je=R===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/20/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/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Le=u===e}else var Le=!0;if(Le){if(r.step!==void 0){let i=r.step;const u=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 Le=u===e}else var Le=!0;if(Le)if(r.options!==void 0){let i=r.options;const u=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const R=e;for(const V in i)if(!(V==="adminUsername"||V==="adminPassword"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"}],!1;if(R===e){if(i.adminUsername!==void 0){const V=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 Xe=V===e}else var Xe=!0;if(Xe)if(i.adminPassword!==void 0){const V=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 Xe=V===e}else var Xe=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Le=u===e}else var Le=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 Ke=R===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/21/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/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ne=u===e}else var Ne=!0;if(Ne){if(r.step!==void 0){let i=r.step;const u=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 Ne=u===e}else var Ne=!0;if(Ne)if(r.sql!==void 0){const i=e;ee(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:l})||(s=s===null?ee.errors:s.concat(ee.errors),e=s.length);var Ne=i===e}else var Ne=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 er=R===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/22/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/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=u===e}else var Fe=!0;if(Fe){if(r.step!==void 0){let i=r.step;const u=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=u===e}else var Fe=!0;if(Fe)if(r.options!==void 0){let i=r.options;const u=e;if(e===u&&!(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=u===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(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 rr=R===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/23/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/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var me=u===e}else var me=!0;if(me){if(r.step!==void 0){let i=r.step;const u=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=u===e}else var me=!0;if(me){if(r.zipFile!==void 0){const i=e;ee(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:l})||(s=s===null?ee.errors:s.concat(ee.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(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 tr=R===e}else var tr=!0;if(tr)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 tr=a===e}else var tr=!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 Oe=u===e}else var Oe=!0;if(Oe){if(r.step!==void 0){let i=r.step;const u=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 Oe=u===e}else var Oe=!0;if(Oe){if(r.meta!==void 0){let i=r.meta;const u=e;if(e===u&&!(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 Oe=u===e}else var Oe=!0;if(Oe)if(r.userId!==void 0){let i=r.userId;const u=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 Oe=u===e}else var Oe=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 sr=R===e}else var sr=!0;if(sr)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 sr=a===e}else var sr=!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=u===e}else var ke=!0;if(ke){if(r.step!==void 0){let i=r.step;const u=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=u===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 u=e,A=e;let a=!1;const R=e;ee(i,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:l})||(s=s===null?ee.errors:s.concat(ee.errors),e=s.length);var De=R===e;if(a=a||De,!a){const H=e;if(typeof i!="string"){const fe={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[fe]:s.push(fe),e++}var De=H===e;if(a=a||De,!a){const fe=e;if(e===fe)if(i&&typeof i=="object"&&!Array.isArray(i)){let ae;if(i.BYTES_PER_ELEMENT===void 0&&(ae="BYTES_PER_ELEMENT")||i.buffer===void 0&&(ae="buffer")||i.byteLength===void 0&&(ae="byteLength")||i.byteOffset===void 0&&(ae="byteOffset")||i.length===void 0&&(ae="length")){const $e={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:ae},message:"must have required property '"+ae+"'"};s===null?s=[$e]:s.push($e),e++}else{const $e=e;for(const K in i)if(!(K==="BYTES_PER_ELEMENT"||K==="buffer"||K==="byteLength"||K==="byteOffset"||K==="length")){let he=i[K];const ar=e;if(!(typeof he=="number"&&isFinite(he))){const ue={instancePath:t+"/data/"+K.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=[ue]:s.push(ue),e++}var Bt=ar===e;if(!Bt)break}if($e===e){if(i.BYTES_PER_ELEMENT!==void 0){let K=i.BYTES_PER_ELEMENT;const he=e;if(!(typeof K=="number"&&isFinite(K))){const ar={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=[ar]:s.push(ar),e++}var ye=he===e}else var ye=!0;if(ye){if(i.buffer!==void 0){let K=i.buffer;const he=e;if(e===he)if(K&&typeof K=="object"&&!Array.isArray(K)){let ue;if(K.byteLength===void 0&&(ue="byteLength")){const pr={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:ue},message:"must have required property '"+ue+"'"};s===null?s=[pr]:s.push(pr),e++}else{const pr=e;for(const Ue in K)if(Ue!=="byteLength"){const We={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Ue},message:"must NOT have additional properties"};s===null?s=[We]:s.push(We),e++;break}if(pr===e&&K.byteLength!==void 0){let Ue=K.byteLength;if(!(typeof Ue=="number"&&isFinite(Ue))){const We={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=[We]:s.push(We),e++}}}}else{const ue={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=[ue]:s.push(ue),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteLength!==void 0){let K=i.byteLength;const he=e;if(!(typeof K=="number"&&isFinite(K))){const ue={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=[ue]:s.push(ue),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteOffset!==void 0){let K=i.byteOffset;const he=e;if(!(typeof K=="number"&&isFinite(K))){const ue={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=[ue]:s.push(ue),e++}var ye=he===e}else var ye=!0;if(ye)if(i.length!==void 0){let K=i.length;const he=e;if(!(typeof K=="number"&&isFinite(K))){const ue={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=[ue]:s.push(ue),e++}var ye=he===e}else var ye=!0}}}}}}else{const ae={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[ae]:s.push(ae),e++}var De=fe===e;a=a||De}}if(a)e=A,s!==null&&(A?s.length=A:s=null);else{const H={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[H]:s.push(H),e++,o.errors=s,!1}var ke=u===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(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 ir=R===e}else var ir=!0;if(ir)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 ir=a===e}else var ir=!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 Ee=u===e}else var Ee=!0;if(Ee){if(r.step!==void 0){let i=r.step;const u=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 Ee=u===e}else var Ee=!0;if(Ee){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 Ee=i===e}else var Ee=!0;if(Ee)if(r.filesTree!==void 0){const i=e;ce(r.filesTree,{instancePath:t+"/filesTree",parentData:r,parentDataProperty:"filesTree",rootData:l})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var Ee=i===e}else var Ee=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 or=R===e}else var or=!0;if(or)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 or=a===e}else var or=!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 Te=u===e}else var Te=!0;if(Te){if(r.step!==void 0){let i=r.step;const u=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 Te=u===e}else var Te=!0;if(Te){if(r.command!==void 0){let i=r.command;const u=e,A=e;let a=!1;const R=e;if(typeof i!="string"){const H={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[H]:s.push(H),e++}var br=R===e;if(a=a||br,!a){const H=e;if(e===H)if(Array.isArray(i)){var xr=!0;const fe=i.length;for(let Ae=0;Ae<fe;Ae++){const ae=e;if(typeof i[Ae]!="string"){const K={instancePath:t+"/command/"+Ae,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[K]:s.push(K),e++}var xr=ae===e;if(!xr)break}}else{const fe={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[fe]:s.push(fe),e++}var br=H===e;a=a||br}if(a)e=A,s!==null&&(A?s.length=A:s=null);else{const H={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[H]:s.push(H),e++,o.errors=s,!1}var Te=u===e}else var Te=!0;if(Te)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 Te=i===e}else var Te=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(se==="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 I=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(I===e){if(r.progress!==void 0){let i=r.progress;const u=e;if(e===u)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=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(A===e){if(i.weight!==void 0){let a=i.weight;const R=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 nr=R===e}else var nr=!0;if(nr)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 nr=a===e}else var nr=!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 xe=u===e}else var xe=!0;if(xe){if(r.step!==void 0){let i=r.step;const u=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 xe=u===e}else var xe=!0;if(xe)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 xe=i===e}else var xe=!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:se},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:se},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 Y(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const G=e;for(const v in r)if(!_t.call(Es.properties,v))return Y.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"}],!1;if(G===e){if(r.landingPage!==void 0){const v=e;if(typeof r.landingPage!="string")return Y.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=v===e}else var f=!0;if(f){if(r.description!==void 0){const v=e;if(typeof r.description!="string")return Y.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=v===e}else var f=!0;if(f){if(r.meta!==void 0){let v=r.meta;const j=e;if(e===j)if(v&&typeof v=="object"&&!Array.isArray(v)){let $;if(v.title===void 0&&($="title")||v.author===void 0&&($="author"))return Y.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;{const _=e;for(const m in v)if(!(m==="title"||m==="description"||m==="author"||m==="categories"))return Y.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(_===e){if(v.title!==void 0){const m=e;if(typeof v.title!="string")return Y.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=m===e}else var d=!0;if(d){if(v.description!==void 0){const m=e;if(typeof v.description!="string")return Y.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=m===e}else var d=!0;if(d){if(v.author!==void 0){const m=e;if(typeof v.author!="string")return Y.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=m===e}else var d=!0;if(d)if(v.categories!==void 0){let m=v.categories;const w=e;if(e===w)if(Array.isArray(m)){var g=!0;const O=m.length;for(let D=0;D<O;D++){const F=e;if(typeof m[D]!="string")return Y.errors=[{instancePath:t+"/meta/categories/"+D,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var g=F===e;if(!g)break}}else return Y.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var d=w===e}else var d=!0}}}}}else return Y.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=j===e}else var f=!0;if(f){if(r.preferredVersions!==void 0){let v=r.preferredVersions;const j=e;if(e===j)if(v&&typeof v=="object"&&!Array.isArray(v)){let $;if(v.php===void 0&&($="php")||v.wp===void 0&&($="wp"))return Y.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;{const _=e;for(const m in v)if(!(m==="php"||m==="wp"))return Y.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(_===e){if(v.php!==void 0){let m=v.php;const w=e,U=e;let O=!1;const D=e;Be(m,{instancePath:t+"/preferredVersions/php",parentData:v,parentDataProperty:"php",rootData:l})||(s=s===null?Be.errors:s.concat(Be.errors),e=s.length);var y=D===e;if(O=O||y,!O){const F=e;if(typeof m!="string"){const x={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[x]:s.push(x),e++}if(m!=="latest"){const x={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=[x]:s.push(x),e++}var y=F===e;O=O||y}if(O)e=U,s!==null&&(U?s.length=U:s=null);else{const F={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,Y.errors=s,!1}var h=w===e}else var h=!0;if(h)if(v.wp!==void 0){let m=v.wp;const w=e,U=e;let O=!1;const D=e;if(typeof m!="string"){const L={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var E=D===e;if(O=O||E,!O){const L=e;if(typeof m!="string"){const N={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[N]:s.push(N),e++}if(m!=="latest"){const N={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};s===null?s=[N]:s.push(N),e++}var E=L===e;if(O=O||E,!O){const N=e;if(typeof m!="boolean"){const S={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/2/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[S]:s.push(S),e++}if(m!==!1){const S={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf/2/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};s===null?s=[S]:s.push(S),e++}var E=N===e;O=O||E}}if(O)e=U,s!==null&&(U?s.length=U:s=null);else{const L={instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[L]:s.push(L),e++,Y.errors=s,!1}var h=w===e}else var h=!0}}}else return Y.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=j===e}else var f=!0;if(f){if(r.features!==void 0){let v=r.features;const j=e;if(e===j)if(v&&typeof v=="object"&&!Array.isArray(v)){const $=e;for(const _ in v)if(!(_==="intl"||_==="networking"))return Y.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;if($===e){if(v.intl!==void 0){const _=e;if(typeof v.intl!="boolean")return Y.errors=[{instancePath:t+"/features/intl",schemaPath:"#/properties/features/properties/intl/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=_===e}else var k=!0;if(k)if(v.networking!==void 0){const _=e;if(typeof v.networking!="boolean")return Y.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=_===e}else var k=!0}}else return Y.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=j===e}else var f=!0;if(f){if(r.extraLibraries!==void 0){let v=r.extraLibraries;const j=e;if(e===j)if(Array.isArray(v)){var T=!0;const $=v.length;for(let _=0;_<$;_++){let m=v[_];const w=e;if(typeof m!="string")return Y.errors=[{instancePath:t+"/extraLibraries/"+_,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(m!=="wp-cli")return Y.errors=[{instancePath:t+"/extraLibraries/"+_,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var T=w===e;if(!T)break}}else return Y.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=j===e}else var f=!0;if(f){if(r.constants!==void 0){let v=r.constants;const j=e;if(e===e)if(v&&typeof v=="object"&&!Array.isArray(v))for(const _ in v){let m=v[_];const w=e;if(typeof m!="string"&&typeof m!="boolean"&&!(typeof m=="number"&&isFinite(m)))return Y.errors=[{instancePath:t+"/constants/"+_.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:Ts.additionalProperties.type},message:"must be string,boolean,number"}],!1;var b=w===e;if(!b)break}else return Y.errors=[{instancePath:t+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=j===e}else var f=!0;if(f){if(r.plugins!==void 0){let v=r.plugins;const j=e;if(e===j)if(Array.isArray(v)){var M=!0;const $=v.length;for(let _=0;_<$;_++){let m=v[_];const w=e,U=e;let O=!1;const D=e;if(typeof m!="string"){const L={instancePath:t+"/plugins/"+_,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var X=D===e;if(O=O||X,!O){const L=e;ee(m,{instancePath:t+"/plugins/"+_,parentData:v,parentDataProperty:_,rootData:l})||(s=s===null?ee.errors:s.concat(ee.errors),e=s.length);var X=L===e;O=O||X}if(O)e=U,s!==null&&(U?s.length=U:s=null);else{const L={instancePath:t+"/plugins/"+_,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[L]:s.push(L),e++,Y.errors=s,!1}var M=w===e;if(!M)break}}else return Y.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=j===e}else var f=!0;if(f){if(r.siteOptions!==void 0){let v=r.siteOptions;const j=e;if(e===j)if(v&&typeof v=="object"&&!Array.isArray(v)){const $=e;for(const _ in v)if(_!=="blogname"){const m=e;if(typeof v[_]!="string")return Y.errors=[{instancePath:t+"/siteOptions/"+_.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var re=m===e;if(!re)break}if($===e&&v.blogname!==void 0&&typeof v.blogname!="string")return Y.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return Y.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=j===e}else var f=!0;if(f){if(r.login!==void 0){let v=r.login;const j=e,P=e;let $=!1;const _=e;if(typeof v!="boolean"){const w={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[w]:s.push(w),e++}var q=_===e;if($=$||q,!$){const w=e;if(e===w)if(v&&typeof v=="object"&&!Array.isArray(v)){let O;if(v.username===void 0&&(O="username")||v.password===void 0&&(O="password")){const D={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};s===null?s=[D]:s.push(D),e++}else{const D=e;for(const F in v)if(!(F==="username"||F==="password")){const L={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:F},message:"must NOT have additional properties"};s===null?s=[L]:s.push(L),e++;break}if(D===e){if(v.username!==void 0){const F=e;if(typeof v.username!="string"){const L={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var B=F===e}else var B=!0;if(B)if(v.password!==void 0){const F=e;if(typeof v.password!="string"){const x={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[x]:s.push(x),e++}var B=F===e}else var B=!0}}}else{const O={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[O]:s.push(O),e++}var q=w===e;$=$||q}if($)e=P,s!==null&&(P?s.length=P:s=null);else{const w={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[w]:s.push(w),e++,Y.errors=s,!1}var f=j===e}else var f=!0;if(f){if(r.steps!==void 0){let v=r.steps;const j=e;if(e===j)if(Array.isArray(v)){var Z=!0;const $=v.length;for(let _=0;_<$;_++){let m=v[_];const w=e,U=e;let O=!1;const D=e;o(m,{instancePath:t+"/steps/"+_,parentData:v,parentDataProperty:_,rootData:l})||(s=s===null?o.errors:s.concat(o.errors),e=s.length);var Q=D===e;if(O=O||Q,!O){const L=e;if(typeof m!="string"){const N={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[N]:s.push(N),e++}var Q=L===e;if(O=O||Q,!O){const N=e,te={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};s===null?s=[te]:s.push(te),e++;var Q=N===e;if(O=O||Q,!O){const z=e;if(typeof m!="boolean"){const W={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[W]:s.push(W),e++}if(m!==!1){const W={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};s===null?s=[W]:s.push(W),e++}var Q=z===e;if(O=O||Q,!O){const W=e;if(m!==null){const pe={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};s===null?s=[pe]:s.push(pe),e++}var Q=W===e;O=O||Q}}}}if(O)e=U,s!==null&&(U?s.length=U:s=null);else{const L={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[L]:s.push(L),e++,Y.errors=s,!1}var Z=w===e;if(!Z)break}}else return Y.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=j===e}else var f=!0;if(f)if(r.$schema!==void 0){const v=e;if(typeof r.$schema!="string")return Y.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=v===e}else var f=!0}}}}}}}}}}}}else return Y.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Y.errors=s,e===0}function ur(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let s=null,e=0;return Y(r,{instancePath:t,parentData:n,parentDataProperty:p,rootData:l})||(s=s===null?Y.errors:s.concat(Y.errors),e=s.length),ur.errors=s,e===0}function kt(r){const t=r.trim().replace(/\/+$/,"");return/^https:\/\/.+\.git$/.test(t)||/^https:\/\/github\.com\/[^/]+\/[^/]+$/.test(t)?!0:/^https:\/\/gitlab\.com\/[^/]+\/[^/]+(\/[^/]+)*$/.test(t)}const{wpCLI:Ns,...Dr}=ks,Fs={...Dr,"wp-cli":Ns,importFile:Dr.importWxr};class Fr extends Error{constructor(t,n){super(t),this.name="InvalidBlueprintError",this.validationErrors=n}}class Et extends Error{constructor(t){const{stepNumber:n,step:p,cause:l}=t,s=l instanceof Error?l:new Error(String(l)),e=`Error when executing the blueprint step #${n}`,f=s.message?`${e}: ${s.message}`:e;super(f,{cause:s}),this.name="BlueprintStepExecutionError",this.stepNumber=n,this.step=p,this.messages=(s.message||"").split(`
856
+ `).map(d=>d.trim()).filter(Boolean)}}async function He(r,t={}){const n={...t};let p;return Ye(r)?(p=await Tt(r),n.streamBundledFile=function(...l){return r.read(...l)}):p=r,xs(p,n)}function Ye(r){return r&&"read"in r&&typeof r.read=="function"}async function Tt(r){if(!Ye(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}function xs(r,{progress:t=new Er.ProgressTracker,semaphore:n=new C.Semaphore({concurrency:3}),onStepCompleted:p=()=>{},onBlueprintValidated:l=()=>{},corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:f,additionalSteps:d}={}){var b,M,X,re,q,B,Z,Q,G,v,j;r=structuredClone(r),r={...r,steps:(r.steps||[]).filter(jt).filter(Ds)},r.steps=[...r.steps||[],...d||[]],((b=r.preferredVersions)==null?void 0:b.wp)===!1&&Bs(r);for(const P of r.steps)!P||typeof P!="object"||(P.step==="importFile"?(P.step="importWxr",oe.logger.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(P==null?void 0:P.step)==="installPlugin"&&"pluginZipFile"in P?(P.pluginData=P.pluginZipFile,oe.logger.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(P==null?void 0:P.step)==="installTheme"&&"themeZipFile"in P&&(P.themeData=P.themeZipFile,oe.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 P=r.plugins.map($=>typeof $=="string"?kt($)?{resource:"zip",inner:{resource:"git:directory",url:$.trim().replace(/\/+$/,""),ref:"HEAD"}}:$.startsWith("https://")?{resource:"url",url:$}:{resource:"wordpress.org/plugins",slug:$}:$).map($=>({step:"installPlugin",pluginData:$}));r.steps.unshift(...P)}r.login&&r.steps.unshift({step:"login",...r.login===!0?{username:"admin"}:r.login});const g=((M=r.steps)==null?void 0:M.findIndex(P=>typeof P=="object"&&(P==null?void 0:P.step)&&["wp-cli","enableMultisite"].includes(P.step)))??-1;if((X=r==null?void 0:r.extraLibraries)!=null&&X.includes("wp-cli")||g!==-1){const P={step:"writeFile",data:cs,path:qr};g===-1?(re=r.steps)==null||re.push(P):(q=r.steps)==null||q.splice(g,0,P)}const y=(B=r.steps)==null?void 0:B.findIndex(P=>typeof P=="object"&&(P==null?void 0:P.step)==="importWxr");y!==void 0&&y>-1&&((Z=r.steps)==null||Z.splice(y,0,{step:"installPlugin",pluginData:{resource:"wordpress.org/plugins",slug:"wordpress-importer"}}));const h=$t(r);if(!h.valid){const{errors:P}=h,$=Cs(r,P);throw new Fr(`Invalid Blueprint: The Blueprint does not conform to the schema.
786
857
 
787
- Found ${v.length} validation error(s):
858
+ Found ${P.length} validation error(s):
788
859
 
789
- ${E}
860
+ ${$}
790
861
 
791
- Please review your Blueprint and fix these issues. Learn more about the Blueprint format: https://wordpress.github.io/wordpress-playground/blueprints/data-format`,v)}u(r);const O=r.steps||[],T=O.reduce((v,E)=>{var _;return v+(((_=E.progress)==null?void 0:_.weight)||1)},0),j=O.map(v=>ms(v,{semaphore:n,rootProgressTracker:t,totalProgressWeight:T,corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:p}));return{versions:{php:ds((H=r.preferredVersions)==null?void 0:H.php,Be.AllPHPVersions,Be.LatestSupportedPHPVersion),wp:((Z=r.preferredVersions)==null?void 0:Z.wp)||"latest"},features:{intl:((b=r.features)==null?void 0:b.intl)??!1,networking:(($=r.features)==null?void 0:$.networking)??!0},extraLibraries:r.extraLibraries||[],run:async v=>{try{for(const{resources:E}of j)for(const _ of E)_.setPlayground(v),_.isAsync&&_.resolve().catch(()=>{});for(const[E,{run:_,step:m}]of Object.entries(j))try{const g=await _(v);l(g,m)}catch(g){const I=Number(E)+1;throw new mt({stepNumber:I,step:m,cause:g})}}finally{try{const E=await v.pathToInternalUrl(r.landingPage||"/");await v.goTo("/index.php?playground-redirection-handler&next="+encodeURIComponent(E))}catch{}t.finish()}}}}function us(r,t){return t.map((n,l)=>{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 h=u.split("/").filter(Boolean);let P=r;for(const y of h)P&&typeof P=="object"&&(P=P[y]);if(P&&typeof P=="object"){const y=P[d],O=JSON.stringify(y);e=`
792
- "${d}": ${O}
793
- ${"^".repeat(d.length+2)} This property is not recognized`}}catch{}}}else try{const d=u.split("/").filter(Boolean);let h=r;for(const P of d)h&&typeof h=="object"&&(h=h[P]);if(h!==void 0){const P=JSON.stringify(h,null,2);e=`
794
- Value: ${P.length>200?P.substring(0,200)+"...":P}`}}catch{}return`${l+1}. At path "${u}": ${s}${e}`}).join(`
862
+ Please review your Blueprint and fix these issues. Learn more about the Blueprint format: https://wordpress.github.io/wordpress-playground/blueprints/data-format`,P)}l(r);const E=r.steps||[],k=E.reduce((P,$)=>{var _;return P+(((_=$.progress)==null?void 0:_.weight)||1)},0),T=E.map(P=>Us(P,{semaphore:n,rootProgressTracker:t,totalProgressWeight:k,corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:f}));return{versions:{php:Is((Q=r.preferredVersions)==null?void 0:Q.php,Pe.AllPHPVersions,Pe.LatestSupportedPHPVersion),wp:((G=r.preferredVersions)==null?void 0:G.wp)||"latest"},features:{intl:((v=r.features)==null?void 0:v.intl)??!1,networking:((j=r.features)==null?void 0:j.networking)??!0},extraLibraries:r.extraLibraries||[],run:async P=>{try{for(const{resources:$}of T)for(const _ of $)_.setPlayground(P),_.isAsync&&_.resolve().catch(()=>{});for(const[$,{run:_,step:m}]of Object.entries(T))try{const w=await _(P);p(w,m)}catch(w){const U=Number($)+1;throw new Et({stepNumber:U,step:m,cause:w})}}finally{try{const $=await P.pathToInternalUrl(r.landingPage||"/");await P.goTo("/index.php?playground-redirection-handler&next="+encodeURIComponent($))}catch{}t.finish()}}}}function Cs(r,t){return t.map((n,p)=>{var f;const l=n.instancePath||"/";let s=n.message||"validation failed",e="";if(s.includes("must NOT have additional properties")){const d=(f=n.params)==null?void 0:f.additionalProperty;if(d){s=`has unexpected property "${d}"`;try{const g=l.split("/").filter(Boolean);let y=r;for(const h of g)y&&typeof y=="object"&&(y=y[h]);if(y&&typeof y=="object"){const h=y[d],E=JSON.stringify(h);e=`
863
+ "${d}": ${E}
864
+ ${"^".repeat(d.length+2)} This property is not recognized`}}catch{}}}else try{const d=l.split("/").filter(Boolean);let g=r;for(const y of d)g&&typeof g=="object"&&(g=g[y]);if(g!==void 0){const y=JSON.stringify(g,null,2);e=`
865
+ Value: ${y.length>200?y.substring(0,200)+"...":y}`}}catch{}return`${p+1}. At path "${l}": ${s}${e}`}).join(`
795
866
 
796
- `)}function ht(r){var u;const t=nr(r);if(t)return{valid:t};const n=new Set;for(const s of nr.errors)s.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(s.instancePath);return{valid:!1,errors:((u=nr.errors)==null?void 0:u.filter(s=>!(s.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(s.instancePath))))??[]}}function ds(r,t,n){return(r==="7.2"||r==="7.3")&&(oe.logger.warn(`PHP ${r} is no longer supported. Automatically upgrading to PHP 7.4.`),r="7.4"),r&&t.includes(r)?r:n}function gt(r){return!!(typeof r=="object"&&r)}function cs(r){return["setPhpIniEntry","request"].includes(r.step)?(oe.logger.warn(`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function ms(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:l,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e}){var T;const p=n.stage((((T=r.progress)==null?void 0:T.weight)||1)/l),d={};for(const j of Object.keys(r)){let w=r[j];Et(w)&&(w=we.create(w,{semaphore:t,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e})),d[j]=w}const h=async j=>{var w;try{return p.fillSlowly(),await ls[r.step](j,await ys(d),{tracker:p,initialCaption:(w=r.progress)==null?void 0:w.caption})}finally{p.finish()}},P=Cr(d),y=Cr(d).filter(j=>j.isAsync),O=1/(y.length+1);for(const j of y)j.progress=p.stage(O);return{run:h,step:r,resources:P}}function Cr(r){const t=[];for(const n in r){const l=r[n];l instanceof we&&t.push(l)}return t}async function ys(r){const t={};for(const n in r){const l=r[n];l instanceof we?t[n]=await l.resolve():t[n]=l}return t}async function wt(r,t){await r.run(t)}const hs=new Set(["installPlugin","installTheme","activatePlugin","activateTheme","login","setSiteOptions","updateUserMeta","importWxr","importFile","importWordPressFiles","enableMultisite","wp-cli","resetData"]);function gs(r){var l,u;const t=[];(l=r.plugins)!=null&&l.length&&t.push("plugins"),r.siteOptions&&t.push("siteOptions"),r.login&&t.push("login"),(u=r.extraLibraries)!=null&&u.includes("wp-cli")&&t.push("extraLibraries includes 'wp-cli'");const n=(r.steps||[]).filter(s=>!!s&&typeof s=="object"&&"step"in s).map(s=>s.step).filter(s=>hs.has(s));if(n.length&&t.push(`steps: ${[...new Set(n)].join(", ")}`),t.length)throw new Ar(`Blueprint has \`preferredVersions.wp: false\` but uses WordPress-only features: ${t.join("; ")}. Remove these or drop \`preferredVersions.wp: false\`.`,[])}function ws(r){const t=r.trim().replace(/\/+$/,"");return!!(/^https:\/\/.+\.git$/.test(t)||/^https:\/\/github\.com\/[^/]+\/[^/]+$/.test(t)||/^https:\/\/gitlab\.com\/[^/]+\/[^/]+(\/[^/]+)*$/.test(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 bs(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 vs(r){var P,y;const t=r.cliArgs||[];for(const O of t)if(O.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(O=>O.startsWith("--db-engine="))||t.push("--db-engine=sqlite");const l=r.php,u=(r==null?void 0:r.onMessage)||(()=>{}),s=await bt();l.writeFile("/tmp/blueprints.phar",new Uint8Array(await s.arrayBuffer()));const e=bs(r.blueprint);let p="";switch(e.type){case"inline-file":l.writeFile("/tmp/blueprint.json",e.contents),p="/tmp/blueprint.json";break;case"file-reference":p=e.reference;break}const d=await l.onMessage(async O=>{try{const T=typeof O=="string"?JSON.parse(O):O;if(!T)return;await new Promise(j=>setTimeout(j,0)),T.type.startsWith("blueprint.")&&await u(T)}catch(T){oe.logger.warn("Failed to parse message as JSON:",O,T)}});await(l==null?void 0:l.writeFile("/tmp/run-blueprints.php",`<?php
867
+ `)}function $t(r){var l;const t=ur(r);if(t)return{valid:t};const n=new Set;for(const s of ur.errors)s.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(s.instancePath);return{valid:!1,errors:((l=ur.errors)==null?void 0:l.filter(s=>!(s.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(s.instancePath))))??[]}}function Is(r,t,n){return(r==="7.2"||r==="7.3")&&(oe.logger.warn(`PHP ${r} is no longer supported. Automatically upgrading to PHP 7.4.`),r="7.4"),r&&t.includes(r)?r:n}function jt(r){return!!(typeof r=="object"&&r)}function Ds(r){return["setPhpIniEntry","request"].includes(r.step)?(oe.logger.warn(`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function Us(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:p,corsProxy:l,streamBundledFile:s,gitAdditionalHeadersCallback:e}){var k;const f=n.stage((((k=r.progress)==null?void 0:k.weight)||1)/p),d={};for(const T of Object.keys(r)){let b=r[T];Yt(b)&&(b=we.create(b,{semaphore:t,corsProxy:l,streamBundledFile:s,gitAdditionalHeadersCallback:e})),d[T]=b}const g=async T=>{var b;try{return f.fillSlowly(),await Fs[r.step](T,await Ws(d),{tracker:f,initialCaption:(b=r.progress)==null?void 0:b.caption})}finally{f.finish()}},y=Ur(d),h=Ur(d).filter(T=>T.isAsync),E=1/(h.length+1);for(const T of h)T.progress=f.stage(E);return{run:g,step:r,resources:y}}function Ur(r){const t=[];for(const n in r){const p=r[n];p instanceof we&&t.push(p)}return t}async function Ws(r){const t={};for(const n in r){const p=r[n];p instanceof we?t[n]=await p.resolve():t[n]=p}return t}async function At(r,t){await r.run(t)}const Vs=new Set(["installPlugin","installTheme","activatePlugin","activateTheme","login","setSiteOptions","updateUserMeta","importWxr","importFile","importWordPressFiles","enableMultisite","wp-cli","resetData"]);function Bs(r){var p,l;const t=[];(p=r.plugins)!=null&&p.length&&t.push("plugins"),r.siteOptions&&t.push("siteOptions"),r.login&&t.push("login"),(l=r.extraLibraries)!=null&&l.includes("wp-cli")&&t.push("extraLibraries includes 'wp-cli'");const n=(r.steps||[]).filter(s=>!!s&&typeof s=="object"&&"step"in s).map(s=>s.step).filter(s=>Vs.has(s));if(n.length&&t.push(`steps: ${[...new Set(n)].join(", ")}`),t.length)throw new Fr(`Blueprint has \`preferredVersions.wp: false\` but uses WordPress-only features: ${t.join("; ")}. Remove these or drop \`preferredVersions.wp: false\`.`,[])}async function qt(){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 zs(r){var y,h;const t=r.cliArgs||[];for(const E of t)if(E.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(E=>E.startsWith("--db-engine="))||t.push("--db-engine=sqlite");const p=r.php,l=(r==null?void 0:r.onMessage)||(()=>{}),s=await qt();p.writeFile("/tmp/blueprints.phar",new Uint8Array(await s.arrayBuffer()));const e=Ms(r.blueprint);let f="";switch(e.type){case"inline-file":p.writeFile("/tmp/blueprint.json",e.contents),f="/tmp/blueprint.json";break;case"file-reference":f=e.reference;break}const d=await p.onMessage(async E=>{try{const k=typeof E=="string"?JSON.parse(E):E;if(!k)return;await new Promise(T=>setTimeout(T,0)),k.type.startsWith("blueprint.")&&await l(k)}catch(k){oe.logger.warn("Failed to parse message as JSON:",E,k)}});await(p==null?void 0:p.writeFile("/tmp/run-blueprints.php",`<?php
797
868
  function playground_http_client_factory() {
798
869
  return new WordPress\\HttpClient\\Client([
799
870
  // sockets transport is somehow faster than curl in Playground. Maybe
@@ -812,7 +883,7 @@ playground_add_filter('blueprint.target_resolved', 'playground_on_blueprint_targ
812
883
 
813
884
  playground_add_filter('blueprint.resolved', 'playground_on_blueprint_resolved');
814
885
  function playground_on_blueprint_resolved($blueprint) {
815
- $additional_blueprint_steps = json_decode(${D.phpVar(JSON.stringify(((P=r.blueprintOverrides)==null?void 0:P.additionalSteps)||[]))}, true);
886
+ $additional_blueprint_steps = json_decode(${C.phpVar(JSON.stringify(((y=r.blueprintOverrides)==null?void 0:y.additionalSteps)||[]))}, true);
816
887
  if(count($additional_blueprint_steps) > 0) {
817
888
  $blueprint['additionalStepsAfterExecution'] = array_merge(
818
889
  $blueprint['additionalStepsAfterExecution'] ?? [],
@@ -820,7 +891,7 @@ function playground_on_blueprint_resolved($blueprint) {
820
891
  );
821
892
  }
822
893
 
823
- $wp_version_override = json_decode(${D.phpVar(JSON.stringify(((y=r.blueprintOverrides)==null?void 0:y.wordpressVersion)||null))}, true);
894
+ $wp_version_override = json_decode(${C.phpVar(JSON.stringify(((h=r.blueprintOverrides)==null?void 0:h.wordpressVersion)||null))}, true);
824
895
  if($wp_version_override) {
825
896
  $blueprint['wordpressVersion'] = $wp_version_override;
826
897
  }
@@ -874,5 +945,5 @@ function playground_progress_reporter() {
874
945
  }
875
946
  playground_add_filter('blueprint.progress_reporter', 'playground_progress_reporter');
876
947
  require( "/tmp/blueprints.phar" );
877
- `));const h=await l.cli(["/internal/shared/bin/php","/tmp/run-blueprints.php","exec",p,...t]);return h.finished.finally(d),h}class vt extends Error{constructor(t,n,l){super(t,l),this.name="BlueprintFetchError",this.url=n}}async function Ps(r,t={}){let n;try{const u=await(t.fetch||fetch)(r,{credentials:"omit"});if(!u.ok)throw new Error(`Failed to fetch blueprint from ${r}`);n=await u.arrayBuffer()}catch(l){throw new vt(`Blueprint file could not be resolved from ${r}: ${l instanceof Error?l.message:String(l)}`,r,{cause:l})}try{const l=new TextDecoder().decode(n);return JSON.parse(l),new be.OverlayFilesystem([new be.InMemoryFilesystem({"blueprint.json":l}),new be.FetchFilesystem({baseUrl:r,corsProxy:t.corsProxy})])}catch(l){if(await Os(n))return ks(n);throw new Error(`Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`,{cause:l})}}function _s(r){const t=r.map(l=>D.normalizePath(l));if(t.some(l=>D.basename(l)==="blueprint.json"&&D.dirname(l)===""))return"blueprint.json";const n=new Set;for(const l of t){const u=l.split("/")[0];u&&u!==D.basename(l)&&u!=="__MACOSX"&&n.add(u)}if(n.size>1)throw new Error("ZIP contains multiple top-level directories. Bundle ZIPs must contain blueprint.json at the root or inside a single top-level directory.");if(n.size===1){const u=`${[...n][0]}/blueprint.json`;if(t.includes(u))return u}throw new Error("ZIP does not contain a blueprint.json. Place blueprint.json at the ZIP root or inside a single top-level directory.")}async function ks(r){const t=be.ZipFilesystem.fromArrayBuffer(r),n=await t.getAllFilePaths(),l=_s(n),u=D.dirname(l);return u===""?t:new be.ChrootFilesystem(u,t)}async function Os(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 Ts(r){if((await Me.create(r)).getVersion()===1){const n=await Sr(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:vr.RecommendedPHPVersion,wpVersion:"latest",intl:!1,networking:!0,constants:{},extraLibraries:[]}}function Es(){}exports.BlueprintFetchError=vt;exports.BlueprintFilesystemRequiredError=Ir;exports.BlueprintReflection=Me;exports.BlueprintStepExecutionError=mt;exports.InvalidBlueprintError=Ar;exports.ResourceDownloadError=ar;exports.activatePlugin=_r;exports.activateTheme=kr;exports.compileBlueprint=Sr;exports.compileBlueprintV1=Sr;exports.cp=Gr;exports.defineSiteUrl=$r;exports.defineWpConfigConsts=fr;exports.enableMultisite=Yr;exports.exportWXR=st;exports.getBlueprintDeclaration=yt;exports.getV2Runner=bt;exports.importThemeStarterContent=jr;exports.importWordPressFiles=tt;exports.importWxr=rt;exports.installPlugin=ot;exports.installTheme=at;exports.isBlueprintBundle=Rr;exports.isStepDefinition=gt;exports.login=nt;exports.mkdir=Xr;exports.mv=Jr;exports.request=Hr;exports.resetData=pt;exports.resolveRemoteBlueprint=Ps;exports.resolveRuntimeConfiguration=Ts;exports.rm=pr;exports.rmdir=Kr;exports.runBlueprintSteps=wt;exports.runBlueprintV1Steps=wt;exports.runBlueprintV2=vs;exports.runPHP=Mr;exports.runPHPWithOptions=Vr;exports.runSql=zr;exports.runWpInstallationWizard=lt;exports.setPluginProxyURL=Es;exports.setSiteLanguage=ut;exports.setSiteOptions=Or;exports.unzip=dr;exports.updateUserMeta=Zr;exports.validateBlueprint=ht;exports.wpCLI=Er;exports.wpContentFilesExcludedFromExport=qr;exports.writeFile=ur;exports.writeFiles=et;exports.zipWpContent=ft;
948
+ `));const g=await p.cli(["/internal/shared/bin/php","/tmp/run-blueprints.php","exec",f,...t]);return g.finished.finally(d),g}class St extends Error{constructor(t,n,p){super(t,p),this.name="BlueprintFetchError",this.url=n}}async function Hs(r,t={}){let n;try{const l=await(t.fetch||fetch)(r,{credentials:"omit"});if(!l.ok)throw new Error(`Failed to fetch blueprint from ${r}`);n=await l.arrayBuffer()}catch(p){throw new St(`Blueprint file could not be resolved from ${r}: ${p instanceof Error?p.message:String(p)}`,r,{cause:p})}try{const p=new TextDecoder().decode(n);return JSON.parse(p),new be.OverlayFilesystem([new be.InMemoryFilesystem({"blueprint.json":p}),new be.FetchFilesystem({baseUrl:r,corsProxy:t.corsProxy})])}catch(p){if(await Qs(n))return Zs(n);throw new Error(`Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`,{cause:p})}}function Ys(r){const t=r.map(p=>C.normalizePath(p));if(t.some(p=>C.basename(p)==="blueprint.json"&&C.dirname(p)===""))return"blueprint.json";const n=new Set;for(const p of t){const l=p.split("/")[0];l&&l!==C.basename(p)&&l!=="__MACOSX"&&n.add(l)}if(n.size>1)throw new Error("ZIP contains multiple top-level directories. Bundle ZIPs must contain blueprint.json at the root or inside a single top-level directory.");if(n.size===1){const l=`${[...n][0]}/blueprint.json`;if(t.includes(l))return l}throw new Error("ZIP does not contain a blueprint.json. Place blueprint.json at the ZIP root or inside a single top-level directory.")}async function Zs(r){const t=be.ZipFilesystem.fromArrayBuffer(r),n=await t.getAllFilePaths(),p=Ys(n),l=C.dirname(p);return l===""?t:new be.ChrootFilesystem(l,t)}async function Qs(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}const Gs=["latest","beta","trunk","nightly"],Js=/^\d+\.\d+(?:\.\d+)?(?:-(?:beta|rc)\d+)?$/i,Xs=Pe.AllPHPVersions.filter(r=>r!=="next");async function Rt(r){var n;const t=await ze.create(r);if(t.getVersion()===1){const p=await He(r);return{wpVersion:p.versions.wp,phpVersion:p.versions.php,intl:p.features.intl,networking:p.features.networking,extraLibraries:p.extraLibraries,constants:{}}}else{const p=t.getDeclaration();if(!Ks(p))throw new Error("Expected a Blueprint v2 declaration.");const l=(n=p.applicationOptions)==null?void 0:n["wordpress-playground"];return{phpVersion:ei(p),wpVersion:si(p),intl:!1,networking:(l==null?void 0:l.networkAccess)??!0,constants:p.constants??{},extraLibraries:[]}}}function Ks(r){return r.version===2}function ei(r){const t=r.phpVersion;if(typeof t=="string")return Wr(t);const n=ri(t);if(n)return Wr(n);const p=ti(t);if(p)return p;if(t&&typeof t=="object")throw new Error(`Unsatisfiable Blueprint v2 PHP version constraints ${JSON.stringify(t)}. Supported versions: ${Pe.AllPHPVersions.join(", ")}.`);return Me.RecommendedPHPVersion}function Wr(r){if(r==="latest")return Pe.LatestSupportedPHPVersion;if(Pe.AllPHPVersions.includes(r))return r;throw new Error(`Unsupported Blueprint v2 PHP version "${r}". Supported versions: ${Pe.AllPHPVersions.join(", ")}.`)}function ri(r){if(!(!r||typeof r!="object")&&"recommended"in r)return typeof r.recommended=="string"?r.recommended:void 0}function ti(r){if(!(!r||typeof r!="object"))return Vr(Me.RecommendedPHPVersion,r)?Me.RecommendedPHPVersion:Xs.find(t=>Vr(t,r))}function Vr(r,t){if(r==="next")return!1;const n=Br(t==null?void 0:t.min);if(n&&Mr(r,n)<0)return!1;const p=Br(t==null?void 0:t.max);return!(p&&Mr(r,p)>0)}function Br(r){return r==="latest"?Pe.LatestSupportedPHPVersion:r}function Mr(r,t){const n=zr(r),p=zr(t);for(let l=0;l<3;l++){const s=n[l]-p[l];if(s!==0)return s}return 0}function zr(r){const[t=0,n=0,p=0]=r.split(".").map(l=>Number(l));return[t,n,p]}function si(r){const t=r.wordpressVersion;if(typeof t=="string")return Hr(t);const n=ii(t);return n?Hr(n):"latest"}function Hr(r){if(Gs.includes(r)||Js.test(r))return r;throw new Error(`Unsupported Blueprint v2 WordPress version "${r}". Use latest, beta, trunk, nightly, or a version like 6.8, 6.8.1, or 6.8-rc1.`)}function ii(r){if(!(!r||typeof r!="object")&&"min"in r&&"preferred"in r)return typeof r.preferred=="string"?r.preferred:void 0}class cr extends Error{constructor(t,n="This Blueprint v2 feature is not supported by the TypeScript runner yet."){super(`${t}: ${n}`),this.name="UnsupportedBlueprintV2FeatureError",this.featurePath=t}}async function oi(r,t={}){const n=await Rt(r),p=pi(r),{steps:l,unsupportedPlan:s}=li(p),e=ni(r,n,l);return{runtime:n,applicationOptions:r.applicationOptions,plan:p,steps:l,unsupportedPlan:s,run:async f=>{if(s.length>0)throw new cr("executionPlan",ai(s));await(await He(e,t)).run(f)}}}function ni(r,t,n){var l;const p=(l=r.applicationOptions)==null?void 0:l["wordpress-playground"];return{preferredVersions:{php:t.phpVersion,wp:t.wpVersion},features:{intl:t.intl,networking:t.networking},extraLibraries:t.extraLibraries,landingPage:p==null?void 0:p.landingPage,login:p==null?void 0:p.login,steps:n}}function ai(r){return`Blueprint v2 execution plan contains unsupported items: ${Array.from(new Set(r.map(n=>n.type))).join(", ")}.`}function pi(r){var n,p;const t=[];r.constants&&Object.keys(r.constants).length>0&&t.push({type:"defineWpConfigConsts",consts:r.constants}),r.siteOptions&&Object.keys(r.siteOptions).length>0&&t.push({type:"setSiteOptions",options:r.siteOptions});for(const[l,s]of(r.muPlugins??[]).entries())t.push({type:"installMuPlugin",muPlugin:s,sourcePath:`/muPlugins/${l}`});for(const[l,s]of(r.themes??[]).entries())t.push({type:"installTheme",theme:s,active:!1,sourcePath:`/themes/${l}`});r.activeTheme!==void 0&&t.push({type:"installTheme",theme:r.activeTheme,active:!0,sourcePath:"/activeTheme"});for(const[l,s]of(r.plugins??[]).entries())t.push({type:"installPlugin",plugin:s,sourcePath:`/plugins/${l}`});r.fonts&&Object.keys(r.fonts).length>0&&t.push({type:"installFonts",fonts:r.fonts});for(const[l,s]of(r.media??[]).entries())t.push({type:"importMedia",media:s,sourcePath:`/media/${l}`});r.siteLanguage&&t.push({type:"setSiteLanguage",language:r.siteLanguage}),(n=r.roles)!=null&&n.length&&t.push({type:"defineRoles",roles:r.roles}),(p=r.users)!=null&&p.length&&t.push({type:"defineUsers",users:r.users}),r.postTypes&&Object.keys(r.postTypes).length>0&&t.push({type:"definePostTypes",postTypes:r.postTypes});for(const[l,s]of(r.content??[]).entries())t.push({type:"importContent",content:s,sourcePath:`/content/${l}`});for(const[l,s]of(r.additionalStepsAfterExecution??[]).entries())t.push({type:"runStep",step:s,sourcePath:`/additionalStepsAfterExecution/${l}`});return t}function li(r){const t=[],n=[];for(const p of r){const l=fi(p);l?t.push(...l):n.push(p)}return{steps:t,unsupportedPlan:n}}function fi(r){switch(r.type){case"defineWpConfigConsts":return[{step:"defineWpConfigConsts",consts:r.consts}];case"setSiteOptions":return[{step:"setSiteOptions",options:r.options}];case"installTheme":return[Nt(r.theme,r.active)];case"installPlugin":return[Lt(r.plugin)];case"setSiteLanguage":return[{step:"setSiteLanguage",language:r.language}];case"runStep":return ui(r.step);default:return}}function ui(r){switch(r.step){case"activatePlugin":return[{step:"activatePlugin",pluginPath:r.pluginPath,pluginName:r.humanReadableName}];case"activateTheme":return[{step:"activateTheme",themeFolderName:r.themeDirectoryName}];case"cp":return[{step:"cp",fromPath:Ce(r.fromPath),toPath:Ce(r.toPath)}];case"defineConstants":return[{step:"defineWpConfigConsts",consts:r.constants}];case"importThemeStarterContent":return[{step:"importThemeStarterContent",themeSlug:r.themeSlug}];case"installPlugin":return[Lt(r)];case"installTheme":return[Nt(r,r.active??!0)];case"mkdir":return[{step:"mkdir",path:Ce(r.path)}];case"mv":return[{step:"mv",fromPath:Ce(r.fromPath),toPath:Ce(r.toPath)}];case"rm":return[{step:"rm",path:Ce(r.path)}];case"rmdir":return[{step:"rmdir",path:Ce(r.path)}];case"setSiteLanguage":return[{step:"setSiteLanguage",language:r.language}];case"setSiteOptions":return[{step:"setSiteOptions",options:r.options}];case"wp-cli":return[{step:"wp-cli",command:r.command,wpCliPath:r.wpCliPath}];default:return}}function Lt(r){const t=Ft(r),n={step:"installPlugin",pluginData:xt(t.source,"plugin"),options:di(t)};return t.ifAlreadyInstalled&&(n.ifAlreadyInstalled=t.ifAlreadyInstalled),n}function di(r){const t={activate:r.active??!0};return r.activationOptions&&(t.activationOptions=r.activationOptions),(r.onError==="skip-plugin"||r.onError==="throw")&&(t.onError=r.onError),r.targetDirectoryName&&(t.targetFolderName=r.targetDirectoryName),r.humanReadableName&&(t.humanReadableName=r.humanReadableName),t}function Nt(r,t){const n=Ft(r),p={step:"installTheme",themeData:xt(n.source,"theme"),options:ci(n,t)};return n.ifAlreadyInstalled&&(p.ifAlreadyInstalled=n.ifAlreadyInstalled),p}function ci(r,t){const n={activate:t,importStarterContent:r.importStarterContent??!1};return r.targetDirectoryName&&(n.targetFolderName=r.targetDirectoryName),(r.onError==="skip-theme"||r.onError==="throw")&&(n.onError=r.onError),r.humanReadableName&&(n.humanReadableName=r.humanReadableName),n}function Ft(r){return r&&typeof r=="object"&&"source"in r&&!Dt(r)&&!Ut(r)&&!Wt(r)?r:{source:r}}function xt(r,t){if(typeof r=="string")return kt(r)?{resource:"zip",inner:{resource:"git:directory",url:r.trim().replace(/\/+$/,""),ref:"HEAD"}}:mi(r)?{resource:"url",url:r}:yi(r)?{resource:"bundled",path:Ct(r)}:hi(r,t==="plugin"?"plugins":"themes");if(Dt(r))return{resource:"literal",name:r.filename,contents:r.content};if(Ut(r))return{resource:"literal:directory",name:r.directoryName,files:Vt(r.files)};if(Wt(r))return{resource:"git:directory",url:r.gitRepository,ref:r.ref||"HEAD",path:r.pathInRepository||r.path||""};throw new cr(t,"Unsupported Blueprint v2 data reference.")}function Ce(r){if(typeof r!="string"||r.trim()==="")throw new cr("path","Invalid Blueprint v2 path: must not be empty.");if(It(r))throw new cr("path",`Invalid Blueprint v2 path "${r}": must not contain parent directory segments.`);return r.startsWith("site:")?C.joinPaths("/wordpress",r.slice(5)):r==="/wordpress"||r.startsWith("/wordpress/")?r:C.joinPaths("/wordpress",r)}function mi(r){try{const t=new URL(r);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}function yi(r){return(r.startsWith("./")||r.startsWith("/"))&&!It(Ct(r))}function Ct(r){return r.replace(/^\.?\//,"")}function It(r){return(r.startsWith("site:")?r.slice(5):r).replace(/\\/g,"/").split("/").includes("..")}function hi(r,t){const[n,p]=r.split("@");return p&&p!=="latest"?{resource:"url",url:`https://downloads.wordpress.org/${t==="plugins"?"plugin":"theme"}/${n}.${p}.zip`}:{resource:t==="plugins"?"wordpress.org/plugins":"wordpress.org/themes",slug:n}}function Dt(r){return r&&typeof r=="object"&&typeof r.filename=="string"&&typeof r.content=="string"}function Ut(r){return r&&typeof r=="object"&&typeof r.directoryName=="string"&&r.files&&typeof r.files=="object"}function Wt(r){return r&&typeof r=="object"&&typeof r.gitRepository=="string"}function Vt(r){const t={};for(const[n,p]of Object.entries(r)){const l=typeof p=="string"?p:Vt(p.files);Object.defineProperty(t,n,{value:l,enumerable:!0,configurable:!0,writable:!0})}return t}async function gi(r,t={}){const n=await Qr(r);return vi(n)?wi(r,n):bi(r,n,t)}async function wi(r,t){const n=await oi(t,Ye(r)?{streamBundledFile:(...p)=>r.read(...p)}:{});return{version:2,declaration:t,compiled:n,run:n.run}}async function bi(r,t,n){const p=Ye(r)?r:t,l=await He(p,{...n,onBlueprintValidated:n.onBlueprintValidated});return{version:1,declaration:t,compiled:l,run:l.run}}function vi(r){return r.version===2}function Pi(){}exports.BlueprintFetchError=St;exports.BlueprintFilesystemRequiredError=Gr;exports.BlueprintReflection=ze;exports.BlueprintStepExecutionError=Et;exports.InvalidBlueprintError=Fr;exports.ResourceDownloadError=fr;exports.activatePlugin=$r;exports.activateTheme=jr;exports.compileBlueprint=He;exports.compileBlueprintForExecution=gi;exports.compileBlueprintV1=He;exports.cp=nt;exports.defineSiteUrl=Rr;exports.defineWpConfigConsts=yr;exports.enableMultisite=ot;exports.exportWXR=ct;exports.getBlueprintDeclaration=Tt;exports.getV2Runner=qt;exports.importThemeStarterContent=Lr;exports.importWordPressFiles=dt;exports.importWxr=ut;exports.installPlugin=yt;exports.installTheme=ht;exports.isBlueprintBundle=Ye;exports.isStepDefinition=jt;exports.login=gt;exports.mkdir=pt;exports.mv=at;exports.request=tt;exports.resetData=wt;exports.resolveRemoteBlueprint=Hs;exports.resolveRuntimeConfiguration=Rt;exports.rm=dr;exports.rmdir=lt;exports.runBlueprintSteps=At;exports.runBlueprintV1Steps=At;exports.runBlueprintV2=zs;exports.runPHP=Kr;exports.runPHPWithOptions=et;exports.runSql=rt;exports.runWpInstallationWizard=bt;exports.setPluginProxyURL=Pi;exports.setSiteLanguage=Pt;exports.setSiteOptions=Ar;exports.unzip=gr;exports.updateUserMeta=st;exports.validateBlueprint=$t;exports.wpCLI=Sr;exports.wpContentFilesExcludedFromExport=Nr;exports.writeFile=hr;exports.writeFiles=ft;exports.zipWpContent=vt;
878
949
  //# sourceMappingURL=index.cjs.map